Skip to main content

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    /// # async fn sample() -> gax::client_builder::Result<()> {
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    /// # 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    /// ```
78    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CreateGlossary;
79    /// # async fn sample() -> gax::Result<()> {
80    /// use lro::Poller;
81    ///
82    /// let builder = prepare_request_builder();
83    /// let response = builder.poller().until_done().await?;
84    /// # Ok(()) }
85    ///
86    /// fn prepare_request_builder() -> CreateGlossary {
87    ///   # panic!();
88    ///   // ... details omitted ...
89    /// }
90    /// ```
91    #[derive(Clone, Debug)]
92    pub struct CreateGlossary(RequestBuilder<crate::model::CreateGlossaryRequest>);
93
94    impl CreateGlossary {
95        pub(crate) fn new(
96            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
97        ) -> Self {
98            Self(RequestBuilder::new(stub))
99        }
100
101        /// Sets the full request, replacing any prior values.
102        pub fn with_request<V: Into<crate::model::CreateGlossaryRequest>>(mut self, v: V) -> Self {
103            self.0.request = v.into();
104            self
105        }
106
107        /// Sets all the options, replacing any prior values.
108        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
109            self.0.options = v.into();
110            self
111        }
112
113        /// Sends the request.
114        ///
115        /// # Long running operations
116        ///
117        /// This starts, but does not poll, a longrunning operation. More information
118        /// on [create_glossary][crate::client::BusinessGlossaryService::create_glossary].
119        pub async fn send(self) -> Result<longrunning::model::Operation> {
120            (*self.0.stub)
121                .create_glossary(self.0.request, self.0.options)
122                .await
123                .map(gax::response::Response::into_body)
124        }
125
126        /// Creates a [Poller][lro::Poller] to work with `create_glossary`.
127        pub fn poller(
128            self,
129        ) -> impl lro::Poller<crate::model::Glossary, crate::model::OperationMetadata> {
130            type Operation =
131                lro::internal::Operation<crate::model::Glossary, crate::model::OperationMetadata>;
132            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
133            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
134
135            let stub = self.0.stub.clone();
136            let mut options = self.0.options.clone();
137            options.set_retry_policy(gax::retry_policy::NeverRetry);
138            let query = move |name| {
139                let stub = stub.clone();
140                let options = options.clone();
141                async {
142                    let op = GetOperation::new(stub)
143                        .set_name(name)
144                        .with_options(options)
145                        .send()
146                        .await?;
147                    Ok(Operation::new(op))
148                }
149            };
150
151            let start = move || async {
152                let op = self.send().await?;
153                Ok(Operation::new(op))
154            };
155
156            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
157        }
158
159        /// Sets the value of [parent][crate::model::CreateGlossaryRequest::parent].
160        ///
161        /// This is a **required** field for requests.
162        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
163            self.0.request.parent = v.into();
164            self
165        }
166
167        /// Sets the value of [glossary_id][crate::model::CreateGlossaryRequest::glossary_id].
168        ///
169        /// This is a **required** field for requests.
170        pub fn set_glossary_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
171            self.0.request.glossary_id = v.into();
172            self
173        }
174
175        /// Sets the value of [glossary][crate::model::CreateGlossaryRequest::glossary].
176        ///
177        /// This is a **required** field for requests.
178        pub fn set_glossary<T>(mut self, v: T) -> Self
179        where
180            T: std::convert::Into<crate::model::Glossary>,
181        {
182            self.0.request.glossary = std::option::Option::Some(v.into());
183            self
184        }
185
186        /// Sets or clears the value of [glossary][crate::model::CreateGlossaryRequest::glossary].
187        ///
188        /// This is a **required** field for requests.
189        pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
190        where
191            T: std::convert::Into<crate::model::Glossary>,
192        {
193            self.0.request.glossary = v.map(|x| x.into());
194            self
195        }
196
197        /// Sets the value of [validate_only][crate::model::CreateGlossaryRequest::validate_only].
198        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
199            self.0.request.validate_only = v.into();
200            self
201        }
202    }
203
204    #[doc(hidden)]
205    impl gax::options::internal::RequestBuilder for CreateGlossary {
206        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
207            &mut self.0.options
208        }
209    }
210
211    /// The request builder for [BusinessGlossaryService::update_glossary][crate::client::BusinessGlossaryService::update_glossary] calls.
212    ///
213    /// # Example
214    /// ```
215    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::UpdateGlossary;
216    /// # async fn sample() -> gax::Result<()> {
217    /// use lro::Poller;
218    ///
219    /// let builder = prepare_request_builder();
220    /// let response = builder.poller().until_done().await?;
221    /// # Ok(()) }
222    ///
223    /// fn prepare_request_builder() -> UpdateGlossary {
224    ///   # panic!();
225    ///   // ... details omitted ...
226    /// }
227    /// ```
228    #[derive(Clone, Debug)]
229    pub struct UpdateGlossary(RequestBuilder<crate::model::UpdateGlossaryRequest>);
230
231    impl UpdateGlossary {
232        pub(crate) fn new(
233            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
234        ) -> Self {
235            Self(RequestBuilder::new(stub))
236        }
237
238        /// Sets the full request, replacing any prior values.
239        pub fn with_request<V: Into<crate::model::UpdateGlossaryRequest>>(mut self, v: V) -> Self {
240            self.0.request = v.into();
241            self
242        }
243
244        /// Sets all the options, replacing any prior values.
245        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
246            self.0.options = v.into();
247            self
248        }
249
250        /// Sends the request.
251        ///
252        /// # Long running operations
253        ///
254        /// This starts, but does not poll, a longrunning operation. More information
255        /// on [update_glossary][crate::client::BusinessGlossaryService::update_glossary].
256        pub async fn send(self) -> Result<longrunning::model::Operation> {
257            (*self.0.stub)
258                .update_glossary(self.0.request, self.0.options)
259                .await
260                .map(gax::response::Response::into_body)
261        }
262
263        /// Creates a [Poller][lro::Poller] to work with `update_glossary`.
264        pub fn poller(
265            self,
266        ) -> impl lro::Poller<crate::model::Glossary, crate::model::OperationMetadata> {
267            type Operation =
268                lro::internal::Operation<crate::model::Glossary, crate::model::OperationMetadata>;
269            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
270            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
271
272            let stub = self.0.stub.clone();
273            let mut options = self.0.options.clone();
274            options.set_retry_policy(gax::retry_policy::NeverRetry);
275            let query = move |name| {
276                let stub = stub.clone();
277                let options = options.clone();
278                async {
279                    let op = GetOperation::new(stub)
280                        .set_name(name)
281                        .with_options(options)
282                        .send()
283                        .await?;
284                    Ok(Operation::new(op))
285                }
286            };
287
288            let start = move || async {
289                let op = self.send().await?;
290                Ok(Operation::new(op))
291            };
292
293            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
294        }
295
296        /// Sets the value of [glossary][crate::model::UpdateGlossaryRequest::glossary].
297        ///
298        /// This is a **required** field for requests.
299        pub fn set_glossary<T>(mut self, v: T) -> Self
300        where
301            T: std::convert::Into<crate::model::Glossary>,
302        {
303            self.0.request.glossary = std::option::Option::Some(v.into());
304            self
305        }
306
307        /// Sets or clears the value of [glossary][crate::model::UpdateGlossaryRequest::glossary].
308        ///
309        /// This is a **required** field for requests.
310        pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
311        where
312            T: std::convert::Into<crate::model::Glossary>,
313        {
314            self.0.request.glossary = v.map(|x| x.into());
315            self
316        }
317
318        /// Sets the value of [update_mask][crate::model::UpdateGlossaryRequest::update_mask].
319        ///
320        /// This is a **required** field for requests.
321        pub fn set_update_mask<T>(mut self, v: T) -> Self
322        where
323            T: std::convert::Into<wkt::FieldMask>,
324        {
325            self.0.request.update_mask = std::option::Option::Some(v.into());
326            self
327        }
328
329        /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryRequest::update_mask].
330        ///
331        /// This is a **required** field for requests.
332        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
333        where
334            T: std::convert::Into<wkt::FieldMask>,
335        {
336            self.0.request.update_mask = v.map(|x| x.into());
337            self
338        }
339
340        /// Sets the value of [validate_only][crate::model::UpdateGlossaryRequest::validate_only].
341        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
342            self.0.request.validate_only = v.into();
343            self
344        }
345    }
346
347    #[doc(hidden)]
348    impl gax::options::internal::RequestBuilder for UpdateGlossary {
349        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
350            &mut self.0.options
351        }
352    }
353
354    /// The request builder for [BusinessGlossaryService::delete_glossary][crate::client::BusinessGlossaryService::delete_glossary] calls.
355    ///
356    /// # Example
357    /// ```
358    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteGlossary;
359    /// # async fn sample() -> gax::Result<()> {
360    /// use lro::Poller;
361    ///
362    /// let builder = prepare_request_builder();
363    /// let response = builder.poller().until_done().await?;
364    /// # Ok(()) }
365    ///
366    /// fn prepare_request_builder() -> DeleteGlossary {
367    ///   # panic!();
368    ///   // ... details omitted ...
369    /// }
370    /// ```
371    #[derive(Clone, Debug)]
372    pub struct DeleteGlossary(RequestBuilder<crate::model::DeleteGlossaryRequest>);
373
374    impl DeleteGlossary {
375        pub(crate) fn new(
376            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
377        ) -> Self {
378            Self(RequestBuilder::new(stub))
379        }
380
381        /// Sets the full request, replacing any prior values.
382        pub fn with_request<V: Into<crate::model::DeleteGlossaryRequest>>(mut self, v: V) -> Self {
383            self.0.request = v.into();
384            self
385        }
386
387        /// Sets all the options, replacing any prior values.
388        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
389            self.0.options = v.into();
390            self
391        }
392
393        /// Sends the request.
394        ///
395        /// # Long running operations
396        ///
397        /// This starts, but does not poll, a longrunning operation. More information
398        /// on [delete_glossary][crate::client::BusinessGlossaryService::delete_glossary].
399        pub async fn send(self) -> Result<longrunning::model::Operation> {
400            (*self.0.stub)
401                .delete_glossary(self.0.request, self.0.options)
402                .await
403                .map(gax::response::Response::into_body)
404        }
405
406        /// Creates a [Poller][lro::Poller] to work with `delete_glossary`.
407        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
408            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
409            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
410            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
411
412            let stub = self.0.stub.clone();
413            let mut options = self.0.options.clone();
414            options.set_retry_policy(gax::retry_policy::NeverRetry);
415            let query = move |name| {
416                let stub = stub.clone();
417                let options = options.clone();
418                async {
419                    let op = GetOperation::new(stub)
420                        .set_name(name)
421                        .with_options(options)
422                        .send()
423                        .await?;
424                    Ok(Operation::new(op))
425                }
426            };
427
428            let start = move || async {
429                let op = self.send().await?;
430                Ok(Operation::new(op))
431            };
432
433            lro::internal::new_unit_response_poller(
434                polling_error_policy,
435                polling_backoff_policy,
436                start,
437                query,
438            )
439        }
440
441        /// Sets the value of [name][crate::model::DeleteGlossaryRequest::name].
442        ///
443        /// This is a **required** field for requests.
444        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
445            self.0.request.name = v.into();
446            self
447        }
448
449        /// Sets the value of [etag][crate::model::DeleteGlossaryRequest::etag].
450        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
451            self.0.request.etag = v.into();
452            self
453        }
454    }
455
456    #[doc(hidden)]
457    impl gax::options::internal::RequestBuilder for DeleteGlossary {
458        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
459            &mut self.0.options
460        }
461    }
462
463    /// The request builder for [BusinessGlossaryService::get_glossary][crate::client::BusinessGlossaryService::get_glossary] calls.
464    ///
465    /// # Example
466    /// ```
467    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetGlossary;
468    /// # async fn sample() -> gax::Result<()> {
469    ///
470    /// let builder = prepare_request_builder();
471    /// let response = builder.send().await?;
472    /// # Ok(()) }
473    ///
474    /// fn prepare_request_builder() -> GetGlossary {
475    ///   # panic!();
476    ///   // ... details omitted ...
477    /// }
478    /// ```
479    #[derive(Clone, Debug)]
480    pub struct GetGlossary(RequestBuilder<crate::model::GetGlossaryRequest>);
481
482    impl GetGlossary {
483        pub(crate) fn new(
484            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
485        ) -> Self {
486            Self(RequestBuilder::new(stub))
487        }
488
489        /// Sets the full request, replacing any prior values.
490        pub fn with_request<V: Into<crate::model::GetGlossaryRequest>>(mut self, v: V) -> Self {
491            self.0.request = v.into();
492            self
493        }
494
495        /// Sets all the options, replacing any prior values.
496        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
497            self.0.options = v.into();
498            self
499        }
500
501        /// Sends the request.
502        pub async fn send(self) -> Result<crate::model::Glossary> {
503            (*self.0.stub)
504                .get_glossary(self.0.request, self.0.options)
505                .await
506                .map(gax::response::Response::into_body)
507        }
508
509        /// Sets the value of [name][crate::model::GetGlossaryRequest::name].
510        ///
511        /// This is a **required** field for requests.
512        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
513            self.0.request.name = v.into();
514            self
515        }
516    }
517
518    #[doc(hidden)]
519    impl gax::options::internal::RequestBuilder for GetGlossary {
520        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
521            &mut self.0.options
522        }
523    }
524
525    /// The request builder for [BusinessGlossaryService::list_glossaries][crate::client::BusinessGlossaryService::list_glossaries] calls.
526    ///
527    /// # Example
528    /// ```
529    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListGlossaries;
530    /// # async fn sample() -> gax::Result<()> {
531    /// use gax::paginator::ItemPaginator;
532    ///
533    /// let builder = prepare_request_builder();
534    /// let mut items = builder.by_item();
535    /// while let Some(result) = items.next().await {
536    ///   let item = result?;
537    /// }
538    /// # Ok(()) }
539    ///
540    /// fn prepare_request_builder() -> ListGlossaries {
541    ///   # panic!();
542    ///   // ... details omitted ...
543    /// }
544    /// ```
545    #[derive(Clone, Debug)]
546    pub struct ListGlossaries(RequestBuilder<crate::model::ListGlossariesRequest>);
547
548    impl ListGlossaries {
549        pub(crate) fn new(
550            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
551        ) -> Self {
552            Self(RequestBuilder::new(stub))
553        }
554
555        /// Sets the full request, replacing any prior values.
556        pub fn with_request<V: Into<crate::model::ListGlossariesRequest>>(mut self, v: V) -> Self {
557            self.0.request = v.into();
558            self
559        }
560
561        /// Sets all the options, replacing any prior values.
562        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
563            self.0.options = v.into();
564            self
565        }
566
567        /// Sends the request.
568        pub async fn send(self) -> Result<crate::model::ListGlossariesResponse> {
569            (*self.0.stub)
570                .list_glossaries(self.0.request, self.0.options)
571                .await
572                .map(gax::response::Response::into_body)
573        }
574
575        /// Streams each page in the collection.
576        pub fn by_page(
577            self,
578        ) -> impl gax::paginator::Paginator<crate::model::ListGlossariesResponse, gax::error::Error>
579        {
580            use std::clone::Clone;
581            let token = self.0.request.page_token.clone();
582            let execute = move |token: String| {
583                let mut builder = self.clone();
584                builder.0.request = builder.0.request.set_page_token(token);
585                builder.send()
586            };
587            gax::paginator::internal::new_paginator(token, execute)
588        }
589
590        /// Streams each item in the collection.
591        pub fn by_item(
592            self,
593        ) -> impl gax::paginator::ItemPaginator<crate::model::ListGlossariesResponse, gax::error::Error>
594        {
595            use gax::paginator::Paginator;
596            self.by_page().items()
597        }
598
599        /// Sets the value of [parent][crate::model::ListGlossariesRequest::parent].
600        ///
601        /// This is a **required** field for requests.
602        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
603            self.0.request.parent = v.into();
604            self
605        }
606
607        /// Sets the value of [page_size][crate::model::ListGlossariesRequest::page_size].
608        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
609            self.0.request.page_size = v.into();
610            self
611        }
612
613        /// Sets the value of [page_token][crate::model::ListGlossariesRequest::page_token].
614        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
615            self.0.request.page_token = v.into();
616            self
617        }
618
619        /// Sets the value of [filter][crate::model::ListGlossariesRequest::filter].
620        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
621            self.0.request.filter = v.into();
622            self
623        }
624
625        /// Sets the value of [order_by][crate::model::ListGlossariesRequest::order_by].
626        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
627            self.0.request.order_by = v.into();
628            self
629        }
630    }
631
632    #[doc(hidden)]
633    impl gax::options::internal::RequestBuilder for ListGlossaries {
634        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
635            &mut self.0.options
636        }
637    }
638
639    /// The request builder for [BusinessGlossaryService::create_glossary_category][crate::client::BusinessGlossaryService::create_glossary_category] calls.
640    ///
641    /// # Example
642    /// ```
643    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CreateGlossaryCategory;
644    /// # async fn sample() -> gax::Result<()> {
645    ///
646    /// let builder = prepare_request_builder();
647    /// let response = builder.send().await?;
648    /// # Ok(()) }
649    ///
650    /// fn prepare_request_builder() -> CreateGlossaryCategory {
651    ///   # panic!();
652    ///   // ... details omitted ...
653    /// }
654    /// ```
655    #[derive(Clone, Debug)]
656    pub struct CreateGlossaryCategory(RequestBuilder<crate::model::CreateGlossaryCategoryRequest>);
657
658    impl CreateGlossaryCategory {
659        pub(crate) fn new(
660            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
661        ) -> Self {
662            Self(RequestBuilder::new(stub))
663        }
664
665        /// Sets the full request, replacing any prior values.
666        pub fn with_request<V: Into<crate::model::CreateGlossaryCategoryRequest>>(
667            mut self,
668            v: V,
669        ) -> Self {
670            self.0.request = v.into();
671            self
672        }
673
674        /// Sets all the options, replacing any prior values.
675        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
676            self.0.options = v.into();
677            self
678        }
679
680        /// Sends the request.
681        pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
682            (*self.0.stub)
683                .create_glossary_category(self.0.request, self.0.options)
684                .await
685                .map(gax::response::Response::into_body)
686        }
687
688        /// Sets the value of [parent][crate::model::CreateGlossaryCategoryRequest::parent].
689        ///
690        /// This is a **required** field for requests.
691        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
692            self.0.request.parent = v.into();
693            self
694        }
695
696        /// Sets the value of [category_id][crate::model::CreateGlossaryCategoryRequest::category_id].
697        ///
698        /// This is a **required** field for requests.
699        pub fn set_category_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
700            self.0.request.category_id = v.into();
701            self
702        }
703
704        /// Sets the value of [category][crate::model::CreateGlossaryCategoryRequest::category].
705        ///
706        /// This is a **required** field for requests.
707        pub fn set_category<T>(mut self, v: T) -> Self
708        where
709            T: std::convert::Into<crate::model::GlossaryCategory>,
710        {
711            self.0.request.category = std::option::Option::Some(v.into());
712            self
713        }
714
715        /// Sets or clears the value of [category][crate::model::CreateGlossaryCategoryRequest::category].
716        ///
717        /// This is a **required** field for requests.
718        pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
719        where
720            T: std::convert::Into<crate::model::GlossaryCategory>,
721        {
722            self.0.request.category = v.map(|x| x.into());
723            self
724        }
725    }
726
727    #[doc(hidden)]
728    impl gax::options::internal::RequestBuilder for CreateGlossaryCategory {
729        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
730            &mut self.0.options
731        }
732    }
733
734    /// The request builder for [BusinessGlossaryService::update_glossary_category][crate::client::BusinessGlossaryService::update_glossary_category] calls.
735    ///
736    /// # Example
737    /// ```
738    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::UpdateGlossaryCategory;
739    /// # async fn sample() -> gax::Result<()> {
740    ///
741    /// let builder = prepare_request_builder();
742    /// let response = builder.send().await?;
743    /// # Ok(()) }
744    ///
745    /// fn prepare_request_builder() -> UpdateGlossaryCategory {
746    ///   # panic!();
747    ///   // ... details omitted ...
748    /// }
749    /// ```
750    #[derive(Clone, Debug)]
751    pub struct UpdateGlossaryCategory(RequestBuilder<crate::model::UpdateGlossaryCategoryRequest>);
752
753    impl UpdateGlossaryCategory {
754        pub(crate) fn new(
755            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
756        ) -> Self {
757            Self(RequestBuilder::new(stub))
758        }
759
760        /// Sets the full request, replacing any prior values.
761        pub fn with_request<V: Into<crate::model::UpdateGlossaryCategoryRequest>>(
762            mut self,
763            v: V,
764        ) -> Self {
765            self.0.request = v.into();
766            self
767        }
768
769        /// Sets all the options, replacing any prior values.
770        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
771            self.0.options = v.into();
772            self
773        }
774
775        /// Sends the request.
776        pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
777            (*self.0.stub)
778                .update_glossary_category(self.0.request, self.0.options)
779                .await
780                .map(gax::response::Response::into_body)
781        }
782
783        /// Sets the value of [category][crate::model::UpdateGlossaryCategoryRequest::category].
784        ///
785        /// This is a **required** field for requests.
786        pub fn set_category<T>(mut self, v: T) -> Self
787        where
788            T: std::convert::Into<crate::model::GlossaryCategory>,
789        {
790            self.0.request.category = std::option::Option::Some(v.into());
791            self
792        }
793
794        /// Sets or clears the value of [category][crate::model::UpdateGlossaryCategoryRequest::category].
795        ///
796        /// This is a **required** field for requests.
797        pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
798        where
799            T: std::convert::Into<crate::model::GlossaryCategory>,
800        {
801            self.0.request.category = v.map(|x| x.into());
802            self
803        }
804
805        /// Sets the value of [update_mask][crate::model::UpdateGlossaryCategoryRequest::update_mask].
806        ///
807        /// This is a **required** field for requests.
808        pub fn set_update_mask<T>(mut self, v: T) -> Self
809        where
810            T: std::convert::Into<wkt::FieldMask>,
811        {
812            self.0.request.update_mask = std::option::Option::Some(v.into());
813            self
814        }
815
816        /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryCategoryRequest::update_mask].
817        ///
818        /// This is a **required** field for requests.
819        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
820        where
821            T: std::convert::Into<wkt::FieldMask>,
822        {
823            self.0.request.update_mask = v.map(|x| x.into());
824            self
825        }
826    }
827
828    #[doc(hidden)]
829    impl gax::options::internal::RequestBuilder for UpdateGlossaryCategory {
830        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
831            &mut self.0.options
832        }
833    }
834
835    /// The request builder for [BusinessGlossaryService::delete_glossary_category][crate::client::BusinessGlossaryService::delete_glossary_category] calls.
836    ///
837    /// # Example
838    /// ```
839    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteGlossaryCategory;
840    /// # async fn sample() -> gax::Result<()> {
841    ///
842    /// let builder = prepare_request_builder();
843    /// let response = builder.send().await?;
844    /// # Ok(()) }
845    ///
846    /// fn prepare_request_builder() -> DeleteGlossaryCategory {
847    ///   # panic!();
848    ///   // ... details omitted ...
849    /// }
850    /// ```
851    #[derive(Clone, Debug)]
852    pub struct DeleteGlossaryCategory(RequestBuilder<crate::model::DeleteGlossaryCategoryRequest>);
853
854    impl DeleteGlossaryCategory {
855        pub(crate) fn new(
856            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
857        ) -> Self {
858            Self(RequestBuilder::new(stub))
859        }
860
861        /// Sets the full request, replacing any prior values.
862        pub fn with_request<V: Into<crate::model::DeleteGlossaryCategoryRequest>>(
863            mut self,
864            v: V,
865        ) -> Self {
866            self.0.request = v.into();
867            self
868        }
869
870        /// Sets all the options, replacing any prior values.
871        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
872            self.0.options = v.into();
873            self
874        }
875
876        /// Sends the request.
877        pub async fn send(self) -> Result<()> {
878            (*self.0.stub)
879                .delete_glossary_category(self.0.request, self.0.options)
880                .await
881                .map(gax::response::Response::into_body)
882        }
883
884        /// Sets the value of [name][crate::model::DeleteGlossaryCategoryRequest::name].
885        ///
886        /// This is a **required** field for requests.
887        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
888            self.0.request.name = v.into();
889            self
890        }
891    }
892
893    #[doc(hidden)]
894    impl gax::options::internal::RequestBuilder for DeleteGlossaryCategory {
895        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
896            &mut self.0.options
897        }
898    }
899
900    /// The request builder for [BusinessGlossaryService::get_glossary_category][crate::client::BusinessGlossaryService::get_glossary_category] calls.
901    ///
902    /// # Example
903    /// ```
904    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetGlossaryCategory;
905    /// # async fn sample() -> gax::Result<()> {
906    ///
907    /// let builder = prepare_request_builder();
908    /// let response = builder.send().await?;
909    /// # Ok(()) }
910    ///
911    /// fn prepare_request_builder() -> GetGlossaryCategory {
912    ///   # panic!();
913    ///   // ... details omitted ...
914    /// }
915    /// ```
916    #[derive(Clone, Debug)]
917    pub struct GetGlossaryCategory(RequestBuilder<crate::model::GetGlossaryCategoryRequest>);
918
919    impl GetGlossaryCategory {
920        pub(crate) fn new(
921            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
922        ) -> Self {
923            Self(RequestBuilder::new(stub))
924        }
925
926        /// Sets the full request, replacing any prior values.
927        pub fn with_request<V: Into<crate::model::GetGlossaryCategoryRequest>>(
928            mut self,
929            v: V,
930        ) -> Self {
931            self.0.request = v.into();
932            self
933        }
934
935        /// Sets all the options, replacing any prior values.
936        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
937            self.0.options = v.into();
938            self
939        }
940
941        /// Sends the request.
942        pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
943            (*self.0.stub)
944                .get_glossary_category(self.0.request, self.0.options)
945                .await
946                .map(gax::response::Response::into_body)
947        }
948
949        /// Sets the value of [name][crate::model::GetGlossaryCategoryRequest::name].
950        ///
951        /// This is a **required** field for requests.
952        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
953            self.0.request.name = v.into();
954            self
955        }
956    }
957
958    #[doc(hidden)]
959    impl gax::options::internal::RequestBuilder for GetGlossaryCategory {
960        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
961            &mut self.0.options
962        }
963    }
964
965    /// The request builder for [BusinessGlossaryService::list_glossary_categories][crate::client::BusinessGlossaryService::list_glossary_categories] calls.
966    ///
967    /// # Example
968    /// ```
969    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListGlossaryCategories;
970    /// # async fn sample() -> gax::Result<()> {
971    /// use gax::paginator::ItemPaginator;
972    ///
973    /// let builder = prepare_request_builder();
974    /// let mut items = builder.by_item();
975    /// while let Some(result) = items.next().await {
976    ///   let item = result?;
977    /// }
978    /// # Ok(()) }
979    ///
980    /// fn prepare_request_builder() -> ListGlossaryCategories {
981    ///   # panic!();
982    ///   // ... details omitted ...
983    /// }
984    /// ```
985    #[derive(Clone, Debug)]
986    pub struct ListGlossaryCategories(RequestBuilder<crate::model::ListGlossaryCategoriesRequest>);
987
988    impl ListGlossaryCategories {
989        pub(crate) fn new(
990            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
991        ) -> Self {
992            Self(RequestBuilder::new(stub))
993        }
994
995        /// Sets the full request, replacing any prior values.
996        pub fn with_request<V: Into<crate::model::ListGlossaryCategoriesRequest>>(
997            mut self,
998            v: V,
999        ) -> Self {
1000            self.0.request = v.into();
1001            self
1002        }
1003
1004        /// Sets all the options, replacing any prior values.
1005        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1006            self.0.options = v.into();
1007            self
1008        }
1009
1010        /// Sends the request.
1011        pub async fn send(self) -> Result<crate::model::ListGlossaryCategoriesResponse> {
1012            (*self.0.stub)
1013                .list_glossary_categories(self.0.request, self.0.options)
1014                .await
1015                .map(gax::response::Response::into_body)
1016        }
1017
1018        /// Streams each page in the collection.
1019        pub fn by_page(
1020            self,
1021        ) -> impl gax::paginator::Paginator<
1022            crate::model::ListGlossaryCategoriesResponse,
1023            gax::error::Error,
1024        > {
1025            use std::clone::Clone;
1026            let token = self.0.request.page_token.clone();
1027            let execute = move |token: String| {
1028                let mut builder = self.clone();
1029                builder.0.request = builder.0.request.set_page_token(token);
1030                builder.send()
1031            };
1032            gax::paginator::internal::new_paginator(token, execute)
1033        }
1034
1035        /// Streams each item in the collection.
1036        pub fn by_item(
1037            self,
1038        ) -> impl gax::paginator::ItemPaginator<
1039            crate::model::ListGlossaryCategoriesResponse,
1040            gax::error::Error,
1041        > {
1042            use gax::paginator::Paginator;
1043            self.by_page().items()
1044        }
1045
1046        /// Sets the value of [parent][crate::model::ListGlossaryCategoriesRequest::parent].
1047        ///
1048        /// This is a **required** field for requests.
1049        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1050            self.0.request.parent = v.into();
1051            self
1052        }
1053
1054        /// Sets the value of [page_size][crate::model::ListGlossaryCategoriesRequest::page_size].
1055        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1056            self.0.request.page_size = v.into();
1057            self
1058        }
1059
1060        /// Sets the value of [page_token][crate::model::ListGlossaryCategoriesRequest::page_token].
1061        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1062            self.0.request.page_token = v.into();
1063            self
1064        }
1065
1066        /// Sets the value of [filter][crate::model::ListGlossaryCategoriesRequest::filter].
1067        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1068            self.0.request.filter = v.into();
1069            self
1070        }
1071
1072        /// Sets the value of [order_by][crate::model::ListGlossaryCategoriesRequest::order_by].
1073        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1074            self.0.request.order_by = v.into();
1075            self
1076        }
1077    }
1078
1079    #[doc(hidden)]
1080    impl gax::options::internal::RequestBuilder for ListGlossaryCategories {
1081        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1082            &mut self.0.options
1083        }
1084    }
1085
1086    /// The request builder for [BusinessGlossaryService::create_glossary_term][crate::client::BusinessGlossaryService::create_glossary_term] calls.
1087    ///
1088    /// # Example
1089    /// ```
1090    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CreateGlossaryTerm;
1091    /// # async fn sample() -> gax::Result<()> {
1092    ///
1093    /// let builder = prepare_request_builder();
1094    /// let response = builder.send().await?;
1095    /// # Ok(()) }
1096    ///
1097    /// fn prepare_request_builder() -> CreateGlossaryTerm {
1098    ///   # panic!();
1099    ///   // ... details omitted ...
1100    /// }
1101    /// ```
1102    #[derive(Clone, Debug)]
1103    pub struct CreateGlossaryTerm(RequestBuilder<crate::model::CreateGlossaryTermRequest>);
1104
1105    impl CreateGlossaryTerm {
1106        pub(crate) fn new(
1107            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1108        ) -> Self {
1109            Self(RequestBuilder::new(stub))
1110        }
1111
1112        /// Sets the full request, replacing any prior values.
1113        pub fn with_request<V: Into<crate::model::CreateGlossaryTermRequest>>(
1114            mut self,
1115            v: V,
1116        ) -> Self {
1117            self.0.request = v.into();
1118            self
1119        }
1120
1121        /// Sets all the options, replacing any prior values.
1122        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1123            self.0.options = v.into();
1124            self
1125        }
1126
1127        /// Sends the request.
1128        pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1129            (*self.0.stub)
1130                .create_glossary_term(self.0.request, self.0.options)
1131                .await
1132                .map(gax::response::Response::into_body)
1133        }
1134
1135        /// Sets the value of [parent][crate::model::CreateGlossaryTermRequest::parent].
1136        ///
1137        /// This is a **required** field for requests.
1138        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1139            self.0.request.parent = v.into();
1140            self
1141        }
1142
1143        /// Sets the value of [term_id][crate::model::CreateGlossaryTermRequest::term_id].
1144        ///
1145        /// This is a **required** field for requests.
1146        pub fn set_term_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1147            self.0.request.term_id = v.into();
1148            self
1149        }
1150
1151        /// Sets the value of [term][crate::model::CreateGlossaryTermRequest::term].
1152        ///
1153        /// This is a **required** field for requests.
1154        pub fn set_term<T>(mut self, v: T) -> Self
1155        where
1156            T: std::convert::Into<crate::model::GlossaryTerm>,
1157        {
1158            self.0.request.term = std::option::Option::Some(v.into());
1159            self
1160        }
1161
1162        /// Sets or clears the value of [term][crate::model::CreateGlossaryTermRequest::term].
1163        ///
1164        /// This is a **required** field for requests.
1165        pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
1166        where
1167            T: std::convert::Into<crate::model::GlossaryTerm>,
1168        {
1169            self.0.request.term = v.map(|x| x.into());
1170            self
1171        }
1172    }
1173
1174    #[doc(hidden)]
1175    impl gax::options::internal::RequestBuilder for CreateGlossaryTerm {
1176        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1177            &mut self.0.options
1178        }
1179    }
1180
1181    /// The request builder for [BusinessGlossaryService::update_glossary_term][crate::client::BusinessGlossaryService::update_glossary_term] calls.
1182    ///
1183    /// # Example
1184    /// ```
1185    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::UpdateGlossaryTerm;
1186    /// # async fn sample() -> gax::Result<()> {
1187    ///
1188    /// let builder = prepare_request_builder();
1189    /// let response = builder.send().await?;
1190    /// # Ok(()) }
1191    ///
1192    /// fn prepare_request_builder() -> UpdateGlossaryTerm {
1193    ///   # panic!();
1194    ///   // ... details omitted ...
1195    /// }
1196    /// ```
1197    #[derive(Clone, Debug)]
1198    pub struct UpdateGlossaryTerm(RequestBuilder<crate::model::UpdateGlossaryTermRequest>);
1199
1200    impl UpdateGlossaryTerm {
1201        pub(crate) fn new(
1202            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1203        ) -> Self {
1204            Self(RequestBuilder::new(stub))
1205        }
1206
1207        /// Sets the full request, replacing any prior values.
1208        pub fn with_request<V: Into<crate::model::UpdateGlossaryTermRequest>>(
1209            mut self,
1210            v: V,
1211        ) -> Self {
1212            self.0.request = v.into();
1213            self
1214        }
1215
1216        /// Sets all the options, replacing any prior values.
1217        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1218            self.0.options = v.into();
1219            self
1220        }
1221
1222        /// Sends the request.
1223        pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1224            (*self.0.stub)
1225                .update_glossary_term(self.0.request, self.0.options)
1226                .await
1227                .map(gax::response::Response::into_body)
1228        }
1229
1230        /// Sets the value of [term][crate::model::UpdateGlossaryTermRequest::term].
1231        ///
1232        /// This is a **required** field for requests.
1233        pub fn set_term<T>(mut self, v: T) -> Self
1234        where
1235            T: std::convert::Into<crate::model::GlossaryTerm>,
1236        {
1237            self.0.request.term = std::option::Option::Some(v.into());
1238            self
1239        }
1240
1241        /// Sets or clears the value of [term][crate::model::UpdateGlossaryTermRequest::term].
1242        ///
1243        /// This is a **required** field for requests.
1244        pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
1245        where
1246            T: std::convert::Into<crate::model::GlossaryTerm>,
1247        {
1248            self.0.request.term = v.map(|x| x.into());
1249            self
1250        }
1251
1252        /// Sets the value of [update_mask][crate::model::UpdateGlossaryTermRequest::update_mask].
1253        ///
1254        /// This is a **required** field for requests.
1255        pub fn set_update_mask<T>(mut self, v: T) -> Self
1256        where
1257            T: std::convert::Into<wkt::FieldMask>,
1258        {
1259            self.0.request.update_mask = std::option::Option::Some(v.into());
1260            self
1261        }
1262
1263        /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryTermRequest::update_mask].
1264        ///
1265        /// This is a **required** field for requests.
1266        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1267        where
1268            T: std::convert::Into<wkt::FieldMask>,
1269        {
1270            self.0.request.update_mask = v.map(|x| x.into());
1271            self
1272        }
1273    }
1274
1275    #[doc(hidden)]
1276    impl gax::options::internal::RequestBuilder for UpdateGlossaryTerm {
1277        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1278            &mut self.0.options
1279        }
1280    }
1281
1282    /// The request builder for [BusinessGlossaryService::delete_glossary_term][crate::client::BusinessGlossaryService::delete_glossary_term] calls.
1283    ///
1284    /// # Example
1285    /// ```
1286    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteGlossaryTerm;
1287    /// # async fn sample() -> gax::Result<()> {
1288    ///
1289    /// let builder = prepare_request_builder();
1290    /// let response = builder.send().await?;
1291    /// # Ok(()) }
1292    ///
1293    /// fn prepare_request_builder() -> DeleteGlossaryTerm {
1294    ///   # panic!();
1295    ///   // ... details omitted ...
1296    /// }
1297    /// ```
1298    #[derive(Clone, Debug)]
1299    pub struct DeleteGlossaryTerm(RequestBuilder<crate::model::DeleteGlossaryTermRequest>);
1300
1301    impl DeleteGlossaryTerm {
1302        pub(crate) fn new(
1303            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1304        ) -> Self {
1305            Self(RequestBuilder::new(stub))
1306        }
1307
1308        /// Sets the full request, replacing any prior values.
1309        pub fn with_request<V: Into<crate::model::DeleteGlossaryTermRequest>>(
1310            mut self,
1311            v: V,
1312        ) -> Self {
1313            self.0.request = v.into();
1314            self
1315        }
1316
1317        /// Sets all the options, replacing any prior values.
1318        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1319            self.0.options = v.into();
1320            self
1321        }
1322
1323        /// Sends the request.
1324        pub async fn send(self) -> Result<()> {
1325            (*self.0.stub)
1326                .delete_glossary_term(self.0.request, self.0.options)
1327                .await
1328                .map(gax::response::Response::into_body)
1329        }
1330
1331        /// Sets the value of [name][crate::model::DeleteGlossaryTermRequest::name].
1332        ///
1333        /// This is a **required** field for requests.
1334        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1335            self.0.request.name = v.into();
1336            self
1337        }
1338    }
1339
1340    #[doc(hidden)]
1341    impl gax::options::internal::RequestBuilder for DeleteGlossaryTerm {
1342        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1343            &mut self.0.options
1344        }
1345    }
1346
1347    /// The request builder for [BusinessGlossaryService::get_glossary_term][crate::client::BusinessGlossaryService::get_glossary_term] calls.
1348    ///
1349    /// # Example
1350    /// ```
1351    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetGlossaryTerm;
1352    /// # async fn sample() -> gax::Result<()> {
1353    ///
1354    /// let builder = prepare_request_builder();
1355    /// let response = builder.send().await?;
1356    /// # Ok(()) }
1357    ///
1358    /// fn prepare_request_builder() -> GetGlossaryTerm {
1359    ///   # panic!();
1360    ///   // ... details omitted ...
1361    /// }
1362    /// ```
1363    #[derive(Clone, Debug)]
1364    pub struct GetGlossaryTerm(RequestBuilder<crate::model::GetGlossaryTermRequest>);
1365
1366    impl GetGlossaryTerm {
1367        pub(crate) fn new(
1368            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1369        ) -> Self {
1370            Self(RequestBuilder::new(stub))
1371        }
1372
1373        /// Sets the full request, replacing any prior values.
1374        pub fn with_request<V: Into<crate::model::GetGlossaryTermRequest>>(mut self, v: V) -> Self {
1375            self.0.request = v.into();
1376            self
1377        }
1378
1379        /// Sets all the options, replacing any prior values.
1380        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1381            self.0.options = v.into();
1382            self
1383        }
1384
1385        /// Sends the request.
1386        pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1387            (*self.0.stub)
1388                .get_glossary_term(self.0.request, self.0.options)
1389                .await
1390                .map(gax::response::Response::into_body)
1391        }
1392
1393        /// Sets the value of [name][crate::model::GetGlossaryTermRequest::name].
1394        ///
1395        /// This is a **required** field for requests.
1396        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1397            self.0.request.name = v.into();
1398            self
1399        }
1400    }
1401
1402    #[doc(hidden)]
1403    impl gax::options::internal::RequestBuilder for GetGlossaryTerm {
1404        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1405            &mut self.0.options
1406        }
1407    }
1408
1409    /// The request builder for [BusinessGlossaryService::list_glossary_terms][crate::client::BusinessGlossaryService::list_glossary_terms] calls.
1410    ///
1411    /// # Example
1412    /// ```
1413    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListGlossaryTerms;
1414    /// # async fn sample() -> gax::Result<()> {
1415    /// use gax::paginator::ItemPaginator;
1416    ///
1417    /// let builder = prepare_request_builder();
1418    /// let mut items = builder.by_item();
1419    /// while let Some(result) = items.next().await {
1420    ///   let item = result?;
1421    /// }
1422    /// # Ok(()) }
1423    ///
1424    /// fn prepare_request_builder() -> ListGlossaryTerms {
1425    ///   # panic!();
1426    ///   // ... details omitted ...
1427    /// }
1428    /// ```
1429    #[derive(Clone, Debug)]
1430    pub struct ListGlossaryTerms(RequestBuilder<crate::model::ListGlossaryTermsRequest>);
1431
1432    impl ListGlossaryTerms {
1433        pub(crate) fn new(
1434            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1435        ) -> Self {
1436            Self(RequestBuilder::new(stub))
1437        }
1438
1439        /// Sets the full request, replacing any prior values.
1440        pub fn with_request<V: Into<crate::model::ListGlossaryTermsRequest>>(
1441            mut self,
1442            v: V,
1443        ) -> Self {
1444            self.0.request = v.into();
1445            self
1446        }
1447
1448        /// Sets all the options, replacing any prior values.
1449        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1450            self.0.options = v.into();
1451            self
1452        }
1453
1454        /// Sends the request.
1455        pub async fn send(self) -> Result<crate::model::ListGlossaryTermsResponse> {
1456            (*self.0.stub)
1457                .list_glossary_terms(self.0.request, self.0.options)
1458                .await
1459                .map(gax::response::Response::into_body)
1460        }
1461
1462        /// Streams each page in the collection.
1463        pub fn by_page(
1464            self,
1465        ) -> impl gax::paginator::Paginator<crate::model::ListGlossaryTermsResponse, gax::error::Error>
1466        {
1467            use std::clone::Clone;
1468            let token = self.0.request.page_token.clone();
1469            let execute = move |token: String| {
1470                let mut builder = self.clone();
1471                builder.0.request = builder.0.request.set_page_token(token);
1472                builder.send()
1473            };
1474            gax::paginator::internal::new_paginator(token, execute)
1475        }
1476
1477        /// Streams each item in the collection.
1478        pub fn by_item(
1479            self,
1480        ) -> impl gax::paginator::ItemPaginator<crate::model::ListGlossaryTermsResponse, gax::error::Error>
1481        {
1482            use gax::paginator::Paginator;
1483            self.by_page().items()
1484        }
1485
1486        /// Sets the value of [parent][crate::model::ListGlossaryTermsRequest::parent].
1487        ///
1488        /// This is a **required** field for requests.
1489        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1490            self.0.request.parent = v.into();
1491            self
1492        }
1493
1494        /// Sets the value of [page_size][crate::model::ListGlossaryTermsRequest::page_size].
1495        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1496            self.0.request.page_size = v.into();
1497            self
1498        }
1499
1500        /// Sets the value of [page_token][crate::model::ListGlossaryTermsRequest::page_token].
1501        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1502            self.0.request.page_token = v.into();
1503            self
1504        }
1505
1506        /// Sets the value of [filter][crate::model::ListGlossaryTermsRequest::filter].
1507        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1508            self.0.request.filter = v.into();
1509            self
1510        }
1511
1512        /// Sets the value of [order_by][crate::model::ListGlossaryTermsRequest::order_by].
1513        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1514            self.0.request.order_by = v.into();
1515            self
1516        }
1517    }
1518
1519    #[doc(hidden)]
1520    impl gax::options::internal::RequestBuilder for ListGlossaryTerms {
1521        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1522            &mut self.0.options
1523        }
1524    }
1525
1526    /// The request builder for [BusinessGlossaryService::list_locations][crate::client::BusinessGlossaryService::list_locations] calls.
1527    ///
1528    /// # Example
1529    /// ```
1530    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListLocations;
1531    /// # async fn sample() -> gax::Result<()> {
1532    /// use gax::paginator::ItemPaginator;
1533    ///
1534    /// let builder = prepare_request_builder();
1535    /// let mut items = builder.by_item();
1536    /// while let Some(result) = items.next().await {
1537    ///   let item = result?;
1538    /// }
1539    /// # Ok(()) }
1540    ///
1541    /// fn prepare_request_builder() -> ListLocations {
1542    ///   # panic!();
1543    ///   // ... details omitted ...
1544    /// }
1545    /// ```
1546    #[derive(Clone, Debug)]
1547    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
1548
1549    impl ListLocations {
1550        pub(crate) fn new(
1551            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1552        ) -> Self {
1553            Self(RequestBuilder::new(stub))
1554        }
1555
1556        /// Sets the full request, replacing any prior values.
1557        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
1558            mut self,
1559            v: V,
1560        ) -> Self {
1561            self.0.request = v.into();
1562            self
1563        }
1564
1565        /// Sets all the options, replacing any prior values.
1566        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1567            self.0.options = v.into();
1568            self
1569        }
1570
1571        /// Sends the request.
1572        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
1573            (*self.0.stub)
1574                .list_locations(self.0.request, self.0.options)
1575                .await
1576                .map(gax::response::Response::into_body)
1577        }
1578
1579        /// Streams each page in the collection.
1580        pub fn by_page(
1581            self,
1582        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
1583        {
1584            use std::clone::Clone;
1585            let token = self.0.request.page_token.clone();
1586            let execute = move |token: String| {
1587                let mut builder = self.clone();
1588                builder.0.request = builder.0.request.set_page_token(token);
1589                builder.send()
1590            };
1591            gax::paginator::internal::new_paginator(token, execute)
1592        }
1593
1594        /// Streams each item in the collection.
1595        pub fn by_item(
1596            self,
1597        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
1598        {
1599            use gax::paginator::Paginator;
1600            self.by_page().items()
1601        }
1602
1603        /// Sets the value of [name][location::model::ListLocationsRequest::name].
1604        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1605            self.0.request.name = v.into();
1606            self
1607        }
1608
1609        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
1610        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1611            self.0.request.filter = v.into();
1612            self
1613        }
1614
1615        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
1616        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1617            self.0.request.page_size = v.into();
1618            self
1619        }
1620
1621        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
1622        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1623            self.0.request.page_token = v.into();
1624            self
1625        }
1626    }
1627
1628    #[doc(hidden)]
1629    impl gax::options::internal::RequestBuilder for ListLocations {
1630        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1631            &mut self.0.options
1632        }
1633    }
1634
1635    /// The request builder for [BusinessGlossaryService::get_location][crate::client::BusinessGlossaryService::get_location] calls.
1636    ///
1637    /// # Example
1638    /// ```
1639    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetLocation;
1640    /// # async fn sample() -> gax::Result<()> {
1641    ///
1642    /// let builder = prepare_request_builder();
1643    /// let response = builder.send().await?;
1644    /// # Ok(()) }
1645    ///
1646    /// fn prepare_request_builder() -> GetLocation {
1647    ///   # panic!();
1648    ///   // ... details omitted ...
1649    /// }
1650    /// ```
1651    #[derive(Clone, Debug)]
1652    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
1653
1654    impl GetLocation {
1655        pub(crate) fn new(
1656            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1657        ) -> Self {
1658            Self(RequestBuilder::new(stub))
1659        }
1660
1661        /// Sets the full request, replacing any prior values.
1662        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
1663            self.0.request = v.into();
1664            self
1665        }
1666
1667        /// Sets all the options, replacing any prior values.
1668        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1669            self.0.options = v.into();
1670            self
1671        }
1672
1673        /// Sends the request.
1674        pub async fn send(self) -> Result<location::model::Location> {
1675            (*self.0.stub)
1676                .get_location(self.0.request, self.0.options)
1677                .await
1678                .map(gax::response::Response::into_body)
1679        }
1680
1681        /// Sets the value of [name][location::model::GetLocationRequest::name].
1682        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1683            self.0.request.name = v.into();
1684            self
1685        }
1686    }
1687
1688    #[doc(hidden)]
1689    impl gax::options::internal::RequestBuilder for GetLocation {
1690        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1691            &mut self.0.options
1692        }
1693    }
1694
1695    /// The request builder for [BusinessGlossaryService::set_iam_policy][crate::client::BusinessGlossaryService::set_iam_policy] calls.
1696    ///
1697    /// # Example
1698    /// ```
1699    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::SetIamPolicy;
1700    /// # async fn sample() -> gax::Result<()> {
1701    ///
1702    /// let builder = prepare_request_builder();
1703    /// let response = builder.send().await?;
1704    /// # Ok(()) }
1705    ///
1706    /// fn prepare_request_builder() -> SetIamPolicy {
1707    ///   # panic!();
1708    ///   // ... details omitted ...
1709    /// }
1710    /// ```
1711    #[derive(Clone, Debug)]
1712    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
1713
1714    impl SetIamPolicy {
1715        pub(crate) fn new(
1716            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1717        ) -> Self {
1718            Self(RequestBuilder::new(stub))
1719        }
1720
1721        /// Sets the full request, replacing any prior values.
1722        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
1723            self.0.request = v.into();
1724            self
1725        }
1726
1727        /// Sets all the options, replacing any prior values.
1728        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1729            self.0.options = v.into();
1730            self
1731        }
1732
1733        /// Sends the request.
1734        pub async fn send(self) -> Result<iam_v1::model::Policy> {
1735            (*self.0.stub)
1736                .set_iam_policy(self.0.request, self.0.options)
1737                .await
1738                .map(gax::response::Response::into_body)
1739        }
1740
1741        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
1742        ///
1743        /// This is a **required** field for requests.
1744        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1745            self.0.request.resource = v.into();
1746            self
1747        }
1748
1749        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
1750        ///
1751        /// This is a **required** field for requests.
1752        pub fn set_policy<T>(mut self, v: T) -> Self
1753        where
1754            T: std::convert::Into<iam_v1::model::Policy>,
1755        {
1756            self.0.request.policy = std::option::Option::Some(v.into());
1757            self
1758        }
1759
1760        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
1761        ///
1762        /// This is a **required** field for requests.
1763        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
1764        where
1765            T: std::convert::Into<iam_v1::model::Policy>,
1766        {
1767            self.0.request.policy = v.map(|x| x.into());
1768            self
1769        }
1770
1771        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
1772        pub fn set_update_mask<T>(mut self, v: T) -> Self
1773        where
1774            T: std::convert::Into<wkt::FieldMask>,
1775        {
1776            self.0.request.update_mask = std::option::Option::Some(v.into());
1777            self
1778        }
1779
1780        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
1781        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1782        where
1783            T: std::convert::Into<wkt::FieldMask>,
1784        {
1785            self.0.request.update_mask = v.map(|x| x.into());
1786            self
1787        }
1788    }
1789
1790    #[doc(hidden)]
1791    impl gax::options::internal::RequestBuilder for SetIamPolicy {
1792        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1793            &mut self.0.options
1794        }
1795    }
1796
1797    /// The request builder for [BusinessGlossaryService::get_iam_policy][crate::client::BusinessGlossaryService::get_iam_policy] calls.
1798    ///
1799    /// # Example
1800    /// ```
1801    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetIamPolicy;
1802    /// # async fn sample() -> gax::Result<()> {
1803    ///
1804    /// let builder = prepare_request_builder();
1805    /// let response = builder.send().await?;
1806    /// # Ok(()) }
1807    ///
1808    /// fn prepare_request_builder() -> GetIamPolicy {
1809    ///   # panic!();
1810    ///   // ... details omitted ...
1811    /// }
1812    /// ```
1813    #[derive(Clone, Debug)]
1814    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
1815
1816    impl GetIamPolicy {
1817        pub(crate) fn new(
1818            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1819        ) -> Self {
1820            Self(RequestBuilder::new(stub))
1821        }
1822
1823        /// Sets the full request, replacing any prior values.
1824        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
1825            self.0.request = v.into();
1826            self
1827        }
1828
1829        /// Sets all the options, replacing any prior values.
1830        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1831            self.0.options = v.into();
1832            self
1833        }
1834
1835        /// Sends the request.
1836        pub async fn send(self) -> Result<iam_v1::model::Policy> {
1837            (*self.0.stub)
1838                .get_iam_policy(self.0.request, self.0.options)
1839                .await
1840                .map(gax::response::Response::into_body)
1841        }
1842
1843        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
1844        ///
1845        /// This is a **required** field for requests.
1846        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1847            self.0.request.resource = v.into();
1848            self
1849        }
1850
1851        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
1852        pub fn set_options<T>(mut self, v: T) -> Self
1853        where
1854            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
1855        {
1856            self.0.request.options = std::option::Option::Some(v.into());
1857            self
1858        }
1859
1860        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
1861        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
1862        where
1863            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
1864        {
1865            self.0.request.options = v.map(|x| x.into());
1866            self
1867        }
1868    }
1869
1870    #[doc(hidden)]
1871    impl gax::options::internal::RequestBuilder for GetIamPolicy {
1872        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1873            &mut self.0.options
1874        }
1875    }
1876
1877    /// The request builder for [BusinessGlossaryService::test_iam_permissions][crate::client::BusinessGlossaryService::test_iam_permissions] calls.
1878    ///
1879    /// # Example
1880    /// ```
1881    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::TestIamPermissions;
1882    /// # async fn sample() -> gax::Result<()> {
1883    ///
1884    /// let builder = prepare_request_builder();
1885    /// let response = builder.send().await?;
1886    /// # Ok(()) }
1887    ///
1888    /// fn prepare_request_builder() -> TestIamPermissions {
1889    ///   # panic!();
1890    ///   // ... details omitted ...
1891    /// }
1892    /// ```
1893    #[derive(Clone, Debug)]
1894    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
1895
1896    impl TestIamPermissions {
1897        pub(crate) fn new(
1898            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1899        ) -> Self {
1900            Self(RequestBuilder::new(stub))
1901        }
1902
1903        /// Sets the full request, replacing any prior values.
1904        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
1905            mut self,
1906            v: V,
1907        ) -> Self {
1908            self.0.request = v.into();
1909            self
1910        }
1911
1912        /// Sets all the options, replacing any prior values.
1913        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1914            self.0.options = v.into();
1915            self
1916        }
1917
1918        /// Sends the request.
1919        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
1920            (*self.0.stub)
1921                .test_iam_permissions(self.0.request, self.0.options)
1922                .await
1923                .map(gax::response::Response::into_body)
1924        }
1925
1926        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
1927        ///
1928        /// This is a **required** field for requests.
1929        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1930            self.0.request.resource = v.into();
1931            self
1932        }
1933
1934        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
1935        ///
1936        /// This is a **required** field for requests.
1937        pub fn set_permissions<T, V>(mut self, v: T) -> Self
1938        where
1939            T: std::iter::IntoIterator<Item = V>,
1940            V: std::convert::Into<std::string::String>,
1941        {
1942            use std::iter::Iterator;
1943            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
1944            self
1945        }
1946    }
1947
1948    #[doc(hidden)]
1949    impl gax::options::internal::RequestBuilder for TestIamPermissions {
1950        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1951            &mut self.0.options
1952        }
1953    }
1954
1955    /// The request builder for [BusinessGlossaryService::list_operations][crate::client::BusinessGlossaryService::list_operations] calls.
1956    ///
1957    /// # Example
1958    /// ```
1959    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListOperations;
1960    /// # async fn sample() -> gax::Result<()> {
1961    /// use gax::paginator::ItemPaginator;
1962    ///
1963    /// let builder = prepare_request_builder();
1964    /// let mut items = builder.by_item();
1965    /// while let Some(result) = items.next().await {
1966    ///   let item = result?;
1967    /// }
1968    /// # Ok(()) }
1969    ///
1970    /// fn prepare_request_builder() -> ListOperations {
1971    ///   # panic!();
1972    ///   // ... details omitted ...
1973    /// }
1974    /// ```
1975    #[derive(Clone, Debug)]
1976    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
1977
1978    impl ListOperations {
1979        pub(crate) fn new(
1980            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1981        ) -> Self {
1982            Self(RequestBuilder::new(stub))
1983        }
1984
1985        /// Sets the full request, replacing any prior values.
1986        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
1987            mut self,
1988            v: V,
1989        ) -> Self {
1990            self.0.request = v.into();
1991            self
1992        }
1993
1994        /// Sets all the options, replacing any prior values.
1995        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1996            self.0.options = v.into();
1997            self
1998        }
1999
2000        /// Sends the request.
2001        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
2002            (*self.0.stub)
2003                .list_operations(self.0.request, self.0.options)
2004                .await
2005                .map(gax::response::Response::into_body)
2006        }
2007
2008        /// Streams each page in the collection.
2009        pub fn by_page(
2010            self,
2011        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
2012        {
2013            use std::clone::Clone;
2014            let token = self.0.request.page_token.clone();
2015            let execute = move |token: String| {
2016                let mut builder = self.clone();
2017                builder.0.request = builder.0.request.set_page_token(token);
2018                builder.send()
2019            };
2020            gax::paginator::internal::new_paginator(token, execute)
2021        }
2022
2023        /// Streams each item in the collection.
2024        pub fn by_item(
2025            self,
2026        ) -> impl gax::paginator::ItemPaginator<
2027            longrunning::model::ListOperationsResponse,
2028            gax::error::Error,
2029        > {
2030            use gax::paginator::Paginator;
2031            self.by_page().items()
2032        }
2033
2034        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
2035        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2036            self.0.request.name = v.into();
2037            self
2038        }
2039
2040        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
2041        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2042            self.0.request.filter = v.into();
2043            self
2044        }
2045
2046        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
2047        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2048            self.0.request.page_size = v.into();
2049            self
2050        }
2051
2052        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
2053        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2054            self.0.request.page_token = v.into();
2055            self
2056        }
2057
2058        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
2059        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
2060            self.0.request.return_partial_success = v.into();
2061            self
2062        }
2063    }
2064
2065    #[doc(hidden)]
2066    impl gax::options::internal::RequestBuilder for ListOperations {
2067        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2068            &mut self.0.options
2069        }
2070    }
2071
2072    /// The request builder for [BusinessGlossaryService::get_operation][crate::client::BusinessGlossaryService::get_operation] calls.
2073    ///
2074    /// # Example
2075    /// ```
2076    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetOperation;
2077    /// # async fn sample() -> gax::Result<()> {
2078    ///
2079    /// let builder = prepare_request_builder();
2080    /// let response = builder.send().await?;
2081    /// # Ok(()) }
2082    ///
2083    /// fn prepare_request_builder() -> GetOperation {
2084    ///   # panic!();
2085    ///   // ... details omitted ...
2086    /// }
2087    /// ```
2088    #[derive(Clone, Debug)]
2089    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
2090
2091    impl GetOperation {
2092        pub(crate) fn new(
2093            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2094        ) -> Self {
2095            Self(RequestBuilder::new(stub))
2096        }
2097
2098        /// Sets the full request, replacing any prior values.
2099        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
2100            mut self,
2101            v: V,
2102        ) -> Self {
2103            self.0.request = v.into();
2104            self
2105        }
2106
2107        /// Sets all the options, replacing any prior values.
2108        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2109            self.0.options = v.into();
2110            self
2111        }
2112
2113        /// Sends the request.
2114        pub async fn send(self) -> Result<longrunning::model::Operation> {
2115            (*self.0.stub)
2116                .get_operation(self.0.request, self.0.options)
2117                .await
2118                .map(gax::response::Response::into_body)
2119        }
2120
2121        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
2122        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2123            self.0.request.name = v.into();
2124            self
2125        }
2126    }
2127
2128    #[doc(hidden)]
2129    impl gax::options::internal::RequestBuilder for GetOperation {
2130        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2131            &mut self.0.options
2132        }
2133    }
2134
2135    /// The request builder for [BusinessGlossaryService::delete_operation][crate::client::BusinessGlossaryService::delete_operation] calls.
2136    ///
2137    /// # Example
2138    /// ```
2139    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteOperation;
2140    /// # async fn sample() -> gax::Result<()> {
2141    ///
2142    /// let builder = prepare_request_builder();
2143    /// let response = builder.send().await?;
2144    /// # Ok(()) }
2145    ///
2146    /// fn prepare_request_builder() -> DeleteOperation {
2147    ///   # panic!();
2148    ///   // ... details omitted ...
2149    /// }
2150    /// ```
2151    #[derive(Clone, Debug)]
2152    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
2153
2154    impl DeleteOperation {
2155        pub(crate) fn new(
2156            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2157        ) -> Self {
2158            Self(RequestBuilder::new(stub))
2159        }
2160
2161        /// Sets the full request, replacing any prior values.
2162        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
2163            mut self,
2164            v: V,
2165        ) -> Self {
2166            self.0.request = v.into();
2167            self
2168        }
2169
2170        /// Sets all the options, replacing any prior values.
2171        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2172            self.0.options = v.into();
2173            self
2174        }
2175
2176        /// Sends the request.
2177        pub async fn send(self) -> Result<()> {
2178            (*self.0.stub)
2179                .delete_operation(self.0.request, self.0.options)
2180                .await
2181                .map(gax::response::Response::into_body)
2182        }
2183
2184        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
2185        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2186            self.0.request.name = v.into();
2187            self
2188        }
2189    }
2190
2191    #[doc(hidden)]
2192    impl gax::options::internal::RequestBuilder for DeleteOperation {
2193        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2194            &mut self.0.options
2195        }
2196    }
2197
2198    /// The request builder for [BusinessGlossaryService::cancel_operation][crate::client::BusinessGlossaryService::cancel_operation] calls.
2199    ///
2200    /// # Example
2201    /// ```
2202    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CancelOperation;
2203    /// # async fn sample() -> gax::Result<()> {
2204    ///
2205    /// let builder = prepare_request_builder();
2206    /// let response = builder.send().await?;
2207    /// # Ok(()) }
2208    ///
2209    /// fn prepare_request_builder() -> CancelOperation {
2210    ///   # panic!();
2211    ///   // ... details omitted ...
2212    /// }
2213    /// ```
2214    #[derive(Clone, Debug)]
2215    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
2216
2217    impl CancelOperation {
2218        pub(crate) fn new(
2219            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2220        ) -> Self {
2221            Self(RequestBuilder::new(stub))
2222        }
2223
2224        /// Sets the full request, replacing any prior values.
2225        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
2226            mut self,
2227            v: V,
2228        ) -> Self {
2229            self.0.request = v.into();
2230            self
2231        }
2232
2233        /// Sets all the options, replacing any prior values.
2234        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2235            self.0.options = v.into();
2236            self
2237        }
2238
2239        /// Sends the request.
2240        pub async fn send(self) -> Result<()> {
2241            (*self.0.stub)
2242                .cancel_operation(self.0.request, self.0.options)
2243                .await
2244                .map(gax::response::Response::into_body)
2245        }
2246
2247        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
2248        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2249            self.0.request.name = v.into();
2250            self
2251        }
2252    }
2253
2254    #[doc(hidden)]
2255    impl gax::options::internal::RequestBuilder for CancelOperation {
2256        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2257            &mut self.0.options
2258        }
2259    }
2260}
2261
2262pub mod catalog_service {
2263    use crate::Result;
2264
2265    /// A builder for [CatalogService][crate::client::CatalogService].
2266    ///
2267    /// ```
2268    /// # async fn sample() -> gax::client_builder::Result<()> {
2269    /// # use google_cloud_dataplex_v1::*;
2270    /// # use builder::catalog_service::ClientBuilder;
2271    /// # use client::CatalogService;
2272    /// let builder : ClientBuilder = CatalogService::builder();
2273    /// let client = builder
2274    ///     .with_endpoint("https://dataplex.googleapis.com")
2275    ///     .build().await?;
2276    /// # Ok(()) }
2277    /// ```
2278    pub type ClientBuilder =
2279        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
2280
2281    pub(crate) mod client {
2282        use super::super::super::client::CatalogService;
2283        pub struct Factory;
2284        impl gax::client_builder::internal::ClientFactory for Factory {
2285            type Client = CatalogService;
2286            type Credentials = gaxi::options::Credentials;
2287            async fn build(
2288                self,
2289                config: gaxi::options::ClientConfig,
2290            ) -> gax::client_builder::Result<Self::Client> {
2291                Self::Client::new(config).await
2292            }
2293        }
2294    }
2295
2296    /// Common implementation for [crate::client::CatalogService] request builders.
2297    #[derive(Clone, Debug)]
2298    pub(crate) struct RequestBuilder<R: std::default::Default> {
2299        stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2300        request: R,
2301        options: gax::options::RequestOptions,
2302    }
2303
2304    impl<R> RequestBuilder<R>
2305    where
2306        R: std::default::Default,
2307    {
2308        pub(crate) fn new(
2309            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2310        ) -> Self {
2311            Self {
2312                stub,
2313                request: R::default(),
2314                options: gax::options::RequestOptions::default(),
2315            }
2316        }
2317    }
2318
2319    /// The request builder for [CatalogService::create_entry_type][crate::client::CatalogService::create_entry_type] calls.
2320    ///
2321    /// # Example
2322    /// ```
2323    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntryType;
2324    /// # async fn sample() -> gax::Result<()> {
2325    /// use lro::Poller;
2326    ///
2327    /// let builder = prepare_request_builder();
2328    /// let response = builder.poller().until_done().await?;
2329    /// # Ok(()) }
2330    ///
2331    /// fn prepare_request_builder() -> CreateEntryType {
2332    ///   # panic!();
2333    ///   // ... details omitted ...
2334    /// }
2335    /// ```
2336    #[derive(Clone, Debug)]
2337    pub struct CreateEntryType(RequestBuilder<crate::model::CreateEntryTypeRequest>);
2338
2339    impl CreateEntryType {
2340        pub(crate) fn new(
2341            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2342        ) -> Self {
2343            Self(RequestBuilder::new(stub))
2344        }
2345
2346        /// Sets the full request, replacing any prior values.
2347        pub fn with_request<V: Into<crate::model::CreateEntryTypeRequest>>(mut self, v: V) -> Self {
2348            self.0.request = v.into();
2349            self
2350        }
2351
2352        /// Sets all the options, replacing any prior values.
2353        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2354            self.0.options = v.into();
2355            self
2356        }
2357
2358        /// Sends the request.
2359        ///
2360        /// # Long running operations
2361        ///
2362        /// This starts, but does not poll, a longrunning operation. More information
2363        /// on [create_entry_type][crate::client::CatalogService::create_entry_type].
2364        pub async fn send(self) -> Result<longrunning::model::Operation> {
2365            (*self.0.stub)
2366                .create_entry_type(self.0.request, self.0.options)
2367                .await
2368                .map(gax::response::Response::into_body)
2369        }
2370
2371        /// Creates a [Poller][lro::Poller] to work with `create_entry_type`.
2372        pub fn poller(
2373            self,
2374        ) -> impl lro::Poller<crate::model::EntryType, crate::model::OperationMetadata> {
2375            type Operation =
2376                lro::internal::Operation<crate::model::EntryType, crate::model::OperationMetadata>;
2377            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2378            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2379
2380            let stub = self.0.stub.clone();
2381            let mut options = self.0.options.clone();
2382            options.set_retry_policy(gax::retry_policy::NeverRetry);
2383            let query = move |name| {
2384                let stub = stub.clone();
2385                let options = options.clone();
2386                async {
2387                    let op = GetOperation::new(stub)
2388                        .set_name(name)
2389                        .with_options(options)
2390                        .send()
2391                        .await?;
2392                    Ok(Operation::new(op))
2393                }
2394            };
2395
2396            let start = move || async {
2397                let op = self.send().await?;
2398                Ok(Operation::new(op))
2399            };
2400
2401            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2402        }
2403
2404        /// Sets the value of [parent][crate::model::CreateEntryTypeRequest::parent].
2405        ///
2406        /// This is a **required** field for requests.
2407        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2408            self.0.request.parent = v.into();
2409            self
2410        }
2411
2412        /// Sets the value of [entry_type_id][crate::model::CreateEntryTypeRequest::entry_type_id].
2413        ///
2414        /// This is a **required** field for requests.
2415        pub fn set_entry_type_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2416            self.0.request.entry_type_id = v.into();
2417            self
2418        }
2419
2420        /// Sets the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
2421        ///
2422        /// This is a **required** field for requests.
2423        pub fn set_entry_type<T>(mut self, v: T) -> Self
2424        where
2425            T: std::convert::Into<crate::model::EntryType>,
2426        {
2427            self.0.request.entry_type = std::option::Option::Some(v.into());
2428            self
2429        }
2430
2431        /// Sets or clears the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
2432        ///
2433        /// This is a **required** field for requests.
2434        pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
2435        where
2436            T: std::convert::Into<crate::model::EntryType>,
2437        {
2438            self.0.request.entry_type = v.map(|x| x.into());
2439            self
2440        }
2441
2442        /// Sets the value of [validate_only][crate::model::CreateEntryTypeRequest::validate_only].
2443        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2444            self.0.request.validate_only = v.into();
2445            self
2446        }
2447    }
2448
2449    #[doc(hidden)]
2450    impl gax::options::internal::RequestBuilder for CreateEntryType {
2451        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2452            &mut self.0.options
2453        }
2454    }
2455
2456    /// The request builder for [CatalogService::update_entry_type][crate::client::CatalogService::update_entry_type] calls.
2457    ///
2458    /// # Example
2459    /// ```
2460    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntryType;
2461    /// # async fn sample() -> gax::Result<()> {
2462    /// use lro::Poller;
2463    ///
2464    /// let builder = prepare_request_builder();
2465    /// let response = builder.poller().until_done().await?;
2466    /// # Ok(()) }
2467    ///
2468    /// fn prepare_request_builder() -> UpdateEntryType {
2469    ///   # panic!();
2470    ///   // ... details omitted ...
2471    /// }
2472    /// ```
2473    #[derive(Clone, Debug)]
2474    pub struct UpdateEntryType(RequestBuilder<crate::model::UpdateEntryTypeRequest>);
2475
2476    impl UpdateEntryType {
2477        pub(crate) fn new(
2478            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2479        ) -> Self {
2480            Self(RequestBuilder::new(stub))
2481        }
2482
2483        /// Sets the full request, replacing any prior values.
2484        pub fn with_request<V: Into<crate::model::UpdateEntryTypeRequest>>(mut self, v: V) -> Self {
2485            self.0.request = v.into();
2486            self
2487        }
2488
2489        /// Sets all the options, replacing any prior values.
2490        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2491            self.0.options = v.into();
2492            self
2493        }
2494
2495        /// Sends the request.
2496        ///
2497        /// # Long running operations
2498        ///
2499        /// This starts, but does not poll, a longrunning operation. More information
2500        /// on [update_entry_type][crate::client::CatalogService::update_entry_type].
2501        pub async fn send(self) -> Result<longrunning::model::Operation> {
2502            (*self.0.stub)
2503                .update_entry_type(self.0.request, self.0.options)
2504                .await
2505                .map(gax::response::Response::into_body)
2506        }
2507
2508        /// Creates a [Poller][lro::Poller] to work with `update_entry_type`.
2509        pub fn poller(
2510            self,
2511        ) -> impl lro::Poller<crate::model::EntryType, crate::model::OperationMetadata> {
2512            type Operation =
2513                lro::internal::Operation<crate::model::EntryType, crate::model::OperationMetadata>;
2514            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2515            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2516
2517            let stub = self.0.stub.clone();
2518            let mut options = self.0.options.clone();
2519            options.set_retry_policy(gax::retry_policy::NeverRetry);
2520            let query = move |name| {
2521                let stub = stub.clone();
2522                let options = options.clone();
2523                async {
2524                    let op = GetOperation::new(stub)
2525                        .set_name(name)
2526                        .with_options(options)
2527                        .send()
2528                        .await?;
2529                    Ok(Operation::new(op))
2530                }
2531            };
2532
2533            let start = move || async {
2534                let op = self.send().await?;
2535                Ok(Operation::new(op))
2536            };
2537
2538            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2539        }
2540
2541        /// Sets the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
2542        ///
2543        /// This is a **required** field for requests.
2544        pub fn set_entry_type<T>(mut self, v: T) -> Self
2545        where
2546            T: std::convert::Into<crate::model::EntryType>,
2547        {
2548            self.0.request.entry_type = std::option::Option::Some(v.into());
2549            self
2550        }
2551
2552        /// Sets or clears the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
2553        ///
2554        /// This is a **required** field for requests.
2555        pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
2556        where
2557            T: std::convert::Into<crate::model::EntryType>,
2558        {
2559            self.0.request.entry_type = v.map(|x| x.into());
2560            self
2561        }
2562
2563        /// Sets the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
2564        ///
2565        /// This is a **required** field for requests.
2566        pub fn set_update_mask<T>(mut self, v: T) -> Self
2567        where
2568            T: std::convert::Into<wkt::FieldMask>,
2569        {
2570            self.0.request.update_mask = std::option::Option::Some(v.into());
2571            self
2572        }
2573
2574        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
2575        ///
2576        /// This is a **required** field for requests.
2577        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2578        where
2579            T: std::convert::Into<wkt::FieldMask>,
2580        {
2581            self.0.request.update_mask = v.map(|x| x.into());
2582            self
2583        }
2584
2585        /// Sets the value of [validate_only][crate::model::UpdateEntryTypeRequest::validate_only].
2586        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2587            self.0.request.validate_only = v.into();
2588            self
2589        }
2590    }
2591
2592    #[doc(hidden)]
2593    impl gax::options::internal::RequestBuilder for UpdateEntryType {
2594        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2595            &mut self.0.options
2596        }
2597    }
2598
2599    /// The request builder for [CatalogService::delete_entry_type][crate::client::CatalogService::delete_entry_type] calls.
2600    ///
2601    /// # Example
2602    /// ```
2603    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntryType;
2604    /// # async fn sample() -> gax::Result<()> {
2605    /// use lro::Poller;
2606    ///
2607    /// let builder = prepare_request_builder();
2608    /// let response = builder.poller().until_done().await?;
2609    /// # Ok(()) }
2610    ///
2611    /// fn prepare_request_builder() -> DeleteEntryType {
2612    ///   # panic!();
2613    ///   // ... details omitted ...
2614    /// }
2615    /// ```
2616    #[derive(Clone, Debug)]
2617    pub struct DeleteEntryType(RequestBuilder<crate::model::DeleteEntryTypeRequest>);
2618
2619    impl DeleteEntryType {
2620        pub(crate) fn new(
2621            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2622        ) -> Self {
2623            Self(RequestBuilder::new(stub))
2624        }
2625
2626        /// Sets the full request, replacing any prior values.
2627        pub fn with_request<V: Into<crate::model::DeleteEntryTypeRequest>>(mut self, v: V) -> Self {
2628            self.0.request = v.into();
2629            self
2630        }
2631
2632        /// Sets all the options, replacing any prior values.
2633        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2634            self.0.options = v.into();
2635            self
2636        }
2637
2638        /// Sends the request.
2639        ///
2640        /// # Long running operations
2641        ///
2642        /// This starts, but does not poll, a longrunning operation. More information
2643        /// on [delete_entry_type][crate::client::CatalogService::delete_entry_type].
2644        pub async fn send(self) -> Result<longrunning::model::Operation> {
2645            (*self.0.stub)
2646                .delete_entry_type(self.0.request, self.0.options)
2647                .await
2648                .map(gax::response::Response::into_body)
2649        }
2650
2651        /// Creates a [Poller][lro::Poller] to work with `delete_entry_type`.
2652        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
2653            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2654            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2655            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2656
2657            let stub = self.0.stub.clone();
2658            let mut options = self.0.options.clone();
2659            options.set_retry_policy(gax::retry_policy::NeverRetry);
2660            let query = move |name| {
2661                let stub = stub.clone();
2662                let options = options.clone();
2663                async {
2664                    let op = GetOperation::new(stub)
2665                        .set_name(name)
2666                        .with_options(options)
2667                        .send()
2668                        .await?;
2669                    Ok(Operation::new(op))
2670                }
2671            };
2672
2673            let start = move || async {
2674                let op = self.send().await?;
2675                Ok(Operation::new(op))
2676            };
2677
2678            lro::internal::new_unit_response_poller(
2679                polling_error_policy,
2680                polling_backoff_policy,
2681                start,
2682                query,
2683            )
2684        }
2685
2686        /// Sets the value of [name][crate::model::DeleteEntryTypeRequest::name].
2687        ///
2688        /// This is a **required** field for requests.
2689        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2690            self.0.request.name = v.into();
2691            self
2692        }
2693
2694        /// Sets the value of [etag][crate::model::DeleteEntryTypeRequest::etag].
2695        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
2696            self.0.request.etag = v.into();
2697            self
2698        }
2699    }
2700
2701    #[doc(hidden)]
2702    impl gax::options::internal::RequestBuilder for DeleteEntryType {
2703        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2704            &mut self.0.options
2705        }
2706    }
2707
2708    /// The request builder for [CatalogService::list_entry_types][crate::client::CatalogService::list_entry_types] calls.
2709    ///
2710    /// # Example
2711    /// ```
2712    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListEntryTypes;
2713    /// # async fn sample() -> gax::Result<()> {
2714    /// use gax::paginator::ItemPaginator;
2715    ///
2716    /// let builder = prepare_request_builder();
2717    /// let mut items = builder.by_item();
2718    /// while let Some(result) = items.next().await {
2719    ///   let item = result?;
2720    /// }
2721    /// # Ok(()) }
2722    ///
2723    /// fn prepare_request_builder() -> ListEntryTypes {
2724    ///   # panic!();
2725    ///   // ... details omitted ...
2726    /// }
2727    /// ```
2728    #[derive(Clone, Debug)]
2729    pub struct ListEntryTypes(RequestBuilder<crate::model::ListEntryTypesRequest>);
2730
2731    impl ListEntryTypes {
2732        pub(crate) fn new(
2733            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2734        ) -> Self {
2735            Self(RequestBuilder::new(stub))
2736        }
2737
2738        /// Sets the full request, replacing any prior values.
2739        pub fn with_request<V: Into<crate::model::ListEntryTypesRequest>>(mut self, v: V) -> Self {
2740            self.0.request = v.into();
2741            self
2742        }
2743
2744        /// Sets all the options, replacing any prior values.
2745        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2746            self.0.options = v.into();
2747            self
2748        }
2749
2750        /// Sends the request.
2751        pub async fn send(self) -> Result<crate::model::ListEntryTypesResponse> {
2752            (*self.0.stub)
2753                .list_entry_types(self.0.request, self.0.options)
2754                .await
2755                .map(gax::response::Response::into_body)
2756        }
2757
2758        /// Streams each page in the collection.
2759        pub fn by_page(
2760            self,
2761        ) -> impl gax::paginator::Paginator<crate::model::ListEntryTypesResponse, gax::error::Error>
2762        {
2763            use std::clone::Clone;
2764            let token = self.0.request.page_token.clone();
2765            let execute = move |token: String| {
2766                let mut builder = self.clone();
2767                builder.0.request = builder.0.request.set_page_token(token);
2768                builder.send()
2769            };
2770            gax::paginator::internal::new_paginator(token, execute)
2771        }
2772
2773        /// Streams each item in the collection.
2774        pub fn by_item(
2775            self,
2776        ) -> impl gax::paginator::ItemPaginator<crate::model::ListEntryTypesResponse, gax::error::Error>
2777        {
2778            use gax::paginator::Paginator;
2779            self.by_page().items()
2780        }
2781
2782        /// Sets the value of [parent][crate::model::ListEntryTypesRequest::parent].
2783        ///
2784        /// This is a **required** field for requests.
2785        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2786            self.0.request.parent = v.into();
2787            self
2788        }
2789
2790        /// Sets the value of [page_size][crate::model::ListEntryTypesRequest::page_size].
2791        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2792            self.0.request.page_size = v.into();
2793            self
2794        }
2795
2796        /// Sets the value of [page_token][crate::model::ListEntryTypesRequest::page_token].
2797        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2798            self.0.request.page_token = v.into();
2799            self
2800        }
2801
2802        /// Sets the value of [filter][crate::model::ListEntryTypesRequest::filter].
2803        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2804            self.0.request.filter = v.into();
2805            self
2806        }
2807
2808        /// Sets the value of [order_by][crate::model::ListEntryTypesRequest::order_by].
2809        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2810            self.0.request.order_by = v.into();
2811            self
2812        }
2813    }
2814
2815    #[doc(hidden)]
2816    impl gax::options::internal::RequestBuilder for ListEntryTypes {
2817        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2818            &mut self.0.options
2819        }
2820    }
2821
2822    /// The request builder for [CatalogService::get_entry_type][crate::client::CatalogService::get_entry_type] calls.
2823    ///
2824    /// # Example
2825    /// ```
2826    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntryType;
2827    /// # async fn sample() -> gax::Result<()> {
2828    ///
2829    /// let builder = prepare_request_builder();
2830    /// let response = builder.send().await?;
2831    /// # Ok(()) }
2832    ///
2833    /// fn prepare_request_builder() -> GetEntryType {
2834    ///   # panic!();
2835    ///   // ... details omitted ...
2836    /// }
2837    /// ```
2838    #[derive(Clone, Debug)]
2839    pub struct GetEntryType(RequestBuilder<crate::model::GetEntryTypeRequest>);
2840
2841    impl GetEntryType {
2842        pub(crate) fn new(
2843            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2844        ) -> Self {
2845            Self(RequestBuilder::new(stub))
2846        }
2847
2848        /// Sets the full request, replacing any prior values.
2849        pub fn with_request<V: Into<crate::model::GetEntryTypeRequest>>(mut self, v: V) -> Self {
2850            self.0.request = v.into();
2851            self
2852        }
2853
2854        /// Sets all the options, replacing any prior values.
2855        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2856            self.0.options = v.into();
2857            self
2858        }
2859
2860        /// Sends the request.
2861        pub async fn send(self) -> Result<crate::model::EntryType> {
2862            (*self.0.stub)
2863                .get_entry_type(self.0.request, self.0.options)
2864                .await
2865                .map(gax::response::Response::into_body)
2866        }
2867
2868        /// Sets the value of [name][crate::model::GetEntryTypeRequest::name].
2869        ///
2870        /// This is a **required** field for requests.
2871        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2872            self.0.request.name = v.into();
2873            self
2874        }
2875    }
2876
2877    #[doc(hidden)]
2878    impl gax::options::internal::RequestBuilder for GetEntryType {
2879        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2880            &mut self.0.options
2881        }
2882    }
2883
2884    /// The request builder for [CatalogService::create_aspect_type][crate::client::CatalogService::create_aspect_type] calls.
2885    ///
2886    /// # Example
2887    /// ```
2888    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateAspectType;
2889    /// # async fn sample() -> gax::Result<()> {
2890    /// use lro::Poller;
2891    ///
2892    /// let builder = prepare_request_builder();
2893    /// let response = builder.poller().until_done().await?;
2894    /// # Ok(()) }
2895    ///
2896    /// fn prepare_request_builder() -> CreateAspectType {
2897    ///   # panic!();
2898    ///   // ... details omitted ...
2899    /// }
2900    /// ```
2901    #[derive(Clone, Debug)]
2902    pub struct CreateAspectType(RequestBuilder<crate::model::CreateAspectTypeRequest>);
2903
2904    impl CreateAspectType {
2905        pub(crate) fn new(
2906            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2907        ) -> Self {
2908            Self(RequestBuilder::new(stub))
2909        }
2910
2911        /// Sets the full request, replacing any prior values.
2912        pub fn with_request<V: Into<crate::model::CreateAspectTypeRequest>>(
2913            mut self,
2914            v: V,
2915        ) -> Self {
2916            self.0.request = v.into();
2917            self
2918        }
2919
2920        /// Sets all the options, replacing any prior values.
2921        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2922            self.0.options = v.into();
2923            self
2924        }
2925
2926        /// Sends the request.
2927        ///
2928        /// # Long running operations
2929        ///
2930        /// This starts, but does not poll, a longrunning operation. More information
2931        /// on [create_aspect_type][crate::client::CatalogService::create_aspect_type].
2932        pub async fn send(self) -> Result<longrunning::model::Operation> {
2933            (*self.0.stub)
2934                .create_aspect_type(self.0.request, self.0.options)
2935                .await
2936                .map(gax::response::Response::into_body)
2937        }
2938
2939        /// Creates a [Poller][lro::Poller] to work with `create_aspect_type`.
2940        pub fn poller(
2941            self,
2942        ) -> impl lro::Poller<crate::model::AspectType, crate::model::OperationMetadata> {
2943            type Operation =
2944                lro::internal::Operation<crate::model::AspectType, crate::model::OperationMetadata>;
2945            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2946            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2947
2948            let stub = self.0.stub.clone();
2949            let mut options = self.0.options.clone();
2950            options.set_retry_policy(gax::retry_policy::NeverRetry);
2951            let query = move |name| {
2952                let stub = stub.clone();
2953                let options = options.clone();
2954                async {
2955                    let op = GetOperation::new(stub)
2956                        .set_name(name)
2957                        .with_options(options)
2958                        .send()
2959                        .await?;
2960                    Ok(Operation::new(op))
2961                }
2962            };
2963
2964            let start = move || async {
2965                let op = self.send().await?;
2966                Ok(Operation::new(op))
2967            };
2968
2969            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2970        }
2971
2972        /// Sets the value of [parent][crate::model::CreateAspectTypeRequest::parent].
2973        ///
2974        /// This is a **required** field for requests.
2975        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2976            self.0.request.parent = v.into();
2977            self
2978        }
2979
2980        /// Sets the value of [aspect_type_id][crate::model::CreateAspectTypeRequest::aspect_type_id].
2981        ///
2982        /// This is a **required** field for requests.
2983        pub fn set_aspect_type_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2984            self.0.request.aspect_type_id = v.into();
2985            self
2986        }
2987
2988        /// Sets the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
2989        ///
2990        /// This is a **required** field for requests.
2991        pub fn set_aspect_type<T>(mut self, v: T) -> Self
2992        where
2993            T: std::convert::Into<crate::model::AspectType>,
2994        {
2995            self.0.request.aspect_type = std::option::Option::Some(v.into());
2996            self
2997        }
2998
2999        /// Sets or clears the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
3000        ///
3001        /// This is a **required** field for requests.
3002        pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
3003        where
3004            T: std::convert::Into<crate::model::AspectType>,
3005        {
3006            self.0.request.aspect_type = v.map(|x| x.into());
3007            self
3008        }
3009
3010        /// Sets the value of [validate_only][crate::model::CreateAspectTypeRequest::validate_only].
3011        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3012            self.0.request.validate_only = v.into();
3013            self
3014        }
3015    }
3016
3017    #[doc(hidden)]
3018    impl gax::options::internal::RequestBuilder for CreateAspectType {
3019        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3020            &mut self.0.options
3021        }
3022    }
3023
3024    /// The request builder for [CatalogService::update_aspect_type][crate::client::CatalogService::update_aspect_type] calls.
3025    ///
3026    /// # Example
3027    /// ```
3028    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateAspectType;
3029    /// # async fn sample() -> gax::Result<()> {
3030    /// use lro::Poller;
3031    ///
3032    /// let builder = prepare_request_builder();
3033    /// let response = builder.poller().until_done().await?;
3034    /// # Ok(()) }
3035    ///
3036    /// fn prepare_request_builder() -> UpdateAspectType {
3037    ///   # panic!();
3038    ///   // ... details omitted ...
3039    /// }
3040    /// ```
3041    #[derive(Clone, Debug)]
3042    pub struct UpdateAspectType(RequestBuilder<crate::model::UpdateAspectTypeRequest>);
3043
3044    impl UpdateAspectType {
3045        pub(crate) fn new(
3046            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3047        ) -> Self {
3048            Self(RequestBuilder::new(stub))
3049        }
3050
3051        /// Sets the full request, replacing any prior values.
3052        pub fn with_request<V: Into<crate::model::UpdateAspectTypeRequest>>(
3053            mut self,
3054            v: V,
3055        ) -> Self {
3056            self.0.request = v.into();
3057            self
3058        }
3059
3060        /// Sets all the options, replacing any prior values.
3061        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3062            self.0.options = v.into();
3063            self
3064        }
3065
3066        /// Sends the request.
3067        ///
3068        /// # Long running operations
3069        ///
3070        /// This starts, but does not poll, a longrunning operation. More information
3071        /// on [update_aspect_type][crate::client::CatalogService::update_aspect_type].
3072        pub async fn send(self) -> Result<longrunning::model::Operation> {
3073            (*self.0.stub)
3074                .update_aspect_type(self.0.request, self.0.options)
3075                .await
3076                .map(gax::response::Response::into_body)
3077        }
3078
3079        /// Creates a [Poller][lro::Poller] to work with `update_aspect_type`.
3080        pub fn poller(
3081            self,
3082        ) -> impl lro::Poller<crate::model::AspectType, crate::model::OperationMetadata> {
3083            type Operation =
3084                lro::internal::Operation<crate::model::AspectType, crate::model::OperationMetadata>;
3085            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3086            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3087
3088            let stub = self.0.stub.clone();
3089            let mut options = self.0.options.clone();
3090            options.set_retry_policy(gax::retry_policy::NeverRetry);
3091            let query = move |name| {
3092                let stub = stub.clone();
3093                let options = options.clone();
3094                async {
3095                    let op = GetOperation::new(stub)
3096                        .set_name(name)
3097                        .with_options(options)
3098                        .send()
3099                        .await?;
3100                    Ok(Operation::new(op))
3101                }
3102            };
3103
3104            let start = move || async {
3105                let op = self.send().await?;
3106                Ok(Operation::new(op))
3107            };
3108
3109            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3110        }
3111
3112        /// Sets the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
3113        ///
3114        /// This is a **required** field for requests.
3115        pub fn set_aspect_type<T>(mut self, v: T) -> Self
3116        where
3117            T: std::convert::Into<crate::model::AspectType>,
3118        {
3119            self.0.request.aspect_type = std::option::Option::Some(v.into());
3120            self
3121        }
3122
3123        /// Sets or clears the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
3124        ///
3125        /// This is a **required** field for requests.
3126        pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
3127        where
3128            T: std::convert::Into<crate::model::AspectType>,
3129        {
3130            self.0.request.aspect_type = v.map(|x| x.into());
3131            self
3132        }
3133
3134        /// Sets the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
3135        ///
3136        /// This is a **required** field for requests.
3137        pub fn set_update_mask<T>(mut self, v: T) -> Self
3138        where
3139            T: std::convert::Into<wkt::FieldMask>,
3140        {
3141            self.0.request.update_mask = std::option::Option::Some(v.into());
3142            self
3143        }
3144
3145        /// Sets or clears the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
3146        ///
3147        /// This is a **required** field for requests.
3148        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3149        where
3150            T: std::convert::Into<wkt::FieldMask>,
3151        {
3152            self.0.request.update_mask = v.map(|x| x.into());
3153            self
3154        }
3155
3156        /// Sets the value of [validate_only][crate::model::UpdateAspectTypeRequest::validate_only].
3157        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3158            self.0.request.validate_only = v.into();
3159            self
3160        }
3161    }
3162
3163    #[doc(hidden)]
3164    impl gax::options::internal::RequestBuilder for UpdateAspectType {
3165        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3166            &mut self.0.options
3167        }
3168    }
3169
3170    /// The request builder for [CatalogService::delete_aspect_type][crate::client::CatalogService::delete_aspect_type] calls.
3171    ///
3172    /// # Example
3173    /// ```
3174    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteAspectType;
3175    /// # async fn sample() -> gax::Result<()> {
3176    /// use lro::Poller;
3177    ///
3178    /// let builder = prepare_request_builder();
3179    /// let response = builder.poller().until_done().await?;
3180    /// # Ok(()) }
3181    ///
3182    /// fn prepare_request_builder() -> DeleteAspectType {
3183    ///   # panic!();
3184    ///   // ... details omitted ...
3185    /// }
3186    /// ```
3187    #[derive(Clone, Debug)]
3188    pub struct DeleteAspectType(RequestBuilder<crate::model::DeleteAspectTypeRequest>);
3189
3190    impl DeleteAspectType {
3191        pub(crate) fn new(
3192            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3193        ) -> Self {
3194            Self(RequestBuilder::new(stub))
3195        }
3196
3197        /// Sets the full request, replacing any prior values.
3198        pub fn with_request<V: Into<crate::model::DeleteAspectTypeRequest>>(
3199            mut self,
3200            v: V,
3201        ) -> Self {
3202            self.0.request = v.into();
3203            self
3204        }
3205
3206        /// Sets all the options, replacing any prior values.
3207        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3208            self.0.options = v.into();
3209            self
3210        }
3211
3212        /// Sends the request.
3213        ///
3214        /// # Long running operations
3215        ///
3216        /// This starts, but does not poll, a longrunning operation. More information
3217        /// on [delete_aspect_type][crate::client::CatalogService::delete_aspect_type].
3218        pub async fn send(self) -> Result<longrunning::model::Operation> {
3219            (*self.0.stub)
3220                .delete_aspect_type(self.0.request, self.0.options)
3221                .await
3222                .map(gax::response::Response::into_body)
3223        }
3224
3225        /// Creates a [Poller][lro::Poller] to work with `delete_aspect_type`.
3226        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
3227            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3228            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3229            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3230
3231            let stub = self.0.stub.clone();
3232            let mut options = self.0.options.clone();
3233            options.set_retry_policy(gax::retry_policy::NeverRetry);
3234            let query = move |name| {
3235                let stub = stub.clone();
3236                let options = options.clone();
3237                async {
3238                    let op = GetOperation::new(stub)
3239                        .set_name(name)
3240                        .with_options(options)
3241                        .send()
3242                        .await?;
3243                    Ok(Operation::new(op))
3244                }
3245            };
3246
3247            let start = move || async {
3248                let op = self.send().await?;
3249                Ok(Operation::new(op))
3250            };
3251
3252            lro::internal::new_unit_response_poller(
3253                polling_error_policy,
3254                polling_backoff_policy,
3255                start,
3256                query,
3257            )
3258        }
3259
3260        /// Sets the value of [name][crate::model::DeleteAspectTypeRequest::name].
3261        ///
3262        /// This is a **required** field for requests.
3263        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3264            self.0.request.name = v.into();
3265            self
3266        }
3267
3268        /// Sets the value of [etag][crate::model::DeleteAspectTypeRequest::etag].
3269        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3270            self.0.request.etag = v.into();
3271            self
3272        }
3273    }
3274
3275    #[doc(hidden)]
3276    impl gax::options::internal::RequestBuilder for DeleteAspectType {
3277        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3278            &mut self.0.options
3279        }
3280    }
3281
3282    /// The request builder for [CatalogService::list_aspect_types][crate::client::CatalogService::list_aspect_types] calls.
3283    ///
3284    /// # Example
3285    /// ```
3286    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListAspectTypes;
3287    /// # async fn sample() -> gax::Result<()> {
3288    /// use gax::paginator::ItemPaginator;
3289    ///
3290    /// let builder = prepare_request_builder();
3291    /// let mut items = builder.by_item();
3292    /// while let Some(result) = items.next().await {
3293    ///   let item = result?;
3294    /// }
3295    /// # Ok(()) }
3296    ///
3297    /// fn prepare_request_builder() -> ListAspectTypes {
3298    ///   # panic!();
3299    ///   // ... details omitted ...
3300    /// }
3301    /// ```
3302    #[derive(Clone, Debug)]
3303    pub struct ListAspectTypes(RequestBuilder<crate::model::ListAspectTypesRequest>);
3304
3305    impl ListAspectTypes {
3306        pub(crate) fn new(
3307            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3308        ) -> Self {
3309            Self(RequestBuilder::new(stub))
3310        }
3311
3312        /// Sets the full request, replacing any prior values.
3313        pub fn with_request<V: Into<crate::model::ListAspectTypesRequest>>(mut self, v: V) -> Self {
3314            self.0.request = v.into();
3315            self
3316        }
3317
3318        /// Sets all the options, replacing any prior values.
3319        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3320            self.0.options = v.into();
3321            self
3322        }
3323
3324        /// Sends the request.
3325        pub async fn send(self) -> Result<crate::model::ListAspectTypesResponse> {
3326            (*self.0.stub)
3327                .list_aspect_types(self.0.request, self.0.options)
3328                .await
3329                .map(gax::response::Response::into_body)
3330        }
3331
3332        /// Streams each page in the collection.
3333        pub fn by_page(
3334            self,
3335        ) -> impl gax::paginator::Paginator<crate::model::ListAspectTypesResponse, gax::error::Error>
3336        {
3337            use std::clone::Clone;
3338            let token = self.0.request.page_token.clone();
3339            let execute = move |token: String| {
3340                let mut builder = self.clone();
3341                builder.0.request = builder.0.request.set_page_token(token);
3342                builder.send()
3343            };
3344            gax::paginator::internal::new_paginator(token, execute)
3345        }
3346
3347        /// Streams each item in the collection.
3348        pub fn by_item(
3349            self,
3350        ) -> impl gax::paginator::ItemPaginator<crate::model::ListAspectTypesResponse, gax::error::Error>
3351        {
3352            use gax::paginator::Paginator;
3353            self.by_page().items()
3354        }
3355
3356        /// Sets the value of [parent][crate::model::ListAspectTypesRequest::parent].
3357        ///
3358        /// This is a **required** field for requests.
3359        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3360            self.0.request.parent = v.into();
3361            self
3362        }
3363
3364        /// Sets the value of [page_size][crate::model::ListAspectTypesRequest::page_size].
3365        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3366            self.0.request.page_size = v.into();
3367            self
3368        }
3369
3370        /// Sets the value of [page_token][crate::model::ListAspectTypesRequest::page_token].
3371        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3372            self.0.request.page_token = v.into();
3373            self
3374        }
3375
3376        /// Sets the value of [filter][crate::model::ListAspectTypesRequest::filter].
3377        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3378            self.0.request.filter = v.into();
3379            self
3380        }
3381
3382        /// Sets the value of [order_by][crate::model::ListAspectTypesRequest::order_by].
3383        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3384            self.0.request.order_by = v.into();
3385            self
3386        }
3387    }
3388
3389    #[doc(hidden)]
3390    impl gax::options::internal::RequestBuilder for ListAspectTypes {
3391        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3392            &mut self.0.options
3393        }
3394    }
3395
3396    /// The request builder for [CatalogService::get_aspect_type][crate::client::CatalogService::get_aspect_type] calls.
3397    ///
3398    /// # Example
3399    /// ```
3400    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetAspectType;
3401    /// # async fn sample() -> gax::Result<()> {
3402    ///
3403    /// let builder = prepare_request_builder();
3404    /// let response = builder.send().await?;
3405    /// # Ok(()) }
3406    ///
3407    /// fn prepare_request_builder() -> GetAspectType {
3408    ///   # panic!();
3409    ///   // ... details omitted ...
3410    /// }
3411    /// ```
3412    #[derive(Clone, Debug)]
3413    pub struct GetAspectType(RequestBuilder<crate::model::GetAspectTypeRequest>);
3414
3415    impl GetAspectType {
3416        pub(crate) fn new(
3417            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3418        ) -> Self {
3419            Self(RequestBuilder::new(stub))
3420        }
3421
3422        /// Sets the full request, replacing any prior values.
3423        pub fn with_request<V: Into<crate::model::GetAspectTypeRequest>>(mut self, v: V) -> Self {
3424            self.0.request = v.into();
3425            self
3426        }
3427
3428        /// Sets all the options, replacing any prior values.
3429        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3430            self.0.options = v.into();
3431            self
3432        }
3433
3434        /// Sends the request.
3435        pub async fn send(self) -> Result<crate::model::AspectType> {
3436            (*self.0.stub)
3437                .get_aspect_type(self.0.request, self.0.options)
3438                .await
3439                .map(gax::response::Response::into_body)
3440        }
3441
3442        /// Sets the value of [name][crate::model::GetAspectTypeRequest::name].
3443        ///
3444        /// This is a **required** field for requests.
3445        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3446            self.0.request.name = v.into();
3447            self
3448        }
3449    }
3450
3451    #[doc(hidden)]
3452    impl gax::options::internal::RequestBuilder for GetAspectType {
3453        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3454            &mut self.0.options
3455        }
3456    }
3457
3458    /// The request builder for [CatalogService::create_entry_group][crate::client::CatalogService::create_entry_group] calls.
3459    ///
3460    /// # Example
3461    /// ```
3462    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntryGroup;
3463    /// # async fn sample() -> gax::Result<()> {
3464    /// use lro::Poller;
3465    ///
3466    /// let builder = prepare_request_builder();
3467    /// let response = builder.poller().until_done().await?;
3468    /// # Ok(()) }
3469    ///
3470    /// fn prepare_request_builder() -> CreateEntryGroup {
3471    ///   # panic!();
3472    ///   // ... details omitted ...
3473    /// }
3474    /// ```
3475    #[derive(Clone, Debug)]
3476    pub struct CreateEntryGroup(RequestBuilder<crate::model::CreateEntryGroupRequest>);
3477
3478    impl CreateEntryGroup {
3479        pub(crate) fn new(
3480            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3481        ) -> Self {
3482            Self(RequestBuilder::new(stub))
3483        }
3484
3485        /// Sets the full request, replacing any prior values.
3486        pub fn with_request<V: Into<crate::model::CreateEntryGroupRequest>>(
3487            mut self,
3488            v: V,
3489        ) -> Self {
3490            self.0.request = v.into();
3491            self
3492        }
3493
3494        /// Sets all the options, replacing any prior values.
3495        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3496            self.0.options = v.into();
3497            self
3498        }
3499
3500        /// Sends the request.
3501        ///
3502        /// # Long running operations
3503        ///
3504        /// This starts, but does not poll, a longrunning operation. More information
3505        /// on [create_entry_group][crate::client::CatalogService::create_entry_group].
3506        pub async fn send(self) -> Result<longrunning::model::Operation> {
3507            (*self.0.stub)
3508                .create_entry_group(self.0.request, self.0.options)
3509                .await
3510                .map(gax::response::Response::into_body)
3511        }
3512
3513        /// Creates a [Poller][lro::Poller] to work with `create_entry_group`.
3514        pub fn poller(
3515            self,
3516        ) -> impl lro::Poller<crate::model::EntryGroup, crate::model::OperationMetadata> {
3517            type Operation =
3518                lro::internal::Operation<crate::model::EntryGroup, crate::model::OperationMetadata>;
3519            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3520            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3521
3522            let stub = self.0.stub.clone();
3523            let mut options = self.0.options.clone();
3524            options.set_retry_policy(gax::retry_policy::NeverRetry);
3525            let query = move |name| {
3526                let stub = stub.clone();
3527                let options = options.clone();
3528                async {
3529                    let op = GetOperation::new(stub)
3530                        .set_name(name)
3531                        .with_options(options)
3532                        .send()
3533                        .await?;
3534                    Ok(Operation::new(op))
3535                }
3536            };
3537
3538            let start = move || async {
3539                let op = self.send().await?;
3540                Ok(Operation::new(op))
3541            };
3542
3543            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3544        }
3545
3546        /// Sets the value of [parent][crate::model::CreateEntryGroupRequest::parent].
3547        ///
3548        /// This is a **required** field for requests.
3549        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3550            self.0.request.parent = v.into();
3551            self
3552        }
3553
3554        /// Sets the value of [entry_group_id][crate::model::CreateEntryGroupRequest::entry_group_id].
3555        ///
3556        /// This is a **required** field for requests.
3557        pub fn set_entry_group_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3558            self.0.request.entry_group_id = v.into();
3559            self
3560        }
3561
3562        /// Sets the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
3563        ///
3564        /// This is a **required** field for requests.
3565        pub fn set_entry_group<T>(mut self, v: T) -> Self
3566        where
3567            T: std::convert::Into<crate::model::EntryGroup>,
3568        {
3569            self.0.request.entry_group = std::option::Option::Some(v.into());
3570            self
3571        }
3572
3573        /// Sets or clears the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
3574        ///
3575        /// This is a **required** field for requests.
3576        pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
3577        where
3578            T: std::convert::Into<crate::model::EntryGroup>,
3579        {
3580            self.0.request.entry_group = v.map(|x| x.into());
3581            self
3582        }
3583
3584        /// Sets the value of [validate_only][crate::model::CreateEntryGroupRequest::validate_only].
3585        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3586            self.0.request.validate_only = v.into();
3587            self
3588        }
3589    }
3590
3591    #[doc(hidden)]
3592    impl gax::options::internal::RequestBuilder for CreateEntryGroup {
3593        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3594            &mut self.0.options
3595        }
3596    }
3597
3598    /// The request builder for [CatalogService::update_entry_group][crate::client::CatalogService::update_entry_group] calls.
3599    ///
3600    /// # Example
3601    /// ```
3602    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntryGroup;
3603    /// # async fn sample() -> gax::Result<()> {
3604    /// use lro::Poller;
3605    ///
3606    /// let builder = prepare_request_builder();
3607    /// let response = builder.poller().until_done().await?;
3608    /// # Ok(()) }
3609    ///
3610    /// fn prepare_request_builder() -> UpdateEntryGroup {
3611    ///   # panic!();
3612    ///   // ... details omitted ...
3613    /// }
3614    /// ```
3615    #[derive(Clone, Debug)]
3616    pub struct UpdateEntryGroup(RequestBuilder<crate::model::UpdateEntryGroupRequest>);
3617
3618    impl UpdateEntryGroup {
3619        pub(crate) fn new(
3620            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3621        ) -> Self {
3622            Self(RequestBuilder::new(stub))
3623        }
3624
3625        /// Sets the full request, replacing any prior values.
3626        pub fn with_request<V: Into<crate::model::UpdateEntryGroupRequest>>(
3627            mut self,
3628            v: V,
3629        ) -> Self {
3630            self.0.request = v.into();
3631            self
3632        }
3633
3634        /// Sets all the options, replacing any prior values.
3635        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3636            self.0.options = v.into();
3637            self
3638        }
3639
3640        /// Sends the request.
3641        ///
3642        /// # Long running operations
3643        ///
3644        /// This starts, but does not poll, a longrunning operation. More information
3645        /// on [update_entry_group][crate::client::CatalogService::update_entry_group].
3646        pub async fn send(self) -> Result<longrunning::model::Operation> {
3647            (*self.0.stub)
3648                .update_entry_group(self.0.request, self.0.options)
3649                .await
3650                .map(gax::response::Response::into_body)
3651        }
3652
3653        /// Creates a [Poller][lro::Poller] to work with `update_entry_group`.
3654        pub fn poller(
3655            self,
3656        ) -> impl lro::Poller<crate::model::EntryGroup, crate::model::OperationMetadata> {
3657            type Operation =
3658                lro::internal::Operation<crate::model::EntryGroup, crate::model::OperationMetadata>;
3659            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3660            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3661
3662            let stub = self.0.stub.clone();
3663            let mut options = self.0.options.clone();
3664            options.set_retry_policy(gax::retry_policy::NeverRetry);
3665            let query = move |name| {
3666                let stub = stub.clone();
3667                let options = options.clone();
3668                async {
3669                    let op = GetOperation::new(stub)
3670                        .set_name(name)
3671                        .with_options(options)
3672                        .send()
3673                        .await?;
3674                    Ok(Operation::new(op))
3675                }
3676            };
3677
3678            let start = move || async {
3679                let op = self.send().await?;
3680                Ok(Operation::new(op))
3681            };
3682
3683            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3684        }
3685
3686        /// Sets the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
3687        ///
3688        /// This is a **required** field for requests.
3689        pub fn set_entry_group<T>(mut self, v: T) -> Self
3690        where
3691            T: std::convert::Into<crate::model::EntryGroup>,
3692        {
3693            self.0.request.entry_group = std::option::Option::Some(v.into());
3694            self
3695        }
3696
3697        /// Sets or clears the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
3698        ///
3699        /// This is a **required** field for requests.
3700        pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
3701        where
3702            T: std::convert::Into<crate::model::EntryGroup>,
3703        {
3704            self.0.request.entry_group = v.map(|x| x.into());
3705            self
3706        }
3707
3708        /// Sets the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
3709        ///
3710        /// This is a **required** field for requests.
3711        pub fn set_update_mask<T>(mut self, v: T) -> Self
3712        where
3713            T: std::convert::Into<wkt::FieldMask>,
3714        {
3715            self.0.request.update_mask = std::option::Option::Some(v.into());
3716            self
3717        }
3718
3719        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
3720        ///
3721        /// This is a **required** field for requests.
3722        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3723        where
3724            T: std::convert::Into<wkt::FieldMask>,
3725        {
3726            self.0.request.update_mask = v.map(|x| x.into());
3727            self
3728        }
3729
3730        /// Sets the value of [validate_only][crate::model::UpdateEntryGroupRequest::validate_only].
3731        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3732            self.0.request.validate_only = v.into();
3733            self
3734        }
3735    }
3736
3737    #[doc(hidden)]
3738    impl gax::options::internal::RequestBuilder for UpdateEntryGroup {
3739        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3740            &mut self.0.options
3741        }
3742    }
3743
3744    /// The request builder for [CatalogService::delete_entry_group][crate::client::CatalogService::delete_entry_group] calls.
3745    ///
3746    /// # Example
3747    /// ```
3748    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntryGroup;
3749    /// # async fn sample() -> gax::Result<()> {
3750    /// use lro::Poller;
3751    ///
3752    /// let builder = prepare_request_builder();
3753    /// let response = builder.poller().until_done().await?;
3754    /// # Ok(()) }
3755    ///
3756    /// fn prepare_request_builder() -> DeleteEntryGroup {
3757    ///   # panic!();
3758    ///   // ... details omitted ...
3759    /// }
3760    /// ```
3761    #[derive(Clone, Debug)]
3762    pub struct DeleteEntryGroup(RequestBuilder<crate::model::DeleteEntryGroupRequest>);
3763
3764    impl DeleteEntryGroup {
3765        pub(crate) fn new(
3766            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3767        ) -> Self {
3768            Self(RequestBuilder::new(stub))
3769        }
3770
3771        /// Sets the full request, replacing any prior values.
3772        pub fn with_request<V: Into<crate::model::DeleteEntryGroupRequest>>(
3773            mut self,
3774            v: V,
3775        ) -> Self {
3776            self.0.request = v.into();
3777            self
3778        }
3779
3780        /// Sets all the options, replacing any prior values.
3781        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3782            self.0.options = v.into();
3783            self
3784        }
3785
3786        /// Sends the request.
3787        ///
3788        /// # Long running operations
3789        ///
3790        /// This starts, but does not poll, a longrunning operation. More information
3791        /// on [delete_entry_group][crate::client::CatalogService::delete_entry_group].
3792        pub async fn send(self) -> Result<longrunning::model::Operation> {
3793            (*self.0.stub)
3794                .delete_entry_group(self.0.request, self.0.options)
3795                .await
3796                .map(gax::response::Response::into_body)
3797        }
3798
3799        /// Creates a [Poller][lro::Poller] to work with `delete_entry_group`.
3800        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
3801            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3802            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3803            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3804
3805            let stub = self.0.stub.clone();
3806            let mut options = self.0.options.clone();
3807            options.set_retry_policy(gax::retry_policy::NeverRetry);
3808            let query = move |name| {
3809                let stub = stub.clone();
3810                let options = options.clone();
3811                async {
3812                    let op = GetOperation::new(stub)
3813                        .set_name(name)
3814                        .with_options(options)
3815                        .send()
3816                        .await?;
3817                    Ok(Operation::new(op))
3818                }
3819            };
3820
3821            let start = move || async {
3822                let op = self.send().await?;
3823                Ok(Operation::new(op))
3824            };
3825
3826            lro::internal::new_unit_response_poller(
3827                polling_error_policy,
3828                polling_backoff_policy,
3829                start,
3830                query,
3831            )
3832        }
3833
3834        /// Sets the value of [name][crate::model::DeleteEntryGroupRequest::name].
3835        ///
3836        /// This is a **required** field for requests.
3837        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3838            self.0.request.name = v.into();
3839            self
3840        }
3841
3842        /// Sets the value of [etag][crate::model::DeleteEntryGroupRequest::etag].
3843        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3844            self.0.request.etag = v.into();
3845            self
3846        }
3847    }
3848
3849    #[doc(hidden)]
3850    impl gax::options::internal::RequestBuilder for DeleteEntryGroup {
3851        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3852            &mut self.0.options
3853        }
3854    }
3855
3856    /// The request builder for [CatalogService::list_entry_groups][crate::client::CatalogService::list_entry_groups] calls.
3857    ///
3858    /// # Example
3859    /// ```
3860    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListEntryGroups;
3861    /// # async fn sample() -> gax::Result<()> {
3862    /// use gax::paginator::ItemPaginator;
3863    ///
3864    /// let builder = prepare_request_builder();
3865    /// let mut items = builder.by_item();
3866    /// while let Some(result) = items.next().await {
3867    ///   let item = result?;
3868    /// }
3869    /// # Ok(()) }
3870    ///
3871    /// fn prepare_request_builder() -> ListEntryGroups {
3872    ///   # panic!();
3873    ///   // ... details omitted ...
3874    /// }
3875    /// ```
3876    #[derive(Clone, Debug)]
3877    pub struct ListEntryGroups(RequestBuilder<crate::model::ListEntryGroupsRequest>);
3878
3879    impl ListEntryGroups {
3880        pub(crate) fn new(
3881            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3882        ) -> Self {
3883            Self(RequestBuilder::new(stub))
3884        }
3885
3886        /// Sets the full request, replacing any prior values.
3887        pub fn with_request<V: Into<crate::model::ListEntryGroupsRequest>>(mut self, v: V) -> Self {
3888            self.0.request = v.into();
3889            self
3890        }
3891
3892        /// Sets all the options, replacing any prior values.
3893        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3894            self.0.options = v.into();
3895            self
3896        }
3897
3898        /// Sends the request.
3899        pub async fn send(self) -> Result<crate::model::ListEntryGroupsResponse> {
3900            (*self.0.stub)
3901                .list_entry_groups(self.0.request, self.0.options)
3902                .await
3903                .map(gax::response::Response::into_body)
3904        }
3905
3906        /// Streams each page in the collection.
3907        pub fn by_page(
3908            self,
3909        ) -> impl gax::paginator::Paginator<crate::model::ListEntryGroupsResponse, gax::error::Error>
3910        {
3911            use std::clone::Clone;
3912            let token = self.0.request.page_token.clone();
3913            let execute = move |token: String| {
3914                let mut builder = self.clone();
3915                builder.0.request = builder.0.request.set_page_token(token);
3916                builder.send()
3917            };
3918            gax::paginator::internal::new_paginator(token, execute)
3919        }
3920
3921        /// Streams each item in the collection.
3922        pub fn by_item(
3923            self,
3924        ) -> impl gax::paginator::ItemPaginator<crate::model::ListEntryGroupsResponse, gax::error::Error>
3925        {
3926            use gax::paginator::Paginator;
3927            self.by_page().items()
3928        }
3929
3930        /// Sets the value of [parent][crate::model::ListEntryGroupsRequest::parent].
3931        ///
3932        /// This is a **required** field for requests.
3933        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3934            self.0.request.parent = v.into();
3935            self
3936        }
3937
3938        /// Sets the value of [page_size][crate::model::ListEntryGroupsRequest::page_size].
3939        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3940            self.0.request.page_size = v.into();
3941            self
3942        }
3943
3944        /// Sets the value of [page_token][crate::model::ListEntryGroupsRequest::page_token].
3945        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3946            self.0.request.page_token = v.into();
3947            self
3948        }
3949
3950        /// Sets the value of [filter][crate::model::ListEntryGroupsRequest::filter].
3951        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3952            self.0.request.filter = v.into();
3953            self
3954        }
3955
3956        /// Sets the value of [order_by][crate::model::ListEntryGroupsRequest::order_by].
3957        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3958            self.0.request.order_by = v.into();
3959            self
3960        }
3961    }
3962
3963    #[doc(hidden)]
3964    impl gax::options::internal::RequestBuilder for ListEntryGroups {
3965        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3966            &mut self.0.options
3967        }
3968    }
3969
3970    /// The request builder for [CatalogService::get_entry_group][crate::client::CatalogService::get_entry_group] calls.
3971    ///
3972    /// # Example
3973    /// ```
3974    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntryGroup;
3975    /// # async fn sample() -> gax::Result<()> {
3976    ///
3977    /// let builder = prepare_request_builder();
3978    /// let response = builder.send().await?;
3979    /// # Ok(()) }
3980    ///
3981    /// fn prepare_request_builder() -> GetEntryGroup {
3982    ///   # panic!();
3983    ///   // ... details omitted ...
3984    /// }
3985    /// ```
3986    #[derive(Clone, Debug)]
3987    pub struct GetEntryGroup(RequestBuilder<crate::model::GetEntryGroupRequest>);
3988
3989    impl GetEntryGroup {
3990        pub(crate) fn new(
3991            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3992        ) -> Self {
3993            Self(RequestBuilder::new(stub))
3994        }
3995
3996        /// Sets the full request, replacing any prior values.
3997        pub fn with_request<V: Into<crate::model::GetEntryGroupRequest>>(mut self, v: V) -> Self {
3998            self.0.request = v.into();
3999            self
4000        }
4001
4002        /// Sets all the options, replacing any prior values.
4003        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4004            self.0.options = v.into();
4005            self
4006        }
4007
4008        /// Sends the request.
4009        pub async fn send(self) -> Result<crate::model::EntryGroup> {
4010            (*self.0.stub)
4011                .get_entry_group(self.0.request, self.0.options)
4012                .await
4013                .map(gax::response::Response::into_body)
4014        }
4015
4016        /// Sets the value of [name][crate::model::GetEntryGroupRequest::name].
4017        ///
4018        /// This is a **required** field for requests.
4019        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4020            self.0.request.name = v.into();
4021            self
4022        }
4023    }
4024
4025    #[doc(hidden)]
4026    impl gax::options::internal::RequestBuilder for GetEntryGroup {
4027        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4028            &mut self.0.options
4029        }
4030    }
4031
4032    /// The request builder for [CatalogService::create_entry][crate::client::CatalogService::create_entry] calls.
4033    ///
4034    /// # Example
4035    /// ```
4036    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntry;
4037    /// # async fn sample() -> gax::Result<()> {
4038    ///
4039    /// let builder = prepare_request_builder();
4040    /// let response = builder.send().await?;
4041    /// # Ok(()) }
4042    ///
4043    /// fn prepare_request_builder() -> CreateEntry {
4044    ///   # panic!();
4045    ///   // ... details omitted ...
4046    /// }
4047    /// ```
4048    #[derive(Clone, Debug)]
4049    pub struct CreateEntry(RequestBuilder<crate::model::CreateEntryRequest>);
4050
4051    impl CreateEntry {
4052        pub(crate) fn new(
4053            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4054        ) -> Self {
4055            Self(RequestBuilder::new(stub))
4056        }
4057
4058        /// Sets the full request, replacing any prior values.
4059        pub fn with_request<V: Into<crate::model::CreateEntryRequest>>(mut self, v: V) -> Self {
4060            self.0.request = v.into();
4061            self
4062        }
4063
4064        /// Sets all the options, replacing any prior values.
4065        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4066            self.0.options = v.into();
4067            self
4068        }
4069
4070        /// Sends the request.
4071        pub async fn send(self) -> Result<crate::model::Entry> {
4072            (*self.0.stub)
4073                .create_entry(self.0.request, self.0.options)
4074                .await
4075                .map(gax::response::Response::into_body)
4076        }
4077
4078        /// Sets the value of [parent][crate::model::CreateEntryRequest::parent].
4079        ///
4080        /// This is a **required** field for requests.
4081        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4082            self.0.request.parent = v.into();
4083            self
4084        }
4085
4086        /// Sets the value of [entry_id][crate::model::CreateEntryRequest::entry_id].
4087        ///
4088        /// This is a **required** field for requests.
4089        pub fn set_entry_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4090            self.0.request.entry_id = v.into();
4091            self
4092        }
4093
4094        /// Sets the value of [entry][crate::model::CreateEntryRequest::entry].
4095        ///
4096        /// This is a **required** field for requests.
4097        pub fn set_entry<T>(mut self, v: T) -> Self
4098        where
4099            T: std::convert::Into<crate::model::Entry>,
4100        {
4101            self.0.request.entry = std::option::Option::Some(v.into());
4102            self
4103        }
4104
4105        /// Sets or clears the value of [entry][crate::model::CreateEntryRequest::entry].
4106        ///
4107        /// This is a **required** field for requests.
4108        pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
4109        where
4110            T: std::convert::Into<crate::model::Entry>,
4111        {
4112            self.0.request.entry = v.map(|x| x.into());
4113            self
4114        }
4115    }
4116
4117    #[doc(hidden)]
4118    impl gax::options::internal::RequestBuilder for CreateEntry {
4119        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4120            &mut self.0.options
4121        }
4122    }
4123
4124    /// The request builder for [CatalogService::update_entry][crate::client::CatalogService::update_entry] calls.
4125    ///
4126    /// # Example
4127    /// ```
4128    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntry;
4129    /// # async fn sample() -> gax::Result<()> {
4130    ///
4131    /// let builder = prepare_request_builder();
4132    /// let response = builder.send().await?;
4133    /// # Ok(()) }
4134    ///
4135    /// fn prepare_request_builder() -> UpdateEntry {
4136    ///   # panic!();
4137    ///   // ... details omitted ...
4138    /// }
4139    /// ```
4140    #[derive(Clone, Debug)]
4141    pub struct UpdateEntry(RequestBuilder<crate::model::UpdateEntryRequest>);
4142
4143    impl UpdateEntry {
4144        pub(crate) fn new(
4145            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4146        ) -> Self {
4147            Self(RequestBuilder::new(stub))
4148        }
4149
4150        /// Sets the full request, replacing any prior values.
4151        pub fn with_request<V: Into<crate::model::UpdateEntryRequest>>(mut self, v: V) -> Self {
4152            self.0.request = v.into();
4153            self
4154        }
4155
4156        /// Sets all the options, replacing any prior values.
4157        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4158            self.0.options = v.into();
4159            self
4160        }
4161
4162        /// Sends the request.
4163        pub async fn send(self) -> Result<crate::model::Entry> {
4164            (*self.0.stub)
4165                .update_entry(self.0.request, self.0.options)
4166                .await
4167                .map(gax::response::Response::into_body)
4168        }
4169
4170        /// Sets the value of [entry][crate::model::UpdateEntryRequest::entry].
4171        ///
4172        /// This is a **required** field for requests.
4173        pub fn set_entry<T>(mut self, v: T) -> Self
4174        where
4175            T: std::convert::Into<crate::model::Entry>,
4176        {
4177            self.0.request.entry = std::option::Option::Some(v.into());
4178            self
4179        }
4180
4181        /// Sets or clears the value of [entry][crate::model::UpdateEntryRequest::entry].
4182        ///
4183        /// This is a **required** field for requests.
4184        pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
4185        where
4186            T: std::convert::Into<crate::model::Entry>,
4187        {
4188            self.0.request.entry = v.map(|x| x.into());
4189            self
4190        }
4191
4192        /// Sets the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
4193        pub fn set_update_mask<T>(mut self, v: T) -> Self
4194        where
4195            T: std::convert::Into<wkt::FieldMask>,
4196        {
4197            self.0.request.update_mask = std::option::Option::Some(v.into());
4198            self
4199        }
4200
4201        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
4202        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4203        where
4204            T: std::convert::Into<wkt::FieldMask>,
4205        {
4206            self.0.request.update_mask = v.map(|x| x.into());
4207            self
4208        }
4209
4210        /// Sets the value of [allow_missing][crate::model::UpdateEntryRequest::allow_missing].
4211        pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
4212            self.0.request.allow_missing = v.into();
4213            self
4214        }
4215
4216        /// Sets the value of [delete_missing_aspects][crate::model::UpdateEntryRequest::delete_missing_aspects].
4217        pub fn set_delete_missing_aspects<T: Into<bool>>(mut self, v: T) -> Self {
4218            self.0.request.delete_missing_aspects = v.into();
4219            self
4220        }
4221
4222        /// Sets the value of [aspect_keys][crate::model::UpdateEntryRequest::aspect_keys].
4223        pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
4224        where
4225            T: std::iter::IntoIterator<Item = V>,
4226            V: std::convert::Into<std::string::String>,
4227        {
4228            use std::iter::Iterator;
4229            self.0.request.aspect_keys = v.into_iter().map(|i| i.into()).collect();
4230            self
4231        }
4232    }
4233
4234    #[doc(hidden)]
4235    impl gax::options::internal::RequestBuilder for UpdateEntry {
4236        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4237            &mut self.0.options
4238        }
4239    }
4240
4241    /// The request builder for [CatalogService::delete_entry][crate::client::CatalogService::delete_entry] calls.
4242    ///
4243    /// # Example
4244    /// ```
4245    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntry;
4246    /// # async fn sample() -> gax::Result<()> {
4247    ///
4248    /// let builder = prepare_request_builder();
4249    /// let response = builder.send().await?;
4250    /// # Ok(()) }
4251    ///
4252    /// fn prepare_request_builder() -> DeleteEntry {
4253    ///   # panic!();
4254    ///   // ... details omitted ...
4255    /// }
4256    /// ```
4257    #[derive(Clone, Debug)]
4258    pub struct DeleteEntry(RequestBuilder<crate::model::DeleteEntryRequest>);
4259
4260    impl DeleteEntry {
4261        pub(crate) fn new(
4262            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4263        ) -> Self {
4264            Self(RequestBuilder::new(stub))
4265        }
4266
4267        /// Sets the full request, replacing any prior values.
4268        pub fn with_request<V: Into<crate::model::DeleteEntryRequest>>(mut self, v: V) -> Self {
4269            self.0.request = v.into();
4270            self
4271        }
4272
4273        /// Sets all the options, replacing any prior values.
4274        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4275            self.0.options = v.into();
4276            self
4277        }
4278
4279        /// Sends the request.
4280        pub async fn send(self) -> Result<crate::model::Entry> {
4281            (*self.0.stub)
4282                .delete_entry(self.0.request, self.0.options)
4283                .await
4284                .map(gax::response::Response::into_body)
4285        }
4286
4287        /// Sets the value of [name][crate::model::DeleteEntryRequest::name].
4288        ///
4289        /// This is a **required** field for requests.
4290        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4291            self.0.request.name = v.into();
4292            self
4293        }
4294    }
4295
4296    #[doc(hidden)]
4297    impl gax::options::internal::RequestBuilder for DeleteEntry {
4298        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4299            &mut self.0.options
4300        }
4301    }
4302
4303    /// The request builder for [CatalogService::list_entries][crate::client::CatalogService::list_entries] calls.
4304    ///
4305    /// # Example
4306    /// ```
4307    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListEntries;
4308    /// # async fn sample() -> gax::Result<()> {
4309    /// use gax::paginator::ItemPaginator;
4310    ///
4311    /// let builder = prepare_request_builder();
4312    /// let mut items = builder.by_item();
4313    /// while let Some(result) = items.next().await {
4314    ///   let item = result?;
4315    /// }
4316    /// # Ok(()) }
4317    ///
4318    /// fn prepare_request_builder() -> ListEntries {
4319    ///   # panic!();
4320    ///   // ... details omitted ...
4321    /// }
4322    /// ```
4323    #[derive(Clone, Debug)]
4324    pub struct ListEntries(RequestBuilder<crate::model::ListEntriesRequest>);
4325
4326    impl ListEntries {
4327        pub(crate) fn new(
4328            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4329        ) -> Self {
4330            Self(RequestBuilder::new(stub))
4331        }
4332
4333        /// Sets the full request, replacing any prior values.
4334        pub fn with_request<V: Into<crate::model::ListEntriesRequest>>(mut self, v: V) -> Self {
4335            self.0.request = v.into();
4336            self
4337        }
4338
4339        /// Sets all the options, replacing any prior values.
4340        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4341            self.0.options = v.into();
4342            self
4343        }
4344
4345        /// Sends the request.
4346        pub async fn send(self) -> Result<crate::model::ListEntriesResponse> {
4347            (*self.0.stub)
4348                .list_entries(self.0.request, self.0.options)
4349                .await
4350                .map(gax::response::Response::into_body)
4351        }
4352
4353        /// Streams each page in the collection.
4354        pub fn by_page(
4355            self,
4356        ) -> impl gax::paginator::Paginator<crate::model::ListEntriesResponse, gax::error::Error>
4357        {
4358            use std::clone::Clone;
4359            let token = self.0.request.page_token.clone();
4360            let execute = move |token: String| {
4361                let mut builder = self.clone();
4362                builder.0.request = builder.0.request.set_page_token(token);
4363                builder.send()
4364            };
4365            gax::paginator::internal::new_paginator(token, execute)
4366        }
4367
4368        /// Streams each item in the collection.
4369        pub fn by_item(
4370            self,
4371        ) -> impl gax::paginator::ItemPaginator<crate::model::ListEntriesResponse, gax::error::Error>
4372        {
4373            use gax::paginator::Paginator;
4374            self.by_page().items()
4375        }
4376
4377        /// Sets the value of [parent][crate::model::ListEntriesRequest::parent].
4378        ///
4379        /// This is a **required** field for requests.
4380        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4381            self.0.request.parent = v.into();
4382            self
4383        }
4384
4385        /// Sets the value of [page_size][crate::model::ListEntriesRequest::page_size].
4386        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4387            self.0.request.page_size = v.into();
4388            self
4389        }
4390
4391        /// Sets the value of [page_token][crate::model::ListEntriesRequest::page_token].
4392        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4393            self.0.request.page_token = v.into();
4394            self
4395        }
4396
4397        /// Sets the value of [filter][crate::model::ListEntriesRequest::filter].
4398        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4399            self.0.request.filter = v.into();
4400            self
4401        }
4402    }
4403
4404    #[doc(hidden)]
4405    impl gax::options::internal::RequestBuilder for ListEntries {
4406        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4407            &mut self.0.options
4408        }
4409    }
4410
4411    /// The request builder for [CatalogService::get_entry][crate::client::CatalogService::get_entry] calls.
4412    ///
4413    /// # Example
4414    /// ```
4415    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntry;
4416    /// # async fn sample() -> gax::Result<()> {
4417    ///
4418    /// let builder = prepare_request_builder();
4419    /// let response = builder.send().await?;
4420    /// # Ok(()) }
4421    ///
4422    /// fn prepare_request_builder() -> GetEntry {
4423    ///   # panic!();
4424    ///   // ... details omitted ...
4425    /// }
4426    /// ```
4427    #[derive(Clone, Debug)]
4428    pub struct GetEntry(RequestBuilder<crate::model::GetEntryRequest>);
4429
4430    impl GetEntry {
4431        pub(crate) fn new(
4432            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4433        ) -> Self {
4434            Self(RequestBuilder::new(stub))
4435        }
4436
4437        /// Sets the full request, replacing any prior values.
4438        pub fn with_request<V: Into<crate::model::GetEntryRequest>>(mut self, v: V) -> Self {
4439            self.0.request = v.into();
4440            self
4441        }
4442
4443        /// Sets all the options, replacing any prior values.
4444        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4445            self.0.options = v.into();
4446            self
4447        }
4448
4449        /// Sends the request.
4450        pub async fn send(self) -> Result<crate::model::Entry> {
4451            (*self.0.stub)
4452                .get_entry(self.0.request, self.0.options)
4453                .await
4454                .map(gax::response::Response::into_body)
4455        }
4456
4457        /// Sets the value of [name][crate::model::GetEntryRequest::name].
4458        ///
4459        /// This is a **required** field for requests.
4460        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4461            self.0.request.name = v.into();
4462            self
4463        }
4464
4465        /// Sets the value of [view][crate::model::GetEntryRequest::view].
4466        pub fn set_view<T: Into<crate::model::EntryView>>(mut self, v: T) -> Self {
4467            self.0.request.view = v.into();
4468            self
4469        }
4470
4471        /// Sets the value of [aspect_types][crate::model::GetEntryRequest::aspect_types].
4472        pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
4473        where
4474            T: std::iter::IntoIterator<Item = V>,
4475            V: std::convert::Into<std::string::String>,
4476        {
4477            use std::iter::Iterator;
4478            self.0.request.aspect_types = v.into_iter().map(|i| i.into()).collect();
4479            self
4480        }
4481
4482        /// Sets the value of [paths][crate::model::GetEntryRequest::paths].
4483        pub fn set_paths<T, V>(mut self, v: T) -> Self
4484        where
4485            T: std::iter::IntoIterator<Item = V>,
4486            V: std::convert::Into<std::string::String>,
4487        {
4488            use std::iter::Iterator;
4489            self.0.request.paths = v.into_iter().map(|i| i.into()).collect();
4490            self
4491        }
4492    }
4493
4494    #[doc(hidden)]
4495    impl gax::options::internal::RequestBuilder for GetEntry {
4496        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4497            &mut self.0.options
4498        }
4499    }
4500
4501    /// The request builder for [CatalogService::lookup_entry][crate::client::CatalogService::lookup_entry] calls.
4502    ///
4503    /// # Example
4504    /// ```
4505    /// # use google_cloud_dataplex_v1::builder::catalog_service::LookupEntry;
4506    /// # async fn sample() -> gax::Result<()> {
4507    ///
4508    /// let builder = prepare_request_builder();
4509    /// let response = builder.send().await?;
4510    /// # Ok(()) }
4511    ///
4512    /// fn prepare_request_builder() -> LookupEntry {
4513    ///   # panic!();
4514    ///   // ... details omitted ...
4515    /// }
4516    /// ```
4517    #[derive(Clone, Debug)]
4518    pub struct LookupEntry(RequestBuilder<crate::model::LookupEntryRequest>);
4519
4520    impl LookupEntry {
4521        pub(crate) fn new(
4522            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4523        ) -> Self {
4524            Self(RequestBuilder::new(stub))
4525        }
4526
4527        /// Sets the full request, replacing any prior values.
4528        pub fn with_request<V: Into<crate::model::LookupEntryRequest>>(mut self, v: V) -> Self {
4529            self.0.request = v.into();
4530            self
4531        }
4532
4533        /// Sets all the options, replacing any prior values.
4534        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4535            self.0.options = v.into();
4536            self
4537        }
4538
4539        /// Sends the request.
4540        pub async fn send(self) -> Result<crate::model::Entry> {
4541            (*self.0.stub)
4542                .lookup_entry(self.0.request, self.0.options)
4543                .await
4544                .map(gax::response::Response::into_body)
4545        }
4546
4547        /// Sets the value of [name][crate::model::LookupEntryRequest::name].
4548        ///
4549        /// This is a **required** field for requests.
4550        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4551            self.0.request.name = v.into();
4552            self
4553        }
4554
4555        /// Sets the value of [view][crate::model::LookupEntryRequest::view].
4556        pub fn set_view<T: Into<crate::model::EntryView>>(mut self, v: T) -> Self {
4557            self.0.request.view = v.into();
4558            self
4559        }
4560
4561        /// Sets the value of [aspect_types][crate::model::LookupEntryRequest::aspect_types].
4562        pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
4563        where
4564            T: std::iter::IntoIterator<Item = V>,
4565            V: std::convert::Into<std::string::String>,
4566        {
4567            use std::iter::Iterator;
4568            self.0.request.aspect_types = v.into_iter().map(|i| i.into()).collect();
4569            self
4570        }
4571
4572        /// Sets the value of [paths][crate::model::LookupEntryRequest::paths].
4573        pub fn set_paths<T, V>(mut self, v: T) -> Self
4574        where
4575            T: std::iter::IntoIterator<Item = V>,
4576            V: std::convert::Into<std::string::String>,
4577        {
4578            use std::iter::Iterator;
4579            self.0.request.paths = v.into_iter().map(|i| i.into()).collect();
4580            self
4581        }
4582
4583        /// Sets the value of [entry][crate::model::LookupEntryRequest::entry].
4584        ///
4585        /// This is a **required** field for requests.
4586        pub fn set_entry<T: Into<std::string::String>>(mut self, v: T) -> Self {
4587            self.0.request.entry = v.into();
4588            self
4589        }
4590    }
4591
4592    #[doc(hidden)]
4593    impl gax::options::internal::RequestBuilder for LookupEntry {
4594        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4595            &mut self.0.options
4596        }
4597    }
4598
4599    /// The request builder for [CatalogService::search_entries][crate::client::CatalogService::search_entries] calls.
4600    ///
4601    /// # Example
4602    /// ```
4603    /// # use google_cloud_dataplex_v1::builder::catalog_service::SearchEntries;
4604    /// # async fn sample() -> gax::Result<()> {
4605    /// use gax::paginator::ItemPaginator;
4606    ///
4607    /// let builder = prepare_request_builder();
4608    /// let mut items = builder.by_item();
4609    /// while let Some(result) = items.next().await {
4610    ///   let item = result?;
4611    /// }
4612    /// # Ok(()) }
4613    ///
4614    /// fn prepare_request_builder() -> SearchEntries {
4615    ///   # panic!();
4616    ///   // ... details omitted ...
4617    /// }
4618    /// ```
4619    #[derive(Clone, Debug)]
4620    pub struct SearchEntries(RequestBuilder<crate::model::SearchEntriesRequest>);
4621
4622    impl SearchEntries {
4623        pub(crate) fn new(
4624            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4625        ) -> Self {
4626            Self(RequestBuilder::new(stub))
4627        }
4628
4629        /// Sets the full request, replacing any prior values.
4630        pub fn with_request<V: Into<crate::model::SearchEntriesRequest>>(mut self, v: V) -> Self {
4631            self.0.request = v.into();
4632            self
4633        }
4634
4635        /// Sets all the options, replacing any prior values.
4636        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4637            self.0.options = v.into();
4638            self
4639        }
4640
4641        /// Sends the request.
4642        pub async fn send(self) -> Result<crate::model::SearchEntriesResponse> {
4643            (*self.0.stub)
4644                .search_entries(self.0.request, self.0.options)
4645                .await
4646                .map(gax::response::Response::into_body)
4647        }
4648
4649        /// Streams each page in the collection.
4650        pub fn by_page(
4651            self,
4652        ) -> impl gax::paginator::Paginator<crate::model::SearchEntriesResponse, gax::error::Error>
4653        {
4654            use std::clone::Clone;
4655            let token = self.0.request.page_token.clone();
4656            let execute = move |token: String| {
4657                let mut builder = self.clone();
4658                builder.0.request = builder.0.request.set_page_token(token);
4659                builder.send()
4660            };
4661            gax::paginator::internal::new_paginator(token, execute)
4662        }
4663
4664        /// Streams each item in the collection.
4665        pub fn by_item(
4666            self,
4667        ) -> impl gax::paginator::ItemPaginator<crate::model::SearchEntriesResponse, gax::error::Error>
4668        {
4669            use gax::paginator::Paginator;
4670            self.by_page().items()
4671        }
4672
4673        /// Sets the value of [name][crate::model::SearchEntriesRequest::name].
4674        ///
4675        /// This is a **required** field for requests.
4676        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4677            self.0.request.name = v.into();
4678            self
4679        }
4680
4681        /// Sets the value of [query][crate::model::SearchEntriesRequest::query].
4682        ///
4683        /// This is a **required** field for requests.
4684        pub fn set_query<T: Into<std::string::String>>(mut self, v: T) -> Self {
4685            self.0.request.query = v.into();
4686            self
4687        }
4688
4689        /// Sets the value of [page_size][crate::model::SearchEntriesRequest::page_size].
4690        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4691            self.0.request.page_size = v.into();
4692            self
4693        }
4694
4695        /// Sets the value of [page_token][crate::model::SearchEntriesRequest::page_token].
4696        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4697            self.0.request.page_token = v.into();
4698            self
4699        }
4700
4701        /// Sets the value of [order_by][crate::model::SearchEntriesRequest::order_by].
4702        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4703            self.0.request.order_by = v.into();
4704            self
4705        }
4706
4707        /// Sets the value of [scope][crate::model::SearchEntriesRequest::scope].
4708        pub fn set_scope<T: Into<std::string::String>>(mut self, v: T) -> Self {
4709            self.0.request.scope = v.into();
4710            self
4711        }
4712
4713        /// Sets the value of [semantic_search][crate::model::SearchEntriesRequest::semantic_search].
4714        pub fn set_semantic_search<T: Into<bool>>(mut self, v: T) -> Self {
4715            self.0.request.semantic_search = v.into();
4716            self
4717        }
4718    }
4719
4720    #[doc(hidden)]
4721    impl gax::options::internal::RequestBuilder for SearchEntries {
4722        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4723            &mut self.0.options
4724        }
4725    }
4726
4727    /// The request builder for [CatalogService::create_metadata_job][crate::client::CatalogService::create_metadata_job] calls.
4728    ///
4729    /// # Example
4730    /// ```
4731    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateMetadataJob;
4732    /// # async fn sample() -> gax::Result<()> {
4733    /// use lro::Poller;
4734    ///
4735    /// let builder = prepare_request_builder();
4736    /// let response = builder.poller().until_done().await?;
4737    /// # Ok(()) }
4738    ///
4739    /// fn prepare_request_builder() -> CreateMetadataJob {
4740    ///   # panic!();
4741    ///   // ... details omitted ...
4742    /// }
4743    /// ```
4744    #[derive(Clone, Debug)]
4745    pub struct CreateMetadataJob(RequestBuilder<crate::model::CreateMetadataJobRequest>);
4746
4747    impl CreateMetadataJob {
4748        pub(crate) fn new(
4749            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4750        ) -> Self {
4751            Self(RequestBuilder::new(stub))
4752        }
4753
4754        /// Sets the full request, replacing any prior values.
4755        pub fn with_request<V: Into<crate::model::CreateMetadataJobRequest>>(
4756            mut self,
4757            v: V,
4758        ) -> Self {
4759            self.0.request = v.into();
4760            self
4761        }
4762
4763        /// Sets all the options, replacing any prior values.
4764        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4765            self.0.options = v.into();
4766            self
4767        }
4768
4769        /// Sends the request.
4770        ///
4771        /// # Long running operations
4772        ///
4773        /// This starts, but does not poll, a longrunning operation. More information
4774        /// on [create_metadata_job][crate::client::CatalogService::create_metadata_job].
4775        pub async fn send(self) -> Result<longrunning::model::Operation> {
4776            (*self.0.stub)
4777                .create_metadata_job(self.0.request, self.0.options)
4778                .await
4779                .map(gax::response::Response::into_body)
4780        }
4781
4782        /// Creates a [Poller][lro::Poller] to work with `create_metadata_job`.
4783        pub fn poller(
4784            self,
4785        ) -> impl lro::Poller<crate::model::MetadataJob, crate::model::OperationMetadata> {
4786            type Operation = lro::internal::Operation<
4787                crate::model::MetadataJob,
4788                crate::model::OperationMetadata,
4789            >;
4790            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4791            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4792
4793            let stub = self.0.stub.clone();
4794            let mut options = self.0.options.clone();
4795            options.set_retry_policy(gax::retry_policy::NeverRetry);
4796            let query = move |name| {
4797                let stub = stub.clone();
4798                let options = options.clone();
4799                async {
4800                    let op = GetOperation::new(stub)
4801                        .set_name(name)
4802                        .with_options(options)
4803                        .send()
4804                        .await?;
4805                    Ok(Operation::new(op))
4806                }
4807            };
4808
4809            let start = move || async {
4810                let op = self.send().await?;
4811                Ok(Operation::new(op))
4812            };
4813
4814            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4815        }
4816
4817        /// Sets the value of [parent][crate::model::CreateMetadataJobRequest::parent].
4818        ///
4819        /// This is a **required** field for requests.
4820        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4821            self.0.request.parent = v.into();
4822            self
4823        }
4824
4825        /// Sets the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
4826        ///
4827        /// This is a **required** field for requests.
4828        pub fn set_metadata_job<T>(mut self, v: T) -> Self
4829        where
4830            T: std::convert::Into<crate::model::MetadataJob>,
4831        {
4832            self.0.request.metadata_job = std::option::Option::Some(v.into());
4833            self
4834        }
4835
4836        /// Sets or clears the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
4837        ///
4838        /// This is a **required** field for requests.
4839        pub fn set_or_clear_metadata_job<T>(mut self, v: std::option::Option<T>) -> Self
4840        where
4841            T: std::convert::Into<crate::model::MetadataJob>,
4842        {
4843            self.0.request.metadata_job = v.map(|x| x.into());
4844            self
4845        }
4846
4847        /// Sets the value of [metadata_job_id][crate::model::CreateMetadataJobRequest::metadata_job_id].
4848        pub fn set_metadata_job_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4849            self.0.request.metadata_job_id = v.into();
4850            self
4851        }
4852
4853        /// Sets the value of [validate_only][crate::model::CreateMetadataJobRequest::validate_only].
4854        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
4855            self.0.request.validate_only = v.into();
4856            self
4857        }
4858    }
4859
4860    #[doc(hidden)]
4861    impl gax::options::internal::RequestBuilder for CreateMetadataJob {
4862        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4863            &mut self.0.options
4864        }
4865    }
4866
4867    /// The request builder for [CatalogService::get_metadata_job][crate::client::CatalogService::get_metadata_job] calls.
4868    ///
4869    /// # Example
4870    /// ```
4871    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetMetadataJob;
4872    /// # async fn sample() -> gax::Result<()> {
4873    ///
4874    /// let builder = prepare_request_builder();
4875    /// let response = builder.send().await?;
4876    /// # Ok(()) }
4877    ///
4878    /// fn prepare_request_builder() -> GetMetadataJob {
4879    ///   # panic!();
4880    ///   // ... details omitted ...
4881    /// }
4882    /// ```
4883    #[derive(Clone, Debug)]
4884    pub struct GetMetadataJob(RequestBuilder<crate::model::GetMetadataJobRequest>);
4885
4886    impl GetMetadataJob {
4887        pub(crate) fn new(
4888            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4889        ) -> Self {
4890            Self(RequestBuilder::new(stub))
4891        }
4892
4893        /// Sets the full request, replacing any prior values.
4894        pub fn with_request<V: Into<crate::model::GetMetadataJobRequest>>(mut self, v: V) -> Self {
4895            self.0.request = v.into();
4896            self
4897        }
4898
4899        /// Sets all the options, replacing any prior values.
4900        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4901            self.0.options = v.into();
4902            self
4903        }
4904
4905        /// Sends the request.
4906        pub async fn send(self) -> Result<crate::model::MetadataJob> {
4907            (*self.0.stub)
4908                .get_metadata_job(self.0.request, self.0.options)
4909                .await
4910                .map(gax::response::Response::into_body)
4911        }
4912
4913        /// Sets the value of [name][crate::model::GetMetadataJobRequest::name].
4914        ///
4915        /// This is a **required** field for requests.
4916        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4917            self.0.request.name = v.into();
4918            self
4919        }
4920    }
4921
4922    #[doc(hidden)]
4923    impl gax::options::internal::RequestBuilder for GetMetadataJob {
4924        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4925            &mut self.0.options
4926        }
4927    }
4928
4929    /// The request builder for [CatalogService::list_metadata_jobs][crate::client::CatalogService::list_metadata_jobs] calls.
4930    ///
4931    /// # Example
4932    /// ```
4933    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListMetadataJobs;
4934    /// # async fn sample() -> gax::Result<()> {
4935    /// use gax::paginator::ItemPaginator;
4936    ///
4937    /// let builder = prepare_request_builder();
4938    /// let mut items = builder.by_item();
4939    /// while let Some(result) = items.next().await {
4940    ///   let item = result?;
4941    /// }
4942    /// # Ok(()) }
4943    ///
4944    /// fn prepare_request_builder() -> ListMetadataJobs {
4945    ///   # panic!();
4946    ///   // ... details omitted ...
4947    /// }
4948    /// ```
4949    #[derive(Clone, Debug)]
4950    pub struct ListMetadataJobs(RequestBuilder<crate::model::ListMetadataJobsRequest>);
4951
4952    impl ListMetadataJobs {
4953        pub(crate) fn new(
4954            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4955        ) -> Self {
4956            Self(RequestBuilder::new(stub))
4957        }
4958
4959        /// Sets the full request, replacing any prior values.
4960        pub fn with_request<V: Into<crate::model::ListMetadataJobsRequest>>(
4961            mut self,
4962            v: V,
4963        ) -> Self {
4964            self.0.request = v.into();
4965            self
4966        }
4967
4968        /// Sets all the options, replacing any prior values.
4969        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4970            self.0.options = v.into();
4971            self
4972        }
4973
4974        /// Sends the request.
4975        pub async fn send(self) -> Result<crate::model::ListMetadataJobsResponse> {
4976            (*self.0.stub)
4977                .list_metadata_jobs(self.0.request, self.0.options)
4978                .await
4979                .map(gax::response::Response::into_body)
4980        }
4981
4982        /// Streams each page in the collection.
4983        pub fn by_page(
4984            self,
4985        ) -> impl gax::paginator::Paginator<crate::model::ListMetadataJobsResponse, gax::error::Error>
4986        {
4987            use std::clone::Clone;
4988            let token = self.0.request.page_token.clone();
4989            let execute = move |token: String| {
4990                let mut builder = self.clone();
4991                builder.0.request = builder.0.request.set_page_token(token);
4992                builder.send()
4993            };
4994            gax::paginator::internal::new_paginator(token, execute)
4995        }
4996
4997        /// Streams each item in the collection.
4998        pub fn by_item(
4999            self,
5000        ) -> impl gax::paginator::ItemPaginator<crate::model::ListMetadataJobsResponse, gax::error::Error>
5001        {
5002            use gax::paginator::Paginator;
5003            self.by_page().items()
5004        }
5005
5006        /// Sets the value of [parent][crate::model::ListMetadataJobsRequest::parent].
5007        ///
5008        /// This is a **required** field for requests.
5009        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5010            self.0.request.parent = v.into();
5011            self
5012        }
5013
5014        /// Sets the value of [page_size][crate::model::ListMetadataJobsRequest::page_size].
5015        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5016            self.0.request.page_size = v.into();
5017            self
5018        }
5019
5020        /// Sets the value of [page_token][crate::model::ListMetadataJobsRequest::page_token].
5021        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5022            self.0.request.page_token = v.into();
5023            self
5024        }
5025
5026        /// Sets the value of [filter][crate::model::ListMetadataJobsRequest::filter].
5027        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5028            self.0.request.filter = v.into();
5029            self
5030        }
5031
5032        /// Sets the value of [order_by][crate::model::ListMetadataJobsRequest::order_by].
5033        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5034            self.0.request.order_by = v.into();
5035            self
5036        }
5037    }
5038
5039    #[doc(hidden)]
5040    impl gax::options::internal::RequestBuilder for ListMetadataJobs {
5041        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5042            &mut self.0.options
5043        }
5044    }
5045
5046    /// The request builder for [CatalogService::cancel_metadata_job][crate::client::CatalogService::cancel_metadata_job] calls.
5047    ///
5048    /// # Example
5049    /// ```
5050    /// # use google_cloud_dataplex_v1::builder::catalog_service::CancelMetadataJob;
5051    /// # async fn sample() -> gax::Result<()> {
5052    ///
5053    /// let builder = prepare_request_builder();
5054    /// let response = builder.send().await?;
5055    /// # Ok(()) }
5056    ///
5057    /// fn prepare_request_builder() -> CancelMetadataJob {
5058    ///   # panic!();
5059    ///   // ... details omitted ...
5060    /// }
5061    /// ```
5062    #[derive(Clone, Debug)]
5063    pub struct CancelMetadataJob(RequestBuilder<crate::model::CancelMetadataJobRequest>);
5064
5065    impl CancelMetadataJob {
5066        pub(crate) fn new(
5067            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5068        ) -> Self {
5069            Self(RequestBuilder::new(stub))
5070        }
5071
5072        /// Sets the full request, replacing any prior values.
5073        pub fn with_request<V: Into<crate::model::CancelMetadataJobRequest>>(
5074            mut self,
5075            v: V,
5076        ) -> Self {
5077            self.0.request = v.into();
5078            self
5079        }
5080
5081        /// Sets all the options, replacing any prior values.
5082        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5083            self.0.options = v.into();
5084            self
5085        }
5086
5087        /// Sends the request.
5088        pub async fn send(self) -> Result<()> {
5089            (*self.0.stub)
5090                .cancel_metadata_job(self.0.request, self.0.options)
5091                .await
5092                .map(gax::response::Response::into_body)
5093        }
5094
5095        /// Sets the value of [name][crate::model::CancelMetadataJobRequest::name].
5096        ///
5097        /// This is a **required** field for requests.
5098        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5099            self.0.request.name = v.into();
5100            self
5101        }
5102    }
5103
5104    #[doc(hidden)]
5105    impl gax::options::internal::RequestBuilder for CancelMetadataJob {
5106        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5107            &mut self.0.options
5108        }
5109    }
5110
5111    /// The request builder for [CatalogService::create_entry_link][crate::client::CatalogService::create_entry_link] calls.
5112    ///
5113    /// # Example
5114    /// ```
5115    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntryLink;
5116    /// # async fn sample() -> gax::Result<()> {
5117    ///
5118    /// let builder = prepare_request_builder();
5119    /// let response = builder.send().await?;
5120    /// # Ok(()) }
5121    ///
5122    /// fn prepare_request_builder() -> CreateEntryLink {
5123    ///   # panic!();
5124    ///   // ... details omitted ...
5125    /// }
5126    /// ```
5127    #[derive(Clone, Debug)]
5128    pub struct CreateEntryLink(RequestBuilder<crate::model::CreateEntryLinkRequest>);
5129
5130    impl CreateEntryLink {
5131        pub(crate) fn new(
5132            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5133        ) -> Self {
5134            Self(RequestBuilder::new(stub))
5135        }
5136
5137        /// Sets the full request, replacing any prior values.
5138        pub fn with_request<V: Into<crate::model::CreateEntryLinkRequest>>(mut self, v: V) -> Self {
5139            self.0.request = v.into();
5140            self
5141        }
5142
5143        /// Sets all the options, replacing any prior values.
5144        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5145            self.0.options = v.into();
5146            self
5147        }
5148
5149        /// Sends the request.
5150        pub async fn send(self) -> Result<crate::model::EntryLink> {
5151            (*self.0.stub)
5152                .create_entry_link(self.0.request, self.0.options)
5153                .await
5154                .map(gax::response::Response::into_body)
5155        }
5156
5157        /// Sets the value of [parent][crate::model::CreateEntryLinkRequest::parent].
5158        ///
5159        /// This is a **required** field for requests.
5160        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5161            self.0.request.parent = v.into();
5162            self
5163        }
5164
5165        /// Sets the value of [entry_link_id][crate::model::CreateEntryLinkRequest::entry_link_id].
5166        ///
5167        /// This is a **required** field for requests.
5168        pub fn set_entry_link_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5169            self.0.request.entry_link_id = v.into();
5170            self
5171        }
5172
5173        /// Sets the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
5174        ///
5175        /// This is a **required** field for requests.
5176        pub fn set_entry_link<T>(mut self, v: T) -> Self
5177        where
5178            T: std::convert::Into<crate::model::EntryLink>,
5179        {
5180            self.0.request.entry_link = std::option::Option::Some(v.into());
5181            self
5182        }
5183
5184        /// Sets or clears the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
5185        ///
5186        /// This is a **required** field for requests.
5187        pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
5188        where
5189            T: std::convert::Into<crate::model::EntryLink>,
5190        {
5191            self.0.request.entry_link = v.map(|x| x.into());
5192            self
5193        }
5194    }
5195
5196    #[doc(hidden)]
5197    impl gax::options::internal::RequestBuilder for CreateEntryLink {
5198        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5199            &mut self.0.options
5200        }
5201    }
5202
5203    /// The request builder for [CatalogService::delete_entry_link][crate::client::CatalogService::delete_entry_link] calls.
5204    ///
5205    /// # Example
5206    /// ```
5207    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntryLink;
5208    /// # async fn sample() -> gax::Result<()> {
5209    ///
5210    /// let builder = prepare_request_builder();
5211    /// let response = builder.send().await?;
5212    /// # Ok(()) }
5213    ///
5214    /// fn prepare_request_builder() -> DeleteEntryLink {
5215    ///   # panic!();
5216    ///   // ... details omitted ...
5217    /// }
5218    /// ```
5219    #[derive(Clone, Debug)]
5220    pub struct DeleteEntryLink(RequestBuilder<crate::model::DeleteEntryLinkRequest>);
5221
5222    impl DeleteEntryLink {
5223        pub(crate) fn new(
5224            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5225        ) -> Self {
5226            Self(RequestBuilder::new(stub))
5227        }
5228
5229        /// Sets the full request, replacing any prior values.
5230        pub fn with_request<V: Into<crate::model::DeleteEntryLinkRequest>>(mut self, v: V) -> Self {
5231            self.0.request = v.into();
5232            self
5233        }
5234
5235        /// Sets all the options, replacing any prior values.
5236        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5237            self.0.options = v.into();
5238            self
5239        }
5240
5241        /// Sends the request.
5242        pub async fn send(self) -> Result<crate::model::EntryLink> {
5243            (*self.0.stub)
5244                .delete_entry_link(self.0.request, self.0.options)
5245                .await
5246                .map(gax::response::Response::into_body)
5247        }
5248
5249        /// Sets the value of [name][crate::model::DeleteEntryLinkRequest::name].
5250        ///
5251        /// This is a **required** field for requests.
5252        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5253            self.0.request.name = v.into();
5254            self
5255        }
5256    }
5257
5258    #[doc(hidden)]
5259    impl gax::options::internal::RequestBuilder for DeleteEntryLink {
5260        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5261            &mut self.0.options
5262        }
5263    }
5264
5265    /// The request builder for [CatalogService::get_entry_link][crate::client::CatalogService::get_entry_link] calls.
5266    ///
5267    /// # Example
5268    /// ```
5269    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntryLink;
5270    /// # async fn sample() -> gax::Result<()> {
5271    ///
5272    /// let builder = prepare_request_builder();
5273    /// let response = builder.send().await?;
5274    /// # Ok(()) }
5275    ///
5276    /// fn prepare_request_builder() -> GetEntryLink {
5277    ///   # panic!();
5278    ///   // ... details omitted ...
5279    /// }
5280    /// ```
5281    #[derive(Clone, Debug)]
5282    pub struct GetEntryLink(RequestBuilder<crate::model::GetEntryLinkRequest>);
5283
5284    impl GetEntryLink {
5285        pub(crate) fn new(
5286            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5287        ) -> Self {
5288            Self(RequestBuilder::new(stub))
5289        }
5290
5291        /// Sets the full request, replacing any prior values.
5292        pub fn with_request<V: Into<crate::model::GetEntryLinkRequest>>(mut self, v: V) -> Self {
5293            self.0.request = v.into();
5294            self
5295        }
5296
5297        /// Sets all the options, replacing any prior values.
5298        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5299            self.0.options = v.into();
5300            self
5301        }
5302
5303        /// Sends the request.
5304        pub async fn send(self) -> Result<crate::model::EntryLink> {
5305            (*self.0.stub)
5306                .get_entry_link(self.0.request, self.0.options)
5307                .await
5308                .map(gax::response::Response::into_body)
5309        }
5310
5311        /// Sets the value of [name][crate::model::GetEntryLinkRequest::name].
5312        ///
5313        /// This is a **required** field for requests.
5314        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5315            self.0.request.name = v.into();
5316            self
5317        }
5318    }
5319
5320    #[doc(hidden)]
5321    impl gax::options::internal::RequestBuilder for GetEntryLink {
5322        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5323            &mut self.0.options
5324        }
5325    }
5326
5327    /// The request builder for [CatalogService::list_locations][crate::client::CatalogService::list_locations] calls.
5328    ///
5329    /// # Example
5330    /// ```
5331    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListLocations;
5332    /// # async fn sample() -> gax::Result<()> {
5333    /// use gax::paginator::ItemPaginator;
5334    ///
5335    /// let builder = prepare_request_builder();
5336    /// let mut items = builder.by_item();
5337    /// while let Some(result) = items.next().await {
5338    ///   let item = result?;
5339    /// }
5340    /// # Ok(()) }
5341    ///
5342    /// fn prepare_request_builder() -> ListLocations {
5343    ///   # panic!();
5344    ///   // ... details omitted ...
5345    /// }
5346    /// ```
5347    #[derive(Clone, Debug)]
5348    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
5349
5350    impl ListLocations {
5351        pub(crate) fn new(
5352            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5353        ) -> Self {
5354            Self(RequestBuilder::new(stub))
5355        }
5356
5357        /// Sets the full request, replacing any prior values.
5358        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
5359            mut self,
5360            v: V,
5361        ) -> Self {
5362            self.0.request = v.into();
5363            self
5364        }
5365
5366        /// Sets all the options, replacing any prior values.
5367        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5368            self.0.options = v.into();
5369            self
5370        }
5371
5372        /// Sends the request.
5373        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
5374            (*self.0.stub)
5375                .list_locations(self.0.request, self.0.options)
5376                .await
5377                .map(gax::response::Response::into_body)
5378        }
5379
5380        /// Streams each page in the collection.
5381        pub fn by_page(
5382            self,
5383        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
5384        {
5385            use std::clone::Clone;
5386            let token = self.0.request.page_token.clone();
5387            let execute = move |token: String| {
5388                let mut builder = self.clone();
5389                builder.0.request = builder.0.request.set_page_token(token);
5390                builder.send()
5391            };
5392            gax::paginator::internal::new_paginator(token, execute)
5393        }
5394
5395        /// Streams each item in the collection.
5396        pub fn by_item(
5397            self,
5398        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
5399        {
5400            use gax::paginator::Paginator;
5401            self.by_page().items()
5402        }
5403
5404        /// Sets the value of [name][location::model::ListLocationsRequest::name].
5405        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5406            self.0.request.name = v.into();
5407            self
5408        }
5409
5410        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
5411        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5412            self.0.request.filter = v.into();
5413            self
5414        }
5415
5416        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
5417        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5418            self.0.request.page_size = v.into();
5419            self
5420        }
5421
5422        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
5423        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5424            self.0.request.page_token = v.into();
5425            self
5426        }
5427    }
5428
5429    #[doc(hidden)]
5430    impl gax::options::internal::RequestBuilder for ListLocations {
5431        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5432            &mut self.0.options
5433        }
5434    }
5435
5436    /// The request builder for [CatalogService::get_location][crate::client::CatalogService::get_location] calls.
5437    ///
5438    /// # Example
5439    /// ```
5440    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetLocation;
5441    /// # async fn sample() -> gax::Result<()> {
5442    ///
5443    /// let builder = prepare_request_builder();
5444    /// let response = builder.send().await?;
5445    /// # Ok(()) }
5446    ///
5447    /// fn prepare_request_builder() -> GetLocation {
5448    ///   # panic!();
5449    ///   // ... details omitted ...
5450    /// }
5451    /// ```
5452    #[derive(Clone, Debug)]
5453    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
5454
5455    impl GetLocation {
5456        pub(crate) fn new(
5457            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5458        ) -> Self {
5459            Self(RequestBuilder::new(stub))
5460        }
5461
5462        /// Sets the full request, replacing any prior values.
5463        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
5464            self.0.request = v.into();
5465            self
5466        }
5467
5468        /// Sets all the options, replacing any prior values.
5469        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5470            self.0.options = v.into();
5471            self
5472        }
5473
5474        /// Sends the request.
5475        pub async fn send(self) -> Result<location::model::Location> {
5476            (*self.0.stub)
5477                .get_location(self.0.request, self.0.options)
5478                .await
5479                .map(gax::response::Response::into_body)
5480        }
5481
5482        /// Sets the value of [name][location::model::GetLocationRequest::name].
5483        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5484            self.0.request.name = v.into();
5485            self
5486        }
5487    }
5488
5489    #[doc(hidden)]
5490    impl gax::options::internal::RequestBuilder for GetLocation {
5491        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5492            &mut self.0.options
5493        }
5494    }
5495
5496    /// The request builder for [CatalogService::set_iam_policy][crate::client::CatalogService::set_iam_policy] calls.
5497    ///
5498    /// # Example
5499    /// ```
5500    /// # use google_cloud_dataplex_v1::builder::catalog_service::SetIamPolicy;
5501    /// # async fn sample() -> gax::Result<()> {
5502    ///
5503    /// let builder = prepare_request_builder();
5504    /// let response = builder.send().await?;
5505    /// # Ok(()) }
5506    ///
5507    /// fn prepare_request_builder() -> SetIamPolicy {
5508    ///   # panic!();
5509    ///   // ... details omitted ...
5510    /// }
5511    /// ```
5512    #[derive(Clone, Debug)]
5513    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
5514
5515    impl SetIamPolicy {
5516        pub(crate) fn new(
5517            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5518        ) -> Self {
5519            Self(RequestBuilder::new(stub))
5520        }
5521
5522        /// Sets the full request, replacing any prior values.
5523        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
5524            self.0.request = v.into();
5525            self
5526        }
5527
5528        /// Sets all the options, replacing any prior values.
5529        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5530            self.0.options = v.into();
5531            self
5532        }
5533
5534        /// Sends the request.
5535        pub async fn send(self) -> Result<iam_v1::model::Policy> {
5536            (*self.0.stub)
5537                .set_iam_policy(self.0.request, self.0.options)
5538                .await
5539                .map(gax::response::Response::into_body)
5540        }
5541
5542        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
5543        ///
5544        /// This is a **required** field for requests.
5545        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
5546            self.0.request.resource = v.into();
5547            self
5548        }
5549
5550        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
5551        ///
5552        /// This is a **required** field for requests.
5553        pub fn set_policy<T>(mut self, v: T) -> Self
5554        where
5555            T: std::convert::Into<iam_v1::model::Policy>,
5556        {
5557            self.0.request.policy = std::option::Option::Some(v.into());
5558            self
5559        }
5560
5561        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
5562        ///
5563        /// This is a **required** field for requests.
5564        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
5565        where
5566            T: std::convert::Into<iam_v1::model::Policy>,
5567        {
5568            self.0.request.policy = v.map(|x| x.into());
5569            self
5570        }
5571
5572        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
5573        pub fn set_update_mask<T>(mut self, v: T) -> Self
5574        where
5575            T: std::convert::Into<wkt::FieldMask>,
5576        {
5577            self.0.request.update_mask = std::option::Option::Some(v.into());
5578            self
5579        }
5580
5581        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
5582        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5583        where
5584            T: std::convert::Into<wkt::FieldMask>,
5585        {
5586            self.0.request.update_mask = v.map(|x| x.into());
5587            self
5588        }
5589    }
5590
5591    #[doc(hidden)]
5592    impl gax::options::internal::RequestBuilder for SetIamPolicy {
5593        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5594            &mut self.0.options
5595        }
5596    }
5597
5598    /// The request builder for [CatalogService::get_iam_policy][crate::client::CatalogService::get_iam_policy] calls.
5599    ///
5600    /// # Example
5601    /// ```
5602    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetIamPolicy;
5603    /// # async fn sample() -> gax::Result<()> {
5604    ///
5605    /// let builder = prepare_request_builder();
5606    /// let response = builder.send().await?;
5607    /// # Ok(()) }
5608    ///
5609    /// fn prepare_request_builder() -> GetIamPolicy {
5610    ///   # panic!();
5611    ///   // ... details omitted ...
5612    /// }
5613    /// ```
5614    #[derive(Clone, Debug)]
5615    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
5616
5617    impl GetIamPolicy {
5618        pub(crate) fn new(
5619            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5620        ) -> Self {
5621            Self(RequestBuilder::new(stub))
5622        }
5623
5624        /// Sets the full request, replacing any prior values.
5625        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
5626            self.0.request = v.into();
5627            self
5628        }
5629
5630        /// Sets all the options, replacing any prior values.
5631        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5632            self.0.options = v.into();
5633            self
5634        }
5635
5636        /// Sends the request.
5637        pub async fn send(self) -> Result<iam_v1::model::Policy> {
5638            (*self.0.stub)
5639                .get_iam_policy(self.0.request, self.0.options)
5640                .await
5641                .map(gax::response::Response::into_body)
5642        }
5643
5644        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
5645        ///
5646        /// This is a **required** field for requests.
5647        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
5648            self.0.request.resource = v.into();
5649            self
5650        }
5651
5652        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
5653        pub fn set_options<T>(mut self, v: T) -> Self
5654        where
5655            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
5656        {
5657            self.0.request.options = std::option::Option::Some(v.into());
5658            self
5659        }
5660
5661        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
5662        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
5663        where
5664            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
5665        {
5666            self.0.request.options = v.map(|x| x.into());
5667            self
5668        }
5669    }
5670
5671    #[doc(hidden)]
5672    impl gax::options::internal::RequestBuilder for GetIamPolicy {
5673        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5674            &mut self.0.options
5675        }
5676    }
5677
5678    /// The request builder for [CatalogService::test_iam_permissions][crate::client::CatalogService::test_iam_permissions] calls.
5679    ///
5680    /// # Example
5681    /// ```
5682    /// # use google_cloud_dataplex_v1::builder::catalog_service::TestIamPermissions;
5683    /// # async fn sample() -> gax::Result<()> {
5684    ///
5685    /// let builder = prepare_request_builder();
5686    /// let response = builder.send().await?;
5687    /// # Ok(()) }
5688    ///
5689    /// fn prepare_request_builder() -> TestIamPermissions {
5690    ///   # panic!();
5691    ///   // ... details omitted ...
5692    /// }
5693    /// ```
5694    #[derive(Clone, Debug)]
5695    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
5696
5697    impl TestIamPermissions {
5698        pub(crate) fn new(
5699            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5700        ) -> Self {
5701            Self(RequestBuilder::new(stub))
5702        }
5703
5704        /// Sets the full request, replacing any prior values.
5705        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
5706            mut self,
5707            v: V,
5708        ) -> Self {
5709            self.0.request = v.into();
5710            self
5711        }
5712
5713        /// Sets all the options, replacing any prior values.
5714        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5715            self.0.options = v.into();
5716            self
5717        }
5718
5719        /// Sends the request.
5720        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
5721            (*self.0.stub)
5722                .test_iam_permissions(self.0.request, self.0.options)
5723                .await
5724                .map(gax::response::Response::into_body)
5725        }
5726
5727        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
5728        ///
5729        /// This is a **required** field for requests.
5730        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
5731            self.0.request.resource = v.into();
5732            self
5733        }
5734
5735        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
5736        ///
5737        /// This is a **required** field for requests.
5738        pub fn set_permissions<T, V>(mut self, v: T) -> Self
5739        where
5740            T: std::iter::IntoIterator<Item = V>,
5741            V: std::convert::Into<std::string::String>,
5742        {
5743            use std::iter::Iterator;
5744            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
5745            self
5746        }
5747    }
5748
5749    #[doc(hidden)]
5750    impl gax::options::internal::RequestBuilder for TestIamPermissions {
5751        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5752            &mut self.0.options
5753        }
5754    }
5755
5756    /// The request builder for [CatalogService::list_operations][crate::client::CatalogService::list_operations] calls.
5757    ///
5758    /// # Example
5759    /// ```
5760    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListOperations;
5761    /// # async fn sample() -> gax::Result<()> {
5762    /// use gax::paginator::ItemPaginator;
5763    ///
5764    /// let builder = prepare_request_builder();
5765    /// let mut items = builder.by_item();
5766    /// while let Some(result) = items.next().await {
5767    ///   let item = result?;
5768    /// }
5769    /// # Ok(()) }
5770    ///
5771    /// fn prepare_request_builder() -> ListOperations {
5772    ///   # panic!();
5773    ///   // ... details omitted ...
5774    /// }
5775    /// ```
5776    #[derive(Clone, Debug)]
5777    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
5778
5779    impl ListOperations {
5780        pub(crate) fn new(
5781            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5782        ) -> Self {
5783            Self(RequestBuilder::new(stub))
5784        }
5785
5786        /// Sets the full request, replacing any prior values.
5787        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
5788            mut self,
5789            v: V,
5790        ) -> Self {
5791            self.0.request = v.into();
5792            self
5793        }
5794
5795        /// Sets all the options, replacing any prior values.
5796        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5797            self.0.options = v.into();
5798            self
5799        }
5800
5801        /// Sends the request.
5802        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
5803            (*self.0.stub)
5804                .list_operations(self.0.request, self.0.options)
5805                .await
5806                .map(gax::response::Response::into_body)
5807        }
5808
5809        /// Streams each page in the collection.
5810        pub fn by_page(
5811            self,
5812        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
5813        {
5814            use std::clone::Clone;
5815            let token = self.0.request.page_token.clone();
5816            let execute = move |token: String| {
5817                let mut builder = self.clone();
5818                builder.0.request = builder.0.request.set_page_token(token);
5819                builder.send()
5820            };
5821            gax::paginator::internal::new_paginator(token, execute)
5822        }
5823
5824        /// Streams each item in the collection.
5825        pub fn by_item(
5826            self,
5827        ) -> impl gax::paginator::ItemPaginator<
5828            longrunning::model::ListOperationsResponse,
5829            gax::error::Error,
5830        > {
5831            use gax::paginator::Paginator;
5832            self.by_page().items()
5833        }
5834
5835        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
5836        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5837            self.0.request.name = v.into();
5838            self
5839        }
5840
5841        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
5842        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5843            self.0.request.filter = v.into();
5844            self
5845        }
5846
5847        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
5848        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5849            self.0.request.page_size = v.into();
5850            self
5851        }
5852
5853        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
5854        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5855            self.0.request.page_token = v.into();
5856            self
5857        }
5858
5859        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
5860        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
5861            self.0.request.return_partial_success = v.into();
5862            self
5863        }
5864    }
5865
5866    #[doc(hidden)]
5867    impl gax::options::internal::RequestBuilder for ListOperations {
5868        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5869            &mut self.0.options
5870        }
5871    }
5872
5873    /// The request builder for [CatalogService::get_operation][crate::client::CatalogService::get_operation] calls.
5874    ///
5875    /// # Example
5876    /// ```
5877    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetOperation;
5878    /// # async fn sample() -> gax::Result<()> {
5879    ///
5880    /// let builder = prepare_request_builder();
5881    /// let response = builder.send().await?;
5882    /// # Ok(()) }
5883    ///
5884    /// fn prepare_request_builder() -> GetOperation {
5885    ///   # panic!();
5886    ///   // ... details omitted ...
5887    /// }
5888    /// ```
5889    #[derive(Clone, Debug)]
5890    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
5891
5892    impl GetOperation {
5893        pub(crate) fn new(
5894            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5895        ) -> Self {
5896            Self(RequestBuilder::new(stub))
5897        }
5898
5899        /// Sets the full request, replacing any prior values.
5900        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
5901            mut self,
5902            v: V,
5903        ) -> Self {
5904            self.0.request = v.into();
5905            self
5906        }
5907
5908        /// Sets all the options, replacing any prior values.
5909        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5910            self.0.options = v.into();
5911            self
5912        }
5913
5914        /// Sends the request.
5915        pub async fn send(self) -> Result<longrunning::model::Operation> {
5916            (*self.0.stub)
5917                .get_operation(self.0.request, self.0.options)
5918                .await
5919                .map(gax::response::Response::into_body)
5920        }
5921
5922        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
5923        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5924            self.0.request.name = v.into();
5925            self
5926        }
5927    }
5928
5929    #[doc(hidden)]
5930    impl gax::options::internal::RequestBuilder for GetOperation {
5931        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5932            &mut self.0.options
5933        }
5934    }
5935
5936    /// The request builder for [CatalogService::delete_operation][crate::client::CatalogService::delete_operation] calls.
5937    ///
5938    /// # Example
5939    /// ```
5940    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteOperation;
5941    /// # async fn sample() -> gax::Result<()> {
5942    ///
5943    /// let builder = prepare_request_builder();
5944    /// let response = builder.send().await?;
5945    /// # Ok(()) }
5946    ///
5947    /// fn prepare_request_builder() -> DeleteOperation {
5948    ///   # panic!();
5949    ///   // ... details omitted ...
5950    /// }
5951    /// ```
5952    #[derive(Clone, Debug)]
5953    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
5954
5955    impl DeleteOperation {
5956        pub(crate) fn new(
5957            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5958        ) -> Self {
5959            Self(RequestBuilder::new(stub))
5960        }
5961
5962        /// Sets the full request, replacing any prior values.
5963        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
5964            mut self,
5965            v: V,
5966        ) -> Self {
5967            self.0.request = v.into();
5968            self
5969        }
5970
5971        /// Sets all the options, replacing any prior values.
5972        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5973            self.0.options = v.into();
5974            self
5975        }
5976
5977        /// Sends the request.
5978        pub async fn send(self) -> Result<()> {
5979            (*self.0.stub)
5980                .delete_operation(self.0.request, self.0.options)
5981                .await
5982                .map(gax::response::Response::into_body)
5983        }
5984
5985        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
5986        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5987            self.0.request.name = v.into();
5988            self
5989        }
5990    }
5991
5992    #[doc(hidden)]
5993    impl gax::options::internal::RequestBuilder for DeleteOperation {
5994        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5995            &mut self.0.options
5996        }
5997    }
5998
5999    /// The request builder for [CatalogService::cancel_operation][crate::client::CatalogService::cancel_operation] calls.
6000    ///
6001    /// # Example
6002    /// ```
6003    /// # use google_cloud_dataplex_v1::builder::catalog_service::CancelOperation;
6004    /// # async fn sample() -> gax::Result<()> {
6005    ///
6006    /// let builder = prepare_request_builder();
6007    /// let response = builder.send().await?;
6008    /// # Ok(()) }
6009    ///
6010    /// fn prepare_request_builder() -> CancelOperation {
6011    ///   # panic!();
6012    ///   // ... details omitted ...
6013    /// }
6014    /// ```
6015    #[derive(Clone, Debug)]
6016    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
6017
6018    impl CancelOperation {
6019        pub(crate) fn new(
6020            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6021        ) -> Self {
6022            Self(RequestBuilder::new(stub))
6023        }
6024
6025        /// Sets the full request, replacing any prior values.
6026        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
6027            mut self,
6028            v: V,
6029        ) -> Self {
6030            self.0.request = v.into();
6031            self
6032        }
6033
6034        /// Sets all the options, replacing any prior values.
6035        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6036            self.0.options = v.into();
6037            self
6038        }
6039
6040        /// Sends the request.
6041        pub async fn send(self) -> Result<()> {
6042            (*self.0.stub)
6043                .cancel_operation(self.0.request, self.0.options)
6044                .await
6045                .map(gax::response::Response::into_body)
6046        }
6047
6048        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
6049        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6050            self.0.request.name = v.into();
6051            self
6052        }
6053    }
6054
6055    #[doc(hidden)]
6056    impl gax::options::internal::RequestBuilder for CancelOperation {
6057        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6058            &mut self.0.options
6059        }
6060    }
6061}
6062
6063pub mod cmek_service {
6064    use crate::Result;
6065
6066    /// A builder for [CmekService][crate::client::CmekService].
6067    ///
6068    /// ```
6069    /// # async fn sample() -> gax::client_builder::Result<()> {
6070    /// # use google_cloud_dataplex_v1::*;
6071    /// # use builder::cmek_service::ClientBuilder;
6072    /// # use client::CmekService;
6073    /// let builder : ClientBuilder = CmekService::builder();
6074    /// let client = builder
6075    ///     .with_endpoint("https://dataplex.googleapis.com")
6076    ///     .build().await?;
6077    /// # Ok(()) }
6078    /// ```
6079    pub type ClientBuilder =
6080        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
6081
6082    pub(crate) mod client {
6083        use super::super::super::client::CmekService;
6084        pub struct Factory;
6085        impl gax::client_builder::internal::ClientFactory for Factory {
6086            type Client = CmekService;
6087            type Credentials = gaxi::options::Credentials;
6088            async fn build(
6089                self,
6090                config: gaxi::options::ClientConfig,
6091            ) -> gax::client_builder::Result<Self::Client> {
6092                Self::Client::new(config).await
6093            }
6094        }
6095    }
6096
6097    /// Common implementation for [crate::client::CmekService] request builders.
6098    #[derive(Clone, Debug)]
6099    pub(crate) struct RequestBuilder<R: std::default::Default> {
6100        stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6101        request: R,
6102        options: gax::options::RequestOptions,
6103    }
6104
6105    impl<R> RequestBuilder<R>
6106    where
6107        R: std::default::Default,
6108    {
6109        pub(crate) fn new(
6110            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6111        ) -> Self {
6112            Self {
6113                stub,
6114                request: R::default(),
6115                options: gax::options::RequestOptions::default(),
6116            }
6117        }
6118    }
6119
6120    /// The request builder for [CmekService::create_encryption_config][crate::client::CmekService::create_encryption_config] calls.
6121    ///
6122    /// # Example
6123    /// ```
6124    /// # use google_cloud_dataplex_v1::builder::cmek_service::CreateEncryptionConfig;
6125    /// # async fn sample() -> gax::Result<()> {
6126    /// use lro::Poller;
6127    ///
6128    /// let builder = prepare_request_builder();
6129    /// let response = builder.poller().until_done().await?;
6130    /// # Ok(()) }
6131    ///
6132    /// fn prepare_request_builder() -> CreateEncryptionConfig {
6133    ///   # panic!();
6134    ///   // ... details omitted ...
6135    /// }
6136    /// ```
6137    #[derive(Clone, Debug)]
6138    pub struct CreateEncryptionConfig(RequestBuilder<crate::model::CreateEncryptionConfigRequest>);
6139
6140    impl CreateEncryptionConfig {
6141        pub(crate) fn new(
6142            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6143        ) -> Self {
6144            Self(RequestBuilder::new(stub))
6145        }
6146
6147        /// Sets the full request, replacing any prior values.
6148        pub fn with_request<V: Into<crate::model::CreateEncryptionConfigRequest>>(
6149            mut self,
6150            v: V,
6151        ) -> Self {
6152            self.0.request = v.into();
6153            self
6154        }
6155
6156        /// Sets all the options, replacing any prior values.
6157        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6158            self.0.options = v.into();
6159            self
6160        }
6161
6162        /// Sends the request.
6163        ///
6164        /// # Long running operations
6165        ///
6166        /// This starts, but does not poll, a longrunning operation. More information
6167        /// on [create_encryption_config][crate::client::CmekService::create_encryption_config].
6168        pub async fn send(self) -> Result<longrunning::model::Operation> {
6169            (*self.0.stub)
6170                .create_encryption_config(self.0.request, self.0.options)
6171                .await
6172                .map(gax::response::Response::into_body)
6173        }
6174
6175        /// Creates a [Poller][lro::Poller] to work with `create_encryption_config`.
6176        pub fn poller(
6177            self,
6178        ) -> impl lro::Poller<crate::model::EncryptionConfig, crate::model::OperationMetadata>
6179        {
6180            type Operation = lro::internal::Operation<
6181                crate::model::EncryptionConfig,
6182                crate::model::OperationMetadata,
6183            >;
6184            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6185            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6186
6187            let stub = self.0.stub.clone();
6188            let mut options = self.0.options.clone();
6189            options.set_retry_policy(gax::retry_policy::NeverRetry);
6190            let query = move |name| {
6191                let stub = stub.clone();
6192                let options = options.clone();
6193                async {
6194                    let op = GetOperation::new(stub)
6195                        .set_name(name)
6196                        .with_options(options)
6197                        .send()
6198                        .await?;
6199                    Ok(Operation::new(op))
6200                }
6201            };
6202
6203            let start = move || async {
6204                let op = self.send().await?;
6205                Ok(Operation::new(op))
6206            };
6207
6208            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6209        }
6210
6211        /// Sets the value of [parent][crate::model::CreateEncryptionConfigRequest::parent].
6212        ///
6213        /// This is a **required** field for requests.
6214        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6215            self.0.request.parent = v.into();
6216            self
6217        }
6218
6219        /// Sets the value of [encryption_config_id][crate::model::CreateEncryptionConfigRequest::encryption_config_id].
6220        ///
6221        /// This is a **required** field for requests.
6222        pub fn set_encryption_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6223            self.0.request.encryption_config_id = v.into();
6224            self
6225        }
6226
6227        /// Sets the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
6228        ///
6229        /// This is a **required** field for requests.
6230        pub fn set_encryption_config<T>(mut self, v: T) -> Self
6231        where
6232            T: std::convert::Into<crate::model::EncryptionConfig>,
6233        {
6234            self.0.request.encryption_config = std::option::Option::Some(v.into());
6235            self
6236        }
6237
6238        /// Sets or clears the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
6239        ///
6240        /// This is a **required** field for requests.
6241        pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
6242        where
6243            T: std::convert::Into<crate::model::EncryptionConfig>,
6244        {
6245            self.0.request.encryption_config = v.map(|x| x.into());
6246            self
6247        }
6248    }
6249
6250    #[doc(hidden)]
6251    impl gax::options::internal::RequestBuilder for CreateEncryptionConfig {
6252        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6253            &mut self.0.options
6254        }
6255    }
6256
6257    /// The request builder for [CmekService::update_encryption_config][crate::client::CmekService::update_encryption_config] calls.
6258    ///
6259    /// # Example
6260    /// ```
6261    /// # use google_cloud_dataplex_v1::builder::cmek_service::UpdateEncryptionConfig;
6262    /// # async fn sample() -> gax::Result<()> {
6263    /// use lro::Poller;
6264    ///
6265    /// let builder = prepare_request_builder();
6266    /// let response = builder.poller().until_done().await?;
6267    /// # Ok(()) }
6268    ///
6269    /// fn prepare_request_builder() -> UpdateEncryptionConfig {
6270    ///   # panic!();
6271    ///   // ... details omitted ...
6272    /// }
6273    /// ```
6274    #[derive(Clone, Debug)]
6275    pub struct UpdateEncryptionConfig(RequestBuilder<crate::model::UpdateEncryptionConfigRequest>);
6276
6277    impl UpdateEncryptionConfig {
6278        pub(crate) fn new(
6279            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6280        ) -> Self {
6281            Self(RequestBuilder::new(stub))
6282        }
6283
6284        /// Sets the full request, replacing any prior values.
6285        pub fn with_request<V: Into<crate::model::UpdateEncryptionConfigRequest>>(
6286            mut self,
6287            v: V,
6288        ) -> Self {
6289            self.0.request = v.into();
6290            self
6291        }
6292
6293        /// Sets all the options, replacing any prior values.
6294        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6295            self.0.options = v.into();
6296            self
6297        }
6298
6299        /// Sends the request.
6300        ///
6301        /// # Long running operations
6302        ///
6303        /// This starts, but does not poll, a longrunning operation. More information
6304        /// on [update_encryption_config][crate::client::CmekService::update_encryption_config].
6305        pub async fn send(self) -> Result<longrunning::model::Operation> {
6306            (*self.0.stub)
6307                .update_encryption_config(self.0.request, self.0.options)
6308                .await
6309                .map(gax::response::Response::into_body)
6310        }
6311
6312        /// Creates a [Poller][lro::Poller] to work with `update_encryption_config`.
6313        pub fn poller(
6314            self,
6315        ) -> impl lro::Poller<crate::model::EncryptionConfig, crate::model::OperationMetadata>
6316        {
6317            type Operation = lro::internal::Operation<
6318                crate::model::EncryptionConfig,
6319                crate::model::OperationMetadata,
6320            >;
6321            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6322            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6323
6324            let stub = self.0.stub.clone();
6325            let mut options = self.0.options.clone();
6326            options.set_retry_policy(gax::retry_policy::NeverRetry);
6327            let query = move |name| {
6328                let stub = stub.clone();
6329                let options = options.clone();
6330                async {
6331                    let op = GetOperation::new(stub)
6332                        .set_name(name)
6333                        .with_options(options)
6334                        .send()
6335                        .await?;
6336                    Ok(Operation::new(op))
6337                }
6338            };
6339
6340            let start = move || async {
6341                let op = self.send().await?;
6342                Ok(Operation::new(op))
6343            };
6344
6345            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6346        }
6347
6348        /// Sets the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
6349        ///
6350        /// This is a **required** field for requests.
6351        pub fn set_encryption_config<T>(mut self, v: T) -> Self
6352        where
6353            T: std::convert::Into<crate::model::EncryptionConfig>,
6354        {
6355            self.0.request.encryption_config = std::option::Option::Some(v.into());
6356            self
6357        }
6358
6359        /// Sets or clears the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
6360        ///
6361        /// This is a **required** field for requests.
6362        pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
6363        where
6364            T: std::convert::Into<crate::model::EncryptionConfig>,
6365        {
6366            self.0.request.encryption_config = v.map(|x| x.into());
6367            self
6368        }
6369
6370        /// Sets the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
6371        pub fn set_update_mask<T>(mut self, v: T) -> Self
6372        where
6373            T: std::convert::Into<wkt::FieldMask>,
6374        {
6375            self.0.request.update_mask = std::option::Option::Some(v.into());
6376            self
6377        }
6378
6379        /// Sets or clears the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
6380        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6381        where
6382            T: std::convert::Into<wkt::FieldMask>,
6383        {
6384            self.0.request.update_mask = v.map(|x| x.into());
6385            self
6386        }
6387    }
6388
6389    #[doc(hidden)]
6390    impl gax::options::internal::RequestBuilder for UpdateEncryptionConfig {
6391        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6392            &mut self.0.options
6393        }
6394    }
6395
6396    /// The request builder for [CmekService::delete_encryption_config][crate::client::CmekService::delete_encryption_config] calls.
6397    ///
6398    /// # Example
6399    /// ```
6400    /// # use google_cloud_dataplex_v1::builder::cmek_service::DeleteEncryptionConfig;
6401    /// # async fn sample() -> gax::Result<()> {
6402    /// use lro::Poller;
6403    ///
6404    /// let builder = prepare_request_builder();
6405    /// let response = builder.poller().until_done().await?;
6406    /// # Ok(()) }
6407    ///
6408    /// fn prepare_request_builder() -> DeleteEncryptionConfig {
6409    ///   # panic!();
6410    ///   // ... details omitted ...
6411    /// }
6412    /// ```
6413    #[derive(Clone, Debug)]
6414    pub struct DeleteEncryptionConfig(RequestBuilder<crate::model::DeleteEncryptionConfigRequest>);
6415
6416    impl DeleteEncryptionConfig {
6417        pub(crate) fn new(
6418            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6419        ) -> Self {
6420            Self(RequestBuilder::new(stub))
6421        }
6422
6423        /// Sets the full request, replacing any prior values.
6424        pub fn with_request<V: Into<crate::model::DeleteEncryptionConfigRequest>>(
6425            mut self,
6426            v: V,
6427        ) -> Self {
6428            self.0.request = v.into();
6429            self
6430        }
6431
6432        /// Sets all the options, replacing any prior values.
6433        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6434            self.0.options = v.into();
6435            self
6436        }
6437
6438        /// Sends the request.
6439        ///
6440        /// # Long running operations
6441        ///
6442        /// This starts, but does not poll, a longrunning operation. More information
6443        /// on [delete_encryption_config][crate::client::CmekService::delete_encryption_config].
6444        pub async fn send(self) -> Result<longrunning::model::Operation> {
6445            (*self.0.stub)
6446                .delete_encryption_config(self.0.request, self.0.options)
6447                .await
6448                .map(gax::response::Response::into_body)
6449        }
6450
6451        /// Creates a [Poller][lro::Poller] to work with `delete_encryption_config`.
6452        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
6453            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6454            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6455            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6456
6457            let stub = self.0.stub.clone();
6458            let mut options = self.0.options.clone();
6459            options.set_retry_policy(gax::retry_policy::NeverRetry);
6460            let query = move |name| {
6461                let stub = stub.clone();
6462                let options = options.clone();
6463                async {
6464                    let op = GetOperation::new(stub)
6465                        .set_name(name)
6466                        .with_options(options)
6467                        .send()
6468                        .await?;
6469                    Ok(Operation::new(op))
6470                }
6471            };
6472
6473            let start = move || async {
6474                let op = self.send().await?;
6475                Ok(Operation::new(op))
6476            };
6477
6478            lro::internal::new_unit_response_poller(
6479                polling_error_policy,
6480                polling_backoff_policy,
6481                start,
6482                query,
6483            )
6484        }
6485
6486        /// Sets the value of [name][crate::model::DeleteEncryptionConfigRequest::name].
6487        ///
6488        /// This is a **required** field for requests.
6489        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6490            self.0.request.name = v.into();
6491            self
6492        }
6493
6494        /// Sets the value of [etag][crate::model::DeleteEncryptionConfigRequest::etag].
6495        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
6496            self.0.request.etag = v.into();
6497            self
6498        }
6499    }
6500
6501    #[doc(hidden)]
6502    impl gax::options::internal::RequestBuilder for DeleteEncryptionConfig {
6503        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6504            &mut self.0.options
6505        }
6506    }
6507
6508    /// The request builder for [CmekService::list_encryption_configs][crate::client::CmekService::list_encryption_configs] calls.
6509    ///
6510    /// # Example
6511    /// ```
6512    /// # use google_cloud_dataplex_v1::builder::cmek_service::ListEncryptionConfigs;
6513    /// # async fn sample() -> gax::Result<()> {
6514    /// use gax::paginator::ItemPaginator;
6515    ///
6516    /// let builder = prepare_request_builder();
6517    /// let mut items = builder.by_item();
6518    /// while let Some(result) = items.next().await {
6519    ///   let item = result?;
6520    /// }
6521    /// # Ok(()) }
6522    ///
6523    /// fn prepare_request_builder() -> ListEncryptionConfigs {
6524    ///   # panic!();
6525    ///   // ... details omitted ...
6526    /// }
6527    /// ```
6528    #[derive(Clone, Debug)]
6529    pub struct ListEncryptionConfigs(RequestBuilder<crate::model::ListEncryptionConfigsRequest>);
6530
6531    impl ListEncryptionConfigs {
6532        pub(crate) fn new(
6533            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6534        ) -> Self {
6535            Self(RequestBuilder::new(stub))
6536        }
6537
6538        /// Sets the full request, replacing any prior values.
6539        pub fn with_request<V: Into<crate::model::ListEncryptionConfigsRequest>>(
6540            mut self,
6541            v: V,
6542        ) -> Self {
6543            self.0.request = v.into();
6544            self
6545        }
6546
6547        /// Sets all the options, replacing any prior values.
6548        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6549            self.0.options = v.into();
6550            self
6551        }
6552
6553        /// Sends the request.
6554        pub async fn send(self) -> Result<crate::model::ListEncryptionConfigsResponse> {
6555            (*self.0.stub)
6556                .list_encryption_configs(self.0.request, self.0.options)
6557                .await
6558                .map(gax::response::Response::into_body)
6559        }
6560
6561        /// Streams each page in the collection.
6562        pub fn by_page(
6563            self,
6564        ) -> impl gax::paginator::Paginator<crate::model::ListEncryptionConfigsResponse, gax::error::Error>
6565        {
6566            use std::clone::Clone;
6567            let token = self.0.request.page_token.clone();
6568            let execute = move |token: String| {
6569                let mut builder = self.clone();
6570                builder.0.request = builder.0.request.set_page_token(token);
6571                builder.send()
6572            };
6573            gax::paginator::internal::new_paginator(token, execute)
6574        }
6575
6576        /// Streams each item in the collection.
6577        pub fn by_item(
6578            self,
6579        ) -> impl gax::paginator::ItemPaginator<
6580            crate::model::ListEncryptionConfigsResponse,
6581            gax::error::Error,
6582        > {
6583            use gax::paginator::Paginator;
6584            self.by_page().items()
6585        }
6586
6587        /// Sets the value of [parent][crate::model::ListEncryptionConfigsRequest::parent].
6588        ///
6589        /// This is a **required** field for requests.
6590        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6591            self.0.request.parent = v.into();
6592            self
6593        }
6594
6595        /// Sets the value of [page_size][crate::model::ListEncryptionConfigsRequest::page_size].
6596        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6597            self.0.request.page_size = v.into();
6598            self
6599        }
6600
6601        /// Sets the value of [page_token][crate::model::ListEncryptionConfigsRequest::page_token].
6602        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6603            self.0.request.page_token = v.into();
6604            self
6605        }
6606
6607        /// Sets the value of [filter][crate::model::ListEncryptionConfigsRequest::filter].
6608        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6609            self.0.request.filter = v.into();
6610            self
6611        }
6612
6613        /// Sets the value of [order_by][crate::model::ListEncryptionConfigsRequest::order_by].
6614        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6615            self.0.request.order_by = v.into();
6616            self
6617        }
6618    }
6619
6620    #[doc(hidden)]
6621    impl gax::options::internal::RequestBuilder for ListEncryptionConfigs {
6622        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6623            &mut self.0.options
6624        }
6625    }
6626
6627    /// The request builder for [CmekService::get_encryption_config][crate::client::CmekService::get_encryption_config] calls.
6628    ///
6629    /// # Example
6630    /// ```
6631    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetEncryptionConfig;
6632    /// # async fn sample() -> gax::Result<()> {
6633    ///
6634    /// let builder = prepare_request_builder();
6635    /// let response = builder.send().await?;
6636    /// # Ok(()) }
6637    ///
6638    /// fn prepare_request_builder() -> GetEncryptionConfig {
6639    ///   # panic!();
6640    ///   // ... details omitted ...
6641    /// }
6642    /// ```
6643    #[derive(Clone, Debug)]
6644    pub struct GetEncryptionConfig(RequestBuilder<crate::model::GetEncryptionConfigRequest>);
6645
6646    impl GetEncryptionConfig {
6647        pub(crate) fn new(
6648            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6649        ) -> Self {
6650            Self(RequestBuilder::new(stub))
6651        }
6652
6653        /// Sets the full request, replacing any prior values.
6654        pub fn with_request<V: Into<crate::model::GetEncryptionConfigRequest>>(
6655            mut self,
6656            v: V,
6657        ) -> Self {
6658            self.0.request = v.into();
6659            self
6660        }
6661
6662        /// Sets all the options, replacing any prior values.
6663        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6664            self.0.options = v.into();
6665            self
6666        }
6667
6668        /// Sends the request.
6669        pub async fn send(self) -> Result<crate::model::EncryptionConfig> {
6670            (*self.0.stub)
6671                .get_encryption_config(self.0.request, self.0.options)
6672                .await
6673                .map(gax::response::Response::into_body)
6674        }
6675
6676        /// Sets the value of [name][crate::model::GetEncryptionConfigRequest::name].
6677        ///
6678        /// This is a **required** field for requests.
6679        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6680            self.0.request.name = v.into();
6681            self
6682        }
6683    }
6684
6685    #[doc(hidden)]
6686    impl gax::options::internal::RequestBuilder for GetEncryptionConfig {
6687        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6688            &mut self.0.options
6689        }
6690    }
6691
6692    /// The request builder for [CmekService::list_locations][crate::client::CmekService::list_locations] calls.
6693    ///
6694    /// # Example
6695    /// ```
6696    /// # use google_cloud_dataplex_v1::builder::cmek_service::ListLocations;
6697    /// # async fn sample() -> gax::Result<()> {
6698    /// use gax::paginator::ItemPaginator;
6699    ///
6700    /// let builder = prepare_request_builder();
6701    /// let mut items = builder.by_item();
6702    /// while let Some(result) = items.next().await {
6703    ///   let item = result?;
6704    /// }
6705    /// # Ok(()) }
6706    ///
6707    /// fn prepare_request_builder() -> ListLocations {
6708    ///   # panic!();
6709    ///   // ... details omitted ...
6710    /// }
6711    /// ```
6712    #[derive(Clone, Debug)]
6713    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
6714
6715    impl ListLocations {
6716        pub(crate) fn new(
6717            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6718        ) -> Self {
6719            Self(RequestBuilder::new(stub))
6720        }
6721
6722        /// Sets the full request, replacing any prior values.
6723        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
6724            mut self,
6725            v: V,
6726        ) -> Self {
6727            self.0.request = v.into();
6728            self
6729        }
6730
6731        /// Sets all the options, replacing any prior values.
6732        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6733            self.0.options = v.into();
6734            self
6735        }
6736
6737        /// Sends the request.
6738        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
6739            (*self.0.stub)
6740                .list_locations(self.0.request, self.0.options)
6741                .await
6742                .map(gax::response::Response::into_body)
6743        }
6744
6745        /// Streams each page in the collection.
6746        pub fn by_page(
6747            self,
6748        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
6749        {
6750            use std::clone::Clone;
6751            let token = self.0.request.page_token.clone();
6752            let execute = move |token: String| {
6753                let mut builder = self.clone();
6754                builder.0.request = builder.0.request.set_page_token(token);
6755                builder.send()
6756            };
6757            gax::paginator::internal::new_paginator(token, execute)
6758        }
6759
6760        /// Streams each item in the collection.
6761        pub fn by_item(
6762            self,
6763        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
6764        {
6765            use gax::paginator::Paginator;
6766            self.by_page().items()
6767        }
6768
6769        /// Sets the value of [name][location::model::ListLocationsRequest::name].
6770        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6771            self.0.request.name = v.into();
6772            self
6773        }
6774
6775        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
6776        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6777            self.0.request.filter = v.into();
6778            self
6779        }
6780
6781        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
6782        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6783            self.0.request.page_size = v.into();
6784            self
6785        }
6786
6787        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
6788        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6789            self.0.request.page_token = v.into();
6790            self
6791        }
6792    }
6793
6794    #[doc(hidden)]
6795    impl gax::options::internal::RequestBuilder for ListLocations {
6796        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6797            &mut self.0.options
6798        }
6799    }
6800
6801    /// The request builder for [CmekService::get_location][crate::client::CmekService::get_location] calls.
6802    ///
6803    /// # Example
6804    /// ```
6805    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetLocation;
6806    /// # async fn sample() -> gax::Result<()> {
6807    ///
6808    /// let builder = prepare_request_builder();
6809    /// let response = builder.send().await?;
6810    /// # Ok(()) }
6811    ///
6812    /// fn prepare_request_builder() -> GetLocation {
6813    ///   # panic!();
6814    ///   // ... details omitted ...
6815    /// }
6816    /// ```
6817    #[derive(Clone, Debug)]
6818    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
6819
6820    impl GetLocation {
6821        pub(crate) fn new(
6822            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6823        ) -> Self {
6824            Self(RequestBuilder::new(stub))
6825        }
6826
6827        /// Sets the full request, replacing any prior values.
6828        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
6829            self.0.request = v.into();
6830            self
6831        }
6832
6833        /// Sets all the options, replacing any prior values.
6834        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6835            self.0.options = v.into();
6836            self
6837        }
6838
6839        /// Sends the request.
6840        pub async fn send(self) -> Result<location::model::Location> {
6841            (*self.0.stub)
6842                .get_location(self.0.request, self.0.options)
6843                .await
6844                .map(gax::response::Response::into_body)
6845        }
6846
6847        /// Sets the value of [name][location::model::GetLocationRequest::name].
6848        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6849            self.0.request.name = v.into();
6850            self
6851        }
6852    }
6853
6854    #[doc(hidden)]
6855    impl gax::options::internal::RequestBuilder for GetLocation {
6856        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6857            &mut self.0.options
6858        }
6859    }
6860
6861    /// The request builder for [CmekService::set_iam_policy][crate::client::CmekService::set_iam_policy] calls.
6862    ///
6863    /// # Example
6864    /// ```
6865    /// # use google_cloud_dataplex_v1::builder::cmek_service::SetIamPolicy;
6866    /// # async fn sample() -> gax::Result<()> {
6867    ///
6868    /// let builder = prepare_request_builder();
6869    /// let response = builder.send().await?;
6870    /// # Ok(()) }
6871    ///
6872    /// fn prepare_request_builder() -> SetIamPolicy {
6873    ///   # panic!();
6874    ///   // ... details omitted ...
6875    /// }
6876    /// ```
6877    #[derive(Clone, Debug)]
6878    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
6879
6880    impl SetIamPolicy {
6881        pub(crate) fn new(
6882            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6883        ) -> Self {
6884            Self(RequestBuilder::new(stub))
6885        }
6886
6887        /// Sets the full request, replacing any prior values.
6888        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
6889            self.0.request = v.into();
6890            self
6891        }
6892
6893        /// Sets all the options, replacing any prior values.
6894        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6895            self.0.options = v.into();
6896            self
6897        }
6898
6899        /// Sends the request.
6900        pub async fn send(self) -> Result<iam_v1::model::Policy> {
6901            (*self.0.stub)
6902                .set_iam_policy(self.0.request, self.0.options)
6903                .await
6904                .map(gax::response::Response::into_body)
6905        }
6906
6907        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
6908        ///
6909        /// This is a **required** field for requests.
6910        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6911            self.0.request.resource = v.into();
6912            self
6913        }
6914
6915        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
6916        ///
6917        /// This is a **required** field for requests.
6918        pub fn set_policy<T>(mut self, v: T) -> Self
6919        where
6920            T: std::convert::Into<iam_v1::model::Policy>,
6921        {
6922            self.0.request.policy = std::option::Option::Some(v.into());
6923            self
6924        }
6925
6926        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
6927        ///
6928        /// This is a **required** field for requests.
6929        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
6930        where
6931            T: std::convert::Into<iam_v1::model::Policy>,
6932        {
6933            self.0.request.policy = v.map(|x| x.into());
6934            self
6935        }
6936
6937        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
6938        pub fn set_update_mask<T>(mut self, v: T) -> Self
6939        where
6940            T: std::convert::Into<wkt::FieldMask>,
6941        {
6942            self.0.request.update_mask = std::option::Option::Some(v.into());
6943            self
6944        }
6945
6946        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
6947        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6948        where
6949            T: std::convert::Into<wkt::FieldMask>,
6950        {
6951            self.0.request.update_mask = v.map(|x| x.into());
6952            self
6953        }
6954    }
6955
6956    #[doc(hidden)]
6957    impl gax::options::internal::RequestBuilder for SetIamPolicy {
6958        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6959            &mut self.0.options
6960        }
6961    }
6962
6963    /// The request builder for [CmekService::get_iam_policy][crate::client::CmekService::get_iam_policy] calls.
6964    ///
6965    /// # Example
6966    /// ```
6967    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetIamPolicy;
6968    /// # async fn sample() -> gax::Result<()> {
6969    ///
6970    /// let builder = prepare_request_builder();
6971    /// let response = builder.send().await?;
6972    /// # Ok(()) }
6973    ///
6974    /// fn prepare_request_builder() -> GetIamPolicy {
6975    ///   # panic!();
6976    ///   // ... details omitted ...
6977    /// }
6978    /// ```
6979    #[derive(Clone, Debug)]
6980    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
6981
6982    impl GetIamPolicy {
6983        pub(crate) fn new(
6984            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6985        ) -> Self {
6986            Self(RequestBuilder::new(stub))
6987        }
6988
6989        /// Sets the full request, replacing any prior values.
6990        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
6991            self.0.request = v.into();
6992            self
6993        }
6994
6995        /// Sets all the options, replacing any prior values.
6996        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6997            self.0.options = v.into();
6998            self
6999        }
7000
7001        /// Sends the request.
7002        pub async fn send(self) -> Result<iam_v1::model::Policy> {
7003            (*self.0.stub)
7004                .get_iam_policy(self.0.request, self.0.options)
7005                .await
7006                .map(gax::response::Response::into_body)
7007        }
7008
7009        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
7010        ///
7011        /// This is a **required** field for requests.
7012        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7013            self.0.request.resource = v.into();
7014            self
7015        }
7016
7017        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
7018        pub fn set_options<T>(mut self, v: T) -> Self
7019        where
7020            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
7021        {
7022            self.0.request.options = std::option::Option::Some(v.into());
7023            self
7024        }
7025
7026        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
7027        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
7028        where
7029            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
7030        {
7031            self.0.request.options = v.map(|x| x.into());
7032            self
7033        }
7034    }
7035
7036    #[doc(hidden)]
7037    impl gax::options::internal::RequestBuilder for GetIamPolicy {
7038        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7039            &mut self.0.options
7040        }
7041    }
7042
7043    /// The request builder for [CmekService::test_iam_permissions][crate::client::CmekService::test_iam_permissions] calls.
7044    ///
7045    /// # Example
7046    /// ```
7047    /// # use google_cloud_dataplex_v1::builder::cmek_service::TestIamPermissions;
7048    /// # async fn sample() -> gax::Result<()> {
7049    ///
7050    /// let builder = prepare_request_builder();
7051    /// let response = builder.send().await?;
7052    /// # Ok(()) }
7053    ///
7054    /// fn prepare_request_builder() -> TestIamPermissions {
7055    ///   # panic!();
7056    ///   // ... details omitted ...
7057    /// }
7058    /// ```
7059    #[derive(Clone, Debug)]
7060    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
7061
7062    impl TestIamPermissions {
7063        pub(crate) fn new(
7064            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7065        ) -> Self {
7066            Self(RequestBuilder::new(stub))
7067        }
7068
7069        /// Sets the full request, replacing any prior values.
7070        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
7071            mut self,
7072            v: V,
7073        ) -> Self {
7074            self.0.request = v.into();
7075            self
7076        }
7077
7078        /// Sets all the options, replacing any prior values.
7079        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7080            self.0.options = v.into();
7081            self
7082        }
7083
7084        /// Sends the request.
7085        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
7086            (*self.0.stub)
7087                .test_iam_permissions(self.0.request, self.0.options)
7088                .await
7089                .map(gax::response::Response::into_body)
7090        }
7091
7092        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
7093        ///
7094        /// This is a **required** field for requests.
7095        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7096            self.0.request.resource = v.into();
7097            self
7098        }
7099
7100        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
7101        ///
7102        /// This is a **required** field for requests.
7103        pub fn set_permissions<T, V>(mut self, v: T) -> Self
7104        where
7105            T: std::iter::IntoIterator<Item = V>,
7106            V: std::convert::Into<std::string::String>,
7107        {
7108            use std::iter::Iterator;
7109            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
7110            self
7111        }
7112    }
7113
7114    #[doc(hidden)]
7115    impl gax::options::internal::RequestBuilder for TestIamPermissions {
7116        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7117            &mut self.0.options
7118        }
7119    }
7120
7121    /// The request builder for [CmekService::list_operations][crate::client::CmekService::list_operations] calls.
7122    ///
7123    /// # Example
7124    /// ```
7125    /// # use google_cloud_dataplex_v1::builder::cmek_service::ListOperations;
7126    /// # async fn sample() -> gax::Result<()> {
7127    /// use gax::paginator::ItemPaginator;
7128    ///
7129    /// let builder = prepare_request_builder();
7130    /// let mut items = builder.by_item();
7131    /// while let Some(result) = items.next().await {
7132    ///   let item = result?;
7133    /// }
7134    /// # Ok(()) }
7135    ///
7136    /// fn prepare_request_builder() -> ListOperations {
7137    ///   # panic!();
7138    ///   // ... details omitted ...
7139    /// }
7140    /// ```
7141    #[derive(Clone, Debug)]
7142    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
7143
7144    impl ListOperations {
7145        pub(crate) fn new(
7146            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7147        ) -> Self {
7148            Self(RequestBuilder::new(stub))
7149        }
7150
7151        /// Sets the full request, replacing any prior values.
7152        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
7153            mut self,
7154            v: V,
7155        ) -> Self {
7156            self.0.request = v.into();
7157            self
7158        }
7159
7160        /// Sets all the options, replacing any prior values.
7161        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7162            self.0.options = v.into();
7163            self
7164        }
7165
7166        /// Sends the request.
7167        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
7168            (*self.0.stub)
7169                .list_operations(self.0.request, self.0.options)
7170                .await
7171                .map(gax::response::Response::into_body)
7172        }
7173
7174        /// Streams each page in the collection.
7175        pub fn by_page(
7176            self,
7177        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
7178        {
7179            use std::clone::Clone;
7180            let token = self.0.request.page_token.clone();
7181            let execute = move |token: String| {
7182                let mut builder = self.clone();
7183                builder.0.request = builder.0.request.set_page_token(token);
7184                builder.send()
7185            };
7186            gax::paginator::internal::new_paginator(token, execute)
7187        }
7188
7189        /// Streams each item in the collection.
7190        pub fn by_item(
7191            self,
7192        ) -> impl gax::paginator::ItemPaginator<
7193            longrunning::model::ListOperationsResponse,
7194            gax::error::Error,
7195        > {
7196            use gax::paginator::Paginator;
7197            self.by_page().items()
7198        }
7199
7200        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
7201        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7202            self.0.request.name = v.into();
7203            self
7204        }
7205
7206        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
7207        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7208            self.0.request.filter = v.into();
7209            self
7210        }
7211
7212        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
7213        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7214            self.0.request.page_size = v.into();
7215            self
7216        }
7217
7218        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
7219        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7220            self.0.request.page_token = v.into();
7221            self
7222        }
7223
7224        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
7225        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
7226            self.0.request.return_partial_success = v.into();
7227            self
7228        }
7229    }
7230
7231    #[doc(hidden)]
7232    impl gax::options::internal::RequestBuilder for ListOperations {
7233        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7234            &mut self.0.options
7235        }
7236    }
7237
7238    /// The request builder for [CmekService::get_operation][crate::client::CmekService::get_operation] calls.
7239    ///
7240    /// # Example
7241    /// ```
7242    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetOperation;
7243    /// # async fn sample() -> gax::Result<()> {
7244    ///
7245    /// let builder = prepare_request_builder();
7246    /// let response = builder.send().await?;
7247    /// # Ok(()) }
7248    ///
7249    /// fn prepare_request_builder() -> GetOperation {
7250    ///   # panic!();
7251    ///   // ... details omitted ...
7252    /// }
7253    /// ```
7254    #[derive(Clone, Debug)]
7255    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
7256
7257    impl GetOperation {
7258        pub(crate) fn new(
7259            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7260        ) -> Self {
7261            Self(RequestBuilder::new(stub))
7262        }
7263
7264        /// Sets the full request, replacing any prior values.
7265        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
7266            mut self,
7267            v: V,
7268        ) -> Self {
7269            self.0.request = v.into();
7270            self
7271        }
7272
7273        /// Sets all the options, replacing any prior values.
7274        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7275            self.0.options = v.into();
7276            self
7277        }
7278
7279        /// Sends the request.
7280        pub async fn send(self) -> Result<longrunning::model::Operation> {
7281            (*self.0.stub)
7282                .get_operation(self.0.request, self.0.options)
7283                .await
7284                .map(gax::response::Response::into_body)
7285        }
7286
7287        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
7288        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7289            self.0.request.name = v.into();
7290            self
7291        }
7292    }
7293
7294    #[doc(hidden)]
7295    impl gax::options::internal::RequestBuilder for GetOperation {
7296        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7297            &mut self.0.options
7298        }
7299    }
7300
7301    /// The request builder for [CmekService::delete_operation][crate::client::CmekService::delete_operation] calls.
7302    ///
7303    /// # Example
7304    /// ```
7305    /// # use google_cloud_dataplex_v1::builder::cmek_service::DeleteOperation;
7306    /// # async fn sample() -> gax::Result<()> {
7307    ///
7308    /// let builder = prepare_request_builder();
7309    /// let response = builder.send().await?;
7310    /// # Ok(()) }
7311    ///
7312    /// fn prepare_request_builder() -> DeleteOperation {
7313    ///   # panic!();
7314    ///   // ... details omitted ...
7315    /// }
7316    /// ```
7317    #[derive(Clone, Debug)]
7318    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
7319
7320    impl DeleteOperation {
7321        pub(crate) fn new(
7322            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7323        ) -> Self {
7324            Self(RequestBuilder::new(stub))
7325        }
7326
7327        /// Sets the full request, replacing any prior values.
7328        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
7329            mut self,
7330            v: V,
7331        ) -> Self {
7332            self.0.request = v.into();
7333            self
7334        }
7335
7336        /// Sets all the options, replacing any prior values.
7337        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7338            self.0.options = v.into();
7339            self
7340        }
7341
7342        /// Sends the request.
7343        pub async fn send(self) -> Result<()> {
7344            (*self.0.stub)
7345                .delete_operation(self.0.request, self.0.options)
7346                .await
7347                .map(gax::response::Response::into_body)
7348        }
7349
7350        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
7351        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7352            self.0.request.name = v.into();
7353            self
7354        }
7355    }
7356
7357    #[doc(hidden)]
7358    impl gax::options::internal::RequestBuilder for DeleteOperation {
7359        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7360            &mut self.0.options
7361        }
7362    }
7363
7364    /// The request builder for [CmekService::cancel_operation][crate::client::CmekService::cancel_operation] calls.
7365    ///
7366    /// # Example
7367    /// ```
7368    /// # use google_cloud_dataplex_v1::builder::cmek_service::CancelOperation;
7369    /// # async fn sample() -> gax::Result<()> {
7370    ///
7371    /// let builder = prepare_request_builder();
7372    /// let response = builder.send().await?;
7373    /// # Ok(()) }
7374    ///
7375    /// fn prepare_request_builder() -> CancelOperation {
7376    ///   # panic!();
7377    ///   // ... details omitted ...
7378    /// }
7379    /// ```
7380    #[derive(Clone, Debug)]
7381    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
7382
7383    impl CancelOperation {
7384        pub(crate) fn new(
7385            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7386        ) -> Self {
7387            Self(RequestBuilder::new(stub))
7388        }
7389
7390        /// Sets the full request, replacing any prior values.
7391        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
7392            mut self,
7393            v: V,
7394        ) -> Self {
7395            self.0.request = v.into();
7396            self
7397        }
7398
7399        /// Sets all the options, replacing any prior values.
7400        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7401            self.0.options = v.into();
7402            self
7403        }
7404
7405        /// Sends the request.
7406        pub async fn send(self) -> Result<()> {
7407            (*self.0.stub)
7408                .cancel_operation(self.0.request, self.0.options)
7409                .await
7410                .map(gax::response::Response::into_body)
7411        }
7412
7413        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
7414        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7415            self.0.request.name = v.into();
7416            self
7417        }
7418    }
7419
7420    #[doc(hidden)]
7421    impl gax::options::internal::RequestBuilder for CancelOperation {
7422        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7423            &mut self.0.options
7424        }
7425    }
7426}
7427
7428pub mod content_service {
7429    use crate::Result;
7430
7431    /// A builder for [ContentService][crate::client::ContentService].
7432    ///
7433    /// ```
7434    /// # async fn sample() -> gax::client_builder::Result<()> {
7435    /// # use google_cloud_dataplex_v1::*;
7436    /// # use builder::content_service::ClientBuilder;
7437    /// # use client::ContentService;
7438    /// let builder : ClientBuilder = ContentService::builder();
7439    /// let client = builder
7440    ///     .with_endpoint("https://dataplex.googleapis.com")
7441    ///     .build().await?;
7442    /// # Ok(()) }
7443    /// ```
7444    pub type ClientBuilder =
7445        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
7446
7447    pub(crate) mod client {
7448        use super::super::super::client::ContentService;
7449        pub struct Factory;
7450        impl gax::client_builder::internal::ClientFactory for Factory {
7451            type Client = ContentService;
7452            type Credentials = gaxi::options::Credentials;
7453            async fn build(
7454                self,
7455                config: gaxi::options::ClientConfig,
7456            ) -> gax::client_builder::Result<Self::Client> {
7457                Self::Client::new(config).await
7458            }
7459        }
7460    }
7461
7462    /// Common implementation for [crate::client::ContentService] request builders.
7463    #[derive(Clone, Debug)]
7464    pub(crate) struct RequestBuilder<R: std::default::Default> {
7465        stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7466        request: R,
7467        options: gax::options::RequestOptions,
7468    }
7469
7470    impl<R> RequestBuilder<R>
7471    where
7472        R: std::default::Default,
7473    {
7474        pub(crate) fn new(
7475            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7476        ) -> Self {
7477            Self {
7478                stub,
7479                request: R::default(),
7480                options: gax::options::RequestOptions::default(),
7481            }
7482        }
7483    }
7484
7485    /// The request builder for [ContentService::create_content][crate::client::ContentService::create_content] calls.
7486    ///
7487    /// # Example
7488    /// ```
7489    /// # use google_cloud_dataplex_v1::builder::content_service::CreateContent;
7490    /// # async fn sample() -> gax::Result<()> {
7491    ///
7492    /// let builder = prepare_request_builder();
7493    /// let response = builder.send().await?;
7494    /// # Ok(()) }
7495    ///
7496    /// fn prepare_request_builder() -> CreateContent {
7497    ///   # panic!();
7498    ///   // ... details omitted ...
7499    /// }
7500    /// ```
7501    #[derive(Clone, Debug)]
7502    pub struct CreateContent(RequestBuilder<crate::model::CreateContentRequest>);
7503
7504    impl CreateContent {
7505        pub(crate) fn new(
7506            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7507        ) -> Self {
7508            Self(RequestBuilder::new(stub))
7509        }
7510
7511        /// Sets the full request, replacing any prior values.
7512        pub fn with_request<V: Into<crate::model::CreateContentRequest>>(mut self, v: V) -> Self {
7513            self.0.request = v.into();
7514            self
7515        }
7516
7517        /// Sets all the options, replacing any prior values.
7518        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7519            self.0.options = v.into();
7520            self
7521        }
7522
7523        /// Sends the request.
7524        pub async fn send(self) -> Result<crate::model::Content> {
7525            (*self.0.stub)
7526                .create_content(self.0.request, self.0.options)
7527                .await
7528                .map(gax::response::Response::into_body)
7529        }
7530
7531        /// Sets the value of [parent][crate::model::CreateContentRequest::parent].
7532        ///
7533        /// This is a **required** field for requests.
7534        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7535            self.0.request.parent = v.into();
7536            self
7537        }
7538
7539        /// Sets the value of [content][crate::model::CreateContentRequest::content].
7540        ///
7541        /// This is a **required** field for requests.
7542        pub fn set_content<T>(mut self, v: T) -> Self
7543        where
7544            T: std::convert::Into<crate::model::Content>,
7545        {
7546            self.0.request.content = std::option::Option::Some(v.into());
7547            self
7548        }
7549
7550        /// Sets or clears the value of [content][crate::model::CreateContentRequest::content].
7551        ///
7552        /// This is a **required** field for requests.
7553        pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
7554        where
7555            T: std::convert::Into<crate::model::Content>,
7556        {
7557            self.0.request.content = v.map(|x| x.into());
7558            self
7559        }
7560
7561        /// Sets the value of [validate_only][crate::model::CreateContentRequest::validate_only].
7562        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
7563            self.0.request.validate_only = v.into();
7564            self
7565        }
7566    }
7567
7568    #[doc(hidden)]
7569    impl gax::options::internal::RequestBuilder for CreateContent {
7570        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7571            &mut self.0.options
7572        }
7573    }
7574
7575    /// The request builder for [ContentService::update_content][crate::client::ContentService::update_content] calls.
7576    ///
7577    /// # Example
7578    /// ```
7579    /// # use google_cloud_dataplex_v1::builder::content_service::UpdateContent;
7580    /// # async fn sample() -> gax::Result<()> {
7581    ///
7582    /// let builder = prepare_request_builder();
7583    /// let response = builder.send().await?;
7584    /// # Ok(()) }
7585    ///
7586    /// fn prepare_request_builder() -> UpdateContent {
7587    ///   # panic!();
7588    ///   // ... details omitted ...
7589    /// }
7590    /// ```
7591    #[derive(Clone, Debug)]
7592    pub struct UpdateContent(RequestBuilder<crate::model::UpdateContentRequest>);
7593
7594    impl UpdateContent {
7595        pub(crate) fn new(
7596            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7597        ) -> Self {
7598            Self(RequestBuilder::new(stub))
7599        }
7600
7601        /// Sets the full request, replacing any prior values.
7602        pub fn with_request<V: Into<crate::model::UpdateContentRequest>>(mut self, v: V) -> Self {
7603            self.0.request = v.into();
7604            self
7605        }
7606
7607        /// Sets all the options, replacing any prior values.
7608        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7609            self.0.options = v.into();
7610            self
7611        }
7612
7613        /// Sends the request.
7614        pub async fn send(self) -> Result<crate::model::Content> {
7615            (*self.0.stub)
7616                .update_content(self.0.request, self.0.options)
7617                .await
7618                .map(gax::response::Response::into_body)
7619        }
7620
7621        /// Sets the value of [update_mask][crate::model::UpdateContentRequest::update_mask].
7622        ///
7623        /// This is a **required** field for requests.
7624        pub fn set_update_mask<T>(mut self, v: T) -> Self
7625        where
7626            T: std::convert::Into<wkt::FieldMask>,
7627        {
7628            self.0.request.update_mask = std::option::Option::Some(v.into());
7629            self
7630        }
7631
7632        /// Sets or clears the value of [update_mask][crate::model::UpdateContentRequest::update_mask].
7633        ///
7634        /// This is a **required** field for requests.
7635        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7636        where
7637            T: std::convert::Into<wkt::FieldMask>,
7638        {
7639            self.0.request.update_mask = v.map(|x| x.into());
7640            self
7641        }
7642
7643        /// Sets the value of [content][crate::model::UpdateContentRequest::content].
7644        ///
7645        /// This is a **required** field for requests.
7646        pub fn set_content<T>(mut self, v: T) -> Self
7647        where
7648            T: std::convert::Into<crate::model::Content>,
7649        {
7650            self.0.request.content = std::option::Option::Some(v.into());
7651            self
7652        }
7653
7654        /// Sets or clears the value of [content][crate::model::UpdateContentRequest::content].
7655        ///
7656        /// This is a **required** field for requests.
7657        pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
7658        where
7659            T: std::convert::Into<crate::model::Content>,
7660        {
7661            self.0.request.content = v.map(|x| x.into());
7662            self
7663        }
7664
7665        /// Sets the value of [validate_only][crate::model::UpdateContentRequest::validate_only].
7666        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
7667            self.0.request.validate_only = v.into();
7668            self
7669        }
7670    }
7671
7672    #[doc(hidden)]
7673    impl gax::options::internal::RequestBuilder for UpdateContent {
7674        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7675            &mut self.0.options
7676        }
7677    }
7678
7679    /// The request builder for [ContentService::delete_content][crate::client::ContentService::delete_content] calls.
7680    ///
7681    /// # Example
7682    /// ```
7683    /// # use google_cloud_dataplex_v1::builder::content_service::DeleteContent;
7684    /// # async fn sample() -> gax::Result<()> {
7685    ///
7686    /// let builder = prepare_request_builder();
7687    /// let response = builder.send().await?;
7688    /// # Ok(()) }
7689    ///
7690    /// fn prepare_request_builder() -> DeleteContent {
7691    ///   # panic!();
7692    ///   // ... details omitted ...
7693    /// }
7694    /// ```
7695    #[derive(Clone, Debug)]
7696    pub struct DeleteContent(RequestBuilder<crate::model::DeleteContentRequest>);
7697
7698    impl DeleteContent {
7699        pub(crate) fn new(
7700            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7701        ) -> Self {
7702            Self(RequestBuilder::new(stub))
7703        }
7704
7705        /// Sets the full request, replacing any prior values.
7706        pub fn with_request<V: Into<crate::model::DeleteContentRequest>>(mut self, v: V) -> Self {
7707            self.0.request = v.into();
7708            self
7709        }
7710
7711        /// Sets all the options, replacing any prior values.
7712        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7713            self.0.options = v.into();
7714            self
7715        }
7716
7717        /// Sends the request.
7718        pub async fn send(self) -> Result<()> {
7719            (*self.0.stub)
7720                .delete_content(self.0.request, self.0.options)
7721                .await
7722                .map(gax::response::Response::into_body)
7723        }
7724
7725        /// Sets the value of [name][crate::model::DeleteContentRequest::name].
7726        ///
7727        /// This is a **required** field for requests.
7728        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7729            self.0.request.name = v.into();
7730            self
7731        }
7732    }
7733
7734    #[doc(hidden)]
7735    impl gax::options::internal::RequestBuilder for DeleteContent {
7736        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7737            &mut self.0.options
7738        }
7739    }
7740
7741    /// The request builder for [ContentService::get_content][crate::client::ContentService::get_content] calls.
7742    ///
7743    /// # Example
7744    /// ```
7745    /// # use google_cloud_dataplex_v1::builder::content_service::GetContent;
7746    /// # async fn sample() -> gax::Result<()> {
7747    ///
7748    /// let builder = prepare_request_builder();
7749    /// let response = builder.send().await?;
7750    /// # Ok(()) }
7751    ///
7752    /// fn prepare_request_builder() -> GetContent {
7753    ///   # panic!();
7754    ///   // ... details omitted ...
7755    /// }
7756    /// ```
7757    #[derive(Clone, Debug)]
7758    pub struct GetContent(RequestBuilder<crate::model::GetContentRequest>);
7759
7760    impl GetContent {
7761        pub(crate) fn new(
7762            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7763        ) -> Self {
7764            Self(RequestBuilder::new(stub))
7765        }
7766
7767        /// Sets the full request, replacing any prior values.
7768        pub fn with_request<V: Into<crate::model::GetContentRequest>>(mut self, v: V) -> Self {
7769            self.0.request = v.into();
7770            self
7771        }
7772
7773        /// Sets all the options, replacing any prior values.
7774        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7775            self.0.options = v.into();
7776            self
7777        }
7778
7779        /// Sends the request.
7780        pub async fn send(self) -> Result<crate::model::Content> {
7781            (*self.0.stub)
7782                .get_content(self.0.request, self.0.options)
7783                .await
7784                .map(gax::response::Response::into_body)
7785        }
7786
7787        /// Sets the value of [name][crate::model::GetContentRequest::name].
7788        ///
7789        /// This is a **required** field for requests.
7790        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7791            self.0.request.name = v.into();
7792            self
7793        }
7794
7795        /// Sets the value of [view][crate::model::GetContentRequest::view].
7796        pub fn set_view<T: Into<crate::model::get_content_request::ContentView>>(
7797            mut self,
7798            v: T,
7799        ) -> Self {
7800            self.0.request.view = v.into();
7801            self
7802        }
7803    }
7804
7805    #[doc(hidden)]
7806    impl gax::options::internal::RequestBuilder for GetContent {
7807        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7808            &mut self.0.options
7809        }
7810    }
7811
7812    /// The request builder for [ContentService::get_iam_policy][crate::client::ContentService::get_iam_policy] calls.
7813    ///
7814    /// # Example
7815    /// ```
7816    /// # use google_cloud_dataplex_v1::builder::content_service::GetIamPolicy;
7817    /// # async fn sample() -> gax::Result<()> {
7818    ///
7819    /// let builder = prepare_request_builder();
7820    /// let response = builder.send().await?;
7821    /// # Ok(()) }
7822    ///
7823    /// fn prepare_request_builder() -> GetIamPolicy {
7824    ///   # panic!();
7825    ///   // ... details omitted ...
7826    /// }
7827    /// ```
7828    #[derive(Clone, Debug)]
7829    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
7830
7831    impl GetIamPolicy {
7832        pub(crate) fn new(
7833            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7834        ) -> Self {
7835            Self(RequestBuilder::new(stub))
7836        }
7837
7838        /// Sets the full request, replacing any prior values.
7839        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
7840            self.0.request = v.into();
7841            self
7842        }
7843
7844        /// Sets all the options, replacing any prior values.
7845        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7846            self.0.options = v.into();
7847            self
7848        }
7849
7850        /// Sends the request.
7851        pub async fn send(self) -> Result<iam_v1::model::Policy> {
7852            (*self.0.stub)
7853                .get_iam_policy(self.0.request, self.0.options)
7854                .await
7855                .map(gax::response::Response::into_body)
7856        }
7857
7858        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
7859        ///
7860        /// This is a **required** field for requests.
7861        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7862            self.0.request.resource = v.into();
7863            self
7864        }
7865
7866        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
7867        pub fn set_options<T>(mut self, v: T) -> Self
7868        where
7869            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
7870        {
7871            self.0.request.options = std::option::Option::Some(v.into());
7872            self
7873        }
7874
7875        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
7876        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
7877        where
7878            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
7879        {
7880            self.0.request.options = v.map(|x| x.into());
7881            self
7882        }
7883    }
7884
7885    #[doc(hidden)]
7886    impl gax::options::internal::RequestBuilder for GetIamPolicy {
7887        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7888            &mut self.0.options
7889        }
7890    }
7891
7892    /// The request builder for [ContentService::set_iam_policy][crate::client::ContentService::set_iam_policy] calls.
7893    ///
7894    /// # Example
7895    /// ```
7896    /// # use google_cloud_dataplex_v1::builder::content_service::SetIamPolicy;
7897    /// # async fn sample() -> gax::Result<()> {
7898    ///
7899    /// let builder = prepare_request_builder();
7900    /// let response = builder.send().await?;
7901    /// # Ok(()) }
7902    ///
7903    /// fn prepare_request_builder() -> SetIamPolicy {
7904    ///   # panic!();
7905    ///   // ... details omitted ...
7906    /// }
7907    /// ```
7908    #[derive(Clone, Debug)]
7909    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
7910
7911    impl SetIamPolicy {
7912        pub(crate) fn new(
7913            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7914        ) -> Self {
7915            Self(RequestBuilder::new(stub))
7916        }
7917
7918        /// Sets the full request, replacing any prior values.
7919        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
7920            self.0.request = v.into();
7921            self
7922        }
7923
7924        /// Sets all the options, replacing any prior values.
7925        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7926            self.0.options = v.into();
7927            self
7928        }
7929
7930        /// Sends the request.
7931        pub async fn send(self) -> Result<iam_v1::model::Policy> {
7932            (*self.0.stub)
7933                .set_iam_policy(self.0.request, self.0.options)
7934                .await
7935                .map(gax::response::Response::into_body)
7936        }
7937
7938        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
7939        ///
7940        /// This is a **required** field for requests.
7941        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7942            self.0.request.resource = v.into();
7943            self
7944        }
7945
7946        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
7947        ///
7948        /// This is a **required** field for requests.
7949        pub fn set_policy<T>(mut self, v: T) -> Self
7950        where
7951            T: std::convert::Into<iam_v1::model::Policy>,
7952        {
7953            self.0.request.policy = std::option::Option::Some(v.into());
7954            self
7955        }
7956
7957        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
7958        ///
7959        /// This is a **required** field for requests.
7960        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
7961        where
7962            T: std::convert::Into<iam_v1::model::Policy>,
7963        {
7964            self.0.request.policy = v.map(|x| x.into());
7965            self
7966        }
7967
7968        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
7969        pub fn set_update_mask<T>(mut self, v: T) -> Self
7970        where
7971            T: std::convert::Into<wkt::FieldMask>,
7972        {
7973            self.0.request.update_mask = std::option::Option::Some(v.into());
7974            self
7975        }
7976
7977        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
7978        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7979        where
7980            T: std::convert::Into<wkt::FieldMask>,
7981        {
7982            self.0.request.update_mask = v.map(|x| x.into());
7983            self
7984        }
7985    }
7986
7987    #[doc(hidden)]
7988    impl gax::options::internal::RequestBuilder for SetIamPolicy {
7989        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7990            &mut self.0.options
7991        }
7992    }
7993
7994    /// The request builder for [ContentService::test_iam_permissions][crate::client::ContentService::test_iam_permissions] calls.
7995    ///
7996    /// # Example
7997    /// ```
7998    /// # use google_cloud_dataplex_v1::builder::content_service::TestIamPermissions;
7999    /// # async fn sample() -> gax::Result<()> {
8000    ///
8001    /// let builder = prepare_request_builder();
8002    /// let response = builder.send().await?;
8003    /// # Ok(()) }
8004    ///
8005    /// fn prepare_request_builder() -> TestIamPermissions {
8006    ///   # panic!();
8007    ///   // ... details omitted ...
8008    /// }
8009    /// ```
8010    #[derive(Clone, Debug)]
8011    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
8012
8013    impl TestIamPermissions {
8014        pub(crate) fn new(
8015            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8016        ) -> Self {
8017            Self(RequestBuilder::new(stub))
8018        }
8019
8020        /// Sets the full request, replacing any prior values.
8021        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
8022            mut self,
8023            v: V,
8024        ) -> Self {
8025            self.0.request = v.into();
8026            self
8027        }
8028
8029        /// Sets all the options, replacing any prior values.
8030        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8031            self.0.options = v.into();
8032            self
8033        }
8034
8035        /// Sends the request.
8036        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
8037            (*self.0.stub)
8038                .test_iam_permissions(self.0.request, self.0.options)
8039                .await
8040                .map(gax::response::Response::into_body)
8041        }
8042
8043        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
8044        ///
8045        /// This is a **required** field for requests.
8046        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8047            self.0.request.resource = v.into();
8048            self
8049        }
8050
8051        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
8052        ///
8053        /// This is a **required** field for requests.
8054        pub fn set_permissions<T, V>(mut self, v: T) -> Self
8055        where
8056            T: std::iter::IntoIterator<Item = V>,
8057            V: std::convert::Into<std::string::String>,
8058        {
8059            use std::iter::Iterator;
8060            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
8061            self
8062        }
8063    }
8064
8065    #[doc(hidden)]
8066    impl gax::options::internal::RequestBuilder for TestIamPermissions {
8067        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8068            &mut self.0.options
8069        }
8070    }
8071
8072    /// The request builder for [ContentService::list_content][crate::client::ContentService::list_content] calls.
8073    ///
8074    /// # Example
8075    /// ```
8076    /// # use google_cloud_dataplex_v1::builder::content_service::ListContent;
8077    /// # async fn sample() -> gax::Result<()> {
8078    /// use gax::paginator::ItemPaginator;
8079    ///
8080    /// let builder = prepare_request_builder();
8081    /// let mut items = builder.by_item();
8082    /// while let Some(result) = items.next().await {
8083    ///   let item = result?;
8084    /// }
8085    /// # Ok(()) }
8086    ///
8087    /// fn prepare_request_builder() -> ListContent {
8088    ///   # panic!();
8089    ///   // ... details omitted ...
8090    /// }
8091    /// ```
8092    #[derive(Clone, Debug)]
8093    pub struct ListContent(RequestBuilder<crate::model::ListContentRequest>);
8094
8095    impl ListContent {
8096        pub(crate) fn new(
8097            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8098        ) -> Self {
8099            Self(RequestBuilder::new(stub))
8100        }
8101
8102        /// Sets the full request, replacing any prior values.
8103        pub fn with_request<V: Into<crate::model::ListContentRequest>>(mut self, v: V) -> Self {
8104            self.0.request = v.into();
8105            self
8106        }
8107
8108        /// Sets all the options, replacing any prior values.
8109        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8110            self.0.options = v.into();
8111            self
8112        }
8113
8114        /// Sends the request.
8115        pub async fn send(self) -> Result<crate::model::ListContentResponse> {
8116            (*self.0.stub)
8117                .list_content(self.0.request, self.0.options)
8118                .await
8119                .map(gax::response::Response::into_body)
8120        }
8121
8122        /// Streams each page in the collection.
8123        pub fn by_page(
8124            self,
8125        ) -> impl gax::paginator::Paginator<crate::model::ListContentResponse, gax::error::Error>
8126        {
8127            use std::clone::Clone;
8128            let token = self.0.request.page_token.clone();
8129            let execute = move |token: String| {
8130                let mut builder = self.clone();
8131                builder.0.request = builder.0.request.set_page_token(token);
8132                builder.send()
8133            };
8134            gax::paginator::internal::new_paginator(token, execute)
8135        }
8136
8137        /// Streams each item in the collection.
8138        pub fn by_item(
8139            self,
8140        ) -> impl gax::paginator::ItemPaginator<crate::model::ListContentResponse, gax::error::Error>
8141        {
8142            use gax::paginator::Paginator;
8143            self.by_page().items()
8144        }
8145
8146        /// Sets the value of [parent][crate::model::ListContentRequest::parent].
8147        ///
8148        /// This is a **required** field for requests.
8149        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
8150            self.0.request.parent = v.into();
8151            self
8152        }
8153
8154        /// Sets the value of [page_size][crate::model::ListContentRequest::page_size].
8155        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8156            self.0.request.page_size = v.into();
8157            self
8158        }
8159
8160        /// Sets the value of [page_token][crate::model::ListContentRequest::page_token].
8161        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8162            self.0.request.page_token = v.into();
8163            self
8164        }
8165
8166        /// Sets the value of [filter][crate::model::ListContentRequest::filter].
8167        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8168            self.0.request.filter = v.into();
8169            self
8170        }
8171    }
8172
8173    #[doc(hidden)]
8174    impl gax::options::internal::RequestBuilder for ListContent {
8175        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8176            &mut self.0.options
8177        }
8178    }
8179
8180    /// The request builder for [ContentService::list_locations][crate::client::ContentService::list_locations] calls.
8181    ///
8182    /// # Example
8183    /// ```
8184    /// # use google_cloud_dataplex_v1::builder::content_service::ListLocations;
8185    /// # async fn sample() -> gax::Result<()> {
8186    /// use gax::paginator::ItemPaginator;
8187    ///
8188    /// let builder = prepare_request_builder();
8189    /// let mut items = builder.by_item();
8190    /// while let Some(result) = items.next().await {
8191    ///   let item = result?;
8192    /// }
8193    /// # Ok(()) }
8194    ///
8195    /// fn prepare_request_builder() -> ListLocations {
8196    ///   # panic!();
8197    ///   // ... details omitted ...
8198    /// }
8199    /// ```
8200    #[derive(Clone, Debug)]
8201    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
8202
8203    impl ListLocations {
8204        pub(crate) fn new(
8205            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8206        ) -> Self {
8207            Self(RequestBuilder::new(stub))
8208        }
8209
8210        /// Sets the full request, replacing any prior values.
8211        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
8212            mut self,
8213            v: V,
8214        ) -> Self {
8215            self.0.request = v.into();
8216            self
8217        }
8218
8219        /// Sets all the options, replacing any prior values.
8220        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8221            self.0.options = v.into();
8222            self
8223        }
8224
8225        /// Sends the request.
8226        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
8227            (*self.0.stub)
8228                .list_locations(self.0.request, self.0.options)
8229                .await
8230                .map(gax::response::Response::into_body)
8231        }
8232
8233        /// Streams each page in the collection.
8234        pub fn by_page(
8235            self,
8236        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
8237        {
8238            use std::clone::Clone;
8239            let token = self.0.request.page_token.clone();
8240            let execute = move |token: String| {
8241                let mut builder = self.clone();
8242                builder.0.request = builder.0.request.set_page_token(token);
8243                builder.send()
8244            };
8245            gax::paginator::internal::new_paginator(token, execute)
8246        }
8247
8248        /// Streams each item in the collection.
8249        pub fn by_item(
8250            self,
8251        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
8252        {
8253            use gax::paginator::Paginator;
8254            self.by_page().items()
8255        }
8256
8257        /// Sets the value of [name][location::model::ListLocationsRequest::name].
8258        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8259            self.0.request.name = v.into();
8260            self
8261        }
8262
8263        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
8264        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8265            self.0.request.filter = v.into();
8266            self
8267        }
8268
8269        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
8270        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8271            self.0.request.page_size = v.into();
8272            self
8273        }
8274
8275        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
8276        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8277            self.0.request.page_token = v.into();
8278            self
8279        }
8280    }
8281
8282    #[doc(hidden)]
8283    impl gax::options::internal::RequestBuilder for ListLocations {
8284        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8285            &mut self.0.options
8286        }
8287    }
8288
8289    /// The request builder for [ContentService::get_location][crate::client::ContentService::get_location] calls.
8290    ///
8291    /// # Example
8292    /// ```
8293    /// # use google_cloud_dataplex_v1::builder::content_service::GetLocation;
8294    /// # async fn sample() -> gax::Result<()> {
8295    ///
8296    /// let builder = prepare_request_builder();
8297    /// let response = builder.send().await?;
8298    /// # Ok(()) }
8299    ///
8300    /// fn prepare_request_builder() -> GetLocation {
8301    ///   # panic!();
8302    ///   // ... details omitted ...
8303    /// }
8304    /// ```
8305    #[derive(Clone, Debug)]
8306    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
8307
8308    impl GetLocation {
8309        pub(crate) fn new(
8310            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8311        ) -> Self {
8312            Self(RequestBuilder::new(stub))
8313        }
8314
8315        /// Sets the full request, replacing any prior values.
8316        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
8317            self.0.request = v.into();
8318            self
8319        }
8320
8321        /// Sets all the options, replacing any prior values.
8322        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8323            self.0.options = v.into();
8324            self
8325        }
8326
8327        /// Sends the request.
8328        pub async fn send(self) -> Result<location::model::Location> {
8329            (*self.0.stub)
8330                .get_location(self.0.request, self.0.options)
8331                .await
8332                .map(gax::response::Response::into_body)
8333        }
8334
8335        /// Sets the value of [name][location::model::GetLocationRequest::name].
8336        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8337            self.0.request.name = v.into();
8338            self
8339        }
8340    }
8341
8342    #[doc(hidden)]
8343    impl gax::options::internal::RequestBuilder for GetLocation {
8344        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8345            &mut self.0.options
8346        }
8347    }
8348
8349    /// The request builder for [ContentService::list_operations][crate::client::ContentService::list_operations] calls.
8350    ///
8351    /// # Example
8352    /// ```
8353    /// # use google_cloud_dataplex_v1::builder::content_service::ListOperations;
8354    /// # async fn sample() -> gax::Result<()> {
8355    /// use gax::paginator::ItemPaginator;
8356    ///
8357    /// let builder = prepare_request_builder();
8358    /// let mut items = builder.by_item();
8359    /// while let Some(result) = items.next().await {
8360    ///   let item = result?;
8361    /// }
8362    /// # Ok(()) }
8363    ///
8364    /// fn prepare_request_builder() -> ListOperations {
8365    ///   # panic!();
8366    ///   // ... details omitted ...
8367    /// }
8368    /// ```
8369    #[derive(Clone, Debug)]
8370    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
8371
8372    impl ListOperations {
8373        pub(crate) fn new(
8374            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8375        ) -> Self {
8376            Self(RequestBuilder::new(stub))
8377        }
8378
8379        /// Sets the full request, replacing any prior values.
8380        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
8381            mut self,
8382            v: V,
8383        ) -> Self {
8384            self.0.request = v.into();
8385            self
8386        }
8387
8388        /// Sets all the options, replacing any prior values.
8389        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8390            self.0.options = v.into();
8391            self
8392        }
8393
8394        /// Sends the request.
8395        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
8396            (*self.0.stub)
8397                .list_operations(self.0.request, self.0.options)
8398                .await
8399                .map(gax::response::Response::into_body)
8400        }
8401
8402        /// Streams each page in the collection.
8403        pub fn by_page(
8404            self,
8405        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
8406        {
8407            use std::clone::Clone;
8408            let token = self.0.request.page_token.clone();
8409            let execute = move |token: String| {
8410                let mut builder = self.clone();
8411                builder.0.request = builder.0.request.set_page_token(token);
8412                builder.send()
8413            };
8414            gax::paginator::internal::new_paginator(token, execute)
8415        }
8416
8417        /// Streams each item in the collection.
8418        pub fn by_item(
8419            self,
8420        ) -> impl gax::paginator::ItemPaginator<
8421            longrunning::model::ListOperationsResponse,
8422            gax::error::Error,
8423        > {
8424            use gax::paginator::Paginator;
8425            self.by_page().items()
8426        }
8427
8428        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
8429        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8430            self.0.request.name = v.into();
8431            self
8432        }
8433
8434        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
8435        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8436            self.0.request.filter = v.into();
8437            self
8438        }
8439
8440        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
8441        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8442            self.0.request.page_size = v.into();
8443            self
8444        }
8445
8446        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
8447        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8448            self.0.request.page_token = v.into();
8449            self
8450        }
8451
8452        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
8453        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
8454            self.0.request.return_partial_success = v.into();
8455            self
8456        }
8457    }
8458
8459    #[doc(hidden)]
8460    impl gax::options::internal::RequestBuilder for ListOperations {
8461        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8462            &mut self.0.options
8463        }
8464    }
8465
8466    /// The request builder for [ContentService::get_operation][crate::client::ContentService::get_operation] calls.
8467    ///
8468    /// # Example
8469    /// ```
8470    /// # use google_cloud_dataplex_v1::builder::content_service::GetOperation;
8471    /// # async fn sample() -> gax::Result<()> {
8472    ///
8473    /// let builder = prepare_request_builder();
8474    /// let response = builder.send().await?;
8475    /// # Ok(()) }
8476    ///
8477    /// fn prepare_request_builder() -> GetOperation {
8478    ///   # panic!();
8479    ///   // ... details omitted ...
8480    /// }
8481    /// ```
8482    #[derive(Clone, Debug)]
8483    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
8484
8485    impl GetOperation {
8486        pub(crate) fn new(
8487            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8488        ) -> Self {
8489            Self(RequestBuilder::new(stub))
8490        }
8491
8492        /// Sets the full request, replacing any prior values.
8493        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
8494            mut self,
8495            v: V,
8496        ) -> Self {
8497            self.0.request = v.into();
8498            self
8499        }
8500
8501        /// Sets all the options, replacing any prior values.
8502        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8503            self.0.options = v.into();
8504            self
8505        }
8506
8507        /// Sends the request.
8508        pub async fn send(self) -> Result<longrunning::model::Operation> {
8509            (*self.0.stub)
8510                .get_operation(self.0.request, self.0.options)
8511                .await
8512                .map(gax::response::Response::into_body)
8513        }
8514
8515        /// Sets the value of [name][longrunning::model::GetOperationRequest::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
8522    #[doc(hidden)]
8523    impl gax::options::internal::RequestBuilder for GetOperation {
8524        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8525            &mut self.0.options
8526        }
8527    }
8528
8529    /// The request builder for [ContentService::delete_operation][crate::client::ContentService::delete_operation] calls.
8530    ///
8531    /// # Example
8532    /// ```
8533    /// # use google_cloud_dataplex_v1::builder::content_service::DeleteOperation;
8534    /// # async fn sample() -> gax::Result<()> {
8535    ///
8536    /// let builder = prepare_request_builder();
8537    /// let response = builder.send().await?;
8538    /// # Ok(()) }
8539    ///
8540    /// fn prepare_request_builder() -> DeleteOperation {
8541    ///   # panic!();
8542    ///   // ... details omitted ...
8543    /// }
8544    /// ```
8545    #[derive(Clone, Debug)]
8546    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
8547
8548    impl DeleteOperation {
8549        pub(crate) fn new(
8550            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8551        ) -> Self {
8552            Self(RequestBuilder::new(stub))
8553        }
8554
8555        /// Sets the full request, replacing any prior values.
8556        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
8557            mut self,
8558            v: V,
8559        ) -> Self {
8560            self.0.request = v.into();
8561            self
8562        }
8563
8564        /// Sets all the options, replacing any prior values.
8565        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8566            self.0.options = v.into();
8567            self
8568        }
8569
8570        /// Sends the request.
8571        pub async fn send(self) -> Result<()> {
8572            (*self.0.stub)
8573                .delete_operation(self.0.request, self.0.options)
8574                .await
8575                .map(gax::response::Response::into_body)
8576        }
8577
8578        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
8579        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8580            self.0.request.name = v.into();
8581            self
8582        }
8583    }
8584
8585    #[doc(hidden)]
8586    impl gax::options::internal::RequestBuilder for DeleteOperation {
8587        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8588            &mut self.0.options
8589        }
8590    }
8591
8592    /// The request builder for [ContentService::cancel_operation][crate::client::ContentService::cancel_operation] calls.
8593    ///
8594    /// # Example
8595    /// ```
8596    /// # use google_cloud_dataplex_v1::builder::content_service::CancelOperation;
8597    /// # async fn sample() -> gax::Result<()> {
8598    ///
8599    /// let builder = prepare_request_builder();
8600    /// let response = builder.send().await?;
8601    /// # Ok(()) }
8602    ///
8603    /// fn prepare_request_builder() -> CancelOperation {
8604    ///   # panic!();
8605    ///   // ... details omitted ...
8606    /// }
8607    /// ```
8608    #[derive(Clone, Debug)]
8609    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
8610
8611    impl CancelOperation {
8612        pub(crate) fn new(
8613            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8614        ) -> Self {
8615            Self(RequestBuilder::new(stub))
8616        }
8617
8618        /// Sets the full request, replacing any prior values.
8619        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
8620            mut self,
8621            v: V,
8622        ) -> Self {
8623            self.0.request = v.into();
8624            self
8625        }
8626
8627        /// Sets all the options, replacing any prior values.
8628        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8629            self.0.options = v.into();
8630            self
8631        }
8632
8633        /// Sends the request.
8634        pub async fn send(self) -> Result<()> {
8635            (*self.0.stub)
8636                .cancel_operation(self.0.request, self.0.options)
8637                .await
8638                .map(gax::response::Response::into_body)
8639        }
8640
8641        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
8642        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8643            self.0.request.name = v.into();
8644            self
8645        }
8646    }
8647
8648    #[doc(hidden)]
8649    impl gax::options::internal::RequestBuilder for CancelOperation {
8650        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8651            &mut self.0.options
8652        }
8653    }
8654}
8655
8656pub mod data_taxonomy_service {
8657    use crate::Result;
8658
8659    /// A builder for [DataTaxonomyService][crate::client::DataTaxonomyService].
8660    ///
8661    /// ```
8662    /// # async fn sample() -> gax::client_builder::Result<()> {
8663    /// # use google_cloud_dataplex_v1::*;
8664    /// # use builder::data_taxonomy_service::ClientBuilder;
8665    /// # use client::DataTaxonomyService;
8666    /// let builder : ClientBuilder = DataTaxonomyService::builder();
8667    /// let client = builder
8668    ///     .with_endpoint("https://dataplex.googleapis.com")
8669    ///     .build().await?;
8670    /// # Ok(()) }
8671    /// ```
8672    pub type ClientBuilder =
8673        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
8674
8675    pub(crate) mod client {
8676        use super::super::super::client::DataTaxonomyService;
8677        pub struct Factory;
8678        impl gax::client_builder::internal::ClientFactory for Factory {
8679            type Client = DataTaxonomyService;
8680            type Credentials = gaxi::options::Credentials;
8681            async fn build(
8682                self,
8683                config: gaxi::options::ClientConfig,
8684            ) -> gax::client_builder::Result<Self::Client> {
8685                Self::Client::new(config).await
8686            }
8687        }
8688    }
8689
8690    /// Common implementation for [crate::client::DataTaxonomyService] request builders.
8691    #[derive(Clone, Debug)]
8692    pub(crate) struct RequestBuilder<R: std::default::Default> {
8693        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8694        request: R,
8695        options: gax::options::RequestOptions,
8696    }
8697
8698    impl<R> RequestBuilder<R>
8699    where
8700        R: std::default::Default,
8701    {
8702        pub(crate) fn new(
8703            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8704        ) -> Self {
8705            Self {
8706                stub,
8707                request: R::default(),
8708                options: gax::options::RequestOptions::default(),
8709            }
8710        }
8711    }
8712
8713    /// The request builder for [DataTaxonomyService::create_data_taxonomy][crate::client::DataTaxonomyService::create_data_taxonomy] calls.
8714    ///
8715    /// # Example
8716    /// ```
8717    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CreateDataTaxonomy;
8718    /// # async fn sample() -> gax::Result<()> {
8719    /// use lro::Poller;
8720    ///
8721    /// let builder = prepare_request_builder();
8722    /// let response = builder.poller().until_done().await?;
8723    /// # Ok(()) }
8724    ///
8725    /// fn prepare_request_builder() -> CreateDataTaxonomy {
8726    ///   # panic!();
8727    ///   // ... details omitted ...
8728    /// }
8729    /// ```
8730    #[derive(Clone, Debug)]
8731    pub struct CreateDataTaxonomy(RequestBuilder<crate::model::CreateDataTaxonomyRequest>);
8732
8733    impl CreateDataTaxonomy {
8734        pub(crate) fn new(
8735            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8736        ) -> Self {
8737            Self(RequestBuilder::new(stub))
8738        }
8739
8740        /// Sets the full request, replacing any prior values.
8741        pub fn with_request<V: Into<crate::model::CreateDataTaxonomyRequest>>(
8742            mut self,
8743            v: V,
8744        ) -> Self {
8745            self.0.request = v.into();
8746            self
8747        }
8748
8749        /// Sets all the options, replacing any prior values.
8750        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8751            self.0.options = v.into();
8752            self
8753        }
8754
8755        /// Sends the request.
8756        ///
8757        /// # Long running operations
8758        ///
8759        /// This starts, but does not poll, a longrunning operation. More information
8760        /// on [create_data_taxonomy][crate::client::DataTaxonomyService::create_data_taxonomy].
8761        pub async fn send(self) -> Result<longrunning::model::Operation> {
8762            (*self.0.stub)
8763                .create_data_taxonomy(self.0.request, self.0.options)
8764                .await
8765                .map(gax::response::Response::into_body)
8766        }
8767
8768        /// Creates a [Poller][lro::Poller] to work with `create_data_taxonomy`.
8769        pub fn poller(
8770            self,
8771        ) -> impl lro::Poller<crate::model::DataTaxonomy, crate::model::OperationMetadata> {
8772            type Operation = lro::internal::Operation<
8773                crate::model::DataTaxonomy,
8774                crate::model::OperationMetadata,
8775            >;
8776            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8777            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8778
8779            let stub = self.0.stub.clone();
8780            let mut options = self.0.options.clone();
8781            options.set_retry_policy(gax::retry_policy::NeverRetry);
8782            let query = move |name| {
8783                let stub = stub.clone();
8784                let options = options.clone();
8785                async {
8786                    let op = GetOperation::new(stub)
8787                        .set_name(name)
8788                        .with_options(options)
8789                        .send()
8790                        .await?;
8791                    Ok(Operation::new(op))
8792                }
8793            };
8794
8795            let start = move || async {
8796                let op = self.send().await?;
8797                Ok(Operation::new(op))
8798            };
8799
8800            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
8801        }
8802
8803        /// Sets the value of [parent][crate::model::CreateDataTaxonomyRequest::parent].
8804        ///
8805        /// This is a **required** field for requests.
8806        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
8807            self.0.request.parent = v.into();
8808            self
8809        }
8810
8811        /// Sets the value of [data_taxonomy_id][crate::model::CreateDataTaxonomyRequest::data_taxonomy_id].
8812        ///
8813        /// This is a **required** field for requests.
8814        pub fn set_data_taxonomy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8815            self.0.request.data_taxonomy_id = v.into();
8816            self
8817        }
8818
8819        /// Sets the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
8820        ///
8821        /// This is a **required** field for requests.
8822        pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
8823        where
8824            T: std::convert::Into<crate::model::DataTaxonomy>,
8825        {
8826            self.0.request.data_taxonomy = std::option::Option::Some(v.into());
8827            self
8828        }
8829
8830        /// Sets or clears the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
8831        ///
8832        /// This is a **required** field for requests.
8833        pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
8834        where
8835            T: std::convert::Into<crate::model::DataTaxonomy>,
8836        {
8837            self.0.request.data_taxonomy = v.map(|x| x.into());
8838            self
8839        }
8840
8841        /// Sets the value of [validate_only][crate::model::CreateDataTaxonomyRequest::validate_only].
8842        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
8843            self.0.request.validate_only = v.into();
8844            self
8845        }
8846    }
8847
8848    #[doc(hidden)]
8849    impl gax::options::internal::RequestBuilder for CreateDataTaxonomy {
8850        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8851            &mut self.0.options
8852        }
8853    }
8854
8855    /// The request builder for [DataTaxonomyService::update_data_taxonomy][crate::client::DataTaxonomyService::update_data_taxonomy] calls.
8856    ///
8857    /// # Example
8858    /// ```
8859    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::UpdateDataTaxonomy;
8860    /// # async fn sample() -> gax::Result<()> {
8861    /// use lro::Poller;
8862    ///
8863    /// let builder = prepare_request_builder();
8864    /// let response = builder.poller().until_done().await?;
8865    /// # Ok(()) }
8866    ///
8867    /// fn prepare_request_builder() -> UpdateDataTaxonomy {
8868    ///   # panic!();
8869    ///   // ... details omitted ...
8870    /// }
8871    /// ```
8872    #[derive(Clone, Debug)]
8873    pub struct UpdateDataTaxonomy(RequestBuilder<crate::model::UpdateDataTaxonomyRequest>);
8874
8875    impl UpdateDataTaxonomy {
8876        pub(crate) fn new(
8877            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8878        ) -> Self {
8879            Self(RequestBuilder::new(stub))
8880        }
8881
8882        /// Sets the full request, replacing any prior values.
8883        pub fn with_request<V: Into<crate::model::UpdateDataTaxonomyRequest>>(
8884            mut self,
8885            v: V,
8886        ) -> Self {
8887            self.0.request = v.into();
8888            self
8889        }
8890
8891        /// Sets all the options, replacing any prior values.
8892        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8893            self.0.options = v.into();
8894            self
8895        }
8896
8897        /// Sends the request.
8898        ///
8899        /// # Long running operations
8900        ///
8901        /// This starts, but does not poll, a longrunning operation. More information
8902        /// on [update_data_taxonomy][crate::client::DataTaxonomyService::update_data_taxonomy].
8903        pub async fn send(self) -> Result<longrunning::model::Operation> {
8904            (*self.0.stub)
8905                .update_data_taxonomy(self.0.request, self.0.options)
8906                .await
8907                .map(gax::response::Response::into_body)
8908        }
8909
8910        /// Creates a [Poller][lro::Poller] to work with `update_data_taxonomy`.
8911        pub fn poller(
8912            self,
8913        ) -> impl lro::Poller<crate::model::DataTaxonomy, crate::model::OperationMetadata> {
8914            type Operation = lro::internal::Operation<
8915                crate::model::DataTaxonomy,
8916                crate::model::OperationMetadata,
8917            >;
8918            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8919            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8920
8921            let stub = self.0.stub.clone();
8922            let mut options = self.0.options.clone();
8923            options.set_retry_policy(gax::retry_policy::NeverRetry);
8924            let query = move |name| {
8925                let stub = stub.clone();
8926                let options = options.clone();
8927                async {
8928                    let op = GetOperation::new(stub)
8929                        .set_name(name)
8930                        .with_options(options)
8931                        .send()
8932                        .await?;
8933                    Ok(Operation::new(op))
8934                }
8935            };
8936
8937            let start = move || async {
8938                let op = self.send().await?;
8939                Ok(Operation::new(op))
8940            };
8941
8942            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
8943        }
8944
8945        /// Sets the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
8946        ///
8947        /// This is a **required** field for requests.
8948        pub fn set_update_mask<T>(mut self, v: T) -> Self
8949        where
8950            T: std::convert::Into<wkt::FieldMask>,
8951        {
8952            self.0.request.update_mask = std::option::Option::Some(v.into());
8953            self
8954        }
8955
8956        /// Sets or clears the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
8957        ///
8958        /// This is a **required** field for requests.
8959        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8960        where
8961            T: std::convert::Into<wkt::FieldMask>,
8962        {
8963            self.0.request.update_mask = v.map(|x| x.into());
8964            self
8965        }
8966
8967        /// Sets the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
8968        ///
8969        /// This is a **required** field for requests.
8970        pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
8971        where
8972            T: std::convert::Into<crate::model::DataTaxonomy>,
8973        {
8974            self.0.request.data_taxonomy = std::option::Option::Some(v.into());
8975            self
8976        }
8977
8978        /// Sets or clears the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
8979        ///
8980        /// This is a **required** field for requests.
8981        pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
8982        where
8983            T: std::convert::Into<crate::model::DataTaxonomy>,
8984        {
8985            self.0.request.data_taxonomy = v.map(|x| x.into());
8986            self
8987        }
8988
8989        /// Sets the value of [validate_only][crate::model::UpdateDataTaxonomyRequest::validate_only].
8990        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
8991            self.0.request.validate_only = v.into();
8992            self
8993        }
8994    }
8995
8996    #[doc(hidden)]
8997    impl gax::options::internal::RequestBuilder for UpdateDataTaxonomy {
8998        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8999            &mut self.0.options
9000        }
9001    }
9002
9003    /// The request builder for [DataTaxonomyService::delete_data_taxonomy][crate::client::DataTaxonomyService::delete_data_taxonomy] calls.
9004    ///
9005    /// # Example
9006    /// ```
9007    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteDataTaxonomy;
9008    /// # async fn sample() -> gax::Result<()> {
9009    /// use lro::Poller;
9010    ///
9011    /// let builder = prepare_request_builder();
9012    /// let response = builder.poller().until_done().await?;
9013    /// # Ok(()) }
9014    ///
9015    /// fn prepare_request_builder() -> DeleteDataTaxonomy {
9016    ///   # panic!();
9017    ///   // ... details omitted ...
9018    /// }
9019    /// ```
9020    #[derive(Clone, Debug)]
9021    pub struct DeleteDataTaxonomy(RequestBuilder<crate::model::DeleteDataTaxonomyRequest>);
9022
9023    impl DeleteDataTaxonomy {
9024        pub(crate) fn new(
9025            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9026        ) -> Self {
9027            Self(RequestBuilder::new(stub))
9028        }
9029
9030        /// Sets the full request, replacing any prior values.
9031        pub fn with_request<V: Into<crate::model::DeleteDataTaxonomyRequest>>(
9032            mut self,
9033            v: V,
9034        ) -> Self {
9035            self.0.request = v.into();
9036            self
9037        }
9038
9039        /// Sets all the options, replacing any prior values.
9040        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9041            self.0.options = v.into();
9042            self
9043        }
9044
9045        /// Sends the request.
9046        ///
9047        /// # Long running operations
9048        ///
9049        /// This starts, but does not poll, a longrunning operation. More information
9050        /// on [delete_data_taxonomy][crate::client::DataTaxonomyService::delete_data_taxonomy].
9051        pub async fn send(self) -> Result<longrunning::model::Operation> {
9052            (*self.0.stub)
9053                .delete_data_taxonomy(self.0.request, self.0.options)
9054                .await
9055                .map(gax::response::Response::into_body)
9056        }
9057
9058        /// Creates a [Poller][lro::Poller] to work with `delete_data_taxonomy`.
9059        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
9060            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
9061            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9062            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9063
9064            let stub = self.0.stub.clone();
9065            let mut options = self.0.options.clone();
9066            options.set_retry_policy(gax::retry_policy::NeverRetry);
9067            let query = move |name| {
9068                let stub = stub.clone();
9069                let options = options.clone();
9070                async {
9071                    let op = GetOperation::new(stub)
9072                        .set_name(name)
9073                        .with_options(options)
9074                        .send()
9075                        .await?;
9076                    Ok(Operation::new(op))
9077                }
9078            };
9079
9080            let start = move || async {
9081                let op = self.send().await?;
9082                Ok(Operation::new(op))
9083            };
9084
9085            lro::internal::new_unit_response_poller(
9086                polling_error_policy,
9087                polling_backoff_policy,
9088                start,
9089                query,
9090            )
9091        }
9092
9093        /// Sets the value of [name][crate::model::DeleteDataTaxonomyRequest::name].
9094        ///
9095        /// This is a **required** field for requests.
9096        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9097            self.0.request.name = v.into();
9098            self
9099        }
9100
9101        /// Sets the value of [etag][crate::model::DeleteDataTaxonomyRequest::etag].
9102        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
9103            self.0.request.etag = v.into();
9104            self
9105        }
9106    }
9107
9108    #[doc(hidden)]
9109    impl gax::options::internal::RequestBuilder for DeleteDataTaxonomy {
9110        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9111            &mut self.0.options
9112        }
9113    }
9114
9115    /// The request builder for [DataTaxonomyService::list_data_taxonomies][crate::client::DataTaxonomyService::list_data_taxonomies] calls.
9116    ///
9117    /// # Example
9118    /// ```
9119    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListDataTaxonomies;
9120    /// # async fn sample() -> gax::Result<()> {
9121    /// use gax::paginator::ItemPaginator;
9122    ///
9123    /// let builder = prepare_request_builder();
9124    /// let mut items = builder.by_item();
9125    /// while let Some(result) = items.next().await {
9126    ///   let item = result?;
9127    /// }
9128    /// # Ok(()) }
9129    ///
9130    /// fn prepare_request_builder() -> ListDataTaxonomies {
9131    ///   # panic!();
9132    ///   // ... details omitted ...
9133    /// }
9134    /// ```
9135    #[derive(Clone, Debug)]
9136    pub struct ListDataTaxonomies(RequestBuilder<crate::model::ListDataTaxonomiesRequest>);
9137
9138    impl ListDataTaxonomies {
9139        pub(crate) fn new(
9140            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9141        ) -> Self {
9142            Self(RequestBuilder::new(stub))
9143        }
9144
9145        /// Sets the full request, replacing any prior values.
9146        pub fn with_request<V: Into<crate::model::ListDataTaxonomiesRequest>>(
9147            mut self,
9148            v: V,
9149        ) -> Self {
9150            self.0.request = v.into();
9151            self
9152        }
9153
9154        /// Sets all the options, replacing any prior values.
9155        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9156            self.0.options = v.into();
9157            self
9158        }
9159
9160        /// Sends the request.
9161        pub async fn send(self) -> Result<crate::model::ListDataTaxonomiesResponse> {
9162            (*self.0.stub)
9163                .list_data_taxonomies(self.0.request, self.0.options)
9164                .await
9165                .map(gax::response::Response::into_body)
9166        }
9167
9168        /// Streams each page in the collection.
9169        pub fn by_page(
9170            self,
9171        ) -> impl gax::paginator::Paginator<crate::model::ListDataTaxonomiesResponse, gax::error::Error>
9172        {
9173            use std::clone::Clone;
9174            let token = self.0.request.page_token.clone();
9175            let execute = move |token: String| {
9176                let mut builder = self.clone();
9177                builder.0.request = builder.0.request.set_page_token(token);
9178                builder.send()
9179            };
9180            gax::paginator::internal::new_paginator(token, execute)
9181        }
9182
9183        /// Streams each item in the collection.
9184        pub fn by_item(
9185            self,
9186        ) -> impl gax::paginator::ItemPaginator<
9187            crate::model::ListDataTaxonomiesResponse,
9188            gax::error::Error,
9189        > {
9190            use gax::paginator::Paginator;
9191            self.by_page().items()
9192        }
9193
9194        /// Sets the value of [parent][crate::model::ListDataTaxonomiesRequest::parent].
9195        ///
9196        /// This is a **required** field for requests.
9197        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9198            self.0.request.parent = v.into();
9199            self
9200        }
9201
9202        /// Sets the value of [page_size][crate::model::ListDataTaxonomiesRequest::page_size].
9203        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9204            self.0.request.page_size = v.into();
9205            self
9206        }
9207
9208        /// Sets the value of [page_token][crate::model::ListDataTaxonomiesRequest::page_token].
9209        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9210            self.0.request.page_token = v.into();
9211            self
9212        }
9213
9214        /// Sets the value of [filter][crate::model::ListDataTaxonomiesRequest::filter].
9215        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9216            self.0.request.filter = v.into();
9217            self
9218        }
9219
9220        /// Sets the value of [order_by][crate::model::ListDataTaxonomiesRequest::order_by].
9221        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
9222            self.0.request.order_by = v.into();
9223            self
9224        }
9225    }
9226
9227    #[doc(hidden)]
9228    impl gax::options::internal::RequestBuilder for ListDataTaxonomies {
9229        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9230            &mut self.0.options
9231        }
9232    }
9233
9234    /// The request builder for [DataTaxonomyService::get_data_taxonomy][crate::client::DataTaxonomyService::get_data_taxonomy] calls.
9235    ///
9236    /// # Example
9237    /// ```
9238    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetDataTaxonomy;
9239    /// # async fn sample() -> gax::Result<()> {
9240    ///
9241    /// let builder = prepare_request_builder();
9242    /// let response = builder.send().await?;
9243    /// # Ok(()) }
9244    ///
9245    /// fn prepare_request_builder() -> GetDataTaxonomy {
9246    ///   # panic!();
9247    ///   // ... details omitted ...
9248    /// }
9249    /// ```
9250    #[derive(Clone, Debug)]
9251    pub struct GetDataTaxonomy(RequestBuilder<crate::model::GetDataTaxonomyRequest>);
9252
9253    impl GetDataTaxonomy {
9254        pub(crate) fn new(
9255            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9256        ) -> Self {
9257            Self(RequestBuilder::new(stub))
9258        }
9259
9260        /// Sets the full request, replacing any prior values.
9261        pub fn with_request<V: Into<crate::model::GetDataTaxonomyRequest>>(mut self, v: V) -> Self {
9262            self.0.request = v.into();
9263            self
9264        }
9265
9266        /// Sets all the options, replacing any prior values.
9267        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9268            self.0.options = v.into();
9269            self
9270        }
9271
9272        /// Sends the request.
9273        pub async fn send(self) -> Result<crate::model::DataTaxonomy> {
9274            (*self.0.stub)
9275                .get_data_taxonomy(self.0.request, self.0.options)
9276                .await
9277                .map(gax::response::Response::into_body)
9278        }
9279
9280        /// Sets the value of [name][crate::model::GetDataTaxonomyRequest::name].
9281        ///
9282        /// This is a **required** field for requests.
9283        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9284            self.0.request.name = v.into();
9285            self
9286        }
9287    }
9288
9289    #[doc(hidden)]
9290    impl gax::options::internal::RequestBuilder for GetDataTaxonomy {
9291        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9292            &mut self.0.options
9293        }
9294    }
9295
9296    /// The request builder for [DataTaxonomyService::create_data_attribute_binding][crate::client::DataTaxonomyService::create_data_attribute_binding] calls.
9297    ///
9298    /// # Example
9299    /// ```
9300    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CreateDataAttributeBinding;
9301    /// # async fn sample() -> gax::Result<()> {
9302    /// use lro::Poller;
9303    ///
9304    /// let builder = prepare_request_builder();
9305    /// let response = builder.poller().until_done().await?;
9306    /// # Ok(()) }
9307    ///
9308    /// fn prepare_request_builder() -> CreateDataAttributeBinding {
9309    ///   # panic!();
9310    ///   // ... details omitted ...
9311    /// }
9312    /// ```
9313    #[derive(Clone, Debug)]
9314    pub struct CreateDataAttributeBinding(
9315        RequestBuilder<crate::model::CreateDataAttributeBindingRequest>,
9316    );
9317
9318    impl CreateDataAttributeBinding {
9319        pub(crate) fn new(
9320            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9321        ) -> Self {
9322            Self(RequestBuilder::new(stub))
9323        }
9324
9325        /// Sets the full request, replacing any prior values.
9326        pub fn with_request<V: Into<crate::model::CreateDataAttributeBindingRequest>>(
9327            mut self,
9328            v: V,
9329        ) -> Self {
9330            self.0.request = v.into();
9331            self
9332        }
9333
9334        /// Sets all the options, replacing any prior values.
9335        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9336            self.0.options = v.into();
9337            self
9338        }
9339
9340        /// Sends the request.
9341        ///
9342        /// # Long running operations
9343        ///
9344        /// This starts, but does not poll, a longrunning operation. More information
9345        /// on [create_data_attribute_binding][crate::client::DataTaxonomyService::create_data_attribute_binding].
9346        pub async fn send(self) -> Result<longrunning::model::Operation> {
9347            (*self.0.stub)
9348                .create_data_attribute_binding(self.0.request, self.0.options)
9349                .await
9350                .map(gax::response::Response::into_body)
9351        }
9352
9353        /// Creates a [Poller][lro::Poller] to work with `create_data_attribute_binding`.
9354        pub fn poller(
9355            self,
9356        ) -> impl lro::Poller<crate::model::DataAttributeBinding, crate::model::OperationMetadata>
9357        {
9358            type Operation = lro::internal::Operation<
9359                crate::model::DataAttributeBinding,
9360                crate::model::OperationMetadata,
9361            >;
9362            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9363            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9364
9365            let stub = self.0.stub.clone();
9366            let mut options = self.0.options.clone();
9367            options.set_retry_policy(gax::retry_policy::NeverRetry);
9368            let query = move |name| {
9369                let stub = stub.clone();
9370                let options = options.clone();
9371                async {
9372                    let op = GetOperation::new(stub)
9373                        .set_name(name)
9374                        .with_options(options)
9375                        .send()
9376                        .await?;
9377                    Ok(Operation::new(op))
9378                }
9379            };
9380
9381            let start = move || async {
9382                let op = self.send().await?;
9383                Ok(Operation::new(op))
9384            };
9385
9386            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
9387        }
9388
9389        /// Sets the value of [parent][crate::model::CreateDataAttributeBindingRequest::parent].
9390        ///
9391        /// This is a **required** field for requests.
9392        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9393            self.0.request.parent = v.into();
9394            self
9395        }
9396
9397        /// Sets the value of [data_attribute_binding_id][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding_id].
9398        ///
9399        /// This is a **required** field for requests.
9400        pub fn set_data_attribute_binding_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
9401            self.0.request.data_attribute_binding_id = v.into();
9402            self
9403        }
9404
9405        /// Sets the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
9406        ///
9407        /// This is a **required** field for requests.
9408        pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
9409        where
9410            T: std::convert::Into<crate::model::DataAttributeBinding>,
9411        {
9412            self.0.request.data_attribute_binding = std::option::Option::Some(v.into());
9413            self
9414        }
9415
9416        /// Sets or clears the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
9417        ///
9418        /// This is a **required** field for requests.
9419        pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
9420        where
9421            T: std::convert::Into<crate::model::DataAttributeBinding>,
9422        {
9423            self.0.request.data_attribute_binding = v.map(|x| x.into());
9424            self
9425        }
9426
9427        /// Sets the value of [validate_only][crate::model::CreateDataAttributeBindingRequest::validate_only].
9428        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9429            self.0.request.validate_only = v.into();
9430            self
9431        }
9432    }
9433
9434    #[doc(hidden)]
9435    impl gax::options::internal::RequestBuilder for CreateDataAttributeBinding {
9436        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9437            &mut self.0.options
9438        }
9439    }
9440
9441    /// The request builder for [DataTaxonomyService::update_data_attribute_binding][crate::client::DataTaxonomyService::update_data_attribute_binding] calls.
9442    ///
9443    /// # Example
9444    /// ```
9445    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::UpdateDataAttributeBinding;
9446    /// # async fn sample() -> gax::Result<()> {
9447    /// use lro::Poller;
9448    ///
9449    /// let builder = prepare_request_builder();
9450    /// let response = builder.poller().until_done().await?;
9451    /// # Ok(()) }
9452    ///
9453    /// fn prepare_request_builder() -> UpdateDataAttributeBinding {
9454    ///   # panic!();
9455    ///   // ... details omitted ...
9456    /// }
9457    /// ```
9458    #[derive(Clone, Debug)]
9459    pub struct UpdateDataAttributeBinding(
9460        RequestBuilder<crate::model::UpdateDataAttributeBindingRequest>,
9461    );
9462
9463    impl UpdateDataAttributeBinding {
9464        pub(crate) fn new(
9465            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9466        ) -> Self {
9467            Self(RequestBuilder::new(stub))
9468        }
9469
9470        /// Sets the full request, replacing any prior values.
9471        pub fn with_request<V: Into<crate::model::UpdateDataAttributeBindingRequest>>(
9472            mut self,
9473            v: V,
9474        ) -> Self {
9475            self.0.request = v.into();
9476            self
9477        }
9478
9479        /// Sets all the options, replacing any prior values.
9480        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9481            self.0.options = v.into();
9482            self
9483        }
9484
9485        /// Sends the request.
9486        ///
9487        /// # Long running operations
9488        ///
9489        /// This starts, but does not poll, a longrunning operation. More information
9490        /// on [update_data_attribute_binding][crate::client::DataTaxonomyService::update_data_attribute_binding].
9491        pub async fn send(self) -> Result<longrunning::model::Operation> {
9492            (*self.0.stub)
9493                .update_data_attribute_binding(self.0.request, self.0.options)
9494                .await
9495                .map(gax::response::Response::into_body)
9496        }
9497
9498        /// Creates a [Poller][lro::Poller] to work with `update_data_attribute_binding`.
9499        pub fn poller(
9500            self,
9501        ) -> impl lro::Poller<crate::model::DataAttributeBinding, crate::model::OperationMetadata>
9502        {
9503            type Operation = lro::internal::Operation<
9504                crate::model::DataAttributeBinding,
9505                crate::model::OperationMetadata,
9506            >;
9507            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9508            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9509
9510            let stub = self.0.stub.clone();
9511            let mut options = self.0.options.clone();
9512            options.set_retry_policy(gax::retry_policy::NeverRetry);
9513            let query = move |name| {
9514                let stub = stub.clone();
9515                let options = options.clone();
9516                async {
9517                    let op = GetOperation::new(stub)
9518                        .set_name(name)
9519                        .with_options(options)
9520                        .send()
9521                        .await?;
9522                    Ok(Operation::new(op))
9523                }
9524            };
9525
9526            let start = move || async {
9527                let op = self.send().await?;
9528                Ok(Operation::new(op))
9529            };
9530
9531            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
9532        }
9533
9534        /// Sets the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
9535        ///
9536        /// This is a **required** field for requests.
9537        pub fn set_update_mask<T>(mut self, v: T) -> Self
9538        where
9539            T: std::convert::Into<wkt::FieldMask>,
9540        {
9541            self.0.request.update_mask = std::option::Option::Some(v.into());
9542            self
9543        }
9544
9545        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
9546        ///
9547        /// This is a **required** field for requests.
9548        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9549        where
9550            T: std::convert::Into<wkt::FieldMask>,
9551        {
9552            self.0.request.update_mask = v.map(|x| x.into());
9553            self
9554        }
9555
9556        /// Sets the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
9557        ///
9558        /// This is a **required** field for requests.
9559        pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
9560        where
9561            T: std::convert::Into<crate::model::DataAttributeBinding>,
9562        {
9563            self.0.request.data_attribute_binding = std::option::Option::Some(v.into());
9564            self
9565        }
9566
9567        /// Sets or clears the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
9568        ///
9569        /// This is a **required** field for requests.
9570        pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
9571        where
9572            T: std::convert::Into<crate::model::DataAttributeBinding>,
9573        {
9574            self.0.request.data_attribute_binding = v.map(|x| x.into());
9575            self
9576        }
9577
9578        /// Sets the value of [validate_only][crate::model::UpdateDataAttributeBindingRequest::validate_only].
9579        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9580            self.0.request.validate_only = v.into();
9581            self
9582        }
9583    }
9584
9585    #[doc(hidden)]
9586    impl gax::options::internal::RequestBuilder for UpdateDataAttributeBinding {
9587        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9588            &mut self.0.options
9589        }
9590    }
9591
9592    /// The request builder for [DataTaxonomyService::delete_data_attribute_binding][crate::client::DataTaxonomyService::delete_data_attribute_binding] calls.
9593    ///
9594    /// # Example
9595    /// ```
9596    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteDataAttributeBinding;
9597    /// # async fn sample() -> gax::Result<()> {
9598    /// use lro::Poller;
9599    ///
9600    /// let builder = prepare_request_builder();
9601    /// let response = builder.poller().until_done().await?;
9602    /// # Ok(()) }
9603    ///
9604    /// fn prepare_request_builder() -> DeleteDataAttributeBinding {
9605    ///   # panic!();
9606    ///   // ... details omitted ...
9607    /// }
9608    /// ```
9609    #[derive(Clone, Debug)]
9610    pub struct DeleteDataAttributeBinding(
9611        RequestBuilder<crate::model::DeleteDataAttributeBindingRequest>,
9612    );
9613
9614    impl DeleteDataAttributeBinding {
9615        pub(crate) fn new(
9616            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9617        ) -> Self {
9618            Self(RequestBuilder::new(stub))
9619        }
9620
9621        /// Sets the full request, replacing any prior values.
9622        pub fn with_request<V: Into<crate::model::DeleteDataAttributeBindingRequest>>(
9623            mut self,
9624            v: V,
9625        ) -> Self {
9626            self.0.request = v.into();
9627            self
9628        }
9629
9630        /// Sets all the options, replacing any prior values.
9631        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9632            self.0.options = v.into();
9633            self
9634        }
9635
9636        /// Sends the request.
9637        ///
9638        /// # Long running operations
9639        ///
9640        /// This starts, but does not poll, a longrunning operation. More information
9641        /// on [delete_data_attribute_binding][crate::client::DataTaxonomyService::delete_data_attribute_binding].
9642        pub async fn send(self) -> Result<longrunning::model::Operation> {
9643            (*self.0.stub)
9644                .delete_data_attribute_binding(self.0.request, self.0.options)
9645                .await
9646                .map(gax::response::Response::into_body)
9647        }
9648
9649        /// Creates a [Poller][lro::Poller] to work with `delete_data_attribute_binding`.
9650        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
9651            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
9652            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9653            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9654
9655            let stub = self.0.stub.clone();
9656            let mut options = self.0.options.clone();
9657            options.set_retry_policy(gax::retry_policy::NeverRetry);
9658            let query = move |name| {
9659                let stub = stub.clone();
9660                let options = options.clone();
9661                async {
9662                    let op = GetOperation::new(stub)
9663                        .set_name(name)
9664                        .with_options(options)
9665                        .send()
9666                        .await?;
9667                    Ok(Operation::new(op))
9668                }
9669            };
9670
9671            let start = move || async {
9672                let op = self.send().await?;
9673                Ok(Operation::new(op))
9674            };
9675
9676            lro::internal::new_unit_response_poller(
9677                polling_error_policy,
9678                polling_backoff_policy,
9679                start,
9680                query,
9681            )
9682        }
9683
9684        /// Sets the value of [name][crate::model::DeleteDataAttributeBindingRequest::name].
9685        ///
9686        /// This is a **required** field for requests.
9687        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9688            self.0.request.name = v.into();
9689            self
9690        }
9691
9692        /// Sets the value of [etag][crate::model::DeleteDataAttributeBindingRequest::etag].
9693        ///
9694        /// This is a **required** field for requests.
9695        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
9696            self.0.request.etag = v.into();
9697            self
9698        }
9699    }
9700
9701    #[doc(hidden)]
9702    impl gax::options::internal::RequestBuilder for DeleteDataAttributeBinding {
9703        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9704            &mut self.0.options
9705        }
9706    }
9707
9708    /// The request builder for [DataTaxonomyService::list_data_attribute_bindings][crate::client::DataTaxonomyService::list_data_attribute_bindings] calls.
9709    ///
9710    /// # Example
9711    /// ```
9712    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListDataAttributeBindings;
9713    /// # async fn sample() -> gax::Result<()> {
9714    /// use gax::paginator::ItemPaginator;
9715    ///
9716    /// let builder = prepare_request_builder();
9717    /// let mut items = builder.by_item();
9718    /// while let Some(result) = items.next().await {
9719    ///   let item = result?;
9720    /// }
9721    /// # Ok(()) }
9722    ///
9723    /// fn prepare_request_builder() -> ListDataAttributeBindings {
9724    ///   # panic!();
9725    ///   // ... details omitted ...
9726    /// }
9727    /// ```
9728    #[derive(Clone, Debug)]
9729    pub struct ListDataAttributeBindings(
9730        RequestBuilder<crate::model::ListDataAttributeBindingsRequest>,
9731    );
9732
9733    impl ListDataAttributeBindings {
9734        pub(crate) fn new(
9735            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9736        ) -> Self {
9737            Self(RequestBuilder::new(stub))
9738        }
9739
9740        /// Sets the full request, replacing any prior values.
9741        pub fn with_request<V: Into<crate::model::ListDataAttributeBindingsRequest>>(
9742            mut self,
9743            v: V,
9744        ) -> Self {
9745            self.0.request = v.into();
9746            self
9747        }
9748
9749        /// Sets all the options, replacing any prior values.
9750        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9751            self.0.options = v.into();
9752            self
9753        }
9754
9755        /// Sends the request.
9756        pub async fn send(self) -> Result<crate::model::ListDataAttributeBindingsResponse> {
9757            (*self.0.stub)
9758                .list_data_attribute_bindings(self.0.request, self.0.options)
9759                .await
9760                .map(gax::response::Response::into_body)
9761        }
9762
9763        /// Streams each page in the collection.
9764        pub fn by_page(
9765            self,
9766        ) -> impl gax::paginator::Paginator<
9767            crate::model::ListDataAttributeBindingsResponse,
9768            gax::error::Error,
9769        > {
9770            use std::clone::Clone;
9771            let token = self.0.request.page_token.clone();
9772            let execute = move |token: String| {
9773                let mut builder = self.clone();
9774                builder.0.request = builder.0.request.set_page_token(token);
9775                builder.send()
9776            };
9777            gax::paginator::internal::new_paginator(token, execute)
9778        }
9779
9780        /// Streams each item in the collection.
9781        pub fn by_item(
9782            self,
9783        ) -> impl gax::paginator::ItemPaginator<
9784            crate::model::ListDataAttributeBindingsResponse,
9785            gax::error::Error,
9786        > {
9787            use gax::paginator::Paginator;
9788            self.by_page().items()
9789        }
9790
9791        /// Sets the value of [parent][crate::model::ListDataAttributeBindingsRequest::parent].
9792        ///
9793        /// This is a **required** field for requests.
9794        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9795            self.0.request.parent = v.into();
9796            self
9797        }
9798
9799        /// Sets the value of [page_size][crate::model::ListDataAttributeBindingsRequest::page_size].
9800        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9801            self.0.request.page_size = v.into();
9802            self
9803        }
9804
9805        /// Sets the value of [page_token][crate::model::ListDataAttributeBindingsRequest::page_token].
9806        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9807            self.0.request.page_token = v.into();
9808            self
9809        }
9810
9811        /// Sets the value of [filter][crate::model::ListDataAttributeBindingsRequest::filter].
9812        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9813            self.0.request.filter = v.into();
9814            self
9815        }
9816
9817        /// Sets the value of [order_by][crate::model::ListDataAttributeBindingsRequest::order_by].
9818        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
9819            self.0.request.order_by = v.into();
9820            self
9821        }
9822    }
9823
9824    #[doc(hidden)]
9825    impl gax::options::internal::RequestBuilder for ListDataAttributeBindings {
9826        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9827            &mut self.0.options
9828        }
9829    }
9830
9831    /// The request builder for [DataTaxonomyService::get_data_attribute_binding][crate::client::DataTaxonomyService::get_data_attribute_binding] calls.
9832    ///
9833    /// # Example
9834    /// ```
9835    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetDataAttributeBinding;
9836    /// # async fn sample() -> gax::Result<()> {
9837    ///
9838    /// let builder = prepare_request_builder();
9839    /// let response = builder.send().await?;
9840    /// # Ok(()) }
9841    ///
9842    /// fn prepare_request_builder() -> GetDataAttributeBinding {
9843    ///   # panic!();
9844    ///   // ... details omitted ...
9845    /// }
9846    /// ```
9847    #[derive(Clone, Debug)]
9848    pub struct GetDataAttributeBinding(
9849        RequestBuilder<crate::model::GetDataAttributeBindingRequest>,
9850    );
9851
9852    impl GetDataAttributeBinding {
9853        pub(crate) fn new(
9854            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9855        ) -> Self {
9856            Self(RequestBuilder::new(stub))
9857        }
9858
9859        /// Sets the full request, replacing any prior values.
9860        pub fn with_request<V: Into<crate::model::GetDataAttributeBindingRequest>>(
9861            mut self,
9862            v: V,
9863        ) -> Self {
9864            self.0.request = v.into();
9865            self
9866        }
9867
9868        /// Sets all the options, replacing any prior values.
9869        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9870            self.0.options = v.into();
9871            self
9872        }
9873
9874        /// Sends the request.
9875        pub async fn send(self) -> Result<crate::model::DataAttributeBinding> {
9876            (*self.0.stub)
9877                .get_data_attribute_binding(self.0.request, self.0.options)
9878                .await
9879                .map(gax::response::Response::into_body)
9880        }
9881
9882        /// Sets the value of [name][crate::model::GetDataAttributeBindingRequest::name].
9883        ///
9884        /// This is a **required** field for requests.
9885        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9886            self.0.request.name = v.into();
9887            self
9888        }
9889    }
9890
9891    #[doc(hidden)]
9892    impl gax::options::internal::RequestBuilder for GetDataAttributeBinding {
9893        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9894            &mut self.0.options
9895        }
9896    }
9897
9898    /// The request builder for [DataTaxonomyService::create_data_attribute][crate::client::DataTaxonomyService::create_data_attribute] calls.
9899    ///
9900    /// # Example
9901    /// ```
9902    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CreateDataAttribute;
9903    /// # async fn sample() -> gax::Result<()> {
9904    /// use lro::Poller;
9905    ///
9906    /// let builder = prepare_request_builder();
9907    /// let response = builder.poller().until_done().await?;
9908    /// # Ok(()) }
9909    ///
9910    /// fn prepare_request_builder() -> CreateDataAttribute {
9911    ///   # panic!();
9912    ///   // ... details omitted ...
9913    /// }
9914    /// ```
9915    #[derive(Clone, Debug)]
9916    pub struct CreateDataAttribute(RequestBuilder<crate::model::CreateDataAttributeRequest>);
9917
9918    impl CreateDataAttribute {
9919        pub(crate) fn new(
9920            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9921        ) -> Self {
9922            Self(RequestBuilder::new(stub))
9923        }
9924
9925        /// Sets the full request, replacing any prior values.
9926        pub fn with_request<V: Into<crate::model::CreateDataAttributeRequest>>(
9927            mut self,
9928            v: V,
9929        ) -> Self {
9930            self.0.request = v.into();
9931            self
9932        }
9933
9934        /// Sets all the options, replacing any prior values.
9935        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9936            self.0.options = v.into();
9937            self
9938        }
9939
9940        /// Sends the request.
9941        ///
9942        /// # Long running operations
9943        ///
9944        /// This starts, but does not poll, a longrunning operation. More information
9945        /// on [create_data_attribute][crate::client::DataTaxonomyService::create_data_attribute].
9946        pub async fn send(self) -> Result<longrunning::model::Operation> {
9947            (*self.0.stub)
9948                .create_data_attribute(self.0.request, self.0.options)
9949                .await
9950                .map(gax::response::Response::into_body)
9951        }
9952
9953        /// Creates a [Poller][lro::Poller] to work with `create_data_attribute`.
9954        pub fn poller(
9955            self,
9956        ) -> impl lro::Poller<crate::model::DataAttribute, crate::model::OperationMetadata>
9957        {
9958            type Operation = lro::internal::Operation<
9959                crate::model::DataAttribute,
9960                crate::model::OperationMetadata,
9961            >;
9962            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9963            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9964
9965            let stub = self.0.stub.clone();
9966            let mut options = self.0.options.clone();
9967            options.set_retry_policy(gax::retry_policy::NeverRetry);
9968            let query = move |name| {
9969                let stub = stub.clone();
9970                let options = options.clone();
9971                async {
9972                    let op = GetOperation::new(stub)
9973                        .set_name(name)
9974                        .with_options(options)
9975                        .send()
9976                        .await?;
9977                    Ok(Operation::new(op))
9978                }
9979            };
9980
9981            let start = move || async {
9982                let op = self.send().await?;
9983                Ok(Operation::new(op))
9984            };
9985
9986            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
9987        }
9988
9989        /// Sets the value of [parent][crate::model::CreateDataAttributeRequest::parent].
9990        ///
9991        /// This is a **required** field for requests.
9992        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9993            self.0.request.parent = v.into();
9994            self
9995        }
9996
9997        /// Sets the value of [data_attribute_id][crate::model::CreateDataAttributeRequest::data_attribute_id].
9998        ///
9999        /// This is a **required** field for requests.
10000        pub fn set_data_attribute_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
10001            self.0.request.data_attribute_id = v.into();
10002            self
10003        }
10004
10005        /// Sets the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
10006        ///
10007        /// This is a **required** field for requests.
10008        pub fn set_data_attribute<T>(mut self, v: T) -> Self
10009        where
10010            T: std::convert::Into<crate::model::DataAttribute>,
10011        {
10012            self.0.request.data_attribute = std::option::Option::Some(v.into());
10013            self
10014        }
10015
10016        /// Sets or clears the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
10017        ///
10018        /// This is a **required** field for requests.
10019        pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
10020        where
10021            T: std::convert::Into<crate::model::DataAttribute>,
10022        {
10023            self.0.request.data_attribute = v.map(|x| x.into());
10024            self
10025        }
10026
10027        /// Sets the value of [validate_only][crate::model::CreateDataAttributeRequest::validate_only].
10028        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10029            self.0.request.validate_only = v.into();
10030            self
10031        }
10032    }
10033
10034    #[doc(hidden)]
10035    impl gax::options::internal::RequestBuilder for CreateDataAttribute {
10036        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10037            &mut self.0.options
10038        }
10039    }
10040
10041    /// The request builder for [DataTaxonomyService::update_data_attribute][crate::client::DataTaxonomyService::update_data_attribute] calls.
10042    ///
10043    /// # Example
10044    /// ```
10045    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::UpdateDataAttribute;
10046    /// # async fn sample() -> gax::Result<()> {
10047    /// use lro::Poller;
10048    ///
10049    /// let builder = prepare_request_builder();
10050    /// let response = builder.poller().until_done().await?;
10051    /// # Ok(()) }
10052    ///
10053    /// fn prepare_request_builder() -> UpdateDataAttribute {
10054    ///   # panic!();
10055    ///   // ... details omitted ...
10056    /// }
10057    /// ```
10058    #[derive(Clone, Debug)]
10059    pub struct UpdateDataAttribute(RequestBuilder<crate::model::UpdateDataAttributeRequest>);
10060
10061    impl UpdateDataAttribute {
10062        pub(crate) fn new(
10063            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10064        ) -> Self {
10065            Self(RequestBuilder::new(stub))
10066        }
10067
10068        /// Sets the full request, replacing any prior values.
10069        pub fn with_request<V: Into<crate::model::UpdateDataAttributeRequest>>(
10070            mut self,
10071            v: V,
10072        ) -> Self {
10073            self.0.request = v.into();
10074            self
10075        }
10076
10077        /// Sets all the options, replacing any prior values.
10078        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10079            self.0.options = v.into();
10080            self
10081        }
10082
10083        /// Sends the request.
10084        ///
10085        /// # Long running operations
10086        ///
10087        /// This starts, but does not poll, a longrunning operation. More information
10088        /// on [update_data_attribute][crate::client::DataTaxonomyService::update_data_attribute].
10089        pub async fn send(self) -> Result<longrunning::model::Operation> {
10090            (*self.0.stub)
10091                .update_data_attribute(self.0.request, self.0.options)
10092                .await
10093                .map(gax::response::Response::into_body)
10094        }
10095
10096        /// Creates a [Poller][lro::Poller] to work with `update_data_attribute`.
10097        pub fn poller(
10098            self,
10099        ) -> impl lro::Poller<crate::model::DataAttribute, crate::model::OperationMetadata>
10100        {
10101            type Operation = lro::internal::Operation<
10102                crate::model::DataAttribute,
10103                crate::model::OperationMetadata,
10104            >;
10105            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10106            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10107
10108            let stub = self.0.stub.clone();
10109            let mut options = self.0.options.clone();
10110            options.set_retry_policy(gax::retry_policy::NeverRetry);
10111            let query = move |name| {
10112                let stub = stub.clone();
10113                let options = options.clone();
10114                async {
10115                    let op = GetOperation::new(stub)
10116                        .set_name(name)
10117                        .with_options(options)
10118                        .send()
10119                        .await?;
10120                    Ok(Operation::new(op))
10121                }
10122            };
10123
10124            let start = move || async {
10125                let op = self.send().await?;
10126                Ok(Operation::new(op))
10127            };
10128
10129            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
10130        }
10131
10132        /// Sets the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
10133        ///
10134        /// This is a **required** field for requests.
10135        pub fn set_update_mask<T>(mut self, v: T) -> Self
10136        where
10137            T: std::convert::Into<wkt::FieldMask>,
10138        {
10139            self.0.request.update_mask = std::option::Option::Some(v.into());
10140            self
10141        }
10142
10143        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
10144        ///
10145        /// This is a **required** field for requests.
10146        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10147        where
10148            T: std::convert::Into<wkt::FieldMask>,
10149        {
10150            self.0.request.update_mask = v.map(|x| x.into());
10151            self
10152        }
10153
10154        /// Sets the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
10155        ///
10156        /// This is a **required** field for requests.
10157        pub fn set_data_attribute<T>(mut self, v: T) -> Self
10158        where
10159            T: std::convert::Into<crate::model::DataAttribute>,
10160        {
10161            self.0.request.data_attribute = std::option::Option::Some(v.into());
10162            self
10163        }
10164
10165        /// Sets or clears the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
10166        ///
10167        /// This is a **required** field for requests.
10168        pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
10169        where
10170            T: std::convert::Into<crate::model::DataAttribute>,
10171        {
10172            self.0.request.data_attribute = v.map(|x| x.into());
10173            self
10174        }
10175
10176        /// Sets the value of [validate_only][crate::model::UpdateDataAttributeRequest::validate_only].
10177        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10178            self.0.request.validate_only = v.into();
10179            self
10180        }
10181    }
10182
10183    #[doc(hidden)]
10184    impl gax::options::internal::RequestBuilder for UpdateDataAttribute {
10185        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10186            &mut self.0.options
10187        }
10188    }
10189
10190    /// The request builder for [DataTaxonomyService::delete_data_attribute][crate::client::DataTaxonomyService::delete_data_attribute] calls.
10191    ///
10192    /// # Example
10193    /// ```
10194    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteDataAttribute;
10195    /// # async fn sample() -> gax::Result<()> {
10196    /// use lro::Poller;
10197    ///
10198    /// let builder = prepare_request_builder();
10199    /// let response = builder.poller().until_done().await?;
10200    /// # Ok(()) }
10201    ///
10202    /// fn prepare_request_builder() -> DeleteDataAttribute {
10203    ///   # panic!();
10204    ///   // ... details omitted ...
10205    /// }
10206    /// ```
10207    #[derive(Clone, Debug)]
10208    pub struct DeleteDataAttribute(RequestBuilder<crate::model::DeleteDataAttributeRequest>);
10209
10210    impl DeleteDataAttribute {
10211        pub(crate) fn new(
10212            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10213        ) -> Self {
10214            Self(RequestBuilder::new(stub))
10215        }
10216
10217        /// Sets the full request, replacing any prior values.
10218        pub fn with_request<V: Into<crate::model::DeleteDataAttributeRequest>>(
10219            mut self,
10220            v: V,
10221        ) -> Self {
10222            self.0.request = v.into();
10223            self
10224        }
10225
10226        /// Sets all the options, replacing any prior values.
10227        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10228            self.0.options = v.into();
10229            self
10230        }
10231
10232        /// Sends the request.
10233        ///
10234        /// # Long running operations
10235        ///
10236        /// This starts, but does not poll, a longrunning operation. More information
10237        /// on [delete_data_attribute][crate::client::DataTaxonomyService::delete_data_attribute].
10238        pub async fn send(self) -> Result<longrunning::model::Operation> {
10239            (*self.0.stub)
10240                .delete_data_attribute(self.0.request, self.0.options)
10241                .await
10242                .map(gax::response::Response::into_body)
10243        }
10244
10245        /// Creates a [Poller][lro::Poller] to work with `delete_data_attribute`.
10246        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
10247            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
10248            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10249            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10250
10251            let stub = self.0.stub.clone();
10252            let mut options = self.0.options.clone();
10253            options.set_retry_policy(gax::retry_policy::NeverRetry);
10254            let query = move |name| {
10255                let stub = stub.clone();
10256                let options = options.clone();
10257                async {
10258                    let op = GetOperation::new(stub)
10259                        .set_name(name)
10260                        .with_options(options)
10261                        .send()
10262                        .await?;
10263                    Ok(Operation::new(op))
10264                }
10265            };
10266
10267            let start = move || async {
10268                let op = self.send().await?;
10269                Ok(Operation::new(op))
10270            };
10271
10272            lro::internal::new_unit_response_poller(
10273                polling_error_policy,
10274                polling_backoff_policy,
10275                start,
10276                query,
10277            )
10278        }
10279
10280        /// Sets the value of [name][crate::model::DeleteDataAttributeRequest::name].
10281        ///
10282        /// This is a **required** field for requests.
10283        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10284            self.0.request.name = v.into();
10285            self
10286        }
10287
10288        /// Sets the value of [etag][crate::model::DeleteDataAttributeRequest::etag].
10289        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
10290            self.0.request.etag = v.into();
10291            self
10292        }
10293    }
10294
10295    #[doc(hidden)]
10296    impl gax::options::internal::RequestBuilder for DeleteDataAttribute {
10297        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10298            &mut self.0.options
10299        }
10300    }
10301
10302    /// The request builder for [DataTaxonomyService::list_data_attributes][crate::client::DataTaxonomyService::list_data_attributes] calls.
10303    ///
10304    /// # Example
10305    /// ```
10306    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListDataAttributes;
10307    /// # async fn sample() -> gax::Result<()> {
10308    /// use gax::paginator::ItemPaginator;
10309    ///
10310    /// let builder = prepare_request_builder();
10311    /// let mut items = builder.by_item();
10312    /// while let Some(result) = items.next().await {
10313    ///   let item = result?;
10314    /// }
10315    /// # Ok(()) }
10316    ///
10317    /// fn prepare_request_builder() -> ListDataAttributes {
10318    ///   # panic!();
10319    ///   // ... details omitted ...
10320    /// }
10321    /// ```
10322    #[derive(Clone, Debug)]
10323    pub struct ListDataAttributes(RequestBuilder<crate::model::ListDataAttributesRequest>);
10324
10325    impl ListDataAttributes {
10326        pub(crate) fn new(
10327            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10328        ) -> Self {
10329            Self(RequestBuilder::new(stub))
10330        }
10331
10332        /// Sets the full request, replacing any prior values.
10333        pub fn with_request<V: Into<crate::model::ListDataAttributesRequest>>(
10334            mut self,
10335            v: V,
10336        ) -> Self {
10337            self.0.request = v.into();
10338            self
10339        }
10340
10341        /// Sets all the options, replacing any prior values.
10342        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10343            self.0.options = v.into();
10344            self
10345        }
10346
10347        /// Sends the request.
10348        pub async fn send(self) -> Result<crate::model::ListDataAttributesResponse> {
10349            (*self.0.stub)
10350                .list_data_attributes(self.0.request, self.0.options)
10351                .await
10352                .map(gax::response::Response::into_body)
10353        }
10354
10355        /// Streams each page in the collection.
10356        pub fn by_page(
10357            self,
10358        ) -> impl gax::paginator::Paginator<crate::model::ListDataAttributesResponse, gax::error::Error>
10359        {
10360            use std::clone::Clone;
10361            let token = self.0.request.page_token.clone();
10362            let execute = move |token: String| {
10363                let mut builder = self.clone();
10364                builder.0.request = builder.0.request.set_page_token(token);
10365                builder.send()
10366            };
10367            gax::paginator::internal::new_paginator(token, execute)
10368        }
10369
10370        /// Streams each item in the collection.
10371        pub fn by_item(
10372            self,
10373        ) -> impl gax::paginator::ItemPaginator<
10374            crate::model::ListDataAttributesResponse,
10375            gax::error::Error,
10376        > {
10377            use gax::paginator::Paginator;
10378            self.by_page().items()
10379        }
10380
10381        /// Sets the value of [parent][crate::model::ListDataAttributesRequest::parent].
10382        ///
10383        /// This is a **required** field for requests.
10384        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10385            self.0.request.parent = v.into();
10386            self
10387        }
10388
10389        /// Sets the value of [page_size][crate::model::ListDataAttributesRequest::page_size].
10390        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10391            self.0.request.page_size = v.into();
10392            self
10393        }
10394
10395        /// Sets the value of [page_token][crate::model::ListDataAttributesRequest::page_token].
10396        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10397            self.0.request.page_token = v.into();
10398            self
10399        }
10400
10401        /// Sets the value of [filter][crate::model::ListDataAttributesRequest::filter].
10402        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10403            self.0.request.filter = v.into();
10404            self
10405        }
10406
10407        /// Sets the value of [order_by][crate::model::ListDataAttributesRequest::order_by].
10408        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
10409            self.0.request.order_by = v.into();
10410            self
10411        }
10412    }
10413
10414    #[doc(hidden)]
10415    impl gax::options::internal::RequestBuilder for ListDataAttributes {
10416        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10417            &mut self.0.options
10418        }
10419    }
10420
10421    /// The request builder for [DataTaxonomyService::get_data_attribute][crate::client::DataTaxonomyService::get_data_attribute] calls.
10422    ///
10423    /// # Example
10424    /// ```
10425    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetDataAttribute;
10426    /// # async fn sample() -> gax::Result<()> {
10427    ///
10428    /// let builder = prepare_request_builder();
10429    /// let response = builder.send().await?;
10430    /// # Ok(()) }
10431    ///
10432    /// fn prepare_request_builder() -> GetDataAttribute {
10433    ///   # panic!();
10434    ///   // ... details omitted ...
10435    /// }
10436    /// ```
10437    #[derive(Clone, Debug)]
10438    pub struct GetDataAttribute(RequestBuilder<crate::model::GetDataAttributeRequest>);
10439
10440    impl GetDataAttribute {
10441        pub(crate) fn new(
10442            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10443        ) -> Self {
10444            Self(RequestBuilder::new(stub))
10445        }
10446
10447        /// Sets the full request, replacing any prior values.
10448        pub fn with_request<V: Into<crate::model::GetDataAttributeRequest>>(
10449            mut self,
10450            v: V,
10451        ) -> Self {
10452            self.0.request = v.into();
10453            self
10454        }
10455
10456        /// Sets all the options, replacing any prior values.
10457        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10458            self.0.options = v.into();
10459            self
10460        }
10461
10462        /// Sends the request.
10463        pub async fn send(self) -> Result<crate::model::DataAttribute> {
10464            (*self.0.stub)
10465                .get_data_attribute(self.0.request, self.0.options)
10466                .await
10467                .map(gax::response::Response::into_body)
10468        }
10469
10470        /// Sets the value of [name][crate::model::GetDataAttributeRequest::name].
10471        ///
10472        /// This is a **required** field for requests.
10473        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10474            self.0.request.name = v.into();
10475            self
10476        }
10477    }
10478
10479    #[doc(hidden)]
10480    impl gax::options::internal::RequestBuilder for GetDataAttribute {
10481        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10482            &mut self.0.options
10483        }
10484    }
10485
10486    /// The request builder for [DataTaxonomyService::list_locations][crate::client::DataTaxonomyService::list_locations] calls.
10487    ///
10488    /// # Example
10489    /// ```
10490    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListLocations;
10491    /// # async fn sample() -> gax::Result<()> {
10492    /// use gax::paginator::ItemPaginator;
10493    ///
10494    /// let builder = prepare_request_builder();
10495    /// let mut items = builder.by_item();
10496    /// while let Some(result) = items.next().await {
10497    ///   let item = result?;
10498    /// }
10499    /// # Ok(()) }
10500    ///
10501    /// fn prepare_request_builder() -> ListLocations {
10502    ///   # panic!();
10503    ///   // ... details omitted ...
10504    /// }
10505    /// ```
10506    #[derive(Clone, Debug)]
10507    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
10508
10509    impl ListLocations {
10510        pub(crate) fn new(
10511            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10512        ) -> Self {
10513            Self(RequestBuilder::new(stub))
10514        }
10515
10516        /// Sets the full request, replacing any prior values.
10517        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
10518            mut self,
10519            v: V,
10520        ) -> Self {
10521            self.0.request = v.into();
10522            self
10523        }
10524
10525        /// Sets all the options, replacing any prior values.
10526        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10527            self.0.options = v.into();
10528            self
10529        }
10530
10531        /// Sends the request.
10532        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
10533            (*self.0.stub)
10534                .list_locations(self.0.request, self.0.options)
10535                .await
10536                .map(gax::response::Response::into_body)
10537        }
10538
10539        /// Streams each page in the collection.
10540        pub fn by_page(
10541            self,
10542        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
10543        {
10544            use std::clone::Clone;
10545            let token = self.0.request.page_token.clone();
10546            let execute = move |token: String| {
10547                let mut builder = self.clone();
10548                builder.0.request = builder.0.request.set_page_token(token);
10549                builder.send()
10550            };
10551            gax::paginator::internal::new_paginator(token, execute)
10552        }
10553
10554        /// Streams each item in the collection.
10555        pub fn by_item(
10556            self,
10557        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
10558        {
10559            use gax::paginator::Paginator;
10560            self.by_page().items()
10561        }
10562
10563        /// Sets the value of [name][location::model::ListLocationsRequest::name].
10564        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10565            self.0.request.name = v.into();
10566            self
10567        }
10568
10569        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
10570        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10571            self.0.request.filter = v.into();
10572            self
10573        }
10574
10575        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
10576        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10577            self.0.request.page_size = v.into();
10578            self
10579        }
10580
10581        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
10582        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10583            self.0.request.page_token = v.into();
10584            self
10585        }
10586    }
10587
10588    #[doc(hidden)]
10589    impl gax::options::internal::RequestBuilder for ListLocations {
10590        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10591            &mut self.0.options
10592        }
10593    }
10594
10595    /// The request builder for [DataTaxonomyService::get_location][crate::client::DataTaxonomyService::get_location] calls.
10596    ///
10597    /// # Example
10598    /// ```
10599    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetLocation;
10600    /// # async fn sample() -> gax::Result<()> {
10601    ///
10602    /// let builder = prepare_request_builder();
10603    /// let response = builder.send().await?;
10604    /// # Ok(()) }
10605    ///
10606    /// fn prepare_request_builder() -> GetLocation {
10607    ///   # panic!();
10608    ///   // ... details omitted ...
10609    /// }
10610    /// ```
10611    #[derive(Clone, Debug)]
10612    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
10613
10614    impl GetLocation {
10615        pub(crate) fn new(
10616            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10617        ) -> Self {
10618            Self(RequestBuilder::new(stub))
10619        }
10620
10621        /// Sets the full request, replacing any prior values.
10622        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
10623            self.0.request = v.into();
10624            self
10625        }
10626
10627        /// Sets all the options, replacing any prior values.
10628        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10629            self.0.options = v.into();
10630            self
10631        }
10632
10633        /// Sends the request.
10634        pub async fn send(self) -> Result<location::model::Location> {
10635            (*self.0.stub)
10636                .get_location(self.0.request, self.0.options)
10637                .await
10638                .map(gax::response::Response::into_body)
10639        }
10640
10641        /// Sets the value of [name][location::model::GetLocationRequest::name].
10642        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10643            self.0.request.name = v.into();
10644            self
10645        }
10646    }
10647
10648    #[doc(hidden)]
10649    impl gax::options::internal::RequestBuilder for GetLocation {
10650        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10651            &mut self.0.options
10652        }
10653    }
10654
10655    /// The request builder for [DataTaxonomyService::set_iam_policy][crate::client::DataTaxonomyService::set_iam_policy] calls.
10656    ///
10657    /// # Example
10658    /// ```
10659    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::SetIamPolicy;
10660    /// # async fn sample() -> gax::Result<()> {
10661    ///
10662    /// let builder = prepare_request_builder();
10663    /// let response = builder.send().await?;
10664    /// # Ok(()) }
10665    ///
10666    /// fn prepare_request_builder() -> SetIamPolicy {
10667    ///   # panic!();
10668    ///   // ... details omitted ...
10669    /// }
10670    /// ```
10671    #[derive(Clone, Debug)]
10672    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
10673
10674    impl SetIamPolicy {
10675        pub(crate) fn new(
10676            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10677        ) -> Self {
10678            Self(RequestBuilder::new(stub))
10679        }
10680
10681        /// Sets the full request, replacing any prior values.
10682        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
10683            self.0.request = v.into();
10684            self
10685        }
10686
10687        /// Sets all the options, replacing any prior values.
10688        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10689            self.0.options = v.into();
10690            self
10691        }
10692
10693        /// Sends the request.
10694        pub async fn send(self) -> Result<iam_v1::model::Policy> {
10695            (*self.0.stub)
10696                .set_iam_policy(self.0.request, self.0.options)
10697                .await
10698                .map(gax::response::Response::into_body)
10699        }
10700
10701        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
10702        ///
10703        /// This is a **required** field for requests.
10704        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
10705            self.0.request.resource = v.into();
10706            self
10707        }
10708
10709        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
10710        ///
10711        /// This is a **required** field for requests.
10712        pub fn set_policy<T>(mut self, v: T) -> Self
10713        where
10714            T: std::convert::Into<iam_v1::model::Policy>,
10715        {
10716            self.0.request.policy = std::option::Option::Some(v.into());
10717            self
10718        }
10719
10720        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
10721        ///
10722        /// This is a **required** field for requests.
10723        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
10724        where
10725            T: std::convert::Into<iam_v1::model::Policy>,
10726        {
10727            self.0.request.policy = v.map(|x| x.into());
10728            self
10729        }
10730
10731        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
10732        pub fn set_update_mask<T>(mut self, v: T) -> Self
10733        where
10734            T: std::convert::Into<wkt::FieldMask>,
10735        {
10736            self.0.request.update_mask = std::option::Option::Some(v.into());
10737            self
10738        }
10739
10740        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
10741        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10742        where
10743            T: std::convert::Into<wkt::FieldMask>,
10744        {
10745            self.0.request.update_mask = v.map(|x| x.into());
10746            self
10747        }
10748    }
10749
10750    #[doc(hidden)]
10751    impl gax::options::internal::RequestBuilder for SetIamPolicy {
10752        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10753            &mut self.0.options
10754        }
10755    }
10756
10757    /// The request builder for [DataTaxonomyService::get_iam_policy][crate::client::DataTaxonomyService::get_iam_policy] calls.
10758    ///
10759    /// # Example
10760    /// ```
10761    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetIamPolicy;
10762    /// # async fn sample() -> gax::Result<()> {
10763    ///
10764    /// let builder = prepare_request_builder();
10765    /// let response = builder.send().await?;
10766    /// # Ok(()) }
10767    ///
10768    /// fn prepare_request_builder() -> GetIamPolicy {
10769    ///   # panic!();
10770    ///   // ... details omitted ...
10771    /// }
10772    /// ```
10773    #[derive(Clone, Debug)]
10774    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
10775
10776    impl GetIamPolicy {
10777        pub(crate) fn new(
10778            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10779        ) -> Self {
10780            Self(RequestBuilder::new(stub))
10781        }
10782
10783        /// Sets the full request, replacing any prior values.
10784        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
10785            self.0.request = v.into();
10786            self
10787        }
10788
10789        /// Sets all the options, replacing any prior values.
10790        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10791            self.0.options = v.into();
10792            self
10793        }
10794
10795        /// Sends the request.
10796        pub async fn send(self) -> Result<iam_v1::model::Policy> {
10797            (*self.0.stub)
10798                .get_iam_policy(self.0.request, self.0.options)
10799                .await
10800                .map(gax::response::Response::into_body)
10801        }
10802
10803        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
10804        ///
10805        /// This is a **required** field for requests.
10806        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
10807            self.0.request.resource = v.into();
10808            self
10809        }
10810
10811        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
10812        pub fn set_options<T>(mut self, v: T) -> Self
10813        where
10814            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
10815        {
10816            self.0.request.options = std::option::Option::Some(v.into());
10817            self
10818        }
10819
10820        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
10821        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
10822        where
10823            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
10824        {
10825            self.0.request.options = v.map(|x| x.into());
10826            self
10827        }
10828    }
10829
10830    #[doc(hidden)]
10831    impl gax::options::internal::RequestBuilder for GetIamPolicy {
10832        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10833            &mut self.0.options
10834        }
10835    }
10836
10837    /// The request builder for [DataTaxonomyService::test_iam_permissions][crate::client::DataTaxonomyService::test_iam_permissions] calls.
10838    ///
10839    /// # Example
10840    /// ```
10841    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::TestIamPermissions;
10842    /// # async fn sample() -> gax::Result<()> {
10843    ///
10844    /// let builder = prepare_request_builder();
10845    /// let response = builder.send().await?;
10846    /// # Ok(()) }
10847    ///
10848    /// fn prepare_request_builder() -> TestIamPermissions {
10849    ///   # panic!();
10850    ///   // ... details omitted ...
10851    /// }
10852    /// ```
10853    #[derive(Clone, Debug)]
10854    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
10855
10856    impl TestIamPermissions {
10857        pub(crate) fn new(
10858            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10859        ) -> Self {
10860            Self(RequestBuilder::new(stub))
10861        }
10862
10863        /// Sets the full request, replacing any prior values.
10864        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
10865            mut self,
10866            v: V,
10867        ) -> Self {
10868            self.0.request = v.into();
10869            self
10870        }
10871
10872        /// Sets all the options, replacing any prior values.
10873        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10874            self.0.options = v.into();
10875            self
10876        }
10877
10878        /// Sends the request.
10879        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
10880            (*self.0.stub)
10881                .test_iam_permissions(self.0.request, self.0.options)
10882                .await
10883                .map(gax::response::Response::into_body)
10884        }
10885
10886        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
10887        ///
10888        /// This is a **required** field for requests.
10889        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
10890            self.0.request.resource = v.into();
10891            self
10892        }
10893
10894        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
10895        ///
10896        /// This is a **required** field for requests.
10897        pub fn set_permissions<T, V>(mut self, v: T) -> Self
10898        where
10899            T: std::iter::IntoIterator<Item = V>,
10900            V: std::convert::Into<std::string::String>,
10901        {
10902            use std::iter::Iterator;
10903            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
10904            self
10905        }
10906    }
10907
10908    #[doc(hidden)]
10909    impl gax::options::internal::RequestBuilder for TestIamPermissions {
10910        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10911            &mut self.0.options
10912        }
10913    }
10914
10915    /// The request builder for [DataTaxonomyService::list_operations][crate::client::DataTaxonomyService::list_operations] calls.
10916    ///
10917    /// # Example
10918    /// ```
10919    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListOperations;
10920    /// # async fn sample() -> gax::Result<()> {
10921    /// use gax::paginator::ItemPaginator;
10922    ///
10923    /// let builder = prepare_request_builder();
10924    /// let mut items = builder.by_item();
10925    /// while let Some(result) = items.next().await {
10926    ///   let item = result?;
10927    /// }
10928    /// # Ok(()) }
10929    ///
10930    /// fn prepare_request_builder() -> ListOperations {
10931    ///   # panic!();
10932    ///   // ... details omitted ...
10933    /// }
10934    /// ```
10935    #[derive(Clone, Debug)]
10936    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
10937
10938    impl ListOperations {
10939        pub(crate) fn new(
10940            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10941        ) -> Self {
10942            Self(RequestBuilder::new(stub))
10943        }
10944
10945        /// Sets the full request, replacing any prior values.
10946        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
10947            mut self,
10948            v: V,
10949        ) -> Self {
10950            self.0.request = v.into();
10951            self
10952        }
10953
10954        /// Sets all the options, replacing any prior values.
10955        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10956            self.0.options = v.into();
10957            self
10958        }
10959
10960        /// Sends the request.
10961        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
10962            (*self.0.stub)
10963                .list_operations(self.0.request, self.0.options)
10964                .await
10965                .map(gax::response::Response::into_body)
10966        }
10967
10968        /// Streams each page in the collection.
10969        pub fn by_page(
10970            self,
10971        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
10972        {
10973            use std::clone::Clone;
10974            let token = self.0.request.page_token.clone();
10975            let execute = move |token: String| {
10976                let mut builder = self.clone();
10977                builder.0.request = builder.0.request.set_page_token(token);
10978                builder.send()
10979            };
10980            gax::paginator::internal::new_paginator(token, execute)
10981        }
10982
10983        /// Streams each item in the collection.
10984        pub fn by_item(
10985            self,
10986        ) -> impl gax::paginator::ItemPaginator<
10987            longrunning::model::ListOperationsResponse,
10988            gax::error::Error,
10989        > {
10990            use gax::paginator::Paginator;
10991            self.by_page().items()
10992        }
10993
10994        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
10995        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10996            self.0.request.name = v.into();
10997            self
10998        }
10999
11000        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
11001        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
11002            self.0.request.filter = v.into();
11003            self
11004        }
11005
11006        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
11007        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
11008            self.0.request.page_size = v.into();
11009            self
11010        }
11011
11012        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
11013        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
11014            self.0.request.page_token = v.into();
11015            self
11016        }
11017
11018        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
11019        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
11020            self.0.request.return_partial_success = v.into();
11021            self
11022        }
11023    }
11024
11025    #[doc(hidden)]
11026    impl gax::options::internal::RequestBuilder for ListOperations {
11027        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11028            &mut self.0.options
11029        }
11030    }
11031
11032    /// The request builder for [DataTaxonomyService::get_operation][crate::client::DataTaxonomyService::get_operation] calls.
11033    ///
11034    /// # Example
11035    /// ```
11036    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetOperation;
11037    /// # async fn sample() -> gax::Result<()> {
11038    ///
11039    /// let builder = prepare_request_builder();
11040    /// let response = builder.send().await?;
11041    /// # Ok(()) }
11042    ///
11043    /// fn prepare_request_builder() -> GetOperation {
11044    ///   # panic!();
11045    ///   // ... details omitted ...
11046    /// }
11047    /// ```
11048    #[derive(Clone, Debug)]
11049    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
11050
11051    impl GetOperation {
11052        pub(crate) fn new(
11053            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11054        ) -> Self {
11055            Self(RequestBuilder::new(stub))
11056        }
11057
11058        /// Sets the full request, replacing any prior values.
11059        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
11060            mut self,
11061            v: V,
11062        ) -> Self {
11063            self.0.request = v.into();
11064            self
11065        }
11066
11067        /// Sets all the options, replacing any prior values.
11068        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11069            self.0.options = v.into();
11070            self
11071        }
11072
11073        /// Sends the request.
11074        pub async fn send(self) -> Result<longrunning::model::Operation> {
11075            (*self.0.stub)
11076                .get_operation(self.0.request, self.0.options)
11077                .await
11078                .map(gax::response::Response::into_body)
11079        }
11080
11081        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
11082        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11083            self.0.request.name = v.into();
11084            self
11085        }
11086    }
11087
11088    #[doc(hidden)]
11089    impl gax::options::internal::RequestBuilder for GetOperation {
11090        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11091            &mut self.0.options
11092        }
11093    }
11094
11095    /// The request builder for [DataTaxonomyService::delete_operation][crate::client::DataTaxonomyService::delete_operation] calls.
11096    ///
11097    /// # Example
11098    /// ```
11099    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteOperation;
11100    /// # async fn sample() -> gax::Result<()> {
11101    ///
11102    /// let builder = prepare_request_builder();
11103    /// let response = builder.send().await?;
11104    /// # Ok(()) }
11105    ///
11106    /// fn prepare_request_builder() -> DeleteOperation {
11107    ///   # panic!();
11108    ///   // ... details omitted ...
11109    /// }
11110    /// ```
11111    #[derive(Clone, Debug)]
11112    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
11113
11114    impl DeleteOperation {
11115        pub(crate) fn new(
11116            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11117        ) -> Self {
11118            Self(RequestBuilder::new(stub))
11119        }
11120
11121        /// Sets the full request, replacing any prior values.
11122        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
11123            mut self,
11124            v: V,
11125        ) -> Self {
11126            self.0.request = v.into();
11127            self
11128        }
11129
11130        /// Sets all the options, replacing any prior values.
11131        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11132            self.0.options = v.into();
11133            self
11134        }
11135
11136        /// Sends the request.
11137        pub async fn send(self) -> Result<()> {
11138            (*self.0.stub)
11139                .delete_operation(self.0.request, self.0.options)
11140                .await
11141                .map(gax::response::Response::into_body)
11142        }
11143
11144        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
11145        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11146            self.0.request.name = v.into();
11147            self
11148        }
11149    }
11150
11151    #[doc(hidden)]
11152    impl gax::options::internal::RequestBuilder for DeleteOperation {
11153        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11154            &mut self.0.options
11155        }
11156    }
11157
11158    /// The request builder for [DataTaxonomyService::cancel_operation][crate::client::DataTaxonomyService::cancel_operation] calls.
11159    ///
11160    /// # Example
11161    /// ```
11162    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CancelOperation;
11163    /// # async fn sample() -> gax::Result<()> {
11164    ///
11165    /// let builder = prepare_request_builder();
11166    /// let response = builder.send().await?;
11167    /// # Ok(()) }
11168    ///
11169    /// fn prepare_request_builder() -> CancelOperation {
11170    ///   # panic!();
11171    ///   // ... details omitted ...
11172    /// }
11173    /// ```
11174    #[derive(Clone, Debug)]
11175    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
11176
11177    impl CancelOperation {
11178        pub(crate) fn new(
11179            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11180        ) -> Self {
11181            Self(RequestBuilder::new(stub))
11182        }
11183
11184        /// Sets the full request, replacing any prior values.
11185        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
11186            mut self,
11187            v: V,
11188        ) -> Self {
11189            self.0.request = v.into();
11190            self
11191        }
11192
11193        /// Sets all the options, replacing any prior values.
11194        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11195            self.0.options = v.into();
11196            self
11197        }
11198
11199        /// Sends the request.
11200        pub async fn send(self) -> Result<()> {
11201            (*self.0.stub)
11202                .cancel_operation(self.0.request, self.0.options)
11203                .await
11204                .map(gax::response::Response::into_body)
11205        }
11206
11207        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
11208        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11209            self.0.request.name = v.into();
11210            self
11211        }
11212    }
11213
11214    #[doc(hidden)]
11215    impl gax::options::internal::RequestBuilder for CancelOperation {
11216        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11217            &mut self.0.options
11218        }
11219    }
11220}
11221
11222pub mod data_scan_service {
11223    use crate::Result;
11224
11225    /// A builder for [DataScanService][crate::client::DataScanService].
11226    ///
11227    /// ```
11228    /// # async fn sample() -> gax::client_builder::Result<()> {
11229    /// # use google_cloud_dataplex_v1::*;
11230    /// # use builder::data_scan_service::ClientBuilder;
11231    /// # use client::DataScanService;
11232    /// let builder : ClientBuilder = DataScanService::builder();
11233    /// let client = builder
11234    ///     .with_endpoint("https://dataplex.googleapis.com")
11235    ///     .build().await?;
11236    /// # Ok(()) }
11237    /// ```
11238    pub type ClientBuilder =
11239        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
11240
11241    pub(crate) mod client {
11242        use super::super::super::client::DataScanService;
11243        pub struct Factory;
11244        impl gax::client_builder::internal::ClientFactory for Factory {
11245            type Client = DataScanService;
11246            type Credentials = gaxi::options::Credentials;
11247            async fn build(
11248                self,
11249                config: gaxi::options::ClientConfig,
11250            ) -> gax::client_builder::Result<Self::Client> {
11251                Self::Client::new(config).await
11252            }
11253        }
11254    }
11255
11256    /// Common implementation for [crate::client::DataScanService] request builders.
11257    #[derive(Clone, Debug)]
11258    pub(crate) struct RequestBuilder<R: std::default::Default> {
11259        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11260        request: R,
11261        options: gax::options::RequestOptions,
11262    }
11263
11264    impl<R> RequestBuilder<R>
11265    where
11266        R: std::default::Default,
11267    {
11268        pub(crate) fn new(
11269            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11270        ) -> Self {
11271            Self {
11272                stub,
11273                request: R::default(),
11274                options: gax::options::RequestOptions::default(),
11275            }
11276        }
11277    }
11278
11279    /// The request builder for [DataScanService::create_data_scan][crate::client::DataScanService::create_data_scan] calls.
11280    ///
11281    /// # Example
11282    /// ```
11283    /// # use google_cloud_dataplex_v1::builder::data_scan_service::CreateDataScan;
11284    /// # async fn sample() -> gax::Result<()> {
11285    /// use lro::Poller;
11286    ///
11287    /// let builder = prepare_request_builder();
11288    /// let response = builder.poller().until_done().await?;
11289    /// # Ok(()) }
11290    ///
11291    /// fn prepare_request_builder() -> CreateDataScan {
11292    ///   # panic!();
11293    ///   // ... details omitted ...
11294    /// }
11295    /// ```
11296    #[derive(Clone, Debug)]
11297    pub struct CreateDataScan(RequestBuilder<crate::model::CreateDataScanRequest>);
11298
11299    impl CreateDataScan {
11300        pub(crate) fn new(
11301            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11302        ) -> Self {
11303            Self(RequestBuilder::new(stub))
11304        }
11305
11306        /// Sets the full request, replacing any prior values.
11307        pub fn with_request<V: Into<crate::model::CreateDataScanRequest>>(mut self, v: V) -> Self {
11308            self.0.request = v.into();
11309            self
11310        }
11311
11312        /// Sets all the options, replacing any prior values.
11313        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11314            self.0.options = v.into();
11315            self
11316        }
11317
11318        /// Sends the request.
11319        ///
11320        /// # Long running operations
11321        ///
11322        /// This starts, but does not poll, a longrunning operation. More information
11323        /// on [create_data_scan][crate::client::DataScanService::create_data_scan].
11324        pub async fn send(self) -> Result<longrunning::model::Operation> {
11325            (*self.0.stub)
11326                .create_data_scan(self.0.request, self.0.options)
11327                .await
11328                .map(gax::response::Response::into_body)
11329        }
11330
11331        /// Creates a [Poller][lro::Poller] to work with `create_data_scan`.
11332        pub fn poller(
11333            self,
11334        ) -> impl lro::Poller<crate::model::DataScan, crate::model::OperationMetadata> {
11335            type Operation =
11336                lro::internal::Operation<crate::model::DataScan, crate::model::OperationMetadata>;
11337            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11338            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11339
11340            let stub = self.0.stub.clone();
11341            let mut options = self.0.options.clone();
11342            options.set_retry_policy(gax::retry_policy::NeverRetry);
11343            let query = move |name| {
11344                let stub = stub.clone();
11345                let options = options.clone();
11346                async {
11347                    let op = GetOperation::new(stub)
11348                        .set_name(name)
11349                        .with_options(options)
11350                        .send()
11351                        .await?;
11352                    Ok(Operation::new(op))
11353                }
11354            };
11355
11356            let start = move || async {
11357                let op = self.send().await?;
11358                Ok(Operation::new(op))
11359            };
11360
11361            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
11362        }
11363
11364        /// Sets the value of [parent][crate::model::CreateDataScanRequest::parent].
11365        ///
11366        /// This is a **required** field for requests.
11367        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
11368            self.0.request.parent = v.into();
11369            self
11370        }
11371
11372        /// Sets the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
11373        ///
11374        /// This is a **required** field for requests.
11375        pub fn set_data_scan<T>(mut self, v: T) -> Self
11376        where
11377            T: std::convert::Into<crate::model::DataScan>,
11378        {
11379            self.0.request.data_scan = std::option::Option::Some(v.into());
11380            self
11381        }
11382
11383        /// Sets or clears the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
11384        ///
11385        /// This is a **required** field for requests.
11386        pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
11387        where
11388            T: std::convert::Into<crate::model::DataScan>,
11389        {
11390            self.0.request.data_scan = v.map(|x| x.into());
11391            self
11392        }
11393
11394        /// Sets the value of [data_scan_id][crate::model::CreateDataScanRequest::data_scan_id].
11395        ///
11396        /// This is a **required** field for requests.
11397        pub fn set_data_scan_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
11398            self.0.request.data_scan_id = v.into();
11399            self
11400        }
11401
11402        /// Sets the value of [validate_only][crate::model::CreateDataScanRequest::validate_only].
11403        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
11404            self.0.request.validate_only = v.into();
11405            self
11406        }
11407    }
11408
11409    #[doc(hidden)]
11410    impl gax::options::internal::RequestBuilder for CreateDataScan {
11411        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11412            &mut self.0.options
11413        }
11414    }
11415
11416    /// The request builder for [DataScanService::update_data_scan][crate::client::DataScanService::update_data_scan] calls.
11417    ///
11418    /// # Example
11419    /// ```
11420    /// # use google_cloud_dataplex_v1::builder::data_scan_service::UpdateDataScan;
11421    /// # async fn sample() -> gax::Result<()> {
11422    /// use lro::Poller;
11423    ///
11424    /// let builder = prepare_request_builder();
11425    /// let response = builder.poller().until_done().await?;
11426    /// # Ok(()) }
11427    ///
11428    /// fn prepare_request_builder() -> UpdateDataScan {
11429    ///   # panic!();
11430    ///   // ... details omitted ...
11431    /// }
11432    /// ```
11433    #[derive(Clone, Debug)]
11434    pub struct UpdateDataScan(RequestBuilder<crate::model::UpdateDataScanRequest>);
11435
11436    impl UpdateDataScan {
11437        pub(crate) fn new(
11438            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11439        ) -> Self {
11440            Self(RequestBuilder::new(stub))
11441        }
11442
11443        /// Sets the full request, replacing any prior values.
11444        pub fn with_request<V: Into<crate::model::UpdateDataScanRequest>>(mut self, v: V) -> Self {
11445            self.0.request = v.into();
11446            self
11447        }
11448
11449        /// Sets all the options, replacing any prior values.
11450        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11451            self.0.options = v.into();
11452            self
11453        }
11454
11455        /// Sends the request.
11456        ///
11457        /// # Long running operations
11458        ///
11459        /// This starts, but does not poll, a longrunning operation. More information
11460        /// on [update_data_scan][crate::client::DataScanService::update_data_scan].
11461        pub async fn send(self) -> Result<longrunning::model::Operation> {
11462            (*self.0.stub)
11463                .update_data_scan(self.0.request, self.0.options)
11464                .await
11465                .map(gax::response::Response::into_body)
11466        }
11467
11468        /// Creates a [Poller][lro::Poller] to work with `update_data_scan`.
11469        pub fn poller(
11470            self,
11471        ) -> impl lro::Poller<crate::model::DataScan, crate::model::OperationMetadata> {
11472            type Operation =
11473                lro::internal::Operation<crate::model::DataScan, crate::model::OperationMetadata>;
11474            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11475            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11476
11477            let stub = self.0.stub.clone();
11478            let mut options = self.0.options.clone();
11479            options.set_retry_policy(gax::retry_policy::NeverRetry);
11480            let query = move |name| {
11481                let stub = stub.clone();
11482                let options = options.clone();
11483                async {
11484                    let op = GetOperation::new(stub)
11485                        .set_name(name)
11486                        .with_options(options)
11487                        .send()
11488                        .await?;
11489                    Ok(Operation::new(op))
11490                }
11491            };
11492
11493            let start = move || async {
11494                let op = self.send().await?;
11495                Ok(Operation::new(op))
11496            };
11497
11498            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
11499        }
11500
11501        /// Sets the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
11502        ///
11503        /// This is a **required** field for requests.
11504        pub fn set_data_scan<T>(mut self, v: T) -> Self
11505        where
11506            T: std::convert::Into<crate::model::DataScan>,
11507        {
11508            self.0.request.data_scan = std::option::Option::Some(v.into());
11509            self
11510        }
11511
11512        /// Sets or clears the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
11513        ///
11514        /// This is a **required** field for requests.
11515        pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
11516        where
11517            T: std::convert::Into<crate::model::DataScan>,
11518        {
11519            self.0.request.data_scan = v.map(|x| x.into());
11520            self
11521        }
11522
11523        /// Sets the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
11524        pub fn set_update_mask<T>(mut self, v: T) -> Self
11525        where
11526            T: std::convert::Into<wkt::FieldMask>,
11527        {
11528            self.0.request.update_mask = std::option::Option::Some(v.into());
11529            self
11530        }
11531
11532        /// Sets or clears the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
11533        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
11534        where
11535            T: std::convert::Into<wkt::FieldMask>,
11536        {
11537            self.0.request.update_mask = v.map(|x| x.into());
11538            self
11539        }
11540
11541        /// Sets the value of [validate_only][crate::model::UpdateDataScanRequest::validate_only].
11542        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
11543            self.0.request.validate_only = v.into();
11544            self
11545        }
11546    }
11547
11548    #[doc(hidden)]
11549    impl gax::options::internal::RequestBuilder for UpdateDataScan {
11550        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11551            &mut self.0.options
11552        }
11553    }
11554
11555    /// The request builder for [DataScanService::delete_data_scan][crate::client::DataScanService::delete_data_scan] calls.
11556    ///
11557    /// # Example
11558    /// ```
11559    /// # use google_cloud_dataplex_v1::builder::data_scan_service::DeleteDataScan;
11560    /// # async fn sample() -> gax::Result<()> {
11561    /// use lro::Poller;
11562    ///
11563    /// let builder = prepare_request_builder();
11564    /// let response = builder.poller().until_done().await?;
11565    /// # Ok(()) }
11566    ///
11567    /// fn prepare_request_builder() -> DeleteDataScan {
11568    ///   # panic!();
11569    ///   // ... details omitted ...
11570    /// }
11571    /// ```
11572    #[derive(Clone, Debug)]
11573    pub struct DeleteDataScan(RequestBuilder<crate::model::DeleteDataScanRequest>);
11574
11575    impl DeleteDataScan {
11576        pub(crate) fn new(
11577            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11578        ) -> Self {
11579            Self(RequestBuilder::new(stub))
11580        }
11581
11582        /// Sets the full request, replacing any prior values.
11583        pub fn with_request<V: Into<crate::model::DeleteDataScanRequest>>(mut self, v: V) -> Self {
11584            self.0.request = v.into();
11585            self
11586        }
11587
11588        /// Sets all the options, replacing any prior values.
11589        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11590            self.0.options = v.into();
11591            self
11592        }
11593
11594        /// Sends the request.
11595        ///
11596        /// # Long running operations
11597        ///
11598        /// This starts, but does not poll, a longrunning operation. More information
11599        /// on [delete_data_scan][crate::client::DataScanService::delete_data_scan].
11600        pub async fn send(self) -> Result<longrunning::model::Operation> {
11601            (*self.0.stub)
11602                .delete_data_scan(self.0.request, self.0.options)
11603                .await
11604                .map(gax::response::Response::into_body)
11605        }
11606
11607        /// Creates a [Poller][lro::Poller] to work with `delete_data_scan`.
11608        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
11609            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
11610            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11611            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11612
11613            let stub = self.0.stub.clone();
11614            let mut options = self.0.options.clone();
11615            options.set_retry_policy(gax::retry_policy::NeverRetry);
11616            let query = move |name| {
11617                let stub = stub.clone();
11618                let options = options.clone();
11619                async {
11620                    let op = GetOperation::new(stub)
11621                        .set_name(name)
11622                        .with_options(options)
11623                        .send()
11624                        .await?;
11625                    Ok(Operation::new(op))
11626                }
11627            };
11628
11629            let start = move || async {
11630                let op = self.send().await?;
11631                Ok(Operation::new(op))
11632            };
11633
11634            lro::internal::new_unit_response_poller(
11635                polling_error_policy,
11636                polling_backoff_policy,
11637                start,
11638                query,
11639            )
11640        }
11641
11642        /// Sets the value of [name][crate::model::DeleteDataScanRequest::name].
11643        ///
11644        /// This is a **required** field for requests.
11645        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11646            self.0.request.name = v.into();
11647            self
11648        }
11649
11650        /// Sets the value of [force][crate::model::DeleteDataScanRequest::force].
11651        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
11652            self.0.request.force = v.into();
11653            self
11654        }
11655    }
11656
11657    #[doc(hidden)]
11658    impl gax::options::internal::RequestBuilder for DeleteDataScan {
11659        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11660            &mut self.0.options
11661        }
11662    }
11663
11664    /// The request builder for [DataScanService::get_data_scan][crate::client::DataScanService::get_data_scan] calls.
11665    ///
11666    /// # Example
11667    /// ```
11668    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetDataScan;
11669    /// # async fn sample() -> gax::Result<()> {
11670    ///
11671    /// let builder = prepare_request_builder();
11672    /// let response = builder.send().await?;
11673    /// # Ok(()) }
11674    ///
11675    /// fn prepare_request_builder() -> GetDataScan {
11676    ///   # panic!();
11677    ///   // ... details omitted ...
11678    /// }
11679    /// ```
11680    #[derive(Clone, Debug)]
11681    pub struct GetDataScan(RequestBuilder<crate::model::GetDataScanRequest>);
11682
11683    impl GetDataScan {
11684        pub(crate) fn new(
11685            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11686        ) -> Self {
11687            Self(RequestBuilder::new(stub))
11688        }
11689
11690        /// Sets the full request, replacing any prior values.
11691        pub fn with_request<V: Into<crate::model::GetDataScanRequest>>(mut self, v: V) -> Self {
11692            self.0.request = v.into();
11693            self
11694        }
11695
11696        /// Sets all the options, replacing any prior values.
11697        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11698            self.0.options = v.into();
11699            self
11700        }
11701
11702        /// Sends the request.
11703        pub async fn send(self) -> Result<crate::model::DataScan> {
11704            (*self.0.stub)
11705                .get_data_scan(self.0.request, self.0.options)
11706                .await
11707                .map(gax::response::Response::into_body)
11708        }
11709
11710        /// Sets the value of [name][crate::model::GetDataScanRequest::name].
11711        ///
11712        /// This is a **required** field for requests.
11713        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11714            self.0.request.name = v.into();
11715            self
11716        }
11717
11718        /// Sets the value of [view][crate::model::GetDataScanRequest::view].
11719        pub fn set_view<T: Into<crate::model::get_data_scan_request::DataScanView>>(
11720            mut self,
11721            v: T,
11722        ) -> Self {
11723            self.0.request.view = v.into();
11724            self
11725        }
11726    }
11727
11728    #[doc(hidden)]
11729    impl gax::options::internal::RequestBuilder for GetDataScan {
11730        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11731            &mut self.0.options
11732        }
11733    }
11734
11735    /// The request builder for [DataScanService::list_data_scans][crate::client::DataScanService::list_data_scans] calls.
11736    ///
11737    /// # Example
11738    /// ```
11739    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListDataScans;
11740    /// # async fn sample() -> gax::Result<()> {
11741    /// use gax::paginator::ItemPaginator;
11742    ///
11743    /// let builder = prepare_request_builder();
11744    /// let mut items = builder.by_item();
11745    /// while let Some(result) = items.next().await {
11746    ///   let item = result?;
11747    /// }
11748    /// # Ok(()) }
11749    ///
11750    /// fn prepare_request_builder() -> ListDataScans {
11751    ///   # panic!();
11752    ///   // ... details omitted ...
11753    /// }
11754    /// ```
11755    #[derive(Clone, Debug)]
11756    pub struct ListDataScans(RequestBuilder<crate::model::ListDataScansRequest>);
11757
11758    impl ListDataScans {
11759        pub(crate) fn new(
11760            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11761        ) -> Self {
11762            Self(RequestBuilder::new(stub))
11763        }
11764
11765        /// Sets the full request, replacing any prior values.
11766        pub fn with_request<V: Into<crate::model::ListDataScansRequest>>(mut self, v: V) -> Self {
11767            self.0.request = v.into();
11768            self
11769        }
11770
11771        /// Sets all the options, replacing any prior values.
11772        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11773            self.0.options = v.into();
11774            self
11775        }
11776
11777        /// Sends the request.
11778        pub async fn send(self) -> Result<crate::model::ListDataScansResponse> {
11779            (*self.0.stub)
11780                .list_data_scans(self.0.request, self.0.options)
11781                .await
11782                .map(gax::response::Response::into_body)
11783        }
11784
11785        /// Streams each page in the collection.
11786        pub fn by_page(
11787            self,
11788        ) -> impl gax::paginator::Paginator<crate::model::ListDataScansResponse, gax::error::Error>
11789        {
11790            use std::clone::Clone;
11791            let token = self.0.request.page_token.clone();
11792            let execute = move |token: String| {
11793                let mut builder = self.clone();
11794                builder.0.request = builder.0.request.set_page_token(token);
11795                builder.send()
11796            };
11797            gax::paginator::internal::new_paginator(token, execute)
11798        }
11799
11800        /// Streams each item in the collection.
11801        pub fn by_item(
11802            self,
11803        ) -> impl gax::paginator::ItemPaginator<crate::model::ListDataScansResponse, gax::error::Error>
11804        {
11805            use gax::paginator::Paginator;
11806            self.by_page().items()
11807        }
11808
11809        /// Sets the value of [parent][crate::model::ListDataScansRequest::parent].
11810        ///
11811        /// This is a **required** field for requests.
11812        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
11813            self.0.request.parent = v.into();
11814            self
11815        }
11816
11817        /// Sets the value of [page_size][crate::model::ListDataScansRequest::page_size].
11818        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
11819            self.0.request.page_size = v.into();
11820            self
11821        }
11822
11823        /// Sets the value of [page_token][crate::model::ListDataScansRequest::page_token].
11824        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
11825            self.0.request.page_token = v.into();
11826            self
11827        }
11828
11829        /// Sets the value of [filter][crate::model::ListDataScansRequest::filter].
11830        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
11831            self.0.request.filter = v.into();
11832            self
11833        }
11834
11835        /// Sets the value of [order_by][crate::model::ListDataScansRequest::order_by].
11836        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
11837            self.0.request.order_by = v.into();
11838            self
11839        }
11840    }
11841
11842    #[doc(hidden)]
11843    impl gax::options::internal::RequestBuilder for ListDataScans {
11844        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11845            &mut self.0.options
11846        }
11847    }
11848
11849    /// The request builder for [DataScanService::run_data_scan][crate::client::DataScanService::run_data_scan] calls.
11850    ///
11851    /// # Example
11852    /// ```
11853    /// # use google_cloud_dataplex_v1::builder::data_scan_service::RunDataScan;
11854    /// # async fn sample() -> gax::Result<()> {
11855    ///
11856    /// let builder = prepare_request_builder();
11857    /// let response = builder.send().await?;
11858    /// # Ok(()) }
11859    ///
11860    /// fn prepare_request_builder() -> RunDataScan {
11861    ///   # panic!();
11862    ///   // ... details omitted ...
11863    /// }
11864    /// ```
11865    #[derive(Clone, Debug)]
11866    pub struct RunDataScan(RequestBuilder<crate::model::RunDataScanRequest>);
11867
11868    impl RunDataScan {
11869        pub(crate) fn new(
11870            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11871        ) -> Self {
11872            Self(RequestBuilder::new(stub))
11873        }
11874
11875        /// Sets the full request, replacing any prior values.
11876        pub fn with_request<V: Into<crate::model::RunDataScanRequest>>(mut self, v: V) -> Self {
11877            self.0.request = v.into();
11878            self
11879        }
11880
11881        /// Sets all the options, replacing any prior values.
11882        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11883            self.0.options = v.into();
11884            self
11885        }
11886
11887        /// Sends the request.
11888        pub async fn send(self) -> Result<crate::model::RunDataScanResponse> {
11889            (*self.0.stub)
11890                .run_data_scan(self.0.request, self.0.options)
11891                .await
11892                .map(gax::response::Response::into_body)
11893        }
11894
11895        /// Sets the value of [name][crate::model::RunDataScanRequest::name].
11896        ///
11897        /// This is a **required** field for requests.
11898        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11899            self.0.request.name = v.into();
11900            self
11901        }
11902    }
11903
11904    #[doc(hidden)]
11905    impl gax::options::internal::RequestBuilder for RunDataScan {
11906        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11907            &mut self.0.options
11908        }
11909    }
11910
11911    /// The request builder for [DataScanService::get_data_scan_job][crate::client::DataScanService::get_data_scan_job] calls.
11912    ///
11913    /// # Example
11914    /// ```
11915    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetDataScanJob;
11916    /// # async fn sample() -> gax::Result<()> {
11917    ///
11918    /// let builder = prepare_request_builder();
11919    /// let response = builder.send().await?;
11920    /// # Ok(()) }
11921    ///
11922    /// fn prepare_request_builder() -> GetDataScanJob {
11923    ///   # panic!();
11924    ///   // ... details omitted ...
11925    /// }
11926    /// ```
11927    #[derive(Clone, Debug)]
11928    pub struct GetDataScanJob(RequestBuilder<crate::model::GetDataScanJobRequest>);
11929
11930    impl GetDataScanJob {
11931        pub(crate) fn new(
11932            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11933        ) -> Self {
11934            Self(RequestBuilder::new(stub))
11935        }
11936
11937        /// Sets the full request, replacing any prior values.
11938        pub fn with_request<V: Into<crate::model::GetDataScanJobRequest>>(mut self, v: V) -> Self {
11939            self.0.request = v.into();
11940            self
11941        }
11942
11943        /// Sets all the options, replacing any prior values.
11944        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11945            self.0.options = v.into();
11946            self
11947        }
11948
11949        /// Sends the request.
11950        pub async fn send(self) -> Result<crate::model::DataScanJob> {
11951            (*self.0.stub)
11952                .get_data_scan_job(self.0.request, self.0.options)
11953                .await
11954                .map(gax::response::Response::into_body)
11955        }
11956
11957        /// Sets the value of [name][crate::model::GetDataScanJobRequest::name].
11958        ///
11959        /// This is a **required** field for requests.
11960        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11961            self.0.request.name = v.into();
11962            self
11963        }
11964
11965        /// Sets the value of [view][crate::model::GetDataScanJobRequest::view].
11966        pub fn set_view<T: Into<crate::model::get_data_scan_job_request::DataScanJobView>>(
11967            mut self,
11968            v: T,
11969        ) -> Self {
11970            self.0.request.view = v.into();
11971            self
11972        }
11973    }
11974
11975    #[doc(hidden)]
11976    impl gax::options::internal::RequestBuilder for GetDataScanJob {
11977        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11978            &mut self.0.options
11979        }
11980    }
11981
11982    /// The request builder for [DataScanService::list_data_scan_jobs][crate::client::DataScanService::list_data_scan_jobs] calls.
11983    ///
11984    /// # Example
11985    /// ```
11986    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListDataScanJobs;
11987    /// # async fn sample() -> gax::Result<()> {
11988    /// use gax::paginator::ItemPaginator;
11989    ///
11990    /// let builder = prepare_request_builder();
11991    /// let mut items = builder.by_item();
11992    /// while let Some(result) = items.next().await {
11993    ///   let item = result?;
11994    /// }
11995    /// # Ok(()) }
11996    ///
11997    /// fn prepare_request_builder() -> ListDataScanJobs {
11998    ///   # panic!();
11999    ///   // ... details omitted ...
12000    /// }
12001    /// ```
12002    #[derive(Clone, Debug)]
12003    pub struct ListDataScanJobs(RequestBuilder<crate::model::ListDataScanJobsRequest>);
12004
12005    impl ListDataScanJobs {
12006        pub(crate) fn new(
12007            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12008        ) -> Self {
12009            Self(RequestBuilder::new(stub))
12010        }
12011
12012        /// Sets the full request, replacing any prior values.
12013        pub fn with_request<V: Into<crate::model::ListDataScanJobsRequest>>(
12014            mut self,
12015            v: V,
12016        ) -> Self {
12017            self.0.request = v.into();
12018            self
12019        }
12020
12021        /// Sets all the options, replacing any prior values.
12022        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12023            self.0.options = v.into();
12024            self
12025        }
12026
12027        /// Sends the request.
12028        pub async fn send(self) -> Result<crate::model::ListDataScanJobsResponse> {
12029            (*self.0.stub)
12030                .list_data_scan_jobs(self.0.request, self.0.options)
12031                .await
12032                .map(gax::response::Response::into_body)
12033        }
12034
12035        /// Streams each page in the collection.
12036        pub fn by_page(
12037            self,
12038        ) -> impl gax::paginator::Paginator<crate::model::ListDataScanJobsResponse, gax::error::Error>
12039        {
12040            use std::clone::Clone;
12041            let token = self.0.request.page_token.clone();
12042            let execute = move |token: String| {
12043                let mut builder = self.clone();
12044                builder.0.request = builder.0.request.set_page_token(token);
12045                builder.send()
12046            };
12047            gax::paginator::internal::new_paginator(token, execute)
12048        }
12049
12050        /// Streams each item in the collection.
12051        pub fn by_item(
12052            self,
12053        ) -> impl gax::paginator::ItemPaginator<crate::model::ListDataScanJobsResponse, gax::error::Error>
12054        {
12055            use gax::paginator::Paginator;
12056            self.by_page().items()
12057        }
12058
12059        /// Sets the value of [parent][crate::model::ListDataScanJobsRequest::parent].
12060        ///
12061        /// This is a **required** field for requests.
12062        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12063            self.0.request.parent = v.into();
12064            self
12065        }
12066
12067        /// Sets the value of [page_size][crate::model::ListDataScanJobsRequest::page_size].
12068        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12069            self.0.request.page_size = v.into();
12070            self
12071        }
12072
12073        /// Sets the value of [page_token][crate::model::ListDataScanJobsRequest::page_token].
12074        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12075            self.0.request.page_token = v.into();
12076            self
12077        }
12078
12079        /// Sets the value of [filter][crate::model::ListDataScanJobsRequest::filter].
12080        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12081            self.0.request.filter = v.into();
12082            self
12083        }
12084    }
12085
12086    #[doc(hidden)]
12087    impl gax::options::internal::RequestBuilder for ListDataScanJobs {
12088        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12089            &mut self.0.options
12090        }
12091    }
12092
12093    /// The request builder for [DataScanService::generate_data_quality_rules][crate::client::DataScanService::generate_data_quality_rules] calls.
12094    ///
12095    /// # Example
12096    /// ```
12097    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GenerateDataQualityRules;
12098    /// # async fn sample() -> gax::Result<()> {
12099    ///
12100    /// let builder = prepare_request_builder();
12101    /// let response = builder.send().await?;
12102    /// # Ok(()) }
12103    ///
12104    /// fn prepare_request_builder() -> GenerateDataQualityRules {
12105    ///   # panic!();
12106    ///   // ... details omitted ...
12107    /// }
12108    /// ```
12109    #[derive(Clone, Debug)]
12110    pub struct GenerateDataQualityRules(
12111        RequestBuilder<crate::model::GenerateDataQualityRulesRequest>,
12112    );
12113
12114    impl GenerateDataQualityRules {
12115        pub(crate) fn new(
12116            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12117        ) -> Self {
12118            Self(RequestBuilder::new(stub))
12119        }
12120
12121        /// Sets the full request, replacing any prior values.
12122        pub fn with_request<V: Into<crate::model::GenerateDataQualityRulesRequest>>(
12123            mut self,
12124            v: V,
12125        ) -> Self {
12126            self.0.request = v.into();
12127            self
12128        }
12129
12130        /// Sets all the options, replacing any prior values.
12131        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12132            self.0.options = v.into();
12133            self
12134        }
12135
12136        /// Sends the request.
12137        pub async fn send(self) -> Result<crate::model::GenerateDataQualityRulesResponse> {
12138            (*self.0.stub)
12139                .generate_data_quality_rules(self.0.request, self.0.options)
12140                .await
12141                .map(gax::response::Response::into_body)
12142        }
12143
12144        /// Sets the value of [name][crate::model::GenerateDataQualityRulesRequest::name].
12145        ///
12146        /// This is a **required** field for requests.
12147        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12148            self.0.request.name = v.into();
12149            self
12150        }
12151    }
12152
12153    #[doc(hidden)]
12154    impl gax::options::internal::RequestBuilder for GenerateDataQualityRules {
12155        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12156            &mut self.0.options
12157        }
12158    }
12159
12160    /// The request builder for [DataScanService::list_locations][crate::client::DataScanService::list_locations] calls.
12161    ///
12162    /// # Example
12163    /// ```
12164    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListLocations;
12165    /// # async fn sample() -> gax::Result<()> {
12166    /// use gax::paginator::ItemPaginator;
12167    ///
12168    /// let builder = prepare_request_builder();
12169    /// let mut items = builder.by_item();
12170    /// while let Some(result) = items.next().await {
12171    ///   let item = result?;
12172    /// }
12173    /// # Ok(()) }
12174    ///
12175    /// fn prepare_request_builder() -> ListLocations {
12176    ///   # panic!();
12177    ///   // ... details omitted ...
12178    /// }
12179    /// ```
12180    #[derive(Clone, Debug)]
12181    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
12182
12183    impl ListLocations {
12184        pub(crate) fn new(
12185            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12186        ) -> Self {
12187            Self(RequestBuilder::new(stub))
12188        }
12189
12190        /// Sets the full request, replacing any prior values.
12191        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
12192            mut self,
12193            v: V,
12194        ) -> Self {
12195            self.0.request = v.into();
12196            self
12197        }
12198
12199        /// Sets all the options, replacing any prior values.
12200        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12201            self.0.options = v.into();
12202            self
12203        }
12204
12205        /// Sends the request.
12206        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
12207            (*self.0.stub)
12208                .list_locations(self.0.request, self.0.options)
12209                .await
12210                .map(gax::response::Response::into_body)
12211        }
12212
12213        /// Streams each page in the collection.
12214        pub fn by_page(
12215            self,
12216        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
12217        {
12218            use std::clone::Clone;
12219            let token = self.0.request.page_token.clone();
12220            let execute = move |token: String| {
12221                let mut builder = self.clone();
12222                builder.0.request = builder.0.request.set_page_token(token);
12223                builder.send()
12224            };
12225            gax::paginator::internal::new_paginator(token, execute)
12226        }
12227
12228        /// Streams each item in the collection.
12229        pub fn by_item(
12230            self,
12231        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
12232        {
12233            use gax::paginator::Paginator;
12234            self.by_page().items()
12235        }
12236
12237        /// Sets the value of [name][location::model::ListLocationsRequest::name].
12238        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12239            self.0.request.name = v.into();
12240            self
12241        }
12242
12243        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
12244        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12245            self.0.request.filter = v.into();
12246            self
12247        }
12248
12249        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
12250        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12251            self.0.request.page_size = v.into();
12252            self
12253        }
12254
12255        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
12256        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12257            self.0.request.page_token = v.into();
12258            self
12259        }
12260    }
12261
12262    #[doc(hidden)]
12263    impl gax::options::internal::RequestBuilder for ListLocations {
12264        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12265            &mut self.0.options
12266        }
12267    }
12268
12269    /// The request builder for [DataScanService::get_location][crate::client::DataScanService::get_location] calls.
12270    ///
12271    /// # Example
12272    /// ```
12273    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetLocation;
12274    /// # async fn sample() -> gax::Result<()> {
12275    ///
12276    /// let builder = prepare_request_builder();
12277    /// let response = builder.send().await?;
12278    /// # Ok(()) }
12279    ///
12280    /// fn prepare_request_builder() -> GetLocation {
12281    ///   # panic!();
12282    ///   // ... details omitted ...
12283    /// }
12284    /// ```
12285    #[derive(Clone, Debug)]
12286    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
12287
12288    impl GetLocation {
12289        pub(crate) fn new(
12290            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12291        ) -> Self {
12292            Self(RequestBuilder::new(stub))
12293        }
12294
12295        /// Sets the full request, replacing any prior values.
12296        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
12297            self.0.request = v.into();
12298            self
12299        }
12300
12301        /// Sets all the options, replacing any prior values.
12302        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12303            self.0.options = v.into();
12304            self
12305        }
12306
12307        /// Sends the request.
12308        pub async fn send(self) -> Result<location::model::Location> {
12309            (*self.0.stub)
12310                .get_location(self.0.request, self.0.options)
12311                .await
12312                .map(gax::response::Response::into_body)
12313        }
12314
12315        /// Sets the value of [name][location::model::GetLocationRequest::name].
12316        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12317            self.0.request.name = v.into();
12318            self
12319        }
12320    }
12321
12322    #[doc(hidden)]
12323    impl gax::options::internal::RequestBuilder for GetLocation {
12324        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12325            &mut self.0.options
12326        }
12327    }
12328
12329    /// The request builder for [DataScanService::set_iam_policy][crate::client::DataScanService::set_iam_policy] calls.
12330    ///
12331    /// # Example
12332    /// ```
12333    /// # use google_cloud_dataplex_v1::builder::data_scan_service::SetIamPolicy;
12334    /// # async fn sample() -> gax::Result<()> {
12335    ///
12336    /// let builder = prepare_request_builder();
12337    /// let response = builder.send().await?;
12338    /// # Ok(()) }
12339    ///
12340    /// fn prepare_request_builder() -> SetIamPolicy {
12341    ///   # panic!();
12342    ///   // ... details omitted ...
12343    /// }
12344    /// ```
12345    #[derive(Clone, Debug)]
12346    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
12347
12348    impl SetIamPolicy {
12349        pub(crate) fn new(
12350            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12351        ) -> Self {
12352            Self(RequestBuilder::new(stub))
12353        }
12354
12355        /// Sets the full request, replacing any prior values.
12356        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
12357            self.0.request = v.into();
12358            self
12359        }
12360
12361        /// Sets all the options, replacing any prior values.
12362        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12363            self.0.options = v.into();
12364            self
12365        }
12366
12367        /// Sends the request.
12368        pub async fn send(self) -> Result<iam_v1::model::Policy> {
12369            (*self.0.stub)
12370                .set_iam_policy(self.0.request, self.0.options)
12371                .await
12372                .map(gax::response::Response::into_body)
12373        }
12374
12375        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
12376        ///
12377        /// This is a **required** field for requests.
12378        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
12379            self.0.request.resource = v.into();
12380            self
12381        }
12382
12383        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
12384        ///
12385        /// This is a **required** field for requests.
12386        pub fn set_policy<T>(mut self, v: T) -> Self
12387        where
12388            T: std::convert::Into<iam_v1::model::Policy>,
12389        {
12390            self.0.request.policy = std::option::Option::Some(v.into());
12391            self
12392        }
12393
12394        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
12395        ///
12396        /// This is a **required** field for requests.
12397        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
12398        where
12399            T: std::convert::Into<iam_v1::model::Policy>,
12400        {
12401            self.0.request.policy = v.map(|x| x.into());
12402            self
12403        }
12404
12405        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
12406        pub fn set_update_mask<T>(mut self, v: T) -> Self
12407        where
12408            T: std::convert::Into<wkt::FieldMask>,
12409        {
12410            self.0.request.update_mask = std::option::Option::Some(v.into());
12411            self
12412        }
12413
12414        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
12415        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
12416        where
12417            T: std::convert::Into<wkt::FieldMask>,
12418        {
12419            self.0.request.update_mask = v.map(|x| x.into());
12420            self
12421        }
12422    }
12423
12424    #[doc(hidden)]
12425    impl gax::options::internal::RequestBuilder for SetIamPolicy {
12426        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12427            &mut self.0.options
12428        }
12429    }
12430
12431    /// The request builder for [DataScanService::get_iam_policy][crate::client::DataScanService::get_iam_policy] calls.
12432    ///
12433    /// # Example
12434    /// ```
12435    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetIamPolicy;
12436    /// # async fn sample() -> gax::Result<()> {
12437    ///
12438    /// let builder = prepare_request_builder();
12439    /// let response = builder.send().await?;
12440    /// # Ok(()) }
12441    ///
12442    /// fn prepare_request_builder() -> GetIamPolicy {
12443    ///   # panic!();
12444    ///   // ... details omitted ...
12445    /// }
12446    /// ```
12447    #[derive(Clone, Debug)]
12448    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
12449
12450    impl GetIamPolicy {
12451        pub(crate) fn new(
12452            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12453        ) -> Self {
12454            Self(RequestBuilder::new(stub))
12455        }
12456
12457        /// Sets the full request, replacing any prior values.
12458        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
12459            self.0.request = v.into();
12460            self
12461        }
12462
12463        /// Sets all the options, replacing any prior values.
12464        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12465            self.0.options = v.into();
12466            self
12467        }
12468
12469        /// Sends the request.
12470        pub async fn send(self) -> Result<iam_v1::model::Policy> {
12471            (*self.0.stub)
12472                .get_iam_policy(self.0.request, self.0.options)
12473                .await
12474                .map(gax::response::Response::into_body)
12475        }
12476
12477        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
12478        ///
12479        /// This is a **required** field for requests.
12480        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
12481            self.0.request.resource = v.into();
12482            self
12483        }
12484
12485        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
12486        pub fn set_options<T>(mut self, v: T) -> Self
12487        where
12488            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
12489        {
12490            self.0.request.options = std::option::Option::Some(v.into());
12491            self
12492        }
12493
12494        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
12495        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
12496        where
12497            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
12498        {
12499            self.0.request.options = v.map(|x| x.into());
12500            self
12501        }
12502    }
12503
12504    #[doc(hidden)]
12505    impl gax::options::internal::RequestBuilder for GetIamPolicy {
12506        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12507            &mut self.0.options
12508        }
12509    }
12510
12511    /// The request builder for [DataScanService::test_iam_permissions][crate::client::DataScanService::test_iam_permissions] calls.
12512    ///
12513    /// # Example
12514    /// ```
12515    /// # use google_cloud_dataplex_v1::builder::data_scan_service::TestIamPermissions;
12516    /// # async fn sample() -> gax::Result<()> {
12517    ///
12518    /// let builder = prepare_request_builder();
12519    /// let response = builder.send().await?;
12520    /// # Ok(()) }
12521    ///
12522    /// fn prepare_request_builder() -> TestIamPermissions {
12523    ///   # panic!();
12524    ///   // ... details omitted ...
12525    /// }
12526    /// ```
12527    #[derive(Clone, Debug)]
12528    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
12529
12530    impl TestIamPermissions {
12531        pub(crate) fn new(
12532            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12533        ) -> Self {
12534            Self(RequestBuilder::new(stub))
12535        }
12536
12537        /// Sets the full request, replacing any prior values.
12538        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
12539            mut self,
12540            v: V,
12541        ) -> Self {
12542            self.0.request = v.into();
12543            self
12544        }
12545
12546        /// Sets all the options, replacing any prior values.
12547        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12548            self.0.options = v.into();
12549            self
12550        }
12551
12552        /// Sends the request.
12553        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
12554            (*self.0.stub)
12555                .test_iam_permissions(self.0.request, self.0.options)
12556                .await
12557                .map(gax::response::Response::into_body)
12558        }
12559
12560        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
12561        ///
12562        /// This is a **required** field for requests.
12563        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
12564            self.0.request.resource = v.into();
12565            self
12566        }
12567
12568        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
12569        ///
12570        /// This is a **required** field for requests.
12571        pub fn set_permissions<T, V>(mut self, v: T) -> Self
12572        where
12573            T: std::iter::IntoIterator<Item = V>,
12574            V: std::convert::Into<std::string::String>,
12575        {
12576            use std::iter::Iterator;
12577            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
12578            self
12579        }
12580    }
12581
12582    #[doc(hidden)]
12583    impl gax::options::internal::RequestBuilder for TestIamPermissions {
12584        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12585            &mut self.0.options
12586        }
12587    }
12588
12589    /// The request builder for [DataScanService::list_operations][crate::client::DataScanService::list_operations] calls.
12590    ///
12591    /// # Example
12592    /// ```
12593    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListOperations;
12594    /// # async fn sample() -> gax::Result<()> {
12595    /// use gax::paginator::ItemPaginator;
12596    ///
12597    /// let builder = prepare_request_builder();
12598    /// let mut items = builder.by_item();
12599    /// while let Some(result) = items.next().await {
12600    ///   let item = result?;
12601    /// }
12602    /// # Ok(()) }
12603    ///
12604    /// fn prepare_request_builder() -> ListOperations {
12605    ///   # panic!();
12606    ///   // ... details omitted ...
12607    /// }
12608    /// ```
12609    #[derive(Clone, Debug)]
12610    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
12611
12612    impl ListOperations {
12613        pub(crate) fn new(
12614            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12615        ) -> Self {
12616            Self(RequestBuilder::new(stub))
12617        }
12618
12619        /// Sets the full request, replacing any prior values.
12620        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
12621            mut self,
12622            v: V,
12623        ) -> Self {
12624            self.0.request = v.into();
12625            self
12626        }
12627
12628        /// Sets all the options, replacing any prior values.
12629        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12630            self.0.options = v.into();
12631            self
12632        }
12633
12634        /// Sends the request.
12635        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
12636            (*self.0.stub)
12637                .list_operations(self.0.request, self.0.options)
12638                .await
12639                .map(gax::response::Response::into_body)
12640        }
12641
12642        /// Streams each page in the collection.
12643        pub fn by_page(
12644            self,
12645        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
12646        {
12647            use std::clone::Clone;
12648            let token = self.0.request.page_token.clone();
12649            let execute = move |token: String| {
12650                let mut builder = self.clone();
12651                builder.0.request = builder.0.request.set_page_token(token);
12652                builder.send()
12653            };
12654            gax::paginator::internal::new_paginator(token, execute)
12655        }
12656
12657        /// Streams each item in the collection.
12658        pub fn by_item(
12659            self,
12660        ) -> impl gax::paginator::ItemPaginator<
12661            longrunning::model::ListOperationsResponse,
12662            gax::error::Error,
12663        > {
12664            use gax::paginator::Paginator;
12665            self.by_page().items()
12666        }
12667
12668        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
12669        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12670            self.0.request.name = v.into();
12671            self
12672        }
12673
12674        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
12675        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12676            self.0.request.filter = v.into();
12677            self
12678        }
12679
12680        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
12681        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12682            self.0.request.page_size = v.into();
12683            self
12684        }
12685
12686        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
12687        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12688            self.0.request.page_token = v.into();
12689            self
12690        }
12691
12692        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
12693        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
12694            self.0.request.return_partial_success = v.into();
12695            self
12696        }
12697    }
12698
12699    #[doc(hidden)]
12700    impl gax::options::internal::RequestBuilder for ListOperations {
12701        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12702            &mut self.0.options
12703        }
12704    }
12705
12706    /// The request builder for [DataScanService::get_operation][crate::client::DataScanService::get_operation] calls.
12707    ///
12708    /// # Example
12709    /// ```
12710    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetOperation;
12711    /// # async fn sample() -> gax::Result<()> {
12712    ///
12713    /// let builder = prepare_request_builder();
12714    /// let response = builder.send().await?;
12715    /// # Ok(()) }
12716    ///
12717    /// fn prepare_request_builder() -> GetOperation {
12718    ///   # panic!();
12719    ///   // ... details omitted ...
12720    /// }
12721    /// ```
12722    #[derive(Clone, Debug)]
12723    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
12724
12725    impl GetOperation {
12726        pub(crate) fn new(
12727            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12728        ) -> Self {
12729            Self(RequestBuilder::new(stub))
12730        }
12731
12732        /// Sets the full request, replacing any prior values.
12733        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
12734            mut self,
12735            v: V,
12736        ) -> Self {
12737            self.0.request = v.into();
12738            self
12739        }
12740
12741        /// Sets all the options, replacing any prior values.
12742        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12743            self.0.options = v.into();
12744            self
12745        }
12746
12747        /// Sends the request.
12748        pub async fn send(self) -> Result<longrunning::model::Operation> {
12749            (*self.0.stub)
12750                .get_operation(self.0.request, self.0.options)
12751                .await
12752                .map(gax::response::Response::into_body)
12753        }
12754
12755        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
12756        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12757            self.0.request.name = v.into();
12758            self
12759        }
12760    }
12761
12762    #[doc(hidden)]
12763    impl gax::options::internal::RequestBuilder for GetOperation {
12764        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12765            &mut self.0.options
12766        }
12767    }
12768
12769    /// The request builder for [DataScanService::delete_operation][crate::client::DataScanService::delete_operation] calls.
12770    ///
12771    /// # Example
12772    /// ```
12773    /// # use google_cloud_dataplex_v1::builder::data_scan_service::DeleteOperation;
12774    /// # async fn sample() -> gax::Result<()> {
12775    ///
12776    /// let builder = prepare_request_builder();
12777    /// let response = builder.send().await?;
12778    /// # Ok(()) }
12779    ///
12780    /// fn prepare_request_builder() -> DeleteOperation {
12781    ///   # panic!();
12782    ///   // ... details omitted ...
12783    /// }
12784    /// ```
12785    #[derive(Clone, Debug)]
12786    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
12787
12788    impl DeleteOperation {
12789        pub(crate) fn new(
12790            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12791        ) -> Self {
12792            Self(RequestBuilder::new(stub))
12793        }
12794
12795        /// Sets the full request, replacing any prior values.
12796        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
12797            mut self,
12798            v: V,
12799        ) -> Self {
12800            self.0.request = v.into();
12801            self
12802        }
12803
12804        /// Sets all the options, replacing any prior values.
12805        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12806            self.0.options = v.into();
12807            self
12808        }
12809
12810        /// Sends the request.
12811        pub async fn send(self) -> Result<()> {
12812            (*self.0.stub)
12813                .delete_operation(self.0.request, self.0.options)
12814                .await
12815                .map(gax::response::Response::into_body)
12816        }
12817
12818        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
12819        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12820            self.0.request.name = v.into();
12821            self
12822        }
12823    }
12824
12825    #[doc(hidden)]
12826    impl gax::options::internal::RequestBuilder for DeleteOperation {
12827        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12828            &mut self.0.options
12829        }
12830    }
12831
12832    /// The request builder for [DataScanService::cancel_operation][crate::client::DataScanService::cancel_operation] calls.
12833    ///
12834    /// # Example
12835    /// ```
12836    /// # use google_cloud_dataplex_v1::builder::data_scan_service::CancelOperation;
12837    /// # async fn sample() -> gax::Result<()> {
12838    ///
12839    /// let builder = prepare_request_builder();
12840    /// let response = builder.send().await?;
12841    /// # Ok(()) }
12842    ///
12843    /// fn prepare_request_builder() -> CancelOperation {
12844    ///   # panic!();
12845    ///   // ... details omitted ...
12846    /// }
12847    /// ```
12848    #[derive(Clone, Debug)]
12849    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
12850
12851    impl CancelOperation {
12852        pub(crate) fn new(
12853            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12854        ) -> Self {
12855            Self(RequestBuilder::new(stub))
12856        }
12857
12858        /// Sets the full request, replacing any prior values.
12859        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
12860            mut self,
12861            v: V,
12862        ) -> Self {
12863            self.0.request = v.into();
12864            self
12865        }
12866
12867        /// Sets all the options, replacing any prior values.
12868        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12869            self.0.options = v.into();
12870            self
12871        }
12872
12873        /// Sends the request.
12874        pub async fn send(self) -> Result<()> {
12875            (*self.0.stub)
12876                .cancel_operation(self.0.request, self.0.options)
12877                .await
12878                .map(gax::response::Response::into_body)
12879        }
12880
12881        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
12882        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12883            self.0.request.name = v.into();
12884            self
12885        }
12886    }
12887
12888    #[doc(hidden)]
12889    impl gax::options::internal::RequestBuilder for CancelOperation {
12890        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12891            &mut self.0.options
12892        }
12893    }
12894}
12895
12896pub mod metadata_service {
12897    use crate::Result;
12898
12899    /// A builder for [MetadataService][crate::client::MetadataService].
12900    ///
12901    /// ```
12902    /// # async fn sample() -> gax::client_builder::Result<()> {
12903    /// # use google_cloud_dataplex_v1::*;
12904    /// # use builder::metadata_service::ClientBuilder;
12905    /// # use client::MetadataService;
12906    /// let builder : ClientBuilder = MetadataService::builder();
12907    /// let client = builder
12908    ///     .with_endpoint("https://dataplex.googleapis.com")
12909    ///     .build().await?;
12910    /// # Ok(()) }
12911    /// ```
12912    pub type ClientBuilder =
12913        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
12914
12915    pub(crate) mod client {
12916        use super::super::super::client::MetadataService;
12917        pub struct Factory;
12918        impl gax::client_builder::internal::ClientFactory for Factory {
12919            type Client = MetadataService;
12920            type Credentials = gaxi::options::Credentials;
12921            async fn build(
12922                self,
12923                config: gaxi::options::ClientConfig,
12924            ) -> gax::client_builder::Result<Self::Client> {
12925                Self::Client::new(config).await
12926            }
12927        }
12928    }
12929
12930    /// Common implementation for [crate::client::MetadataService] request builders.
12931    #[derive(Clone, Debug)]
12932    pub(crate) struct RequestBuilder<R: std::default::Default> {
12933        stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
12934        request: R,
12935        options: gax::options::RequestOptions,
12936    }
12937
12938    impl<R> RequestBuilder<R>
12939    where
12940        R: std::default::Default,
12941    {
12942        pub(crate) fn new(
12943            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
12944        ) -> Self {
12945            Self {
12946                stub,
12947                request: R::default(),
12948                options: gax::options::RequestOptions::default(),
12949            }
12950        }
12951    }
12952
12953    /// The request builder for [MetadataService::create_entity][crate::client::MetadataService::create_entity] calls.
12954    ///
12955    /// # Example
12956    /// ```
12957    /// # use google_cloud_dataplex_v1::builder::metadata_service::CreateEntity;
12958    /// # async fn sample() -> gax::Result<()> {
12959    ///
12960    /// let builder = prepare_request_builder();
12961    /// let response = builder.send().await?;
12962    /// # Ok(()) }
12963    ///
12964    /// fn prepare_request_builder() -> CreateEntity {
12965    ///   # panic!();
12966    ///   // ... details omitted ...
12967    /// }
12968    /// ```
12969    #[derive(Clone, Debug)]
12970    pub struct CreateEntity(RequestBuilder<crate::model::CreateEntityRequest>);
12971
12972    impl CreateEntity {
12973        pub(crate) fn new(
12974            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
12975        ) -> Self {
12976            Self(RequestBuilder::new(stub))
12977        }
12978
12979        /// Sets the full request, replacing any prior values.
12980        pub fn with_request<V: Into<crate::model::CreateEntityRequest>>(mut self, v: V) -> Self {
12981            self.0.request = v.into();
12982            self
12983        }
12984
12985        /// Sets all the options, replacing any prior values.
12986        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12987            self.0.options = v.into();
12988            self
12989        }
12990
12991        /// Sends the request.
12992        pub async fn send(self) -> Result<crate::model::Entity> {
12993            (*self.0.stub)
12994                .create_entity(self.0.request, self.0.options)
12995                .await
12996                .map(gax::response::Response::into_body)
12997        }
12998
12999        /// Sets the value of [parent][crate::model::CreateEntityRequest::parent].
13000        ///
13001        /// This is a **required** field for requests.
13002        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13003            self.0.request.parent = v.into();
13004            self
13005        }
13006
13007        /// Sets the value of [entity][crate::model::CreateEntityRequest::entity].
13008        ///
13009        /// This is a **required** field for requests.
13010        pub fn set_entity<T>(mut self, v: T) -> Self
13011        where
13012            T: std::convert::Into<crate::model::Entity>,
13013        {
13014            self.0.request.entity = std::option::Option::Some(v.into());
13015            self
13016        }
13017
13018        /// Sets or clears the value of [entity][crate::model::CreateEntityRequest::entity].
13019        ///
13020        /// This is a **required** field for requests.
13021        pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
13022        where
13023            T: std::convert::Into<crate::model::Entity>,
13024        {
13025            self.0.request.entity = v.map(|x| x.into());
13026            self
13027        }
13028
13029        /// Sets the value of [validate_only][crate::model::CreateEntityRequest::validate_only].
13030        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
13031            self.0.request.validate_only = v.into();
13032            self
13033        }
13034    }
13035
13036    #[doc(hidden)]
13037    impl gax::options::internal::RequestBuilder for CreateEntity {
13038        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13039            &mut self.0.options
13040        }
13041    }
13042
13043    /// The request builder for [MetadataService::update_entity][crate::client::MetadataService::update_entity] calls.
13044    ///
13045    /// # Example
13046    /// ```
13047    /// # use google_cloud_dataplex_v1::builder::metadata_service::UpdateEntity;
13048    /// # async fn sample() -> gax::Result<()> {
13049    ///
13050    /// let builder = prepare_request_builder();
13051    /// let response = builder.send().await?;
13052    /// # Ok(()) }
13053    ///
13054    /// fn prepare_request_builder() -> UpdateEntity {
13055    ///   # panic!();
13056    ///   // ... details omitted ...
13057    /// }
13058    /// ```
13059    #[derive(Clone, Debug)]
13060    pub struct UpdateEntity(RequestBuilder<crate::model::UpdateEntityRequest>);
13061
13062    impl UpdateEntity {
13063        pub(crate) fn new(
13064            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13065        ) -> Self {
13066            Self(RequestBuilder::new(stub))
13067        }
13068
13069        /// Sets the full request, replacing any prior values.
13070        pub fn with_request<V: Into<crate::model::UpdateEntityRequest>>(mut self, v: V) -> Self {
13071            self.0.request = v.into();
13072            self
13073        }
13074
13075        /// Sets all the options, replacing any prior values.
13076        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13077            self.0.options = v.into();
13078            self
13079        }
13080
13081        /// Sends the request.
13082        pub async fn send(self) -> Result<crate::model::Entity> {
13083            (*self.0.stub)
13084                .update_entity(self.0.request, self.0.options)
13085                .await
13086                .map(gax::response::Response::into_body)
13087        }
13088
13089        /// Sets the value of [entity][crate::model::UpdateEntityRequest::entity].
13090        ///
13091        /// This is a **required** field for requests.
13092        pub fn set_entity<T>(mut self, v: T) -> Self
13093        where
13094            T: std::convert::Into<crate::model::Entity>,
13095        {
13096            self.0.request.entity = std::option::Option::Some(v.into());
13097            self
13098        }
13099
13100        /// Sets or clears the value of [entity][crate::model::UpdateEntityRequest::entity].
13101        ///
13102        /// This is a **required** field for requests.
13103        pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
13104        where
13105            T: std::convert::Into<crate::model::Entity>,
13106        {
13107            self.0.request.entity = v.map(|x| x.into());
13108            self
13109        }
13110
13111        /// Sets the value of [validate_only][crate::model::UpdateEntityRequest::validate_only].
13112        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
13113            self.0.request.validate_only = v.into();
13114            self
13115        }
13116    }
13117
13118    #[doc(hidden)]
13119    impl gax::options::internal::RequestBuilder for UpdateEntity {
13120        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13121            &mut self.0.options
13122        }
13123    }
13124
13125    /// The request builder for [MetadataService::delete_entity][crate::client::MetadataService::delete_entity] calls.
13126    ///
13127    /// # Example
13128    /// ```
13129    /// # use google_cloud_dataplex_v1::builder::metadata_service::DeleteEntity;
13130    /// # async fn sample() -> gax::Result<()> {
13131    ///
13132    /// let builder = prepare_request_builder();
13133    /// let response = builder.send().await?;
13134    /// # Ok(()) }
13135    ///
13136    /// fn prepare_request_builder() -> DeleteEntity {
13137    ///   # panic!();
13138    ///   // ... details omitted ...
13139    /// }
13140    /// ```
13141    #[derive(Clone, Debug)]
13142    pub struct DeleteEntity(RequestBuilder<crate::model::DeleteEntityRequest>);
13143
13144    impl DeleteEntity {
13145        pub(crate) fn new(
13146            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13147        ) -> Self {
13148            Self(RequestBuilder::new(stub))
13149        }
13150
13151        /// Sets the full request, replacing any prior values.
13152        pub fn with_request<V: Into<crate::model::DeleteEntityRequest>>(mut self, v: V) -> Self {
13153            self.0.request = v.into();
13154            self
13155        }
13156
13157        /// Sets all the options, replacing any prior values.
13158        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13159            self.0.options = v.into();
13160            self
13161        }
13162
13163        /// Sends the request.
13164        pub async fn send(self) -> Result<()> {
13165            (*self.0.stub)
13166                .delete_entity(self.0.request, self.0.options)
13167                .await
13168                .map(gax::response::Response::into_body)
13169        }
13170
13171        /// Sets the value of [name][crate::model::DeleteEntityRequest::name].
13172        ///
13173        /// This is a **required** field for requests.
13174        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13175            self.0.request.name = v.into();
13176            self
13177        }
13178
13179        /// Sets the value of [etag][crate::model::DeleteEntityRequest::etag].
13180        ///
13181        /// This is a **required** field for requests.
13182        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
13183            self.0.request.etag = v.into();
13184            self
13185        }
13186    }
13187
13188    #[doc(hidden)]
13189    impl gax::options::internal::RequestBuilder for DeleteEntity {
13190        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13191            &mut self.0.options
13192        }
13193    }
13194
13195    /// The request builder for [MetadataService::get_entity][crate::client::MetadataService::get_entity] calls.
13196    ///
13197    /// # Example
13198    /// ```
13199    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetEntity;
13200    /// # async fn sample() -> gax::Result<()> {
13201    ///
13202    /// let builder = prepare_request_builder();
13203    /// let response = builder.send().await?;
13204    /// # Ok(()) }
13205    ///
13206    /// fn prepare_request_builder() -> GetEntity {
13207    ///   # panic!();
13208    ///   // ... details omitted ...
13209    /// }
13210    /// ```
13211    #[derive(Clone, Debug)]
13212    pub struct GetEntity(RequestBuilder<crate::model::GetEntityRequest>);
13213
13214    impl GetEntity {
13215        pub(crate) fn new(
13216            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13217        ) -> Self {
13218            Self(RequestBuilder::new(stub))
13219        }
13220
13221        /// Sets the full request, replacing any prior values.
13222        pub fn with_request<V: Into<crate::model::GetEntityRequest>>(mut self, v: V) -> Self {
13223            self.0.request = v.into();
13224            self
13225        }
13226
13227        /// Sets all the options, replacing any prior values.
13228        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13229            self.0.options = v.into();
13230            self
13231        }
13232
13233        /// Sends the request.
13234        pub async fn send(self) -> Result<crate::model::Entity> {
13235            (*self.0.stub)
13236                .get_entity(self.0.request, self.0.options)
13237                .await
13238                .map(gax::response::Response::into_body)
13239        }
13240
13241        /// Sets the value of [name][crate::model::GetEntityRequest::name].
13242        ///
13243        /// This is a **required** field for requests.
13244        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13245            self.0.request.name = v.into();
13246            self
13247        }
13248
13249        /// Sets the value of [view][crate::model::GetEntityRequest::view].
13250        pub fn set_view<T: Into<crate::model::get_entity_request::EntityView>>(
13251            mut self,
13252            v: T,
13253        ) -> Self {
13254            self.0.request.view = v.into();
13255            self
13256        }
13257    }
13258
13259    #[doc(hidden)]
13260    impl gax::options::internal::RequestBuilder for GetEntity {
13261        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13262            &mut self.0.options
13263        }
13264    }
13265
13266    /// The request builder for [MetadataService::list_entities][crate::client::MetadataService::list_entities] calls.
13267    ///
13268    /// # Example
13269    /// ```
13270    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListEntities;
13271    /// # async fn sample() -> gax::Result<()> {
13272    /// use gax::paginator::ItemPaginator;
13273    ///
13274    /// let builder = prepare_request_builder();
13275    /// let mut items = builder.by_item();
13276    /// while let Some(result) = items.next().await {
13277    ///   let item = result?;
13278    /// }
13279    /// # Ok(()) }
13280    ///
13281    /// fn prepare_request_builder() -> ListEntities {
13282    ///   # panic!();
13283    ///   // ... details omitted ...
13284    /// }
13285    /// ```
13286    #[derive(Clone, Debug)]
13287    pub struct ListEntities(RequestBuilder<crate::model::ListEntitiesRequest>);
13288
13289    impl ListEntities {
13290        pub(crate) fn new(
13291            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13292        ) -> Self {
13293            Self(RequestBuilder::new(stub))
13294        }
13295
13296        /// Sets the full request, replacing any prior values.
13297        pub fn with_request<V: Into<crate::model::ListEntitiesRequest>>(mut self, v: V) -> Self {
13298            self.0.request = v.into();
13299            self
13300        }
13301
13302        /// Sets all the options, replacing any prior values.
13303        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13304            self.0.options = v.into();
13305            self
13306        }
13307
13308        /// Sends the request.
13309        pub async fn send(self) -> Result<crate::model::ListEntitiesResponse> {
13310            (*self.0.stub)
13311                .list_entities(self.0.request, self.0.options)
13312                .await
13313                .map(gax::response::Response::into_body)
13314        }
13315
13316        /// Streams each page in the collection.
13317        pub fn by_page(
13318            self,
13319        ) -> impl gax::paginator::Paginator<crate::model::ListEntitiesResponse, gax::error::Error>
13320        {
13321            use std::clone::Clone;
13322            let token = self.0.request.page_token.clone();
13323            let execute = move |token: String| {
13324                let mut builder = self.clone();
13325                builder.0.request = builder.0.request.set_page_token(token);
13326                builder.send()
13327            };
13328            gax::paginator::internal::new_paginator(token, execute)
13329        }
13330
13331        /// Streams each item in the collection.
13332        pub fn by_item(
13333            self,
13334        ) -> impl gax::paginator::ItemPaginator<crate::model::ListEntitiesResponse, gax::error::Error>
13335        {
13336            use gax::paginator::Paginator;
13337            self.by_page().items()
13338        }
13339
13340        /// Sets the value of [parent][crate::model::ListEntitiesRequest::parent].
13341        ///
13342        /// This is a **required** field for requests.
13343        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13344            self.0.request.parent = v.into();
13345            self
13346        }
13347
13348        /// Sets the value of [view][crate::model::ListEntitiesRequest::view].
13349        ///
13350        /// This is a **required** field for requests.
13351        pub fn set_view<T: Into<crate::model::list_entities_request::EntityView>>(
13352            mut self,
13353            v: T,
13354        ) -> Self {
13355            self.0.request.view = v.into();
13356            self
13357        }
13358
13359        /// Sets the value of [page_size][crate::model::ListEntitiesRequest::page_size].
13360        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13361            self.0.request.page_size = v.into();
13362            self
13363        }
13364
13365        /// Sets the value of [page_token][crate::model::ListEntitiesRequest::page_token].
13366        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13367            self.0.request.page_token = v.into();
13368            self
13369        }
13370
13371        /// Sets the value of [filter][crate::model::ListEntitiesRequest::filter].
13372        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13373            self.0.request.filter = v.into();
13374            self
13375        }
13376    }
13377
13378    #[doc(hidden)]
13379    impl gax::options::internal::RequestBuilder for ListEntities {
13380        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13381            &mut self.0.options
13382        }
13383    }
13384
13385    /// The request builder for [MetadataService::create_partition][crate::client::MetadataService::create_partition] calls.
13386    ///
13387    /// # Example
13388    /// ```
13389    /// # use google_cloud_dataplex_v1::builder::metadata_service::CreatePartition;
13390    /// # async fn sample() -> gax::Result<()> {
13391    ///
13392    /// let builder = prepare_request_builder();
13393    /// let response = builder.send().await?;
13394    /// # Ok(()) }
13395    ///
13396    /// fn prepare_request_builder() -> CreatePartition {
13397    ///   # panic!();
13398    ///   // ... details omitted ...
13399    /// }
13400    /// ```
13401    #[derive(Clone, Debug)]
13402    pub struct CreatePartition(RequestBuilder<crate::model::CreatePartitionRequest>);
13403
13404    impl CreatePartition {
13405        pub(crate) fn new(
13406            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13407        ) -> Self {
13408            Self(RequestBuilder::new(stub))
13409        }
13410
13411        /// Sets the full request, replacing any prior values.
13412        pub fn with_request<V: Into<crate::model::CreatePartitionRequest>>(mut self, v: V) -> Self {
13413            self.0.request = v.into();
13414            self
13415        }
13416
13417        /// Sets all the options, replacing any prior values.
13418        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13419            self.0.options = v.into();
13420            self
13421        }
13422
13423        /// Sends the request.
13424        pub async fn send(self) -> Result<crate::model::Partition> {
13425            (*self.0.stub)
13426                .create_partition(self.0.request, self.0.options)
13427                .await
13428                .map(gax::response::Response::into_body)
13429        }
13430
13431        /// Sets the value of [parent][crate::model::CreatePartitionRequest::parent].
13432        ///
13433        /// This is a **required** field for requests.
13434        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13435            self.0.request.parent = v.into();
13436            self
13437        }
13438
13439        /// Sets the value of [partition][crate::model::CreatePartitionRequest::partition].
13440        ///
13441        /// This is a **required** field for requests.
13442        pub fn set_partition<T>(mut self, v: T) -> Self
13443        where
13444            T: std::convert::Into<crate::model::Partition>,
13445        {
13446            self.0.request.partition = std::option::Option::Some(v.into());
13447            self
13448        }
13449
13450        /// Sets or clears the value of [partition][crate::model::CreatePartitionRequest::partition].
13451        ///
13452        /// This is a **required** field for requests.
13453        pub fn set_or_clear_partition<T>(mut self, v: std::option::Option<T>) -> Self
13454        where
13455            T: std::convert::Into<crate::model::Partition>,
13456        {
13457            self.0.request.partition = v.map(|x| x.into());
13458            self
13459        }
13460
13461        /// Sets the value of [validate_only][crate::model::CreatePartitionRequest::validate_only].
13462        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
13463            self.0.request.validate_only = v.into();
13464            self
13465        }
13466    }
13467
13468    #[doc(hidden)]
13469    impl gax::options::internal::RequestBuilder for CreatePartition {
13470        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13471            &mut self.0.options
13472        }
13473    }
13474
13475    /// The request builder for [MetadataService::delete_partition][crate::client::MetadataService::delete_partition] calls.
13476    ///
13477    /// # Example
13478    /// ```
13479    /// # use google_cloud_dataplex_v1::builder::metadata_service::DeletePartition;
13480    /// # async fn sample() -> gax::Result<()> {
13481    ///
13482    /// let builder = prepare_request_builder();
13483    /// let response = builder.send().await?;
13484    /// # Ok(()) }
13485    ///
13486    /// fn prepare_request_builder() -> DeletePartition {
13487    ///   # panic!();
13488    ///   // ... details omitted ...
13489    /// }
13490    /// ```
13491    #[derive(Clone, Debug)]
13492    pub struct DeletePartition(RequestBuilder<crate::model::DeletePartitionRequest>);
13493
13494    impl DeletePartition {
13495        pub(crate) fn new(
13496            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13497        ) -> Self {
13498            Self(RequestBuilder::new(stub))
13499        }
13500
13501        /// Sets the full request, replacing any prior values.
13502        pub fn with_request<V: Into<crate::model::DeletePartitionRequest>>(mut self, v: V) -> Self {
13503            self.0.request = v.into();
13504            self
13505        }
13506
13507        /// Sets all the options, replacing any prior values.
13508        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13509            self.0.options = v.into();
13510            self
13511        }
13512
13513        /// Sends the request.
13514        pub async fn send(self) -> Result<()> {
13515            (*self.0.stub)
13516                .delete_partition(self.0.request, self.0.options)
13517                .await
13518                .map(gax::response::Response::into_body)
13519        }
13520
13521        /// Sets the value of [name][crate::model::DeletePartitionRequest::name].
13522        ///
13523        /// This is a **required** field for requests.
13524        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13525            self.0.request.name = v.into();
13526            self
13527        }
13528
13529        /// Sets the value of [etag][crate::model::DeletePartitionRequest::etag].
13530        #[deprecated]
13531        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
13532            self.0.request.etag = v.into();
13533            self
13534        }
13535    }
13536
13537    #[doc(hidden)]
13538    impl gax::options::internal::RequestBuilder for DeletePartition {
13539        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13540            &mut self.0.options
13541        }
13542    }
13543
13544    /// The request builder for [MetadataService::get_partition][crate::client::MetadataService::get_partition] calls.
13545    ///
13546    /// # Example
13547    /// ```
13548    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetPartition;
13549    /// # async fn sample() -> gax::Result<()> {
13550    ///
13551    /// let builder = prepare_request_builder();
13552    /// let response = builder.send().await?;
13553    /// # Ok(()) }
13554    ///
13555    /// fn prepare_request_builder() -> GetPartition {
13556    ///   # panic!();
13557    ///   // ... details omitted ...
13558    /// }
13559    /// ```
13560    #[derive(Clone, Debug)]
13561    pub struct GetPartition(RequestBuilder<crate::model::GetPartitionRequest>);
13562
13563    impl GetPartition {
13564        pub(crate) fn new(
13565            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13566        ) -> Self {
13567            Self(RequestBuilder::new(stub))
13568        }
13569
13570        /// Sets the full request, replacing any prior values.
13571        pub fn with_request<V: Into<crate::model::GetPartitionRequest>>(mut self, v: V) -> Self {
13572            self.0.request = v.into();
13573            self
13574        }
13575
13576        /// Sets all the options, replacing any prior values.
13577        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13578            self.0.options = v.into();
13579            self
13580        }
13581
13582        /// Sends the request.
13583        pub async fn send(self) -> Result<crate::model::Partition> {
13584            (*self.0.stub)
13585                .get_partition(self.0.request, self.0.options)
13586                .await
13587                .map(gax::response::Response::into_body)
13588        }
13589
13590        /// Sets the value of [name][crate::model::GetPartitionRequest::name].
13591        ///
13592        /// This is a **required** field for requests.
13593        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13594            self.0.request.name = v.into();
13595            self
13596        }
13597    }
13598
13599    #[doc(hidden)]
13600    impl gax::options::internal::RequestBuilder for GetPartition {
13601        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13602            &mut self.0.options
13603        }
13604    }
13605
13606    /// The request builder for [MetadataService::list_partitions][crate::client::MetadataService::list_partitions] calls.
13607    ///
13608    /// # Example
13609    /// ```
13610    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListPartitions;
13611    /// # async fn sample() -> gax::Result<()> {
13612    /// use gax::paginator::ItemPaginator;
13613    ///
13614    /// let builder = prepare_request_builder();
13615    /// let mut items = builder.by_item();
13616    /// while let Some(result) = items.next().await {
13617    ///   let item = result?;
13618    /// }
13619    /// # Ok(()) }
13620    ///
13621    /// fn prepare_request_builder() -> ListPartitions {
13622    ///   # panic!();
13623    ///   // ... details omitted ...
13624    /// }
13625    /// ```
13626    #[derive(Clone, Debug)]
13627    pub struct ListPartitions(RequestBuilder<crate::model::ListPartitionsRequest>);
13628
13629    impl ListPartitions {
13630        pub(crate) fn new(
13631            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13632        ) -> Self {
13633            Self(RequestBuilder::new(stub))
13634        }
13635
13636        /// Sets the full request, replacing any prior values.
13637        pub fn with_request<V: Into<crate::model::ListPartitionsRequest>>(mut self, v: V) -> Self {
13638            self.0.request = v.into();
13639            self
13640        }
13641
13642        /// Sets all the options, replacing any prior values.
13643        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13644            self.0.options = v.into();
13645            self
13646        }
13647
13648        /// Sends the request.
13649        pub async fn send(self) -> Result<crate::model::ListPartitionsResponse> {
13650            (*self.0.stub)
13651                .list_partitions(self.0.request, self.0.options)
13652                .await
13653                .map(gax::response::Response::into_body)
13654        }
13655
13656        /// Streams each page in the collection.
13657        pub fn by_page(
13658            self,
13659        ) -> impl gax::paginator::Paginator<crate::model::ListPartitionsResponse, gax::error::Error>
13660        {
13661            use std::clone::Clone;
13662            let token = self.0.request.page_token.clone();
13663            let execute = move |token: String| {
13664                let mut builder = self.clone();
13665                builder.0.request = builder.0.request.set_page_token(token);
13666                builder.send()
13667            };
13668            gax::paginator::internal::new_paginator(token, execute)
13669        }
13670
13671        /// Streams each item in the collection.
13672        pub fn by_item(
13673            self,
13674        ) -> impl gax::paginator::ItemPaginator<crate::model::ListPartitionsResponse, gax::error::Error>
13675        {
13676            use gax::paginator::Paginator;
13677            self.by_page().items()
13678        }
13679
13680        /// Sets the value of [parent][crate::model::ListPartitionsRequest::parent].
13681        ///
13682        /// This is a **required** field for requests.
13683        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13684            self.0.request.parent = v.into();
13685            self
13686        }
13687
13688        /// Sets the value of [page_size][crate::model::ListPartitionsRequest::page_size].
13689        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13690            self.0.request.page_size = v.into();
13691            self
13692        }
13693
13694        /// Sets the value of [page_token][crate::model::ListPartitionsRequest::page_token].
13695        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13696            self.0.request.page_token = v.into();
13697            self
13698        }
13699
13700        /// Sets the value of [filter][crate::model::ListPartitionsRequest::filter].
13701        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13702            self.0.request.filter = v.into();
13703            self
13704        }
13705    }
13706
13707    #[doc(hidden)]
13708    impl gax::options::internal::RequestBuilder for ListPartitions {
13709        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13710            &mut self.0.options
13711        }
13712    }
13713
13714    /// The request builder for [MetadataService::list_locations][crate::client::MetadataService::list_locations] calls.
13715    ///
13716    /// # Example
13717    /// ```
13718    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListLocations;
13719    /// # async fn sample() -> gax::Result<()> {
13720    /// use gax::paginator::ItemPaginator;
13721    ///
13722    /// let builder = prepare_request_builder();
13723    /// let mut items = builder.by_item();
13724    /// while let Some(result) = items.next().await {
13725    ///   let item = result?;
13726    /// }
13727    /// # Ok(()) }
13728    ///
13729    /// fn prepare_request_builder() -> ListLocations {
13730    ///   # panic!();
13731    ///   // ... details omitted ...
13732    /// }
13733    /// ```
13734    #[derive(Clone, Debug)]
13735    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
13736
13737    impl ListLocations {
13738        pub(crate) fn new(
13739            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13740        ) -> Self {
13741            Self(RequestBuilder::new(stub))
13742        }
13743
13744        /// Sets the full request, replacing any prior values.
13745        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
13746            mut self,
13747            v: V,
13748        ) -> Self {
13749            self.0.request = v.into();
13750            self
13751        }
13752
13753        /// Sets all the options, replacing any prior values.
13754        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13755            self.0.options = v.into();
13756            self
13757        }
13758
13759        /// Sends the request.
13760        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
13761            (*self.0.stub)
13762                .list_locations(self.0.request, self.0.options)
13763                .await
13764                .map(gax::response::Response::into_body)
13765        }
13766
13767        /// Streams each page in the collection.
13768        pub fn by_page(
13769            self,
13770        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
13771        {
13772            use std::clone::Clone;
13773            let token = self.0.request.page_token.clone();
13774            let execute = move |token: String| {
13775                let mut builder = self.clone();
13776                builder.0.request = builder.0.request.set_page_token(token);
13777                builder.send()
13778            };
13779            gax::paginator::internal::new_paginator(token, execute)
13780        }
13781
13782        /// Streams each item in the collection.
13783        pub fn by_item(
13784            self,
13785        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
13786        {
13787            use gax::paginator::Paginator;
13788            self.by_page().items()
13789        }
13790
13791        /// Sets the value of [name][location::model::ListLocationsRequest::name].
13792        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13793            self.0.request.name = v.into();
13794            self
13795        }
13796
13797        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
13798        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13799            self.0.request.filter = v.into();
13800            self
13801        }
13802
13803        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
13804        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13805            self.0.request.page_size = v.into();
13806            self
13807        }
13808
13809        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
13810        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13811            self.0.request.page_token = v.into();
13812            self
13813        }
13814    }
13815
13816    #[doc(hidden)]
13817    impl gax::options::internal::RequestBuilder for ListLocations {
13818        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13819            &mut self.0.options
13820        }
13821    }
13822
13823    /// The request builder for [MetadataService::get_location][crate::client::MetadataService::get_location] calls.
13824    ///
13825    /// # Example
13826    /// ```
13827    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetLocation;
13828    /// # async fn sample() -> gax::Result<()> {
13829    ///
13830    /// let builder = prepare_request_builder();
13831    /// let response = builder.send().await?;
13832    /// # Ok(()) }
13833    ///
13834    /// fn prepare_request_builder() -> GetLocation {
13835    ///   # panic!();
13836    ///   // ... details omitted ...
13837    /// }
13838    /// ```
13839    #[derive(Clone, Debug)]
13840    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
13841
13842    impl GetLocation {
13843        pub(crate) fn new(
13844            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13845        ) -> Self {
13846            Self(RequestBuilder::new(stub))
13847        }
13848
13849        /// Sets the full request, replacing any prior values.
13850        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
13851            self.0.request = v.into();
13852            self
13853        }
13854
13855        /// Sets all the options, replacing any prior values.
13856        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13857            self.0.options = v.into();
13858            self
13859        }
13860
13861        /// Sends the request.
13862        pub async fn send(self) -> Result<location::model::Location> {
13863            (*self.0.stub)
13864                .get_location(self.0.request, self.0.options)
13865                .await
13866                .map(gax::response::Response::into_body)
13867        }
13868
13869        /// Sets the value of [name][location::model::GetLocationRequest::name].
13870        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13871            self.0.request.name = v.into();
13872            self
13873        }
13874    }
13875
13876    #[doc(hidden)]
13877    impl gax::options::internal::RequestBuilder for GetLocation {
13878        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13879            &mut self.0.options
13880        }
13881    }
13882
13883    /// The request builder for [MetadataService::set_iam_policy][crate::client::MetadataService::set_iam_policy] calls.
13884    ///
13885    /// # Example
13886    /// ```
13887    /// # use google_cloud_dataplex_v1::builder::metadata_service::SetIamPolicy;
13888    /// # async fn sample() -> gax::Result<()> {
13889    ///
13890    /// let builder = prepare_request_builder();
13891    /// let response = builder.send().await?;
13892    /// # Ok(()) }
13893    ///
13894    /// fn prepare_request_builder() -> SetIamPolicy {
13895    ///   # panic!();
13896    ///   // ... details omitted ...
13897    /// }
13898    /// ```
13899    #[derive(Clone, Debug)]
13900    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
13901
13902    impl SetIamPolicy {
13903        pub(crate) fn new(
13904            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13905        ) -> Self {
13906            Self(RequestBuilder::new(stub))
13907        }
13908
13909        /// Sets the full request, replacing any prior values.
13910        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
13911            self.0.request = v.into();
13912            self
13913        }
13914
13915        /// Sets all the options, replacing any prior values.
13916        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13917            self.0.options = v.into();
13918            self
13919        }
13920
13921        /// Sends the request.
13922        pub async fn send(self) -> Result<iam_v1::model::Policy> {
13923            (*self.0.stub)
13924                .set_iam_policy(self.0.request, self.0.options)
13925                .await
13926                .map(gax::response::Response::into_body)
13927        }
13928
13929        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
13930        ///
13931        /// This is a **required** field for requests.
13932        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
13933            self.0.request.resource = v.into();
13934            self
13935        }
13936
13937        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
13938        ///
13939        /// This is a **required** field for requests.
13940        pub fn set_policy<T>(mut self, v: T) -> Self
13941        where
13942            T: std::convert::Into<iam_v1::model::Policy>,
13943        {
13944            self.0.request.policy = std::option::Option::Some(v.into());
13945            self
13946        }
13947
13948        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
13949        ///
13950        /// This is a **required** field for requests.
13951        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
13952        where
13953            T: std::convert::Into<iam_v1::model::Policy>,
13954        {
13955            self.0.request.policy = v.map(|x| x.into());
13956            self
13957        }
13958
13959        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
13960        pub fn set_update_mask<T>(mut self, v: T) -> Self
13961        where
13962            T: std::convert::Into<wkt::FieldMask>,
13963        {
13964            self.0.request.update_mask = std::option::Option::Some(v.into());
13965            self
13966        }
13967
13968        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
13969        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
13970        where
13971            T: std::convert::Into<wkt::FieldMask>,
13972        {
13973            self.0.request.update_mask = v.map(|x| x.into());
13974            self
13975        }
13976    }
13977
13978    #[doc(hidden)]
13979    impl gax::options::internal::RequestBuilder for SetIamPolicy {
13980        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13981            &mut self.0.options
13982        }
13983    }
13984
13985    /// The request builder for [MetadataService::get_iam_policy][crate::client::MetadataService::get_iam_policy] calls.
13986    ///
13987    /// # Example
13988    /// ```
13989    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetIamPolicy;
13990    /// # async fn sample() -> gax::Result<()> {
13991    ///
13992    /// let builder = prepare_request_builder();
13993    /// let response = builder.send().await?;
13994    /// # Ok(()) }
13995    ///
13996    /// fn prepare_request_builder() -> GetIamPolicy {
13997    ///   # panic!();
13998    ///   // ... details omitted ...
13999    /// }
14000    /// ```
14001    #[derive(Clone, Debug)]
14002    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
14003
14004    impl GetIamPolicy {
14005        pub(crate) fn new(
14006            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14007        ) -> Self {
14008            Self(RequestBuilder::new(stub))
14009        }
14010
14011        /// Sets the full request, replacing any prior values.
14012        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
14013            self.0.request = v.into();
14014            self
14015        }
14016
14017        /// Sets all the options, replacing any prior values.
14018        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14019            self.0.options = v.into();
14020            self
14021        }
14022
14023        /// Sends the request.
14024        pub async fn send(self) -> Result<iam_v1::model::Policy> {
14025            (*self.0.stub)
14026                .get_iam_policy(self.0.request, self.0.options)
14027                .await
14028                .map(gax::response::Response::into_body)
14029        }
14030
14031        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
14032        ///
14033        /// This is a **required** field for requests.
14034        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
14035            self.0.request.resource = v.into();
14036            self
14037        }
14038
14039        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
14040        pub fn set_options<T>(mut self, v: T) -> Self
14041        where
14042            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
14043        {
14044            self.0.request.options = std::option::Option::Some(v.into());
14045            self
14046        }
14047
14048        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
14049        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
14050        where
14051            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
14052        {
14053            self.0.request.options = v.map(|x| x.into());
14054            self
14055        }
14056    }
14057
14058    #[doc(hidden)]
14059    impl gax::options::internal::RequestBuilder for GetIamPolicy {
14060        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14061            &mut self.0.options
14062        }
14063    }
14064
14065    /// The request builder for [MetadataService::test_iam_permissions][crate::client::MetadataService::test_iam_permissions] calls.
14066    ///
14067    /// # Example
14068    /// ```
14069    /// # use google_cloud_dataplex_v1::builder::metadata_service::TestIamPermissions;
14070    /// # async fn sample() -> gax::Result<()> {
14071    ///
14072    /// let builder = prepare_request_builder();
14073    /// let response = builder.send().await?;
14074    /// # Ok(()) }
14075    ///
14076    /// fn prepare_request_builder() -> TestIamPermissions {
14077    ///   # panic!();
14078    ///   // ... details omitted ...
14079    /// }
14080    /// ```
14081    #[derive(Clone, Debug)]
14082    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
14083
14084    impl TestIamPermissions {
14085        pub(crate) fn new(
14086            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14087        ) -> Self {
14088            Self(RequestBuilder::new(stub))
14089        }
14090
14091        /// Sets the full request, replacing any prior values.
14092        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
14093            mut self,
14094            v: V,
14095        ) -> Self {
14096            self.0.request = v.into();
14097            self
14098        }
14099
14100        /// Sets all the options, replacing any prior values.
14101        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14102            self.0.options = v.into();
14103            self
14104        }
14105
14106        /// Sends the request.
14107        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
14108            (*self.0.stub)
14109                .test_iam_permissions(self.0.request, self.0.options)
14110                .await
14111                .map(gax::response::Response::into_body)
14112        }
14113
14114        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
14115        ///
14116        /// This is a **required** field for requests.
14117        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
14118            self.0.request.resource = v.into();
14119            self
14120        }
14121
14122        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
14123        ///
14124        /// This is a **required** field for requests.
14125        pub fn set_permissions<T, V>(mut self, v: T) -> Self
14126        where
14127            T: std::iter::IntoIterator<Item = V>,
14128            V: std::convert::Into<std::string::String>,
14129        {
14130            use std::iter::Iterator;
14131            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
14132            self
14133        }
14134    }
14135
14136    #[doc(hidden)]
14137    impl gax::options::internal::RequestBuilder for TestIamPermissions {
14138        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14139            &mut self.0.options
14140        }
14141    }
14142
14143    /// The request builder for [MetadataService::list_operations][crate::client::MetadataService::list_operations] calls.
14144    ///
14145    /// # Example
14146    /// ```
14147    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListOperations;
14148    /// # async fn sample() -> gax::Result<()> {
14149    /// use gax::paginator::ItemPaginator;
14150    ///
14151    /// let builder = prepare_request_builder();
14152    /// let mut items = builder.by_item();
14153    /// while let Some(result) = items.next().await {
14154    ///   let item = result?;
14155    /// }
14156    /// # Ok(()) }
14157    ///
14158    /// fn prepare_request_builder() -> ListOperations {
14159    ///   # panic!();
14160    ///   // ... details omitted ...
14161    /// }
14162    /// ```
14163    #[derive(Clone, Debug)]
14164    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
14165
14166    impl ListOperations {
14167        pub(crate) fn new(
14168            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14169        ) -> Self {
14170            Self(RequestBuilder::new(stub))
14171        }
14172
14173        /// Sets the full request, replacing any prior values.
14174        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
14175            mut self,
14176            v: V,
14177        ) -> Self {
14178            self.0.request = v.into();
14179            self
14180        }
14181
14182        /// Sets all the options, replacing any prior values.
14183        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14184            self.0.options = v.into();
14185            self
14186        }
14187
14188        /// Sends the request.
14189        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
14190            (*self.0.stub)
14191                .list_operations(self.0.request, self.0.options)
14192                .await
14193                .map(gax::response::Response::into_body)
14194        }
14195
14196        /// Streams each page in the collection.
14197        pub fn by_page(
14198            self,
14199        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
14200        {
14201            use std::clone::Clone;
14202            let token = self.0.request.page_token.clone();
14203            let execute = move |token: String| {
14204                let mut builder = self.clone();
14205                builder.0.request = builder.0.request.set_page_token(token);
14206                builder.send()
14207            };
14208            gax::paginator::internal::new_paginator(token, execute)
14209        }
14210
14211        /// Streams each item in the collection.
14212        pub fn by_item(
14213            self,
14214        ) -> impl gax::paginator::ItemPaginator<
14215            longrunning::model::ListOperationsResponse,
14216            gax::error::Error,
14217        > {
14218            use gax::paginator::Paginator;
14219            self.by_page().items()
14220        }
14221
14222        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
14223        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14224            self.0.request.name = v.into();
14225            self
14226        }
14227
14228        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
14229        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
14230            self.0.request.filter = v.into();
14231            self
14232        }
14233
14234        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
14235        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
14236            self.0.request.page_size = v.into();
14237            self
14238        }
14239
14240        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
14241        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
14242            self.0.request.page_token = v.into();
14243            self
14244        }
14245
14246        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
14247        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
14248            self.0.request.return_partial_success = v.into();
14249            self
14250        }
14251    }
14252
14253    #[doc(hidden)]
14254    impl gax::options::internal::RequestBuilder for ListOperations {
14255        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14256            &mut self.0.options
14257        }
14258    }
14259
14260    /// The request builder for [MetadataService::get_operation][crate::client::MetadataService::get_operation] calls.
14261    ///
14262    /// # Example
14263    /// ```
14264    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetOperation;
14265    /// # async fn sample() -> gax::Result<()> {
14266    ///
14267    /// let builder = prepare_request_builder();
14268    /// let response = builder.send().await?;
14269    /// # Ok(()) }
14270    ///
14271    /// fn prepare_request_builder() -> GetOperation {
14272    ///   # panic!();
14273    ///   // ... details omitted ...
14274    /// }
14275    /// ```
14276    #[derive(Clone, Debug)]
14277    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
14278
14279    impl GetOperation {
14280        pub(crate) fn new(
14281            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14282        ) -> Self {
14283            Self(RequestBuilder::new(stub))
14284        }
14285
14286        /// Sets the full request, replacing any prior values.
14287        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
14288            mut self,
14289            v: V,
14290        ) -> Self {
14291            self.0.request = v.into();
14292            self
14293        }
14294
14295        /// Sets all the options, replacing any prior values.
14296        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14297            self.0.options = v.into();
14298            self
14299        }
14300
14301        /// Sends the request.
14302        pub async fn send(self) -> Result<longrunning::model::Operation> {
14303            (*self.0.stub)
14304                .get_operation(self.0.request, self.0.options)
14305                .await
14306                .map(gax::response::Response::into_body)
14307        }
14308
14309        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
14310        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14311            self.0.request.name = v.into();
14312            self
14313        }
14314    }
14315
14316    #[doc(hidden)]
14317    impl gax::options::internal::RequestBuilder for GetOperation {
14318        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14319            &mut self.0.options
14320        }
14321    }
14322
14323    /// The request builder for [MetadataService::delete_operation][crate::client::MetadataService::delete_operation] calls.
14324    ///
14325    /// # Example
14326    /// ```
14327    /// # use google_cloud_dataplex_v1::builder::metadata_service::DeleteOperation;
14328    /// # async fn sample() -> gax::Result<()> {
14329    ///
14330    /// let builder = prepare_request_builder();
14331    /// let response = builder.send().await?;
14332    /// # Ok(()) }
14333    ///
14334    /// fn prepare_request_builder() -> DeleteOperation {
14335    ///   # panic!();
14336    ///   // ... details omitted ...
14337    /// }
14338    /// ```
14339    #[derive(Clone, Debug)]
14340    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
14341
14342    impl DeleteOperation {
14343        pub(crate) fn new(
14344            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14345        ) -> Self {
14346            Self(RequestBuilder::new(stub))
14347        }
14348
14349        /// Sets the full request, replacing any prior values.
14350        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
14351            mut self,
14352            v: V,
14353        ) -> Self {
14354            self.0.request = v.into();
14355            self
14356        }
14357
14358        /// Sets all the options, replacing any prior values.
14359        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14360            self.0.options = v.into();
14361            self
14362        }
14363
14364        /// Sends the request.
14365        pub async fn send(self) -> Result<()> {
14366            (*self.0.stub)
14367                .delete_operation(self.0.request, self.0.options)
14368                .await
14369                .map(gax::response::Response::into_body)
14370        }
14371
14372        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
14373        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14374            self.0.request.name = v.into();
14375            self
14376        }
14377    }
14378
14379    #[doc(hidden)]
14380    impl gax::options::internal::RequestBuilder for DeleteOperation {
14381        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14382            &mut self.0.options
14383        }
14384    }
14385
14386    /// The request builder for [MetadataService::cancel_operation][crate::client::MetadataService::cancel_operation] calls.
14387    ///
14388    /// # Example
14389    /// ```
14390    /// # use google_cloud_dataplex_v1::builder::metadata_service::CancelOperation;
14391    /// # async fn sample() -> gax::Result<()> {
14392    ///
14393    /// let builder = prepare_request_builder();
14394    /// let response = builder.send().await?;
14395    /// # Ok(()) }
14396    ///
14397    /// fn prepare_request_builder() -> CancelOperation {
14398    ///   # panic!();
14399    ///   // ... details omitted ...
14400    /// }
14401    /// ```
14402    #[derive(Clone, Debug)]
14403    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
14404
14405    impl CancelOperation {
14406        pub(crate) fn new(
14407            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14408        ) -> Self {
14409            Self(RequestBuilder::new(stub))
14410        }
14411
14412        /// Sets the full request, replacing any prior values.
14413        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
14414            mut self,
14415            v: V,
14416        ) -> Self {
14417            self.0.request = v.into();
14418            self
14419        }
14420
14421        /// Sets all the options, replacing any prior values.
14422        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14423            self.0.options = v.into();
14424            self
14425        }
14426
14427        /// Sends the request.
14428        pub async fn send(self) -> Result<()> {
14429            (*self.0.stub)
14430                .cancel_operation(self.0.request, self.0.options)
14431                .await
14432                .map(gax::response::Response::into_body)
14433        }
14434
14435        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
14436        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14437            self.0.request.name = v.into();
14438            self
14439        }
14440    }
14441
14442    #[doc(hidden)]
14443    impl gax::options::internal::RequestBuilder for CancelOperation {
14444        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14445            &mut self.0.options
14446        }
14447    }
14448}
14449
14450pub mod dataplex_service {
14451    use crate::Result;
14452
14453    /// A builder for [DataplexService][crate::client::DataplexService].
14454    ///
14455    /// ```
14456    /// # async fn sample() -> gax::client_builder::Result<()> {
14457    /// # use google_cloud_dataplex_v1::*;
14458    /// # use builder::dataplex_service::ClientBuilder;
14459    /// # use client::DataplexService;
14460    /// let builder : ClientBuilder = DataplexService::builder();
14461    /// let client = builder
14462    ///     .with_endpoint("https://dataplex.googleapis.com")
14463    ///     .build().await?;
14464    /// # Ok(()) }
14465    /// ```
14466    pub type ClientBuilder =
14467        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
14468
14469    pub(crate) mod client {
14470        use super::super::super::client::DataplexService;
14471        pub struct Factory;
14472        impl gax::client_builder::internal::ClientFactory for Factory {
14473            type Client = DataplexService;
14474            type Credentials = gaxi::options::Credentials;
14475            async fn build(
14476                self,
14477                config: gaxi::options::ClientConfig,
14478            ) -> gax::client_builder::Result<Self::Client> {
14479                Self::Client::new(config).await
14480            }
14481        }
14482    }
14483
14484    /// Common implementation for [crate::client::DataplexService] request builders.
14485    #[derive(Clone, Debug)]
14486    pub(crate) struct RequestBuilder<R: std::default::Default> {
14487        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14488        request: R,
14489        options: gax::options::RequestOptions,
14490    }
14491
14492    impl<R> RequestBuilder<R>
14493    where
14494        R: std::default::Default,
14495    {
14496        pub(crate) fn new(
14497            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14498        ) -> Self {
14499            Self {
14500                stub,
14501                request: R::default(),
14502                options: gax::options::RequestOptions::default(),
14503            }
14504        }
14505    }
14506
14507    /// The request builder for [DataplexService::create_lake][crate::client::DataplexService::create_lake] calls.
14508    ///
14509    /// # Example
14510    /// ```
14511    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateLake;
14512    /// # async fn sample() -> gax::Result<()> {
14513    /// use lro::Poller;
14514    ///
14515    /// let builder = prepare_request_builder();
14516    /// let response = builder.poller().until_done().await?;
14517    /// # Ok(()) }
14518    ///
14519    /// fn prepare_request_builder() -> CreateLake {
14520    ///   # panic!();
14521    ///   // ... details omitted ...
14522    /// }
14523    /// ```
14524    #[derive(Clone, Debug)]
14525    pub struct CreateLake(RequestBuilder<crate::model::CreateLakeRequest>);
14526
14527    impl CreateLake {
14528        pub(crate) fn new(
14529            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14530        ) -> Self {
14531            Self(RequestBuilder::new(stub))
14532        }
14533
14534        /// Sets the full request, replacing any prior values.
14535        pub fn with_request<V: Into<crate::model::CreateLakeRequest>>(mut self, v: V) -> Self {
14536            self.0.request = v.into();
14537            self
14538        }
14539
14540        /// Sets all the options, replacing any prior values.
14541        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14542            self.0.options = v.into();
14543            self
14544        }
14545
14546        /// Sends the request.
14547        ///
14548        /// # Long running operations
14549        ///
14550        /// This starts, but does not poll, a longrunning operation. More information
14551        /// on [create_lake][crate::client::DataplexService::create_lake].
14552        pub async fn send(self) -> Result<longrunning::model::Operation> {
14553            (*self.0.stub)
14554                .create_lake(self.0.request, self.0.options)
14555                .await
14556                .map(gax::response::Response::into_body)
14557        }
14558
14559        /// Creates a [Poller][lro::Poller] to work with `create_lake`.
14560        pub fn poller(
14561            self,
14562        ) -> impl lro::Poller<crate::model::Lake, crate::model::OperationMetadata> {
14563            type Operation =
14564                lro::internal::Operation<crate::model::Lake, crate::model::OperationMetadata>;
14565            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14566            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14567
14568            let stub = self.0.stub.clone();
14569            let mut options = self.0.options.clone();
14570            options.set_retry_policy(gax::retry_policy::NeverRetry);
14571            let query = move |name| {
14572                let stub = stub.clone();
14573                let options = options.clone();
14574                async {
14575                    let op = GetOperation::new(stub)
14576                        .set_name(name)
14577                        .with_options(options)
14578                        .send()
14579                        .await?;
14580                    Ok(Operation::new(op))
14581                }
14582            };
14583
14584            let start = move || async {
14585                let op = self.send().await?;
14586                Ok(Operation::new(op))
14587            };
14588
14589            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
14590        }
14591
14592        /// Sets the value of [parent][crate::model::CreateLakeRequest::parent].
14593        ///
14594        /// This is a **required** field for requests.
14595        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14596            self.0.request.parent = v.into();
14597            self
14598        }
14599
14600        /// Sets the value of [lake_id][crate::model::CreateLakeRequest::lake_id].
14601        ///
14602        /// This is a **required** field for requests.
14603        pub fn set_lake_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
14604            self.0.request.lake_id = v.into();
14605            self
14606        }
14607
14608        /// Sets the value of [lake][crate::model::CreateLakeRequest::lake].
14609        ///
14610        /// This is a **required** field for requests.
14611        pub fn set_lake<T>(mut self, v: T) -> Self
14612        where
14613            T: std::convert::Into<crate::model::Lake>,
14614        {
14615            self.0.request.lake = std::option::Option::Some(v.into());
14616            self
14617        }
14618
14619        /// Sets or clears the value of [lake][crate::model::CreateLakeRequest::lake].
14620        ///
14621        /// This is a **required** field for requests.
14622        pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
14623        where
14624            T: std::convert::Into<crate::model::Lake>,
14625        {
14626            self.0.request.lake = v.map(|x| x.into());
14627            self
14628        }
14629
14630        /// Sets the value of [validate_only][crate::model::CreateLakeRequest::validate_only].
14631        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
14632            self.0.request.validate_only = v.into();
14633            self
14634        }
14635    }
14636
14637    #[doc(hidden)]
14638    impl gax::options::internal::RequestBuilder for CreateLake {
14639        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14640            &mut self.0.options
14641        }
14642    }
14643
14644    /// The request builder for [DataplexService::update_lake][crate::client::DataplexService::update_lake] calls.
14645    ///
14646    /// # Example
14647    /// ```
14648    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateLake;
14649    /// # async fn sample() -> gax::Result<()> {
14650    /// use lro::Poller;
14651    ///
14652    /// let builder = prepare_request_builder();
14653    /// let response = builder.poller().until_done().await?;
14654    /// # Ok(()) }
14655    ///
14656    /// fn prepare_request_builder() -> UpdateLake {
14657    ///   # panic!();
14658    ///   // ... details omitted ...
14659    /// }
14660    /// ```
14661    #[derive(Clone, Debug)]
14662    pub struct UpdateLake(RequestBuilder<crate::model::UpdateLakeRequest>);
14663
14664    impl UpdateLake {
14665        pub(crate) fn new(
14666            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14667        ) -> Self {
14668            Self(RequestBuilder::new(stub))
14669        }
14670
14671        /// Sets the full request, replacing any prior values.
14672        pub fn with_request<V: Into<crate::model::UpdateLakeRequest>>(mut self, v: V) -> Self {
14673            self.0.request = v.into();
14674            self
14675        }
14676
14677        /// Sets all the options, replacing any prior values.
14678        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14679            self.0.options = v.into();
14680            self
14681        }
14682
14683        /// Sends the request.
14684        ///
14685        /// # Long running operations
14686        ///
14687        /// This starts, but does not poll, a longrunning operation. More information
14688        /// on [update_lake][crate::client::DataplexService::update_lake].
14689        pub async fn send(self) -> Result<longrunning::model::Operation> {
14690            (*self.0.stub)
14691                .update_lake(self.0.request, self.0.options)
14692                .await
14693                .map(gax::response::Response::into_body)
14694        }
14695
14696        /// Creates a [Poller][lro::Poller] to work with `update_lake`.
14697        pub fn poller(
14698            self,
14699        ) -> impl lro::Poller<crate::model::Lake, crate::model::OperationMetadata> {
14700            type Operation =
14701                lro::internal::Operation<crate::model::Lake, crate::model::OperationMetadata>;
14702            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14703            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14704
14705            let stub = self.0.stub.clone();
14706            let mut options = self.0.options.clone();
14707            options.set_retry_policy(gax::retry_policy::NeverRetry);
14708            let query = move |name| {
14709                let stub = stub.clone();
14710                let options = options.clone();
14711                async {
14712                    let op = GetOperation::new(stub)
14713                        .set_name(name)
14714                        .with_options(options)
14715                        .send()
14716                        .await?;
14717                    Ok(Operation::new(op))
14718                }
14719            };
14720
14721            let start = move || async {
14722                let op = self.send().await?;
14723                Ok(Operation::new(op))
14724            };
14725
14726            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
14727        }
14728
14729        /// Sets the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
14730        ///
14731        /// This is a **required** field for requests.
14732        pub fn set_update_mask<T>(mut self, v: T) -> Self
14733        where
14734            T: std::convert::Into<wkt::FieldMask>,
14735        {
14736            self.0.request.update_mask = std::option::Option::Some(v.into());
14737            self
14738        }
14739
14740        /// Sets or clears the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
14741        ///
14742        /// This is a **required** field for requests.
14743        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
14744        where
14745            T: std::convert::Into<wkt::FieldMask>,
14746        {
14747            self.0.request.update_mask = v.map(|x| x.into());
14748            self
14749        }
14750
14751        /// Sets the value of [lake][crate::model::UpdateLakeRequest::lake].
14752        ///
14753        /// This is a **required** field for requests.
14754        pub fn set_lake<T>(mut self, v: T) -> Self
14755        where
14756            T: std::convert::Into<crate::model::Lake>,
14757        {
14758            self.0.request.lake = std::option::Option::Some(v.into());
14759            self
14760        }
14761
14762        /// Sets or clears the value of [lake][crate::model::UpdateLakeRequest::lake].
14763        ///
14764        /// This is a **required** field for requests.
14765        pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
14766        where
14767            T: std::convert::Into<crate::model::Lake>,
14768        {
14769            self.0.request.lake = v.map(|x| x.into());
14770            self
14771        }
14772
14773        /// Sets the value of [validate_only][crate::model::UpdateLakeRequest::validate_only].
14774        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
14775            self.0.request.validate_only = v.into();
14776            self
14777        }
14778    }
14779
14780    #[doc(hidden)]
14781    impl gax::options::internal::RequestBuilder for UpdateLake {
14782        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14783            &mut self.0.options
14784        }
14785    }
14786
14787    /// The request builder for [DataplexService::delete_lake][crate::client::DataplexService::delete_lake] calls.
14788    ///
14789    /// # Example
14790    /// ```
14791    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteLake;
14792    /// # async fn sample() -> gax::Result<()> {
14793    /// use lro::Poller;
14794    ///
14795    /// let builder = prepare_request_builder();
14796    /// let response = builder.poller().until_done().await?;
14797    /// # Ok(()) }
14798    ///
14799    /// fn prepare_request_builder() -> DeleteLake {
14800    ///   # panic!();
14801    ///   // ... details omitted ...
14802    /// }
14803    /// ```
14804    #[derive(Clone, Debug)]
14805    pub struct DeleteLake(RequestBuilder<crate::model::DeleteLakeRequest>);
14806
14807    impl DeleteLake {
14808        pub(crate) fn new(
14809            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14810        ) -> Self {
14811            Self(RequestBuilder::new(stub))
14812        }
14813
14814        /// Sets the full request, replacing any prior values.
14815        pub fn with_request<V: Into<crate::model::DeleteLakeRequest>>(mut self, v: V) -> Self {
14816            self.0.request = v.into();
14817            self
14818        }
14819
14820        /// Sets all the options, replacing any prior values.
14821        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14822            self.0.options = v.into();
14823            self
14824        }
14825
14826        /// Sends the request.
14827        ///
14828        /// # Long running operations
14829        ///
14830        /// This starts, but does not poll, a longrunning operation. More information
14831        /// on [delete_lake][crate::client::DataplexService::delete_lake].
14832        pub async fn send(self) -> Result<longrunning::model::Operation> {
14833            (*self.0.stub)
14834                .delete_lake(self.0.request, self.0.options)
14835                .await
14836                .map(gax::response::Response::into_body)
14837        }
14838
14839        /// Creates a [Poller][lro::Poller] to work with `delete_lake`.
14840        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
14841            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
14842            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14843            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14844
14845            let stub = self.0.stub.clone();
14846            let mut options = self.0.options.clone();
14847            options.set_retry_policy(gax::retry_policy::NeverRetry);
14848            let query = move |name| {
14849                let stub = stub.clone();
14850                let options = options.clone();
14851                async {
14852                    let op = GetOperation::new(stub)
14853                        .set_name(name)
14854                        .with_options(options)
14855                        .send()
14856                        .await?;
14857                    Ok(Operation::new(op))
14858                }
14859            };
14860
14861            let start = move || async {
14862                let op = self.send().await?;
14863                Ok(Operation::new(op))
14864            };
14865
14866            lro::internal::new_unit_response_poller(
14867                polling_error_policy,
14868                polling_backoff_policy,
14869                start,
14870                query,
14871            )
14872        }
14873
14874        /// Sets the value of [name][crate::model::DeleteLakeRequest::name].
14875        ///
14876        /// This is a **required** field for requests.
14877        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14878            self.0.request.name = v.into();
14879            self
14880        }
14881    }
14882
14883    #[doc(hidden)]
14884    impl gax::options::internal::RequestBuilder for DeleteLake {
14885        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14886            &mut self.0.options
14887        }
14888    }
14889
14890    /// The request builder for [DataplexService::list_lakes][crate::client::DataplexService::list_lakes] calls.
14891    ///
14892    /// # Example
14893    /// ```
14894    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListLakes;
14895    /// # async fn sample() -> gax::Result<()> {
14896    /// use gax::paginator::ItemPaginator;
14897    ///
14898    /// let builder = prepare_request_builder();
14899    /// let mut items = builder.by_item();
14900    /// while let Some(result) = items.next().await {
14901    ///   let item = result?;
14902    /// }
14903    /// # Ok(()) }
14904    ///
14905    /// fn prepare_request_builder() -> ListLakes {
14906    ///   # panic!();
14907    ///   // ... details omitted ...
14908    /// }
14909    /// ```
14910    #[derive(Clone, Debug)]
14911    pub struct ListLakes(RequestBuilder<crate::model::ListLakesRequest>);
14912
14913    impl ListLakes {
14914        pub(crate) fn new(
14915            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14916        ) -> Self {
14917            Self(RequestBuilder::new(stub))
14918        }
14919
14920        /// Sets the full request, replacing any prior values.
14921        pub fn with_request<V: Into<crate::model::ListLakesRequest>>(mut self, v: V) -> Self {
14922            self.0.request = v.into();
14923            self
14924        }
14925
14926        /// Sets all the options, replacing any prior values.
14927        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14928            self.0.options = v.into();
14929            self
14930        }
14931
14932        /// Sends the request.
14933        pub async fn send(self) -> Result<crate::model::ListLakesResponse> {
14934            (*self.0.stub)
14935                .list_lakes(self.0.request, self.0.options)
14936                .await
14937                .map(gax::response::Response::into_body)
14938        }
14939
14940        /// Streams each page in the collection.
14941        pub fn by_page(
14942            self,
14943        ) -> impl gax::paginator::Paginator<crate::model::ListLakesResponse, gax::error::Error>
14944        {
14945            use std::clone::Clone;
14946            let token = self.0.request.page_token.clone();
14947            let execute = move |token: String| {
14948                let mut builder = self.clone();
14949                builder.0.request = builder.0.request.set_page_token(token);
14950                builder.send()
14951            };
14952            gax::paginator::internal::new_paginator(token, execute)
14953        }
14954
14955        /// Streams each item in the collection.
14956        pub fn by_item(
14957            self,
14958        ) -> impl gax::paginator::ItemPaginator<crate::model::ListLakesResponse, gax::error::Error>
14959        {
14960            use gax::paginator::Paginator;
14961            self.by_page().items()
14962        }
14963
14964        /// Sets the value of [parent][crate::model::ListLakesRequest::parent].
14965        ///
14966        /// This is a **required** field for requests.
14967        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14968            self.0.request.parent = v.into();
14969            self
14970        }
14971
14972        /// Sets the value of [page_size][crate::model::ListLakesRequest::page_size].
14973        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
14974            self.0.request.page_size = v.into();
14975            self
14976        }
14977
14978        /// Sets the value of [page_token][crate::model::ListLakesRequest::page_token].
14979        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
14980            self.0.request.page_token = v.into();
14981            self
14982        }
14983
14984        /// Sets the value of [filter][crate::model::ListLakesRequest::filter].
14985        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
14986            self.0.request.filter = v.into();
14987            self
14988        }
14989
14990        /// Sets the value of [order_by][crate::model::ListLakesRequest::order_by].
14991        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
14992            self.0.request.order_by = v.into();
14993            self
14994        }
14995    }
14996
14997    #[doc(hidden)]
14998    impl gax::options::internal::RequestBuilder for ListLakes {
14999        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15000            &mut self.0.options
15001        }
15002    }
15003
15004    /// The request builder for [DataplexService::get_lake][crate::client::DataplexService::get_lake] calls.
15005    ///
15006    /// # Example
15007    /// ```
15008    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetLake;
15009    /// # async fn sample() -> gax::Result<()> {
15010    ///
15011    /// let builder = prepare_request_builder();
15012    /// let response = builder.send().await?;
15013    /// # Ok(()) }
15014    ///
15015    /// fn prepare_request_builder() -> GetLake {
15016    ///   # panic!();
15017    ///   // ... details omitted ...
15018    /// }
15019    /// ```
15020    #[derive(Clone, Debug)]
15021    pub struct GetLake(RequestBuilder<crate::model::GetLakeRequest>);
15022
15023    impl GetLake {
15024        pub(crate) fn new(
15025            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15026        ) -> Self {
15027            Self(RequestBuilder::new(stub))
15028        }
15029
15030        /// Sets the full request, replacing any prior values.
15031        pub fn with_request<V: Into<crate::model::GetLakeRequest>>(mut self, v: V) -> Self {
15032            self.0.request = v.into();
15033            self
15034        }
15035
15036        /// Sets all the options, replacing any prior values.
15037        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15038            self.0.options = v.into();
15039            self
15040        }
15041
15042        /// Sends the request.
15043        pub async fn send(self) -> Result<crate::model::Lake> {
15044            (*self.0.stub)
15045                .get_lake(self.0.request, self.0.options)
15046                .await
15047                .map(gax::response::Response::into_body)
15048        }
15049
15050        /// Sets the value of [name][crate::model::GetLakeRequest::name].
15051        ///
15052        /// This is a **required** field for requests.
15053        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15054            self.0.request.name = v.into();
15055            self
15056        }
15057    }
15058
15059    #[doc(hidden)]
15060    impl gax::options::internal::RequestBuilder for GetLake {
15061        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15062            &mut self.0.options
15063        }
15064    }
15065
15066    /// The request builder for [DataplexService::list_lake_actions][crate::client::DataplexService::list_lake_actions] calls.
15067    ///
15068    /// # Example
15069    /// ```
15070    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListLakeActions;
15071    /// # async fn sample() -> gax::Result<()> {
15072    /// use gax::paginator::ItemPaginator;
15073    ///
15074    /// let builder = prepare_request_builder();
15075    /// let mut items = builder.by_item();
15076    /// while let Some(result) = items.next().await {
15077    ///   let item = result?;
15078    /// }
15079    /// # Ok(()) }
15080    ///
15081    /// fn prepare_request_builder() -> ListLakeActions {
15082    ///   # panic!();
15083    ///   // ... details omitted ...
15084    /// }
15085    /// ```
15086    #[derive(Clone, Debug)]
15087    pub struct ListLakeActions(RequestBuilder<crate::model::ListLakeActionsRequest>);
15088
15089    impl ListLakeActions {
15090        pub(crate) fn new(
15091            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15092        ) -> Self {
15093            Self(RequestBuilder::new(stub))
15094        }
15095
15096        /// Sets the full request, replacing any prior values.
15097        pub fn with_request<V: Into<crate::model::ListLakeActionsRequest>>(mut self, v: V) -> Self {
15098            self.0.request = v.into();
15099            self
15100        }
15101
15102        /// Sets all the options, replacing any prior values.
15103        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15104            self.0.options = v.into();
15105            self
15106        }
15107
15108        /// Sends the request.
15109        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
15110            (*self.0.stub)
15111                .list_lake_actions(self.0.request, self.0.options)
15112                .await
15113                .map(gax::response::Response::into_body)
15114        }
15115
15116        /// Streams each page in the collection.
15117        pub fn by_page(
15118            self,
15119        ) -> impl gax::paginator::Paginator<crate::model::ListActionsResponse, gax::error::Error>
15120        {
15121            use std::clone::Clone;
15122            let token = self.0.request.page_token.clone();
15123            let execute = move |token: String| {
15124                let mut builder = self.clone();
15125                builder.0.request = builder.0.request.set_page_token(token);
15126                builder.send()
15127            };
15128            gax::paginator::internal::new_paginator(token, execute)
15129        }
15130
15131        /// Streams each item in the collection.
15132        pub fn by_item(
15133            self,
15134        ) -> impl gax::paginator::ItemPaginator<crate::model::ListActionsResponse, gax::error::Error>
15135        {
15136            use gax::paginator::Paginator;
15137            self.by_page().items()
15138        }
15139
15140        /// Sets the value of [parent][crate::model::ListLakeActionsRequest::parent].
15141        ///
15142        /// This is a **required** field for requests.
15143        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15144            self.0.request.parent = v.into();
15145            self
15146        }
15147
15148        /// Sets the value of [page_size][crate::model::ListLakeActionsRequest::page_size].
15149        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15150            self.0.request.page_size = v.into();
15151            self
15152        }
15153
15154        /// Sets the value of [page_token][crate::model::ListLakeActionsRequest::page_token].
15155        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15156            self.0.request.page_token = v.into();
15157            self
15158        }
15159    }
15160
15161    #[doc(hidden)]
15162    impl gax::options::internal::RequestBuilder for ListLakeActions {
15163        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15164            &mut self.0.options
15165        }
15166    }
15167
15168    /// The request builder for [DataplexService::create_zone][crate::client::DataplexService::create_zone] calls.
15169    ///
15170    /// # Example
15171    /// ```
15172    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateZone;
15173    /// # async fn sample() -> gax::Result<()> {
15174    /// use lro::Poller;
15175    ///
15176    /// let builder = prepare_request_builder();
15177    /// let response = builder.poller().until_done().await?;
15178    /// # Ok(()) }
15179    ///
15180    /// fn prepare_request_builder() -> CreateZone {
15181    ///   # panic!();
15182    ///   // ... details omitted ...
15183    /// }
15184    /// ```
15185    #[derive(Clone, Debug)]
15186    pub struct CreateZone(RequestBuilder<crate::model::CreateZoneRequest>);
15187
15188    impl CreateZone {
15189        pub(crate) fn new(
15190            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15191        ) -> Self {
15192            Self(RequestBuilder::new(stub))
15193        }
15194
15195        /// Sets the full request, replacing any prior values.
15196        pub fn with_request<V: Into<crate::model::CreateZoneRequest>>(mut self, v: V) -> Self {
15197            self.0.request = v.into();
15198            self
15199        }
15200
15201        /// Sets all the options, replacing any prior values.
15202        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15203            self.0.options = v.into();
15204            self
15205        }
15206
15207        /// Sends the request.
15208        ///
15209        /// # Long running operations
15210        ///
15211        /// This starts, but does not poll, a longrunning operation. More information
15212        /// on [create_zone][crate::client::DataplexService::create_zone].
15213        pub async fn send(self) -> Result<longrunning::model::Operation> {
15214            (*self.0.stub)
15215                .create_zone(self.0.request, self.0.options)
15216                .await
15217                .map(gax::response::Response::into_body)
15218        }
15219
15220        /// Creates a [Poller][lro::Poller] to work with `create_zone`.
15221        pub fn poller(
15222            self,
15223        ) -> impl lro::Poller<crate::model::Zone, crate::model::OperationMetadata> {
15224            type Operation =
15225                lro::internal::Operation<crate::model::Zone, crate::model::OperationMetadata>;
15226            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
15227            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
15228
15229            let stub = self.0.stub.clone();
15230            let mut options = self.0.options.clone();
15231            options.set_retry_policy(gax::retry_policy::NeverRetry);
15232            let query = move |name| {
15233                let stub = stub.clone();
15234                let options = options.clone();
15235                async {
15236                    let op = GetOperation::new(stub)
15237                        .set_name(name)
15238                        .with_options(options)
15239                        .send()
15240                        .await?;
15241                    Ok(Operation::new(op))
15242                }
15243            };
15244
15245            let start = move || async {
15246                let op = self.send().await?;
15247                Ok(Operation::new(op))
15248            };
15249
15250            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
15251        }
15252
15253        /// Sets the value of [parent][crate::model::CreateZoneRequest::parent].
15254        ///
15255        /// This is a **required** field for requests.
15256        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15257            self.0.request.parent = v.into();
15258            self
15259        }
15260
15261        /// Sets the value of [zone_id][crate::model::CreateZoneRequest::zone_id].
15262        ///
15263        /// This is a **required** field for requests.
15264        pub fn set_zone_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
15265            self.0.request.zone_id = v.into();
15266            self
15267        }
15268
15269        /// Sets the value of [zone][crate::model::CreateZoneRequest::zone].
15270        ///
15271        /// This is a **required** field for requests.
15272        pub fn set_zone<T>(mut self, v: T) -> Self
15273        where
15274            T: std::convert::Into<crate::model::Zone>,
15275        {
15276            self.0.request.zone = std::option::Option::Some(v.into());
15277            self
15278        }
15279
15280        /// Sets or clears the value of [zone][crate::model::CreateZoneRequest::zone].
15281        ///
15282        /// This is a **required** field for requests.
15283        pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
15284        where
15285            T: std::convert::Into<crate::model::Zone>,
15286        {
15287            self.0.request.zone = v.map(|x| x.into());
15288            self
15289        }
15290
15291        /// Sets the value of [validate_only][crate::model::CreateZoneRequest::validate_only].
15292        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
15293            self.0.request.validate_only = v.into();
15294            self
15295        }
15296    }
15297
15298    #[doc(hidden)]
15299    impl gax::options::internal::RequestBuilder for CreateZone {
15300        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15301            &mut self.0.options
15302        }
15303    }
15304
15305    /// The request builder for [DataplexService::update_zone][crate::client::DataplexService::update_zone] calls.
15306    ///
15307    /// # Example
15308    /// ```
15309    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateZone;
15310    /// # async fn sample() -> gax::Result<()> {
15311    /// use lro::Poller;
15312    ///
15313    /// let builder = prepare_request_builder();
15314    /// let response = builder.poller().until_done().await?;
15315    /// # Ok(()) }
15316    ///
15317    /// fn prepare_request_builder() -> UpdateZone {
15318    ///   # panic!();
15319    ///   // ... details omitted ...
15320    /// }
15321    /// ```
15322    #[derive(Clone, Debug)]
15323    pub struct UpdateZone(RequestBuilder<crate::model::UpdateZoneRequest>);
15324
15325    impl UpdateZone {
15326        pub(crate) fn new(
15327            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15328        ) -> Self {
15329            Self(RequestBuilder::new(stub))
15330        }
15331
15332        /// Sets the full request, replacing any prior values.
15333        pub fn with_request<V: Into<crate::model::UpdateZoneRequest>>(mut self, v: V) -> Self {
15334            self.0.request = v.into();
15335            self
15336        }
15337
15338        /// Sets all the options, replacing any prior values.
15339        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15340            self.0.options = v.into();
15341            self
15342        }
15343
15344        /// Sends the request.
15345        ///
15346        /// # Long running operations
15347        ///
15348        /// This starts, but does not poll, a longrunning operation. More information
15349        /// on [update_zone][crate::client::DataplexService::update_zone].
15350        pub async fn send(self) -> Result<longrunning::model::Operation> {
15351            (*self.0.stub)
15352                .update_zone(self.0.request, self.0.options)
15353                .await
15354                .map(gax::response::Response::into_body)
15355        }
15356
15357        /// Creates a [Poller][lro::Poller] to work with `update_zone`.
15358        pub fn poller(
15359            self,
15360        ) -> impl lro::Poller<crate::model::Zone, crate::model::OperationMetadata> {
15361            type Operation =
15362                lro::internal::Operation<crate::model::Zone, crate::model::OperationMetadata>;
15363            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
15364            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
15365
15366            let stub = self.0.stub.clone();
15367            let mut options = self.0.options.clone();
15368            options.set_retry_policy(gax::retry_policy::NeverRetry);
15369            let query = move |name| {
15370                let stub = stub.clone();
15371                let options = options.clone();
15372                async {
15373                    let op = GetOperation::new(stub)
15374                        .set_name(name)
15375                        .with_options(options)
15376                        .send()
15377                        .await?;
15378                    Ok(Operation::new(op))
15379                }
15380            };
15381
15382            let start = move || async {
15383                let op = self.send().await?;
15384                Ok(Operation::new(op))
15385            };
15386
15387            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
15388        }
15389
15390        /// Sets the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
15391        ///
15392        /// This is a **required** field for requests.
15393        pub fn set_update_mask<T>(mut self, v: T) -> Self
15394        where
15395            T: std::convert::Into<wkt::FieldMask>,
15396        {
15397            self.0.request.update_mask = std::option::Option::Some(v.into());
15398            self
15399        }
15400
15401        /// Sets or clears the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
15402        ///
15403        /// This is a **required** field for requests.
15404        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15405        where
15406            T: std::convert::Into<wkt::FieldMask>,
15407        {
15408            self.0.request.update_mask = v.map(|x| x.into());
15409            self
15410        }
15411
15412        /// Sets the value of [zone][crate::model::UpdateZoneRequest::zone].
15413        ///
15414        /// This is a **required** field for requests.
15415        pub fn set_zone<T>(mut self, v: T) -> Self
15416        where
15417            T: std::convert::Into<crate::model::Zone>,
15418        {
15419            self.0.request.zone = std::option::Option::Some(v.into());
15420            self
15421        }
15422
15423        /// Sets or clears the value of [zone][crate::model::UpdateZoneRequest::zone].
15424        ///
15425        /// This is a **required** field for requests.
15426        pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
15427        where
15428            T: std::convert::Into<crate::model::Zone>,
15429        {
15430            self.0.request.zone = v.map(|x| x.into());
15431            self
15432        }
15433
15434        /// Sets the value of [validate_only][crate::model::UpdateZoneRequest::validate_only].
15435        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
15436            self.0.request.validate_only = v.into();
15437            self
15438        }
15439    }
15440
15441    #[doc(hidden)]
15442    impl gax::options::internal::RequestBuilder for UpdateZone {
15443        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15444            &mut self.0.options
15445        }
15446    }
15447
15448    /// The request builder for [DataplexService::delete_zone][crate::client::DataplexService::delete_zone] calls.
15449    ///
15450    /// # Example
15451    /// ```
15452    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteZone;
15453    /// # async fn sample() -> gax::Result<()> {
15454    /// use lro::Poller;
15455    ///
15456    /// let builder = prepare_request_builder();
15457    /// let response = builder.poller().until_done().await?;
15458    /// # Ok(()) }
15459    ///
15460    /// fn prepare_request_builder() -> DeleteZone {
15461    ///   # panic!();
15462    ///   // ... details omitted ...
15463    /// }
15464    /// ```
15465    #[derive(Clone, Debug)]
15466    pub struct DeleteZone(RequestBuilder<crate::model::DeleteZoneRequest>);
15467
15468    impl DeleteZone {
15469        pub(crate) fn new(
15470            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15471        ) -> Self {
15472            Self(RequestBuilder::new(stub))
15473        }
15474
15475        /// Sets the full request, replacing any prior values.
15476        pub fn with_request<V: Into<crate::model::DeleteZoneRequest>>(mut self, v: V) -> Self {
15477            self.0.request = v.into();
15478            self
15479        }
15480
15481        /// Sets all the options, replacing any prior values.
15482        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15483            self.0.options = v.into();
15484            self
15485        }
15486
15487        /// Sends the request.
15488        ///
15489        /// # Long running operations
15490        ///
15491        /// This starts, but does not poll, a longrunning operation. More information
15492        /// on [delete_zone][crate::client::DataplexService::delete_zone].
15493        pub async fn send(self) -> Result<longrunning::model::Operation> {
15494            (*self.0.stub)
15495                .delete_zone(self.0.request, self.0.options)
15496                .await
15497                .map(gax::response::Response::into_body)
15498        }
15499
15500        /// Creates a [Poller][lro::Poller] to work with `delete_zone`.
15501        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
15502            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
15503            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
15504            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
15505
15506            let stub = self.0.stub.clone();
15507            let mut options = self.0.options.clone();
15508            options.set_retry_policy(gax::retry_policy::NeverRetry);
15509            let query = move |name| {
15510                let stub = stub.clone();
15511                let options = options.clone();
15512                async {
15513                    let op = GetOperation::new(stub)
15514                        .set_name(name)
15515                        .with_options(options)
15516                        .send()
15517                        .await?;
15518                    Ok(Operation::new(op))
15519                }
15520            };
15521
15522            let start = move || async {
15523                let op = self.send().await?;
15524                Ok(Operation::new(op))
15525            };
15526
15527            lro::internal::new_unit_response_poller(
15528                polling_error_policy,
15529                polling_backoff_policy,
15530                start,
15531                query,
15532            )
15533        }
15534
15535        /// Sets the value of [name][crate::model::DeleteZoneRequest::name].
15536        ///
15537        /// This is a **required** field for requests.
15538        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15539            self.0.request.name = v.into();
15540            self
15541        }
15542    }
15543
15544    #[doc(hidden)]
15545    impl gax::options::internal::RequestBuilder for DeleteZone {
15546        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15547            &mut self.0.options
15548        }
15549    }
15550
15551    /// The request builder for [DataplexService::list_zones][crate::client::DataplexService::list_zones] calls.
15552    ///
15553    /// # Example
15554    /// ```
15555    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListZones;
15556    /// # async fn sample() -> gax::Result<()> {
15557    /// use gax::paginator::ItemPaginator;
15558    ///
15559    /// let builder = prepare_request_builder();
15560    /// let mut items = builder.by_item();
15561    /// while let Some(result) = items.next().await {
15562    ///   let item = result?;
15563    /// }
15564    /// # Ok(()) }
15565    ///
15566    /// fn prepare_request_builder() -> ListZones {
15567    ///   # panic!();
15568    ///   // ... details omitted ...
15569    /// }
15570    /// ```
15571    #[derive(Clone, Debug)]
15572    pub struct ListZones(RequestBuilder<crate::model::ListZonesRequest>);
15573
15574    impl ListZones {
15575        pub(crate) fn new(
15576            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15577        ) -> Self {
15578            Self(RequestBuilder::new(stub))
15579        }
15580
15581        /// Sets the full request, replacing any prior values.
15582        pub fn with_request<V: Into<crate::model::ListZonesRequest>>(mut self, v: V) -> Self {
15583            self.0.request = v.into();
15584            self
15585        }
15586
15587        /// Sets all the options, replacing any prior values.
15588        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15589            self.0.options = v.into();
15590            self
15591        }
15592
15593        /// Sends the request.
15594        pub async fn send(self) -> Result<crate::model::ListZonesResponse> {
15595            (*self.0.stub)
15596                .list_zones(self.0.request, self.0.options)
15597                .await
15598                .map(gax::response::Response::into_body)
15599        }
15600
15601        /// Streams each page in the collection.
15602        pub fn by_page(
15603            self,
15604        ) -> impl gax::paginator::Paginator<crate::model::ListZonesResponse, gax::error::Error>
15605        {
15606            use std::clone::Clone;
15607            let token = self.0.request.page_token.clone();
15608            let execute = move |token: String| {
15609                let mut builder = self.clone();
15610                builder.0.request = builder.0.request.set_page_token(token);
15611                builder.send()
15612            };
15613            gax::paginator::internal::new_paginator(token, execute)
15614        }
15615
15616        /// Streams each item in the collection.
15617        pub fn by_item(
15618            self,
15619        ) -> impl gax::paginator::ItemPaginator<crate::model::ListZonesResponse, gax::error::Error>
15620        {
15621            use gax::paginator::Paginator;
15622            self.by_page().items()
15623        }
15624
15625        /// Sets the value of [parent][crate::model::ListZonesRequest::parent].
15626        ///
15627        /// This is a **required** field for requests.
15628        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15629            self.0.request.parent = v.into();
15630            self
15631        }
15632
15633        /// Sets the value of [page_size][crate::model::ListZonesRequest::page_size].
15634        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15635            self.0.request.page_size = v.into();
15636            self
15637        }
15638
15639        /// Sets the value of [page_token][crate::model::ListZonesRequest::page_token].
15640        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15641            self.0.request.page_token = v.into();
15642            self
15643        }
15644
15645        /// Sets the value of [filter][crate::model::ListZonesRequest::filter].
15646        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15647            self.0.request.filter = v.into();
15648            self
15649        }
15650
15651        /// Sets the value of [order_by][crate::model::ListZonesRequest::order_by].
15652        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
15653            self.0.request.order_by = v.into();
15654            self
15655        }
15656    }
15657
15658    #[doc(hidden)]
15659    impl gax::options::internal::RequestBuilder for ListZones {
15660        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15661            &mut self.0.options
15662        }
15663    }
15664
15665    /// The request builder for [DataplexService::get_zone][crate::client::DataplexService::get_zone] calls.
15666    ///
15667    /// # Example
15668    /// ```
15669    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetZone;
15670    /// # async fn sample() -> gax::Result<()> {
15671    ///
15672    /// let builder = prepare_request_builder();
15673    /// let response = builder.send().await?;
15674    /// # Ok(()) }
15675    ///
15676    /// fn prepare_request_builder() -> GetZone {
15677    ///   # panic!();
15678    ///   // ... details omitted ...
15679    /// }
15680    /// ```
15681    #[derive(Clone, Debug)]
15682    pub struct GetZone(RequestBuilder<crate::model::GetZoneRequest>);
15683
15684    impl GetZone {
15685        pub(crate) fn new(
15686            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15687        ) -> Self {
15688            Self(RequestBuilder::new(stub))
15689        }
15690
15691        /// Sets the full request, replacing any prior values.
15692        pub fn with_request<V: Into<crate::model::GetZoneRequest>>(mut self, v: V) -> Self {
15693            self.0.request = v.into();
15694            self
15695        }
15696
15697        /// Sets all the options, replacing any prior values.
15698        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15699            self.0.options = v.into();
15700            self
15701        }
15702
15703        /// Sends the request.
15704        pub async fn send(self) -> Result<crate::model::Zone> {
15705            (*self.0.stub)
15706                .get_zone(self.0.request, self.0.options)
15707                .await
15708                .map(gax::response::Response::into_body)
15709        }
15710
15711        /// Sets the value of [name][crate::model::GetZoneRequest::name].
15712        ///
15713        /// This is a **required** field for requests.
15714        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15715            self.0.request.name = v.into();
15716            self
15717        }
15718    }
15719
15720    #[doc(hidden)]
15721    impl gax::options::internal::RequestBuilder for GetZone {
15722        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15723            &mut self.0.options
15724        }
15725    }
15726
15727    /// The request builder for [DataplexService::list_zone_actions][crate::client::DataplexService::list_zone_actions] calls.
15728    ///
15729    /// # Example
15730    /// ```
15731    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListZoneActions;
15732    /// # async fn sample() -> gax::Result<()> {
15733    /// use gax::paginator::ItemPaginator;
15734    ///
15735    /// let builder = prepare_request_builder();
15736    /// let mut items = builder.by_item();
15737    /// while let Some(result) = items.next().await {
15738    ///   let item = result?;
15739    /// }
15740    /// # Ok(()) }
15741    ///
15742    /// fn prepare_request_builder() -> ListZoneActions {
15743    ///   # panic!();
15744    ///   // ... details omitted ...
15745    /// }
15746    /// ```
15747    #[derive(Clone, Debug)]
15748    pub struct ListZoneActions(RequestBuilder<crate::model::ListZoneActionsRequest>);
15749
15750    impl ListZoneActions {
15751        pub(crate) fn new(
15752            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15753        ) -> Self {
15754            Self(RequestBuilder::new(stub))
15755        }
15756
15757        /// Sets the full request, replacing any prior values.
15758        pub fn with_request<V: Into<crate::model::ListZoneActionsRequest>>(mut self, v: V) -> Self {
15759            self.0.request = v.into();
15760            self
15761        }
15762
15763        /// Sets all the options, replacing any prior values.
15764        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15765            self.0.options = v.into();
15766            self
15767        }
15768
15769        /// Sends the request.
15770        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
15771            (*self.0.stub)
15772                .list_zone_actions(self.0.request, self.0.options)
15773                .await
15774                .map(gax::response::Response::into_body)
15775        }
15776
15777        /// Streams each page in the collection.
15778        pub fn by_page(
15779            self,
15780        ) -> impl gax::paginator::Paginator<crate::model::ListActionsResponse, gax::error::Error>
15781        {
15782            use std::clone::Clone;
15783            let token = self.0.request.page_token.clone();
15784            let execute = move |token: String| {
15785                let mut builder = self.clone();
15786                builder.0.request = builder.0.request.set_page_token(token);
15787                builder.send()
15788            };
15789            gax::paginator::internal::new_paginator(token, execute)
15790        }
15791
15792        /// Streams each item in the collection.
15793        pub fn by_item(
15794            self,
15795        ) -> impl gax::paginator::ItemPaginator<crate::model::ListActionsResponse, gax::error::Error>
15796        {
15797            use gax::paginator::Paginator;
15798            self.by_page().items()
15799        }
15800
15801        /// Sets the value of [parent][crate::model::ListZoneActionsRequest::parent].
15802        ///
15803        /// This is a **required** field for requests.
15804        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15805            self.0.request.parent = v.into();
15806            self
15807        }
15808
15809        /// Sets the value of [page_size][crate::model::ListZoneActionsRequest::page_size].
15810        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15811            self.0.request.page_size = v.into();
15812            self
15813        }
15814
15815        /// Sets the value of [page_token][crate::model::ListZoneActionsRequest::page_token].
15816        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15817            self.0.request.page_token = v.into();
15818            self
15819        }
15820    }
15821
15822    #[doc(hidden)]
15823    impl gax::options::internal::RequestBuilder for ListZoneActions {
15824        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15825            &mut self.0.options
15826        }
15827    }
15828
15829    /// The request builder for [DataplexService::create_asset][crate::client::DataplexService::create_asset] calls.
15830    ///
15831    /// # Example
15832    /// ```
15833    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateAsset;
15834    /// # async fn sample() -> gax::Result<()> {
15835    /// use lro::Poller;
15836    ///
15837    /// let builder = prepare_request_builder();
15838    /// let response = builder.poller().until_done().await?;
15839    /// # Ok(()) }
15840    ///
15841    /// fn prepare_request_builder() -> CreateAsset {
15842    ///   # panic!();
15843    ///   // ... details omitted ...
15844    /// }
15845    /// ```
15846    #[derive(Clone, Debug)]
15847    pub struct CreateAsset(RequestBuilder<crate::model::CreateAssetRequest>);
15848
15849    impl CreateAsset {
15850        pub(crate) fn new(
15851            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15852        ) -> Self {
15853            Self(RequestBuilder::new(stub))
15854        }
15855
15856        /// Sets the full request, replacing any prior values.
15857        pub fn with_request<V: Into<crate::model::CreateAssetRequest>>(mut self, v: V) -> Self {
15858            self.0.request = v.into();
15859            self
15860        }
15861
15862        /// Sets all the options, replacing any prior values.
15863        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15864            self.0.options = v.into();
15865            self
15866        }
15867
15868        /// Sends the request.
15869        ///
15870        /// # Long running operations
15871        ///
15872        /// This starts, but does not poll, a longrunning operation. More information
15873        /// on [create_asset][crate::client::DataplexService::create_asset].
15874        pub async fn send(self) -> Result<longrunning::model::Operation> {
15875            (*self.0.stub)
15876                .create_asset(self.0.request, self.0.options)
15877                .await
15878                .map(gax::response::Response::into_body)
15879        }
15880
15881        /// Creates a [Poller][lro::Poller] to work with `create_asset`.
15882        pub fn poller(
15883            self,
15884        ) -> impl lro::Poller<crate::model::Asset, crate::model::OperationMetadata> {
15885            type Operation =
15886                lro::internal::Operation<crate::model::Asset, crate::model::OperationMetadata>;
15887            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
15888            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
15889
15890            let stub = self.0.stub.clone();
15891            let mut options = self.0.options.clone();
15892            options.set_retry_policy(gax::retry_policy::NeverRetry);
15893            let query = move |name| {
15894                let stub = stub.clone();
15895                let options = options.clone();
15896                async {
15897                    let op = GetOperation::new(stub)
15898                        .set_name(name)
15899                        .with_options(options)
15900                        .send()
15901                        .await?;
15902                    Ok(Operation::new(op))
15903                }
15904            };
15905
15906            let start = move || async {
15907                let op = self.send().await?;
15908                Ok(Operation::new(op))
15909            };
15910
15911            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
15912        }
15913
15914        /// Sets the value of [parent][crate::model::CreateAssetRequest::parent].
15915        ///
15916        /// This is a **required** field for requests.
15917        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15918            self.0.request.parent = v.into();
15919            self
15920        }
15921
15922        /// Sets the value of [asset_id][crate::model::CreateAssetRequest::asset_id].
15923        ///
15924        /// This is a **required** field for requests.
15925        pub fn set_asset_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
15926            self.0.request.asset_id = v.into();
15927            self
15928        }
15929
15930        /// Sets the value of [asset][crate::model::CreateAssetRequest::asset].
15931        ///
15932        /// This is a **required** field for requests.
15933        pub fn set_asset<T>(mut self, v: T) -> Self
15934        where
15935            T: std::convert::Into<crate::model::Asset>,
15936        {
15937            self.0.request.asset = std::option::Option::Some(v.into());
15938            self
15939        }
15940
15941        /// Sets or clears the value of [asset][crate::model::CreateAssetRequest::asset].
15942        ///
15943        /// This is a **required** field for requests.
15944        pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
15945        where
15946            T: std::convert::Into<crate::model::Asset>,
15947        {
15948            self.0.request.asset = v.map(|x| x.into());
15949            self
15950        }
15951
15952        /// Sets the value of [validate_only][crate::model::CreateAssetRequest::validate_only].
15953        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
15954            self.0.request.validate_only = v.into();
15955            self
15956        }
15957    }
15958
15959    #[doc(hidden)]
15960    impl gax::options::internal::RequestBuilder for CreateAsset {
15961        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15962            &mut self.0.options
15963        }
15964    }
15965
15966    /// The request builder for [DataplexService::update_asset][crate::client::DataplexService::update_asset] calls.
15967    ///
15968    /// # Example
15969    /// ```
15970    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateAsset;
15971    /// # async fn sample() -> gax::Result<()> {
15972    /// use lro::Poller;
15973    ///
15974    /// let builder = prepare_request_builder();
15975    /// let response = builder.poller().until_done().await?;
15976    /// # Ok(()) }
15977    ///
15978    /// fn prepare_request_builder() -> UpdateAsset {
15979    ///   # panic!();
15980    ///   // ... details omitted ...
15981    /// }
15982    /// ```
15983    #[derive(Clone, Debug)]
15984    pub struct UpdateAsset(RequestBuilder<crate::model::UpdateAssetRequest>);
15985
15986    impl UpdateAsset {
15987        pub(crate) fn new(
15988            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15989        ) -> Self {
15990            Self(RequestBuilder::new(stub))
15991        }
15992
15993        /// Sets the full request, replacing any prior values.
15994        pub fn with_request<V: Into<crate::model::UpdateAssetRequest>>(mut self, v: V) -> Self {
15995            self.0.request = v.into();
15996            self
15997        }
15998
15999        /// Sets all the options, replacing any prior values.
16000        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16001            self.0.options = v.into();
16002            self
16003        }
16004
16005        /// Sends the request.
16006        ///
16007        /// # Long running operations
16008        ///
16009        /// This starts, but does not poll, a longrunning operation. More information
16010        /// on [update_asset][crate::client::DataplexService::update_asset].
16011        pub async fn send(self) -> Result<longrunning::model::Operation> {
16012            (*self.0.stub)
16013                .update_asset(self.0.request, self.0.options)
16014                .await
16015                .map(gax::response::Response::into_body)
16016        }
16017
16018        /// Creates a [Poller][lro::Poller] to work with `update_asset`.
16019        pub fn poller(
16020            self,
16021        ) -> impl lro::Poller<crate::model::Asset, crate::model::OperationMetadata> {
16022            type Operation =
16023                lro::internal::Operation<crate::model::Asset, crate::model::OperationMetadata>;
16024            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
16025            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
16026
16027            let stub = self.0.stub.clone();
16028            let mut options = self.0.options.clone();
16029            options.set_retry_policy(gax::retry_policy::NeverRetry);
16030            let query = move |name| {
16031                let stub = stub.clone();
16032                let options = options.clone();
16033                async {
16034                    let op = GetOperation::new(stub)
16035                        .set_name(name)
16036                        .with_options(options)
16037                        .send()
16038                        .await?;
16039                    Ok(Operation::new(op))
16040                }
16041            };
16042
16043            let start = move || async {
16044                let op = self.send().await?;
16045                Ok(Operation::new(op))
16046            };
16047
16048            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
16049        }
16050
16051        /// Sets the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
16052        ///
16053        /// This is a **required** field for requests.
16054        pub fn set_update_mask<T>(mut self, v: T) -> Self
16055        where
16056            T: std::convert::Into<wkt::FieldMask>,
16057        {
16058            self.0.request.update_mask = std::option::Option::Some(v.into());
16059            self
16060        }
16061
16062        /// Sets or clears the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
16063        ///
16064        /// This is a **required** field for requests.
16065        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
16066        where
16067            T: std::convert::Into<wkt::FieldMask>,
16068        {
16069            self.0.request.update_mask = v.map(|x| x.into());
16070            self
16071        }
16072
16073        /// Sets the value of [asset][crate::model::UpdateAssetRequest::asset].
16074        ///
16075        /// This is a **required** field for requests.
16076        pub fn set_asset<T>(mut self, v: T) -> Self
16077        where
16078            T: std::convert::Into<crate::model::Asset>,
16079        {
16080            self.0.request.asset = std::option::Option::Some(v.into());
16081            self
16082        }
16083
16084        /// Sets or clears the value of [asset][crate::model::UpdateAssetRequest::asset].
16085        ///
16086        /// This is a **required** field for requests.
16087        pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
16088        where
16089            T: std::convert::Into<crate::model::Asset>,
16090        {
16091            self.0.request.asset = v.map(|x| x.into());
16092            self
16093        }
16094
16095        /// Sets the value of [validate_only][crate::model::UpdateAssetRequest::validate_only].
16096        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16097            self.0.request.validate_only = v.into();
16098            self
16099        }
16100    }
16101
16102    #[doc(hidden)]
16103    impl gax::options::internal::RequestBuilder for UpdateAsset {
16104        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16105            &mut self.0.options
16106        }
16107    }
16108
16109    /// The request builder for [DataplexService::delete_asset][crate::client::DataplexService::delete_asset] calls.
16110    ///
16111    /// # Example
16112    /// ```
16113    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteAsset;
16114    /// # async fn sample() -> gax::Result<()> {
16115    /// use lro::Poller;
16116    ///
16117    /// let builder = prepare_request_builder();
16118    /// let response = builder.poller().until_done().await?;
16119    /// # Ok(()) }
16120    ///
16121    /// fn prepare_request_builder() -> DeleteAsset {
16122    ///   # panic!();
16123    ///   // ... details omitted ...
16124    /// }
16125    /// ```
16126    #[derive(Clone, Debug)]
16127    pub struct DeleteAsset(RequestBuilder<crate::model::DeleteAssetRequest>);
16128
16129    impl DeleteAsset {
16130        pub(crate) fn new(
16131            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16132        ) -> Self {
16133            Self(RequestBuilder::new(stub))
16134        }
16135
16136        /// Sets the full request, replacing any prior values.
16137        pub fn with_request<V: Into<crate::model::DeleteAssetRequest>>(mut self, v: V) -> Self {
16138            self.0.request = v.into();
16139            self
16140        }
16141
16142        /// Sets all the options, replacing any prior values.
16143        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16144            self.0.options = v.into();
16145            self
16146        }
16147
16148        /// Sends the request.
16149        ///
16150        /// # Long running operations
16151        ///
16152        /// This starts, but does not poll, a longrunning operation. More information
16153        /// on [delete_asset][crate::client::DataplexService::delete_asset].
16154        pub async fn send(self) -> Result<longrunning::model::Operation> {
16155            (*self.0.stub)
16156                .delete_asset(self.0.request, self.0.options)
16157                .await
16158                .map(gax::response::Response::into_body)
16159        }
16160
16161        /// Creates a [Poller][lro::Poller] to work with `delete_asset`.
16162        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
16163            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
16164            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
16165            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
16166
16167            let stub = self.0.stub.clone();
16168            let mut options = self.0.options.clone();
16169            options.set_retry_policy(gax::retry_policy::NeverRetry);
16170            let query = move |name| {
16171                let stub = stub.clone();
16172                let options = options.clone();
16173                async {
16174                    let op = GetOperation::new(stub)
16175                        .set_name(name)
16176                        .with_options(options)
16177                        .send()
16178                        .await?;
16179                    Ok(Operation::new(op))
16180                }
16181            };
16182
16183            let start = move || async {
16184                let op = self.send().await?;
16185                Ok(Operation::new(op))
16186            };
16187
16188            lro::internal::new_unit_response_poller(
16189                polling_error_policy,
16190                polling_backoff_policy,
16191                start,
16192                query,
16193            )
16194        }
16195
16196        /// Sets the value of [name][crate::model::DeleteAssetRequest::name].
16197        ///
16198        /// This is a **required** field for requests.
16199        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16200            self.0.request.name = v.into();
16201            self
16202        }
16203    }
16204
16205    #[doc(hidden)]
16206    impl gax::options::internal::RequestBuilder for DeleteAsset {
16207        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16208            &mut self.0.options
16209        }
16210    }
16211
16212    /// The request builder for [DataplexService::list_assets][crate::client::DataplexService::list_assets] calls.
16213    ///
16214    /// # Example
16215    /// ```
16216    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListAssets;
16217    /// # async fn sample() -> gax::Result<()> {
16218    /// use gax::paginator::ItemPaginator;
16219    ///
16220    /// let builder = prepare_request_builder();
16221    /// let mut items = builder.by_item();
16222    /// while let Some(result) = items.next().await {
16223    ///   let item = result?;
16224    /// }
16225    /// # Ok(()) }
16226    ///
16227    /// fn prepare_request_builder() -> ListAssets {
16228    ///   # panic!();
16229    ///   // ... details omitted ...
16230    /// }
16231    /// ```
16232    #[derive(Clone, Debug)]
16233    pub struct ListAssets(RequestBuilder<crate::model::ListAssetsRequest>);
16234
16235    impl ListAssets {
16236        pub(crate) fn new(
16237            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16238        ) -> Self {
16239            Self(RequestBuilder::new(stub))
16240        }
16241
16242        /// Sets the full request, replacing any prior values.
16243        pub fn with_request<V: Into<crate::model::ListAssetsRequest>>(mut self, v: V) -> Self {
16244            self.0.request = v.into();
16245            self
16246        }
16247
16248        /// Sets all the options, replacing any prior values.
16249        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16250            self.0.options = v.into();
16251            self
16252        }
16253
16254        /// Sends the request.
16255        pub async fn send(self) -> Result<crate::model::ListAssetsResponse> {
16256            (*self.0.stub)
16257                .list_assets(self.0.request, self.0.options)
16258                .await
16259                .map(gax::response::Response::into_body)
16260        }
16261
16262        /// Streams each page in the collection.
16263        pub fn by_page(
16264            self,
16265        ) -> impl gax::paginator::Paginator<crate::model::ListAssetsResponse, gax::error::Error>
16266        {
16267            use std::clone::Clone;
16268            let token = self.0.request.page_token.clone();
16269            let execute = move |token: String| {
16270                let mut builder = self.clone();
16271                builder.0.request = builder.0.request.set_page_token(token);
16272                builder.send()
16273            };
16274            gax::paginator::internal::new_paginator(token, execute)
16275        }
16276
16277        /// Streams each item in the collection.
16278        pub fn by_item(
16279            self,
16280        ) -> impl gax::paginator::ItemPaginator<crate::model::ListAssetsResponse, gax::error::Error>
16281        {
16282            use gax::paginator::Paginator;
16283            self.by_page().items()
16284        }
16285
16286        /// Sets the value of [parent][crate::model::ListAssetsRequest::parent].
16287        ///
16288        /// This is a **required** field for requests.
16289        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16290            self.0.request.parent = v.into();
16291            self
16292        }
16293
16294        /// Sets the value of [page_size][crate::model::ListAssetsRequest::page_size].
16295        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16296            self.0.request.page_size = v.into();
16297            self
16298        }
16299
16300        /// Sets the value of [page_token][crate::model::ListAssetsRequest::page_token].
16301        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16302            self.0.request.page_token = v.into();
16303            self
16304        }
16305
16306        /// Sets the value of [filter][crate::model::ListAssetsRequest::filter].
16307        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16308            self.0.request.filter = v.into();
16309            self
16310        }
16311
16312        /// Sets the value of [order_by][crate::model::ListAssetsRequest::order_by].
16313        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
16314            self.0.request.order_by = v.into();
16315            self
16316        }
16317    }
16318
16319    #[doc(hidden)]
16320    impl gax::options::internal::RequestBuilder for ListAssets {
16321        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16322            &mut self.0.options
16323        }
16324    }
16325
16326    /// The request builder for [DataplexService::get_asset][crate::client::DataplexService::get_asset] calls.
16327    ///
16328    /// # Example
16329    /// ```
16330    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetAsset;
16331    /// # async fn sample() -> gax::Result<()> {
16332    ///
16333    /// let builder = prepare_request_builder();
16334    /// let response = builder.send().await?;
16335    /// # Ok(()) }
16336    ///
16337    /// fn prepare_request_builder() -> GetAsset {
16338    ///   # panic!();
16339    ///   // ... details omitted ...
16340    /// }
16341    /// ```
16342    #[derive(Clone, Debug)]
16343    pub struct GetAsset(RequestBuilder<crate::model::GetAssetRequest>);
16344
16345    impl GetAsset {
16346        pub(crate) fn new(
16347            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16348        ) -> Self {
16349            Self(RequestBuilder::new(stub))
16350        }
16351
16352        /// Sets the full request, replacing any prior values.
16353        pub fn with_request<V: Into<crate::model::GetAssetRequest>>(mut self, v: V) -> Self {
16354            self.0.request = v.into();
16355            self
16356        }
16357
16358        /// Sets all the options, replacing any prior values.
16359        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16360            self.0.options = v.into();
16361            self
16362        }
16363
16364        /// Sends the request.
16365        pub async fn send(self) -> Result<crate::model::Asset> {
16366            (*self.0.stub)
16367                .get_asset(self.0.request, self.0.options)
16368                .await
16369                .map(gax::response::Response::into_body)
16370        }
16371
16372        /// Sets the value of [name][crate::model::GetAssetRequest::name].
16373        ///
16374        /// This is a **required** field for requests.
16375        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16376            self.0.request.name = v.into();
16377            self
16378        }
16379    }
16380
16381    #[doc(hidden)]
16382    impl gax::options::internal::RequestBuilder for GetAsset {
16383        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16384            &mut self.0.options
16385        }
16386    }
16387
16388    /// The request builder for [DataplexService::list_asset_actions][crate::client::DataplexService::list_asset_actions] calls.
16389    ///
16390    /// # Example
16391    /// ```
16392    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListAssetActions;
16393    /// # async fn sample() -> gax::Result<()> {
16394    /// use gax::paginator::ItemPaginator;
16395    ///
16396    /// let builder = prepare_request_builder();
16397    /// let mut items = builder.by_item();
16398    /// while let Some(result) = items.next().await {
16399    ///   let item = result?;
16400    /// }
16401    /// # Ok(()) }
16402    ///
16403    /// fn prepare_request_builder() -> ListAssetActions {
16404    ///   # panic!();
16405    ///   // ... details omitted ...
16406    /// }
16407    /// ```
16408    #[derive(Clone, Debug)]
16409    pub struct ListAssetActions(RequestBuilder<crate::model::ListAssetActionsRequest>);
16410
16411    impl ListAssetActions {
16412        pub(crate) fn new(
16413            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16414        ) -> Self {
16415            Self(RequestBuilder::new(stub))
16416        }
16417
16418        /// Sets the full request, replacing any prior values.
16419        pub fn with_request<V: Into<crate::model::ListAssetActionsRequest>>(
16420            mut self,
16421            v: V,
16422        ) -> Self {
16423            self.0.request = v.into();
16424            self
16425        }
16426
16427        /// Sets all the options, replacing any prior values.
16428        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16429            self.0.options = v.into();
16430            self
16431        }
16432
16433        /// Sends the request.
16434        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
16435            (*self.0.stub)
16436                .list_asset_actions(self.0.request, self.0.options)
16437                .await
16438                .map(gax::response::Response::into_body)
16439        }
16440
16441        /// Streams each page in the collection.
16442        pub fn by_page(
16443            self,
16444        ) -> impl gax::paginator::Paginator<crate::model::ListActionsResponse, gax::error::Error>
16445        {
16446            use std::clone::Clone;
16447            let token = self.0.request.page_token.clone();
16448            let execute = move |token: String| {
16449                let mut builder = self.clone();
16450                builder.0.request = builder.0.request.set_page_token(token);
16451                builder.send()
16452            };
16453            gax::paginator::internal::new_paginator(token, execute)
16454        }
16455
16456        /// Streams each item in the collection.
16457        pub fn by_item(
16458            self,
16459        ) -> impl gax::paginator::ItemPaginator<crate::model::ListActionsResponse, gax::error::Error>
16460        {
16461            use gax::paginator::Paginator;
16462            self.by_page().items()
16463        }
16464
16465        /// Sets the value of [parent][crate::model::ListAssetActionsRequest::parent].
16466        ///
16467        /// This is a **required** field for requests.
16468        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16469            self.0.request.parent = v.into();
16470            self
16471        }
16472
16473        /// Sets the value of [page_size][crate::model::ListAssetActionsRequest::page_size].
16474        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16475            self.0.request.page_size = v.into();
16476            self
16477        }
16478
16479        /// Sets the value of [page_token][crate::model::ListAssetActionsRequest::page_token].
16480        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16481            self.0.request.page_token = v.into();
16482            self
16483        }
16484    }
16485
16486    #[doc(hidden)]
16487    impl gax::options::internal::RequestBuilder for ListAssetActions {
16488        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16489            &mut self.0.options
16490        }
16491    }
16492
16493    /// The request builder for [DataplexService::create_task][crate::client::DataplexService::create_task] calls.
16494    ///
16495    /// # Example
16496    /// ```
16497    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateTask;
16498    /// # async fn sample() -> gax::Result<()> {
16499    /// use lro::Poller;
16500    ///
16501    /// let builder = prepare_request_builder();
16502    /// let response = builder.poller().until_done().await?;
16503    /// # Ok(()) }
16504    ///
16505    /// fn prepare_request_builder() -> CreateTask {
16506    ///   # panic!();
16507    ///   // ... details omitted ...
16508    /// }
16509    /// ```
16510    #[derive(Clone, Debug)]
16511    pub struct CreateTask(RequestBuilder<crate::model::CreateTaskRequest>);
16512
16513    impl CreateTask {
16514        pub(crate) fn new(
16515            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16516        ) -> Self {
16517            Self(RequestBuilder::new(stub))
16518        }
16519
16520        /// Sets the full request, replacing any prior values.
16521        pub fn with_request<V: Into<crate::model::CreateTaskRequest>>(mut self, v: V) -> Self {
16522            self.0.request = v.into();
16523            self
16524        }
16525
16526        /// Sets all the options, replacing any prior values.
16527        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16528            self.0.options = v.into();
16529            self
16530        }
16531
16532        /// Sends the request.
16533        ///
16534        /// # Long running operations
16535        ///
16536        /// This starts, but does not poll, a longrunning operation. More information
16537        /// on [create_task][crate::client::DataplexService::create_task].
16538        pub async fn send(self) -> Result<longrunning::model::Operation> {
16539            (*self.0.stub)
16540                .create_task(self.0.request, self.0.options)
16541                .await
16542                .map(gax::response::Response::into_body)
16543        }
16544
16545        /// Creates a [Poller][lro::Poller] to work with `create_task`.
16546        pub fn poller(
16547            self,
16548        ) -> impl lro::Poller<crate::model::Task, crate::model::OperationMetadata> {
16549            type Operation =
16550                lro::internal::Operation<crate::model::Task, crate::model::OperationMetadata>;
16551            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
16552            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
16553
16554            let stub = self.0.stub.clone();
16555            let mut options = self.0.options.clone();
16556            options.set_retry_policy(gax::retry_policy::NeverRetry);
16557            let query = move |name| {
16558                let stub = stub.clone();
16559                let options = options.clone();
16560                async {
16561                    let op = GetOperation::new(stub)
16562                        .set_name(name)
16563                        .with_options(options)
16564                        .send()
16565                        .await?;
16566                    Ok(Operation::new(op))
16567                }
16568            };
16569
16570            let start = move || async {
16571                let op = self.send().await?;
16572                Ok(Operation::new(op))
16573            };
16574
16575            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
16576        }
16577
16578        /// Sets the value of [parent][crate::model::CreateTaskRequest::parent].
16579        ///
16580        /// This is a **required** field for requests.
16581        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16582            self.0.request.parent = v.into();
16583            self
16584        }
16585
16586        /// Sets the value of [task_id][crate::model::CreateTaskRequest::task_id].
16587        ///
16588        /// This is a **required** field for requests.
16589        pub fn set_task_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
16590            self.0.request.task_id = v.into();
16591            self
16592        }
16593
16594        /// Sets the value of [task][crate::model::CreateTaskRequest::task].
16595        ///
16596        /// This is a **required** field for requests.
16597        pub fn set_task<T>(mut self, v: T) -> Self
16598        where
16599            T: std::convert::Into<crate::model::Task>,
16600        {
16601            self.0.request.task = std::option::Option::Some(v.into());
16602            self
16603        }
16604
16605        /// Sets or clears the value of [task][crate::model::CreateTaskRequest::task].
16606        ///
16607        /// This is a **required** field for requests.
16608        pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
16609        where
16610            T: std::convert::Into<crate::model::Task>,
16611        {
16612            self.0.request.task = v.map(|x| x.into());
16613            self
16614        }
16615
16616        /// Sets the value of [validate_only][crate::model::CreateTaskRequest::validate_only].
16617        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16618            self.0.request.validate_only = v.into();
16619            self
16620        }
16621    }
16622
16623    #[doc(hidden)]
16624    impl gax::options::internal::RequestBuilder for CreateTask {
16625        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16626            &mut self.0.options
16627        }
16628    }
16629
16630    /// The request builder for [DataplexService::update_task][crate::client::DataplexService::update_task] calls.
16631    ///
16632    /// # Example
16633    /// ```
16634    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateTask;
16635    /// # async fn sample() -> gax::Result<()> {
16636    /// use lro::Poller;
16637    ///
16638    /// let builder = prepare_request_builder();
16639    /// let response = builder.poller().until_done().await?;
16640    /// # Ok(()) }
16641    ///
16642    /// fn prepare_request_builder() -> UpdateTask {
16643    ///   # panic!();
16644    ///   // ... details omitted ...
16645    /// }
16646    /// ```
16647    #[derive(Clone, Debug)]
16648    pub struct UpdateTask(RequestBuilder<crate::model::UpdateTaskRequest>);
16649
16650    impl UpdateTask {
16651        pub(crate) fn new(
16652            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16653        ) -> Self {
16654            Self(RequestBuilder::new(stub))
16655        }
16656
16657        /// Sets the full request, replacing any prior values.
16658        pub fn with_request<V: Into<crate::model::UpdateTaskRequest>>(mut self, v: V) -> Self {
16659            self.0.request = v.into();
16660            self
16661        }
16662
16663        /// Sets all the options, replacing any prior values.
16664        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16665            self.0.options = v.into();
16666            self
16667        }
16668
16669        /// Sends the request.
16670        ///
16671        /// # Long running operations
16672        ///
16673        /// This starts, but does not poll, a longrunning operation. More information
16674        /// on [update_task][crate::client::DataplexService::update_task].
16675        pub async fn send(self) -> Result<longrunning::model::Operation> {
16676            (*self.0.stub)
16677                .update_task(self.0.request, self.0.options)
16678                .await
16679                .map(gax::response::Response::into_body)
16680        }
16681
16682        /// Creates a [Poller][lro::Poller] to work with `update_task`.
16683        pub fn poller(
16684            self,
16685        ) -> impl lro::Poller<crate::model::Task, crate::model::OperationMetadata> {
16686            type Operation =
16687                lro::internal::Operation<crate::model::Task, crate::model::OperationMetadata>;
16688            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
16689            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
16690
16691            let stub = self.0.stub.clone();
16692            let mut options = self.0.options.clone();
16693            options.set_retry_policy(gax::retry_policy::NeverRetry);
16694            let query = move |name| {
16695                let stub = stub.clone();
16696                let options = options.clone();
16697                async {
16698                    let op = GetOperation::new(stub)
16699                        .set_name(name)
16700                        .with_options(options)
16701                        .send()
16702                        .await?;
16703                    Ok(Operation::new(op))
16704                }
16705            };
16706
16707            let start = move || async {
16708                let op = self.send().await?;
16709                Ok(Operation::new(op))
16710            };
16711
16712            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
16713        }
16714
16715        /// Sets the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
16716        ///
16717        /// This is a **required** field for requests.
16718        pub fn set_update_mask<T>(mut self, v: T) -> Self
16719        where
16720            T: std::convert::Into<wkt::FieldMask>,
16721        {
16722            self.0.request.update_mask = std::option::Option::Some(v.into());
16723            self
16724        }
16725
16726        /// Sets or clears the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
16727        ///
16728        /// This is a **required** field for requests.
16729        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
16730        where
16731            T: std::convert::Into<wkt::FieldMask>,
16732        {
16733            self.0.request.update_mask = v.map(|x| x.into());
16734            self
16735        }
16736
16737        /// Sets the value of [task][crate::model::UpdateTaskRequest::task].
16738        ///
16739        /// This is a **required** field for requests.
16740        pub fn set_task<T>(mut self, v: T) -> Self
16741        where
16742            T: std::convert::Into<crate::model::Task>,
16743        {
16744            self.0.request.task = std::option::Option::Some(v.into());
16745            self
16746        }
16747
16748        /// Sets or clears the value of [task][crate::model::UpdateTaskRequest::task].
16749        ///
16750        /// This is a **required** field for requests.
16751        pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
16752        where
16753            T: std::convert::Into<crate::model::Task>,
16754        {
16755            self.0.request.task = v.map(|x| x.into());
16756            self
16757        }
16758
16759        /// Sets the value of [validate_only][crate::model::UpdateTaskRequest::validate_only].
16760        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16761            self.0.request.validate_only = v.into();
16762            self
16763        }
16764    }
16765
16766    #[doc(hidden)]
16767    impl gax::options::internal::RequestBuilder for UpdateTask {
16768        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16769            &mut self.0.options
16770        }
16771    }
16772
16773    /// The request builder for [DataplexService::delete_task][crate::client::DataplexService::delete_task] calls.
16774    ///
16775    /// # Example
16776    /// ```
16777    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteTask;
16778    /// # async fn sample() -> gax::Result<()> {
16779    /// use lro::Poller;
16780    ///
16781    /// let builder = prepare_request_builder();
16782    /// let response = builder.poller().until_done().await?;
16783    /// # Ok(()) }
16784    ///
16785    /// fn prepare_request_builder() -> DeleteTask {
16786    ///   # panic!();
16787    ///   // ... details omitted ...
16788    /// }
16789    /// ```
16790    #[derive(Clone, Debug)]
16791    pub struct DeleteTask(RequestBuilder<crate::model::DeleteTaskRequest>);
16792
16793    impl DeleteTask {
16794        pub(crate) fn new(
16795            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16796        ) -> Self {
16797            Self(RequestBuilder::new(stub))
16798        }
16799
16800        /// Sets the full request, replacing any prior values.
16801        pub fn with_request<V: Into<crate::model::DeleteTaskRequest>>(mut self, v: V) -> Self {
16802            self.0.request = v.into();
16803            self
16804        }
16805
16806        /// Sets all the options, replacing any prior values.
16807        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16808            self.0.options = v.into();
16809            self
16810        }
16811
16812        /// Sends the request.
16813        ///
16814        /// # Long running operations
16815        ///
16816        /// This starts, but does not poll, a longrunning operation. More information
16817        /// on [delete_task][crate::client::DataplexService::delete_task].
16818        pub async fn send(self) -> Result<longrunning::model::Operation> {
16819            (*self.0.stub)
16820                .delete_task(self.0.request, self.0.options)
16821                .await
16822                .map(gax::response::Response::into_body)
16823        }
16824
16825        /// Creates a [Poller][lro::Poller] to work with `delete_task`.
16826        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
16827            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
16828            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
16829            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
16830
16831            let stub = self.0.stub.clone();
16832            let mut options = self.0.options.clone();
16833            options.set_retry_policy(gax::retry_policy::NeverRetry);
16834            let query = move |name| {
16835                let stub = stub.clone();
16836                let options = options.clone();
16837                async {
16838                    let op = GetOperation::new(stub)
16839                        .set_name(name)
16840                        .with_options(options)
16841                        .send()
16842                        .await?;
16843                    Ok(Operation::new(op))
16844                }
16845            };
16846
16847            let start = move || async {
16848                let op = self.send().await?;
16849                Ok(Operation::new(op))
16850            };
16851
16852            lro::internal::new_unit_response_poller(
16853                polling_error_policy,
16854                polling_backoff_policy,
16855                start,
16856                query,
16857            )
16858        }
16859
16860        /// Sets the value of [name][crate::model::DeleteTaskRequest::name].
16861        ///
16862        /// This is a **required** field for requests.
16863        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16864            self.0.request.name = v.into();
16865            self
16866        }
16867    }
16868
16869    #[doc(hidden)]
16870    impl gax::options::internal::RequestBuilder for DeleteTask {
16871        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16872            &mut self.0.options
16873        }
16874    }
16875
16876    /// The request builder for [DataplexService::list_tasks][crate::client::DataplexService::list_tasks] calls.
16877    ///
16878    /// # Example
16879    /// ```
16880    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListTasks;
16881    /// # async fn sample() -> gax::Result<()> {
16882    /// use gax::paginator::ItemPaginator;
16883    ///
16884    /// let builder = prepare_request_builder();
16885    /// let mut items = builder.by_item();
16886    /// while let Some(result) = items.next().await {
16887    ///   let item = result?;
16888    /// }
16889    /// # Ok(()) }
16890    ///
16891    /// fn prepare_request_builder() -> ListTasks {
16892    ///   # panic!();
16893    ///   // ... details omitted ...
16894    /// }
16895    /// ```
16896    #[derive(Clone, Debug)]
16897    pub struct ListTasks(RequestBuilder<crate::model::ListTasksRequest>);
16898
16899    impl ListTasks {
16900        pub(crate) fn new(
16901            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16902        ) -> Self {
16903            Self(RequestBuilder::new(stub))
16904        }
16905
16906        /// Sets the full request, replacing any prior values.
16907        pub fn with_request<V: Into<crate::model::ListTasksRequest>>(mut self, v: V) -> Self {
16908            self.0.request = v.into();
16909            self
16910        }
16911
16912        /// Sets all the options, replacing any prior values.
16913        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16914            self.0.options = v.into();
16915            self
16916        }
16917
16918        /// Sends the request.
16919        pub async fn send(self) -> Result<crate::model::ListTasksResponse> {
16920            (*self.0.stub)
16921                .list_tasks(self.0.request, self.0.options)
16922                .await
16923                .map(gax::response::Response::into_body)
16924        }
16925
16926        /// Streams each page in the collection.
16927        pub fn by_page(
16928            self,
16929        ) -> impl gax::paginator::Paginator<crate::model::ListTasksResponse, gax::error::Error>
16930        {
16931            use std::clone::Clone;
16932            let token = self.0.request.page_token.clone();
16933            let execute = move |token: String| {
16934                let mut builder = self.clone();
16935                builder.0.request = builder.0.request.set_page_token(token);
16936                builder.send()
16937            };
16938            gax::paginator::internal::new_paginator(token, execute)
16939        }
16940
16941        /// Streams each item in the collection.
16942        pub fn by_item(
16943            self,
16944        ) -> impl gax::paginator::ItemPaginator<crate::model::ListTasksResponse, gax::error::Error>
16945        {
16946            use gax::paginator::Paginator;
16947            self.by_page().items()
16948        }
16949
16950        /// Sets the value of [parent][crate::model::ListTasksRequest::parent].
16951        ///
16952        /// This is a **required** field for requests.
16953        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16954            self.0.request.parent = v.into();
16955            self
16956        }
16957
16958        /// Sets the value of [page_size][crate::model::ListTasksRequest::page_size].
16959        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16960            self.0.request.page_size = v.into();
16961            self
16962        }
16963
16964        /// Sets the value of [page_token][crate::model::ListTasksRequest::page_token].
16965        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16966            self.0.request.page_token = v.into();
16967            self
16968        }
16969
16970        /// Sets the value of [filter][crate::model::ListTasksRequest::filter].
16971        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16972            self.0.request.filter = v.into();
16973            self
16974        }
16975
16976        /// Sets the value of [order_by][crate::model::ListTasksRequest::order_by].
16977        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
16978            self.0.request.order_by = v.into();
16979            self
16980        }
16981    }
16982
16983    #[doc(hidden)]
16984    impl gax::options::internal::RequestBuilder for ListTasks {
16985        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16986            &mut self.0.options
16987        }
16988    }
16989
16990    /// The request builder for [DataplexService::get_task][crate::client::DataplexService::get_task] calls.
16991    ///
16992    /// # Example
16993    /// ```
16994    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetTask;
16995    /// # async fn sample() -> gax::Result<()> {
16996    ///
16997    /// let builder = prepare_request_builder();
16998    /// let response = builder.send().await?;
16999    /// # Ok(()) }
17000    ///
17001    /// fn prepare_request_builder() -> GetTask {
17002    ///   # panic!();
17003    ///   // ... details omitted ...
17004    /// }
17005    /// ```
17006    #[derive(Clone, Debug)]
17007    pub struct GetTask(RequestBuilder<crate::model::GetTaskRequest>);
17008
17009    impl GetTask {
17010        pub(crate) fn new(
17011            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17012        ) -> Self {
17013            Self(RequestBuilder::new(stub))
17014        }
17015
17016        /// Sets the full request, replacing any prior values.
17017        pub fn with_request<V: Into<crate::model::GetTaskRequest>>(mut self, v: V) -> Self {
17018            self.0.request = v.into();
17019            self
17020        }
17021
17022        /// Sets all the options, replacing any prior values.
17023        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17024            self.0.options = v.into();
17025            self
17026        }
17027
17028        /// Sends the request.
17029        pub async fn send(self) -> Result<crate::model::Task> {
17030            (*self.0.stub)
17031                .get_task(self.0.request, self.0.options)
17032                .await
17033                .map(gax::response::Response::into_body)
17034        }
17035
17036        /// Sets the value of [name][crate::model::GetTaskRequest::name].
17037        ///
17038        /// This is a **required** field for requests.
17039        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17040            self.0.request.name = v.into();
17041            self
17042        }
17043    }
17044
17045    #[doc(hidden)]
17046    impl gax::options::internal::RequestBuilder for GetTask {
17047        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17048            &mut self.0.options
17049        }
17050    }
17051
17052    /// The request builder for [DataplexService::list_jobs][crate::client::DataplexService::list_jobs] calls.
17053    ///
17054    /// # Example
17055    /// ```
17056    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListJobs;
17057    /// # async fn sample() -> gax::Result<()> {
17058    /// use gax::paginator::ItemPaginator;
17059    ///
17060    /// let builder = prepare_request_builder();
17061    /// let mut items = builder.by_item();
17062    /// while let Some(result) = items.next().await {
17063    ///   let item = result?;
17064    /// }
17065    /// # Ok(()) }
17066    ///
17067    /// fn prepare_request_builder() -> ListJobs {
17068    ///   # panic!();
17069    ///   // ... details omitted ...
17070    /// }
17071    /// ```
17072    #[derive(Clone, Debug)]
17073    pub struct ListJobs(RequestBuilder<crate::model::ListJobsRequest>);
17074
17075    impl ListJobs {
17076        pub(crate) fn new(
17077            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17078        ) -> Self {
17079            Self(RequestBuilder::new(stub))
17080        }
17081
17082        /// Sets the full request, replacing any prior values.
17083        pub fn with_request<V: Into<crate::model::ListJobsRequest>>(mut self, v: V) -> Self {
17084            self.0.request = v.into();
17085            self
17086        }
17087
17088        /// Sets all the options, replacing any prior values.
17089        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17090            self.0.options = v.into();
17091            self
17092        }
17093
17094        /// Sends the request.
17095        pub async fn send(self) -> Result<crate::model::ListJobsResponse> {
17096            (*self.0.stub)
17097                .list_jobs(self.0.request, self.0.options)
17098                .await
17099                .map(gax::response::Response::into_body)
17100        }
17101
17102        /// Streams each page in the collection.
17103        pub fn by_page(
17104            self,
17105        ) -> impl gax::paginator::Paginator<crate::model::ListJobsResponse, gax::error::Error>
17106        {
17107            use std::clone::Clone;
17108            let token = self.0.request.page_token.clone();
17109            let execute = move |token: String| {
17110                let mut builder = self.clone();
17111                builder.0.request = builder.0.request.set_page_token(token);
17112                builder.send()
17113            };
17114            gax::paginator::internal::new_paginator(token, execute)
17115        }
17116
17117        /// Streams each item in the collection.
17118        pub fn by_item(
17119            self,
17120        ) -> impl gax::paginator::ItemPaginator<crate::model::ListJobsResponse, gax::error::Error>
17121        {
17122            use gax::paginator::Paginator;
17123            self.by_page().items()
17124        }
17125
17126        /// Sets the value of [parent][crate::model::ListJobsRequest::parent].
17127        ///
17128        /// This is a **required** field for requests.
17129        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
17130            self.0.request.parent = v.into();
17131            self
17132        }
17133
17134        /// Sets the value of [page_size][crate::model::ListJobsRequest::page_size].
17135        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17136            self.0.request.page_size = v.into();
17137            self
17138        }
17139
17140        /// Sets the value of [page_token][crate::model::ListJobsRequest::page_token].
17141        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17142            self.0.request.page_token = v.into();
17143            self
17144        }
17145    }
17146
17147    #[doc(hidden)]
17148    impl gax::options::internal::RequestBuilder for ListJobs {
17149        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17150            &mut self.0.options
17151        }
17152    }
17153
17154    /// The request builder for [DataplexService::run_task][crate::client::DataplexService::run_task] calls.
17155    ///
17156    /// # Example
17157    /// ```
17158    /// # use google_cloud_dataplex_v1::builder::dataplex_service::RunTask;
17159    /// # async fn sample() -> gax::Result<()> {
17160    ///
17161    /// let builder = prepare_request_builder();
17162    /// let response = builder.send().await?;
17163    /// # Ok(()) }
17164    ///
17165    /// fn prepare_request_builder() -> RunTask {
17166    ///   # panic!();
17167    ///   // ... details omitted ...
17168    /// }
17169    /// ```
17170    #[derive(Clone, Debug)]
17171    pub struct RunTask(RequestBuilder<crate::model::RunTaskRequest>);
17172
17173    impl RunTask {
17174        pub(crate) fn new(
17175            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17176        ) -> Self {
17177            Self(RequestBuilder::new(stub))
17178        }
17179
17180        /// Sets the full request, replacing any prior values.
17181        pub fn with_request<V: Into<crate::model::RunTaskRequest>>(mut self, v: V) -> Self {
17182            self.0.request = v.into();
17183            self
17184        }
17185
17186        /// Sets all the options, replacing any prior values.
17187        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17188            self.0.options = v.into();
17189            self
17190        }
17191
17192        /// Sends the request.
17193        pub async fn send(self) -> Result<crate::model::RunTaskResponse> {
17194            (*self.0.stub)
17195                .run_task(self.0.request, self.0.options)
17196                .await
17197                .map(gax::response::Response::into_body)
17198        }
17199
17200        /// Sets the value of [name][crate::model::RunTaskRequest::name].
17201        ///
17202        /// This is a **required** field for requests.
17203        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17204            self.0.request.name = v.into();
17205            self
17206        }
17207
17208        /// Sets the value of [labels][crate::model::RunTaskRequest::labels].
17209        pub fn set_labels<T, K, V>(mut self, v: T) -> Self
17210        where
17211            T: std::iter::IntoIterator<Item = (K, V)>,
17212            K: std::convert::Into<std::string::String>,
17213            V: std::convert::Into<std::string::String>,
17214        {
17215            self.0.request.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
17216            self
17217        }
17218
17219        /// Sets the value of [args][crate::model::RunTaskRequest::args].
17220        pub fn set_args<T, K, V>(mut self, v: T) -> Self
17221        where
17222            T: std::iter::IntoIterator<Item = (K, V)>,
17223            K: std::convert::Into<std::string::String>,
17224            V: std::convert::Into<std::string::String>,
17225        {
17226            self.0.request.args = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
17227            self
17228        }
17229    }
17230
17231    #[doc(hidden)]
17232    impl gax::options::internal::RequestBuilder for RunTask {
17233        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17234            &mut self.0.options
17235        }
17236    }
17237
17238    /// The request builder for [DataplexService::get_job][crate::client::DataplexService::get_job] calls.
17239    ///
17240    /// # Example
17241    /// ```
17242    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetJob;
17243    /// # async fn sample() -> gax::Result<()> {
17244    ///
17245    /// let builder = prepare_request_builder();
17246    /// let response = builder.send().await?;
17247    /// # Ok(()) }
17248    ///
17249    /// fn prepare_request_builder() -> GetJob {
17250    ///   # panic!();
17251    ///   // ... details omitted ...
17252    /// }
17253    /// ```
17254    #[derive(Clone, Debug)]
17255    pub struct GetJob(RequestBuilder<crate::model::GetJobRequest>);
17256
17257    impl GetJob {
17258        pub(crate) fn new(
17259            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17260        ) -> Self {
17261            Self(RequestBuilder::new(stub))
17262        }
17263
17264        /// Sets the full request, replacing any prior values.
17265        pub fn with_request<V: Into<crate::model::GetJobRequest>>(mut self, v: V) -> Self {
17266            self.0.request = v.into();
17267            self
17268        }
17269
17270        /// Sets all the options, replacing any prior values.
17271        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17272            self.0.options = v.into();
17273            self
17274        }
17275
17276        /// Sends the request.
17277        pub async fn send(self) -> Result<crate::model::Job> {
17278            (*self.0.stub)
17279                .get_job(self.0.request, self.0.options)
17280                .await
17281                .map(gax::response::Response::into_body)
17282        }
17283
17284        /// Sets the value of [name][crate::model::GetJobRequest::name].
17285        ///
17286        /// This is a **required** field for requests.
17287        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17288            self.0.request.name = v.into();
17289            self
17290        }
17291    }
17292
17293    #[doc(hidden)]
17294    impl gax::options::internal::RequestBuilder for GetJob {
17295        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17296            &mut self.0.options
17297        }
17298    }
17299
17300    /// The request builder for [DataplexService::cancel_job][crate::client::DataplexService::cancel_job] calls.
17301    ///
17302    /// # Example
17303    /// ```
17304    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CancelJob;
17305    /// # async fn sample() -> gax::Result<()> {
17306    ///
17307    /// let builder = prepare_request_builder();
17308    /// let response = builder.send().await?;
17309    /// # Ok(()) }
17310    ///
17311    /// fn prepare_request_builder() -> CancelJob {
17312    ///   # panic!();
17313    ///   // ... details omitted ...
17314    /// }
17315    /// ```
17316    #[derive(Clone, Debug)]
17317    pub struct CancelJob(RequestBuilder<crate::model::CancelJobRequest>);
17318
17319    impl CancelJob {
17320        pub(crate) fn new(
17321            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17322        ) -> Self {
17323            Self(RequestBuilder::new(stub))
17324        }
17325
17326        /// Sets the full request, replacing any prior values.
17327        pub fn with_request<V: Into<crate::model::CancelJobRequest>>(mut self, v: V) -> Self {
17328            self.0.request = v.into();
17329            self
17330        }
17331
17332        /// Sets all the options, replacing any prior values.
17333        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17334            self.0.options = v.into();
17335            self
17336        }
17337
17338        /// Sends the request.
17339        pub async fn send(self) -> Result<()> {
17340            (*self.0.stub)
17341                .cancel_job(self.0.request, self.0.options)
17342                .await
17343                .map(gax::response::Response::into_body)
17344        }
17345
17346        /// Sets the value of [name][crate::model::CancelJobRequest::name].
17347        ///
17348        /// This is a **required** field for requests.
17349        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17350            self.0.request.name = v.into();
17351            self
17352        }
17353    }
17354
17355    #[doc(hidden)]
17356    impl gax::options::internal::RequestBuilder for CancelJob {
17357        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17358            &mut self.0.options
17359        }
17360    }
17361
17362    /// The request builder for [DataplexService::create_environment][crate::client::DataplexService::create_environment] calls.
17363    ///
17364    /// # Example
17365    /// ```
17366    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateEnvironment;
17367    /// # async fn sample() -> gax::Result<()> {
17368    /// use lro::Poller;
17369    ///
17370    /// let builder = prepare_request_builder();
17371    /// let response = builder.poller().until_done().await?;
17372    /// # Ok(()) }
17373    ///
17374    /// fn prepare_request_builder() -> CreateEnvironment {
17375    ///   # panic!();
17376    ///   // ... details omitted ...
17377    /// }
17378    /// ```
17379    #[derive(Clone, Debug)]
17380    pub struct CreateEnvironment(RequestBuilder<crate::model::CreateEnvironmentRequest>);
17381
17382    impl CreateEnvironment {
17383        pub(crate) fn new(
17384            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17385        ) -> Self {
17386            Self(RequestBuilder::new(stub))
17387        }
17388
17389        /// Sets the full request, replacing any prior values.
17390        pub fn with_request<V: Into<crate::model::CreateEnvironmentRequest>>(
17391            mut self,
17392            v: V,
17393        ) -> Self {
17394            self.0.request = v.into();
17395            self
17396        }
17397
17398        /// Sets all the options, replacing any prior values.
17399        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17400            self.0.options = v.into();
17401            self
17402        }
17403
17404        /// Sends the request.
17405        ///
17406        /// # Long running operations
17407        ///
17408        /// This starts, but does not poll, a longrunning operation. More information
17409        /// on [create_environment][crate::client::DataplexService::create_environment].
17410        pub async fn send(self) -> Result<longrunning::model::Operation> {
17411            (*self.0.stub)
17412                .create_environment(self.0.request, self.0.options)
17413                .await
17414                .map(gax::response::Response::into_body)
17415        }
17416
17417        /// Creates a [Poller][lro::Poller] to work with `create_environment`.
17418        pub fn poller(
17419            self,
17420        ) -> impl lro::Poller<crate::model::Environment, crate::model::OperationMetadata> {
17421            type Operation = lro::internal::Operation<
17422                crate::model::Environment,
17423                crate::model::OperationMetadata,
17424            >;
17425            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17426            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17427
17428            let stub = self.0.stub.clone();
17429            let mut options = self.0.options.clone();
17430            options.set_retry_policy(gax::retry_policy::NeverRetry);
17431            let query = move |name| {
17432                let stub = stub.clone();
17433                let options = options.clone();
17434                async {
17435                    let op = GetOperation::new(stub)
17436                        .set_name(name)
17437                        .with_options(options)
17438                        .send()
17439                        .await?;
17440                    Ok(Operation::new(op))
17441                }
17442            };
17443
17444            let start = move || async {
17445                let op = self.send().await?;
17446                Ok(Operation::new(op))
17447            };
17448
17449            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
17450        }
17451
17452        /// Sets the value of [parent][crate::model::CreateEnvironmentRequest::parent].
17453        ///
17454        /// This is a **required** field for requests.
17455        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
17456            self.0.request.parent = v.into();
17457            self
17458        }
17459
17460        /// Sets the value of [environment_id][crate::model::CreateEnvironmentRequest::environment_id].
17461        ///
17462        /// This is a **required** field for requests.
17463        pub fn set_environment_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
17464            self.0.request.environment_id = v.into();
17465            self
17466        }
17467
17468        /// Sets the value of [environment][crate::model::CreateEnvironmentRequest::environment].
17469        ///
17470        /// This is a **required** field for requests.
17471        pub fn set_environment<T>(mut self, v: T) -> Self
17472        where
17473            T: std::convert::Into<crate::model::Environment>,
17474        {
17475            self.0.request.environment = std::option::Option::Some(v.into());
17476            self
17477        }
17478
17479        /// Sets or clears the value of [environment][crate::model::CreateEnvironmentRequest::environment].
17480        ///
17481        /// This is a **required** field for requests.
17482        pub fn set_or_clear_environment<T>(mut self, v: std::option::Option<T>) -> Self
17483        where
17484            T: std::convert::Into<crate::model::Environment>,
17485        {
17486            self.0.request.environment = v.map(|x| x.into());
17487            self
17488        }
17489
17490        /// Sets the value of [validate_only][crate::model::CreateEnvironmentRequest::validate_only].
17491        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
17492            self.0.request.validate_only = v.into();
17493            self
17494        }
17495    }
17496
17497    #[doc(hidden)]
17498    impl gax::options::internal::RequestBuilder for CreateEnvironment {
17499        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17500            &mut self.0.options
17501        }
17502    }
17503
17504    /// The request builder for [DataplexService::update_environment][crate::client::DataplexService::update_environment] calls.
17505    ///
17506    /// # Example
17507    /// ```
17508    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateEnvironment;
17509    /// # async fn sample() -> gax::Result<()> {
17510    /// use lro::Poller;
17511    ///
17512    /// let builder = prepare_request_builder();
17513    /// let response = builder.poller().until_done().await?;
17514    /// # Ok(()) }
17515    ///
17516    /// fn prepare_request_builder() -> UpdateEnvironment {
17517    ///   # panic!();
17518    ///   // ... details omitted ...
17519    /// }
17520    /// ```
17521    #[derive(Clone, Debug)]
17522    pub struct UpdateEnvironment(RequestBuilder<crate::model::UpdateEnvironmentRequest>);
17523
17524    impl UpdateEnvironment {
17525        pub(crate) fn new(
17526            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17527        ) -> Self {
17528            Self(RequestBuilder::new(stub))
17529        }
17530
17531        /// Sets the full request, replacing any prior values.
17532        pub fn with_request<V: Into<crate::model::UpdateEnvironmentRequest>>(
17533            mut self,
17534            v: V,
17535        ) -> Self {
17536            self.0.request = v.into();
17537            self
17538        }
17539
17540        /// Sets all the options, replacing any prior values.
17541        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17542            self.0.options = v.into();
17543            self
17544        }
17545
17546        /// Sends the request.
17547        ///
17548        /// # Long running operations
17549        ///
17550        /// This starts, but does not poll, a longrunning operation. More information
17551        /// on [update_environment][crate::client::DataplexService::update_environment].
17552        pub async fn send(self) -> Result<longrunning::model::Operation> {
17553            (*self.0.stub)
17554                .update_environment(self.0.request, self.0.options)
17555                .await
17556                .map(gax::response::Response::into_body)
17557        }
17558
17559        /// Creates a [Poller][lro::Poller] to work with `update_environment`.
17560        pub fn poller(
17561            self,
17562        ) -> impl lro::Poller<crate::model::Environment, crate::model::OperationMetadata> {
17563            type Operation = lro::internal::Operation<
17564                crate::model::Environment,
17565                crate::model::OperationMetadata,
17566            >;
17567            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17568            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17569
17570            let stub = self.0.stub.clone();
17571            let mut options = self.0.options.clone();
17572            options.set_retry_policy(gax::retry_policy::NeverRetry);
17573            let query = move |name| {
17574                let stub = stub.clone();
17575                let options = options.clone();
17576                async {
17577                    let op = GetOperation::new(stub)
17578                        .set_name(name)
17579                        .with_options(options)
17580                        .send()
17581                        .await?;
17582                    Ok(Operation::new(op))
17583                }
17584            };
17585
17586            let start = move || async {
17587                let op = self.send().await?;
17588                Ok(Operation::new(op))
17589            };
17590
17591            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
17592        }
17593
17594        /// Sets the value of [update_mask][crate::model::UpdateEnvironmentRequest::update_mask].
17595        ///
17596        /// This is a **required** field for requests.
17597        pub fn set_update_mask<T>(mut self, v: T) -> Self
17598        where
17599            T: std::convert::Into<wkt::FieldMask>,
17600        {
17601            self.0.request.update_mask = std::option::Option::Some(v.into());
17602            self
17603        }
17604
17605        /// Sets or clears the value of [update_mask][crate::model::UpdateEnvironmentRequest::update_mask].
17606        ///
17607        /// This is a **required** field for requests.
17608        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
17609        where
17610            T: std::convert::Into<wkt::FieldMask>,
17611        {
17612            self.0.request.update_mask = v.map(|x| x.into());
17613            self
17614        }
17615
17616        /// Sets the value of [environment][crate::model::UpdateEnvironmentRequest::environment].
17617        ///
17618        /// This is a **required** field for requests.
17619        pub fn set_environment<T>(mut self, v: T) -> Self
17620        where
17621            T: std::convert::Into<crate::model::Environment>,
17622        {
17623            self.0.request.environment = std::option::Option::Some(v.into());
17624            self
17625        }
17626
17627        /// Sets or clears the value of [environment][crate::model::UpdateEnvironmentRequest::environment].
17628        ///
17629        /// This is a **required** field for requests.
17630        pub fn set_or_clear_environment<T>(mut self, v: std::option::Option<T>) -> Self
17631        where
17632            T: std::convert::Into<crate::model::Environment>,
17633        {
17634            self.0.request.environment = v.map(|x| x.into());
17635            self
17636        }
17637
17638        /// Sets the value of [validate_only][crate::model::UpdateEnvironmentRequest::validate_only].
17639        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
17640            self.0.request.validate_only = v.into();
17641            self
17642        }
17643    }
17644
17645    #[doc(hidden)]
17646    impl gax::options::internal::RequestBuilder for UpdateEnvironment {
17647        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17648            &mut self.0.options
17649        }
17650    }
17651
17652    /// The request builder for [DataplexService::delete_environment][crate::client::DataplexService::delete_environment] calls.
17653    ///
17654    /// # Example
17655    /// ```
17656    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteEnvironment;
17657    /// # async fn sample() -> gax::Result<()> {
17658    /// use lro::Poller;
17659    ///
17660    /// let builder = prepare_request_builder();
17661    /// let response = builder.poller().until_done().await?;
17662    /// # Ok(()) }
17663    ///
17664    /// fn prepare_request_builder() -> DeleteEnvironment {
17665    ///   # panic!();
17666    ///   // ... details omitted ...
17667    /// }
17668    /// ```
17669    #[derive(Clone, Debug)]
17670    pub struct DeleteEnvironment(RequestBuilder<crate::model::DeleteEnvironmentRequest>);
17671
17672    impl DeleteEnvironment {
17673        pub(crate) fn new(
17674            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17675        ) -> Self {
17676            Self(RequestBuilder::new(stub))
17677        }
17678
17679        /// Sets the full request, replacing any prior values.
17680        pub fn with_request<V: Into<crate::model::DeleteEnvironmentRequest>>(
17681            mut self,
17682            v: V,
17683        ) -> Self {
17684            self.0.request = v.into();
17685            self
17686        }
17687
17688        /// Sets all the options, replacing any prior values.
17689        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17690            self.0.options = v.into();
17691            self
17692        }
17693
17694        /// Sends the request.
17695        ///
17696        /// # Long running operations
17697        ///
17698        /// This starts, but does not poll, a longrunning operation. More information
17699        /// on [delete_environment][crate::client::DataplexService::delete_environment].
17700        pub async fn send(self) -> Result<longrunning::model::Operation> {
17701            (*self.0.stub)
17702                .delete_environment(self.0.request, self.0.options)
17703                .await
17704                .map(gax::response::Response::into_body)
17705        }
17706
17707        /// Creates a [Poller][lro::Poller] to work with `delete_environment`.
17708        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
17709            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
17710            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17711            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17712
17713            let stub = self.0.stub.clone();
17714            let mut options = self.0.options.clone();
17715            options.set_retry_policy(gax::retry_policy::NeverRetry);
17716            let query = move |name| {
17717                let stub = stub.clone();
17718                let options = options.clone();
17719                async {
17720                    let op = GetOperation::new(stub)
17721                        .set_name(name)
17722                        .with_options(options)
17723                        .send()
17724                        .await?;
17725                    Ok(Operation::new(op))
17726                }
17727            };
17728
17729            let start = move || async {
17730                let op = self.send().await?;
17731                Ok(Operation::new(op))
17732            };
17733
17734            lro::internal::new_unit_response_poller(
17735                polling_error_policy,
17736                polling_backoff_policy,
17737                start,
17738                query,
17739            )
17740        }
17741
17742        /// Sets the value of [name][crate::model::DeleteEnvironmentRequest::name].
17743        ///
17744        /// This is a **required** field for requests.
17745        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17746            self.0.request.name = v.into();
17747            self
17748        }
17749    }
17750
17751    #[doc(hidden)]
17752    impl gax::options::internal::RequestBuilder for DeleteEnvironment {
17753        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17754            &mut self.0.options
17755        }
17756    }
17757
17758    /// The request builder for [DataplexService::list_environments][crate::client::DataplexService::list_environments] calls.
17759    ///
17760    /// # Example
17761    /// ```
17762    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListEnvironments;
17763    /// # async fn sample() -> gax::Result<()> {
17764    /// use gax::paginator::ItemPaginator;
17765    ///
17766    /// let builder = prepare_request_builder();
17767    /// let mut items = builder.by_item();
17768    /// while let Some(result) = items.next().await {
17769    ///   let item = result?;
17770    /// }
17771    /// # Ok(()) }
17772    ///
17773    /// fn prepare_request_builder() -> ListEnvironments {
17774    ///   # panic!();
17775    ///   // ... details omitted ...
17776    /// }
17777    /// ```
17778    #[derive(Clone, Debug)]
17779    pub struct ListEnvironments(RequestBuilder<crate::model::ListEnvironmentsRequest>);
17780
17781    impl ListEnvironments {
17782        pub(crate) fn new(
17783            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17784        ) -> Self {
17785            Self(RequestBuilder::new(stub))
17786        }
17787
17788        /// Sets the full request, replacing any prior values.
17789        pub fn with_request<V: Into<crate::model::ListEnvironmentsRequest>>(
17790            mut self,
17791            v: V,
17792        ) -> Self {
17793            self.0.request = v.into();
17794            self
17795        }
17796
17797        /// Sets all the options, replacing any prior values.
17798        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17799            self.0.options = v.into();
17800            self
17801        }
17802
17803        /// Sends the request.
17804        pub async fn send(self) -> Result<crate::model::ListEnvironmentsResponse> {
17805            (*self.0.stub)
17806                .list_environments(self.0.request, self.0.options)
17807                .await
17808                .map(gax::response::Response::into_body)
17809        }
17810
17811        /// Streams each page in the collection.
17812        pub fn by_page(
17813            self,
17814        ) -> impl gax::paginator::Paginator<crate::model::ListEnvironmentsResponse, gax::error::Error>
17815        {
17816            use std::clone::Clone;
17817            let token = self.0.request.page_token.clone();
17818            let execute = move |token: String| {
17819                let mut builder = self.clone();
17820                builder.0.request = builder.0.request.set_page_token(token);
17821                builder.send()
17822            };
17823            gax::paginator::internal::new_paginator(token, execute)
17824        }
17825
17826        /// Streams each item in the collection.
17827        pub fn by_item(
17828            self,
17829        ) -> impl gax::paginator::ItemPaginator<crate::model::ListEnvironmentsResponse, gax::error::Error>
17830        {
17831            use gax::paginator::Paginator;
17832            self.by_page().items()
17833        }
17834
17835        /// Sets the value of [parent][crate::model::ListEnvironmentsRequest::parent].
17836        ///
17837        /// This is a **required** field for requests.
17838        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
17839            self.0.request.parent = v.into();
17840            self
17841        }
17842
17843        /// Sets the value of [page_size][crate::model::ListEnvironmentsRequest::page_size].
17844        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17845            self.0.request.page_size = v.into();
17846            self
17847        }
17848
17849        /// Sets the value of [page_token][crate::model::ListEnvironmentsRequest::page_token].
17850        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17851            self.0.request.page_token = v.into();
17852            self
17853        }
17854
17855        /// Sets the value of [filter][crate::model::ListEnvironmentsRequest::filter].
17856        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
17857            self.0.request.filter = v.into();
17858            self
17859        }
17860
17861        /// Sets the value of [order_by][crate::model::ListEnvironmentsRequest::order_by].
17862        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
17863            self.0.request.order_by = v.into();
17864            self
17865        }
17866    }
17867
17868    #[doc(hidden)]
17869    impl gax::options::internal::RequestBuilder for ListEnvironments {
17870        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17871            &mut self.0.options
17872        }
17873    }
17874
17875    /// The request builder for [DataplexService::get_environment][crate::client::DataplexService::get_environment] calls.
17876    ///
17877    /// # Example
17878    /// ```
17879    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetEnvironment;
17880    /// # async fn sample() -> gax::Result<()> {
17881    ///
17882    /// let builder = prepare_request_builder();
17883    /// let response = builder.send().await?;
17884    /// # Ok(()) }
17885    ///
17886    /// fn prepare_request_builder() -> GetEnvironment {
17887    ///   # panic!();
17888    ///   // ... details omitted ...
17889    /// }
17890    /// ```
17891    #[derive(Clone, Debug)]
17892    pub struct GetEnvironment(RequestBuilder<crate::model::GetEnvironmentRequest>);
17893
17894    impl GetEnvironment {
17895        pub(crate) fn new(
17896            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17897        ) -> Self {
17898            Self(RequestBuilder::new(stub))
17899        }
17900
17901        /// Sets the full request, replacing any prior values.
17902        pub fn with_request<V: Into<crate::model::GetEnvironmentRequest>>(mut self, v: V) -> Self {
17903            self.0.request = v.into();
17904            self
17905        }
17906
17907        /// Sets all the options, replacing any prior values.
17908        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17909            self.0.options = v.into();
17910            self
17911        }
17912
17913        /// Sends the request.
17914        pub async fn send(self) -> Result<crate::model::Environment> {
17915            (*self.0.stub)
17916                .get_environment(self.0.request, self.0.options)
17917                .await
17918                .map(gax::response::Response::into_body)
17919        }
17920
17921        /// Sets the value of [name][crate::model::GetEnvironmentRequest::name].
17922        ///
17923        /// This is a **required** field for requests.
17924        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17925            self.0.request.name = v.into();
17926            self
17927        }
17928    }
17929
17930    #[doc(hidden)]
17931    impl gax::options::internal::RequestBuilder for GetEnvironment {
17932        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17933            &mut self.0.options
17934        }
17935    }
17936
17937    /// The request builder for [DataplexService::list_sessions][crate::client::DataplexService::list_sessions] calls.
17938    ///
17939    /// # Example
17940    /// ```
17941    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListSessions;
17942    /// # async fn sample() -> gax::Result<()> {
17943    /// use gax::paginator::ItemPaginator;
17944    ///
17945    /// let builder = prepare_request_builder();
17946    /// let mut items = builder.by_item();
17947    /// while let Some(result) = items.next().await {
17948    ///   let item = result?;
17949    /// }
17950    /// # Ok(()) }
17951    ///
17952    /// fn prepare_request_builder() -> ListSessions {
17953    ///   # panic!();
17954    ///   // ... details omitted ...
17955    /// }
17956    /// ```
17957    #[derive(Clone, Debug)]
17958    pub struct ListSessions(RequestBuilder<crate::model::ListSessionsRequest>);
17959
17960    impl ListSessions {
17961        pub(crate) fn new(
17962            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17963        ) -> Self {
17964            Self(RequestBuilder::new(stub))
17965        }
17966
17967        /// Sets the full request, replacing any prior values.
17968        pub fn with_request<V: Into<crate::model::ListSessionsRequest>>(mut self, v: V) -> Self {
17969            self.0.request = v.into();
17970            self
17971        }
17972
17973        /// Sets all the options, replacing any prior values.
17974        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17975            self.0.options = v.into();
17976            self
17977        }
17978
17979        /// Sends the request.
17980        pub async fn send(self) -> Result<crate::model::ListSessionsResponse> {
17981            (*self.0.stub)
17982                .list_sessions(self.0.request, self.0.options)
17983                .await
17984                .map(gax::response::Response::into_body)
17985        }
17986
17987        /// Streams each page in the collection.
17988        pub fn by_page(
17989            self,
17990        ) -> impl gax::paginator::Paginator<crate::model::ListSessionsResponse, gax::error::Error>
17991        {
17992            use std::clone::Clone;
17993            let token = self.0.request.page_token.clone();
17994            let execute = move |token: String| {
17995                let mut builder = self.clone();
17996                builder.0.request = builder.0.request.set_page_token(token);
17997                builder.send()
17998            };
17999            gax::paginator::internal::new_paginator(token, execute)
18000        }
18001
18002        /// Streams each item in the collection.
18003        pub fn by_item(
18004            self,
18005        ) -> impl gax::paginator::ItemPaginator<crate::model::ListSessionsResponse, gax::error::Error>
18006        {
18007            use gax::paginator::Paginator;
18008            self.by_page().items()
18009        }
18010
18011        /// Sets the value of [parent][crate::model::ListSessionsRequest::parent].
18012        ///
18013        /// This is a **required** field for requests.
18014        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18015            self.0.request.parent = v.into();
18016            self
18017        }
18018
18019        /// Sets the value of [page_size][crate::model::ListSessionsRequest::page_size].
18020        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18021            self.0.request.page_size = v.into();
18022            self
18023        }
18024
18025        /// Sets the value of [page_token][crate::model::ListSessionsRequest::page_token].
18026        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18027            self.0.request.page_token = v.into();
18028            self
18029        }
18030
18031        /// Sets the value of [filter][crate::model::ListSessionsRequest::filter].
18032        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
18033            self.0.request.filter = v.into();
18034            self
18035        }
18036    }
18037
18038    #[doc(hidden)]
18039    impl gax::options::internal::RequestBuilder for ListSessions {
18040        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18041            &mut self.0.options
18042        }
18043    }
18044
18045    /// The request builder for [DataplexService::list_locations][crate::client::DataplexService::list_locations] calls.
18046    ///
18047    /// # Example
18048    /// ```
18049    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListLocations;
18050    /// # async fn sample() -> gax::Result<()> {
18051    /// use gax::paginator::ItemPaginator;
18052    ///
18053    /// let builder = prepare_request_builder();
18054    /// let mut items = builder.by_item();
18055    /// while let Some(result) = items.next().await {
18056    ///   let item = result?;
18057    /// }
18058    /// # Ok(()) }
18059    ///
18060    /// fn prepare_request_builder() -> ListLocations {
18061    ///   # panic!();
18062    ///   // ... details omitted ...
18063    /// }
18064    /// ```
18065    #[derive(Clone, Debug)]
18066    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
18067
18068    impl ListLocations {
18069        pub(crate) fn new(
18070            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18071        ) -> Self {
18072            Self(RequestBuilder::new(stub))
18073        }
18074
18075        /// Sets the full request, replacing any prior values.
18076        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
18077            mut self,
18078            v: V,
18079        ) -> Self {
18080            self.0.request = v.into();
18081            self
18082        }
18083
18084        /// Sets all the options, replacing any prior values.
18085        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18086            self.0.options = v.into();
18087            self
18088        }
18089
18090        /// Sends the request.
18091        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
18092            (*self.0.stub)
18093                .list_locations(self.0.request, self.0.options)
18094                .await
18095                .map(gax::response::Response::into_body)
18096        }
18097
18098        /// Streams each page in the collection.
18099        pub fn by_page(
18100            self,
18101        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
18102        {
18103            use std::clone::Clone;
18104            let token = self.0.request.page_token.clone();
18105            let execute = move |token: String| {
18106                let mut builder = self.clone();
18107                builder.0.request = builder.0.request.set_page_token(token);
18108                builder.send()
18109            };
18110            gax::paginator::internal::new_paginator(token, execute)
18111        }
18112
18113        /// Streams each item in the collection.
18114        pub fn by_item(
18115            self,
18116        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
18117        {
18118            use gax::paginator::Paginator;
18119            self.by_page().items()
18120        }
18121
18122        /// Sets the value of [name][location::model::ListLocationsRequest::name].
18123        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18124            self.0.request.name = v.into();
18125            self
18126        }
18127
18128        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
18129        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
18130            self.0.request.filter = v.into();
18131            self
18132        }
18133
18134        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
18135        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18136            self.0.request.page_size = v.into();
18137            self
18138        }
18139
18140        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
18141        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18142            self.0.request.page_token = v.into();
18143            self
18144        }
18145    }
18146
18147    #[doc(hidden)]
18148    impl gax::options::internal::RequestBuilder for ListLocations {
18149        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18150            &mut self.0.options
18151        }
18152    }
18153
18154    /// The request builder for [DataplexService::get_location][crate::client::DataplexService::get_location] calls.
18155    ///
18156    /// # Example
18157    /// ```
18158    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetLocation;
18159    /// # async fn sample() -> gax::Result<()> {
18160    ///
18161    /// let builder = prepare_request_builder();
18162    /// let response = builder.send().await?;
18163    /// # Ok(()) }
18164    ///
18165    /// fn prepare_request_builder() -> GetLocation {
18166    ///   # panic!();
18167    ///   // ... details omitted ...
18168    /// }
18169    /// ```
18170    #[derive(Clone, Debug)]
18171    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
18172
18173    impl GetLocation {
18174        pub(crate) fn new(
18175            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18176        ) -> Self {
18177            Self(RequestBuilder::new(stub))
18178        }
18179
18180        /// Sets the full request, replacing any prior values.
18181        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
18182            self.0.request = v.into();
18183            self
18184        }
18185
18186        /// Sets all the options, replacing any prior values.
18187        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18188            self.0.options = v.into();
18189            self
18190        }
18191
18192        /// Sends the request.
18193        pub async fn send(self) -> Result<location::model::Location> {
18194            (*self.0.stub)
18195                .get_location(self.0.request, self.0.options)
18196                .await
18197                .map(gax::response::Response::into_body)
18198        }
18199
18200        /// Sets the value of [name][location::model::GetLocationRequest::name].
18201        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18202            self.0.request.name = v.into();
18203            self
18204        }
18205    }
18206
18207    #[doc(hidden)]
18208    impl gax::options::internal::RequestBuilder for GetLocation {
18209        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18210            &mut self.0.options
18211        }
18212    }
18213
18214    /// The request builder for [DataplexService::set_iam_policy][crate::client::DataplexService::set_iam_policy] calls.
18215    ///
18216    /// # Example
18217    /// ```
18218    /// # use google_cloud_dataplex_v1::builder::dataplex_service::SetIamPolicy;
18219    /// # async fn sample() -> gax::Result<()> {
18220    ///
18221    /// let builder = prepare_request_builder();
18222    /// let response = builder.send().await?;
18223    /// # Ok(()) }
18224    ///
18225    /// fn prepare_request_builder() -> SetIamPolicy {
18226    ///   # panic!();
18227    ///   // ... details omitted ...
18228    /// }
18229    /// ```
18230    #[derive(Clone, Debug)]
18231    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
18232
18233    impl SetIamPolicy {
18234        pub(crate) fn new(
18235            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18236        ) -> Self {
18237            Self(RequestBuilder::new(stub))
18238        }
18239
18240        /// Sets the full request, replacing any prior values.
18241        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
18242            self.0.request = v.into();
18243            self
18244        }
18245
18246        /// Sets all the options, replacing any prior values.
18247        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18248            self.0.options = v.into();
18249            self
18250        }
18251
18252        /// Sends the request.
18253        pub async fn send(self) -> Result<iam_v1::model::Policy> {
18254            (*self.0.stub)
18255                .set_iam_policy(self.0.request, self.0.options)
18256                .await
18257                .map(gax::response::Response::into_body)
18258        }
18259
18260        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
18261        ///
18262        /// This is a **required** field for requests.
18263        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
18264            self.0.request.resource = v.into();
18265            self
18266        }
18267
18268        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
18269        ///
18270        /// This is a **required** field for requests.
18271        pub fn set_policy<T>(mut self, v: T) -> Self
18272        where
18273            T: std::convert::Into<iam_v1::model::Policy>,
18274        {
18275            self.0.request.policy = std::option::Option::Some(v.into());
18276            self
18277        }
18278
18279        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
18280        ///
18281        /// This is a **required** field for requests.
18282        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
18283        where
18284            T: std::convert::Into<iam_v1::model::Policy>,
18285        {
18286            self.0.request.policy = v.map(|x| x.into());
18287            self
18288        }
18289
18290        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
18291        pub fn set_update_mask<T>(mut self, v: T) -> Self
18292        where
18293            T: std::convert::Into<wkt::FieldMask>,
18294        {
18295            self.0.request.update_mask = std::option::Option::Some(v.into());
18296            self
18297        }
18298
18299        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
18300        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
18301        where
18302            T: std::convert::Into<wkt::FieldMask>,
18303        {
18304            self.0.request.update_mask = v.map(|x| x.into());
18305            self
18306        }
18307    }
18308
18309    #[doc(hidden)]
18310    impl gax::options::internal::RequestBuilder for SetIamPolicy {
18311        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18312            &mut self.0.options
18313        }
18314    }
18315
18316    /// The request builder for [DataplexService::get_iam_policy][crate::client::DataplexService::get_iam_policy] calls.
18317    ///
18318    /// # Example
18319    /// ```
18320    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetIamPolicy;
18321    /// # async fn sample() -> gax::Result<()> {
18322    ///
18323    /// let builder = prepare_request_builder();
18324    /// let response = builder.send().await?;
18325    /// # Ok(()) }
18326    ///
18327    /// fn prepare_request_builder() -> GetIamPolicy {
18328    ///   # panic!();
18329    ///   // ... details omitted ...
18330    /// }
18331    /// ```
18332    #[derive(Clone, Debug)]
18333    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
18334
18335    impl GetIamPolicy {
18336        pub(crate) fn new(
18337            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18338        ) -> Self {
18339            Self(RequestBuilder::new(stub))
18340        }
18341
18342        /// Sets the full request, replacing any prior values.
18343        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
18344            self.0.request = v.into();
18345            self
18346        }
18347
18348        /// Sets all the options, replacing any prior values.
18349        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18350            self.0.options = v.into();
18351            self
18352        }
18353
18354        /// Sends the request.
18355        pub async fn send(self) -> Result<iam_v1::model::Policy> {
18356            (*self.0.stub)
18357                .get_iam_policy(self.0.request, self.0.options)
18358                .await
18359                .map(gax::response::Response::into_body)
18360        }
18361
18362        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
18363        ///
18364        /// This is a **required** field for requests.
18365        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
18366            self.0.request.resource = v.into();
18367            self
18368        }
18369
18370        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
18371        pub fn set_options<T>(mut self, v: T) -> Self
18372        where
18373            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
18374        {
18375            self.0.request.options = std::option::Option::Some(v.into());
18376            self
18377        }
18378
18379        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
18380        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
18381        where
18382            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
18383        {
18384            self.0.request.options = v.map(|x| x.into());
18385            self
18386        }
18387    }
18388
18389    #[doc(hidden)]
18390    impl gax::options::internal::RequestBuilder for GetIamPolicy {
18391        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18392            &mut self.0.options
18393        }
18394    }
18395
18396    /// The request builder for [DataplexService::test_iam_permissions][crate::client::DataplexService::test_iam_permissions] calls.
18397    ///
18398    /// # Example
18399    /// ```
18400    /// # use google_cloud_dataplex_v1::builder::dataplex_service::TestIamPermissions;
18401    /// # async fn sample() -> gax::Result<()> {
18402    ///
18403    /// let builder = prepare_request_builder();
18404    /// let response = builder.send().await?;
18405    /// # Ok(()) }
18406    ///
18407    /// fn prepare_request_builder() -> TestIamPermissions {
18408    ///   # panic!();
18409    ///   // ... details omitted ...
18410    /// }
18411    /// ```
18412    #[derive(Clone, Debug)]
18413    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
18414
18415    impl TestIamPermissions {
18416        pub(crate) fn new(
18417            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18418        ) -> Self {
18419            Self(RequestBuilder::new(stub))
18420        }
18421
18422        /// Sets the full request, replacing any prior values.
18423        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
18424            mut self,
18425            v: V,
18426        ) -> Self {
18427            self.0.request = v.into();
18428            self
18429        }
18430
18431        /// Sets all the options, replacing any prior values.
18432        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18433            self.0.options = v.into();
18434            self
18435        }
18436
18437        /// Sends the request.
18438        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
18439            (*self.0.stub)
18440                .test_iam_permissions(self.0.request, self.0.options)
18441                .await
18442                .map(gax::response::Response::into_body)
18443        }
18444
18445        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
18446        ///
18447        /// This is a **required** field for requests.
18448        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
18449            self.0.request.resource = v.into();
18450            self
18451        }
18452
18453        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
18454        ///
18455        /// This is a **required** field for requests.
18456        pub fn set_permissions<T, V>(mut self, v: T) -> Self
18457        where
18458            T: std::iter::IntoIterator<Item = V>,
18459            V: std::convert::Into<std::string::String>,
18460        {
18461            use std::iter::Iterator;
18462            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
18463            self
18464        }
18465    }
18466
18467    #[doc(hidden)]
18468    impl gax::options::internal::RequestBuilder for TestIamPermissions {
18469        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18470            &mut self.0.options
18471        }
18472    }
18473
18474    /// The request builder for [DataplexService::list_operations][crate::client::DataplexService::list_operations] calls.
18475    ///
18476    /// # Example
18477    /// ```
18478    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListOperations;
18479    /// # async fn sample() -> gax::Result<()> {
18480    /// use gax::paginator::ItemPaginator;
18481    ///
18482    /// let builder = prepare_request_builder();
18483    /// let mut items = builder.by_item();
18484    /// while let Some(result) = items.next().await {
18485    ///   let item = result?;
18486    /// }
18487    /// # Ok(()) }
18488    ///
18489    /// fn prepare_request_builder() -> ListOperations {
18490    ///   # panic!();
18491    ///   // ... details omitted ...
18492    /// }
18493    /// ```
18494    #[derive(Clone, Debug)]
18495    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
18496
18497    impl ListOperations {
18498        pub(crate) fn new(
18499            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18500        ) -> Self {
18501            Self(RequestBuilder::new(stub))
18502        }
18503
18504        /// Sets the full request, replacing any prior values.
18505        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
18506            mut self,
18507            v: V,
18508        ) -> Self {
18509            self.0.request = v.into();
18510            self
18511        }
18512
18513        /// Sets all the options, replacing any prior values.
18514        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18515            self.0.options = v.into();
18516            self
18517        }
18518
18519        /// Sends the request.
18520        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
18521            (*self.0.stub)
18522                .list_operations(self.0.request, self.0.options)
18523                .await
18524                .map(gax::response::Response::into_body)
18525        }
18526
18527        /// Streams each page in the collection.
18528        pub fn by_page(
18529            self,
18530        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
18531        {
18532            use std::clone::Clone;
18533            let token = self.0.request.page_token.clone();
18534            let execute = move |token: String| {
18535                let mut builder = self.clone();
18536                builder.0.request = builder.0.request.set_page_token(token);
18537                builder.send()
18538            };
18539            gax::paginator::internal::new_paginator(token, execute)
18540        }
18541
18542        /// Streams each item in the collection.
18543        pub fn by_item(
18544            self,
18545        ) -> impl gax::paginator::ItemPaginator<
18546            longrunning::model::ListOperationsResponse,
18547            gax::error::Error,
18548        > {
18549            use gax::paginator::Paginator;
18550            self.by_page().items()
18551        }
18552
18553        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
18554        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18555            self.0.request.name = v.into();
18556            self
18557        }
18558
18559        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
18560        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
18561            self.0.request.filter = v.into();
18562            self
18563        }
18564
18565        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
18566        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18567            self.0.request.page_size = v.into();
18568            self
18569        }
18570
18571        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
18572        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18573            self.0.request.page_token = v.into();
18574            self
18575        }
18576
18577        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
18578        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
18579            self.0.request.return_partial_success = v.into();
18580            self
18581        }
18582    }
18583
18584    #[doc(hidden)]
18585    impl gax::options::internal::RequestBuilder for ListOperations {
18586        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18587            &mut self.0.options
18588        }
18589    }
18590
18591    /// The request builder for [DataplexService::get_operation][crate::client::DataplexService::get_operation] calls.
18592    ///
18593    /// # Example
18594    /// ```
18595    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetOperation;
18596    /// # async fn sample() -> gax::Result<()> {
18597    ///
18598    /// let builder = prepare_request_builder();
18599    /// let response = builder.send().await?;
18600    /// # Ok(()) }
18601    ///
18602    /// fn prepare_request_builder() -> GetOperation {
18603    ///   # panic!();
18604    ///   // ... details omitted ...
18605    /// }
18606    /// ```
18607    #[derive(Clone, Debug)]
18608    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
18609
18610    impl GetOperation {
18611        pub(crate) fn new(
18612            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18613        ) -> Self {
18614            Self(RequestBuilder::new(stub))
18615        }
18616
18617        /// Sets the full request, replacing any prior values.
18618        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
18619            mut self,
18620            v: V,
18621        ) -> Self {
18622            self.0.request = v.into();
18623            self
18624        }
18625
18626        /// Sets all the options, replacing any prior values.
18627        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18628            self.0.options = v.into();
18629            self
18630        }
18631
18632        /// Sends the request.
18633        pub async fn send(self) -> Result<longrunning::model::Operation> {
18634            (*self.0.stub)
18635                .get_operation(self.0.request, self.0.options)
18636                .await
18637                .map(gax::response::Response::into_body)
18638        }
18639
18640        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
18641        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18642            self.0.request.name = v.into();
18643            self
18644        }
18645    }
18646
18647    #[doc(hidden)]
18648    impl gax::options::internal::RequestBuilder for GetOperation {
18649        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18650            &mut self.0.options
18651        }
18652    }
18653
18654    /// The request builder for [DataplexService::delete_operation][crate::client::DataplexService::delete_operation] calls.
18655    ///
18656    /// # Example
18657    /// ```
18658    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteOperation;
18659    /// # async fn sample() -> gax::Result<()> {
18660    ///
18661    /// let builder = prepare_request_builder();
18662    /// let response = builder.send().await?;
18663    /// # Ok(()) }
18664    ///
18665    /// fn prepare_request_builder() -> DeleteOperation {
18666    ///   # panic!();
18667    ///   // ... details omitted ...
18668    /// }
18669    /// ```
18670    #[derive(Clone, Debug)]
18671    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
18672
18673    impl DeleteOperation {
18674        pub(crate) fn new(
18675            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18676        ) -> Self {
18677            Self(RequestBuilder::new(stub))
18678        }
18679
18680        /// Sets the full request, replacing any prior values.
18681        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
18682            mut self,
18683            v: V,
18684        ) -> Self {
18685            self.0.request = v.into();
18686            self
18687        }
18688
18689        /// Sets all the options, replacing any prior values.
18690        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18691            self.0.options = v.into();
18692            self
18693        }
18694
18695        /// Sends the request.
18696        pub async fn send(self) -> Result<()> {
18697            (*self.0.stub)
18698                .delete_operation(self.0.request, self.0.options)
18699                .await
18700                .map(gax::response::Response::into_body)
18701        }
18702
18703        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
18704        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18705            self.0.request.name = v.into();
18706            self
18707        }
18708    }
18709
18710    #[doc(hidden)]
18711    impl gax::options::internal::RequestBuilder for DeleteOperation {
18712        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18713            &mut self.0.options
18714        }
18715    }
18716
18717    /// The request builder for [DataplexService::cancel_operation][crate::client::DataplexService::cancel_operation] calls.
18718    ///
18719    /// # Example
18720    /// ```
18721    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CancelOperation;
18722    /// # async fn sample() -> gax::Result<()> {
18723    ///
18724    /// let builder = prepare_request_builder();
18725    /// let response = builder.send().await?;
18726    /// # Ok(()) }
18727    ///
18728    /// fn prepare_request_builder() -> CancelOperation {
18729    ///   # panic!();
18730    ///   // ... details omitted ...
18731    /// }
18732    /// ```
18733    #[derive(Clone, Debug)]
18734    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
18735
18736    impl CancelOperation {
18737        pub(crate) fn new(
18738            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18739        ) -> Self {
18740            Self(RequestBuilder::new(stub))
18741        }
18742
18743        /// Sets the full request, replacing any prior values.
18744        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
18745            mut self,
18746            v: V,
18747        ) -> Self {
18748            self.0.request = v.into();
18749            self
18750        }
18751
18752        /// Sets all the options, replacing any prior values.
18753        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18754            self.0.options = v.into();
18755            self
18756        }
18757
18758        /// Sends the request.
18759        pub async fn send(self) -> Result<()> {
18760            (*self.0.stub)
18761                .cancel_operation(self.0.request, self.0.options)
18762                .await
18763                .map(gax::response::Response::into_body)
18764        }
18765
18766        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
18767        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18768            self.0.request.name = v.into();
18769            self
18770        }
18771    }
18772
18773    #[doc(hidden)]
18774    impl gax::options::internal::RequestBuilder for CancelOperation {
18775        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18776            &mut self.0.options
18777        }
18778    }
18779}