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() -> google_cloud_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 = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
34
35    pub(crate) mod client {
36        use super::super::super::client::BusinessGlossaryService;
37        pub struct Factory;
38        impl crate::ClientFactory for Factory {
39            type Client = BusinessGlossaryService;
40            type Credentials = gaxi::options::Credentials;
41            async fn build(
42                self,
43                config: gaxi::options::ClientConfig,
44            ) -> crate::ClientBuilderResult<Self::Client> {
45                Self::Client::new(config).await
46            }
47        }
48    }
49
50    /// Common implementation for [crate::client::BusinessGlossaryService] request builders.
51    #[derive(Clone, Debug)]
52    pub(crate) struct RequestBuilder<R: std::default::Default> {
53        stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
54        request: R,
55        options: crate::RequestOptions,
56    }
57
58    impl<R> RequestBuilder<R>
59    where
60        R: std::default::Default,
61    {
62        pub(crate) fn new(
63            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
64        ) -> Self {
65            Self {
66                stub,
67                request: R::default(),
68                options: crate::RequestOptions::default(),
69            }
70        }
71    }
72
73    /// The request builder for [BusinessGlossaryService::create_glossary][crate::client::BusinessGlossaryService::create_glossary] calls.
74    ///
75    /// # Example
76    /// ```
77    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CreateGlossary;
78    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
79    /// use google_cloud_lro::Poller;
80    ///
81    /// let builder = prepare_request_builder();
82    /// let response = builder.poller().until_done().await?;
83    /// # Ok(()) }
84    ///
85    /// fn prepare_request_builder() -> CreateGlossary {
86    ///   # panic!();
87    ///   // ... details omitted ...
88    /// }
89    /// ```
90    #[derive(Clone, Debug)]
91    pub struct CreateGlossary(RequestBuilder<crate::model::CreateGlossaryRequest>);
92
93    impl CreateGlossary {
94        pub(crate) fn new(
95            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
96        ) -> Self {
97            Self(RequestBuilder::new(stub))
98        }
99
100        /// Sets the full request, replacing any prior values.
101        pub fn with_request<V: Into<crate::model::CreateGlossaryRequest>>(mut self, v: V) -> Self {
102            self.0.request = v.into();
103            self
104        }
105
106        /// Sets all the options, replacing any prior values.
107        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
108            self.0.options = v.into();
109            self
110        }
111
112        /// Sends the request.
113        ///
114        /// # Long running operations
115        ///
116        /// This starts, but does not poll, a longrunning operation. More information
117        /// on [create_glossary][crate::client::BusinessGlossaryService::create_glossary].
118        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
119            (*self.0.stub)
120                .create_glossary(self.0.request, self.0.options)
121                .await
122                .map(crate::Response::into_body)
123        }
124
125        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_glossary`.
126        pub fn poller(
127            self,
128        ) -> impl google_cloud_lro::Poller<crate::model::Glossary, crate::model::OperationMetadata>
129        {
130            type Operation = google_cloud_lro::internal::Operation<
131                crate::model::Glossary,
132                crate::model::OperationMetadata,
133            >;
134            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
135            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
136
137            let stub = self.0.stub.clone();
138            let mut options = self.0.options.clone();
139            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
140            let query = move |name| {
141                let stub = stub.clone();
142                let options = options.clone();
143                async {
144                    let op = GetOperation::new(stub)
145                        .set_name(name)
146                        .with_options(options)
147                        .send()
148                        .await?;
149                    Ok(Operation::new(op))
150                }
151            };
152
153            let start = move || async {
154                let op = self.send().await?;
155                Ok(Operation::new(op))
156            };
157
158            google_cloud_lro::internal::new_poller(
159                polling_error_policy,
160                polling_backoff_policy,
161                start,
162                query,
163            )
164        }
165
166        /// Sets the value of [parent][crate::model::CreateGlossaryRequest::parent].
167        ///
168        /// This is a **required** field for requests.
169        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
170            self.0.request.parent = v.into();
171            self
172        }
173
174        /// Sets the value of [glossary_id][crate::model::CreateGlossaryRequest::glossary_id].
175        ///
176        /// This is a **required** field for requests.
177        pub fn set_glossary_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
178            self.0.request.glossary_id = v.into();
179            self
180        }
181
182        /// Sets the value of [glossary][crate::model::CreateGlossaryRequest::glossary].
183        ///
184        /// This is a **required** field for requests.
185        pub fn set_glossary<T>(mut self, v: T) -> Self
186        where
187            T: std::convert::Into<crate::model::Glossary>,
188        {
189            self.0.request.glossary = std::option::Option::Some(v.into());
190            self
191        }
192
193        /// Sets or clears the value of [glossary][crate::model::CreateGlossaryRequest::glossary].
194        ///
195        /// This is a **required** field for requests.
196        pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
197        where
198            T: std::convert::Into<crate::model::Glossary>,
199        {
200            self.0.request.glossary = v.map(|x| x.into());
201            self
202        }
203
204        /// Sets the value of [validate_only][crate::model::CreateGlossaryRequest::validate_only].
205        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
206            self.0.request.validate_only = v.into();
207            self
208        }
209    }
210
211    #[doc(hidden)]
212    impl crate::RequestBuilder for CreateGlossary {
213        fn request_options(&mut self) -> &mut crate::RequestOptions {
214            &mut self.0.options
215        }
216    }
217
218    /// The request builder for [BusinessGlossaryService::update_glossary][crate::client::BusinessGlossaryService::update_glossary] calls.
219    ///
220    /// # Example
221    /// ```
222    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::UpdateGlossary;
223    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
224    /// use google_cloud_lro::Poller;
225    ///
226    /// let builder = prepare_request_builder();
227    /// let response = builder.poller().until_done().await?;
228    /// # Ok(()) }
229    ///
230    /// fn prepare_request_builder() -> UpdateGlossary {
231    ///   # panic!();
232    ///   // ... details omitted ...
233    /// }
234    /// ```
235    #[derive(Clone, Debug)]
236    pub struct UpdateGlossary(RequestBuilder<crate::model::UpdateGlossaryRequest>);
237
238    impl UpdateGlossary {
239        pub(crate) fn new(
240            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
241        ) -> Self {
242            Self(RequestBuilder::new(stub))
243        }
244
245        /// Sets the full request, replacing any prior values.
246        pub fn with_request<V: Into<crate::model::UpdateGlossaryRequest>>(mut self, v: V) -> Self {
247            self.0.request = v.into();
248            self
249        }
250
251        /// Sets all the options, replacing any prior values.
252        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
253            self.0.options = v.into();
254            self
255        }
256
257        /// Sends the request.
258        ///
259        /// # Long running operations
260        ///
261        /// This starts, but does not poll, a longrunning operation. More information
262        /// on [update_glossary][crate::client::BusinessGlossaryService::update_glossary].
263        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
264            (*self.0.stub)
265                .update_glossary(self.0.request, self.0.options)
266                .await
267                .map(crate::Response::into_body)
268        }
269
270        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_glossary`.
271        pub fn poller(
272            self,
273        ) -> impl google_cloud_lro::Poller<crate::model::Glossary, crate::model::OperationMetadata>
274        {
275            type Operation = google_cloud_lro::internal::Operation<
276                crate::model::Glossary,
277                crate::model::OperationMetadata,
278            >;
279            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
280            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
281
282            let stub = self.0.stub.clone();
283            let mut options = self.0.options.clone();
284            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
285            let query = move |name| {
286                let stub = stub.clone();
287                let options = options.clone();
288                async {
289                    let op = GetOperation::new(stub)
290                        .set_name(name)
291                        .with_options(options)
292                        .send()
293                        .await?;
294                    Ok(Operation::new(op))
295                }
296            };
297
298            let start = move || async {
299                let op = self.send().await?;
300                Ok(Operation::new(op))
301            };
302
303            google_cloud_lro::internal::new_poller(
304                polling_error_policy,
305                polling_backoff_policy,
306                start,
307                query,
308            )
309        }
310
311        /// Sets the value of [glossary][crate::model::UpdateGlossaryRequest::glossary].
312        ///
313        /// This is a **required** field for requests.
314        pub fn set_glossary<T>(mut self, v: T) -> Self
315        where
316            T: std::convert::Into<crate::model::Glossary>,
317        {
318            self.0.request.glossary = std::option::Option::Some(v.into());
319            self
320        }
321
322        /// Sets or clears the value of [glossary][crate::model::UpdateGlossaryRequest::glossary].
323        ///
324        /// This is a **required** field for requests.
325        pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
326        where
327            T: std::convert::Into<crate::model::Glossary>,
328        {
329            self.0.request.glossary = v.map(|x| x.into());
330            self
331        }
332
333        /// Sets the value of [update_mask][crate::model::UpdateGlossaryRequest::update_mask].
334        ///
335        /// This is a **required** field for requests.
336        pub fn set_update_mask<T>(mut self, v: T) -> Self
337        where
338            T: std::convert::Into<wkt::FieldMask>,
339        {
340            self.0.request.update_mask = std::option::Option::Some(v.into());
341            self
342        }
343
344        /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryRequest::update_mask].
345        ///
346        /// This is a **required** field for requests.
347        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
348        where
349            T: std::convert::Into<wkt::FieldMask>,
350        {
351            self.0.request.update_mask = v.map(|x| x.into());
352            self
353        }
354
355        /// Sets the value of [validate_only][crate::model::UpdateGlossaryRequest::validate_only].
356        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
357            self.0.request.validate_only = v.into();
358            self
359        }
360    }
361
362    #[doc(hidden)]
363    impl crate::RequestBuilder for UpdateGlossary {
364        fn request_options(&mut self) -> &mut crate::RequestOptions {
365            &mut self.0.options
366        }
367    }
368
369    /// The request builder for [BusinessGlossaryService::delete_glossary][crate::client::BusinessGlossaryService::delete_glossary] calls.
370    ///
371    /// # Example
372    /// ```
373    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteGlossary;
374    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
375    /// use google_cloud_lro::Poller;
376    ///
377    /// let builder = prepare_request_builder();
378    /// let response = builder.poller().until_done().await?;
379    /// # Ok(()) }
380    ///
381    /// fn prepare_request_builder() -> DeleteGlossary {
382    ///   # panic!();
383    ///   // ... details omitted ...
384    /// }
385    /// ```
386    #[derive(Clone, Debug)]
387    pub struct DeleteGlossary(RequestBuilder<crate::model::DeleteGlossaryRequest>);
388
389    impl DeleteGlossary {
390        pub(crate) fn new(
391            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
392        ) -> Self {
393            Self(RequestBuilder::new(stub))
394        }
395
396        /// Sets the full request, replacing any prior values.
397        pub fn with_request<V: Into<crate::model::DeleteGlossaryRequest>>(mut self, v: V) -> Self {
398            self.0.request = v.into();
399            self
400        }
401
402        /// Sets all the options, replacing any prior values.
403        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
404            self.0.options = v.into();
405            self
406        }
407
408        /// Sends the request.
409        ///
410        /// # Long running operations
411        ///
412        /// This starts, but does not poll, a longrunning operation. More information
413        /// on [delete_glossary][crate::client::BusinessGlossaryService::delete_glossary].
414        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
415            (*self.0.stub)
416                .delete_glossary(self.0.request, self.0.options)
417                .await
418                .map(crate::Response::into_body)
419        }
420
421        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_glossary`.
422        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
423            type Operation =
424                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
425            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
426            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
427
428            let stub = self.0.stub.clone();
429            let mut options = self.0.options.clone();
430            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
431            let query = move |name| {
432                let stub = stub.clone();
433                let options = options.clone();
434                async {
435                    let op = GetOperation::new(stub)
436                        .set_name(name)
437                        .with_options(options)
438                        .send()
439                        .await?;
440                    Ok(Operation::new(op))
441                }
442            };
443
444            let start = move || async {
445                let op = self.send().await?;
446                Ok(Operation::new(op))
447            };
448
449            google_cloud_lro::internal::new_unit_response_poller(
450                polling_error_policy,
451                polling_backoff_policy,
452                start,
453                query,
454            )
455        }
456
457        /// Sets the value of [name][crate::model::DeleteGlossaryRequest::name].
458        ///
459        /// This is a **required** field for requests.
460        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
461            self.0.request.name = v.into();
462            self
463        }
464
465        /// Sets the value of [etag][crate::model::DeleteGlossaryRequest::etag].
466        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
467            self.0.request.etag = v.into();
468            self
469        }
470    }
471
472    #[doc(hidden)]
473    impl crate::RequestBuilder for DeleteGlossary {
474        fn request_options(&mut self) -> &mut crate::RequestOptions {
475            &mut self.0.options
476        }
477    }
478
479    /// The request builder for [BusinessGlossaryService::get_glossary][crate::client::BusinessGlossaryService::get_glossary] calls.
480    ///
481    /// # Example
482    /// ```
483    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetGlossary;
484    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
485    ///
486    /// let builder = prepare_request_builder();
487    /// let response = builder.send().await?;
488    /// # Ok(()) }
489    ///
490    /// fn prepare_request_builder() -> GetGlossary {
491    ///   # panic!();
492    ///   // ... details omitted ...
493    /// }
494    /// ```
495    #[derive(Clone, Debug)]
496    pub struct GetGlossary(RequestBuilder<crate::model::GetGlossaryRequest>);
497
498    impl GetGlossary {
499        pub(crate) fn new(
500            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
501        ) -> Self {
502            Self(RequestBuilder::new(stub))
503        }
504
505        /// Sets the full request, replacing any prior values.
506        pub fn with_request<V: Into<crate::model::GetGlossaryRequest>>(mut self, v: V) -> Self {
507            self.0.request = v.into();
508            self
509        }
510
511        /// Sets all the options, replacing any prior values.
512        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
513            self.0.options = v.into();
514            self
515        }
516
517        /// Sends the request.
518        pub async fn send(self) -> Result<crate::model::Glossary> {
519            (*self.0.stub)
520                .get_glossary(self.0.request, self.0.options)
521                .await
522                .map(crate::Response::into_body)
523        }
524
525        /// Sets the value of [name][crate::model::GetGlossaryRequest::name].
526        ///
527        /// This is a **required** field for requests.
528        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
529            self.0.request.name = v.into();
530            self
531        }
532    }
533
534    #[doc(hidden)]
535    impl crate::RequestBuilder for GetGlossary {
536        fn request_options(&mut self) -> &mut crate::RequestOptions {
537            &mut self.0.options
538        }
539    }
540
541    /// The request builder for [BusinessGlossaryService::list_glossaries][crate::client::BusinessGlossaryService::list_glossaries] calls.
542    ///
543    /// # Example
544    /// ```
545    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListGlossaries;
546    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
547    /// use google_cloud_gax::paginator::ItemPaginator;
548    ///
549    /// let builder = prepare_request_builder();
550    /// let mut items = builder.by_item();
551    /// while let Some(result) = items.next().await {
552    ///   let item = result?;
553    /// }
554    /// # Ok(()) }
555    ///
556    /// fn prepare_request_builder() -> ListGlossaries {
557    ///   # panic!();
558    ///   // ... details omitted ...
559    /// }
560    /// ```
561    #[derive(Clone, Debug)]
562    pub struct ListGlossaries(RequestBuilder<crate::model::ListGlossariesRequest>);
563
564    impl ListGlossaries {
565        pub(crate) fn new(
566            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
567        ) -> Self {
568            Self(RequestBuilder::new(stub))
569        }
570
571        /// Sets the full request, replacing any prior values.
572        pub fn with_request<V: Into<crate::model::ListGlossariesRequest>>(mut self, v: V) -> Self {
573            self.0.request = v.into();
574            self
575        }
576
577        /// Sets all the options, replacing any prior values.
578        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
579            self.0.options = v.into();
580            self
581        }
582
583        /// Sends the request.
584        pub async fn send(self) -> Result<crate::model::ListGlossariesResponse> {
585            (*self.0.stub)
586                .list_glossaries(self.0.request, self.0.options)
587                .await
588                .map(crate::Response::into_body)
589        }
590
591        /// Streams each page in the collection.
592        pub fn by_page(
593            self,
594        ) -> impl google_cloud_gax::paginator::Paginator<
595            crate::model::ListGlossariesResponse,
596            crate::Error,
597        > {
598            use std::clone::Clone;
599            let token = self.0.request.page_token.clone();
600            let execute = move |token: String| {
601                let mut builder = self.clone();
602                builder.0.request = builder.0.request.set_page_token(token);
603                builder.send()
604            };
605            google_cloud_gax::paginator::internal::new_paginator(token, execute)
606        }
607
608        /// Streams each item in the collection.
609        pub fn by_item(
610            self,
611        ) -> impl google_cloud_gax::paginator::ItemPaginator<
612            crate::model::ListGlossariesResponse,
613            crate::Error,
614        > {
615            use google_cloud_gax::paginator::Paginator;
616            self.by_page().items()
617        }
618
619        /// Sets the value of [parent][crate::model::ListGlossariesRequest::parent].
620        ///
621        /// This is a **required** field for requests.
622        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
623            self.0.request.parent = v.into();
624            self
625        }
626
627        /// Sets the value of [page_size][crate::model::ListGlossariesRequest::page_size].
628        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
629            self.0.request.page_size = v.into();
630            self
631        }
632
633        /// Sets the value of [page_token][crate::model::ListGlossariesRequest::page_token].
634        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
635            self.0.request.page_token = v.into();
636            self
637        }
638
639        /// Sets the value of [filter][crate::model::ListGlossariesRequest::filter].
640        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
641            self.0.request.filter = v.into();
642            self
643        }
644
645        /// Sets the value of [order_by][crate::model::ListGlossariesRequest::order_by].
646        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
647            self.0.request.order_by = v.into();
648            self
649        }
650    }
651
652    #[doc(hidden)]
653    impl crate::RequestBuilder for ListGlossaries {
654        fn request_options(&mut self) -> &mut crate::RequestOptions {
655            &mut self.0.options
656        }
657    }
658
659    /// The request builder for [BusinessGlossaryService::create_glossary_category][crate::client::BusinessGlossaryService::create_glossary_category] calls.
660    ///
661    /// # Example
662    /// ```
663    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CreateGlossaryCategory;
664    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
665    ///
666    /// let builder = prepare_request_builder();
667    /// let response = builder.send().await?;
668    /// # Ok(()) }
669    ///
670    /// fn prepare_request_builder() -> CreateGlossaryCategory {
671    ///   # panic!();
672    ///   // ... details omitted ...
673    /// }
674    /// ```
675    #[derive(Clone, Debug)]
676    pub struct CreateGlossaryCategory(RequestBuilder<crate::model::CreateGlossaryCategoryRequest>);
677
678    impl CreateGlossaryCategory {
679        pub(crate) fn new(
680            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
681        ) -> Self {
682            Self(RequestBuilder::new(stub))
683        }
684
685        /// Sets the full request, replacing any prior values.
686        pub fn with_request<V: Into<crate::model::CreateGlossaryCategoryRequest>>(
687            mut self,
688            v: V,
689        ) -> Self {
690            self.0.request = v.into();
691            self
692        }
693
694        /// Sets all the options, replacing any prior values.
695        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
696            self.0.options = v.into();
697            self
698        }
699
700        /// Sends the request.
701        pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
702            (*self.0.stub)
703                .create_glossary_category(self.0.request, self.0.options)
704                .await
705                .map(crate::Response::into_body)
706        }
707
708        /// Sets the value of [parent][crate::model::CreateGlossaryCategoryRequest::parent].
709        ///
710        /// This is a **required** field for requests.
711        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
712            self.0.request.parent = v.into();
713            self
714        }
715
716        /// Sets the value of [category_id][crate::model::CreateGlossaryCategoryRequest::category_id].
717        ///
718        /// This is a **required** field for requests.
719        pub fn set_category_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
720            self.0.request.category_id = v.into();
721            self
722        }
723
724        /// Sets the value of [category][crate::model::CreateGlossaryCategoryRequest::category].
725        ///
726        /// This is a **required** field for requests.
727        pub fn set_category<T>(mut self, v: T) -> Self
728        where
729            T: std::convert::Into<crate::model::GlossaryCategory>,
730        {
731            self.0.request.category = std::option::Option::Some(v.into());
732            self
733        }
734
735        /// Sets or clears the value of [category][crate::model::CreateGlossaryCategoryRequest::category].
736        ///
737        /// This is a **required** field for requests.
738        pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
739        where
740            T: std::convert::Into<crate::model::GlossaryCategory>,
741        {
742            self.0.request.category = v.map(|x| x.into());
743            self
744        }
745    }
746
747    #[doc(hidden)]
748    impl crate::RequestBuilder for CreateGlossaryCategory {
749        fn request_options(&mut self) -> &mut crate::RequestOptions {
750            &mut self.0.options
751        }
752    }
753
754    /// The request builder for [BusinessGlossaryService::update_glossary_category][crate::client::BusinessGlossaryService::update_glossary_category] calls.
755    ///
756    /// # Example
757    /// ```
758    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::UpdateGlossaryCategory;
759    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
760    ///
761    /// let builder = prepare_request_builder();
762    /// let response = builder.send().await?;
763    /// # Ok(()) }
764    ///
765    /// fn prepare_request_builder() -> UpdateGlossaryCategory {
766    ///   # panic!();
767    ///   // ... details omitted ...
768    /// }
769    /// ```
770    #[derive(Clone, Debug)]
771    pub struct UpdateGlossaryCategory(RequestBuilder<crate::model::UpdateGlossaryCategoryRequest>);
772
773    impl UpdateGlossaryCategory {
774        pub(crate) fn new(
775            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
776        ) -> Self {
777            Self(RequestBuilder::new(stub))
778        }
779
780        /// Sets the full request, replacing any prior values.
781        pub fn with_request<V: Into<crate::model::UpdateGlossaryCategoryRequest>>(
782            mut self,
783            v: V,
784        ) -> Self {
785            self.0.request = v.into();
786            self
787        }
788
789        /// Sets all the options, replacing any prior values.
790        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
791            self.0.options = v.into();
792            self
793        }
794
795        /// Sends the request.
796        pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
797            (*self.0.stub)
798                .update_glossary_category(self.0.request, self.0.options)
799                .await
800                .map(crate::Response::into_body)
801        }
802
803        /// Sets the value of [category][crate::model::UpdateGlossaryCategoryRequest::category].
804        ///
805        /// This is a **required** field for requests.
806        pub fn set_category<T>(mut self, v: T) -> Self
807        where
808            T: std::convert::Into<crate::model::GlossaryCategory>,
809        {
810            self.0.request.category = std::option::Option::Some(v.into());
811            self
812        }
813
814        /// Sets or clears the value of [category][crate::model::UpdateGlossaryCategoryRequest::category].
815        ///
816        /// This is a **required** field for requests.
817        pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
818        where
819            T: std::convert::Into<crate::model::GlossaryCategory>,
820        {
821            self.0.request.category = v.map(|x| x.into());
822            self
823        }
824
825        /// Sets the value of [update_mask][crate::model::UpdateGlossaryCategoryRequest::update_mask].
826        ///
827        /// This is a **required** field for requests.
828        pub fn set_update_mask<T>(mut self, v: T) -> Self
829        where
830            T: std::convert::Into<wkt::FieldMask>,
831        {
832            self.0.request.update_mask = std::option::Option::Some(v.into());
833            self
834        }
835
836        /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryCategoryRequest::update_mask].
837        ///
838        /// This is a **required** field for requests.
839        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
840        where
841            T: std::convert::Into<wkt::FieldMask>,
842        {
843            self.0.request.update_mask = v.map(|x| x.into());
844            self
845        }
846    }
847
848    #[doc(hidden)]
849    impl crate::RequestBuilder for UpdateGlossaryCategory {
850        fn request_options(&mut self) -> &mut crate::RequestOptions {
851            &mut self.0.options
852        }
853    }
854
855    /// The request builder for [BusinessGlossaryService::delete_glossary_category][crate::client::BusinessGlossaryService::delete_glossary_category] calls.
856    ///
857    /// # Example
858    /// ```
859    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteGlossaryCategory;
860    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
861    ///
862    /// let builder = prepare_request_builder();
863    /// let response = builder.send().await?;
864    /// # Ok(()) }
865    ///
866    /// fn prepare_request_builder() -> DeleteGlossaryCategory {
867    ///   # panic!();
868    ///   // ... details omitted ...
869    /// }
870    /// ```
871    #[derive(Clone, Debug)]
872    pub struct DeleteGlossaryCategory(RequestBuilder<crate::model::DeleteGlossaryCategoryRequest>);
873
874    impl DeleteGlossaryCategory {
875        pub(crate) fn new(
876            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
877        ) -> Self {
878            Self(RequestBuilder::new(stub))
879        }
880
881        /// Sets the full request, replacing any prior values.
882        pub fn with_request<V: Into<crate::model::DeleteGlossaryCategoryRequest>>(
883            mut self,
884            v: V,
885        ) -> Self {
886            self.0.request = v.into();
887            self
888        }
889
890        /// Sets all the options, replacing any prior values.
891        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
892            self.0.options = v.into();
893            self
894        }
895
896        /// Sends the request.
897        pub async fn send(self) -> Result<()> {
898            (*self.0.stub)
899                .delete_glossary_category(self.0.request, self.0.options)
900                .await
901                .map(crate::Response::into_body)
902        }
903
904        /// Sets the value of [name][crate::model::DeleteGlossaryCategoryRequest::name].
905        ///
906        /// This is a **required** field for requests.
907        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
908            self.0.request.name = v.into();
909            self
910        }
911    }
912
913    #[doc(hidden)]
914    impl crate::RequestBuilder for DeleteGlossaryCategory {
915        fn request_options(&mut self) -> &mut crate::RequestOptions {
916            &mut self.0.options
917        }
918    }
919
920    /// The request builder for [BusinessGlossaryService::get_glossary_category][crate::client::BusinessGlossaryService::get_glossary_category] calls.
921    ///
922    /// # Example
923    /// ```
924    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetGlossaryCategory;
925    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
926    ///
927    /// let builder = prepare_request_builder();
928    /// let response = builder.send().await?;
929    /// # Ok(()) }
930    ///
931    /// fn prepare_request_builder() -> GetGlossaryCategory {
932    ///   # panic!();
933    ///   // ... details omitted ...
934    /// }
935    /// ```
936    #[derive(Clone, Debug)]
937    pub struct GetGlossaryCategory(RequestBuilder<crate::model::GetGlossaryCategoryRequest>);
938
939    impl GetGlossaryCategory {
940        pub(crate) fn new(
941            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
942        ) -> Self {
943            Self(RequestBuilder::new(stub))
944        }
945
946        /// Sets the full request, replacing any prior values.
947        pub fn with_request<V: Into<crate::model::GetGlossaryCategoryRequest>>(
948            mut self,
949            v: V,
950        ) -> Self {
951            self.0.request = v.into();
952            self
953        }
954
955        /// Sets all the options, replacing any prior values.
956        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
957            self.0.options = v.into();
958            self
959        }
960
961        /// Sends the request.
962        pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
963            (*self.0.stub)
964                .get_glossary_category(self.0.request, self.0.options)
965                .await
966                .map(crate::Response::into_body)
967        }
968
969        /// Sets the value of [name][crate::model::GetGlossaryCategoryRequest::name].
970        ///
971        /// This is a **required** field for requests.
972        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
973            self.0.request.name = v.into();
974            self
975        }
976    }
977
978    #[doc(hidden)]
979    impl crate::RequestBuilder for GetGlossaryCategory {
980        fn request_options(&mut self) -> &mut crate::RequestOptions {
981            &mut self.0.options
982        }
983    }
984
985    /// The request builder for [BusinessGlossaryService::list_glossary_categories][crate::client::BusinessGlossaryService::list_glossary_categories] calls.
986    ///
987    /// # Example
988    /// ```
989    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListGlossaryCategories;
990    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
991    /// use google_cloud_gax::paginator::ItemPaginator;
992    ///
993    /// let builder = prepare_request_builder();
994    /// let mut items = builder.by_item();
995    /// while let Some(result) = items.next().await {
996    ///   let item = result?;
997    /// }
998    /// # Ok(()) }
999    ///
1000    /// fn prepare_request_builder() -> ListGlossaryCategories {
1001    ///   # panic!();
1002    ///   // ... details omitted ...
1003    /// }
1004    /// ```
1005    #[derive(Clone, Debug)]
1006    pub struct ListGlossaryCategories(RequestBuilder<crate::model::ListGlossaryCategoriesRequest>);
1007
1008    impl ListGlossaryCategories {
1009        pub(crate) fn new(
1010            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1011        ) -> Self {
1012            Self(RequestBuilder::new(stub))
1013        }
1014
1015        /// Sets the full request, replacing any prior values.
1016        pub fn with_request<V: Into<crate::model::ListGlossaryCategoriesRequest>>(
1017            mut self,
1018            v: V,
1019        ) -> Self {
1020            self.0.request = v.into();
1021            self
1022        }
1023
1024        /// Sets all the options, replacing any prior values.
1025        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1026            self.0.options = v.into();
1027            self
1028        }
1029
1030        /// Sends the request.
1031        pub async fn send(self) -> Result<crate::model::ListGlossaryCategoriesResponse> {
1032            (*self.0.stub)
1033                .list_glossary_categories(self.0.request, self.0.options)
1034                .await
1035                .map(crate::Response::into_body)
1036        }
1037
1038        /// Streams each page in the collection.
1039        pub fn by_page(
1040            self,
1041        ) -> impl google_cloud_gax::paginator::Paginator<
1042            crate::model::ListGlossaryCategoriesResponse,
1043            crate::Error,
1044        > {
1045            use std::clone::Clone;
1046            let token = self.0.request.page_token.clone();
1047            let execute = move |token: String| {
1048                let mut builder = self.clone();
1049                builder.0.request = builder.0.request.set_page_token(token);
1050                builder.send()
1051            };
1052            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1053        }
1054
1055        /// Streams each item in the collection.
1056        pub fn by_item(
1057            self,
1058        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1059            crate::model::ListGlossaryCategoriesResponse,
1060            crate::Error,
1061        > {
1062            use google_cloud_gax::paginator::Paginator;
1063            self.by_page().items()
1064        }
1065
1066        /// Sets the value of [parent][crate::model::ListGlossaryCategoriesRequest::parent].
1067        ///
1068        /// This is a **required** field for requests.
1069        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1070            self.0.request.parent = v.into();
1071            self
1072        }
1073
1074        /// Sets the value of [page_size][crate::model::ListGlossaryCategoriesRequest::page_size].
1075        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1076            self.0.request.page_size = v.into();
1077            self
1078        }
1079
1080        /// Sets the value of [page_token][crate::model::ListGlossaryCategoriesRequest::page_token].
1081        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1082            self.0.request.page_token = v.into();
1083            self
1084        }
1085
1086        /// Sets the value of [filter][crate::model::ListGlossaryCategoriesRequest::filter].
1087        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1088            self.0.request.filter = v.into();
1089            self
1090        }
1091
1092        /// Sets the value of [order_by][crate::model::ListGlossaryCategoriesRequest::order_by].
1093        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1094            self.0.request.order_by = v.into();
1095            self
1096        }
1097    }
1098
1099    #[doc(hidden)]
1100    impl crate::RequestBuilder for ListGlossaryCategories {
1101        fn request_options(&mut self) -> &mut crate::RequestOptions {
1102            &mut self.0.options
1103        }
1104    }
1105
1106    /// The request builder for [BusinessGlossaryService::create_glossary_term][crate::client::BusinessGlossaryService::create_glossary_term] calls.
1107    ///
1108    /// # Example
1109    /// ```
1110    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CreateGlossaryTerm;
1111    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1112    ///
1113    /// let builder = prepare_request_builder();
1114    /// let response = builder.send().await?;
1115    /// # Ok(()) }
1116    ///
1117    /// fn prepare_request_builder() -> CreateGlossaryTerm {
1118    ///   # panic!();
1119    ///   // ... details omitted ...
1120    /// }
1121    /// ```
1122    #[derive(Clone, Debug)]
1123    pub struct CreateGlossaryTerm(RequestBuilder<crate::model::CreateGlossaryTermRequest>);
1124
1125    impl CreateGlossaryTerm {
1126        pub(crate) fn new(
1127            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1128        ) -> Self {
1129            Self(RequestBuilder::new(stub))
1130        }
1131
1132        /// Sets the full request, replacing any prior values.
1133        pub fn with_request<V: Into<crate::model::CreateGlossaryTermRequest>>(
1134            mut self,
1135            v: V,
1136        ) -> Self {
1137            self.0.request = v.into();
1138            self
1139        }
1140
1141        /// Sets all the options, replacing any prior values.
1142        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1143            self.0.options = v.into();
1144            self
1145        }
1146
1147        /// Sends the request.
1148        pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1149            (*self.0.stub)
1150                .create_glossary_term(self.0.request, self.0.options)
1151                .await
1152                .map(crate::Response::into_body)
1153        }
1154
1155        /// Sets the value of [parent][crate::model::CreateGlossaryTermRequest::parent].
1156        ///
1157        /// This is a **required** field for requests.
1158        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1159            self.0.request.parent = v.into();
1160            self
1161        }
1162
1163        /// Sets the value of [term_id][crate::model::CreateGlossaryTermRequest::term_id].
1164        ///
1165        /// This is a **required** field for requests.
1166        pub fn set_term_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1167            self.0.request.term_id = v.into();
1168            self
1169        }
1170
1171        /// Sets the value of [term][crate::model::CreateGlossaryTermRequest::term].
1172        ///
1173        /// This is a **required** field for requests.
1174        pub fn set_term<T>(mut self, v: T) -> Self
1175        where
1176            T: std::convert::Into<crate::model::GlossaryTerm>,
1177        {
1178            self.0.request.term = std::option::Option::Some(v.into());
1179            self
1180        }
1181
1182        /// Sets or clears the value of [term][crate::model::CreateGlossaryTermRequest::term].
1183        ///
1184        /// This is a **required** field for requests.
1185        pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
1186        where
1187            T: std::convert::Into<crate::model::GlossaryTerm>,
1188        {
1189            self.0.request.term = v.map(|x| x.into());
1190            self
1191        }
1192    }
1193
1194    #[doc(hidden)]
1195    impl crate::RequestBuilder for CreateGlossaryTerm {
1196        fn request_options(&mut self) -> &mut crate::RequestOptions {
1197            &mut self.0.options
1198        }
1199    }
1200
1201    /// The request builder for [BusinessGlossaryService::update_glossary_term][crate::client::BusinessGlossaryService::update_glossary_term] calls.
1202    ///
1203    /// # Example
1204    /// ```
1205    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::UpdateGlossaryTerm;
1206    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1207    ///
1208    /// let builder = prepare_request_builder();
1209    /// let response = builder.send().await?;
1210    /// # Ok(()) }
1211    ///
1212    /// fn prepare_request_builder() -> UpdateGlossaryTerm {
1213    ///   # panic!();
1214    ///   // ... details omitted ...
1215    /// }
1216    /// ```
1217    #[derive(Clone, Debug)]
1218    pub struct UpdateGlossaryTerm(RequestBuilder<crate::model::UpdateGlossaryTermRequest>);
1219
1220    impl UpdateGlossaryTerm {
1221        pub(crate) fn new(
1222            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1223        ) -> Self {
1224            Self(RequestBuilder::new(stub))
1225        }
1226
1227        /// Sets the full request, replacing any prior values.
1228        pub fn with_request<V: Into<crate::model::UpdateGlossaryTermRequest>>(
1229            mut self,
1230            v: V,
1231        ) -> Self {
1232            self.0.request = v.into();
1233            self
1234        }
1235
1236        /// Sets all the options, replacing any prior values.
1237        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1238            self.0.options = v.into();
1239            self
1240        }
1241
1242        /// Sends the request.
1243        pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1244            (*self.0.stub)
1245                .update_glossary_term(self.0.request, self.0.options)
1246                .await
1247                .map(crate::Response::into_body)
1248        }
1249
1250        /// Sets the value of [term][crate::model::UpdateGlossaryTermRequest::term].
1251        ///
1252        /// This is a **required** field for requests.
1253        pub fn set_term<T>(mut self, v: T) -> Self
1254        where
1255            T: std::convert::Into<crate::model::GlossaryTerm>,
1256        {
1257            self.0.request.term = std::option::Option::Some(v.into());
1258            self
1259        }
1260
1261        /// Sets or clears the value of [term][crate::model::UpdateGlossaryTermRequest::term].
1262        ///
1263        /// This is a **required** field for requests.
1264        pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
1265        where
1266            T: std::convert::Into<crate::model::GlossaryTerm>,
1267        {
1268            self.0.request.term = v.map(|x| x.into());
1269            self
1270        }
1271
1272        /// Sets the value of [update_mask][crate::model::UpdateGlossaryTermRequest::update_mask].
1273        ///
1274        /// This is a **required** field for requests.
1275        pub fn set_update_mask<T>(mut self, v: T) -> Self
1276        where
1277            T: std::convert::Into<wkt::FieldMask>,
1278        {
1279            self.0.request.update_mask = std::option::Option::Some(v.into());
1280            self
1281        }
1282
1283        /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryTermRequest::update_mask].
1284        ///
1285        /// This is a **required** field for requests.
1286        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1287        where
1288            T: std::convert::Into<wkt::FieldMask>,
1289        {
1290            self.0.request.update_mask = v.map(|x| x.into());
1291            self
1292        }
1293    }
1294
1295    #[doc(hidden)]
1296    impl crate::RequestBuilder for UpdateGlossaryTerm {
1297        fn request_options(&mut self) -> &mut crate::RequestOptions {
1298            &mut self.0.options
1299        }
1300    }
1301
1302    /// The request builder for [BusinessGlossaryService::delete_glossary_term][crate::client::BusinessGlossaryService::delete_glossary_term] calls.
1303    ///
1304    /// # Example
1305    /// ```
1306    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteGlossaryTerm;
1307    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1308    ///
1309    /// let builder = prepare_request_builder();
1310    /// let response = builder.send().await?;
1311    /// # Ok(()) }
1312    ///
1313    /// fn prepare_request_builder() -> DeleteGlossaryTerm {
1314    ///   # panic!();
1315    ///   // ... details omitted ...
1316    /// }
1317    /// ```
1318    #[derive(Clone, Debug)]
1319    pub struct DeleteGlossaryTerm(RequestBuilder<crate::model::DeleteGlossaryTermRequest>);
1320
1321    impl DeleteGlossaryTerm {
1322        pub(crate) fn new(
1323            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1324        ) -> Self {
1325            Self(RequestBuilder::new(stub))
1326        }
1327
1328        /// Sets the full request, replacing any prior values.
1329        pub fn with_request<V: Into<crate::model::DeleteGlossaryTermRequest>>(
1330            mut self,
1331            v: V,
1332        ) -> Self {
1333            self.0.request = v.into();
1334            self
1335        }
1336
1337        /// Sets all the options, replacing any prior values.
1338        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1339            self.0.options = v.into();
1340            self
1341        }
1342
1343        /// Sends the request.
1344        pub async fn send(self) -> Result<()> {
1345            (*self.0.stub)
1346                .delete_glossary_term(self.0.request, self.0.options)
1347                .await
1348                .map(crate::Response::into_body)
1349        }
1350
1351        /// Sets the value of [name][crate::model::DeleteGlossaryTermRequest::name].
1352        ///
1353        /// This is a **required** field for requests.
1354        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1355            self.0.request.name = v.into();
1356            self
1357        }
1358    }
1359
1360    #[doc(hidden)]
1361    impl crate::RequestBuilder for DeleteGlossaryTerm {
1362        fn request_options(&mut self) -> &mut crate::RequestOptions {
1363            &mut self.0.options
1364        }
1365    }
1366
1367    /// The request builder for [BusinessGlossaryService::get_glossary_term][crate::client::BusinessGlossaryService::get_glossary_term] calls.
1368    ///
1369    /// # Example
1370    /// ```
1371    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetGlossaryTerm;
1372    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1373    ///
1374    /// let builder = prepare_request_builder();
1375    /// let response = builder.send().await?;
1376    /// # Ok(()) }
1377    ///
1378    /// fn prepare_request_builder() -> GetGlossaryTerm {
1379    ///   # panic!();
1380    ///   // ... details omitted ...
1381    /// }
1382    /// ```
1383    #[derive(Clone, Debug)]
1384    pub struct GetGlossaryTerm(RequestBuilder<crate::model::GetGlossaryTermRequest>);
1385
1386    impl GetGlossaryTerm {
1387        pub(crate) fn new(
1388            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1389        ) -> Self {
1390            Self(RequestBuilder::new(stub))
1391        }
1392
1393        /// Sets the full request, replacing any prior values.
1394        pub fn with_request<V: Into<crate::model::GetGlossaryTermRequest>>(mut self, v: V) -> Self {
1395            self.0.request = v.into();
1396            self
1397        }
1398
1399        /// Sets all the options, replacing any prior values.
1400        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1401            self.0.options = v.into();
1402            self
1403        }
1404
1405        /// Sends the request.
1406        pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1407            (*self.0.stub)
1408                .get_glossary_term(self.0.request, self.0.options)
1409                .await
1410                .map(crate::Response::into_body)
1411        }
1412
1413        /// Sets the value of [name][crate::model::GetGlossaryTermRequest::name].
1414        ///
1415        /// This is a **required** field for requests.
1416        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1417            self.0.request.name = v.into();
1418            self
1419        }
1420    }
1421
1422    #[doc(hidden)]
1423    impl crate::RequestBuilder for GetGlossaryTerm {
1424        fn request_options(&mut self) -> &mut crate::RequestOptions {
1425            &mut self.0.options
1426        }
1427    }
1428
1429    /// The request builder for [BusinessGlossaryService::list_glossary_terms][crate::client::BusinessGlossaryService::list_glossary_terms] calls.
1430    ///
1431    /// # Example
1432    /// ```
1433    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListGlossaryTerms;
1434    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1435    /// use google_cloud_gax::paginator::ItemPaginator;
1436    ///
1437    /// let builder = prepare_request_builder();
1438    /// let mut items = builder.by_item();
1439    /// while let Some(result) = items.next().await {
1440    ///   let item = result?;
1441    /// }
1442    /// # Ok(()) }
1443    ///
1444    /// fn prepare_request_builder() -> ListGlossaryTerms {
1445    ///   # panic!();
1446    ///   // ... details omitted ...
1447    /// }
1448    /// ```
1449    #[derive(Clone, Debug)]
1450    pub struct ListGlossaryTerms(RequestBuilder<crate::model::ListGlossaryTermsRequest>);
1451
1452    impl ListGlossaryTerms {
1453        pub(crate) fn new(
1454            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1455        ) -> Self {
1456            Self(RequestBuilder::new(stub))
1457        }
1458
1459        /// Sets the full request, replacing any prior values.
1460        pub fn with_request<V: Into<crate::model::ListGlossaryTermsRequest>>(
1461            mut self,
1462            v: V,
1463        ) -> Self {
1464            self.0.request = v.into();
1465            self
1466        }
1467
1468        /// Sets all the options, replacing any prior values.
1469        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1470            self.0.options = v.into();
1471            self
1472        }
1473
1474        /// Sends the request.
1475        pub async fn send(self) -> Result<crate::model::ListGlossaryTermsResponse> {
1476            (*self.0.stub)
1477                .list_glossary_terms(self.0.request, self.0.options)
1478                .await
1479                .map(crate::Response::into_body)
1480        }
1481
1482        /// Streams each page in the collection.
1483        pub fn by_page(
1484            self,
1485        ) -> impl google_cloud_gax::paginator::Paginator<
1486            crate::model::ListGlossaryTermsResponse,
1487            crate::Error,
1488        > {
1489            use std::clone::Clone;
1490            let token = self.0.request.page_token.clone();
1491            let execute = move |token: String| {
1492                let mut builder = self.clone();
1493                builder.0.request = builder.0.request.set_page_token(token);
1494                builder.send()
1495            };
1496            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1497        }
1498
1499        /// Streams each item in the collection.
1500        pub fn by_item(
1501            self,
1502        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1503            crate::model::ListGlossaryTermsResponse,
1504            crate::Error,
1505        > {
1506            use google_cloud_gax::paginator::Paginator;
1507            self.by_page().items()
1508        }
1509
1510        /// Sets the value of [parent][crate::model::ListGlossaryTermsRequest::parent].
1511        ///
1512        /// This is a **required** field for requests.
1513        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1514            self.0.request.parent = v.into();
1515            self
1516        }
1517
1518        /// Sets the value of [page_size][crate::model::ListGlossaryTermsRequest::page_size].
1519        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1520            self.0.request.page_size = v.into();
1521            self
1522        }
1523
1524        /// Sets the value of [page_token][crate::model::ListGlossaryTermsRequest::page_token].
1525        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1526            self.0.request.page_token = v.into();
1527            self
1528        }
1529
1530        /// Sets the value of [filter][crate::model::ListGlossaryTermsRequest::filter].
1531        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1532            self.0.request.filter = v.into();
1533            self
1534        }
1535
1536        /// Sets the value of [order_by][crate::model::ListGlossaryTermsRequest::order_by].
1537        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1538            self.0.request.order_by = v.into();
1539            self
1540        }
1541    }
1542
1543    #[doc(hidden)]
1544    impl crate::RequestBuilder for ListGlossaryTerms {
1545        fn request_options(&mut self) -> &mut crate::RequestOptions {
1546            &mut self.0.options
1547        }
1548    }
1549
1550    /// The request builder for [BusinessGlossaryService::list_locations][crate::client::BusinessGlossaryService::list_locations] calls.
1551    ///
1552    /// # Example
1553    /// ```
1554    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListLocations;
1555    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1556    /// use google_cloud_gax::paginator::ItemPaginator;
1557    ///
1558    /// let builder = prepare_request_builder();
1559    /// let mut items = builder.by_item();
1560    /// while let Some(result) = items.next().await {
1561    ///   let item = result?;
1562    /// }
1563    /// # Ok(()) }
1564    ///
1565    /// fn prepare_request_builder() -> ListLocations {
1566    ///   # panic!();
1567    ///   // ... details omitted ...
1568    /// }
1569    /// ```
1570    #[derive(Clone, Debug)]
1571    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
1572
1573    impl ListLocations {
1574        pub(crate) fn new(
1575            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1576        ) -> Self {
1577            Self(RequestBuilder::new(stub))
1578        }
1579
1580        /// Sets the full request, replacing any prior values.
1581        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
1582            mut self,
1583            v: V,
1584        ) -> Self {
1585            self.0.request = v.into();
1586            self
1587        }
1588
1589        /// Sets all the options, replacing any prior values.
1590        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1591            self.0.options = v.into();
1592            self
1593        }
1594
1595        /// Sends the request.
1596        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
1597            (*self.0.stub)
1598                .list_locations(self.0.request, self.0.options)
1599                .await
1600                .map(crate::Response::into_body)
1601        }
1602
1603        /// Streams each page in the collection.
1604        pub fn by_page(
1605            self,
1606        ) -> impl google_cloud_gax::paginator::Paginator<
1607            google_cloud_location::model::ListLocationsResponse,
1608            crate::Error,
1609        > {
1610            use std::clone::Clone;
1611            let token = self.0.request.page_token.clone();
1612            let execute = move |token: String| {
1613                let mut builder = self.clone();
1614                builder.0.request = builder.0.request.set_page_token(token);
1615                builder.send()
1616            };
1617            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1618        }
1619
1620        /// Streams each item in the collection.
1621        pub fn by_item(
1622            self,
1623        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1624            google_cloud_location::model::ListLocationsResponse,
1625            crate::Error,
1626        > {
1627            use google_cloud_gax::paginator::Paginator;
1628            self.by_page().items()
1629        }
1630
1631        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
1632        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1633            self.0.request.name = v.into();
1634            self
1635        }
1636
1637        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
1638        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1639            self.0.request.filter = v.into();
1640            self
1641        }
1642
1643        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
1644        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1645            self.0.request.page_size = v.into();
1646            self
1647        }
1648
1649        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
1650        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1651            self.0.request.page_token = v.into();
1652            self
1653        }
1654    }
1655
1656    #[doc(hidden)]
1657    impl crate::RequestBuilder for ListLocations {
1658        fn request_options(&mut self) -> &mut crate::RequestOptions {
1659            &mut self.0.options
1660        }
1661    }
1662
1663    /// The request builder for [BusinessGlossaryService::get_location][crate::client::BusinessGlossaryService::get_location] calls.
1664    ///
1665    /// # Example
1666    /// ```
1667    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetLocation;
1668    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1669    ///
1670    /// let builder = prepare_request_builder();
1671    /// let response = builder.send().await?;
1672    /// # Ok(()) }
1673    ///
1674    /// fn prepare_request_builder() -> GetLocation {
1675    ///   # panic!();
1676    ///   // ... details omitted ...
1677    /// }
1678    /// ```
1679    #[derive(Clone, Debug)]
1680    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
1681
1682    impl GetLocation {
1683        pub(crate) fn new(
1684            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1685        ) -> Self {
1686            Self(RequestBuilder::new(stub))
1687        }
1688
1689        /// Sets the full request, replacing any prior values.
1690        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
1691            mut self,
1692            v: V,
1693        ) -> Self {
1694            self.0.request = v.into();
1695            self
1696        }
1697
1698        /// Sets all the options, replacing any prior values.
1699        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1700            self.0.options = v.into();
1701            self
1702        }
1703
1704        /// Sends the request.
1705        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
1706            (*self.0.stub)
1707                .get_location(self.0.request, self.0.options)
1708                .await
1709                .map(crate::Response::into_body)
1710        }
1711
1712        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
1713        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1714            self.0.request.name = v.into();
1715            self
1716        }
1717    }
1718
1719    #[doc(hidden)]
1720    impl crate::RequestBuilder for GetLocation {
1721        fn request_options(&mut self) -> &mut crate::RequestOptions {
1722            &mut self.0.options
1723        }
1724    }
1725
1726    /// The request builder for [BusinessGlossaryService::set_iam_policy][crate::client::BusinessGlossaryService::set_iam_policy] calls.
1727    ///
1728    /// # Example
1729    /// ```
1730    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::SetIamPolicy;
1731    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1732    ///
1733    /// let builder = prepare_request_builder();
1734    /// let response = builder.send().await?;
1735    /// # Ok(()) }
1736    ///
1737    /// fn prepare_request_builder() -> SetIamPolicy {
1738    ///   # panic!();
1739    ///   // ... details omitted ...
1740    /// }
1741    /// ```
1742    #[derive(Clone, Debug)]
1743    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
1744
1745    impl SetIamPolicy {
1746        pub(crate) fn new(
1747            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1748        ) -> Self {
1749            Self(RequestBuilder::new(stub))
1750        }
1751
1752        /// Sets the full request, replacing any prior values.
1753        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
1754            mut self,
1755            v: V,
1756        ) -> Self {
1757            self.0.request = v.into();
1758            self
1759        }
1760
1761        /// Sets all the options, replacing any prior values.
1762        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1763            self.0.options = v.into();
1764            self
1765        }
1766
1767        /// Sends the request.
1768        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
1769            (*self.0.stub)
1770                .set_iam_policy(self.0.request, self.0.options)
1771                .await
1772                .map(crate::Response::into_body)
1773        }
1774
1775        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
1776        ///
1777        /// This is a **required** field for requests.
1778        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1779            self.0.request.resource = v.into();
1780            self
1781        }
1782
1783        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
1784        ///
1785        /// This is a **required** field for requests.
1786        pub fn set_policy<T>(mut self, v: T) -> Self
1787        where
1788            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
1789        {
1790            self.0.request.policy = std::option::Option::Some(v.into());
1791            self
1792        }
1793
1794        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
1795        ///
1796        /// This is a **required** field for requests.
1797        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
1798        where
1799            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
1800        {
1801            self.0.request.policy = v.map(|x| x.into());
1802            self
1803        }
1804
1805        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
1806        pub fn set_update_mask<T>(mut self, v: T) -> Self
1807        where
1808            T: std::convert::Into<wkt::FieldMask>,
1809        {
1810            self.0.request.update_mask = std::option::Option::Some(v.into());
1811            self
1812        }
1813
1814        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
1815        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1816        where
1817            T: std::convert::Into<wkt::FieldMask>,
1818        {
1819            self.0.request.update_mask = v.map(|x| x.into());
1820            self
1821        }
1822    }
1823
1824    #[doc(hidden)]
1825    impl crate::RequestBuilder for SetIamPolicy {
1826        fn request_options(&mut self) -> &mut crate::RequestOptions {
1827            &mut self.0.options
1828        }
1829    }
1830
1831    /// The request builder for [BusinessGlossaryService::get_iam_policy][crate::client::BusinessGlossaryService::get_iam_policy] calls.
1832    ///
1833    /// # Example
1834    /// ```
1835    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetIamPolicy;
1836    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1837    ///
1838    /// let builder = prepare_request_builder();
1839    /// let response = builder.send().await?;
1840    /// # Ok(()) }
1841    ///
1842    /// fn prepare_request_builder() -> GetIamPolicy {
1843    ///   # panic!();
1844    ///   // ... details omitted ...
1845    /// }
1846    /// ```
1847    #[derive(Clone, Debug)]
1848    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
1849
1850    impl GetIamPolicy {
1851        pub(crate) fn new(
1852            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1853        ) -> Self {
1854            Self(RequestBuilder::new(stub))
1855        }
1856
1857        /// Sets the full request, replacing any prior values.
1858        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
1859            mut self,
1860            v: V,
1861        ) -> Self {
1862            self.0.request = v.into();
1863            self
1864        }
1865
1866        /// Sets all the options, replacing any prior values.
1867        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1868            self.0.options = v.into();
1869            self
1870        }
1871
1872        /// Sends the request.
1873        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
1874            (*self.0.stub)
1875                .get_iam_policy(self.0.request, self.0.options)
1876                .await
1877                .map(crate::Response::into_body)
1878        }
1879
1880        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
1881        ///
1882        /// This is a **required** field for requests.
1883        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1884            self.0.request.resource = v.into();
1885            self
1886        }
1887
1888        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
1889        pub fn set_options<T>(mut self, v: T) -> Self
1890        where
1891            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
1892        {
1893            self.0.request.options = std::option::Option::Some(v.into());
1894            self
1895        }
1896
1897        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
1898        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
1899        where
1900            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
1901        {
1902            self.0.request.options = v.map(|x| x.into());
1903            self
1904        }
1905    }
1906
1907    #[doc(hidden)]
1908    impl crate::RequestBuilder for GetIamPolicy {
1909        fn request_options(&mut self) -> &mut crate::RequestOptions {
1910            &mut self.0.options
1911        }
1912    }
1913
1914    /// The request builder for [BusinessGlossaryService::test_iam_permissions][crate::client::BusinessGlossaryService::test_iam_permissions] calls.
1915    ///
1916    /// # Example
1917    /// ```
1918    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::TestIamPermissions;
1919    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1920    ///
1921    /// let builder = prepare_request_builder();
1922    /// let response = builder.send().await?;
1923    /// # Ok(()) }
1924    ///
1925    /// fn prepare_request_builder() -> TestIamPermissions {
1926    ///   # panic!();
1927    ///   // ... details omitted ...
1928    /// }
1929    /// ```
1930    #[derive(Clone, Debug)]
1931    pub struct TestIamPermissions(
1932        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
1933    );
1934
1935    impl TestIamPermissions {
1936        pub(crate) fn new(
1937            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1938        ) -> Self {
1939            Self(RequestBuilder::new(stub))
1940        }
1941
1942        /// Sets the full request, replacing any prior values.
1943        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
1944            mut self,
1945            v: V,
1946        ) -> Self {
1947            self.0.request = v.into();
1948            self
1949        }
1950
1951        /// Sets all the options, replacing any prior values.
1952        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1953            self.0.options = v.into();
1954            self
1955        }
1956
1957        /// Sends the request.
1958        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
1959            (*self.0.stub)
1960                .test_iam_permissions(self.0.request, self.0.options)
1961                .await
1962                .map(crate::Response::into_body)
1963        }
1964
1965        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
1966        ///
1967        /// This is a **required** field for requests.
1968        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1969            self.0.request.resource = v.into();
1970            self
1971        }
1972
1973        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
1974        ///
1975        /// This is a **required** field for requests.
1976        pub fn set_permissions<T, V>(mut self, v: T) -> Self
1977        where
1978            T: std::iter::IntoIterator<Item = V>,
1979            V: std::convert::Into<std::string::String>,
1980        {
1981            use std::iter::Iterator;
1982            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
1983            self
1984        }
1985    }
1986
1987    #[doc(hidden)]
1988    impl crate::RequestBuilder for TestIamPermissions {
1989        fn request_options(&mut self) -> &mut crate::RequestOptions {
1990            &mut self.0.options
1991        }
1992    }
1993
1994    /// The request builder for [BusinessGlossaryService::list_operations][crate::client::BusinessGlossaryService::list_operations] calls.
1995    ///
1996    /// # Example
1997    /// ```
1998    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListOperations;
1999    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2000    /// use google_cloud_gax::paginator::ItemPaginator;
2001    ///
2002    /// let builder = prepare_request_builder();
2003    /// let mut items = builder.by_item();
2004    /// while let Some(result) = items.next().await {
2005    ///   let item = result?;
2006    /// }
2007    /// # Ok(()) }
2008    ///
2009    /// fn prepare_request_builder() -> ListOperations {
2010    ///   # panic!();
2011    ///   // ... details omitted ...
2012    /// }
2013    /// ```
2014    #[derive(Clone, Debug)]
2015    pub struct ListOperations(
2016        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
2017    );
2018
2019    impl ListOperations {
2020        pub(crate) fn new(
2021            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2022        ) -> Self {
2023            Self(RequestBuilder::new(stub))
2024        }
2025
2026        /// Sets the full request, replacing any prior values.
2027        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
2028            mut self,
2029            v: V,
2030        ) -> Self {
2031            self.0.request = v.into();
2032            self
2033        }
2034
2035        /// Sets all the options, replacing any prior values.
2036        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2037            self.0.options = v.into();
2038            self
2039        }
2040
2041        /// Sends the request.
2042        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
2043            (*self.0.stub)
2044                .list_operations(self.0.request, self.0.options)
2045                .await
2046                .map(crate::Response::into_body)
2047        }
2048
2049        /// Streams each page in the collection.
2050        pub fn by_page(
2051            self,
2052        ) -> impl google_cloud_gax::paginator::Paginator<
2053            google_cloud_longrunning::model::ListOperationsResponse,
2054            crate::Error,
2055        > {
2056            use std::clone::Clone;
2057            let token = self.0.request.page_token.clone();
2058            let execute = move |token: String| {
2059                let mut builder = self.clone();
2060                builder.0.request = builder.0.request.set_page_token(token);
2061                builder.send()
2062            };
2063            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2064        }
2065
2066        /// Streams each item in the collection.
2067        pub fn by_item(
2068            self,
2069        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2070            google_cloud_longrunning::model::ListOperationsResponse,
2071            crate::Error,
2072        > {
2073            use google_cloud_gax::paginator::Paginator;
2074            self.by_page().items()
2075        }
2076
2077        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
2078        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2079            self.0.request.name = v.into();
2080            self
2081        }
2082
2083        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
2084        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2085            self.0.request.filter = v.into();
2086            self
2087        }
2088
2089        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
2090        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2091            self.0.request.page_size = v.into();
2092            self
2093        }
2094
2095        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
2096        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2097            self.0.request.page_token = v.into();
2098            self
2099        }
2100
2101        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
2102        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
2103            self.0.request.return_partial_success = v.into();
2104            self
2105        }
2106    }
2107
2108    #[doc(hidden)]
2109    impl crate::RequestBuilder for ListOperations {
2110        fn request_options(&mut self) -> &mut crate::RequestOptions {
2111            &mut self.0.options
2112        }
2113    }
2114
2115    /// The request builder for [BusinessGlossaryService::get_operation][crate::client::BusinessGlossaryService::get_operation] calls.
2116    ///
2117    /// # Example
2118    /// ```
2119    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetOperation;
2120    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2121    ///
2122    /// let builder = prepare_request_builder();
2123    /// let response = builder.send().await?;
2124    /// # Ok(()) }
2125    ///
2126    /// fn prepare_request_builder() -> GetOperation {
2127    ///   # panic!();
2128    ///   // ... details omitted ...
2129    /// }
2130    /// ```
2131    #[derive(Clone, Debug)]
2132    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
2133
2134    impl GetOperation {
2135        pub(crate) fn new(
2136            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2137        ) -> Self {
2138            Self(RequestBuilder::new(stub))
2139        }
2140
2141        /// Sets the full request, replacing any prior values.
2142        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
2143            mut self,
2144            v: V,
2145        ) -> Self {
2146            self.0.request = v.into();
2147            self
2148        }
2149
2150        /// Sets all the options, replacing any prior values.
2151        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2152            self.0.options = v.into();
2153            self
2154        }
2155
2156        /// Sends the request.
2157        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2158            (*self.0.stub)
2159                .get_operation(self.0.request, self.0.options)
2160                .await
2161                .map(crate::Response::into_body)
2162        }
2163
2164        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
2165        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2166            self.0.request.name = v.into();
2167            self
2168        }
2169    }
2170
2171    #[doc(hidden)]
2172    impl crate::RequestBuilder for GetOperation {
2173        fn request_options(&mut self) -> &mut crate::RequestOptions {
2174            &mut self.0.options
2175        }
2176    }
2177
2178    /// The request builder for [BusinessGlossaryService::delete_operation][crate::client::BusinessGlossaryService::delete_operation] calls.
2179    ///
2180    /// # Example
2181    /// ```
2182    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteOperation;
2183    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2184    ///
2185    /// let builder = prepare_request_builder();
2186    /// let response = builder.send().await?;
2187    /// # Ok(()) }
2188    ///
2189    /// fn prepare_request_builder() -> DeleteOperation {
2190    ///   # panic!();
2191    ///   // ... details omitted ...
2192    /// }
2193    /// ```
2194    #[derive(Clone, Debug)]
2195    pub struct DeleteOperation(
2196        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
2197    );
2198
2199    impl DeleteOperation {
2200        pub(crate) fn new(
2201            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2202        ) -> Self {
2203            Self(RequestBuilder::new(stub))
2204        }
2205
2206        /// Sets the full request, replacing any prior values.
2207        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
2208            mut self,
2209            v: V,
2210        ) -> Self {
2211            self.0.request = v.into();
2212            self
2213        }
2214
2215        /// Sets all the options, replacing any prior values.
2216        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2217            self.0.options = v.into();
2218            self
2219        }
2220
2221        /// Sends the request.
2222        pub async fn send(self) -> Result<()> {
2223            (*self.0.stub)
2224                .delete_operation(self.0.request, self.0.options)
2225                .await
2226                .map(crate::Response::into_body)
2227        }
2228
2229        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
2230        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2231            self.0.request.name = v.into();
2232            self
2233        }
2234    }
2235
2236    #[doc(hidden)]
2237    impl crate::RequestBuilder for DeleteOperation {
2238        fn request_options(&mut self) -> &mut crate::RequestOptions {
2239            &mut self.0.options
2240        }
2241    }
2242
2243    /// The request builder for [BusinessGlossaryService::cancel_operation][crate::client::BusinessGlossaryService::cancel_operation] calls.
2244    ///
2245    /// # Example
2246    /// ```
2247    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CancelOperation;
2248    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2249    ///
2250    /// let builder = prepare_request_builder();
2251    /// let response = builder.send().await?;
2252    /// # Ok(()) }
2253    ///
2254    /// fn prepare_request_builder() -> CancelOperation {
2255    ///   # panic!();
2256    ///   // ... details omitted ...
2257    /// }
2258    /// ```
2259    #[derive(Clone, Debug)]
2260    pub struct CancelOperation(
2261        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
2262    );
2263
2264    impl CancelOperation {
2265        pub(crate) fn new(
2266            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2267        ) -> Self {
2268            Self(RequestBuilder::new(stub))
2269        }
2270
2271        /// Sets the full request, replacing any prior values.
2272        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
2273            mut self,
2274            v: V,
2275        ) -> Self {
2276            self.0.request = v.into();
2277            self
2278        }
2279
2280        /// Sets all the options, replacing any prior values.
2281        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2282            self.0.options = v.into();
2283            self
2284        }
2285
2286        /// Sends the request.
2287        pub async fn send(self) -> Result<()> {
2288            (*self.0.stub)
2289                .cancel_operation(self.0.request, self.0.options)
2290                .await
2291                .map(crate::Response::into_body)
2292        }
2293
2294        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
2295        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2296            self.0.request.name = v.into();
2297            self
2298        }
2299    }
2300
2301    #[doc(hidden)]
2302    impl crate::RequestBuilder for CancelOperation {
2303        fn request_options(&mut self) -> &mut crate::RequestOptions {
2304            &mut self.0.options
2305        }
2306    }
2307}
2308
2309pub mod catalog_service {
2310    use crate::Result;
2311
2312    /// A builder for [CatalogService][crate::client::CatalogService].
2313    ///
2314    /// ```
2315    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
2316    /// # use google_cloud_dataplex_v1::*;
2317    /// # use builder::catalog_service::ClientBuilder;
2318    /// # use client::CatalogService;
2319    /// let builder : ClientBuilder = CatalogService::builder();
2320    /// let client = builder
2321    ///     .with_endpoint("https://dataplex.googleapis.com")
2322    ///     .build().await?;
2323    /// # Ok(()) }
2324    /// ```
2325    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
2326
2327    pub(crate) mod client {
2328        use super::super::super::client::CatalogService;
2329        pub struct Factory;
2330        impl crate::ClientFactory for Factory {
2331            type Client = CatalogService;
2332            type Credentials = gaxi::options::Credentials;
2333            async fn build(
2334                self,
2335                config: gaxi::options::ClientConfig,
2336            ) -> crate::ClientBuilderResult<Self::Client> {
2337                Self::Client::new(config).await
2338            }
2339        }
2340    }
2341
2342    /// Common implementation for [crate::client::CatalogService] request builders.
2343    #[derive(Clone, Debug)]
2344    pub(crate) struct RequestBuilder<R: std::default::Default> {
2345        stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2346        request: R,
2347        options: crate::RequestOptions,
2348    }
2349
2350    impl<R> RequestBuilder<R>
2351    where
2352        R: std::default::Default,
2353    {
2354        pub(crate) fn new(
2355            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2356        ) -> Self {
2357            Self {
2358                stub,
2359                request: R::default(),
2360                options: crate::RequestOptions::default(),
2361            }
2362        }
2363    }
2364
2365    /// The request builder for [CatalogService::create_entry_type][crate::client::CatalogService::create_entry_type] calls.
2366    ///
2367    /// # Example
2368    /// ```
2369    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntryType;
2370    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2371    /// use google_cloud_lro::Poller;
2372    ///
2373    /// let builder = prepare_request_builder();
2374    /// let response = builder.poller().until_done().await?;
2375    /// # Ok(()) }
2376    ///
2377    /// fn prepare_request_builder() -> CreateEntryType {
2378    ///   # panic!();
2379    ///   // ... details omitted ...
2380    /// }
2381    /// ```
2382    #[derive(Clone, Debug)]
2383    pub struct CreateEntryType(RequestBuilder<crate::model::CreateEntryTypeRequest>);
2384
2385    impl CreateEntryType {
2386        pub(crate) fn new(
2387            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2388        ) -> Self {
2389            Self(RequestBuilder::new(stub))
2390        }
2391
2392        /// Sets the full request, replacing any prior values.
2393        pub fn with_request<V: Into<crate::model::CreateEntryTypeRequest>>(mut self, v: V) -> Self {
2394            self.0.request = v.into();
2395            self
2396        }
2397
2398        /// Sets all the options, replacing any prior values.
2399        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2400            self.0.options = v.into();
2401            self
2402        }
2403
2404        /// Sends the request.
2405        ///
2406        /// # Long running operations
2407        ///
2408        /// This starts, but does not poll, a longrunning operation. More information
2409        /// on [create_entry_type][crate::client::CatalogService::create_entry_type].
2410        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2411            (*self.0.stub)
2412                .create_entry_type(self.0.request, self.0.options)
2413                .await
2414                .map(crate::Response::into_body)
2415        }
2416
2417        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_entry_type`.
2418        pub fn poller(
2419            self,
2420        ) -> impl google_cloud_lro::Poller<crate::model::EntryType, crate::model::OperationMetadata>
2421        {
2422            type Operation = google_cloud_lro::internal::Operation<
2423                crate::model::EntryType,
2424                crate::model::OperationMetadata,
2425            >;
2426            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2427            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2428
2429            let stub = self.0.stub.clone();
2430            let mut options = self.0.options.clone();
2431            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2432            let query = move |name| {
2433                let stub = stub.clone();
2434                let options = options.clone();
2435                async {
2436                    let op = GetOperation::new(stub)
2437                        .set_name(name)
2438                        .with_options(options)
2439                        .send()
2440                        .await?;
2441                    Ok(Operation::new(op))
2442                }
2443            };
2444
2445            let start = move || async {
2446                let op = self.send().await?;
2447                Ok(Operation::new(op))
2448            };
2449
2450            google_cloud_lro::internal::new_poller(
2451                polling_error_policy,
2452                polling_backoff_policy,
2453                start,
2454                query,
2455            )
2456        }
2457
2458        /// Sets the value of [parent][crate::model::CreateEntryTypeRequest::parent].
2459        ///
2460        /// This is a **required** field for requests.
2461        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2462            self.0.request.parent = v.into();
2463            self
2464        }
2465
2466        /// Sets the value of [entry_type_id][crate::model::CreateEntryTypeRequest::entry_type_id].
2467        ///
2468        /// This is a **required** field for requests.
2469        pub fn set_entry_type_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2470            self.0.request.entry_type_id = v.into();
2471            self
2472        }
2473
2474        /// Sets the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
2475        ///
2476        /// This is a **required** field for requests.
2477        pub fn set_entry_type<T>(mut self, v: T) -> Self
2478        where
2479            T: std::convert::Into<crate::model::EntryType>,
2480        {
2481            self.0.request.entry_type = std::option::Option::Some(v.into());
2482            self
2483        }
2484
2485        /// Sets or clears the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
2486        ///
2487        /// This is a **required** field for requests.
2488        pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
2489        where
2490            T: std::convert::Into<crate::model::EntryType>,
2491        {
2492            self.0.request.entry_type = v.map(|x| x.into());
2493            self
2494        }
2495
2496        /// Sets the value of [validate_only][crate::model::CreateEntryTypeRequest::validate_only].
2497        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2498            self.0.request.validate_only = v.into();
2499            self
2500        }
2501    }
2502
2503    #[doc(hidden)]
2504    impl crate::RequestBuilder for CreateEntryType {
2505        fn request_options(&mut self) -> &mut crate::RequestOptions {
2506            &mut self.0.options
2507        }
2508    }
2509
2510    /// The request builder for [CatalogService::update_entry_type][crate::client::CatalogService::update_entry_type] calls.
2511    ///
2512    /// # Example
2513    /// ```
2514    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntryType;
2515    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2516    /// use google_cloud_lro::Poller;
2517    ///
2518    /// let builder = prepare_request_builder();
2519    /// let response = builder.poller().until_done().await?;
2520    /// # Ok(()) }
2521    ///
2522    /// fn prepare_request_builder() -> UpdateEntryType {
2523    ///   # panic!();
2524    ///   // ... details omitted ...
2525    /// }
2526    /// ```
2527    #[derive(Clone, Debug)]
2528    pub struct UpdateEntryType(RequestBuilder<crate::model::UpdateEntryTypeRequest>);
2529
2530    impl UpdateEntryType {
2531        pub(crate) fn new(
2532            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2533        ) -> Self {
2534            Self(RequestBuilder::new(stub))
2535        }
2536
2537        /// Sets the full request, replacing any prior values.
2538        pub fn with_request<V: Into<crate::model::UpdateEntryTypeRequest>>(mut self, v: V) -> Self {
2539            self.0.request = v.into();
2540            self
2541        }
2542
2543        /// Sets all the options, replacing any prior values.
2544        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2545            self.0.options = v.into();
2546            self
2547        }
2548
2549        /// Sends the request.
2550        ///
2551        /// # Long running operations
2552        ///
2553        /// This starts, but does not poll, a longrunning operation. More information
2554        /// on [update_entry_type][crate::client::CatalogService::update_entry_type].
2555        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2556            (*self.0.stub)
2557                .update_entry_type(self.0.request, self.0.options)
2558                .await
2559                .map(crate::Response::into_body)
2560        }
2561
2562        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_entry_type`.
2563        pub fn poller(
2564            self,
2565        ) -> impl google_cloud_lro::Poller<crate::model::EntryType, crate::model::OperationMetadata>
2566        {
2567            type Operation = google_cloud_lro::internal::Operation<
2568                crate::model::EntryType,
2569                crate::model::OperationMetadata,
2570            >;
2571            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2572            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2573
2574            let stub = self.0.stub.clone();
2575            let mut options = self.0.options.clone();
2576            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2577            let query = move |name| {
2578                let stub = stub.clone();
2579                let options = options.clone();
2580                async {
2581                    let op = GetOperation::new(stub)
2582                        .set_name(name)
2583                        .with_options(options)
2584                        .send()
2585                        .await?;
2586                    Ok(Operation::new(op))
2587                }
2588            };
2589
2590            let start = move || async {
2591                let op = self.send().await?;
2592                Ok(Operation::new(op))
2593            };
2594
2595            google_cloud_lro::internal::new_poller(
2596                polling_error_policy,
2597                polling_backoff_policy,
2598                start,
2599                query,
2600            )
2601        }
2602
2603        /// Sets the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
2604        ///
2605        /// This is a **required** field for requests.
2606        pub fn set_entry_type<T>(mut self, v: T) -> Self
2607        where
2608            T: std::convert::Into<crate::model::EntryType>,
2609        {
2610            self.0.request.entry_type = std::option::Option::Some(v.into());
2611            self
2612        }
2613
2614        /// Sets or clears the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
2615        ///
2616        /// This is a **required** field for requests.
2617        pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
2618        where
2619            T: std::convert::Into<crate::model::EntryType>,
2620        {
2621            self.0.request.entry_type = v.map(|x| x.into());
2622            self
2623        }
2624
2625        /// Sets the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
2626        ///
2627        /// This is a **required** field for requests.
2628        pub fn set_update_mask<T>(mut self, v: T) -> Self
2629        where
2630            T: std::convert::Into<wkt::FieldMask>,
2631        {
2632            self.0.request.update_mask = std::option::Option::Some(v.into());
2633            self
2634        }
2635
2636        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
2637        ///
2638        /// This is a **required** field for requests.
2639        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2640        where
2641            T: std::convert::Into<wkt::FieldMask>,
2642        {
2643            self.0.request.update_mask = v.map(|x| x.into());
2644            self
2645        }
2646
2647        /// Sets the value of [validate_only][crate::model::UpdateEntryTypeRequest::validate_only].
2648        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2649            self.0.request.validate_only = v.into();
2650            self
2651        }
2652    }
2653
2654    #[doc(hidden)]
2655    impl crate::RequestBuilder for UpdateEntryType {
2656        fn request_options(&mut self) -> &mut crate::RequestOptions {
2657            &mut self.0.options
2658        }
2659    }
2660
2661    /// The request builder for [CatalogService::delete_entry_type][crate::client::CatalogService::delete_entry_type] calls.
2662    ///
2663    /// # Example
2664    /// ```
2665    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntryType;
2666    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2667    /// use google_cloud_lro::Poller;
2668    ///
2669    /// let builder = prepare_request_builder();
2670    /// let response = builder.poller().until_done().await?;
2671    /// # Ok(()) }
2672    ///
2673    /// fn prepare_request_builder() -> DeleteEntryType {
2674    ///   # panic!();
2675    ///   // ... details omitted ...
2676    /// }
2677    /// ```
2678    #[derive(Clone, Debug)]
2679    pub struct DeleteEntryType(RequestBuilder<crate::model::DeleteEntryTypeRequest>);
2680
2681    impl DeleteEntryType {
2682        pub(crate) fn new(
2683            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2684        ) -> Self {
2685            Self(RequestBuilder::new(stub))
2686        }
2687
2688        /// Sets the full request, replacing any prior values.
2689        pub fn with_request<V: Into<crate::model::DeleteEntryTypeRequest>>(mut self, v: V) -> Self {
2690            self.0.request = v.into();
2691            self
2692        }
2693
2694        /// Sets all the options, replacing any prior values.
2695        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2696            self.0.options = v.into();
2697            self
2698        }
2699
2700        /// Sends the request.
2701        ///
2702        /// # Long running operations
2703        ///
2704        /// This starts, but does not poll, a longrunning operation. More information
2705        /// on [delete_entry_type][crate::client::CatalogService::delete_entry_type].
2706        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2707            (*self.0.stub)
2708                .delete_entry_type(self.0.request, self.0.options)
2709                .await
2710                .map(crate::Response::into_body)
2711        }
2712
2713        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_entry_type`.
2714        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2715            type Operation =
2716                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2717            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2718            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2719
2720            let stub = self.0.stub.clone();
2721            let mut options = self.0.options.clone();
2722            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2723            let query = move |name| {
2724                let stub = stub.clone();
2725                let options = options.clone();
2726                async {
2727                    let op = GetOperation::new(stub)
2728                        .set_name(name)
2729                        .with_options(options)
2730                        .send()
2731                        .await?;
2732                    Ok(Operation::new(op))
2733                }
2734            };
2735
2736            let start = move || async {
2737                let op = self.send().await?;
2738                Ok(Operation::new(op))
2739            };
2740
2741            google_cloud_lro::internal::new_unit_response_poller(
2742                polling_error_policy,
2743                polling_backoff_policy,
2744                start,
2745                query,
2746            )
2747        }
2748
2749        /// Sets the value of [name][crate::model::DeleteEntryTypeRequest::name].
2750        ///
2751        /// This is a **required** field for requests.
2752        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2753            self.0.request.name = v.into();
2754            self
2755        }
2756
2757        /// Sets the value of [etag][crate::model::DeleteEntryTypeRequest::etag].
2758        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
2759            self.0.request.etag = v.into();
2760            self
2761        }
2762    }
2763
2764    #[doc(hidden)]
2765    impl crate::RequestBuilder for DeleteEntryType {
2766        fn request_options(&mut self) -> &mut crate::RequestOptions {
2767            &mut self.0.options
2768        }
2769    }
2770
2771    /// The request builder for [CatalogService::list_entry_types][crate::client::CatalogService::list_entry_types] calls.
2772    ///
2773    /// # Example
2774    /// ```
2775    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListEntryTypes;
2776    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2777    /// use google_cloud_gax::paginator::ItemPaginator;
2778    ///
2779    /// let builder = prepare_request_builder();
2780    /// let mut items = builder.by_item();
2781    /// while let Some(result) = items.next().await {
2782    ///   let item = result?;
2783    /// }
2784    /// # Ok(()) }
2785    ///
2786    /// fn prepare_request_builder() -> ListEntryTypes {
2787    ///   # panic!();
2788    ///   // ... details omitted ...
2789    /// }
2790    /// ```
2791    #[derive(Clone, Debug)]
2792    pub struct ListEntryTypes(RequestBuilder<crate::model::ListEntryTypesRequest>);
2793
2794    impl ListEntryTypes {
2795        pub(crate) fn new(
2796            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2797        ) -> Self {
2798            Self(RequestBuilder::new(stub))
2799        }
2800
2801        /// Sets the full request, replacing any prior values.
2802        pub fn with_request<V: Into<crate::model::ListEntryTypesRequest>>(mut self, v: V) -> Self {
2803            self.0.request = v.into();
2804            self
2805        }
2806
2807        /// Sets all the options, replacing any prior values.
2808        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2809            self.0.options = v.into();
2810            self
2811        }
2812
2813        /// Sends the request.
2814        pub async fn send(self) -> Result<crate::model::ListEntryTypesResponse> {
2815            (*self.0.stub)
2816                .list_entry_types(self.0.request, self.0.options)
2817                .await
2818                .map(crate::Response::into_body)
2819        }
2820
2821        /// Streams each page in the collection.
2822        pub fn by_page(
2823            self,
2824        ) -> impl google_cloud_gax::paginator::Paginator<
2825            crate::model::ListEntryTypesResponse,
2826            crate::Error,
2827        > {
2828            use std::clone::Clone;
2829            let token = self.0.request.page_token.clone();
2830            let execute = move |token: String| {
2831                let mut builder = self.clone();
2832                builder.0.request = builder.0.request.set_page_token(token);
2833                builder.send()
2834            };
2835            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2836        }
2837
2838        /// Streams each item in the collection.
2839        pub fn by_item(
2840            self,
2841        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2842            crate::model::ListEntryTypesResponse,
2843            crate::Error,
2844        > {
2845            use google_cloud_gax::paginator::Paginator;
2846            self.by_page().items()
2847        }
2848
2849        /// Sets the value of [parent][crate::model::ListEntryTypesRequest::parent].
2850        ///
2851        /// This is a **required** field for requests.
2852        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2853            self.0.request.parent = v.into();
2854            self
2855        }
2856
2857        /// Sets the value of [page_size][crate::model::ListEntryTypesRequest::page_size].
2858        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2859            self.0.request.page_size = v.into();
2860            self
2861        }
2862
2863        /// Sets the value of [page_token][crate::model::ListEntryTypesRequest::page_token].
2864        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2865            self.0.request.page_token = v.into();
2866            self
2867        }
2868
2869        /// Sets the value of [filter][crate::model::ListEntryTypesRequest::filter].
2870        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2871            self.0.request.filter = v.into();
2872            self
2873        }
2874
2875        /// Sets the value of [order_by][crate::model::ListEntryTypesRequest::order_by].
2876        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2877            self.0.request.order_by = v.into();
2878            self
2879        }
2880    }
2881
2882    #[doc(hidden)]
2883    impl crate::RequestBuilder for ListEntryTypes {
2884        fn request_options(&mut self) -> &mut crate::RequestOptions {
2885            &mut self.0.options
2886        }
2887    }
2888
2889    /// The request builder for [CatalogService::get_entry_type][crate::client::CatalogService::get_entry_type] calls.
2890    ///
2891    /// # Example
2892    /// ```
2893    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntryType;
2894    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2895    ///
2896    /// let builder = prepare_request_builder();
2897    /// let response = builder.send().await?;
2898    /// # Ok(()) }
2899    ///
2900    /// fn prepare_request_builder() -> GetEntryType {
2901    ///   # panic!();
2902    ///   // ... details omitted ...
2903    /// }
2904    /// ```
2905    #[derive(Clone, Debug)]
2906    pub struct GetEntryType(RequestBuilder<crate::model::GetEntryTypeRequest>);
2907
2908    impl GetEntryType {
2909        pub(crate) fn new(
2910            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2911        ) -> Self {
2912            Self(RequestBuilder::new(stub))
2913        }
2914
2915        /// Sets the full request, replacing any prior values.
2916        pub fn with_request<V: Into<crate::model::GetEntryTypeRequest>>(mut self, v: V) -> Self {
2917            self.0.request = v.into();
2918            self
2919        }
2920
2921        /// Sets all the options, replacing any prior values.
2922        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2923            self.0.options = v.into();
2924            self
2925        }
2926
2927        /// Sends the request.
2928        pub async fn send(self) -> Result<crate::model::EntryType> {
2929            (*self.0.stub)
2930                .get_entry_type(self.0.request, self.0.options)
2931                .await
2932                .map(crate::Response::into_body)
2933        }
2934
2935        /// Sets the value of [name][crate::model::GetEntryTypeRequest::name].
2936        ///
2937        /// This is a **required** field for requests.
2938        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2939            self.0.request.name = v.into();
2940            self
2941        }
2942    }
2943
2944    #[doc(hidden)]
2945    impl crate::RequestBuilder for GetEntryType {
2946        fn request_options(&mut self) -> &mut crate::RequestOptions {
2947            &mut self.0.options
2948        }
2949    }
2950
2951    /// The request builder for [CatalogService::create_aspect_type][crate::client::CatalogService::create_aspect_type] calls.
2952    ///
2953    /// # Example
2954    /// ```
2955    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateAspectType;
2956    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2957    /// use google_cloud_lro::Poller;
2958    ///
2959    /// let builder = prepare_request_builder();
2960    /// let response = builder.poller().until_done().await?;
2961    /// # Ok(()) }
2962    ///
2963    /// fn prepare_request_builder() -> CreateAspectType {
2964    ///   # panic!();
2965    ///   // ... details omitted ...
2966    /// }
2967    /// ```
2968    #[derive(Clone, Debug)]
2969    pub struct CreateAspectType(RequestBuilder<crate::model::CreateAspectTypeRequest>);
2970
2971    impl CreateAspectType {
2972        pub(crate) fn new(
2973            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2974        ) -> Self {
2975            Self(RequestBuilder::new(stub))
2976        }
2977
2978        /// Sets the full request, replacing any prior values.
2979        pub fn with_request<V: Into<crate::model::CreateAspectTypeRequest>>(
2980            mut self,
2981            v: V,
2982        ) -> Self {
2983            self.0.request = v.into();
2984            self
2985        }
2986
2987        /// Sets all the options, replacing any prior values.
2988        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2989            self.0.options = v.into();
2990            self
2991        }
2992
2993        /// Sends the request.
2994        ///
2995        /// # Long running operations
2996        ///
2997        /// This starts, but does not poll, a longrunning operation. More information
2998        /// on [create_aspect_type][crate::client::CatalogService::create_aspect_type].
2999        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3000            (*self.0.stub)
3001                .create_aspect_type(self.0.request, self.0.options)
3002                .await
3003                .map(crate::Response::into_body)
3004        }
3005
3006        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_aspect_type`.
3007        pub fn poller(
3008            self,
3009        ) -> impl google_cloud_lro::Poller<crate::model::AspectType, crate::model::OperationMetadata>
3010        {
3011            type Operation = google_cloud_lro::internal::Operation<
3012                crate::model::AspectType,
3013                crate::model::OperationMetadata,
3014            >;
3015            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3016            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3017
3018            let stub = self.0.stub.clone();
3019            let mut options = self.0.options.clone();
3020            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3021            let query = move |name| {
3022                let stub = stub.clone();
3023                let options = options.clone();
3024                async {
3025                    let op = GetOperation::new(stub)
3026                        .set_name(name)
3027                        .with_options(options)
3028                        .send()
3029                        .await?;
3030                    Ok(Operation::new(op))
3031                }
3032            };
3033
3034            let start = move || async {
3035                let op = self.send().await?;
3036                Ok(Operation::new(op))
3037            };
3038
3039            google_cloud_lro::internal::new_poller(
3040                polling_error_policy,
3041                polling_backoff_policy,
3042                start,
3043                query,
3044            )
3045        }
3046
3047        /// Sets the value of [parent][crate::model::CreateAspectTypeRequest::parent].
3048        ///
3049        /// This is a **required** field for requests.
3050        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3051            self.0.request.parent = v.into();
3052            self
3053        }
3054
3055        /// Sets the value of [aspect_type_id][crate::model::CreateAspectTypeRequest::aspect_type_id].
3056        ///
3057        /// This is a **required** field for requests.
3058        pub fn set_aspect_type_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3059            self.0.request.aspect_type_id = v.into();
3060            self
3061        }
3062
3063        /// Sets the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
3064        ///
3065        /// This is a **required** field for requests.
3066        pub fn set_aspect_type<T>(mut self, v: T) -> Self
3067        where
3068            T: std::convert::Into<crate::model::AspectType>,
3069        {
3070            self.0.request.aspect_type = std::option::Option::Some(v.into());
3071            self
3072        }
3073
3074        /// Sets or clears the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
3075        ///
3076        /// This is a **required** field for requests.
3077        pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
3078        where
3079            T: std::convert::Into<crate::model::AspectType>,
3080        {
3081            self.0.request.aspect_type = v.map(|x| x.into());
3082            self
3083        }
3084
3085        /// Sets the value of [validate_only][crate::model::CreateAspectTypeRequest::validate_only].
3086        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3087            self.0.request.validate_only = v.into();
3088            self
3089        }
3090    }
3091
3092    #[doc(hidden)]
3093    impl crate::RequestBuilder for CreateAspectType {
3094        fn request_options(&mut self) -> &mut crate::RequestOptions {
3095            &mut self.0.options
3096        }
3097    }
3098
3099    /// The request builder for [CatalogService::update_aspect_type][crate::client::CatalogService::update_aspect_type] calls.
3100    ///
3101    /// # Example
3102    /// ```
3103    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateAspectType;
3104    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3105    /// use google_cloud_lro::Poller;
3106    ///
3107    /// let builder = prepare_request_builder();
3108    /// let response = builder.poller().until_done().await?;
3109    /// # Ok(()) }
3110    ///
3111    /// fn prepare_request_builder() -> UpdateAspectType {
3112    ///   # panic!();
3113    ///   // ... details omitted ...
3114    /// }
3115    /// ```
3116    #[derive(Clone, Debug)]
3117    pub struct UpdateAspectType(RequestBuilder<crate::model::UpdateAspectTypeRequest>);
3118
3119    impl UpdateAspectType {
3120        pub(crate) fn new(
3121            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3122        ) -> Self {
3123            Self(RequestBuilder::new(stub))
3124        }
3125
3126        /// Sets the full request, replacing any prior values.
3127        pub fn with_request<V: Into<crate::model::UpdateAspectTypeRequest>>(
3128            mut self,
3129            v: V,
3130        ) -> Self {
3131            self.0.request = v.into();
3132            self
3133        }
3134
3135        /// Sets all the options, replacing any prior values.
3136        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3137            self.0.options = v.into();
3138            self
3139        }
3140
3141        /// Sends the request.
3142        ///
3143        /// # Long running operations
3144        ///
3145        /// This starts, but does not poll, a longrunning operation. More information
3146        /// on [update_aspect_type][crate::client::CatalogService::update_aspect_type].
3147        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3148            (*self.0.stub)
3149                .update_aspect_type(self.0.request, self.0.options)
3150                .await
3151                .map(crate::Response::into_body)
3152        }
3153
3154        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_aspect_type`.
3155        pub fn poller(
3156            self,
3157        ) -> impl google_cloud_lro::Poller<crate::model::AspectType, crate::model::OperationMetadata>
3158        {
3159            type Operation = google_cloud_lro::internal::Operation<
3160                crate::model::AspectType,
3161                crate::model::OperationMetadata,
3162            >;
3163            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3164            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3165
3166            let stub = self.0.stub.clone();
3167            let mut options = self.0.options.clone();
3168            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3169            let query = move |name| {
3170                let stub = stub.clone();
3171                let options = options.clone();
3172                async {
3173                    let op = GetOperation::new(stub)
3174                        .set_name(name)
3175                        .with_options(options)
3176                        .send()
3177                        .await?;
3178                    Ok(Operation::new(op))
3179                }
3180            };
3181
3182            let start = move || async {
3183                let op = self.send().await?;
3184                Ok(Operation::new(op))
3185            };
3186
3187            google_cloud_lro::internal::new_poller(
3188                polling_error_policy,
3189                polling_backoff_policy,
3190                start,
3191                query,
3192            )
3193        }
3194
3195        /// Sets the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
3196        ///
3197        /// This is a **required** field for requests.
3198        pub fn set_aspect_type<T>(mut self, v: T) -> Self
3199        where
3200            T: std::convert::Into<crate::model::AspectType>,
3201        {
3202            self.0.request.aspect_type = std::option::Option::Some(v.into());
3203            self
3204        }
3205
3206        /// Sets or clears the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
3207        ///
3208        /// This is a **required** field for requests.
3209        pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
3210        where
3211            T: std::convert::Into<crate::model::AspectType>,
3212        {
3213            self.0.request.aspect_type = v.map(|x| x.into());
3214            self
3215        }
3216
3217        /// Sets the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
3218        ///
3219        /// This is a **required** field for requests.
3220        pub fn set_update_mask<T>(mut self, v: T) -> Self
3221        where
3222            T: std::convert::Into<wkt::FieldMask>,
3223        {
3224            self.0.request.update_mask = std::option::Option::Some(v.into());
3225            self
3226        }
3227
3228        /// Sets or clears the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
3229        ///
3230        /// This is a **required** field for requests.
3231        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3232        where
3233            T: std::convert::Into<wkt::FieldMask>,
3234        {
3235            self.0.request.update_mask = v.map(|x| x.into());
3236            self
3237        }
3238
3239        /// Sets the value of [validate_only][crate::model::UpdateAspectTypeRequest::validate_only].
3240        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3241            self.0.request.validate_only = v.into();
3242            self
3243        }
3244    }
3245
3246    #[doc(hidden)]
3247    impl crate::RequestBuilder for UpdateAspectType {
3248        fn request_options(&mut self) -> &mut crate::RequestOptions {
3249            &mut self.0.options
3250        }
3251    }
3252
3253    /// The request builder for [CatalogService::delete_aspect_type][crate::client::CatalogService::delete_aspect_type] calls.
3254    ///
3255    /// # Example
3256    /// ```
3257    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteAspectType;
3258    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3259    /// use google_cloud_lro::Poller;
3260    ///
3261    /// let builder = prepare_request_builder();
3262    /// let response = builder.poller().until_done().await?;
3263    /// # Ok(()) }
3264    ///
3265    /// fn prepare_request_builder() -> DeleteAspectType {
3266    ///   # panic!();
3267    ///   // ... details omitted ...
3268    /// }
3269    /// ```
3270    #[derive(Clone, Debug)]
3271    pub struct DeleteAspectType(RequestBuilder<crate::model::DeleteAspectTypeRequest>);
3272
3273    impl DeleteAspectType {
3274        pub(crate) fn new(
3275            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3276        ) -> Self {
3277            Self(RequestBuilder::new(stub))
3278        }
3279
3280        /// Sets the full request, replacing any prior values.
3281        pub fn with_request<V: Into<crate::model::DeleteAspectTypeRequest>>(
3282            mut self,
3283            v: V,
3284        ) -> Self {
3285            self.0.request = v.into();
3286            self
3287        }
3288
3289        /// Sets all the options, replacing any prior values.
3290        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3291            self.0.options = v.into();
3292            self
3293        }
3294
3295        /// Sends the request.
3296        ///
3297        /// # Long running operations
3298        ///
3299        /// This starts, but does not poll, a longrunning operation. More information
3300        /// on [delete_aspect_type][crate::client::CatalogService::delete_aspect_type].
3301        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3302            (*self.0.stub)
3303                .delete_aspect_type(self.0.request, self.0.options)
3304                .await
3305                .map(crate::Response::into_body)
3306        }
3307
3308        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_aspect_type`.
3309        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3310            type Operation =
3311                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3312            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3313            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3314
3315            let stub = self.0.stub.clone();
3316            let mut options = self.0.options.clone();
3317            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3318            let query = move |name| {
3319                let stub = stub.clone();
3320                let options = options.clone();
3321                async {
3322                    let op = GetOperation::new(stub)
3323                        .set_name(name)
3324                        .with_options(options)
3325                        .send()
3326                        .await?;
3327                    Ok(Operation::new(op))
3328                }
3329            };
3330
3331            let start = move || async {
3332                let op = self.send().await?;
3333                Ok(Operation::new(op))
3334            };
3335
3336            google_cloud_lro::internal::new_unit_response_poller(
3337                polling_error_policy,
3338                polling_backoff_policy,
3339                start,
3340                query,
3341            )
3342        }
3343
3344        /// Sets the value of [name][crate::model::DeleteAspectTypeRequest::name].
3345        ///
3346        /// This is a **required** field for requests.
3347        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3348            self.0.request.name = v.into();
3349            self
3350        }
3351
3352        /// Sets the value of [etag][crate::model::DeleteAspectTypeRequest::etag].
3353        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3354            self.0.request.etag = v.into();
3355            self
3356        }
3357    }
3358
3359    #[doc(hidden)]
3360    impl crate::RequestBuilder for DeleteAspectType {
3361        fn request_options(&mut self) -> &mut crate::RequestOptions {
3362            &mut self.0.options
3363        }
3364    }
3365
3366    /// The request builder for [CatalogService::list_aspect_types][crate::client::CatalogService::list_aspect_types] calls.
3367    ///
3368    /// # Example
3369    /// ```
3370    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListAspectTypes;
3371    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3372    /// use google_cloud_gax::paginator::ItemPaginator;
3373    ///
3374    /// let builder = prepare_request_builder();
3375    /// let mut items = builder.by_item();
3376    /// while let Some(result) = items.next().await {
3377    ///   let item = result?;
3378    /// }
3379    /// # Ok(()) }
3380    ///
3381    /// fn prepare_request_builder() -> ListAspectTypes {
3382    ///   # panic!();
3383    ///   // ... details omitted ...
3384    /// }
3385    /// ```
3386    #[derive(Clone, Debug)]
3387    pub struct ListAspectTypes(RequestBuilder<crate::model::ListAspectTypesRequest>);
3388
3389    impl ListAspectTypes {
3390        pub(crate) fn new(
3391            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3392        ) -> Self {
3393            Self(RequestBuilder::new(stub))
3394        }
3395
3396        /// Sets the full request, replacing any prior values.
3397        pub fn with_request<V: Into<crate::model::ListAspectTypesRequest>>(mut self, v: V) -> Self {
3398            self.0.request = v.into();
3399            self
3400        }
3401
3402        /// Sets all the options, replacing any prior values.
3403        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3404            self.0.options = v.into();
3405            self
3406        }
3407
3408        /// Sends the request.
3409        pub async fn send(self) -> Result<crate::model::ListAspectTypesResponse> {
3410            (*self.0.stub)
3411                .list_aspect_types(self.0.request, self.0.options)
3412                .await
3413                .map(crate::Response::into_body)
3414        }
3415
3416        /// Streams each page in the collection.
3417        pub fn by_page(
3418            self,
3419        ) -> impl google_cloud_gax::paginator::Paginator<
3420            crate::model::ListAspectTypesResponse,
3421            crate::Error,
3422        > {
3423            use std::clone::Clone;
3424            let token = self.0.request.page_token.clone();
3425            let execute = move |token: String| {
3426                let mut builder = self.clone();
3427                builder.0.request = builder.0.request.set_page_token(token);
3428                builder.send()
3429            };
3430            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3431        }
3432
3433        /// Streams each item in the collection.
3434        pub fn by_item(
3435            self,
3436        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3437            crate::model::ListAspectTypesResponse,
3438            crate::Error,
3439        > {
3440            use google_cloud_gax::paginator::Paginator;
3441            self.by_page().items()
3442        }
3443
3444        /// Sets the value of [parent][crate::model::ListAspectTypesRequest::parent].
3445        ///
3446        /// This is a **required** field for requests.
3447        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3448            self.0.request.parent = v.into();
3449            self
3450        }
3451
3452        /// Sets the value of [page_size][crate::model::ListAspectTypesRequest::page_size].
3453        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3454            self.0.request.page_size = v.into();
3455            self
3456        }
3457
3458        /// Sets the value of [page_token][crate::model::ListAspectTypesRequest::page_token].
3459        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3460            self.0.request.page_token = v.into();
3461            self
3462        }
3463
3464        /// Sets the value of [filter][crate::model::ListAspectTypesRequest::filter].
3465        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3466            self.0.request.filter = v.into();
3467            self
3468        }
3469
3470        /// Sets the value of [order_by][crate::model::ListAspectTypesRequest::order_by].
3471        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3472            self.0.request.order_by = v.into();
3473            self
3474        }
3475    }
3476
3477    #[doc(hidden)]
3478    impl crate::RequestBuilder for ListAspectTypes {
3479        fn request_options(&mut self) -> &mut crate::RequestOptions {
3480            &mut self.0.options
3481        }
3482    }
3483
3484    /// The request builder for [CatalogService::get_aspect_type][crate::client::CatalogService::get_aspect_type] calls.
3485    ///
3486    /// # Example
3487    /// ```
3488    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetAspectType;
3489    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3490    ///
3491    /// let builder = prepare_request_builder();
3492    /// let response = builder.send().await?;
3493    /// # Ok(()) }
3494    ///
3495    /// fn prepare_request_builder() -> GetAspectType {
3496    ///   # panic!();
3497    ///   // ... details omitted ...
3498    /// }
3499    /// ```
3500    #[derive(Clone, Debug)]
3501    pub struct GetAspectType(RequestBuilder<crate::model::GetAspectTypeRequest>);
3502
3503    impl GetAspectType {
3504        pub(crate) fn new(
3505            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3506        ) -> Self {
3507            Self(RequestBuilder::new(stub))
3508        }
3509
3510        /// Sets the full request, replacing any prior values.
3511        pub fn with_request<V: Into<crate::model::GetAspectTypeRequest>>(mut self, v: V) -> Self {
3512            self.0.request = v.into();
3513            self
3514        }
3515
3516        /// Sets all the options, replacing any prior values.
3517        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3518            self.0.options = v.into();
3519            self
3520        }
3521
3522        /// Sends the request.
3523        pub async fn send(self) -> Result<crate::model::AspectType> {
3524            (*self.0.stub)
3525                .get_aspect_type(self.0.request, self.0.options)
3526                .await
3527                .map(crate::Response::into_body)
3528        }
3529
3530        /// Sets the value of [name][crate::model::GetAspectTypeRequest::name].
3531        ///
3532        /// This is a **required** field for requests.
3533        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3534            self.0.request.name = v.into();
3535            self
3536        }
3537    }
3538
3539    #[doc(hidden)]
3540    impl crate::RequestBuilder for GetAspectType {
3541        fn request_options(&mut self) -> &mut crate::RequestOptions {
3542            &mut self.0.options
3543        }
3544    }
3545
3546    /// The request builder for [CatalogService::create_entry_group][crate::client::CatalogService::create_entry_group] calls.
3547    ///
3548    /// # Example
3549    /// ```
3550    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntryGroup;
3551    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3552    /// use google_cloud_lro::Poller;
3553    ///
3554    /// let builder = prepare_request_builder();
3555    /// let response = builder.poller().until_done().await?;
3556    /// # Ok(()) }
3557    ///
3558    /// fn prepare_request_builder() -> CreateEntryGroup {
3559    ///   # panic!();
3560    ///   // ... details omitted ...
3561    /// }
3562    /// ```
3563    #[derive(Clone, Debug)]
3564    pub struct CreateEntryGroup(RequestBuilder<crate::model::CreateEntryGroupRequest>);
3565
3566    impl CreateEntryGroup {
3567        pub(crate) fn new(
3568            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3569        ) -> Self {
3570            Self(RequestBuilder::new(stub))
3571        }
3572
3573        /// Sets the full request, replacing any prior values.
3574        pub fn with_request<V: Into<crate::model::CreateEntryGroupRequest>>(
3575            mut self,
3576            v: V,
3577        ) -> Self {
3578            self.0.request = v.into();
3579            self
3580        }
3581
3582        /// Sets all the options, replacing any prior values.
3583        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3584            self.0.options = v.into();
3585            self
3586        }
3587
3588        /// Sends the request.
3589        ///
3590        /// # Long running operations
3591        ///
3592        /// This starts, but does not poll, a longrunning operation. More information
3593        /// on [create_entry_group][crate::client::CatalogService::create_entry_group].
3594        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3595            (*self.0.stub)
3596                .create_entry_group(self.0.request, self.0.options)
3597                .await
3598                .map(crate::Response::into_body)
3599        }
3600
3601        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_entry_group`.
3602        pub fn poller(
3603            self,
3604        ) -> impl google_cloud_lro::Poller<crate::model::EntryGroup, crate::model::OperationMetadata>
3605        {
3606            type Operation = google_cloud_lro::internal::Operation<
3607                crate::model::EntryGroup,
3608                crate::model::OperationMetadata,
3609            >;
3610            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3611            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3612
3613            let stub = self.0.stub.clone();
3614            let mut options = self.0.options.clone();
3615            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3616            let query = move |name| {
3617                let stub = stub.clone();
3618                let options = options.clone();
3619                async {
3620                    let op = GetOperation::new(stub)
3621                        .set_name(name)
3622                        .with_options(options)
3623                        .send()
3624                        .await?;
3625                    Ok(Operation::new(op))
3626                }
3627            };
3628
3629            let start = move || async {
3630                let op = self.send().await?;
3631                Ok(Operation::new(op))
3632            };
3633
3634            google_cloud_lro::internal::new_poller(
3635                polling_error_policy,
3636                polling_backoff_policy,
3637                start,
3638                query,
3639            )
3640        }
3641
3642        /// Sets the value of [parent][crate::model::CreateEntryGroupRequest::parent].
3643        ///
3644        /// This is a **required** field for requests.
3645        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3646            self.0.request.parent = v.into();
3647            self
3648        }
3649
3650        /// Sets the value of [entry_group_id][crate::model::CreateEntryGroupRequest::entry_group_id].
3651        ///
3652        /// This is a **required** field for requests.
3653        pub fn set_entry_group_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3654            self.0.request.entry_group_id = v.into();
3655            self
3656        }
3657
3658        /// Sets the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
3659        ///
3660        /// This is a **required** field for requests.
3661        pub fn set_entry_group<T>(mut self, v: T) -> Self
3662        where
3663            T: std::convert::Into<crate::model::EntryGroup>,
3664        {
3665            self.0.request.entry_group = std::option::Option::Some(v.into());
3666            self
3667        }
3668
3669        /// Sets or clears the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
3670        ///
3671        /// This is a **required** field for requests.
3672        pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
3673        where
3674            T: std::convert::Into<crate::model::EntryGroup>,
3675        {
3676            self.0.request.entry_group = v.map(|x| x.into());
3677            self
3678        }
3679
3680        /// Sets the value of [validate_only][crate::model::CreateEntryGroupRequest::validate_only].
3681        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3682            self.0.request.validate_only = v.into();
3683            self
3684        }
3685    }
3686
3687    #[doc(hidden)]
3688    impl crate::RequestBuilder for CreateEntryGroup {
3689        fn request_options(&mut self) -> &mut crate::RequestOptions {
3690            &mut self.0.options
3691        }
3692    }
3693
3694    /// The request builder for [CatalogService::update_entry_group][crate::client::CatalogService::update_entry_group] calls.
3695    ///
3696    /// # Example
3697    /// ```
3698    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntryGroup;
3699    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3700    /// use google_cloud_lro::Poller;
3701    ///
3702    /// let builder = prepare_request_builder();
3703    /// let response = builder.poller().until_done().await?;
3704    /// # Ok(()) }
3705    ///
3706    /// fn prepare_request_builder() -> UpdateEntryGroup {
3707    ///   # panic!();
3708    ///   // ... details omitted ...
3709    /// }
3710    /// ```
3711    #[derive(Clone, Debug)]
3712    pub struct UpdateEntryGroup(RequestBuilder<crate::model::UpdateEntryGroupRequest>);
3713
3714    impl UpdateEntryGroup {
3715        pub(crate) fn new(
3716            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3717        ) -> Self {
3718            Self(RequestBuilder::new(stub))
3719        }
3720
3721        /// Sets the full request, replacing any prior values.
3722        pub fn with_request<V: Into<crate::model::UpdateEntryGroupRequest>>(
3723            mut self,
3724            v: V,
3725        ) -> Self {
3726            self.0.request = v.into();
3727            self
3728        }
3729
3730        /// Sets all the options, replacing any prior values.
3731        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3732            self.0.options = v.into();
3733            self
3734        }
3735
3736        /// Sends the request.
3737        ///
3738        /// # Long running operations
3739        ///
3740        /// This starts, but does not poll, a longrunning operation. More information
3741        /// on [update_entry_group][crate::client::CatalogService::update_entry_group].
3742        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3743            (*self.0.stub)
3744                .update_entry_group(self.0.request, self.0.options)
3745                .await
3746                .map(crate::Response::into_body)
3747        }
3748
3749        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_entry_group`.
3750        pub fn poller(
3751            self,
3752        ) -> impl google_cloud_lro::Poller<crate::model::EntryGroup, crate::model::OperationMetadata>
3753        {
3754            type Operation = google_cloud_lro::internal::Operation<
3755                crate::model::EntryGroup,
3756                crate::model::OperationMetadata,
3757            >;
3758            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3759            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3760
3761            let stub = self.0.stub.clone();
3762            let mut options = self.0.options.clone();
3763            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3764            let query = move |name| {
3765                let stub = stub.clone();
3766                let options = options.clone();
3767                async {
3768                    let op = GetOperation::new(stub)
3769                        .set_name(name)
3770                        .with_options(options)
3771                        .send()
3772                        .await?;
3773                    Ok(Operation::new(op))
3774                }
3775            };
3776
3777            let start = move || async {
3778                let op = self.send().await?;
3779                Ok(Operation::new(op))
3780            };
3781
3782            google_cloud_lro::internal::new_poller(
3783                polling_error_policy,
3784                polling_backoff_policy,
3785                start,
3786                query,
3787            )
3788        }
3789
3790        /// Sets the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
3791        ///
3792        /// This is a **required** field for requests.
3793        pub fn set_entry_group<T>(mut self, v: T) -> Self
3794        where
3795            T: std::convert::Into<crate::model::EntryGroup>,
3796        {
3797            self.0.request.entry_group = std::option::Option::Some(v.into());
3798            self
3799        }
3800
3801        /// Sets or clears the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
3802        ///
3803        /// This is a **required** field for requests.
3804        pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
3805        where
3806            T: std::convert::Into<crate::model::EntryGroup>,
3807        {
3808            self.0.request.entry_group = v.map(|x| x.into());
3809            self
3810        }
3811
3812        /// Sets the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
3813        ///
3814        /// This is a **required** field for requests.
3815        pub fn set_update_mask<T>(mut self, v: T) -> Self
3816        where
3817            T: std::convert::Into<wkt::FieldMask>,
3818        {
3819            self.0.request.update_mask = std::option::Option::Some(v.into());
3820            self
3821        }
3822
3823        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
3824        ///
3825        /// This is a **required** field for requests.
3826        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3827        where
3828            T: std::convert::Into<wkt::FieldMask>,
3829        {
3830            self.0.request.update_mask = v.map(|x| x.into());
3831            self
3832        }
3833
3834        /// Sets the value of [validate_only][crate::model::UpdateEntryGroupRequest::validate_only].
3835        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3836            self.0.request.validate_only = v.into();
3837            self
3838        }
3839    }
3840
3841    #[doc(hidden)]
3842    impl crate::RequestBuilder for UpdateEntryGroup {
3843        fn request_options(&mut self) -> &mut crate::RequestOptions {
3844            &mut self.0.options
3845        }
3846    }
3847
3848    /// The request builder for [CatalogService::delete_entry_group][crate::client::CatalogService::delete_entry_group] calls.
3849    ///
3850    /// # Example
3851    /// ```
3852    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntryGroup;
3853    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3854    /// use google_cloud_lro::Poller;
3855    ///
3856    /// let builder = prepare_request_builder();
3857    /// let response = builder.poller().until_done().await?;
3858    /// # Ok(()) }
3859    ///
3860    /// fn prepare_request_builder() -> DeleteEntryGroup {
3861    ///   # panic!();
3862    ///   // ... details omitted ...
3863    /// }
3864    /// ```
3865    #[derive(Clone, Debug)]
3866    pub struct DeleteEntryGroup(RequestBuilder<crate::model::DeleteEntryGroupRequest>);
3867
3868    impl DeleteEntryGroup {
3869        pub(crate) fn new(
3870            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3871        ) -> Self {
3872            Self(RequestBuilder::new(stub))
3873        }
3874
3875        /// Sets the full request, replacing any prior values.
3876        pub fn with_request<V: Into<crate::model::DeleteEntryGroupRequest>>(
3877            mut self,
3878            v: V,
3879        ) -> Self {
3880            self.0.request = v.into();
3881            self
3882        }
3883
3884        /// Sets all the options, replacing any prior values.
3885        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3886            self.0.options = v.into();
3887            self
3888        }
3889
3890        /// Sends the request.
3891        ///
3892        /// # Long running operations
3893        ///
3894        /// This starts, but does not poll, a longrunning operation. More information
3895        /// on [delete_entry_group][crate::client::CatalogService::delete_entry_group].
3896        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3897            (*self.0.stub)
3898                .delete_entry_group(self.0.request, self.0.options)
3899                .await
3900                .map(crate::Response::into_body)
3901        }
3902
3903        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_entry_group`.
3904        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3905            type Operation =
3906                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3907            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3908            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3909
3910            let stub = self.0.stub.clone();
3911            let mut options = self.0.options.clone();
3912            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3913            let query = move |name| {
3914                let stub = stub.clone();
3915                let options = options.clone();
3916                async {
3917                    let op = GetOperation::new(stub)
3918                        .set_name(name)
3919                        .with_options(options)
3920                        .send()
3921                        .await?;
3922                    Ok(Operation::new(op))
3923                }
3924            };
3925
3926            let start = move || async {
3927                let op = self.send().await?;
3928                Ok(Operation::new(op))
3929            };
3930
3931            google_cloud_lro::internal::new_unit_response_poller(
3932                polling_error_policy,
3933                polling_backoff_policy,
3934                start,
3935                query,
3936            )
3937        }
3938
3939        /// Sets the value of [name][crate::model::DeleteEntryGroupRequest::name].
3940        ///
3941        /// This is a **required** field for requests.
3942        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3943            self.0.request.name = v.into();
3944            self
3945        }
3946
3947        /// Sets the value of [etag][crate::model::DeleteEntryGroupRequest::etag].
3948        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3949            self.0.request.etag = v.into();
3950            self
3951        }
3952    }
3953
3954    #[doc(hidden)]
3955    impl crate::RequestBuilder for DeleteEntryGroup {
3956        fn request_options(&mut self) -> &mut crate::RequestOptions {
3957            &mut self.0.options
3958        }
3959    }
3960
3961    /// The request builder for [CatalogService::list_entry_groups][crate::client::CatalogService::list_entry_groups] calls.
3962    ///
3963    /// # Example
3964    /// ```
3965    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListEntryGroups;
3966    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3967    /// use google_cloud_gax::paginator::ItemPaginator;
3968    ///
3969    /// let builder = prepare_request_builder();
3970    /// let mut items = builder.by_item();
3971    /// while let Some(result) = items.next().await {
3972    ///   let item = result?;
3973    /// }
3974    /// # Ok(()) }
3975    ///
3976    /// fn prepare_request_builder() -> ListEntryGroups {
3977    ///   # panic!();
3978    ///   // ... details omitted ...
3979    /// }
3980    /// ```
3981    #[derive(Clone, Debug)]
3982    pub struct ListEntryGroups(RequestBuilder<crate::model::ListEntryGroupsRequest>);
3983
3984    impl ListEntryGroups {
3985        pub(crate) fn new(
3986            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3987        ) -> Self {
3988            Self(RequestBuilder::new(stub))
3989        }
3990
3991        /// Sets the full request, replacing any prior values.
3992        pub fn with_request<V: Into<crate::model::ListEntryGroupsRequest>>(mut self, v: V) -> Self {
3993            self.0.request = v.into();
3994            self
3995        }
3996
3997        /// Sets all the options, replacing any prior values.
3998        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3999            self.0.options = v.into();
4000            self
4001        }
4002
4003        /// Sends the request.
4004        pub async fn send(self) -> Result<crate::model::ListEntryGroupsResponse> {
4005            (*self.0.stub)
4006                .list_entry_groups(self.0.request, self.0.options)
4007                .await
4008                .map(crate::Response::into_body)
4009        }
4010
4011        /// Streams each page in the collection.
4012        pub fn by_page(
4013            self,
4014        ) -> impl google_cloud_gax::paginator::Paginator<
4015            crate::model::ListEntryGroupsResponse,
4016            crate::Error,
4017        > {
4018            use std::clone::Clone;
4019            let token = self.0.request.page_token.clone();
4020            let execute = move |token: String| {
4021                let mut builder = self.clone();
4022                builder.0.request = builder.0.request.set_page_token(token);
4023                builder.send()
4024            };
4025            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4026        }
4027
4028        /// Streams each item in the collection.
4029        pub fn by_item(
4030            self,
4031        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4032            crate::model::ListEntryGroupsResponse,
4033            crate::Error,
4034        > {
4035            use google_cloud_gax::paginator::Paginator;
4036            self.by_page().items()
4037        }
4038
4039        /// Sets the value of [parent][crate::model::ListEntryGroupsRequest::parent].
4040        ///
4041        /// This is a **required** field for requests.
4042        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4043            self.0.request.parent = v.into();
4044            self
4045        }
4046
4047        /// Sets the value of [page_size][crate::model::ListEntryGroupsRequest::page_size].
4048        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4049            self.0.request.page_size = v.into();
4050            self
4051        }
4052
4053        /// Sets the value of [page_token][crate::model::ListEntryGroupsRequest::page_token].
4054        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4055            self.0.request.page_token = v.into();
4056            self
4057        }
4058
4059        /// Sets the value of [filter][crate::model::ListEntryGroupsRequest::filter].
4060        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4061            self.0.request.filter = v.into();
4062            self
4063        }
4064
4065        /// Sets the value of [order_by][crate::model::ListEntryGroupsRequest::order_by].
4066        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4067            self.0.request.order_by = v.into();
4068            self
4069        }
4070    }
4071
4072    #[doc(hidden)]
4073    impl crate::RequestBuilder for ListEntryGroups {
4074        fn request_options(&mut self) -> &mut crate::RequestOptions {
4075            &mut self.0.options
4076        }
4077    }
4078
4079    /// The request builder for [CatalogService::get_entry_group][crate::client::CatalogService::get_entry_group] calls.
4080    ///
4081    /// # Example
4082    /// ```
4083    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntryGroup;
4084    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4085    ///
4086    /// let builder = prepare_request_builder();
4087    /// let response = builder.send().await?;
4088    /// # Ok(()) }
4089    ///
4090    /// fn prepare_request_builder() -> GetEntryGroup {
4091    ///   # panic!();
4092    ///   // ... details omitted ...
4093    /// }
4094    /// ```
4095    #[derive(Clone, Debug)]
4096    pub struct GetEntryGroup(RequestBuilder<crate::model::GetEntryGroupRequest>);
4097
4098    impl GetEntryGroup {
4099        pub(crate) fn new(
4100            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4101        ) -> Self {
4102            Self(RequestBuilder::new(stub))
4103        }
4104
4105        /// Sets the full request, replacing any prior values.
4106        pub fn with_request<V: Into<crate::model::GetEntryGroupRequest>>(mut self, v: V) -> Self {
4107            self.0.request = v.into();
4108            self
4109        }
4110
4111        /// Sets all the options, replacing any prior values.
4112        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4113            self.0.options = v.into();
4114            self
4115        }
4116
4117        /// Sends the request.
4118        pub async fn send(self) -> Result<crate::model::EntryGroup> {
4119            (*self.0.stub)
4120                .get_entry_group(self.0.request, self.0.options)
4121                .await
4122                .map(crate::Response::into_body)
4123        }
4124
4125        /// Sets the value of [name][crate::model::GetEntryGroupRequest::name].
4126        ///
4127        /// This is a **required** field for requests.
4128        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4129            self.0.request.name = v.into();
4130            self
4131        }
4132    }
4133
4134    #[doc(hidden)]
4135    impl crate::RequestBuilder for GetEntryGroup {
4136        fn request_options(&mut self) -> &mut crate::RequestOptions {
4137            &mut self.0.options
4138        }
4139    }
4140
4141    /// The request builder for [CatalogService::create_entry][crate::client::CatalogService::create_entry] calls.
4142    ///
4143    /// # Example
4144    /// ```
4145    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntry;
4146    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4147    ///
4148    /// let builder = prepare_request_builder();
4149    /// let response = builder.send().await?;
4150    /// # Ok(()) }
4151    ///
4152    /// fn prepare_request_builder() -> CreateEntry {
4153    ///   # panic!();
4154    ///   // ... details omitted ...
4155    /// }
4156    /// ```
4157    #[derive(Clone, Debug)]
4158    pub struct CreateEntry(RequestBuilder<crate::model::CreateEntryRequest>);
4159
4160    impl CreateEntry {
4161        pub(crate) fn new(
4162            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4163        ) -> Self {
4164            Self(RequestBuilder::new(stub))
4165        }
4166
4167        /// Sets the full request, replacing any prior values.
4168        pub fn with_request<V: Into<crate::model::CreateEntryRequest>>(mut self, v: V) -> Self {
4169            self.0.request = v.into();
4170            self
4171        }
4172
4173        /// Sets all the options, replacing any prior values.
4174        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4175            self.0.options = v.into();
4176            self
4177        }
4178
4179        /// Sends the request.
4180        pub async fn send(self) -> Result<crate::model::Entry> {
4181            (*self.0.stub)
4182                .create_entry(self.0.request, self.0.options)
4183                .await
4184                .map(crate::Response::into_body)
4185        }
4186
4187        /// Sets the value of [parent][crate::model::CreateEntryRequest::parent].
4188        ///
4189        /// This is a **required** field for requests.
4190        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4191            self.0.request.parent = v.into();
4192            self
4193        }
4194
4195        /// Sets the value of [entry_id][crate::model::CreateEntryRequest::entry_id].
4196        ///
4197        /// This is a **required** field for requests.
4198        pub fn set_entry_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4199            self.0.request.entry_id = v.into();
4200            self
4201        }
4202
4203        /// Sets the value of [entry][crate::model::CreateEntryRequest::entry].
4204        ///
4205        /// This is a **required** field for requests.
4206        pub fn set_entry<T>(mut self, v: T) -> Self
4207        where
4208            T: std::convert::Into<crate::model::Entry>,
4209        {
4210            self.0.request.entry = std::option::Option::Some(v.into());
4211            self
4212        }
4213
4214        /// Sets or clears the value of [entry][crate::model::CreateEntryRequest::entry].
4215        ///
4216        /// This is a **required** field for requests.
4217        pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
4218        where
4219            T: std::convert::Into<crate::model::Entry>,
4220        {
4221            self.0.request.entry = v.map(|x| x.into());
4222            self
4223        }
4224    }
4225
4226    #[doc(hidden)]
4227    impl crate::RequestBuilder for CreateEntry {
4228        fn request_options(&mut self) -> &mut crate::RequestOptions {
4229            &mut self.0.options
4230        }
4231    }
4232
4233    /// The request builder for [CatalogService::update_entry][crate::client::CatalogService::update_entry] calls.
4234    ///
4235    /// # Example
4236    /// ```
4237    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntry;
4238    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4239    ///
4240    /// let builder = prepare_request_builder();
4241    /// let response = builder.send().await?;
4242    /// # Ok(()) }
4243    ///
4244    /// fn prepare_request_builder() -> UpdateEntry {
4245    ///   # panic!();
4246    ///   // ... details omitted ...
4247    /// }
4248    /// ```
4249    #[derive(Clone, Debug)]
4250    pub struct UpdateEntry(RequestBuilder<crate::model::UpdateEntryRequest>);
4251
4252    impl UpdateEntry {
4253        pub(crate) fn new(
4254            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4255        ) -> Self {
4256            Self(RequestBuilder::new(stub))
4257        }
4258
4259        /// Sets the full request, replacing any prior values.
4260        pub fn with_request<V: Into<crate::model::UpdateEntryRequest>>(mut self, v: V) -> Self {
4261            self.0.request = v.into();
4262            self
4263        }
4264
4265        /// Sets all the options, replacing any prior values.
4266        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4267            self.0.options = v.into();
4268            self
4269        }
4270
4271        /// Sends the request.
4272        pub async fn send(self) -> Result<crate::model::Entry> {
4273            (*self.0.stub)
4274                .update_entry(self.0.request, self.0.options)
4275                .await
4276                .map(crate::Response::into_body)
4277        }
4278
4279        /// Sets the value of [entry][crate::model::UpdateEntryRequest::entry].
4280        ///
4281        /// This is a **required** field for requests.
4282        pub fn set_entry<T>(mut self, v: T) -> Self
4283        where
4284            T: std::convert::Into<crate::model::Entry>,
4285        {
4286            self.0.request.entry = std::option::Option::Some(v.into());
4287            self
4288        }
4289
4290        /// Sets or clears the value of [entry][crate::model::UpdateEntryRequest::entry].
4291        ///
4292        /// This is a **required** field for requests.
4293        pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
4294        where
4295            T: std::convert::Into<crate::model::Entry>,
4296        {
4297            self.0.request.entry = v.map(|x| x.into());
4298            self
4299        }
4300
4301        /// Sets the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
4302        pub fn set_update_mask<T>(mut self, v: T) -> Self
4303        where
4304            T: std::convert::Into<wkt::FieldMask>,
4305        {
4306            self.0.request.update_mask = std::option::Option::Some(v.into());
4307            self
4308        }
4309
4310        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
4311        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4312        where
4313            T: std::convert::Into<wkt::FieldMask>,
4314        {
4315            self.0.request.update_mask = v.map(|x| x.into());
4316            self
4317        }
4318
4319        /// Sets the value of [allow_missing][crate::model::UpdateEntryRequest::allow_missing].
4320        pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
4321            self.0.request.allow_missing = v.into();
4322            self
4323        }
4324
4325        /// Sets the value of [delete_missing_aspects][crate::model::UpdateEntryRequest::delete_missing_aspects].
4326        pub fn set_delete_missing_aspects<T: Into<bool>>(mut self, v: T) -> Self {
4327            self.0.request.delete_missing_aspects = v.into();
4328            self
4329        }
4330
4331        /// Sets the value of [aspect_keys][crate::model::UpdateEntryRequest::aspect_keys].
4332        pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
4333        where
4334            T: std::iter::IntoIterator<Item = V>,
4335            V: std::convert::Into<std::string::String>,
4336        {
4337            use std::iter::Iterator;
4338            self.0.request.aspect_keys = v.into_iter().map(|i| i.into()).collect();
4339            self
4340        }
4341    }
4342
4343    #[doc(hidden)]
4344    impl crate::RequestBuilder for UpdateEntry {
4345        fn request_options(&mut self) -> &mut crate::RequestOptions {
4346            &mut self.0.options
4347        }
4348    }
4349
4350    /// The request builder for [CatalogService::delete_entry][crate::client::CatalogService::delete_entry] calls.
4351    ///
4352    /// # Example
4353    /// ```
4354    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntry;
4355    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4356    ///
4357    /// let builder = prepare_request_builder();
4358    /// let response = builder.send().await?;
4359    /// # Ok(()) }
4360    ///
4361    /// fn prepare_request_builder() -> DeleteEntry {
4362    ///   # panic!();
4363    ///   // ... details omitted ...
4364    /// }
4365    /// ```
4366    #[derive(Clone, Debug)]
4367    pub struct DeleteEntry(RequestBuilder<crate::model::DeleteEntryRequest>);
4368
4369    impl DeleteEntry {
4370        pub(crate) fn new(
4371            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4372        ) -> Self {
4373            Self(RequestBuilder::new(stub))
4374        }
4375
4376        /// Sets the full request, replacing any prior values.
4377        pub fn with_request<V: Into<crate::model::DeleteEntryRequest>>(mut self, v: V) -> Self {
4378            self.0.request = v.into();
4379            self
4380        }
4381
4382        /// Sets all the options, replacing any prior values.
4383        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4384            self.0.options = v.into();
4385            self
4386        }
4387
4388        /// Sends the request.
4389        pub async fn send(self) -> Result<crate::model::Entry> {
4390            (*self.0.stub)
4391                .delete_entry(self.0.request, self.0.options)
4392                .await
4393                .map(crate::Response::into_body)
4394        }
4395
4396        /// Sets the value of [name][crate::model::DeleteEntryRequest::name].
4397        ///
4398        /// This is a **required** field for requests.
4399        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4400            self.0.request.name = v.into();
4401            self
4402        }
4403    }
4404
4405    #[doc(hidden)]
4406    impl crate::RequestBuilder for DeleteEntry {
4407        fn request_options(&mut self) -> &mut crate::RequestOptions {
4408            &mut self.0.options
4409        }
4410    }
4411
4412    /// The request builder for [CatalogService::list_entries][crate::client::CatalogService::list_entries] calls.
4413    ///
4414    /// # Example
4415    /// ```
4416    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListEntries;
4417    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4418    /// use google_cloud_gax::paginator::ItemPaginator;
4419    ///
4420    /// let builder = prepare_request_builder();
4421    /// let mut items = builder.by_item();
4422    /// while let Some(result) = items.next().await {
4423    ///   let item = result?;
4424    /// }
4425    /// # Ok(()) }
4426    ///
4427    /// fn prepare_request_builder() -> ListEntries {
4428    ///   # panic!();
4429    ///   // ... details omitted ...
4430    /// }
4431    /// ```
4432    #[derive(Clone, Debug)]
4433    pub struct ListEntries(RequestBuilder<crate::model::ListEntriesRequest>);
4434
4435    impl ListEntries {
4436        pub(crate) fn new(
4437            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4438        ) -> Self {
4439            Self(RequestBuilder::new(stub))
4440        }
4441
4442        /// Sets the full request, replacing any prior values.
4443        pub fn with_request<V: Into<crate::model::ListEntriesRequest>>(mut self, v: V) -> Self {
4444            self.0.request = v.into();
4445            self
4446        }
4447
4448        /// Sets all the options, replacing any prior values.
4449        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4450            self.0.options = v.into();
4451            self
4452        }
4453
4454        /// Sends the request.
4455        pub async fn send(self) -> Result<crate::model::ListEntriesResponse> {
4456            (*self.0.stub)
4457                .list_entries(self.0.request, self.0.options)
4458                .await
4459                .map(crate::Response::into_body)
4460        }
4461
4462        /// Streams each page in the collection.
4463        pub fn by_page(
4464            self,
4465        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListEntriesResponse, crate::Error>
4466        {
4467            use std::clone::Clone;
4468            let token = self.0.request.page_token.clone();
4469            let execute = move |token: String| {
4470                let mut builder = self.clone();
4471                builder.0.request = builder.0.request.set_page_token(token);
4472                builder.send()
4473            };
4474            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4475        }
4476
4477        /// Streams each item in the collection.
4478        pub fn by_item(
4479            self,
4480        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4481            crate::model::ListEntriesResponse,
4482            crate::Error,
4483        > {
4484            use google_cloud_gax::paginator::Paginator;
4485            self.by_page().items()
4486        }
4487
4488        /// Sets the value of [parent][crate::model::ListEntriesRequest::parent].
4489        ///
4490        /// This is a **required** field for requests.
4491        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4492            self.0.request.parent = v.into();
4493            self
4494        }
4495
4496        /// Sets the value of [page_size][crate::model::ListEntriesRequest::page_size].
4497        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4498            self.0.request.page_size = v.into();
4499            self
4500        }
4501
4502        /// Sets the value of [page_token][crate::model::ListEntriesRequest::page_token].
4503        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4504            self.0.request.page_token = v.into();
4505            self
4506        }
4507
4508        /// Sets the value of [filter][crate::model::ListEntriesRequest::filter].
4509        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4510            self.0.request.filter = v.into();
4511            self
4512        }
4513    }
4514
4515    #[doc(hidden)]
4516    impl crate::RequestBuilder for ListEntries {
4517        fn request_options(&mut self) -> &mut crate::RequestOptions {
4518            &mut self.0.options
4519        }
4520    }
4521
4522    /// The request builder for [CatalogService::get_entry][crate::client::CatalogService::get_entry] calls.
4523    ///
4524    /// # Example
4525    /// ```
4526    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntry;
4527    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4528    ///
4529    /// let builder = prepare_request_builder();
4530    /// let response = builder.send().await?;
4531    /// # Ok(()) }
4532    ///
4533    /// fn prepare_request_builder() -> GetEntry {
4534    ///   # panic!();
4535    ///   // ... details omitted ...
4536    /// }
4537    /// ```
4538    #[derive(Clone, Debug)]
4539    pub struct GetEntry(RequestBuilder<crate::model::GetEntryRequest>);
4540
4541    impl GetEntry {
4542        pub(crate) fn new(
4543            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4544        ) -> Self {
4545            Self(RequestBuilder::new(stub))
4546        }
4547
4548        /// Sets the full request, replacing any prior values.
4549        pub fn with_request<V: Into<crate::model::GetEntryRequest>>(mut self, v: V) -> Self {
4550            self.0.request = v.into();
4551            self
4552        }
4553
4554        /// Sets all the options, replacing any prior values.
4555        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4556            self.0.options = v.into();
4557            self
4558        }
4559
4560        /// Sends the request.
4561        pub async fn send(self) -> Result<crate::model::Entry> {
4562            (*self.0.stub)
4563                .get_entry(self.0.request, self.0.options)
4564                .await
4565                .map(crate::Response::into_body)
4566        }
4567
4568        /// Sets the value of [name][crate::model::GetEntryRequest::name].
4569        ///
4570        /// This is a **required** field for requests.
4571        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4572            self.0.request.name = v.into();
4573            self
4574        }
4575
4576        /// Sets the value of [view][crate::model::GetEntryRequest::view].
4577        pub fn set_view<T: Into<crate::model::EntryView>>(mut self, v: T) -> Self {
4578            self.0.request.view = v.into();
4579            self
4580        }
4581
4582        /// Sets the value of [aspect_types][crate::model::GetEntryRequest::aspect_types].
4583        pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
4584        where
4585            T: std::iter::IntoIterator<Item = V>,
4586            V: std::convert::Into<std::string::String>,
4587        {
4588            use std::iter::Iterator;
4589            self.0.request.aspect_types = v.into_iter().map(|i| i.into()).collect();
4590            self
4591        }
4592
4593        /// Sets the value of [paths][crate::model::GetEntryRequest::paths].
4594        pub fn set_paths<T, V>(mut self, v: T) -> Self
4595        where
4596            T: std::iter::IntoIterator<Item = V>,
4597            V: std::convert::Into<std::string::String>,
4598        {
4599            use std::iter::Iterator;
4600            self.0.request.paths = v.into_iter().map(|i| i.into()).collect();
4601            self
4602        }
4603    }
4604
4605    #[doc(hidden)]
4606    impl crate::RequestBuilder for GetEntry {
4607        fn request_options(&mut self) -> &mut crate::RequestOptions {
4608            &mut self.0.options
4609        }
4610    }
4611
4612    /// The request builder for [CatalogService::lookup_entry][crate::client::CatalogService::lookup_entry] calls.
4613    ///
4614    /// # Example
4615    /// ```
4616    /// # use google_cloud_dataplex_v1::builder::catalog_service::LookupEntry;
4617    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4618    ///
4619    /// let builder = prepare_request_builder();
4620    /// let response = builder.send().await?;
4621    /// # Ok(()) }
4622    ///
4623    /// fn prepare_request_builder() -> LookupEntry {
4624    ///   # panic!();
4625    ///   // ... details omitted ...
4626    /// }
4627    /// ```
4628    #[derive(Clone, Debug)]
4629    pub struct LookupEntry(RequestBuilder<crate::model::LookupEntryRequest>);
4630
4631    impl LookupEntry {
4632        pub(crate) fn new(
4633            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4634        ) -> Self {
4635            Self(RequestBuilder::new(stub))
4636        }
4637
4638        /// Sets the full request, replacing any prior values.
4639        pub fn with_request<V: Into<crate::model::LookupEntryRequest>>(mut self, v: V) -> Self {
4640            self.0.request = v.into();
4641            self
4642        }
4643
4644        /// Sets all the options, replacing any prior values.
4645        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4646            self.0.options = v.into();
4647            self
4648        }
4649
4650        /// Sends the request.
4651        pub async fn send(self) -> Result<crate::model::Entry> {
4652            (*self.0.stub)
4653                .lookup_entry(self.0.request, self.0.options)
4654                .await
4655                .map(crate::Response::into_body)
4656        }
4657
4658        /// Sets the value of [name][crate::model::LookupEntryRequest::name].
4659        ///
4660        /// This is a **required** field for requests.
4661        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4662            self.0.request.name = v.into();
4663            self
4664        }
4665
4666        /// Sets the value of [view][crate::model::LookupEntryRequest::view].
4667        pub fn set_view<T: Into<crate::model::EntryView>>(mut self, v: T) -> Self {
4668            self.0.request.view = v.into();
4669            self
4670        }
4671
4672        /// Sets the value of [aspect_types][crate::model::LookupEntryRequest::aspect_types].
4673        pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
4674        where
4675            T: std::iter::IntoIterator<Item = V>,
4676            V: std::convert::Into<std::string::String>,
4677        {
4678            use std::iter::Iterator;
4679            self.0.request.aspect_types = v.into_iter().map(|i| i.into()).collect();
4680            self
4681        }
4682
4683        /// Sets the value of [paths][crate::model::LookupEntryRequest::paths].
4684        pub fn set_paths<T, V>(mut self, v: T) -> Self
4685        where
4686            T: std::iter::IntoIterator<Item = V>,
4687            V: std::convert::Into<std::string::String>,
4688        {
4689            use std::iter::Iterator;
4690            self.0.request.paths = v.into_iter().map(|i| i.into()).collect();
4691            self
4692        }
4693
4694        /// Sets the value of [entry][crate::model::LookupEntryRequest::entry].
4695        ///
4696        /// This is a **required** field for requests.
4697        pub fn set_entry<T: Into<std::string::String>>(mut self, v: T) -> Self {
4698            self.0.request.entry = v.into();
4699            self
4700        }
4701    }
4702
4703    #[doc(hidden)]
4704    impl crate::RequestBuilder for LookupEntry {
4705        fn request_options(&mut self) -> &mut crate::RequestOptions {
4706            &mut self.0.options
4707        }
4708    }
4709
4710    /// The request builder for [CatalogService::search_entries][crate::client::CatalogService::search_entries] calls.
4711    ///
4712    /// # Example
4713    /// ```
4714    /// # use google_cloud_dataplex_v1::builder::catalog_service::SearchEntries;
4715    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4716    /// use google_cloud_gax::paginator::ItemPaginator;
4717    ///
4718    /// let builder = prepare_request_builder();
4719    /// let mut items = builder.by_item();
4720    /// while let Some(result) = items.next().await {
4721    ///   let item = result?;
4722    /// }
4723    /// # Ok(()) }
4724    ///
4725    /// fn prepare_request_builder() -> SearchEntries {
4726    ///   # panic!();
4727    ///   // ... details omitted ...
4728    /// }
4729    /// ```
4730    #[derive(Clone, Debug)]
4731    pub struct SearchEntries(RequestBuilder<crate::model::SearchEntriesRequest>);
4732
4733    impl SearchEntries {
4734        pub(crate) fn new(
4735            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4736        ) -> Self {
4737            Self(RequestBuilder::new(stub))
4738        }
4739
4740        /// Sets the full request, replacing any prior values.
4741        pub fn with_request<V: Into<crate::model::SearchEntriesRequest>>(mut self, v: V) -> Self {
4742            self.0.request = v.into();
4743            self
4744        }
4745
4746        /// Sets all the options, replacing any prior values.
4747        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4748            self.0.options = v.into();
4749            self
4750        }
4751
4752        /// Sends the request.
4753        pub async fn send(self) -> Result<crate::model::SearchEntriesResponse> {
4754            (*self.0.stub)
4755                .search_entries(self.0.request, self.0.options)
4756                .await
4757                .map(crate::Response::into_body)
4758        }
4759
4760        /// Streams each page in the collection.
4761        pub fn by_page(
4762            self,
4763        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::SearchEntriesResponse, crate::Error>
4764        {
4765            use std::clone::Clone;
4766            let token = self.0.request.page_token.clone();
4767            let execute = move |token: String| {
4768                let mut builder = self.clone();
4769                builder.0.request = builder.0.request.set_page_token(token);
4770                builder.send()
4771            };
4772            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4773        }
4774
4775        /// Streams each item in the collection.
4776        pub fn by_item(
4777            self,
4778        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4779            crate::model::SearchEntriesResponse,
4780            crate::Error,
4781        > {
4782            use google_cloud_gax::paginator::Paginator;
4783            self.by_page().items()
4784        }
4785
4786        /// Sets the value of [name][crate::model::SearchEntriesRequest::name].
4787        ///
4788        /// This is a **required** field for requests.
4789        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4790            self.0.request.name = v.into();
4791            self
4792        }
4793
4794        /// Sets the value of [query][crate::model::SearchEntriesRequest::query].
4795        ///
4796        /// This is a **required** field for requests.
4797        pub fn set_query<T: Into<std::string::String>>(mut self, v: T) -> Self {
4798            self.0.request.query = v.into();
4799            self
4800        }
4801
4802        /// Sets the value of [page_size][crate::model::SearchEntriesRequest::page_size].
4803        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4804            self.0.request.page_size = v.into();
4805            self
4806        }
4807
4808        /// Sets the value of [page_token][crate::model::SearchEntriesRequest::page_token].
4809        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4810            self.0.request.page_token = v.into();
4811            self
4812        }
4813
4814        /// Sets the value of [order_by][crate::model::SearchEntriesRequest::order_by].
4815        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4816            self.0.request.order_by = v.into();
4817            self
4818        }
4819
4820        /// Sets the value of [scope][crate::model::SearchEntriesRequest::scope].
4821        pub fn set_scope<T: Into<std::string::String>>(mut self, v: T) -> Self {
4822            self.0.request.scope = v.into();
4823            self
4824        }
4825
4826        /// Sets the value of [semantic_search][crate::model::SearchEntriesRequest::semantic_search].
4827        pub fn set_semantic_search<T: Into<bool>>(mut self, v: T) -> Self {
4828            self.0.request.semantic_search = v.into();
4829            self
4830        }
4831    }
4832
4833    #[doc(hidden)]
4834    impl crate::RequestBuilder for SearchEntries {
4835        fn request_options(&mut self) -> &mut crate::RequestOptions {
4836            &mut self.0.options
4837        }
4838    }
4839
4840    /// The request builder for [CatalogService::create_metadata_job][crate::client::CatalogService::create_metadata_job] calls.
4841    ///
4842    /// # Example
4843    /// ```
4844    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateMetadataJob;
4845    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4846    /// use google_cloud_lro::Poller;
4847    ///
4848    /// let builder = prepare_request_builder();
4849    /// let response = builder.poller().until_done().await?;
4850    /// # Ok(()) }
4851    ///
4852    /// fn prepare_request_builder() -> CreateMetadataJob {
4853    ///   # panic!();
4854    ///   // ... details omitted ...
4855    /// }
4856    /// ```
4857    #[derive(Clone, Debug)]
4858    pub struct CreateMetadataJob(RequestBuilder<crate::model::CreateMetadataJobRequest>);
4859
4860    impl CreateMetadataJob {
4861        pub(crate) fn new(
4862            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4863        ) -> Self {
4864            Self(RequestBuilder::new(stub))
4865        }
4866
4867        /// Sets the full request, replacing any prior values.
4868        pub fn with_request<V: Into<crate::model::CreateMetadataJobRequest>>(
4869            mut self,
4870            v: V,
4871        ) -> Self {
4872            self.0.request = v.into();
4873            self
4874        }
4875
4876        /// Sets all the options, replacing any prior values.
4877        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4878            self.0.options = v.into();
4879            self
4880        }
4881
4882        /// Sends the request.
4883        ///
4884        /// # Long running operations
4885        ///
4886        /// This starts, but does not poll, a longrunning operation. More information
4887        /// on [create_metadata_job][crate::client::CatalogService::create_metadata_job].
4888        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4889            (*self.0.stub)
4890                .create_metadata_job(self.0.request, self.0.options)
4891                .await
4892                .map(crate::Response::into_body)
4893        }
4894
4895        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_metadata_job`.
4896        pub fn poller(
4897            self,
4898        ) -> impl google_cloud_lro::Poller<crate::model::MetadataJob, crate::model::OperationMetadata>
4899        {
4900            type Operation = google_cloud_lro::internal::Operation<
4901                crate::model::MetadataJob,
4902                crate::model::OperationMetadata,
4903            >;
4904            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4905            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4906
4907            let stub = self.0.stub.clone();
4908            let mut options = self.0.options.clone();
4909            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4910            let query = move |name| {
4911                let stub = stub.clone();
4912                let options = options.clone();
4913                async {
4914                    let op = GetOperation::new(stub)
4915                        .set_name(name)
4916                        .with_options(options)
4917                        .send()
4918                        .await?;
4919                    Ok(Operation::new(op))
4920                }
4921            };
4922
4923            let start = move || async {
4924                let op = self.send().await?;
4925                Ok(Operation::new(op))
4926            };
4927
4928            google_cloud_lro::internal::new_poller(
4929                polling_error_policy,
4930                polling_backoff_policy,
4931                start,
4932                query,
4933            )
4934        }
4935
4936        /// Sets the value of [parent][crate::model::CreateMetadataJobRequest::parent].
4937        ///
4938        /// This is a **required** field for requests.
4939        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4940            self.0.request.parent = v.into();
4941            self
4942        }
4943
4944        /// Sets the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
4945        ///
4946        /// This is a **required** field for requests.
4947        pub fn set_metadata_job<T>(mut self, v: T) -> Self
4948        where
4949            T: std::convert::Into<crate::model::MetadataJob>,
4950        {
4951            self.0.request.metadata_job = std::option::Option::Some(v.into());
4952            self
4953        }
4954
4955        /// Sets or clears the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
4956        ///
4957        /// This is a **required** field for requests.
4958        pub fn set_or_clear_metadata_job<T>(mut self, v: std::option::Option<T>) -> Self
4959        where
4960            T: std::convert::Into<crate::model::MetadataJob>,
4961        {
4962            self.0.request.metadata_job = v.map(|x| x.into());
4963            self
4964        }
4965
4966        /// Sets the value of [metadata_job_id][crate::model::CreateMetadataJobRequest::metadata_job_id].
4967        pub fn set_metadata_job_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4968            self.0.request.metadata_job_id = v.into();
4969            self
4970        }
4971
4972        /// Sets the value of [validate_only][crate::model::CreateMetadataJobRequest::validate_only].
4973        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
4974            self.0.request.validate_only = v.into();
4975            self
4976        }
4977    }
4978
4979    #[doc(hidden)]
4980    impl crate::RequestBuilder for CreateMetadataJob {
4981        fn request_options(&mut self) -> &mut crate::RequestOptions {
4982            &mut self.0.options
4983        }
4984    }
4985
4986    /// The request builder for [CatalogService::get_metadata_job][crate::client::CatalogService::get_metadata_job] calls.
4987    ///
4988    /// # Example
4989    /// ```
4990    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetMetadataJob;
4991    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4992    ///
4993    /// let builder = prepare_request_builder();
4994    /// let response = builder.send().await?;
4995    /// # Ok(()) }
4996    ///
4997    /// fn prepare_request_builder() -> GetMetadataJob {
4998    ///   # panic!();
4999    ///   // ... details omitted ...
5000    /// }
5001    /// ```
5002    #[derive(Clone, Debug)]
5003    pub struct GetMetadataJob(RequestBuilder<crate::model::GetMetadataJobRequest>);
5004
5005    impl GetMetadataJob {
5006        pub(crate) fn new(
5007            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5008        ) -> Self {
5009            Self(RequestBuilder::new(stub))
5010        }
5011
5012        /// Sets the full request, replacing any prior values.
5013        pub fn with_request<V: Into<crate::model::GetMetadataJobRequest>>(mut self, v: V) -> Self {
5014            self.0.request = v.into();
5015            self
5016        }
5017
5018        /// Sets all the options, replacing any prior values.
5019        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5020            self.0.options = v.into();
5021            self
5022        }
5023
5024        /// Sends the request.
5025        pub async fn send(self) -> Result<crate::model::MetadataJob> {
5026            (*self.0.stub)
5027                .get_metadata_job(self.0.request, self.0.options)
5028                .await
5029                .map(crate::Response::into_body)
5030        }
5031
5032        /// Sets the value of [name][crate::model::GetMetadataJobRequest::name].
5033        ///
5034        /// This is a **required** field for requests.
5035        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5036            self.0.request.name = v.into();
5037            self
5038        }
5039    }
5040
5041    #[doc(hidden)]
5042    impl crate::RequestBuilder for GetMetadataJob {
5043        fn request_options(&mut self) -> &mut crate::RequestOptions {
5044            &mut self.0.options
5045        }
5046    }
5047
5048    /// The request builder for [CatalogService::list_metadata_jobs][crate::client::CatalogService::list_metadata_jobs] calls.
5049    ///
5050    /// # Example
5051    /// ```
5052    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListMetadataJobs;
5053    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5054    /// use google_cloud_gax::paginator::ItemPaginator;
5055    ///
5056    /// let builder = prepare_request_builder();
5057    /// let mut items = builder.by_item();
5058    /// while let Some(result) = items.next().await {
5059    ///   let item = result?;
5060    /// }
5061    /// # Ok(()) }
5062    ///
5063    /// fn prepare_request_builder() -> ListMetadataJobs {
5064    ///   # panic!();
5065    ///   // ... details omitted ...
5066    /// }
5067    /// ```
5068    #[derive(Clone, Debug)]
5069    pub struct ListMetadataJobs(RequestBuilder<crate::model::ListMetadataJobsRequest>);
5070
5071    impl ListMetadataJobs {
5072        pub(crate) fn new(
5073            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5074        ) -> Self {
5075            Self(RequestBuilder::new(stub))
5076        }
5077
5078        /// Sets the full request, replacing any prior values.
5079        pub fn with_request<V: Into<crate::model::ListMetadataJobsRequest>>(
5080            mut self,
5081            v: V,
5082        ) -> Self {
5083            self.0.request = v.into();
5084            self
5085        }
5086
5087        /// Sets all the options, replacing any prior values.
5088        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5089            self.0.options = v.into();
5090            self
5091        }
5092
5093        /// Sends the request.
5094        pub async fn send(self) -> Result<crate::model::ListMetadataJobsResponse> {
5095            (*self.0.stub)
5096                .list_metadata_jobs(self.0.request, self.0.options)
5097                .await
5098                .map(crate::Response::into_body)
5099        }
5100
5101        /// Streams each page in the collection.
5102        pub fn by_page(
5103            self,
5104        ) -> impl google_cloud_gax::paginator::Paginator<
5105            crate::model::ListMetadataJobsResponse,
5106            crate::Error,
5107        > {
5108            use std::clone::Clone;
5109            let token = self.0.request.page_token.clone();
5110            let execute = move |token: String| {
5111                let mut builder = self.clone();
5112                builder.0.request = builder.0.request.set_page_token(token);
5113                builder.send()
5114            };
5115            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5116        }
5117
5118        /// Streams each item in the collection.
5119        pub fn by_item(
5120            self,
5121        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5122            crate::model::ListMetadataJobsResponse,
5123            crate::Error,
5124        > {
5125            use google_cloud_gax::paginator::Paginator;
5126            self.by_page().items()
5127        }
5128
5129        /// Sets the value of [parent][crate::model::ListMetadataJobsRequest::parent].
5130        ///
5131        /// This is a **required** field for requests.
5132        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5133            self.0.request.parent = v.into();
5134            self
5135        }
5136
5137        /// Sets the value of [page_size][crate::model::ListMetadataJobsRequest::page_size].
5138        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5139            self.0.request.page_size = v.into();
5140            self
5141        }
5142
5143        /// Sets the value of [page_token][crate::model::ListMetadataJobsRequest::page_token].
5144        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5145            self.0.request.page_token = v.into();
5146            self
5147        }
5148
5149        /// Sets the value of [filter][crate::model::ListMetadataJobsRequest::filter].
5150        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5151            self.0.request.filter = v.into();
5152            self
5153        }
5154
5155        /// Sets the value of [order_by][crate::model::ListMetadataJobsRequest::order_by].
5156        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5157            self.0.request.order_by = v.into();
5158            self
5159        }
5160    }
5161
5162    #[doc(hidden)]
5163    impl crate::RequestBuilder for ListMetadataJobs {
5164        fn request_options(&mut self) -> &mut crate::RequestOptions {
5165            &mut self.0.options
5166        }
5167    }
5168
5169    /// The request builder for [CatalogService::cancel_metadata_job][crate::client::CatalogService::cancel_metadata_job] calls.
5170    ///
5171    /// # Example
5172    /// ```
5173    /// # use google_cloud_dataplex_v1::builder::catalog_service::CancelMetadataJob;
5174    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5175    ///
5176    /// let builder = prepare_request_builder();
5177    /// let response = builder.send().await?;
5178    /// # Ok(()) }
5179    ///
5180    /// fn prepare_request_builder() -> CancelMetadataJob {
5181    ///   # panic!();
5182    ///   // ... details omitted ...
5183    /// }
5184    /// ```
5185    #[derive(Clone, Debug)]
5186    pub struct CancelMetadataJob(RequestBuilder<crate::model::CancelMetadataJobRequest>);
5187
5188    impl CancelMetadataJob {
5189        pub(crate) fn new(
5190            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5191        ) -> Self {
5192            Self(RequestBuilder::new(stub))
5193        }
5194
5195        /// Sets the full request, replacing any prior values.
5196        pub fn with_request<V: Into<crate::model::CancelMetadataJobRequest>>(
5197            mut self,
5198            v: V,
5199        ) -> Self {
5200            self.0.request = v.into();
5201            self
5202        }
5203
5204        /// Sets all the options, replacing any prior values.
5205        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5206            self.0.options = v.into();
5207            self
5208        }
5209
5210        /// Sends the request.
5211        pub async fn send(self) -> Result<()> {
5212            (*self.0.stub)
5213                .cancel_metadata_job(self.0.request, self.0.options)
5214                .await
5215                .map(crate::Response::into_body)
5216        }
5217
5218        /// Sets the value of [name][crate::model::CancelMetadataJobRequest::name].
5219        ///
5220        /// This is a **required** field for requests.
5221        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5222            self.0.request.name = v.into();
5223            self
5224        }
5225    }
5226
5227    #[doc(hidden)]
5228    impl crate::RequestBuilder for CancelMetadataJob {
5229        fn request_options(&mut self) -> &mut crate::RequestOptions {
5230            &mut self.0.options
5231        }
5232    }
5233
5234    /// The request builder for [CatalogService::create_entry_link][crate::client::CatalogService::create_entry_link] calls.
5235    ///
5236    /// # Example
5237    /// ```
5238    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntryLink;
5239    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5240    ///
5241    /// let builder = prepare_request_builder();
5242    /// let response = builder.send().await?;
5243    /// # Ok(()) }
5244    ///
5245    /// fn prepare_request_builder() -> CreateEntryLink {
5246    ///   # panic!();
5247    ///   // ... details omitted ...
5248    /// }
5249    /// ```
5250    #[derive(Clone, Debug)]
5251    pub struct CreateEntryLink(RequestBuilder<crate::model::CreateEntryLinkRequest>);
5252
5253    impl CreateEntryLink {
5254        pub(crate) fn new(
5255            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5256        ) -> Self {
5257            Self(RequestBuilder::new(stub))
5258        }
5259
5260        /// Sets the full request, replacing any prior values.
5261        pub fn with_request<V: Into<crate::model::CreateEntryLinkRequest>>(mut self, v: V) -> Self {
5262            self.0.request = v.into();
5263            self
5264        }
5265
5266        /// Sets all the options, replacing any prior values.
5267        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5268            self.0.options = v.into();
5269            self
5270        }
5271
5272        /// Sends the request.
5273        pub async fn send(self) -> Result<crate::model::EntryLink> {
5274            (*self.0.stub)
5275                .create_entry_link(self.0.request, self.0.options)
5276                .await
5277                .map(crate::Response::into_body)
5278        }
5279
5280        /// Sets the value of [parent][crate::model::CreateEntryLinkRequest::parent].
5281        ///
5282        /// This is a **required** field for requests.
5283        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5284            self.0.request.parent = v.into();
5285            self
5286        }
5287
5288        /// Sets the value of [entry_link_id][crate::model::CreateEntryLinkRequest::entry_link_id].
5289        ///
5290        /// This is a **required** field for requests.
5291        pub fn set_entry_link_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5292            self.0.request.entry_link_id = v.into();
5293            self
5294        }
5295
5296        /// Sets the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
5297        ///
5298        /// This is a **required** field for requests.
5299        pub fn set_entry_link<T>(mut self, v: T) -> Self
5300        where
5301            T: std::convert::Into<crate::model::EntryLink>,
5302        {
5303            self.0.request.entry_link = std::option::Option::Some(v.into());
5304            self
5305        }
5306
5307        /// Sets or clears the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
5308        ///
5309        /// This is a **required** field for requests.
5310        pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
5311        where
5312            T: std::convert::Into<crate::model::EntryLink>,
5313        {
5314            self.0.request.entry_link = v.map(|x| x.into());
5315            self
5316        }
5317    }
5318
5319    #[doc(hidden)]
5320    impl crate::RequestBuilder for CreateEntryLink {
5321        fn request_options(&mut self) -> &mut crate::RequestOptions {
5322            &mut self.0.options
5323        }
5324    }
5325
5326    /// The request builder for [CatalogService::delete_entry_link][crate::client::CatalogService::delete_entry_link] calls.
5327    ///
5328    /// # Example
5329    /// ```
5330    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntryLink;
5331    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5332    ///
5333    /// let builder = prepare_request_builder();
5334    /// let response = builder.send().await?;
5335    /// # Ok(()) }
5336    ///
5337    /// fn prepare_request_builder() -> DeleteEntryLink {
5338    ///   # panic!();
5339    ///   // ... details omitted ...
5340    /// }
5341    /// ```
5342    #[derive(Clone, Debug)]
5343    pub struct DeleteEntryLink(RequestBuilder<crate::model::DeleteEntryLinkRequest>);
5344
5345    impl DeleteEntryLink {
5346        pub(crate) fn new(
5347            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5348        ) -> Self {
5349            Self(RequestBuilder::new(stub))
5350        }
5351
5352        /// Sets the full request, replacing any prior values.
5353        pub fn with_request<V: Into<crate::model::DeleteEntryLinkRequest>>(mut self, v: V) -> Self {
5354            self.0.request = v.into();
5355            self
5356        }
5357
5358        /// Sets all the options, replacing any prior values.
5359        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5360            self.0.options = v.into();
5361            self
5362        }
5363
5364        /// Sends the request.
5365        pub async fn send(self) -> Result<crate::model::EntryLink> {
5366            (*self.0.stub)
5367                .delete_entry_link(self.0.request, self.0.options)
5368                .await
5369                .map(crate::Response::into_body)
5370        }
5371
5372        /// Sets the value of [name][crate::model::DeleteEntryLinkRequest::name].
5373        ///
5374        /// This is a **required** field for requests.
5375        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5376            self.0.request.name = v.into();
5377            self
5378        }
5379    }
5380
5381    #[doc(hidden)]
5382    impl crate::RequestBuilder for DeleteEntryLink {
5383        fn request_options(&mut self) -> &mut crate::RequestOptions {
5384            &mut self.0.options
5385        }
5386    }
5387
5388    /// The request builder for [CatalogService::get_entry_link][crate::client::CatalogService::get_entry_link] calls.
5389    ///
5390    /// # Example
5391    /// ```
5392    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntryLink;
5393    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5394    ///
5395    /// let builder = prepare_request_builder();
5396    /// let response = builder.send().await?;
5397    /// # Ok(()) }
5398    ///
5399    /// fn prepare_request_builder() -> GetEntryLink {
5400    ///   # panic!();
5401    ///   // ... details omitted ...
5402    /// }
5403    /// ```
5404    #[derive(Clone, Debug)]
5405    pub struct GetEntryLink(RequestBuilder<crate::model::GetEntryLinkRequest>);
5406
5407    impl GetEntryLink {
5408        pub(crate) fn new(
5409            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5410        ) -> Self {
5411            Self(RequestBuilder::new(stub))
5412        }
5413
5414        /// Sets the full request, replacing any prior values.
5415        pub fn with_request<V: Into<crate::model::GetEntryLinkRequest>>(mut self, v: V) -> Self {
5416            self.0.request = v.into();
5417            self
5418        }
5419
5420        /// Sets all the options, replacing any prior values.
5421        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5422            self.0.options = v.into();
5423            self
5424        }
5425
5426        /// Sends the request.
5427        pub async fn send(self) -> Result<crate::model::EntryLink> {
5428            (*self.0.stub)
5429                .get_entry_link(self.0.request, self.0.options)
5430                .await
5431                .map(crate::Response::into_body)
5432        }
5433
5434        /// Sets the value of [name][crate::model::GetEntryLinkRequest::name].
5435        ///
5436        /// This is a **required** field for requests.
5437        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5438            self.0.request.name = v.into();
5439            self
5440        }
5441    }
5442
5443    #[doc(hidden)]
5444    impl crate::RequestBuilder for GetEntryLink {
5445        fn request_options(&mut self) -> &mut crate::RequestOptions {
5446            &mut self.0.options
5447        }
5448    }
5449
5450    /// The request builder for [CatalogService::list_locations][crate::client::CatalogService::list_locations] calls.
5451    ///
5452    /// # Example
5453    /// ```
5454    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListLocations;
5455    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5456    /// use google_cloud_gax::paginator::ItemPaginator;
5457    ///
5458    /// let builder = prepare_request_builder();
5459    /// let mut items = builder.by_item();
5460    /// while let Some(result) = items.next().await {
5461    ///   let item = result?;
5462    /// }
5463    /// # Ok(()) }
5464    ///
5465    /// fn prepare_request_builder() -> ListLocations {
5466    ///   # panic!();
5467    ///   // ... details omitted ...
5468    /// }
5469    /// ```
5470    #[derive(Clone, Debug)]
5471    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
5472
5473    impl ListLocations {
5474        pub(crate) fn new(
5475            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5476        ) -> Self {
5477            Self(RequestBuilder::new(stub))
5478        }
5479
5480        /// Sets the full request, replacing any prior values.
5481        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
5482            mut self,
5483            v: V,
5484        ) -> Self {
5485            self.0.request = v.into();
5486            self
5487        }
5488
5489        /// Sets all the options, replacing any prior values.
5490        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5491            self.0.options = v.into();
5492            self
5493        }
5494
5495        /// Sends the request.
5496        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
5497            (*self.0.stub)
5498                .list_locations(self.0.request, self.0.options)
5499                .await
5500                .map(crate::Response::into_body)
5501        }
5502
5503        /// Streams each page in the collection.
5504        pub fn by_page(
5505            self,
5506        ) -> impl google_cloud_gax::paginator::Paginator<
5507            google_cloud_location::model::ListLocationsResponse,
5508            crate::Error,
5509        > {
5510            use std::clone::Clone;
5511            let token = self.0.request.page_token.clone();
5512            let execute = move |token: String| {
5513                let mut builder = self.clone();
5514                builder.0.request = builder.0.request.set_page_token(token);
5515                builder.send()
5516            };
5517            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5518        }
5519
5520        /// Streams each item in the collection.
5521        pub fn by_item(
5522            self,
5523        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5524            google_cloud_location::model::ListLocationsResponse,
5525            crate::Error,
5526        > {
5527            use google_cloud_gax::paginator::Paginator;
5528            self.by_page().items()
5529        }
5530
5531        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
5532        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5533            self.0.request.name = v.into();
5534            self
5535        }
5536
5537        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
5538        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5539            self.0.request.filter = v.into();
5540            self
5541        }
5542
5543        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
5544        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5545            self.0.request.page_size = v.into();
5546            self
5547        }
5548
5549        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
5550        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5551            self.0.request.page_token = v.into();
5552            self
5553        }
5554    }
5555
5556    #[doc(hidden)]
5557    impl crate::RequestBuilder for ListLocations {
5558        fn request_options(&mut self) -> &mut crate::RequestOptions {
5559            &mut self.0.options
5560        }
5561    }
5562
5563    /// The request builder for [CatalogService::get_location][crate::client::CatalogService::get_location] calls.
5564    ///
5565    /// # Example
5566    /// ```
5567    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetLocation;
5568    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5569    ///
5570    /// let builder = prepare_request_builder();
5571    /// let response = builder.send().await?;
5572    /// # Ok(()) }
5573    ///
5574    /// fn prepare_request_builder() -> GetLocation {
5575    ///   # panic!();
5576    ///   // ... details omitted ...
5577    /// }
5578    /// ```
5579    #[derive(Clone, Debug)]
5580    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
5581
5582    impl GetLocation {
5583        pub(crate) fn new(
5584            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5585        ) -> Self {
5586            Self(RequestBuilder::new(stub))
5587        }
5588
5589        /// Sets the full request, replacing any prior values.
5590        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
5591            mut self,
5592            v: V,
5593        ) -> Self {
5594            self.0.request = v.into();
5595            self
5596        }
5597
5598        /// Sets all the options, replacing any prior values.
5599        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5600            self.0.options = v.into();
5601            self
5602        }
5603
5604        /// Sends the request.
5605        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
5606            (*self.0.stub)
5607                .get_location(self.0.request, self.0.options)
5608                .await
5609                .map(crate::Response::into_body)
5610        }
5611
5612        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
5613        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5614            self.0.request.name = v.into();
5615            self
5616        }
5617    }
5618
5619    #[doc(hidden)]
5620    impl crate::RequestBuilder for GetLocation {
5621        fn request_options(&mut self) -> &mut crate::RequestOptions {
5622            &mut self.0.options
5623        }
5624    }
5625
5626    /// The request builder for [CatalogService::set_iam_policy][crate::client::CatalogService::set_iam_policy] calls.
5627    ///
5628    /// # Example
5629    /// ```
5630    /// # use google_cloud_dataplex_v1::builder::catalog_service::SetIamPolicy;
5631    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5632    ///
5633    /// let builder = prepare_request_builder();
5634    /// let response = builder.send().await?;
5635    /// # Ok(()) }
5636    ///
5637    /// fn prepare_request_builder() -> SetIamPolicy {
5638    ///   # panic!();
5639    ///   // ... details omitted ...
5640    /// }
5641    /// ```
5642    #[derive(Clone, Debug)]
5643    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
5644
5645    impl SetIamPolicy {
5646        pub(crate) fn new(
5647            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5648        ) -> Self {
5649            Self(RequestBuilder::new(stub))
5650        }
5651
5652        /// Sets the full request, replacing any prior values.
5653        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
5654            mut self,
5655            v: V,
5656        ) -> Self {
5657            self.0.request = v.into();
5658            self
5659        }
5660
5661        /// Sets all the options, replacing any prior values.
5662        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5663            self.0.options = v.into();
5664            self
5665        }
5666
5667        /// Sends the request.
5668        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
5669            (*self.0.stub)
5670                .set_iam_policy(self.0.request, self.0.options)
5671                .await
5672                .map(crate::Response::into_body)
5673        }
5674
5675        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
5676        ///
5677        /// This is a **required** field for requests.
5678        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
5679            self.0.request.resource = v.into();
5680            self
5681        }
5682
5683        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
5684        ///
5685        /// This is a **required** field for requests.
5686        pub fn set_policy<T>(mut self, v: T) -> Self
5687        where
5688            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
5689        {
5690            self.0.request.policy = std::option::Option::Some(v.into());
5691            self
5692        }
5693
5694        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
5695        ///
5696        /// This is a **required** field for requests.
5697        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
5698        where
5699            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
5700        {
5701            self.0.request.policy = v.map(|x| x.into());
5702            self
5703        }
5704
5705        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
5706        pub fn set_update_mask<T>(mut self, v: T) -> Self
5707        where
5708            T: std::convert::Into<wkt::FieldMask>,
5709        {
5710            self.0.request.update_mask = std::option::Option::Some(v.into());
5711            self
5712        }
5713
5714        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
5715        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5716        where
5717            T: std::convert::Into<wkt::FieldMask>,
5718        {
5719            self.0.request.update_mask = v.map(|x| x.into());
5720            self
5721        }
5722    }
5723
5724    #[doc(hidden)]
5725    impl crate::RequestBuilder for SetIamPolicy {
5726        fn request_options(&mut self) -> &mut crate::RequestOptions {
5727            &mut self.0.options
5728        }
5729    }
5730
5731    /// The request builder for [CatalogService::get_iam_policy][crate::client::CatalogService::get_iam_policy] calls.
5732    ///
5733    /// # Example
5734    /// ```
5735    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetIamPolicy;
5736    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5737    ///
5738    /// let builder = prepare_request_builder();
5739    /// let response = builder.send().await?;
5740    /// # Ok(()) }
5741    ///
5742    /// fn prepare_request_builder() -> GetIamPolicy {
5743    ///   # panic!();
5744    ///   // ... details omitted ...
5745    /// }
5746    /// ```
5747    #[derive(Clone, Debug)]
5748    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
5749
5750    impl GetIamPolicy {
5751        pub(crate) fn new(
5752            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5753        ) -> Self {
5754            Self(RequestBuilder::new(stub))
5755        }
5756
5757        /// Sets the full request, replacing any prior values.
5758        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
5759            mut self,
5760            v: V,
5761        ) -> Self {
5762            self.0.request = v.into();
5763            self
5764        }
5765
5766        /// Sets all the options, replacing any prior values.
5767        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5768            self.0.options = v.into();
5769            self
5770        }
5771
5772        /// Sends the request.
5773        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
5774            (*self.0.stub)
5775                .get_iam_policy(self.0.request, self.0.options)
5776                .await
5777                .map(crate::Response::into_body)
5778        }
5779
5780        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
5781        ///
5782        /// This is a **required** field for requests.
5783        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
5784            self.0.request.resource = v.into();
5785            self
5786        }
5787
5788        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
5789        pub fn set_options<T>(mut self, v: T) -> Self
5790        where
5791            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
5792        {
5793            self.0.request.options = std::option::Option::Some(v.into());
5794            self
5795        }
5796
5797        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
5798        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
5799        where
5800            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
5801        {
5802            self.0.request.options = v.map(|x| x.into());
5803            self
5804        }
5805    }
5806
5807    #[doc(hidden)]
5808    impl crate::RequestBuilder for GetIamPolicy {
5809        fn request_options(&mut self) -> &mut crate::RequestOptions {
5810            &mut self.0.options
5811        }
5812    }
5813
5814    /// The request builder for [CatalogService::test_iam_permissions][crate::client::CatalogService::test_iam_permissions] calls.
5815    ///
5816    /// # Example
5817    /// ```
5818    /// # use google_cloud_dataplex_v1::builder::catalog_service::TestIamPermissions;
5819    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5820    ///
5821    /// let builder = prepare_request_builder();
5822    /// let response = builder.send().await?;
5823    /// # Ok(()) }
5824    ///
5825    /// fn prepare_request_builder() -> TestIamPermissions {
5826    ///   # panic!();
5827    ///   // ... details omitted ...
5828    /// }
5829    /// ```
5830    #[derive(Clone, Debug)]
5831    pub struct TestIamPermissions(
5832        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
5833    );
5834
5835    impl TestIamPermissions {
5836        pub(crate) fn new(
5837            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5838        ) -> Self {
5839            Self(RequestBuilder::new(stub))
5840        }
5841
5842        /// Sets the full request, replacing any prior values.
5843        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
5844            mut self,
5845            v: V,
5846        ) -> Self {
5847            self.0.request = v.into();
5848            self
5849        }
5850
5851        /// Sets all the options, replacing any prior values.
5852        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5853            self.0.options = v.into();
5854            self
5855        }
5856
5857        /// Sends the request.
5858        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
5859            (*self.0.stub)
5860                .test_iam_permissions(self.0.request, self.0.options)
5861                .await
5862                .map(crate::Response::into_body)
5863        }
5864
5865        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
5866        ///
5867        /// This is a **required** field for requests.
5868        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
5869            self.0.request.resource = v.into();
5870            self
5871        }
5872
5873        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
5874        ///
5875        /// This is a **required** field for requests.
5876        pub fn set_permissions<T, V>(mut self, v: T) -> Self
5877        where
5878            T: std::iter::IntoIterator<Item = V>,
5879            V: std::convert::Into<std::string::String>,
5880        {
5881            use std::iter::Iterator;
5882            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
5883            self
5884        }
5885    }
5886
5887    #[doc(hidden)]
5888    impl crate::RequestBuilder for TestIamPermissions {
5889        fn request_options(&mut self) -> &mut crate::RequestOptions {
5890            &mut self.0.options
5891        }
5892    }
5893
5894    /// The request builder for [CatalogService::list_operations][crate::client::CatalogService::list_operations] calls.
5895    ///
5896    /// # Example
5897    /// ```
5898    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListOperations;
5899    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5900    /// use google_cloud_gax::paginator::ItemPaginator;
5901    ///
5902    /// let builder = prepare_request_builder();
5903    /// let mut items = builder.by_item();
5904    /// while let Some(result) = items.next().await {
5905    ///   let item = result?;
5906    /// }
5907    /// # Ok(()) }
5908    ///
5909    /// fn prepare_request_builder() -> ListOperations {
5910    ///   # panic!();
5911    ///   // ... details omitted ...
5912    /// }
5913    /// ```
5914    #[derive(Clone, Debug)]
5915    pub struct ListOperations(
5916        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
5917    );
5918
5919    impl ListOperations {
5920        pub(crate) fn new(
5921            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5922        ) -> Self {
5923            Self(RequestBuilder::new(stub))
5924        }
5925
5926        /// Sets the full request, replacing any prior values.
5927        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
5928            mut self,
5929            v: V,
5930        ) -> Self {
5931            self.0.request = v.into();
5932            self
5933        }
5934
5935        /// Sets all the options, replacing any prior values.
5936        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5937            self.0.options = v.into();
5938            self
5939        }
5940
5941        /// Sends the request.
5942        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
5943            (*self.0.stub)
5944                .list_operations(self.0.request, self.0.options)
5945                .await
5946                .map(crate::Response::into_body)
5947        }
5948
5949        /// Streams each page in the collection.
5950        pub fn by_page(
5951            self,
5952        ) -> impl google_cloud_gax::paginator::Paginator<
5953            google_cloud_longrunning::model::ListOperationsResponse,
5954            crate::Error,
5955        > {
5956            use std::clone::Clone;
5957            let token = self.0.request.page_token.clone();
5958            let execute = move |token: String| {
5959                let mut builder = self.clone();
5960                builder.0.request = builder.0.request.set_page_token(token);
5961                builder.send()
5962            };
5963            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5964        }
5965
5966        /// Streams each item in the collection.
5967        pub fn by_item(
5968            self,
5969        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5970            google_cloud_longrunning::model::ListOperationsResponse,
5971            crate::Error,
5972        > {
5973            use google_cloud_gax::paginator::Paginator;
5974            self.by_page().items()
5975        }
5976
5977        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
5978        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5979            self.0.request.name = v.into();
5980            self
5981        }
5982
5983        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
5984        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5985            self.0.request.filter = v.into();
5986            self
5987        }
5988
5989        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
5990        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5991            self.0.request.page_size = v.into();
5992            self
5993        }
5994
5995        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
5996        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5997            self.0.request.page_token = v.into();
5998            self
5999        }
6000
6001        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
6002        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
6003            self.0.request.return_partial_success = v.into();
6004            self
6005        }
6006    }
6007
6008    #[doc(hidden)]
6009    impl crate::RequestBuilder for ListOperations {
6010        fn request_options(&mut self) -> &mut crate::RequestOptions {
6011            &mut self.0.options
6012        }
6013    }
6014
6015    /// The request builder for [CatalogService::get_operation][crate::client::CatalogService::get_operation] calls.
6016    ///
6017    /// # Example
6018    /// ```
6019    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetOperation;
6020    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6021    ///
6022    /// let builder = prepare_request_builder();
6023    /// let response = builder.send().await?;
6024    /// # Ok(()) }
6025    ///
6026    /// fn prepare_request_builder() -> GetOperation {
6027    ///   # panic!();
6028    ///   // ... details omitted ...
6029    /// }
6030    /// ```
6031    #[derive(Clone, Debug)]
6032    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
6033
6034    impl GetOperation {
6035        pub(crate) fn new(
6036            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6037        ) -> Self {
6038            Self(RequestBuilder::new(stub))
6039        }
6040
6041        /// Sets the full request, replacing any prior values.
6042        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
6043            mut self,
6044            v: V,
6045        ) -> Self {
6046            self.0.request = v.into();
6047            self
6048        }
6049
6050        /// Sets all the options, replacing any prior values.
6051        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6052            self.0.options = v.into();
6053            self
6054        }
6055
6056        /// Sends the request.
6057        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6058            (*self.0.stub)
6059                .get_operation(self.0.request, self.0.options)
6060                .await
6061                .map(crate::Response::into_body)
6062        }
6063
6064        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
6065        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6066            self.0.request.name = v.into();
6067            self
6068        }
6069    }
6070
6071    #[doc(hidden)]
6072    impl crate::RequestBuilder for GetOperation {
6073        fn request_options(&mut self) -> &mut crate::RequestOptions {
6074            &mut self.0.options
6075        }
6076    }
6077
6078    /// The request builder for [CatalogService::delete_operation][crate::client::CatalogService::delete_operation] calls.
6079    ///
6080    /// # Example
6081    /// ```
6082    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteOperation;
6083    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6084    ///
6085    /// let builder = prepare_request_builder();
6086    /// let response = builder.send().await?;
6087    /// # Ok(()) }
6088    ///
6089    /// fn prepare_request_builder() -> DeleteOperation {
6090    ///   # panic!();
6091    ///   // ... details omitted ...
6092    /// }
6093    /// ```
6094    #[derive(Clone, Debug)]
6095    pub struct DeleteOperation(
6096        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
6097    );
6098
6099    impl DeleteOperation {
6100        pub(crate) fn new(
6101            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6102        ) -> Self {
6103            Self(RequestBuilder::new(stub))
6104        }
6105
6106        /// Sets the full request, replacing any prior values.
6107        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
6108            mut self,
6109            v: V,
6110        ) -> Self {
6111            self.0.request = v.into();
6112            self
6113        }
6114
6115        /// Sets all the options, replacing any prior values.
6116        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6117            self.0.options = v.into();
6118            self
6119        }
6120
6121        /// Sends the request.
6122        pub async fn send(self) -> Result<()> {
6123            (*self.0.stub)
6124                .delete_operation(self.0.request, self.0.options)
6125                .await
6126                .map(crate::Response::into_body)
6127        }
6128
6129        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
6130        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6131            self.0.request.name = v.into();
6132            self
6133        }
6134    }
6135
6136    #[doc(hidden)]
6137    impl crate::RequestBuilder for DeleteOperation {
6138        fn request_options(&mut self) -> &mut crate::RequestOptions {
6139            &mut self.0.options
6140        }
6141    }
6142
6143    /// The request builder for [CatalogService::cancel_operation][crate::client::CatalogService::cancel_operation] calls.
6144    ///
6145    /// # Example
6146    /// ```
6147    /// # use google_cloud_dataplex_v1::builder::catalog_service::CancelOperation;
6148    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6149    ///
6150    /// let builder = prepare_request_builder();
6151    /// let response = builder.send().await?;
6152    /// # Ok(()) }
6153    ///
6154    /// fn prepare_request_builder() -> CancelOperation {
6155    ///   # panic!();
6156    ///   // ... details omitted ...
6157    /// }
6158    /// ```
6159    #[derive(Clone, Debug)]
6160    pub struct CancelOperation(
6161        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
6162    );
6163
6164    impl CancelOperation {
6165        pub(crate) fn new(
6166            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6167        ) -> Self {
6168            Self(RequestBuilder::new(stub))
6169        }
6170
6171        /// Sets the full request, replacing any prior values.
6172        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
6173            mut self,
6174            v: V,
6175        ) -> Self {
6176            self.0.request = v.into();
6177            self
6178        }
6179
6180        /// Sets all the options, replacing any prior values.
6181        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6182            self.0.options = v.into();
6183            self
6184        }
6185
6186        /// Sends the request.
6187        pub async fn send(self) -> Result<()> {
6188            (*self.0.stub)
6189                .cancel_operation(self.0.request, self.0.options)
6190                .await
6191                .map(crate::Response::into_body)
6192        }
6193
6194        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
6195        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6196            self.0.request.name = v.into();
6197            self
6198        }
6199    }
6200
6201    #[doc(hidden)]
6202    impl crate::RequestBuilder for CancelOperation {
6203        fn request_options(&mut self) -> &mut crate::RequestOptions {
6204            &mut self.0.options
6205        }
6206    }
6207}
6208
6209pub mod cmek_service {
6210    use crate::Result;
6211
6212    /// A builder for [CmekService][crate::client::CmekService].
6213    ///
6214    /// ```
6215    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
6216    /// # use google_cloud_dataplex_v1::*;
6217    /// # use builder::cmek_service::ClientBuilder;
6218    /// # use client::CmekService;
6219    /// let builder : ClientBuilder = CmekService::builder();
6220    /// let client = builder
6221    ///     .with_endpoint("https://dataplex.googleapis.com")
6222    ///     .build().await?;
6223    /// # Ok(()) }
6224    /// ```
6225    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
6226
6227    pub(crate) mod client {
6228        use super::super::super::client::CmekService;
6229        pub struct Factory;
6230        impl crate::ClientFactory for Factory {
6231            type Client = CmekService;
6232            type Credentials = gaxi::options::Credentials;
6233            async fn build(
6234                self,
6235                config: gaxi::options::ClientConfig,
6236            ) -> crate::ClientBuilderResult<Self::Client> {
6237                Self::Client::new(config).await
6238            }
6239        }
6240    }
6241
6242    /// Common implementation for [crate::client::CmekService] request builders.
6243    #[derive(Clone, Debug)]
6244    pub(crate) struct RequestBuilder<R: std::default::Default> {
6245        stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6246        request: R,
6247        options: crate::RequestOptions,
6248    }
6249
6250    impl<R> RequestBuilder<R>
6251    where
6252        R: std::default::Default,
6253    {
6254        pub(crate) fn new(
6255            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6256        ) -> Self {
6257            Self {
6258                stub,
6259                request: R::default(),
6260                options: crate::RequestOptions::default(),
6261            }
6262        }
6263    }
6264
6265    /// The request builder for [CmekService::create_encryption_config][crate::client::CmekService::create_encryption_config] calls.
6266    ///
6267    /// # Example
6268    /// ```
6269    /// # use google_cloud_dataplex_v1::builder::cmek_service::CreateEncryptionConfig;
6270    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6271    /// use google_cloud_lro::Poller;
6272    ///
6273    /// let builder = prepare_request_builder();
6274    /// let response = builder.poller().until_done().await?;
6275    /// # Ok(()) }
6276    ///
6277    /// fn prepare_request_builder() -> CreateEncryptionConfig {
6278    ///   # panic!();
6279    ///   // ... details omitted ...
6280    /// }
6281    /// ```
6282    #[derive(Clone, Debug)]
6283    pub struct CreateEncryptionConfig(RequestBuilder<crate::model::CreateEncryptionConfigRequest>);
6284
6285    impl CreateEncryptionConfig {
6286        pub(crate) fn new(
6287            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6288        ) -> Self {
6289            Self(RequestBuilder::new(stub))
6290        }
6291
6292        /// Sets the full request, replacing any prior values.
6293        pub fn with_request<V: Into<crate::model::CreateEncryptionConfigRequest>>(
6294            mut self,
6295            v: V,
6296        ) -> Self {
6297            self.0.request = v.into();
6298            self
6299        }
6300
6301        /// Sets all the options, replacing any prior values.
6302        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6303            self.0.options = v.into();
6304            self
6305        }
6306
6307        /// Sends the request.
6308        ///
6309        /// # Long running operations
6310        ///
6311        /// This starts, but does not poll, a longrunning operation. More information
6312        /// on [create_encryption_config][crate::client::CmekService::create_encryption_config].
6313        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6314            (*self.0.stub)
6315                .create_encryption_config(self.0.request, self.0.options)
6316                .await
6317                .map(crate::Response::into_body)
6318        }
6319
6320        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_encryption_config`.
6321        pub fn poller(
6322            self,
6323        ) -> impl google_cloud_lro::Poller<crate::model::EncryptionConfig, crate::model::OperationMetadata>
6324        {
6325            type Operation = google_cloud_lro::internal::Operation<
6326                crate::model::EncryptionConfig,
6327                crate::model::OperationMetadata,
6328            >;
6329            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6330            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6331
6332            let stub = self.0.stub.clone();
6333            let mut options = self.0.options.clone();
6334            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6335            let query = move |name| {
6336                let stub = stub.clone();
6337                let options = options.clone();
6338                async {
6339                    let op = GetOperation::new(stub)
6340                        .set_name(name)
6341                        .with_options(options)
6342                        .send()
6343                        .await?;
6344                    Ok(Operation::new(op))
6345                }
6346            };
6347
6348            let start = move || async {
6349                let op = self.send().await?;
6350                Ok(Operation::new(op))
6351            };
6352
6353            google_cloud_lro::internal::new_poller(
6354                polling_error_policy,
6355                polling_backoff_policy,
6356                start,
6357                query,
6358            )
6359        }
6360
6361        /// Sets the value of [parent][crate::model::CreateEncryptionConfigRequest::parent].
6362        ///
6363        /// This is a **required** field for requests.
6364        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6365            self.0.request.parent = v.into();
6366            self
6367        }
6368
6369        /// Sets the value of [encryption_config_id][crate::model::CreateEncryptionConfigRequest::encryption_config_id].
6370        ///
6371        /// This is a **required** field for requests.
6372        pub fn set_encryption_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6373            self.0.request.encryption_config_id = v.into();
6374            self
6375        }
6376
6377        /// Sets the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
6378        ///
6379        /// This is a **required** field for requests.
6380        pub fn set_encryption_config<T>(mut self, v: T) -> Self
6381        where
6382            T: std::convert::Into<crate::model::EncryptionConfig>,
6383        {
6384            self.0.request.encryption_config = std::option::Option::Some(v.into());
6385            self
6386        }
6387
6388        /// Sets or clears the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
6389        ///
6390        /// This is a **required** field for requests.
6391        pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
6392        where
6393            T: std::convert::Into<crate::model::EncryptionConfig>,
6394        {
6395            self.0.request.encryption_config = v.map(|x| x.into());
6396            self
6397        }
6398    }
6399
6400    #[doc(hidden)]
6401    impl crate::RequestBuilder for CreateEncryptionConfig {
6402        fn request_options(&mut self) -> &mut crate::RequestOptions {
6403            &mut self.0.options
6404        }
6405    }
6406
6407    /// The request builder for [CmekService::update_encryption_config][crate::client::CmekService::update_encryption_config] calls.
6408    ///
6409    /// # Example
6410    /// ```
6411    /// # use google_cloud_dataplex_v1::builder::cmek_service::UpdateEncryptionConfig;
6412    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6413    /// use google_cloud_lro::Poller;
6414    ///
6415    /// let builder = prepare_request_builder();
6416    /// let response = builder.poller().until_done().await?;
6417    /// # Ok(()) }
6418    ///
6419    /// fn prepare_request_builder() -> UpdateEncryptionConfig {
6420    ///   # panic!();
6421    ///   // ... details omitted ...
6422    /// }
6423    /// ```
6424    #[derive(Clone, Debug)]
6425    pub struct UpdateEncryptionConfig(RequestBuilder<crate::model::UpdateEncryptionConfigRequest>);
6426
6427    impl UpdateEncryptionConfig {
6428        pub(crate) fn new(
6429            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6430        ) -> Self {
6431            Self(RequestBuilder::new(stub))
6432        }
6433
6434        /// Sets the full request, replacing any prior values.
6435        pub fn with_request<V: Into<crate::model::UpdateEncryptionConfigRequest>>(
6436            mut self,
6437            v: V,
6438        ) -> Self {
6439            self.0.request = v.into();
6440            self
6441        }
6442
6443        /// Sets all the options, replacing any prior values.
6444        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6445            self.0.options = v.into();
6446            self
6447        }
6448
6449        /// Sends the request.
6450        ///
6451        /// # Long running operations
6452        ///
6453        /// This starts, but does not poll, a longrunning operation. More information
6454        /// on [update_encryption_config][crate::client::CmekService::update_encryption_config].
6455        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6456            (*self.0.stub)
6457                .update_encryption_config(self.0.request, self.0.options)
6458                .await
6459                .map(crate::Response::into_body)
6460        }
6461
6462        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_encryption_config`.
6463        pub fn poller(
6464            self,
6465        ) -> impl google_cloud_lro::Poller<crate::model::EncryptionConfig, crate::model::OperationMetadata>
6466        {
6467            type Operation = google_cloud_lro::internal::Operation<
6468                crate::model::EncryptionConfig,
6469                crate::model::OperationMetadata,
6470            >;
6471            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6472            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6473
6474            let stub = self.0.stub.clone();
6475            let mut options = self.0.options.clone();
6476            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6477            let query = move |name| {
6478                let stub = stub.clone();
6479                let options = options.clone();
6480                async {
6481                    let op = GetOperation::new(stub)
6482                        .set_name(name)
6483                        .with_options(options)
6484                        .send()
6485                        .await?;
6486                    Ok(Operation::new(op))
6487                }
6488            };
6489
6490            let start = move || async {
6491                let op = self.send().await?;
6492                Ok(Operation::new(op))
6493            };
6494
6495            google_cloud_lro::internal::new_poller(
6496                polling_error_policy,
6497                polling_backoff_policy,
6498                start,
6499                query,
6500            )
6501        }
6502
6503        /// Sets the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
6504        ///
6505        /// This is a **required** field for requests.
6506        pub fn set_encryption_config<T>(mut self, v: T) -> Self
6507        where
6508            T: std::convert::Into<crate::model::EncryptionConfig>,
6509        {
6510            self.0.request.encryption_config = std::option::Option::Some(v.into());
6511            self
6512        }
6513
6514        /// Sets or clears the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
6515        ///
6516        /// This is a **required** field for requests.
6517        pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
6518        where
6519            T: std::convert::Into<crate::model::EncryptionConfig>,
6520        {
6521            self.0.request.encryption_config = v.map(|x| x.into());
6522            self
6523        }
6524
6525        /// Sets the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
6526        pub fn set_update_mask<T>(mut self, v: T) -> Self
6527        where
6528            T: std::convert::Into<wkt::FieldMask>,
6529        {
6530            self.0.request.update_mask = std::option::Option::Some(v.into());
6531            self
6532        }
6533
6534        /// Sets or clears the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
6535        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6536        where
6537            T: std::convert::Into<wkt::FieldMask>,
6538        {
6539            self.0.request.update_mask = v.map(|x| x.into());
6540            self
6541        }
6542    }
6543
6544    #[doc(hidden)]
6545    impl crate::RequestBuilder for UpdateEncryptionConfig {
6546        fn request_options(&mut self) -> &mut crate::RequestOptions {
6547            &mut self.0.options
6548        }
6549    }
6550
6551    /// The request builder for [CmekService::delete_encryption_config][crate::client::CmekService::delete_encryption_config] calls.
6552    ///
6553    /// # Example
6554    /// ```
6555    /// # use google_cloud_dataplex_v1::builder::cmek_service::DeleteEncryptionConfig;
6556    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6557    /// use google_cloud_lro::Poller;
6558    ///
6559    /// let builder = prepare_request_builder();
6560    /// let response = builder.poller().until_done().await?;
6561    /// # Ok(()) }
6562    ///
6563    /// fn prepare_request_builder() -> DeleteEncryptionConfig {
6564    ///   # panic!();
6565    ///   // ... details omitted ...
6566    /// }
6567    /// ```
6568    #[derive(Clone, Debug)]
6569    pub struct DeleteEncryptionConfig(RequestBuilder<crate::model::DeleteEncryptionConfigRequest>);
6570
6571    impl DeleteEncryptionConfig {
6572        pub(crate) fn new(
6573            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6574        ) -> Self {
6575            Self(RequestBuilder::new(stub))
6576        }
6577
6578        /// Sets the full request, replacing any prior values.
6579        pub fn with_request<V: Into<crate::model::DeleteEncryptionConfigRequest>>(
6580            mut self,
6581            v: V,
6582        ) -> Self {
6583            self.0.request = v.into();
6584            self
6585        }
6586
6587        /// Sets all the options, replacing any prior values.
6588        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6589            self.0.options = v.into();
6590            self
6591        }
6592
6593        /// Sends the request.
6594        ///
6595        /// # Long running operations
6596        ///
6597        /// This starts, but does not poll, a longrunning operation. More information
6598        /// on [delete_encryption_config][crate::client::CmekService::delete_encryption_config].
6599        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6600            (*self.0.stub)
6601                .delete_encryption_config(self.0.request, self.0.options)
6602                .await
6603                .map(crate::Response::into_body)
6604        }
6605
6606        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_encryption_config`.
6607        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6608            type Operation =
6609                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6610            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6611            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6612
6613            let stub = self.0.stub.clone();
6614            let mut options = self.0.options.clone();
6615            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6616            let query = move |name| {
6617                let stub = stub.clone();
6618                let options = options.clone();
6619                async {
6620                    let op = GetOperation::new(stub)
6621                        .set_name(name)
6622                        .with_options(options)
6623                        .send()
6624                        .await?;
6625                    Ok(Operation::new(op))
6626                }
6627            };
6628
6629            let start = move || async {
6630                let op = self.send().await?;
6631                Ok(Operation::new(op))
6632            };
6633
6634            google_cloud_lro::internal::new_unit_response_poller(
6635                polling_error_policy,
6636                polling_backoff_policy,
6637                start,
6638                query,
6639            )
6640        }
6641
6642        /// Sets the value of [name][crate::model::DeleteEncryptionConfigRequest::name].
6643        ///
6644        /// This is a **required** field for requests.
6645        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6646            self.0.request.name = v.into();
6647            self
6648        }
6649
6650        /// Sets the value of [etag][crate::model::DeleteEncryptionConfigRequest::etag].
6651        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
6652            self.0.request.etag = v.into();
6653            self
6654        }
6655    }
6656
6657    #[doc(hidden)]
6658    impl crate::RequestBuilder for DeleteEncryptionConfig {
6659        fn request_options(&mut self) -> &mut crate::RequestOptions {
6660            &mut self.0.options
6661        }
6662    }
6663
6664    /// The request builder for [CmekService::list_encryption_configs][crate::client::CmekService::list_encryption_configs] calls.
6665    ///
6666    /// # Example
6667    /// ```
6668    /// # use google_cloud_dataplex_v1::builder::cmek_service::ListEncryptionConfigs;
6669    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6670    /// use google_cloud_gax::paginator::ItemPaginator;
6671    ///
6672    /// let builder = prepare_request_builder();
6673    /// let mut items = builder.by_item();
6674    /// while let Some(result) = items.next().await {
6675    ///   let item = result?;
6676    /// }
6677    /// # Ok(()) }
6678    ///
6679    /// fn prepare_request_builder() -> ListEncryptionConfigs {
6680    ///   # panic!();
6681    ///   // ... details omitted ...
6682    /// }
6683    /// ```
6684    #[derive(Clone, Debug)]
6685    pub struct ListEncryptionConfigs(RequestBuilder<crate::model::ListEncryptionConfigsRequest>);
6686
6687    impl ListEncryptionConfigs {
6688        pub(crate) fn new(
6689            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6690        ) -> Self {
6691            Self(RequestBuilder::new(stub))
6692        }
6693
6694        /// Sets the full request, replacing any prior values.
6695        pub fn with_request<V: Into<crate::model::ListEncryptionConfigsRequest>>(
6696            mut self,
6697            v: V,
6698        ) -> Self {
6699            self.0.request = v.into();
6700            self
6701        }
6702
6703        /// Sets all the options, replacing any prior values.
6704        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6705            self.0.options = v.into();
6706            self
6707        }
6708
6709        /// Sends the request.
6710        pub async fn send(self) -> Result<crate::model::ListEncryptionConfigsResponse> {
6711            (*self.0.stub)
6712                .list_encryption_configs(self.0.request, self.0.options)
6713                .await
6714                .map(crate::Response::into_body)
6715        }
6716
6717        /// Streams each page in the collection.
6718        pub fn by_page(
6719            self,
6720        ) -> impl google_cloud_gax::paginator::Paginator<
6721            crate::model::ListEncryptionConfigsResponse,
6722            crate::Error,
6723        > {
6724            use std::clone::Clone;
6725            let token = self.0.request.page_token.clone();
6726            let execute = move |token: String| {
6727                let mut builder = self.clone();
6728                builder.0.request = builder.0.request.set_page_token(token);
6729                builder.send()
6730            };
6731            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6732        }
6733
6734        /// Streams each item in the collection.
6735        pub fn by_item(
6736            self,
6737        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6738            crate::model::ListEncryptionConfigsResponse,
6739            crate::Error,
6740        > {
6741            use google_cloud_gax::paginator::Paginator;
6742            self.by_page().items()
6743        }
6744
6745        /// Sets the value of [parent][crate::model::ListEncryptionConfigsRequest::parent].
6746        ///
6747        /// This is a **required** field for requests.
6748        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6749            self.0.request.parent = v.into();
6750            self
6751        }
6752
6753        /// Sets the value of [page_size][crate::model::ListEncryptionConfigsRequest::page_size].
6754        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6755            self.0.request.page_size = v.into();
6756            self
6757        }
6758
6759        /// Sets the value of [page_token][crate::model::ListEncryptionConfigsRequest::page_token].
6760        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6761            self.0.request.page_token = v.into();
6762            self
6763        }
6764
6765        /// Sets the value of [filter][crate::model::ListEncryptionConfigsRequest::filter].
6766        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6767            self.0.request.filter = v.into();
6768            self
6769        }
6770
6771        /// Sets the value of [order_by][crate::model::ListEncryptionConfigsRequest::order_by].
6772        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6773            self.0.request.order_by = v.into();
6774            self
6775        }
6776    }
6777
6778    #[doc(hidden)]
6779    impl crate::RequestBuilder for ListEncryptionConfigs {
6780        fn request_options(&mut self) -> &mut crate::RequestOptions {
6781            &mut self.0.options
6782        }
6783    }
6784
6785    /// The request builder for [CmekService::get_encryption_config][crate::client::CmekService::get_encryption_config] calls.
6786    ///
6787    /// # Example
6788    /// ```
6789    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetEncryptionConfig;
6790    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6791    ///
6792    /// let builder = prepare_request_builder();
6793    /// let response = builder.send().await?;
6794    /// # Ok(()) }
6795    ///
6796    /// fn prepare_request_builder() -> GetEncryptionConfig {
6797    ///   # panic!();
6798    ///   // ... details omitted ...
6799    /// }
6800    /// ```
6801    #[derive(Clone, Debug)]
6802    pub struct GetEncryptionConfig(RequestBuilder<crate::model::GetEncryptionConfigRequest>);
6803
6804    impl GetEncryptionConfig {
6805        pub(crate) fn new(
6806            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6807        ) -> Self {
6808            Self(RequestBuilder::new(stub))
6809        }
6810
6811        /// Sets the full request, replacing any prior values.
6812        pub fn with_request<V: Into<crate::model::GetEncryptionConfigRequest>>(
6813            mut self,
6814            v: V,
6815        ) -> Self {
6816            self.0.request = v.into();
6817            self
6818        }
6819
6820        /// Sets all the options, replacing any prior values.
6821        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6822            self.0.options = v.into();
6823            self
6824        }
6825
6826        /// Sends the request.
6827        pub async fn send(self) -> Result<crate::model::EncryptionConfig> {
6828            (*self.0.stub)
6829                .get_encryption_config(self.0.request, self.0.options)
6830                .await
6831                .map(crate::Response::into_body)
6832        }
6833
6834        /// Sets the value of [name][crate::model::GetEncryptionConfigRequest::name].
6835        ///
6836        /// This is a **required** field for requests.
6837        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6838            self.0.request.name = v.into();
6839            self
6840        }
6841    }
6842
6843    #[doc(hidden)]
6844    impl crate::RequestBuilder for GetEncryptionConfig {
6845        fn request_options(&mut self) -> &mut crate::RequestOptions {
6846            &mut self.0.options
6847        }
6848    }
6849
6850    /// The request builder for [CmekService::list_locations][crate::client::CmekService::list_locations] calls.
6851    ///
6852    /// # Example
6853    /// ```
6854    /// # use google_cloud_dataplex_v1::builder::cmek_service::ListLocations;
6855    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6856    /// use google_cloud_gax::paginator::ItemPaginator;
6857    ///
6858    /// let builder = prepare_request_builder();
6859    /// let mut items = builder.by_item();
6860    /// while let Some(result) = items.next().await {
6861    ///   let item = result?;
6862    /// }
6863    /// # Ok(()) }
6864    ///
6865    /// fn prepare_request_builder() -> ListLocations {
6866    ///   # panic!();
6867    ///   // ... details omitted ...
6868    /// }
6869    /// ```
6870    #[derive(Clone, Debug)]
6871    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
6872
6873    impl ListLocations {
6874        pub(crate) fn new(
6875            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6876        ) -> Self {
6877            Self(RequestBuilder::new(stub))
6878        }
6879
6880        /// Sets the full request, replacing any prior values.
6881        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
6882            mut self,
6883            v: V,
6884        ) -> Self {
6885            self.0.request = v.into();
6886            self
6887        }
6888
6889        /// Sets all the options, replacing any prior values.
6890        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6891            self.0.options = v.into();
6892            self
6893        }
6894
6895        /// Sends the request.
6896        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
6897            (*self.0.stub)
6898                .list_locations(self.0.request, self.0.options)
6899                .await
6900                .map(crate::Response::into_body)
6901        }
6902
6903        /// Streams each page in the collection.
6904        pub fn by_page(
6905            self,
6906        ) -> impl google_cloud_gax::paginator::Paginator<
6907            google_cloud_location::model::ListLocationsResponse,
6908            crate::Error,
6909        > {
6910            use std::clone::Clone;
6911            let token = self.0.request.page_token.clone();
6912            let execute = move |token: String| {
6913                let mut builder = self.clone();
6914                builder.0.request = builder.0.request.set_page_token(token);
6915                builder.send()
6916            };
6917            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6918        }
6919
6920        /// Streams each item in the collection.
6921        pub fn by_item(
6922            self,
6923        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6924            google_cloud_location::model::ListLocationsResponse,
6925            crate::Error,
6926        > {
6927            use google_cloud_gax::paginator::Paginator;
6928            self.by_page().items()
6929        }
6930
6931        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
6932        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6933            self.0.request.name = v.into();
6934            self
6935        }
6936
6937        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
6938        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6939            self.0.request.filter = v.into();
6940            self
6941        }
6942
6943        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
6944        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6945            self.0.request.page_size = v.into();
6946            self
6947        }
6948
6949        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
6950        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6951            self.0.request.page_token = v.into();
6952            self
6953        }
6954    }
6955
6956    #[doc(hidden)]
6957    impl crate::RequestBuilder for ListLocations {
6958        fn request_options(&mut self) -> &mut crate::RequestOptions {
6959            &mut self.0.options
6960        }
6961    }
6962
6963    /// The request builder for [CmekService::get_location][crate::client::CmekService::get_location] calls.
6964    ///
6965    /// # Example
6966    /// ```
6967    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetLocation;
6968    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6969    ///
6970    /// let builder = prepare_request_builder();
6971    /// let response = builder.send().await?;
6972    /// # Ok(()) }
6973    ///
6974    /// fn prepare_request_builder() -> GetLocation {
6975    ///   # panic!();
6976    ///   // ... details omitted ...
6977    /// }
6978    /// ```
6979    #[derive(Clone, Debug)]
6980    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
6981
6982    impl GetLocation {
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<google_cloud_location::model::GetLocationRequest>>(
6991            mut self,
6992            v: V,
6993        ) -> Self {
6994            self.0.request = v.into();
6995            self
6996        }
6997
6998        /// Sets all the options, replacing any prior values.
6999        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7000            self.0.options = v.into();
7001            self
7002        }
7003
7004        /// Sends the request.
7005        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
7006            (*self.0.stub)
7007                .get_location(self.0.request, self.0.options)
7008                .await
7009                .map(crate::Response::into_body)
7010        }
7011
7012        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
7013        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7014            self.0.request.name = v.into();
7015            self
7016        }
7017    }
7018
7019    #[doc(hidden)]
7020    impl crate::RequestBuilder for GetLocation {
7021        fn request_options(&mut self) -> &mut crate::RequestOptions {
7022            &mut self.0.options
7023        }
7024    }
7025
7026    /// The request builder for [CmekService::set_iam_policy][crate::client::CmekService::set_iam_policy] calls.
7027    ///
7028    /// # Example
7029    /// ```
7030    /// # use google_cloud_dataplex_v1::builder::cmek_service::SetIamPolicy;
7031    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7032    ///
7033    /// let builder = prepare_request_builder();
7034    /// let response = builder.send().await?;
7035    /// # Ok(()) }
7036    ///
7037    /// fn prepare_request_builder() -> SetIamPolicy {
7038    ///   # panic!();
7039    ///   // ... details omitted ...
7040    /// }
7041    /// ```
7042    #[derive(Clone, Debug)]
7043    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
7044
7045    impl SetIamPolicy {
7046        pub(crate) fn new(
7047            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7048        ) -> Self {
7049            Self(RequestBuilder::new(stub))
7050        }
7051
7052        /// Sets the full request, replacing any prior values.
7053        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
7054            mut self,
7055            v: V,
7056        ) -> Self {
7057            self.0.request = v.into();
7058            self
7059        }
7060
7061        /// Sets all the options, replacing any prior values.
7062        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7063            self.0.options = v.into();
7064            self
7065        }
7066
7067        /// Sends the request.
7068        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
7069            (*self.0.stub)
7070                .set_iam_policy(self.0.request, self.0.options)
7071                .await
7072                .map(crate::Response::into_body)
7073        }
7074
7075        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
7076        ///
7077        /// This is a **required** field for requests.
7078        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7079            self.0.request.resource = v.into();
7080            self
7081        }
7082
7083        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
7084        ///
7085        /// This is a **required** field for requests.
7086        pub fn set_policy<T>(mut self, v: T) -> Self
7087        where
7088            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
7089        {
7090            self.0.request.policy = std::option::Option::Some(v.into());
7091            self
7092        }
7093
7094        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
7095        ///
7096        /// This is a **required** field for requests.
7097        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
7098        where
7099            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
7100        {
7101            self.0.request.policy = v.map(|x| x.into());
7102            self
7103        }
7104
7105        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
7106        pub fn set_update_mask<T>(mut self, v: T) -> Self
7107        where
7108            T: std::convert::Into<wkt::FieldMask>,
7109        {
7110            self.0.request.update_mask = std::option::Option::Some(v.into());
7111            self
7112        }
7113
7114        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
7115        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7116        where
7117            T: std::convert::Into<wkt::FieldMask>,
7118        {
7119            self.0.request.update_mask = v.map(|x| x.into());
7120            self
7121        }
7122    }
7123
7124    #[doc(hidden)]
7125    impl crate::RequestBuilder for SetIamPolicy {
7126        fn request_options(&mut self) -> &mut crate::RequestOptions {
7127            &mut self.0.options
7128        }
7129    }
7130
7131    /// The request builder for [CmekService::get_iam_policy][crate::client::CmekService::get_iam_policy] calls.
7132    ///
7133    /// # Example
7134    /// ```
7135    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetIamPolicy;
7136    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7137    ///
7138    /// let builder = prepare_request_builder();
7139    /// let response = builder.send().await?;
7140    /// # Ok(()) }
7141    ///
7142    /// fn prepare_request_builder() -> GetIamPolicy {
7143    ///   # panic!();
7144    ///   // ... details omitted ...
7145    /// }
7146    /// ```
7147    #[derive(Clone, Debug)]
7148    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
7149
7150    impl GetIamPolicy {
7151        pub(crate) fn new(
7152            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7153        ) -> Self {
7154            Self(RequestBuilder::new(stub))
7155        }
7156
7157        /// Sets the full request, replacing any prior values.
7158        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
7159            mut self,
7160            v: V,
7161        ) -> Self {
7162            self.0.request = v.into();
7163            self
7164        }
7165
7166        /// Sets all the options, replacing any prior values.
7167        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7168            self.0.options = v.into();
7169            self
7170        }
7171
7172        /// Sends the request.
7173        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
7174            (*self.0.stub)
7175                .get_iam_policy(self.0.request, self.0.options)
7176                .await
7177                .map(crate::Response::into_body)
7178        }
7179
7180        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
7181        ///
7182        /// This is a **required** field for requests.
7183        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7184            self.0.request.resource = v.into();
7185            self
7186        }
7187
7188        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
7189        pub fn set_options<T>(mut self, v: T) -> Self
7190        where
7191            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
7192        {
7193            self.0.request.options = std::option::Option::Some(v.into());
7194            self
7195        }
7196
7197        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
7198        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
7199        where
7200            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
7201        {
7202            self.0.request.options = v.map(|x| x.into());
7203            self
7204        }
7205    }
7206
7207    #[doc(hidden)]
7208    impl crate::RequestBuilder for GetIamPolicy {
7209        fn request_options(&mut self) -> &mut crate::RequestOptions {
7210            &mut self.0.options
7211        }
7212    }
7213
7214    /// The request builder for [CmekService::test_iam_permissions][crate::client::CmekService::test_iam_permissions] calls.
7215    ///
7216    /// # Example
7217    /// ```
7218    /// # use google_cloud_dataplex_v1::builder::cmek_service::TestIamPermissions;
7219    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7220    ///
7221    /// let builder = prepare_request_builder();
7222    /// let response = builder.send().await?;
7223    /// # Ok(()) }
7224    ///
7225    /// fn prepare_request_builder() -> TestIamPermissions {
7226    ///   # panic!();
7227    ///   // ... details omitted ...
7228    /// }
7229    /// ```
7230    #[derive(Clone, Debug)]
7231    pub struct TestIamPermissions(
7232        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
7233    );
7234
7235    impl TestIamPermissions {
7236        pub(crate) fn new(
7237            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7238        ) -> Self {
7239            Self(RequestBuilder::new(stub))
7240        }
7241
7242        /// Sets the full request, replacing any prior values.
7243        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
7244            mut self,
7245            v: V,
7246        ) -> Self {
7247            self.0.request = v.into();
7248            self
7249        }
7250
7251        /// Sets all the options, replacing any prior values.
7252        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7253            self.0.options = v.into();
7254            self
7255        }
7256
7257        /// Sends the request.
7258        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
7259            (*self.0.stub)
7260                .test_iam_permissions(self.0.request, self.0.options)
7261                .await
7262                .map(crate::Response::into_body)
7263        }
7264
7265        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
7266        ///
7267        /// This is a **required** field for requests.
7268        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7269            self.0.request.resource = v.into();
7270            self
7271        }
7272
7273        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
7274        ///
7275        /// This is a **required** field for requests.
7276        pub fn set_permissions<T, V>(mut self, v: T) -> Self
7277        where
7278            T: std::iter::IntoIterator<Item = V>,
7279            V: std::convert::Into<std::string::String>,
7280        {
7281            use std::iter::Iterator;
7282            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
7283            self
7284        }
7285    }
7286
7287    #[doc(hidden)]
7288    impl crate::RequestBuilder for TestIamPermissions {
7289        fn request_options(&mut self) -> &mut crate::RequestOptions {
7290            &mut self.0.options
7291        }
7292    }
7293
7294    /// The request builder for [CmekService::list_operations][crate::client::CmekService::list_operations] calls.
7295    ///
7296    /// # Example
7297    /// ```
7298    /// # use google_cloud_dataplex_v1::builder::cmek_service::ListOperations;
7299    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7300    /// use google_cloud_gax::paginator::ItemPaginator;
7301    ///
7302    /// let builder = prepare_request_builder();
7303    /// let mut items = builder.by_item();
7304    /// while let Some(result) = items.next().await {
7305    ///   let item = result?;
7306    /// }
7307    /// # Ok(()) }
7308    ///
7309    /// fn prepare_request_builder() -> ListOperations {
7310    ///   # panic!();
7311    ///   // ... details omitted ...
7312    /// }
7313    /// ```
7314    #[derive(Clone, Debug)]
7315    pub struct ListOperations(
7316        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
7317    );
7318
7319    impl ListOperations {
7320        pub(crate) fn new(
7321            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7322        ) -> Self {
7323            Self(RequestBuilder::new(stub))
7324        }
7325
7326        /// Sets the full request, replacing any prior values.
7327        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
7328            mut self,
7329            v: V,
7330        ) -> Self {
7331            self.0.request = v.into();
7332            self
7333        }
7334
7335        /// Sets all the options, replacing any prior values.
7336        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7337            self.0.options = v.into();
7338            self
7339        }
7340
7341        /// Sends the request.
7342        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
7343            (*self.0.stub)
7344                .list_operations(self.0.request, self.0.options)
7345                .await
7346                .map(crate::Response::into_body)
7347        }
7348
7349        /// Streams each page in the collection.
7350        pub fn by_page(
7351            self,
7352        ) -> impl google_cloud_gax::paginator::Paginator<
7353            google_cloud_longrunning::model::ListOperationsResponse,
7354            crate::Error,
7355        > {
7356            use std::clone::Clone;
7357            let token = self.0.request.page_token.clone();
7358            let execute = move |token: String| {
7359                let mut builder = self.clone();
7360                builder.0.request = builder.0.request.set_page_token(token);
7361                builder.send()
7362            };
7363            google_cloud_gax::paginator::internal::new_paginator(token, execute)
7364        }
7365
7366        /// Streams each item in the collection.
7367        pub fn by_item(
7368            self,
7369        ) -> impl google_cloud_gax::paginator::ItemPaginator<
7370            google_cloud_longrunning::model::ListOperationsResponse,
7371            crate::Error,
7372        > {
7373            use google_cloud_gax::paginator::Paginator;
7374            self.by_page().items()
7375        }
7376
7377        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
7378        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7379            self.0.request.name = v.into();
7380            self
7381        }
7382
7383        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
7384        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7385            self.0.request.filter = v.into();
7386            self
7387        }
7388
7389        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
7390        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7391            self.0.request.page_size = v.into();
7392            self
7393        }
7394
7395        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
7396        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7397            self.0.request.page_token = v.into();
7398            self
7399        }
7400
7401        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
7402        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
7403            self.0.request.return_partial_success = v.into();
7404            self
7405        }
7406    }
7407
7408    #[doc(hidden)]
7409    impl crate::RequestBuilder for ListOperations {
7410        fn request_options(&mut self) -> &mut crate::RequestOptions {
7411            &mut self.0.options
7412        }
7413    }
7414
7415    /// The request builder for [CmekService::get_operation][crate::client::CmekService::get_operation] calls.
7416    ///
7417    /// # Example
7418    /// ```
7419    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetOperation;
7420    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7421    ///
7422    /// let builder = prepare_request_builder();
7423    /// let response = builder.send().await?;
7424    /// # Ok(()) }
7425    ///
7426    /// fn prepare_request_builder() -> GetOperation {
7427    ///   # panic!();
7428    ///   // ... details omitted ...
7429    /// }
7430    /// ```
7431    #[derive(Clone, Debug)]
7432    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
7433
7434    impl GetOperation {
7435        pub(crate) fn new(
7436            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7437        ) -> Self {
7438            Self(RequestBuilder::new(stub))
7439        }
7440
7441        /// Sets the full request, replacing any prior values.
7442        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
7443            mut self,
7444            v: V,
7445        ) -> Self {
7446            self.0.request = v.into();
7447            self
7448        }
7449
7450        /// Sets all the options, replacing any prior values.
7451        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7452            self.0.options = v.into();
7453            self
7454        }
7455
7456        /// Sends the request.
7457        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7458            (*self.0.stub)
7459                .get_operation(self.0.request, self.0.options)
7460                .await
7461                .map(crate::Response::into_body)
7462        }
7463
7464        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
7465        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7466            self.0.request.name = v.into();
7467            self
7468        }
7469    }
7470
7471    #[doc(hidden)]
7472    impl crate::RequestBuilder for GetOperation {
7473        fn request_options(&mut self) -> &mut crate::RequestOptions {
7474            &mut self.0.options
7475        }
7476    }
7477
7478    /// The request builder for [CmekService::delete_operation][crate::client::CmekService::delete_operation] calls.
7479    ///
7480    /// # Example
7481    /// ```
7482    /// # use google_cloud_dataplex_v1::builder::cmek_service::DeleteOperation;
7483    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7484    ///
7485    /// let builder = prepare_request_builder();
7486    /// let response = builder.send().await?;
7487    /// # Ok(()) }
7488    ///
7489    /// fn prepare_request_builder() -> DeleteOperation {
7490    ///   # panic!();
7491    ///   // ... details omitted ...
7492    /// }
7493    /// ```
7494    #[derive(Clone, Debug)]
7495    pub struct DeleteOperation(
7496        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
7497    );
7498
7499    impl DeleteOperation {
7500        pub(crate) fn new(
7501            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7502        ) -> Self {
7503            Self(RequestBuilder::new(stub))
7504        }
7505
7506        /// Sets the full request, replacing any prior values.
7507        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
7508            mut self,
7509            v: V,
7510        ) -> Self {
7511            self.0.request = v.into();
7512            self
7513        }
7514
7515        /// Sets all the options, replacing any prior values.
7516        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7517            self.0.options = v.into();
7518            self
7519        }
7520
7521        /// Sends the request.
7522        pub async fn send(self) -> Result<()> {
7523            (*self.0.stub)
7524                .delete_operation(self.0.request, self.0.options)
7525                .await
7526                .map(crate::Response::into_body)
7527        }
7528
7529        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
7530        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7531            self.0.request.name = v.into();
7532            self
7533        }
7534    }
7535
7536    #[doc(hidden)]
7537    impl crate::RequestBuilder for DeleteOperation {
7538        fn request_options(&mut self) -> &mut crate::RequestOptions {
7539            &mut self.0.options
7540        }
7541    }
7542
7543    /// The request builder for [CmekService::cancel_operation][crate::client::CmekService::cancel_operation] calls.
7544    ///
7545    /// # Example
7546    /// ```
7547    /// # use google_cloud_dataplex_v1::builder::cmek_service::CancelOperation;
7548    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7549    ///
7550    /// let builder = prepare_request_builder();
7551    /// let response = builder.send().await?;
7552    /// # Ok(()) }
7553    ///
7554    /// fn prepare_request_builder() -> CancelOperation {
7555    ///   # panic!();
7556    ///   // ... details omitted ...
7557    /// }
7558    /// ```
7559    #[derive(Clone, Debug)]
7560    pub struct CancelOperation(
7561        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
7562    );
7563
7564    impl CancelOperation {
7565        pub(crate) fn new(
7566            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7567        ) -> Self {
7568            Self(RequestBuilder::new(stub))
7569        }
7570
7571        /// Sets the full request, replacing any prior values.
7572        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
7573            mut self,
7574            v: V,
7575        ) -> Self {
7576            self.0.request = v.into();
7577            self
7578        }
7579
7580        /// Sets all the options, replacing any prior values.
7581        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7582            self.0.options = v.into();
7583            self
7584        }
7585
7586        /// Sends the request.
7587        pub async fn send(self) -> Result<()> {
7588            (*self.0.stub)
7589                .cancel_operation(self.0.request, self.0.options)
7590                .await
7591                .map(crate::Response::into_body)
7592        }
7593
7594        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
7595        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7596            self.0.request.name = v.into();
7597            self
7598        }
7599    }
7600
7601    #[doc(hidden)]
7602    impl crate::RequestBuilder for CancelOperation {
7603        fn request_options(&mut self) -> &mut crate::RequestOptions {
7604            &mut self.0.options
7605        }
7606    }
7607}
7608
7609pub mod content_service {
7610    use crate::Result;
7611
7612    /// A builder for [ContentService][crate::client::ContentService].
7613    ///
7614    /// ```
7615    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
7616    /// # use google_cloud_dataplex_v1::*;
7617    /// # use builder::content_service::ClientBuilder;
7618    /// # use client::ContentService;
7619    /// let builder : ClientBuilder = ContentService::builder();
7620    /// let client = builder
7621    ///     .with_endpoint("https://dataplex.googleapis.com")
7622    ///     .build().await?;
7623    /// # Ok(()) }
7624    /// ```
7625    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
7626
7627    pub(crate) mod client {
7628        use super::super::super::client::ContentService;
7629        pub struct Factory;
7630        impl crate::ClientFactory for Factory {
7631            type Client = ContentService;
7632            type Credentials = gaxi::options::Credentials;
7633            async fn build(
7634                self,
7635                config: gaxi::options::ClientConfig,
7636            ) -> crate::ClientBuilderResult<Self::Client> {
7637                Self::Client::new(config).await
7638            }
7639        }
7640    }
7641
7642    /// Common implementation for [crate::client::ContentService] request builders.
7643    #[derive(Clone, Debug)]
7644    pub(crate) struct RequestBuilder<R: std::default::Default> {
7645        stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7646        request: R,
7647        options: crate::RequestOptions,
7648    }
7649
7650    impl<R> RequestBuilder<R>
7651    where
7652        R: std::default::Default,
7653    {
7654        pub(crate) fn new(
7655            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7656        ) -> Self {
7657            Self {
7658                stub,
7659                request: R::default(),
7660                options: crate::RequestOptions::default(),
7661            }
7662        }
7663    }
7664
7665    /// The request builder for [ContentService::create_content][crate::client::ContentService::create_content] calls.
7666    ///
7667    /// # Example
7668    /// ```
7669    /// # use google_cloud_dataplex_v1::builder::content_service::CreateContent;
7670    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7671    ///
7672    /// let builder = prepare_request_builder();
7673    /// let response = builder.send().await?;
7674    /// # Ok(()) }
7675    ///
7676    /// fn prepare_request_builder() -> CreateContent {
7677    ///   # panic!();
7678    ///   // ... details omitted ...
7679    /// }
7680    /// ```
7681    #[derive(Clone, Debug)]
7682    pub struct CreateContent(RequestBuilder<crate::model::CreateContentRequest>);
7683
7684    impl CreateContent {
7685        pub(crate) fn new(
7686            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7687        ) -> Self {
7688            Self(RequestBuilder::new(stub))
7689        }
7690
7691        /// Sets the full request, replacing any prior values.
7692        pub fn with_request<V: Into<crate::model::CreateContentRequest>>(mut self, v: V) -> Self {
7693            self.0.request = v.into();
7694            self
7695        }
7696
7697        /// Sets all the options, replacing any prior values.
7698        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7699            self.0.options = v.into();
7700            self
7701        }
7702
7703        /// Sends the request.
7704        pub async fn send(self) -> Result<crate::model::Content> {
7705            (*self.0.stub)
7706                .create_content(self.0.request, self.0.options)
7707                .await
7708                .map(crate::Response::into_body)
7709        }
7710
7711        /// Sets the value of [parent][crate::model::CreateContentRequest::parent].
7712        ///
7713        /// This is a **required** field for requests.
7714        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7715            self.0.request.parent = v.into();
7716            self
7717        }
7718
7719        /// Sets the value of [content][crate::model::CreateContentRequest::content].
7720        ///
7721        /// This is a **required** field for requests.
7722        pub fn set_content<T>(mut self, v: T) -> Self
7723        where
7724            T: std::convert::Into<crate::model::Content>,
7725        {
7726            self.0.request.content = std::option::Option::Some(v.into());
7727            self
7728        }
7729
7730        /// Sets or clears the value of [content][crate::model::CreateContentRequest::content].
7731        ///
7732        /// This is a **required** field for requests.
7733        pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
7734        where
7735            T: std::convert::Into<crate::model::Content>,
7736        {
7737            self.0.request.content = v.map(|x| x.into());
7738            self
7739        }
7740
7741        /// Sets the value of [validate_only][crate::model::CreateContentRequest::validate_only].
7742        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
7743            self.0.request.validate_only = v.into();
7744            self
7745        }
7746    }
7747
7748    #[doc(hidden)]
7749    impl crate::RequestBuilder for CreateContent {
7750        fn request_options(&mut self) -> &mut crate::RequestOptions {
7751            &mut self.0.options
7752        }
7753    }
7754
7755    /// The request builder for [ContentService::update_content][crate::client::ContentService::update_content] calls.
7756    ///
7757    /// # Example
7758    /// ```
7759    /// # use google_cloud_dataplex_v1::builder::content_service::UpdateContent;
7760    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7761    ///
7762    /// let builder = prepare_request_builder();
7763    /// let response = builder.send().await?;
7764    /// # Ok(()) }
7765    ///
7766    /// fn prepare_request_builder() -> UpdateContent {
7767    ///   # panic!();
7768    ///   // ... details omitted ...
7769    /// }
7770    /// ```
7771    #[derive(Clone, Debug)]
7772    pub struct UpdateContent(RequestBuilder<crate::model::UpdateContentRequest>);
7773
7774    impl UpdateContent {
7775        pub(crate) fn new(
7776            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7777        ) -> Self {
7778            Self(RequestBuilder::new(stub))
7779        }
7780
7781        /// Sets the full request, replacing any prior values.
7782        pub fn with_request<V: Into<crate::model::UpdateContentRequest>>(mut self, v: V) -> Self {
7783            self.0.request = v.into();
7784            self
7785        }
7786
7787        /// Sets all the options, replacing any prior values.
7788        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7789            self.0.options = v.into();
7790            self
7791        }
7792
7793        /// Sends the request.
7794        pub async fn send(self) -> Result<crate::model::Content> {
7795            (*self.0.stub)
7796                .update_content(self.0.request, self.0.options)
7797                .await
7798                .map(crate::Response::into_body)
7799        }
7800
7801        /// Sets the value of [update_mask][crate::model::UpdateContentRequest::update_mask].
7802        ///
7803        /// This is a **required** field for requests.
7804        pub fn set_update_mask<T>(mut self, v: T) -> Self
7805        where
7806            T: std::convert::Into<wkt::FieldMask>,
7807        {
7808            self.0.request.update_mask = std::option::Option::Some(v.into());
7809            self
7810        }
7811
7812        /// Sets or clears the value of [update_mask][crate::model::UpdateContentRequest::update_mask].
7813        ///
7814        /// This is a **required** field for requests.
7815        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7816        where
7817            T: std::convert::Into<wkt::FieldMask>,
7818        {
7819            self.0.request.update_mask = v.map(|x| x.into());
7820            self
7821        }
7822
7823        /// Sets the value of [content][crate::model::UpdateContentRequest::content].
7824        ///
7825        /// This is a **required** field for requests.
7826        pub fn set_content<T>(mut self, v: T) -> Self
7827        where
7828            T: std::convert::Into<crate::model::Content>,
7829        {
7830            self.0.request.content = std::option::Option::Some(v.into());
7831            self
7832        }
7833
7834        /// Sets or clears the value of [content][crate::model::UpdateContentRequest::content].
7835        ///
7836        /// This is a **required** field for requests.
7837        pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
7838        where
7839            T: std::convert::Into<crate::model::Content>,
7840        {
7841            self.0.request.content = v.map(|x| x.into());
7842            self
7843        }
7844
7845        /// Sets the value of [validate_only][crate::model::UpdateContentRequest::validate_only].
7846        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
7847            self.0.request.validate_only = v.into();
7848            self
7849        }
7850    }
7851
7852    #[doc(hidden)]
7853    impl crate::RequestBuilder for UpdateContent {
7854        fn request_options(&mut self) -> &mut crate::RequestOptions {
7855            &mut self.0.options
7856        }
7857    }
7858
7859    /// The request builder for [ContentService::delete_content][crate::client::ContentService::delete_content] calls.
7860    ///
7861    /// # Example
7862    /// ```
7863    /// # use google_cloud_dataplex_v1::builder::content_service::DeleteContent;
7864    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7865    ///
7866    /// let builder = prepare_request_builder();
7867    /// let response = builder.send().await?;
7868    /// # Ok(()) }
7869    ///
7870    /// fn prepare_request_builder() -> DeleteContent {
7871    ///   # panic!();
7872    ///   // ... details omitted ...
7873    /// }
7874    /// ```
7875    #[derive(Clone, Debug)]
7876    pub struct DeleteContent(RequestBuilder<crate::model::DeleteContentRequest>);
7877
7878    impl DeleteContent {
7879        pub(crate) fn new(
7880            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7881        ) -> Self {
7882            Self(RequestBuilder::new(stub))
7883        }
7884
7885        /// Sets the full request, replacing any prior values.
7886        pub fn with_request<V: Into<crate::model::DeleteContentRequest>>(mut self, v: V) -> Self {
7887            self.0.request = v.into();
7888            self
7889        }
7890
7891        /// Sets all the options, replacing any prior values.
7892        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7893            self.0.options = v.into();
7894            self
7895        }
7896
7897        /// Sends the request.
7898        pub async fn send(self) -> Result<()> {
7899            (*self.0.stub)
7900                .delete_content(self.0.request, self.0.options)
7901                .await
7902                .map(crate::Response::into_body)
7903        }
7904
7905        /// Sets the value of [name][crate::model::DeleteContentRequest::name].
7906        ///
7907        /// This is a **required** field for requests.
7908        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7909            self.0.request.name = v.into();
7910            self
7911        }
7912    }
7913
7914    #[doc(hidden)]
7915    impl crate::RequestBuilder for DeleteContent {
7916        fn request_options(&mut self) -> &mut crate::RequestOptions {
7917            &mut self.0.options
7918        }
7919    }
7920
7921    /// The request builder for [ContentService::get_content][crate::client::ContentService::get_content] calls.
7922    ///
7923    /// # Example
7924    /// ```
7925    /// # use google_cloud_dataplex_v1::builder::content_service::GetContent;
7926    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7927    ///
7928    /// let builder = prepare_request_builder();
7929    /// let response = builder.send().await?;
7930    /// # Ok(()) }
7931    ///
7932    /// fn prepare_request_builder() -> GetContent {
7933    ///   # panic!();
7934    ///   // ... details omitted ...
7935    /// }
7936    /// ```
7937    #[derive(Clone, Debug)]
7938    pub struct GetContent(RequestBuilder<crate::model::GetContentRequest>);
7939
7940    impl GetContent {
7941        pub(crate) fn new(
7942            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7943        ) -> Self {
7944            Self(RequestBuilder::new(stub))
7945        }
7946
7947        /// Sets the full request, replacing any prior values.
7948        pub fn with_request<V: Into<crate::model::GetContentRequest>>(mut self, v: V) -> Self {
7949            self.0.request = v.into();
7950            self
7951        }
7952
7953        /// Sets all the options, replacing any prior values.
7954        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7955            self.0.options = v.into();
7956            self
7957        }
7958
7959        /// Sends the request.
7960        pub async fn send(self) -> Result<crate::model::Content> {
7961            (*self.0.stub)
7962                .get_content(self.0.request, self.0.options)
7963                .await
7964                .map(crate::Response::into_body)
7965        }
7966
7967        /// Sets the value of [name][crate::model::GetContentRequest::name].
7968        ///
7969        /// This is a **required** field for requests.
7970        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7971            self.0.request.name = v.into();
7972            self
7973        }
7974
7975        /// Sets the value of [view][crate::model::GetContentRequest::view].
7976        pub fn set_view<T: Into<crate::model::get_content_request::ContentView>>(
7977            mut self,
7978            v: T,
7979        ) -> Self {
7980            self.0.request.view = v.into();
7981            self
7982        }
7983    }
7984
7985    #[doc(hidden)]
7986    impl crate::RequestBuilder for GetContent {
7987        fn request_options(&mut self) -> &mut crate::RequestOptions {
7988            &mut self.0.options
7989        }
7990    }
7991
7992    /// The request builder for [ContentService::get_iam_policy][crate::client::ContentService::get_iam_policy] calls.
7993    ///
7994    /// # Example
7995    /// ```
7996    /// # use google_cloud_dataplex_v1::builder::content_service::GetIamPolicy;
7997    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7998    ///
7999    /// let builder = prepare_request_builder();
8000    /// let response = builder.send().await?;
8001    /// # Ok(()) }
8002    ///
8003    /// fn prepare_request_builder() -> GetIamPolicy {
8004    ///   # panic!();
8005    ///   // ... details omitted ...
8006    /// }
8007    /// ```
8008    #[derive(Clone, Debug)]
8009    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
8010
8011    impl GetIamPolicy {
8012        pub(crate) fn new(
8013            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8014        ) -> Self {
8015            Self(RequestBuilder::new(stub))
8016        }
8017
8018        /// Sets the full request, replacing any prior values.
8019        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
8020            mut self,
8021            v: V,
8022        ) -> Self {
8023            self.0.request = v.into();
8024            self
8025        }
8026
8027        /// Sets all the options, replacing any prior values.
8028        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8029            self.0.options = v.into();
8030            self
8031        }
8032
8033        /// Sends the request.
8034        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8035            (*self.0.stub)
8036                .get_iam_policy(self.0.request, self.0.options)
8037                .await
8038                .map(crate::Response::into_body)
8039        }
8040
8041        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
8042        ///
8043        /// This is a **required** field for requests.
8044        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8045            self.0.request.resource = v.into();
8046            self
8047        }
8048
8049        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
8050        pub fn set_options<T>(mut self, v: T) -> Self
8051        where
8052            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
8053        {
8054            self.0.request.options = std::option::Option::Some(v.into());
8055            self
8056        }
8057
8058        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
8059        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
8060        where
8061            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
8062        {
8063            self.0.request.options = v.map(|x| x.into());
8064            self
8065        }
8066    }
8067
8068    #[doc(hidden)]
8069    impl crate::RequestBuilder for GetIamPolicy {
8070        fn request_options(&mut self) -> &mut crate::RequestOptions {
8071            &mut self.0.options
8072        }
8073    }
8074
8075    /// The request builder for [ContentService::set_iam_policy][crate::client::ContentService::set_iam_policy] calls.
8076    ///
8077    /// # Example
8078    /// ```
8079    /// # use google_cloud_dataplex_v1::builder::content_service::SetIamPolicy;
8080    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8081    ///
8082    /// let builder = prepare_request_builder();
8083    /// let response = builder.send().await?;
8084    /// # Ok(()) }
8085    ///
8086    /// fn prepare_request_builder() -> SetIamPolicy {
8087    ///   # panic!();
8088    ///   // ... details omitted ...
8089    /// }
8090    /// ```
8091    #[derive(Clone, Debug)]
8092    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
8093
8094    impl SetIamPolicy {
8095        pub(crate) fn new(
8096            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8097        ) -> Self {
8098            Self(RequestBuilder::new(stub))
8099        }
8100
8101        /// Sets the full request, replacing any prior values.
8102        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
8103            mut self,
8104            v: V,
8105        ) -> Self {
8106            self.0.request = v.into();
8107            self
8108        }
8109
8110        /// Sets all the options, replacing any prior values.
8111        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8112            self.0.options = v.into();
8113            self
8114        }
8115
8116        /// Sends the request.
8117        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8118            (*self.0.stub)
8119                .set_iam_policy(self.0.request, self.0.options)
8120                .await
8121                .map(crate::Response::into_body)
8122        }
8123
8124        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
8125        ///
8126        /// This is a **required** field for requests.
8127        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8128            self.0.request.resource = v.into();
8129            self
8130        }
8131
8132        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
8133        ///
8134        /// This is a **required** field for requests.
8135        pub fn set_policy<T>(mut self, v: T) -> Self
8136        where
8137            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8138        {
8139            self.0.request.policy = std::option::Option::Some(v.into());
8140            self
8141        }
8142
8143        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
8144        ///
8145        /// This is a **required** field for requests.
8146        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
8147        where
8148            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8149        {
8150            self.0.request.policy = v.map(|x| x.into());
8151            self
8152        }
8153
8154        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
8155        pub fn set_update_mask<T>(mut self, v: T) -> Self
8156        where
8157            T: std::convert::Into<wkt::FieldMask>,
8158        {
8159            self.0.request.update_mask = std::option::Option::Some(v.into());
8160            self
8161        }
8162
8163        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
8164        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8165        where
8166            T: std::convert::Into<wkt::FieldMask>,
8167        {
8168            self.0.request.update_mask = v.map(|x| x.into());
8169            self
8170        }
8171    }
8172
8173    #[doc(hidden)]
8174    impl crate::RequestBuilder for SetIamPolicy {
8175        fn request_options(&mut self) -> &mut crate::RequestOptions {
8176            &mut self.0.options
8177        }
8178    }
8179
8180    /// The request builder for [ContentService::test_iam_permissions][crate::client::ContentService::test_iam_permissions] calls.
8181    ///
8182    /// # Example
8183    /// ```
8184    /// # use google_cloud_dataplex_v1::builder::content_service::TestIamPermissions;
8185    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8186    ///
8187    /// let builder = prepare_request_builder();
8188    /// let response = builder.send().await?;
8189    /// # Ok(()) }
8190    ///
8191    /// fn prepare_request_builder() -> TestIamPermissions {
8192    ///   # panic!();
8193    ///   // ... details omitted ...
8194    /// }
8195    /// ```
8196    #[derive(Clone, Debug)]
8197    pub struct TestIamPermissions(
8198        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
8199    );
8200
8201    impl TestIamPermissions {
8202        pub(crate) fn new(
8203            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8204        ) -> Self {
8205            Self(RequestBuilder::new(stub))
8206        }
8207
8208        /// Sets the full request, replacing any prior values.
8209        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
8210            mut self,
8211            v: V,
8212        ) -> Self {
8213            self.0.request = v.into();
8214            self
8215        }
8216
8217        /// Sets all the options, replacing any prior values.
8218        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8219            self.0.options = v.into();
8220            self
8221        }
8222
8223        /// Sends the request.
8224        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
8225            (*self.0.stub)
8226                .test_iam_permissions(self.0.request, self.0.options)
8227                .await
8228                .map(crate::Response::into_body)
8229        }
8230
8231        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
8232        ///
8233        /// This is a **required** field for requests.
8234        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8235            self.0.request.resource = v.into();
8236            self
8237        }
8238
8239        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
8240        ///
8241        /// This is a **required** field for requests.
8242        pub fn set_permissions<T, V>(mut self, v: T) -> Self
8243        where
8244            T: std::iter::IntoIterator<Item = V>,
8245            V: std::convert::Into<std::string::String>,
8246        {
8247            use std::iter::Iterator;
8248            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
8249            self
8250        }
8251    }
8252
8253    #[doc(hidden)]
8254    impl crate::RequestBuilder for TestIamPermissions {
8255        fn request_options(&mut self) -> &mut crate::RequestOptions {
8256            &mut self.0.options
8257        }
8258    }
8259
8260    /// The request builder for [ContentService::list_content][crate::client::ContentService::list_content] calls.
8261    ///
8262    /// # Example
8263    /// ```
8264    /// # use google_cloud_dataplex_v1::builder::content_service::ListContent;
8265    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8266    /// use google_cloud_gax::paginator::ItemPaginator;
8267    ///
8268    /// let builder = prepare_request_builder();
8269    /// let mut items = builder.by_item();
8270    /// while let Some(result) = items.next().await {
8271    ///   let item = result?;
8272    /// }
8273    /// # Ok(()) }
8274    ///
8275    /// fn prepare_request_builder() -> ListContent {
8276    ///   # panic!();
8277    ///   // ... details omitted ...
8278    /// }
8279    /// ```
8280    #[derive(Clone, Debug)]
8281    pub struct ListContent(RequestBuilder<crate::model::ListContentRequest>);
8282
8283    impl ListContent {
8284        pub(crate) fn new(
8285            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8286        ) -> Self {
8287            Self(RequestBuilder::new(stub))
8288        }
8289
8290        /// Sets the full request, replacing any prior values.
8291        pub fn with_request<V: Into<crate::model::ListContentRequest>>(mut self, v: V) -> Self {
8292            self.0.request = v.into();
8293            self
8294        }
8295
8296        /// Sets all the options, replacing any prior values.
8297        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8298            self.0.options = v.into();
8299            self
8300        }
8301
8302        /// Sends the request.
8303        pub async fn send(self) -> Result<crate::model::ListContentResponse> {
8304            (*self.0.stub)
8305                .list_content(self.0.request, self.0.options)
8306                .await
8307                .map(crate::Response::into_body)
8308        }
8309
8310        /// Streams each page in the collection.
8311        pub fn by_page(
8312            self,
8313        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListContentResponse, crate::Error>
8314        {
8315            use std::clone::Clone;
8316            let token = self.0.request.page_token.clone();
8317            let execute = move |token: String| {
8318                let mut builder = self.clone();
8319                builder.0.request = builder.0.request.set_page_token(token);
8320                builder.send()
8321            };
8322            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8323        }
8324
8325        /// Streams each item in the collection.
8326        pub fn by_item(
8327            self,
8328        ) -> impl google_cloud_gax::paginator::ItemPaginator<
8329            crate::model::ListContentResponse,
8330            crate::Error,
8331        > {
8332            use google_cloud_gax::paginator::Paginator;
8333            self.by_page().items()
8334        }
8335
8336        /// Sets the value of [parent][crate::model::ListContentRequest::parent].
8337        ///
8338        /// This is a **required** field for requests.
8339        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
8340            self.0.request.parent = v.into();
8341            self
8342        }
8343
8344        /// Sets the value of [page_size][crate::model::ListContentRequest::page_size].
8345        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8346            self.0.request.page_size = v.into();
8347            self
8348        }
8349
8350        /// Sets the value of [page_token][crate::model::ListContentRequest::page_token].
8351        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8352            self.0.request.page_token = v.into();
8353            self
8354        }
8355
8356        /// Sets the value of [filter][crate::model::ListContentRequest::filter].
8357        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8358            self.0.request.filter = v.into();
8359            self
8360        }
8361    }
8362
8363    #[doc(hidden)]
8364    impl crate::RequestBuilder for ListContent {
8365        fn request_options(&mut self) -> &mut crate::RequestOptions {
8366            &mut self.0.options
8367        }
8368    }
8369
8370    /// The request builder for [ContentService::list_locations][crate::client::ContentService::list_locations] calls.
8371    ///
8372    /// # Example
8373    /// ```
8374    /// # use google_cloud_dataplex_v1::builder::content_service::ListLocations;
8375    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8376    /// use google_cloud_gax::paginator::ItemPaginator;
8377    ///
8378    /// let builder = prepare_request_builder();
8379    /// let mut items = builder.by_item();
8380    /// while let Some(result) = items.next().await {
8381    ///   let item = result?;
8382    /// }
8383    /// # Ok(()) }
8384    ///
8385    /// fn prepare_request_builder() -> ListLocations {
8386    ///   # panic!();
8387    ///   // ... details omitted ...
8388    /// }
8389    /// ```
8390    #[derive(Clone, Debug)]
8391    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
8392
8393    impl ListLocations {
8394        pub(crate) fn new(
8395            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8396        ) -> Self {
8397            Self(RequestBuilder::new(stub))
8398        }
8399
8400        /// Sets the full request, replacing any prior values.
8401        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
8402            mut self,
8403            v: V,
8404        ) -> Self {
8405            self.0.request = v.into();
8406            self
8407        }
8408
8409        /// Sets all the options, replacing any prior values.
8410        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8411            self.0.options = v.into();
8412            self
8413        }
8414
8415        /// Sends the request.
8416        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
8417            (*self.0.stub)
8418                .list_locations(self.0.request, self.0.options)
8419                .await
8420                .map(crate::Response::into_body)
8421        }
8422
8423        /// Streams each page in the collection.
8424        pub fn by_page(
8425            self,
8426        ) -> impl google_cloud_gax::paginator::Paginator<
8427            google_cloud_location::model::ListLocationsResponse,
8428            crate::Error,
8429        > {
8430            use std::clone::Clone;
8431            let token = self.0.request.page_token.clone();
8432            let execute = move |token: String| {
8433                let mut builder = self.clone();
8434                builder.0.request = builder.0.request.set_page_token(token);
8435                builder.send()
8436            };
8437            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8438        }
8439
8440        /// Streams each item in the collection.
8441        pub fn by_item(
8442            self,
8443        ) -> impl google_cloud_gax::paginator::ItemPaginator<
8444            google_cloud_location::model::ListLocationsResponse,
8445            crate::Error,
8446        > {
8447            use google_cloud_gax::paginator::Paginator;
8448            self.by_page().items()
8449        }
8450
8451        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
8452        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8453            self.0.request.name = v.into();
8454            self
8455        }
8456
8457        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
8458        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8459            self.0.request.filter = v.into();
8460            self
8461        }
8462
8463        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
8464        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8465            self.0.request.page_size = v.into();
8466            self
8467        }
8468
8469        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
8470        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8471            self.0.request.page_token = v.into();
8472            self
8473        }
8474    }
8475
8476    #[doc(hidden)]
8477    impl crate::RequestBuilder for ListLocations {
8478        fn request_options(&mut self) -> &mut crate::RequestOptions {
8479            &mut self.0.options
8480        }
8481    }
8482
8483    /// The request builder for [ContentService::get_location][crate::client::ContentService::get_location] calls.
8484    ///
8485    /// # Example
8486    /// ```
8487    /// # use google_cloud_dataplex_v1::builder::content_service::GetLocation;
8488    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8489    ///
8490    /// let builder = prepare_request_builder();
8491    /// let response = builder.send().await?;
8492    /// # Ok(()) }
8493    ///
8494    /// fn prepare_request_builder() -> GetLocation {
8495    ///   # panic!();
8496    ///   // ... details omitted ...
8497    /// }
8498    /// ```
8499    #[derive(Clone, Debug)]
8500    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
8501
8502    impl GetLocation {
8503        pub(crate) fn new(
8504            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8505        ) -> Self {
8506            Self(RequestBuilder::new(stub))
8507        }
8508
8509        /// Sets the full request, replacing any prior values.
8510        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
8511            mut self,
8512            v: V,
8513        ) -> Self {
8514            self.0.request = v.into();
8515            self
8516        }
8517
8518        /// Sets all the options, replacing any prior values.
8519        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8520            self.0.options = v.into();
8521            self
8522        }
8523
8524        /// Sends the request.
8525        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
8526            (*self.0.stub)
8527                .get_location(self.0.request, self.0.options)
8528                .await
8529                .map(crate::Response::into_body)
8530        }
8531
8532        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
8533        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8534            self.0.request.name = v.into();
8535            self
8536        }
8537    }
8538
8539    #[doc(hidden)]
8540    impl crate::RequestBuilder for GetLocation {
8541        fn request_options(&mut self) -> &mut crate::RequestOptions {
8542            &mut self.0.options
8543        }
8544    }
8545
8546    /// The request builder for [ContentService::list_operations][crate::client::ContentService::list_operations] calls.
8547    ///
8548    /// # Example
8549    /// ```
8550    /// # use google_cloud_dataplex_v1::builder::content_service::ListOperations;
8551    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8552    /// use google_cloud_gax::paginator::ItemPaginator;
8553    ///
8554    /// let builder = prepare_request_builder();
8555    /// let mut items = builder.by_item();
8556    /// while let Some(result) = items.next().await {
8557    ///   let item = result?;
8558    /// }
8559    /// # Ok(()) }
8560    ///
8561    /// fn prepare_request_builder() -> ListOperations {
8562    ///   # panic!();
8563    ///   // ... details omitted ...
8564    /// }
8565    /// ```
8566    #[derive(Clone, Debug)]
8567    pub struct ListOperations(
8568        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
8569    );
8570
8571    impl ListOperations {
8572        pub(crate) fn new(
8573            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8574        ) -> Self {
8575            Self(RequestBuilder::new(stub))
8576        }
8577
8578        /// Sets the full request, replacing any prior values.
8579        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
8580            mut self,
8581            v: V,
8582        ) -> Self {
8583            self.0.request = v.into();
8584            self
8585        }
8586
8587        /// Sets all the options, replacing any prior values.
8588        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8589            self.0.options = v.into();
8590            self
8591        }
8592
8593        /// Sends the request.
8594        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
8595            (*self.0.stub)
8596                .list_operations(self.0.request, self.0.options)
8597                .await
8598                .map(crate::Response::into_body)
8599        }
8600
8601        /// Streams each page in the collection.
8602        pub fn by_page(
8603            self,
8604        ) -> impl google_cloud_gax::paginator::Paginator<
8605            google_cloud_longrunning::model::ListOperationsResponse,
8606            crate::Error,
8607        > {
8608            use std::clone::Clone;
8609            let token = self.0.request.page_token.clone();
8610            let execute = move |token: String| {
8611                let mut builder = self.clone();
8612                builder.0.request = builder.0.request.set_page_token(token);
8613                builder.send()
8614            };
8615            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8616        }
8617
8618        /// Streams each item in the collection.
8619        pub fn by_item(
8620            self,
8621        ) -> impl google_cloud_gax::paginator::ItemPaginator<
8622            google_cloud_longrunning::model::ListOperationsResponse,
8623            crate::Error,
8624        > {
8625            use google_cloud_gax::paginator::Paginator;
8626            self.by_page().items()
8627        }
8628
8629        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
8630        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8631            self.0.request.name = v.into();
8632            self
8633        }
8634
8635        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
8636        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8637            self.0.request.filter = v.into();
8638            self
8639        }
8640
8641        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
8642        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8643            self.0.request.page_size = v.into();
8644            self
8645        }
8646
8647        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
8648        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8649            self.0.request.page_token = v.into();
8650            self
8651        }
8652
8653        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
8654        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
8655            self.0.request.return_partial_success = v.into();
8656            self
8657        }
8658    }
8659
8660    #[doc(hidden)]
8661    impl crate::RequestBuilder for ListOperations {
8662        fn request_options(&mut self) -> &mut crate::RequestOptions {
8663            &mut self.0.options
8664        }
8665    }
8666
8667    /// The request builder for [ContentService::get_operation][crate::client::ContentService::get_operation] calls.
8668    ///
8669    /// # Example
8670    /// ```
8671    /// # use google_cloud_dataplex_v1::builder::content_service::GetOperation;
8672    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8673    ///
8674    /// let builder = prepare_request_builder();
8675    /// let response = builder.send().await?;
8676    /// # Ok(()) }
8677    ///
8678    /// fn prepare_request_builder() -> GetOperation {
8679    ///   # panic!();
8680    ///   // ... details omitted ...
8681    /// }
8682    /// ```
8683    #[derive(Clone, Debug)]
8684    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
8685
8686    impl GetOperation {
8687        pub(crate) fn new(
8688            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8689        ) -> Self {
8690            Self(RequestBuilder::new(stub))
8691        }
8692
8693        /// Sets the full request, replacing any prior values.
8694        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
8695            mut self,
8696            v: V,
8697        ) -> Self {
8698            self.0.request = v.into();
8699            self
8700        }
8701
8702        /// Sets all the options, replacing any prior values.
8703        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8704            self.0.options = v.into();
8705            self
8706        }
8707
8708        /// Sends the request.
8709        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8710            (*self.0.stub)
8711                .get_operation(self.0.request, self.0.options)
8712                .await
8713                .map(crate::Response::into_body)
8714        }
8715
8716        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
8717        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8718            self.0.request.name = v.into();
8719            self
8720        }
8721    }
8722
8723    #[doc(hidden)]
8724    impl crate::RequestBuilder for GetOperation {
8725        fn request_options(&mut self) -> &mut crate::RequestOptions {
8726            &mut self.0.options
8727        }
8728    }
8729
8730    /// The request builder for [ContentService::delete_operation][crate::client::ContentService::delete_operation] calls.
8731    ///
8732    /// # Example
8733    /// ```
8734    /// # use google_cloud_dataplex_v1::builder::content_service::DeleteOperation;
8735    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8736    ///
8737    /// let builder = prepare_request_builder();
8738    /// let response = builder.send().await?;
8739    /// # Ok(()) }
8740    ///
8741    /// fn prepare_request_builder() -> DeleteOperation {
8742    ///   # panic!();
8743    ///   // ... details omitted ...
8744    /// }
8745    /// ```
8746    #[derive(Clone, Debug)]
8747    pub struct DeleteOperation(
8748        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
8749    );
8750
8751    impl DeleteOperation {
8752        pub(crate) fn new(
8753            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8754        ) -> Self {
8755            Self(RequestBuilder::new(stub))
8756        }
8757
8758        /// Sets the full request, replacing any prior values.
8759        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
8760            mut self,
8761            v: V,
8762        ) -> Self {
8763            self.0.request = v.into();
8764            self
8765        }
8766
8767        /// Sets all the options, replacing any prior values.
8768        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8769            self.0.options = v.into();
8770            self
8771        }
8772
8773        /// Sends the request.
8774        pub async fn send(self) -> Result<()> {
8775            (*self.0.stub)
8776                .delete_operation(self.0.request, self.0.options)
8777                .await
8778                .map(crate::Response::into_body)
8779        }
8780
8781        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
8782        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8783            self.0.request.name = v.into();
8784            self
8785        }
8786    }
8787
8788    #[doc(hidden)]
8789    impl crate::RequestBuilder for DeleteOperation {
8790        fn request_options(&mut self) -> &mut crate::RequestOptions {
8791            &mut self.0.options
8792        }
8793    }
8794
8795    /// The request builder for [ContentService::cancel_operation][crate::client::ContentService::cancel_operation] calls.
8796    ///
8797    /// # Example
8798    /// ```
8799    /// # use google_cloud_dataplex_v1::builder::content_service::CancelOperation;
8800    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8801    ///
8802    /// let builder = prepare_request_builder();
8803    /// let response = builder.send().await?;
8804    /// # Ok(()) }
8805    ///
8806    /// fn prepare_request_builder() -> CancelOperation {
8807    ///   # panic!();
8808    ///   // ... details omitted ...
8809    /// }
8810    /// ```
8811    #[derive(Clone, Debug)]
8812    pub struct CancelOperation(
8813        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
8814    );
8815
8816    impl CancelOperation {
8817        pub(crate) fn new(
8818            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8819        ) -> Self {
8820            Self(RequestBuilder::new(stub))
8821        }
8822
8823        /// Sets the full request, replacing any prior values.
8824        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
8825            mut self,
8826            v: V,
8827        ) -> Self {
8828            self.0.request = v.into();
8829            self
8830        }
8831
8832        /// Sets all the options, replacing any prior values.
8833        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8834            self.0.options = v.into();
8835            self
8836        }
8837
8838        /// Sends the request.
8839        pub async fn send(self) -> Result<()> {
8840            (*self.0.stub)
8841                .cancel_operation(self.0.request, self.0.options)
8842                .await
8843                .map(crate::Response::into_body)
8844        }
8845
8846        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
8847        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8848            self.0.request.name = v.into();
8849            self
8850        }
8851    }
8852
8853    #[doc(hidden)]
8854    impl crate::RequestBuilder for CancelOperation {
8855        fn request_options(&mut self) -> &mut crate::RequestOptions {
8856            &mut self.0.options
8857        }
8858    }
8859}
8860
8861pub mod data_taxonomy_service {
8862    use crate::Result;
8863
8864    /// A builder for [DataTaxonomyService][crate::client::DataTaxonomyService].
8865    ///
8866    /// ```
8867    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
8868    /// # use google_cloud_dataplex_v1::*;
8869    /// # use builder::data_taxonomy_service::ClientBuilder;
8870    /// # use client::DataTaxonomyService;
8871    /// let builder : ClientBuilder = DataTaxonomyService::builder();
8872    /// let client = builder
8873    ///     .with_endpoint("https://dataplex.googleapis.com")
8874    ///     .build().await?;
8875    /// # Ok(()) }
8876    /// ```
8877    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
8878
8879    pub(crate) mod client {
8880        use super::super::super::client::DataTaxonomyService;
8881        pub struct Factory;
8882        impl crate::ClientFactory for Factory {
8883            type Client = DataTaxonomyService;
8884            type Credentials = gaxi::options::Credentials;
8885            async fn build(
8886                self,
8887                config: gaxi::options::ClientConfig,
8888            ) -> crate::ClientBuilderResult<Self::Client> {
8889                Self::Client::new(config).await
8890            }
8891        }
8892    }
8893
8894    /// Common implementation for [crate::client::DataTaxonomyService] request builders.
8895    #[derive(Clone, Debug)]
8896    pub(crate) struct RequestBuilder<R: std::default::Default> {
8897        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8898        request: R,
8899        options: crate::RequestOptions,
8900    }
8901
8902    impl<R> RequestBuilder<R>
8903    where
8904        R: std::default::Default,
8905    {
8906        pub(crate) fn new(
8907            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8908        ) -> Self {
8909            Self {
8910                stub,
8911                request: R::default(),
8912                options: crate::RequestOptions::default(),
8913            }
8914        }
8915    }
8916
8917    /// The request builder for [DataTaxonomyService::create_data_taxonomy][crate::client::DataTaxonomyService::create_data_taxonomy] calls.
8918    ///
8919    /// # Example
8920    /// ```
8921    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CreateDataTaxonomy;
8922    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8923    /// use google_cloud_lro::Poller;
8924    ///
8925    /// let builder = prepare_request_builder();
8926    /// let response = builder.poller().until_done().await?;
8927    /// # Ok(()) }
8928    ///
8929    /// fn prepare_request_builder() -> CreateDataTaxonomy {
8930    ///   # panic!();
8931    ///   // ... details omitted ...
8932    /// }
8933    /// ```
8934    #[derive(Clone, Debug)]
8935    pub struct CreateDataTaxonomy(RequestBuilder<crate::model::CreateDataTaxonomyRequest>);
8936
8937    impl CreateDataTaxonomy {
8938        pub(crate) fn new(
8939            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8940        ) -> Self {
8941            Self(RequestBuilder::new(stub))
8942        }
8943
8944        /// Sets the full request, replacing any prior values.
8945        pub fn with_request<V: Into<crate::model::CreateDataTaxonomyRequest>>(
8946            mut self,
8947            v: V,
8948        ) -> Self {
8949            self.0.request = v.into();
8950            self
8951        }
8952
8953        /// Sets all the options, replacing any prior values.
8954        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8955            self.0.options = v.into();
8956            self
8957        }
8958
8959        /// Sends the request.
8960        ///
8961        /// # Long running operations
8962        ///
8963        /// This starts, but does not poll, a longrunning operation. More information
8964        /// on [create_data_taxonomy][crate::client::DataTaxonomyService::create_data_taxonomy].
8965        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8966            (*self.0.stub)
8967                .create_data_taxonomy(self.0.request, self.0.options)
8968                .await
8969                .map(crate::Response::into_body)
8970        }
8971
8972        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_taxonomy`.
8973        pub fn poller(
8974            self,
8975        ) -> impl google_cloud_lro::Poller<crate::model::DataTaxonomy, crate::model::OperationMetadata>
8976        {
8977            type Operation = google_cloud_lro::internal::Operation<
8978                crate::model::DataTaxonomy,
8979                crate::model::OperationMetadata,
8980            >;
8981            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8982            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8983
8984            let stub = self.0.stub.clone();
8985            let mut options = self.0.options.clone();
8986            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
8987            let query = move |name| {
8988                let stub = stub.clone();
8989                let options = options.clone();
8990                async {
8991                    let op = GetOperation::new(stub)
8992                        .set_name(name)
8993                        .with_options(options)
8994                        .send()
8995                        .await?;
8996                    Ok(Operation::new(op))
8997                }
8998            };
8999
9000            let start = move || async {
9001                let op = self.send().await?;
9002                Ok(Operation::new(op))
9003            };
9004
9005            google_cloud_lro::internal::new_poller(
9006                polling_error_policy,
9007                polling_backoff_policy,
9008                start,
9009                query,
9010            )
9011        }
9012
9013        /// Sets the value of [parent][crate::model::CreateDataTaxonomyRequest::parent].
9014        ///
9015        /// This is a **required** field for requests.
9016        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9017            self.0.request.parent = v.into();
9018            self
9019        }
9020
9021        /// Sets the value of [data_taxonomy_id][crate::model::CreateDataTaxonomyRequest::data_taxonomy_id].
9022        ///
9023        /// This is a **required** field for requests.
9024        pub fn set_data_taxonomy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
9025            self.0.request.data_taxonomy_id = v.into();
9026            self
9027        }
9028
9029        /// Sets the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
9030        ///
9031        /// This is a **required** field for requests.
9032        pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
9033        where
9034            T: std::convert::Into<crate::model::DataTaxonomy>,
9035        {
9036            self.0.request.data_taxonomy = std::option::Option::Some(v.into());
9037            self
9038        }
9039
9040        /// Sets or clears the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
9041        ///
9042        /// This is a **required** field for requests.
9043        pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
9044        where
9045            T: std::convert::Into<crate::model::DataTaxonomy>,
9046        {
9047            self.0.request.data_taxonomy = v.map(|x| x.into());
9048            self
9049        }
9050
9051        /// Sets the value of [validate_only][crate::model::CreateDataTaxonomyRequest::validate_only].
9052        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9053            self.0.request.validate_only = v.into();
9054            self
9055        }
9056    }
9057
9058    #[doc(hidden)]
9059    impl crate::RequestBuilder for CreateDataTaxonomy {
9060        fn request_options(&mut self) -> &mut crate::RequestOptions {
9061            &mut self.0.options
9062        }
9063    }
9064
9065    /// The request builder for [DataTaxonomyService::update_data_taxonomy][crate::client::DataTaxonomyService::update_data_taxonomy] calls.
9066    ///
9067    /// # Example
9068    /// ```
9069    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::UpdateDataTaxonomy;
9070    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9071    /// use google_cloud_lro::Poller;
9072    ///
9073    /// let builder = prepare_request_builder();
9074    /// let response = builder.poller().until_done().await?;
9075    /// # Ok(()) }
9076    ///
9077    /// fn prepare_request_builder() -> UpdateDataTaxonomy {
9078    ///   # panic!();
9079    ///   // ... details omitted ...
9080    /// }
9081    /// ```
9082    #[derive(Clone, Debug)]
9083    pub struct UpdateDataTaxonomy(RequestBuilder<crate::model::UpdateDataTaxonomyRequest>);
9084
9085    impl UpdateDataTaxonomy {
9086        pub(crate) fn new(
9087            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9088        ) -> Self {
9089            Self(RequestBuilder::new(stub))
9090        }
9091
9092        /// Sets the full request, replacing any prior values.
9093        pub fn with_request<V: Into<crate::model::UpdateDataTaxonomyRequest>>(
9094            mut self,
9095            v: V,
9096        ) -> Self {
9097            self.0.request = v.into();
9098            self
9099        }
9100
9101        /// Sets all the options, replacing any prior values.
9102        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9103            self.0.options = v.into();
9104            self
9105        }
9106
9107        /// Sends the request.
9108        ///
9109        /// # Long running operations
9110        ///
9111        /// This starts, but does not poll, a longrunning operation. More information
9112        /// on [update_data_taxonomy][crate::client::DataTaxonomyService::update_data_taxonomy].
9113        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9114            (*self.0.stub)
9115                .update_data_taxonomy(self.0.request, self.0.options)
9116                .await
9117                .map(crate::Response::into_body)
9118        }
9119
9120        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_taxonomy`.
9121        pub fn poller(
9122            self,
9123        ) -> impl google_cloud_lro::Poller<crate::model::DataTaxonomy, crate::model::OperationMetadata>
9124        {
9125            type Operation = google_cloud_lro::internal::Operation<
9126                crate::model::DataTaxonomy,
9127                crate::model::OperationMetadata,
9128            >;
9129            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9130            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9131
9132            let stub = self.0.stub.clone();
9133            let mut options = self.0.options.clone();
9134            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
9135            let query = move |name| {
9136                let stub = stub.clone();
9137                let options = options.clone();
9138                async {
9139                    let op = GetOperation::new(stub)
9140                        .set_name(name)
9141                        .with_options(options)
9142                        .send()
9143                        .await?;
9144                    Ok(Operation::new(op))
9145                }
9146            };
9147
9148            let start = move || async {
9149                let op = self.send().await?;
9150                Ok(Operation::new(op))
9151            };
9152
9153            google_cloud_lro::internal::new_poller(
9154                polling_error_policy,
9155                polling_backoff_policy,
9156                start,
9157                query,
9158            )
9159        }
9160
9161        /// Sets the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
9162        ///
9163        /// This is a **required** field for requests.
9164        pub fn set_update_mask<T>(mut self, v: T) -> Self
9165        where
9166            T: std::convert::Into<wkt::FieldMask>,
9167        {
9168            self.0.request.update_mask = std::option::Option::Some(v.into());
9169            self
9170        }
9171
9172        /// Sets or clears the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
9173        ///
9174        /// This is a **required** field for requests.
9175        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9176        where
9177            T: std::convert::Into<wkt::FieldMask>,
9178        {
9179            self.0.request.update_mask = v.map(|x| x.into());
9180            self
9181        }
9182
9183        /// Sets the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
9184        ///
9185        /// This is a **required** field for requests.
9186        pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
9187        where
9188            T: std::convert::Into<crate::model::DataTaxonomy>,
9189        {
9190            self.0.request.data_taxonomy = std::option::Option::Some(v.into());
9191            self
9192        }
9193
9194        /// Sets or clears the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
9195        ///
9196        /// This is a **required** field for requests.
9197        pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
9198        where
9199            T: std::convert::Into<crate::model::DataTaxonomy>,
9200        {
9201            self.0.request.data_taxonomy = v.map(|x| x.into());
9202            self
9203        }
9204
9205        /// Sets the value of [validate_only][crate::model::UpdateDataTaxonomyRequest::validate_only].
9206        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9207            self.0.request.validate_only = v.into();
9208            self
9209        }
9210    }
9211
9212    #[doc(hidden)]
9213    impl crate::RequestBuilder for UpdateDataTaxonomy {
9214        fn request_options(&mut self) -> &mut crate::RequestOptions {
9215            &mut self.0.options
9216        }
9217    }
9218
9219    /// The request builder for [DataTaxonomyService::delete_data_taxonomy][crate::client::DataTaxonomyService::delete_data_taxonomy] calls.
9220    ///
9221    /// # Example
9222    /// ```
9223    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteDataTaxonomy;
9224    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9225    /// use google_cloud_lro::Poller;
9226    ///
9227    /// let builder = prepare_request_builder();
9228    /// let response = builder.poller().until_done().await?;
9229    /// # Ok(()) }
9230    ///
9231    /// fn prepare_request_builder() -> DeleteDataTaxonomy {
9232    ///   # panic!();
9233    ///   // ... details omitted ...
9234    /// }
9235    /// ```
9236    #[derive(Clone, Debug)]
9237    pub struct DeleteDataTaxonomy(RequestBuilder<crate::model::DeleteDataTaxonomyRequest>);
9238
9239    impl DeleteDataTaxonomy {
9240        pub(crate) fn new(
9241            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9242        ) -> Self {
9243            Self(RequestBuilder::new(stub))
9244        }
9245
9246        /// Sets the full request, replacing any prior values.
9247        pub fn with_request<V: Into<crate::model::DeleteDataTaxonomyRequest>>(
9248            mut self,
9249            v: V,
9250        ) -> Self {
9251            self.0.request = v.into();
9252            self
9253        }
9254
9255        /// Sets all the options, replacing any prior values.
9256        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9257            self.0.options = v.into();
9258            self
9259        }
9260
9261        /// Sends the request.
9262        ///
9263        /// # Long running operations
9264        ///
9265        /// This starts, but does not poll, a longrunning operation. More information
9266        /// on [delete_data_taxonomy][crate::client::DataTaxonomyService::delete_data_taxonomy].
9267        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9268            (*self.0.stub)
9269                .delete_data_taxonomy(self.0.request, self.0.options)
9270                .await
9271                .map(crate::Response::into_body)
9272        }
9273
9274        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_taxonomy`.
9275        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
9276            type Operation =
9277                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
9278            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9279            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9280
9281            let stub = self.0.stub.clone();
9282            let mut options = self.0.options.clone();
9283            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
9284            let query = move |name| {
9285                let stub = stub.clone();
9286                let options = options.clone();
9287                async {
9288                    let op = GetOperation::new(stub)
9289                        .set_name(name)
9290                        .with_options(options)
9291                        .send()
9292                        .await?;
9293                    Ok(Operation::new(op))
9294                }
9295            };
9296
9297            let start = move || async {
9298                let op = self.send().await?;
9299                Ok(Operation::new(op))
9300            };
9301
9302            google_cloud_lro::internal::new_unit_response_poller(
9303                polling_error_policy,
9304                polling_backoff_policy,
9305                start,
9306                query,
9307            )
9308        }
9309
9310        /// Sets the value of [name][crate::model::DeleteDataTaxonomyRequest::name].
9311        ///
9312        /// This is a **required** field for requests.
9313        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9314            self.0.request.name = v.into();
9315            self
9316        }
9317
9318        /// Sets the value of [etag][crate::model::DeleteDataTaxonomyRequest::etag].
9319        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
9320            self.0.request.etag = v.into();
9321            self
9322        }
9323    }
9324
9325    #[doc(hidden)]
9326    impl crate::RequestBuilder for DeleteDataTaxonomy {
9327        fn request_options(&mut self) -> &mut crate::RequestOptions {
9328            &mut self.0.options
9329        }
9330    }
9331
9332    /// The request builder for [DataTaxonomyService::list_data_taxonomies][crate::client::DataTaxonomyService::list_data_taxonomies] calls.
9333    ///
9334    /// # Example
9335    /// ```
9336    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListDataTaxonomies;
9337    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9338    /// use google_cloud_gax::paginator::ItemPaginator;
9339    ///
9340    /// let builder = prepare_request_builder();
9341    /// let mut items = builder.by_item();
9342    /// while let Some(result) = items.next().await {
9343    ///   let item = result?;
9344    /// }
9345    /// # Ok(()) }
9346    ///
9347    /// fn prepare_request_builder() -> ListDataTaxonomies {
9348    ///   # panic!();
9349    ///   // ... details omitted ...
9350    /// }
9351    /// ```
9352    #[derive(Clone, Debug)]
9353    pub struct ListDataTaxonomies(RequestBuilder<crate::model::ListDataTaxonomiesRequest>);
9354
9355    impl ListDataTaxonomies {
9356        pub(crate) fn new(
9357            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9358        ) -> Self {
9359            Self(RequestBuilder::new(stub))
9360        }
9361
9362        /// Sets the full request, replacing any prior values.
9363        pub fn with_request<V: Into<crate::model::ListDataTaxonomiesRequest>>(
9364            mut self,
9365            v: V,
9366        ) -> Self {
9367            self.0.request = v.into();
9368            self
9369        }
9370
9371        /// Sets all the options, replacing any prior values.
9372        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9373            self.0.options = v.into();
9374            self
9375        }
9376
9377        /// Sends the request.
9378        pub async fn send(self) -> Result<crate::model::ListDataTaxonomiesResponse> {
9379            (*self.0.stub)
9380                .list_data_taxonomies(self.0.request, self.0.options)
9381                .await
9382                .map(crate::Response::into_body)
9383        }
9384
9385        /// Streams each page in the collection.
9386        pub fn by_page(
9387            self,
9388        ) -> impl google_cloud_gax::paginator::Paginator<
9389            crate::model::ListDataTaxonomiesResponse,
9390            crate::Error,
9391        > {
9392            use std::clone::Clone;
9393            let token = self.0.request.page_token.clone();
9394            let execute = move |token: String| {
9395                let mut builder = self.clone();
9396                builder.0.request = builder.0.request.set_page_token(token);
9397                builder.send()
9398            };
9399            google_cloud_gax::paginator::internal::new_paginator(token, execute)
9400        }
9401
9402        /// Streams each item in the collection.
9403        pub fn by_item(
9404            self,
9405        ) -> impl google_cloud_gax::paginator::ItemPaginator<
9406            crate::model::ListDataTaxonomiesResponse,
9407            crate::Error,
9408        > {
9409            use google_cloud_gax::paginator::Paginator;
9410            self.by_page().items()
9411        }
9412
9413        /// Sets the value of [parent][crate::model::ListDataTaxonomiesRequest::parent].
9414        ///
9415        /// This is a **required** field for requests.
9416        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9417            self.0.request.parent = v.into();
9418            self
9419        }
9420
9421        /// Sets the value of [page_size][crate::model::ListDataTaxonomiesRequest::page_size].
9422        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9423            self.0.request.page_size = v.into();
9424            self
9425        }
9426
9427        /// Sets the value of [page_token][crate::model::ListDataTaxonomiesRequest::page_token].
9428        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9429            self.0.request.page_token = v.into();
9430            self
9431        }
9432
9433        /// Sets the value of [filter][crate::model::ListDataTaxonomiesRequest::filter].
9434        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9435            self.0.request.filter = v.into();
9436            self
9437        }
9438
9439        /// Sets the value of [order_by][crate::model::ListDataTaxonomiesRequest::order_by].
9440        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
9441            self.0.request.order_by = v.into();
9442            self
9443        }
9444    }
9445
9446    #[doc(hidden)]
9447    impl crate::RequestBuilder for ListDataTaxonomies {
9448        fn request_options(&mut self) -> &mut crate::RequestOptions {
9449            &mut self.0.options
9450        }
9451    }
9452
9453    /// The request builder for [DataTaxonomyService::get_data_taxonomy][crate::client::DataTaxonomyService::get_data_taxonomy] calls.
9454    ///
9455    /// # Example
9456    /// ```
9457    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetDataTaxonomy;
9458    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9459    ///
9460    /// let builder = prepare_request_builder();
9461    /// let response = builder.send().await?;
9462    /// # Ok(()) }
9463    ///
9464    /// fn prepare_request_builder() -> GetDataTaxonomy {
9465    ///   # panic!();
9466    ///   // ... details omitted ...
9467    /// }
9468    /// ```
9469    #[derive(Clone, Debug)]
9470    pub struct GetDataTaxonomy(RequestBuilder<crate::model::GetDataTaxonomyRequest>);
9471
9472    impl GetDataTaxonomy {
9473        pub(crate) fn new(
9474            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9475        ) -> Self {
9476            Self(RequestBuilder::new(stub))
9477        }
9478
9479        /// Sets the full request, replacing any prior values.
9480        pub fn with_request<V: Into<crate::model::GetDataTaxonomyRequest>>(mut self, v: V) -> Self {
9481            self.0.request = v.into();
9482            self
9483        }
9484
9485        /// Sets all the options, replacing any prior values.
9486        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9487            self.0.options = v.into();
9488            self
9489        }
9490
9491        /// Sends the request.
9492        pub async fn send(self) -> Result<crate::model::DataTaxonomy> {
9493            (*self.0.stub)
9494                .get_data_taxonomy(self.0.request, self.0.options)
9495                .await
9496                .map(crate::Response::into_body)
9497        }
9498
9499        /// Sets the value of [name][crate::model::GetDataTaxonomyRequest::name].
9500        ///
9501        /// This is a **required** field for requests.
9502        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9503            self.0.request.name = v.into();
9504            self
9505        }
9506    }
9507
9508    #[doc(hidden)]
9509    impl crate::RequestBuilder for GetDataTaxonomy {
9510        fn request_options(&mut self) -> &mut crate::RequestOptions {
9511            &mut self.0.options
9512        }
9513    }
9514
9515    /// The request builder for [DataTaxonomyService::create_data_attribute_binding][crate::client::DataTaxonomyService::create_data_attribute_binding] calls.
9516    ///
9517    /// # Example
9518    /// ```
9519    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CreateDataAttributeBinding;
9520    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9521    /// use google_cloud_lro::Poller;
9522    ///
9523    /// let builder = prepare_request_builder();
9524    /// let response = builder.poller().until_done().await?;
9525    /// # Ok(()) }
9526    ///
9527    /// fn prepare_request_builder() -> CreateDataAttributeBinding {
9528    ///   # panic!();
9529    ///   // ... details omitted ...
9530    /// }
9531    /// ```
9532    #[derive(Clone, Debug)]
9533    pub struct CreateDataAttributeBinding(
9534        RequestBuilder<crate::model::CreateDataAttributeBindingRequest>,
9535    );
9536
9537    impl CreateDataAttributeBinding {
9538        pub(crate) fn new(
9539            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9540        ) -> Self {
9541            Self(RequestBuilder::new(stub))
9542        }
9543
9544        /// Sets the full request, replacing any prior values.
9545        pub fn with_request<V: Into<crate::model::CreateDataAttributeBindingRequest>>(
9546            mut self,
9547            v: V,
9548        ) -> Self {
9549            self.0.request = v.into();
9550            self
9551        }
9552
9553        /// Sets all the options, replacing any prior values.
9554        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9555            self.0.options = v.into();
9556            self
9557        }
9558
9559        /// Sends the request.
9560        ///
9561        /// # Long running operations
9562        ///
9563        /// This starts, but does not poll, a longrunning operation. More information
9564        /// on [create_data_attribute_binding][crate::client::DataTaxonomyService::create_data_attribute_binding].
9565        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9566            (*self.0.stub)
9567                .create_data_attribute_binding(self.0.request, self.0.options)
9568                .await
9569                .map(crate::Response::into_body)
9570        }
9571
9572        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_attribute_binding`.
9573        pub fn poller(
9574            self,
9575        ) -> impl google_cloud_lro::Poller<
9576            crate::model::DataAttributeBinding,
9577            crate::model::OperationMetadata,
9578        > {
9579            type Operation = google_cloud_lro::internal::Operation<
9580                crate::model::DataAttributeBinding,
9581                crate::model::OperationMetadata,
9582            >;
9583            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9584            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9585
9586            let stub = self.0.stub.clone();
9587            let mut options = self.0.options.clone();
9588            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
9589            let query = move |name| {
9590                let stub = stub.clone();
9591                let options = options.clone();
9592                async {
9593                    let op = GetOperation::new(stub)
9594                        .set_name(name)
9595                        .with_options(options)
9596                        .send()
9597                        .await?;
9598                    Ok(Operation::new(op))
9599                }
9600            };
9601
9602            let start = move || async {
9603                let op = self.send().await?;
9604                Ok(Operation::new(op))
9605            };
9606
9607            google_cloud_lro::internal::new_poller(
9608                polling_error_policy,
9609                polling_backoff_policy,
9610                start,
9611                query,
9612            )
9613        }
9614
9615        /// Sets the value of [parent][crate::model::CreateDataAttributeBindingRequest::parent].
9616        ///
9617        /// This is a **required** field for requests.
9618        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9619            self.0.request.parent = v.into();
9620            self
9621        }
9622
9623        /// Sets the value of [data_attribute_binding_id][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding_id].
9624        ///
9625        /// This is a **required** field for requests.
9626        pub fn set_data_attribute_binding_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
9627            self.0.request.data_attribute_binding_id = v.into();
9628            self
9629        }
9630
9631        /// Sets the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
9632        ///
9633        /// This is a **required** field for requests.
9634        pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
9635        where
9636            T: std::convert::Into<crate::model::DataAttributeBinding>,
9637        {
9638            self.0.request.data_attribute_binding = std::option::Option::Some(v.into());
9639            self
9640        }
9641
9642        /// Sets or clears the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
9643        ///
9644        /// This is a **required** field for requests.
9645        pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
9646        where
9647            T: std::convert::Into<crate::model::DataAttributeBinding>,
9648        {
9649            self.0.request.data_attribute_binding = v.map(|x| x.into());
9650            self
9651        }
9652
9653        /// Sets the value of [validate_only][crate::model::CreateDataAttributeBindingRequest::validate_only].
9654        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9655            self.0.request.validate_only = v.into();
9656            self
9657        }
9658    }
9659
9660    #[doc(hidden)]
9661    impl crate::RequestBuilder for CreateDataAttributeBinding {
9662        fn request_options(&mut self) -> &mut crate::RequestOptions {
9663            &mut self.0.options
9664        }
9665    }
9666
9667    /// The request builder for [DataTaxonomyService::update_data_attribute_binding][crate::client::DataTaxonomyService::update_data_attribute_binding] calls.
9668    ///
9669    /// # Example
9670    /// ```
9671    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::UpdateDataAttributeBinding;
9672    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9673    /// use google_cloud_lro::Poller;
9674    ///
9675    /// let builder = prepare_request_builder();
9676    /// let response = builder.poller().until_done().await?;
9677    /// # Ok(()) }
9678    ///
9679    /// fn prepare_request_builder() -> UpdateDataAttributeBinding {
9680    ///   # panic!();
9681    ///   // ... details omitted ...
9682    /// }
9683    /// ```
9684    #[derive(Clone, Debug)]
9685    pub struct UpdateDataAttributeBinding(
9686        RequestBuilder<crate::model::UpdateDataAttributeBindingRequest>,
9687    );
9688
9689    impl UpdateDataAttributeBinding {
9690        pub(crate) fn new(
9691            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9692        ) -> Self {
9693            Self(RequestBuilder::new(stub))
9694        }
9695
9696        /// Sets the full request, replacing any prior values.
9697        pub fn with_request<V: Into<crate::model::UpdateDataAttributeBindingRequest>>(
9698            mut self,
9699            v: V,
9700        ) -> Self {
9701            self.0.request = v.into();
9702            self
9703        }
9704
9705        /// Sets all the options, replacing any prior values.
9706        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9707            self.0.options = v.into();
9708            self
9709        }
9710
9711        /// Sends the request.
9712        ///
9713        /// # Long running operations
9714        ///
9715        /// This starts, but does not poll, a longrunning operation. More information
9716        /// on [update_data_attribute_binding][crate::client::DataTaxonomyService::update_data_attribute_binding].
9717        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9718            (*self.0.stub)
9719                .update_data_attribute_binding(self.0.request, self.0.options)
9720                .await
9721                .map(crate::Response::into_body)
9722        }
9723
9724        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_attribute_binding`.
9725        pub fn poller(
9726            self,
9727        ) -> impl google_cloud_lro::Poller<
9728            crate::model::DataAttributeBinding,
9729            crate::model::OperationMetadata,
9730        > {
9731            type Operation = google_cloud_lro::internal::Operation<
9732                crate::model::DataAttributeBinding,
9733                crate::model::OperationMetadata,
9734            >;
9735            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9736            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9737
9738            let stub = self.0.stub.clone();
9739            let mut options = self.0.options.clone();
9740            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
9741            let query = move |name| {
9742                let stub = stub.clone();
9743                let options = options.clone();
9744                async {
9745                    let op = GetOperation::new(stub)
9746                        .set_name(name)
9747                        .with_options(options)
9748                        .send()
9749                        .await?;
9750                    Ok(Operation::new(op))
9751                }
9752            };
9753
9754            let start = move || async {
9755                let op = self.send().await?;
9756                Ok(Operation::new(op))
9757            };
9758
9759            google_cloud_lro::internal::new_poller(
9760                polling_error_policy,
9761                polling_backoff_policy,
9762                start,
9763                query,
9764            )
9765        }
9766
9767        /// Sets the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
9768        ///
9769        /// This is a **required** field for requests.
9770        pub fn set_update_mask<T>(mut self, v: T) -> Self
9771        where
9772            T: std::convert::Into<wkt::FieldMask>,
9773        {
9774            self.0.request.update_mask = std::option::Option::Some(v.into());
9775            self
9776        }
9777
9778        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
9779        ///
9780        /// This is a **required** field for requests.
9781        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9782        where
9783            T: std::convert::Into<wkt::FieldMask>,
9784        {
9785            self.0.request.update_mask = v.map(|x| x.into());
9786            self
9787        }
9788
9789        /// Sets the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
9790        ///
9791        /// This is a **required** field for requests.
9792        pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
9793        where
9794            T: std::convert::Into<crate::model::DataAttributeBinding>,
9795        {
9796            self.0.request.data_attribute_binding = std::option::Option::Some(v.into());
9797            self
9798        }
9799
9800        /// Sets or clears the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
9801        ///
9802        /// This is a **required** field for requests.
9803        pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
9804        where
9805            T: std::convert::Into<crate::model::DataAttributeBinding>,
9806        {
9807            self.0.request.data_attribute_binding = v.map(|x| x.into());
9808            self
9809        }
9810
9811        /// Sets the value of [validate_only][crate::model::UpdateDataAttributeBindingRequest::validate_only].
9812        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9813            self.0.request.validate_only = v.into();
9814            self
9815        }
9816    }
9817
9818    #[doc(hidden)]
9819    impl crate::RequestBuilder for UpdateDataAttributeBinding {
9820        fn request_options(&mut self) -> &mut crate::RequestOptions {
9821            &mut self.0.options
9822        }
9823    }
9824
9825    /// The request builder for [DataTaxonomyService::delete_data_attribute_binding][crate::client::DataTaxonomyService::delete_data_attribute_binding] calls.
9826    ///
9827    /// # Example
9828    /// ```
9829    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteDataAttributeBinding;
9830    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9831    /// use google_cloud_lro::Poller;
9832    ///
9833    /// let builder = prepare_request_builder();
9834    /// let response = builder.poller().until_done().await?;
9835    /// # Ok(()) }
9836    ///
9837    /// fn prepare_request_builder() -> DeleteDataAttributeBinding {
9838    ///   # panic!();
9839    ///   // ... details omitted ...
9840    /// }
9841    /// ```
9842    #[derive(Clone, Debug)]
9843    pub struct DeleteDataAttributeBinding(
9844        RequestBuilder<crate::model::DeleteDataAttributeBindingRequest>,
9845    );
9846
9847    impl DeleteDataAttributeBinding {
9848        pub(crate) fn new(
9849            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9850        ) -> Self {
9851            Self(RequestBuilder::new(stub))
9852        }
9853
9854        /// Sets the full request, replacing any prior values.
9855        pub fn with_request<V: Into<crate::model::DeleteDataAttributeBindingRequest>>(
9856            mut self,
9857            v: V,
9858        ) -> Self {
9859            self.0.request = v.into();
9860            self
9861        }
9862
9863        /// Sets all the options, replacing any prior values.
9864        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9865            self.0.options = v.into();
9866            self
9867        }
9868
9869        /// Sends the request.
9870        ///
9871        /// # Long running operations
9872        ///
9873        /// This starts, but does not poll, a longrunning operation. More information
9874        /// on [delete_data_attribute_binding][crate::client::DataTaxonomyService::delete_data_attribute_binding].
9875        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9876            (*self.0.stub)
9877                .delete_data_attribute_binding(self.0.request, self.0.options)
9878                .await
9879                .map(crate::Response::into_body)
9880        }
9881
9882        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_attribute_binding`.
9883        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
9884            type Operation =
9885                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
9886            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9887            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9888
9889            let stub = self.0.stub.clone();
9890            let mut options = self.0.options.clone();
9891            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
9892            let query = move |name| {
9893                let stub = stub.clone();
9894                let options = options.clone();
9895                async {
9896                    let op = GetOperation::new(stub)
9897                        .set_name(name)
9898                        .with_options(options)
9899                        .send()
9900                        .await?;
9901                    Ok(Operation::new(op))
9902                }
9903            };
9904
9905            let start = move || async {
9906                let op = self.send().await?;
9907                Ok(Operation::new(op))
9908            };
9909
9910            google_cloud_lro::internal::new_unit_response_poller(
9911                polling_error_policy,
9912                polling_backoff_policy,
9913                start,
9914                query,
9915            )
9916        }
9917
9918        /// Sets the value of [name][crate::model::DeleteDataAttributeBindingRequest::name].
9919        ///
9920        /// This is a **required** field for requests.
9921        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9922            self.0.request.name = v.into();
9923            self
9924        }
9925
9926        /// Sets the value of [etag][crate::model::DeleteDataAttributeBindingRequest::etag].
9927        ///
9928        /// This is a **required** field for requests.
9929        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
9930            self.0.request.etag = v.into();
9931            self
9932        }
9933    }
9934
9935    #[doc(hidden)]
9936    impl crate::RequestBuilder for DeleteDataAttributeBinding {
9937        fn request_options(&mut self) -> &mut crate::RequestOptions {
9938            &mut self.0.options
9939        }
9940    }
9941
9942    /// The request builder for [DataTaxonomyService::list_data_attribute_bindings][crate::client::DataTaxonomyService::list_data_attribute_bindings] calls.
9943    ///
9944    /// # Example
9945    /// ```
9946    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListDataAttributeBindings;
9947    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9948    /// use google_cloud_gax::paginator::ItemPaginator;
9949    ///
9950    /// let builder = prepare_request_builder();
9951    /// let mut items = builder.by_item();
9952    /// while let Some(result) = items.next().await {
9953    ///   let item = result?;
9954    /// }
9955    /// # Ok(()) }
9956    ///
9957    /// fn prepare_request_builder() -> ListDataAttributeBindings {
9958    ///   # panic!();
9959    ///   // ... details omitted ...
9960    /// }
9961    /// ```
9962    #[derive(Clone, Debug)]
9963    pub struct ListDataAttributeBindings(
9964        RequestBuilder<crate::model::ListDataAttributeBindingsRequest>,
9965    );
9966
9967    impl ListDataAttributeBindings {
9968        pub(crate) fn new(
9969            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9970        ) -> Self {
9971            Self(RequestBuilder::new(stub))
9972        }
9973
9974        /// Sets the full request, replacing any prior values.
9975        pub fn with_request<V: Into<crate::model::ListDataAttributeBindingsRequest>>(
9976            mut self,
9977            v: V,
9978        ) -> Self {
9979            self.0.request = v.into();
9980            self
9981        }
9982
9983        /// Sets all the options, replacing any prior values.
9984        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9985            self.0.options = v.into();
9986            self
9987        }
9988
9989        /// Sends the request.
9990        pub async fn send(self) -> Result<crate::model::ListDataAttributeBindingsResponse> {
9991            (*self.0.stub)
9992                .list_data_attribute_bindings(self.0.request, self.0.options)
9993                .await
9994                .map(crate::Response::into_body)
9995        }
9996
9997        /// Streams each page in the collection.
9998        pub fn by_page(
9999            self,
10000        ) -> impl google_cloud_gax::paginator::Paginator<
10001            crate::model::ListDataAttributeBindingsResponse,
10002            crate::Error,
10003        > {
10004            use std::clone::Clone;
10005            let token = self.0.request.page_token.clone();
10006            let execute = move |token: String| {
10007                let mut builder = self.clone();
10008                builder.0.request = builder.0.request.set_page_token(token);
10009                builder.send()
10010            };
10011            google_cloud_gax::paginator::internal::new_paginator(token, execute)
10012        }
10013
10014        /// Streams each item in the collection.
10015        pub fn by_item(
10016            self,
10017        ) -> impl google_cloud_gax::paginator::ItemPaginator<
10018            crate::model::ListDataAttributeBindingsResponse,
10019            crate::Error,
10020        > {
10021            use google_cloud_gax::paginator::Paginator;
10022            self.by_page().items()
10023        }
10024
10025        /// Sets the value of [parent][crate::model::ListDataAttributeBindingsRequest::parent].
10026        ///
10027        /// This is a **required** field for requests.
10028        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10029            self.0.request.parent = v.into();
10030            self
10031        }
10032
10033        /// Sets the value of [page_size][crate::model::ListDataAttributeBindingsRequest::page_size].
10034        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10035            self.0.request.page_size = v.into();
10036            self
10037        }
10038
10039        /// Sets the value of [page_token][crate::model::ListDataAttributeBindingsRequest::page_token].
10040        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10041            self.0.request.page_token = v.into();
10042            self
10043        }
10044
10045        /// Sets the value of [filter][crate::model::ListDataAttributeBindingsRequest::filter].
10046        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10047            self.0.request.filter = v.into();
10048            self
10049        }
10050
10051        /// Sets the value of [order_by][crate::model::ListDataAttributeBindingsRequest::order_by].
10052        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
10053            self.0.request.order_by = v.into();
10054            self
10055        }
10056    }
10057
10058    #[doc(hidden)]
10059    impl crate::RequestBuilder for ListDataAttributeBindings {
10060        fn request_options(&mut self) -> &mut crate::RequestOptions {
10061            &mut self.0.options
10062        }
10063    }
10064
10065    /// The request builder for [DataTaxonomyService::get_data_attribute_binding][crate::client::DataTaxonomyService::get_data_attribute_binding] calls.
10066    ///
10067    /// # Example
10068    /// ```
10069    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetDataAttributeBinding;
10070    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10071    ///
10072    /// let builder = prepare_request_builder();
10073    /// let response = builder.send().await?;
10074    /// # Ok(()) }
10075    ///
10076    /// fn prepare_request_builder() -> GetDataAttributeBinding {
10077    ///   # panic!();
10078    ///   // ... details omitted ...
10079    /// }
10080    /// ```
10081    #[derive(Clone, Debug)]
10082    pub struct GetDataAttributeBinding(
10083        RequestBuilder<crate::model::GetDataAttributeBindingRequest>,
10084    );
10085
10086    impl GetDataAttributeBinding {
10087        pub(crate) fn new(
10088            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10089        ) -> Self {
10090            Self(RequestBuilder::new(stub))
10091        }
10092
10093        /// Sets the full request, replacing any prior values.
10094        pub fn with_request<V: Into<crate::model::GetDataAttributeBindingRequest>>(
10095            mut self,
10096            v: V,
10097        ) -> Self {
10098            self.0.request = v.into();
10099            self
10100        }
10101
10102        /// Sets all the options, replacing any prior values.
10103        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10104            self.0.options = v.into();
10105            self
10106        }
10107
10108        /// Sends the request.
10109        pub async fn send(self) -> Result<crate::model::DataAttributeBinding> {
10110            (*self.0.stub)
10111                .get_data_attribute_binding(self.0.request, self.0.options)
10112                .await
10113                .map(crate::Response::into_body)
10114        }
10115
10116        /// Sets the value of [name][crate::model::GetDataAttributeBindingRequest::name].
10117        ///
10118        /// This is a **required** field for requests.
10119        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10120            self.0.request.name = v.into();
10121            self
10122        }
10123    }
10124
10125    #[doc(hidden)]
10126    impl crate::RequestBuilder for GetDataAttributeBinding {
10127        fn request_options(&mut self) -> &mut crate::RequestOptions {
10128            &mut self.0.options
10129        }
10130    }
10131
10132    /// The request builder for [DataTaxonomyService::create_data_attribute][crate::client::DataTaxonomyService::create_data_attribute] calls.
10133    ///
10134    /// # Example
10135    /// ```
10136    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CreateDataAttribute;
10137    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10138    /// use google_cloud_lro::Poller;
10139    ///
10140    /// let builder = prepare_request_builder();
10141    /// let response = builder.poller().until_done().await?;
10142    /// # Ok(()) }
10143    ///
10144    /// fn prepare_request_builder() -> CreateDataAttribute {
10145    ///   # panic!();
10146    ///   // ... details omitted ...
10147    /// }
10148    /// ```
10149    #[derive(Clone, Debug)]
10150    pub struct CreateDataAttribute(RequestBuilder<crate::model::CreateDataAttributeRequest>);
10151
10152    impl CreateDataAttribute {
10153        pub(crate) fn new(
10154            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10155        ) -> Self {
10156            Self(RequestBuilder::new(stub))
10157        }
10158
10159        /// Sets the full request, replacing any prior values.
10160        pub fn with_request<V: Into<crate::model::CreateDataAttributeRequest>>(
10161            mut self,
10162            v: V,
10163        ) -> Self {
10164            self.0.request = v.into();
10165            self
10166        }
10167
10168        /// Sets all the options, replacing any prior values.
10169        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10170            self.0.options = v.into();
10171            self
10172        }
10173
10174        /// Sends the request.
10175        ///
10176        /// # Long running operations
10177        ///
10178        /// This starts, but does not poll, a longrunning operation. More information
10179        /// on [create_data_attribute][crate::client::DataTaxonomyService::create_data_attribute].
10180        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10181            (*self.0.stub)
10182                .create_data_attribute(self.0.request, self.0.options)
10183                .await
10184                .map(crate::Response::into_body)
10185        }
10186
10187        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_attribute`.
10188        pub fn poller(
10189            self,
10190        ) -> impl google_cloud_lro::Poller<crate::model::DataAttribute, crate::model::OperationMetadata>
10191        {
10192            type Operation = google_cloud_lro::internal::Operation<
10193                crate::model::DataAttribute,
10194                crate::model::OperationMetadata,
10195            >;
10196            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10197            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10198
10199            let stub = self.0.stub.clone();
10200            let mut options = self.0.options.clone();
10201            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10202            let query = move |name| {
10203                let stub = stub.clone();
10204                let options = options.clone();
10205                async {
10206                    let op = GetOperation::new(stub)
10207                        .set_name(name)
10208                        .with_options(options)
10209                        .send()
10210                        .await?;
10211                    Ok(Operation::new(op))
10212                }
10213            };
10214
10215            let start = move || async {
10216                let op = self.send().await?;
10217                Ok(Operation::new(op))
10218            };
10219
10220            google_cloud_lro::internal::new_poller(
10221                polling_error_policy,
10222                polling_backoff_policy,
10223                start,
10224                query,
10225            )
10226        }
10227
10228        /// Sets the value of [parent][crate::model::CreateDataAttributeRequest::parent].
10229        ///
10230        /// This is a **required** field for requests.
10231        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10232            self.0.request.parent = v.into();
10233            self
10234        }
10235
10236        /// Sets the value of [data_attribute_id][crate::model::CreateDataAttributeRequest::data_attribute_id].
10237        ///
10238        /// This is a **required** field for requests.
10239        pub fn set_data_attribute_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
10240            self.0.request.data_attribute_id = v.into();
10241            self
10242        }
10243
10244        /// Sets the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
10245        ///
10246        /// This is a **required** field for requests.
10247        pub fn set_data_attribute<T>(mut self, v: T) -> Self
10248        where
10249            T: std::convert::Into<crate::model::DataAttribute>,
10250        {
10251            self.0.request.data_attribute = std::option::Option::Some(v.into());
10252            self
10253        }
10254
10255        /// Sets or clears the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
10256        ///
10257        /// This is a **required** field for requests.
10258        pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
10259        where
10260            T: std::convert::Into<crate::model::DataAttribute>,
10261        {
10262            self.0.request.data_attribute = v.map(|x| x.into());
10263            self
10264        }
10265
10266        /// Sets the value of [validate_only][crate::model::CreateDataAttributeRequest::validate_only].
10267        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10268            self.0.request.validate_only = v.into();
10269            self
10270        }
10271    }
10272
10273    #[doc(hidden)]
10274    impl crate::RequestBuilder for CreateDataAttribute {
10275        fn request_options(&mut self) -> &mut crate::RequestOptions {
10276            &mut self.0.options
10277        }
10278    }
10279
10280    /// The request builder for [DataTaxonomyService::update_data_attribute][crate::client::DataTaxonomyService::update_data_attribute] calls.
10281    ///
10282    /// # Example
10283    /// ```
10284    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::UpdateDataAttribute;
10285    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10286    /// use google_cloud_lro::Poller;
10287    ///
10288    /// let builder = prepare_request_builder();
10289    /// let response = builder.poller().until_done().await?;
10290    /// # Ok(()) }
10291    ///
10292    /// fn prepare_request_builder() -> UpdateDataAttribute {
10293    ///   # panic!();
10294    ///   // ... details omitted ...
10295    /// }
10296    /// ```
10297    #[derive(Clone, Debug)]
10298    pub struct UpdateDataAttribute(RequestBuilder<crate::model::UpdateDataAttributeRequest>);
10299
10300    impl UpdateDataAttribute {
10301        pub(crate) fn new(
10302            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10303        ) -> Self {
10304            Self(RequestBuilder::new(stub))
10305        }
10306
10307        /// Sets the full request, replacing any prior values.
10308        pub fn with_request<V: Into<crate::model::UpdateDataAttributeRequest>>(
10309            mut self,
10310            v: V,
10311        ) -> Self {
10312            self.0.request = v.into();
10313            self
10314        }
10315
10316        /// Sets all the options, replacing any prior values.
10317        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10318            self.0.options = v.into();
10319            self
10320        }
10321
10322        /// Sends the request.
10323        ///
10324        /// # Long running operations
10325        ///
10326        /// This starts, but does not poll, a longrunning operation. More information
10327        /// on [update_data_attribute][crate::client::DataTaxonomyService::update_data_attribute].
10328        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10329            (*self.0.stub)
10330                .update_data_attribute(self.0.request, self.0.options)
10331                .await
10332                .map(crate::Response::into_body)
10333        }
10334
10335        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_attribute`.
10336        pub fn poller(
10337            self,
10338        ) -> impl google_cloud_lro::Poller<crate::model::DataAttribute, crate::model::OperationMetadata>
10339        {
10340            type Operation = google_cloud_lro::internal::Operation<
10341                crate::model::DataAttribute,
10342                crate::model::OperationMetadata,
10343            >;
10344            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10345            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10346
10347            let stub = self.0.stub.clone();
10348            let mut options = self.0.options.clone();
10349            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10350            let query = move |name| {
10351                let stub = stub.clone();
10352                let options = options.clone();
10353                async {
10354                    let op = GetOperation::new(stub)
10355                        .set_name(name)
10356                        .with_options(options)
10357                        .send()
10358                        .await?;
10359                    Ok(Operation::new(op))
10360                }
10361            };
10362
10363            let start = move || async {
10364                let op = self.send().await?;
10365                Ok(Operation::new(op))
10366            };
10367
10368            google_cloud_lro::internal::new_poller(
10369                polling_error_policy,
10370                polling_backoff_policy,
10371                start,
10372                query,
10373            )
10374        }
10375
10376        /// Sets the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
10377        ///
10378        /// This is a **required** field for requests.
10379        pub fn set_update_mask<T>(mut self, v: T) -> Self
10380        where
10381            T: std::convert::Into<wkt::FieldMask>,
10382        {
10383            self.0.request.update_mask = std::option::Option::Some(v.into());
10384            self
10385        }
10386
10387        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
10388        ///
10389        /// This is a **required** field for requests.
10390        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10391        where
10392            T: std::convert::Into<wkt::FieldMask>,
10393        {
10394            self.0.request.update_mask = v.map(|x| x.into());
10395            self
10396        }
10397
10398        /// Sets the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
10399        ///
10400        /// This is a **required** field for requests.
10401        pub fn set_data_attribute<T>(mut self, v: T) -> Self
10402        where
10403            T: std::convert::Into<crate::model::DataAttribute>,
10404        {
10405            self.0.request.data_attribute = std::option::Option::Some(v.into());
10406            self
10407        }
10408
10409        /// Sets or clears the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
10410        ///
10411        /// This is a **required** field for requests.
10412        pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
10413        where
10414            T: std::convert::Into<crate::model::DataAttribute>,
10415        {
10416            self.0.request.data_attribute = v.map(|x| x.into());
10417            self
10418        }
10419
10420        /// Sets the value of [validate_only][crate::model::UpdateDataAttributeRequest::validate_only].
10421        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10422            self.0.request.validate_only = v.into();
10423            self
10424        }
10425    }
10426
10427    #[doc(hidden)]
10428    impl crate::RequestBuilder for UpdateDataAttribute {
10429        fn request_options(&mut self) -> &mut crate::RequestOptions {
10430            &mut self.0.options
10431        }
10432    }
10433
10434    /// The request builder for [DataTaxonomyService::delete_data_attribute][crate::client::DataTaxonomyService::delete_data_attribute] calls.
10435    ///
10436    /// # Example
10437    /// ```
10438    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteDataAttribute;
10439    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10440    /// use google_cloud_lro::Poller;
10441    ///
10442    /// let builder = prepare_request_builder();
10443    /// let response = builder.poller().until_done().await?;
10444    /// # Ok(()) }
10445    ///
10446    /// fn prepare_request_builder() -> DeleteDataAttribute {
10447    ///   # panic!();
10448    ///   // ... details omitted ...
10449    /// }
10450    /// ```
10451    #[derive(Clone, Debug)]
10452    pub struct DeleteDataAttribute(RequestBuilder<crate::model::DeleteDataAttributeRequest>);
10453
10454    impl DeleteDataAttribute {
10455        pub(crate) fn new(
10456            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10457        ) -> Self {
10458            Self(RequestBuilder::new(stub))
10459        }
10460
10461        /// Sets the full request, replacing any prior values.
10462        pub fn with_request<V: Into<crate::model::DeleteDataAttributeRequest>>(
10463            mut self,
10464            v: V,
10465        ) -> Self {
10466            self.0.request = v.into();
10467            self
10468        }
10469
10470        /// Sets all the options, replacing any prior values.
10471        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10472            self.0.options = v.into();
10473            self
10474        }
10475
10476        /// Sends the request.
10477        ///
10478        /// # Long running operations
10479        ///
10480        /// This starts, but does not poll, a longrunning operation. More information
10481        /// on [delete_data_attribute][crate::client::DataTaxonomyService::delete_data_attribute].
10482        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10483            (*self.0.stub)
10484                .delete_data_attribute(self.0.request, self.0.options)
10485                .await
10486                .map(crate::Response::into_body)
10487        }
10488
10489        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_attribute`.
10490        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
10491            type Operation =
10492                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
10493            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10494            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10495
10496            let stub = self.0.stub.clone();
10497            let mut options = self.0.options.clone();
10498            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10499            let query = move |name| {
10500                let stub = stub.clone();
10501                let options = options.clone();
10502                async {
10503                    let op = GetOperation::new(stub)
10504                        .set_name(name)
10505                        .with_options(options)
10506                        .send()
10507                        .await?;
10508                    Ok(Operation::new(op))
10509                }
10510            };
10511
10512            let start = move || async {
10513                let op = self.send().await?;
10514                Ok(Operation::new(op))
10515            };
10516
10517            google_cloud_lro::internal::new_unit_response_poller(
10518                polling_error_policy,
10519                polling_backoff_policy,
10520                start,
10521                query,
10522            )
10523        }
10524
10525        /// Sets the value of [name][crate::model::DeleteDataAttributeRequest::name].
10526        ///
10527        /// This is a **required** field for requests.
10528        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10529            self.0.request.name = v.into();
10530            self
10531        }
10532
10533        /// Sets the value of [etag][crate::model::DeleteDataAttributeRequest::etag].
10534        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
10535            self.0.request.etag = v.into();
10536            self
10537        }
10538    }
10539
10540    #[doc(hidden)]
10541    impl crate::RequestBuilder for DeleteDataAttribute {
10542        fn request_options(&mut self) -> &mut crate::RequestOptions {
10543            &mut self.0.options
10544        }
10545    }
10546
10547    /// The request builder for [DataTaxonomyService::list_data_attributes][crate::client::DataTaxonomyService::list_data_attributes] calls.
10548    ///
10549    /// # Example
10550    /// ```
10551    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListDataAttributes;
10552    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10553    /// use google_cloud_gax::paginator::ItemPaginator;
10554    ///
10555    /// let builder = prepare_request_builder();
10556    /// let mut items = builder.by_item();
10557    /// while let Some(result) = items.next().await {
10558    ///   let item = result?;
10559    /// }
10560    /// # Ok(()) }
10561    ///
10562    /// fn prepare_request_builder() -> ListDataAttributes {
10563    ///   # panic!();
10564    ///   // ... details omitted ...
10565    /// }
10566    /// ```
10567    #[derive(Clone, Debug)]
10568    pub struct ListDataAttributes(RequestBuilder<crate::model::ListDataAttributesRequest>);
10569
10570    impl ListDataAttributes {
10571        pub(crate) fn new(
10572            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10573        ) -> Self {
10574            Self(RequestBuilder::new(stub))
10575        }
10576
10577        /// Sets the full request, replacing any prior values.
10578        pub fn with_request<V: Into<crate::model::ListDataAttributesRequest>>(
10579            mut self,
10580            v: V,
10581        ) -> Self {
10582            self.0.request = v.into();
10583            self
10584        }
10585
10586        /// Sets all the options, replacing any prior values.
10587        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10588            self.0.options = v.into();
10589            self
10590        }
10591
10592        /// Sends the request.
10593        pub async fn send(self) -> Result<crate::model::ListDataAttributesResponse> {
10594            (*self.0.stub)
10595                .list_data_attributes(self.0.request, self.0.options)
10596                .await
10597                .map(crate::Response::into_body)
10598        }
10599
10600        /// Streams each page in the collection.
10601        pub fn by_page(
10602            self,
10603        ) -> impl google_cloud_gax::paginator::Paginator<
10604            crate::model::ListDataAttributesResponse,
10605            crate::Error,
10606        > {
10607            use std::clone::Clone;
10608            let token = self.0.request.page_token.clone();
10609            let execute = move |token: String| {
10610                let mut builder = self.clone();
10611                builder.0.request = builder.0.request.set_page_token(token);
10612                builder.send()
10613            };
10614            google_cloud_gax::paginator::internal::new_paginator(token, execute)
10615        }
10616
10617        /// Streams each item in the collection.
10618        pub fn by_item(
10619            self,
10620        ) -> impl google_cloud_gax::paginator::ItemPaginator<
10621            crate::model::ListDataAttributesResponse,
10622            crate::Error,
10623        > {
10624            use google_cloud_gax::paginator::Paginator;
10625            self.by_page().items()
10626        }
10627
10628        /// Sets the value of [parent][crate::model::ListDataAttributesRequest::parent].
10629        ///
10630        /// This is a **required** field for requests.
10631        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10632            self.0.request.parent = v.into();
10633            self
10634        }
10635
10636        /// Sets the value of [page_size][crate::model::ListDataAttributesRequest::page_size].
10637        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10638            self.0.request.page_size = v.into();
10639            self
10640        }
10641
10642        /// Sets the value of [page_token][crate::model::ListDataAttributesRequest::page_token].
10643        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10644            self.0.request.page_token = v.into();
10645            self
10646        }
10647
10648        /// Sets the value of [filter][crate::model::ListDataAttributesRequest::filter].
10649        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10650            self.0.request.filter = v.into();
10651            self
10652        }
10653
10654        /// Sets the value of [order_by][crate::model::ListDataAttributesRequest::order_by].
10655        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
10656            self.0.request.order_by = v.into();
10657            self
10658        }
10659    }
10660
10661    #[doc(hidden)]
10662    impl crate::RequestBuilder for ListDataAttributes {
10663        fn request_options(&mut self) -> &mut crate::RequestOptions {
10664            &mut self.0.options
10665        }
10666    }
10667
10668    /// The request builder for [DataTaxonomyService::get_data_attribute][crate::client::DataTaxonomyService::get_data_attribute] calls.
10669    ///
10670    /// # Example
10671    /// ```
10672    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetDataAttribute;
10673    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10674    ///
10675    /// let builder = prepare_request_builder();
10676    /// let response = builder.send().await?;
10677    /// # Ok(()) }
10678    ///
10679    /// fn prepare_request_builder() -> GetDataAttribute {
10680    ///   # panic!();
10681    ///   // ... details omitted ...
10682    /// }
10683    /// ```
10684    #[derive(Clone, Debug)]
10685    pub struct GetDataAttribute(RequestBuilder<crate::model::GetDataAttributeRequest>);
10686
10687    impl GetDataAttribute {
10688        pub(crate) fn new(
10689            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10690        ) -> Self {
10691            Self(RequestBuilder::new(stub))
10692        }
10693
10694        /// Sets the full request, replacing any prior values.
10695        pub fn with_request<V: Into<crate::model::GetDataAttributeRequest>>(
10696            mut self,
10697            v: V,
10698        ) -> Self {
10699            self.0.request = v.into();
10700            self
10701        }
10702
10703        /// Sets all the options, replacing any prior values.
10704        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10705            self.0.options = v.into();
10706            self
10707        }
10708
10709        /// Sends the request.
10710        pub async fn send(self) -> Result<crate::model::DataAttribute> {
10711            (*self.0.stub)
10712                .get_data_attribute(self.0.request, self.0.options)
10713                .await
10714                .map(crate::Response::into_body)
10715        }
10716
10717        /// Sets the value of [name][crate::model::GetDataAttributeRequest::name].
10718        ///
10719        /// This is a **required** field for requests.
10720        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10721            self.0.request.name = v.into();
10722            self
10723        }
10724    }
10725
10726    #[doc(hidden)]
10727    impl crate::RequestBuilder for GetDataAttribute {
10728        fn request_options(&mut self) -> &mut crate::RequestOptions {
10729            &mut self.0.options
10730        }
10731    }
10732
10733    /// The request builder for [DataTaxonomyService::list_locations][crate::client::DataTaxonomyService::list_locations] calls.
10734    ///
10735    /// # Example
10736    /// ```
10737    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListLocations;
10738    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10739    /// use google_cloud_gax::paginator::ItemPaginator;
10740    ///
10741    /// let builder = prepare_request_builder();
10742    /// let mut items = builder.by_item();
10743    /// while let Some(result) = items.next().await {
10744    ///   let item = result?;
10745    /// }
10746    /// # Ok(()) }
10747    ///
10748    /// fn prepare_request_builder() -> ListLocations {
10749    ///   # panic!();
10750    ///   // ... details omitted ...
10751    /// }
10752    /// ```
10753    #[derive(Clone, Debug)]
10754    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
10755
10756    impl ListLocations {
10757        pub(crate) fn new(
10758            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10759        ) -> Self {
10760            Self(RequestBuilder::new(stub))
10761        }
10762
10763        /// Sets the full request, replacing any prior values.
10764        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
10765            mut self,
10766            v: V,
10767        ) -> Self {
10768            self.0.request = v.into();
10769            self
10770        }
10771
10772        /// Sets all the options, replacing any prior values.
10773        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10774            self.0.options = v.into();
10775            self
10776        }
10777
10778        /// Sends the request.
10779        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
10780            (*self.0.stub)
10781                .list_locations(self.0.request, self.0.options)
10782                .await
10783                .map(crate::Response::into_body)
10784        }
10785
10786        /// Streams each page in the collection.
10787        pub fn by_page(
10788            self,
10789        ) -> impl google_cloud_gax::paginator::Paginator<
10790            google_cloud_location::model::ListLocationsResponse,
10791            crate::Error,
10792        > {
10793            use std::clone::Clone;
10794            let token = self.0.request.page_token.clone();
10795            let execute = move |token: String| {
10796                let mut builder = self.clone();
10797                builder.0.request = builder.0.request.set_page_token(token);
10798                builder.send()
10799            };
10800            google_cloud_gax::paginator::internal::new_paginator(token, execute)
10801        }
10802
10803        /// Streams each item in the collection.
10804        pub fn by_item(
10805            self,
10806        ) -> impl google_cloud_gax::paginator::ItemPaginator<
10807            google_cloud_location::model::ListLocationsResponse,
10808            crate::Error,
10809        > {
10810            use google_cloud_gax::paginator::Paginator;
10811            self.by_page().items()
10812        }
10813
10814        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
10815        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10816            self.0.request.name = v.into();
10817            self
10818        }
10819
10820        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
10821        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10822            self.0.request.filter = v.into();
10823            self
10824        }
10825
10826        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
10827        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10828            self.0.request.page_size = v.into();
10829            self
10830        }
10831
10832        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
10833        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10834            self.0.request.page_token = v.into();
10835            self
10836        }
10837    }
10838
10839    #[doc(hidden)]
10840    impl crate::RequestBuilder for ListLocations {
10841        fn request_options(&mut self) -> &mut crate::RequestOptions {
10842            &mut self.0.options
10843        }
10844    }
10845
10846    /// The request builder for [DataTaxonomyService::get_location][crate::client::DataTaxonomyService::get_location] calls.
10847    ///
10848    /// # Example
10849    /// ```
10850    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetLocation;
10851    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10852    ///
10853    /// let builder = prepare_request_builder();
10854    /// let response = builder.send().await?;
10855    /// # Ok(()) }
10856    ///
10857    /// fn prepare_request_builder() -> GetLocation {
10858    ///   # panic!();
10859    ///   // ... details omitted ...
10860    /// }
10861    /// ```
10862    #[derive(Clone, Debug)]
10863    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
10864
10865    impl GetLocation {
10866        pub(crate) fn new(
10867            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10868        ) -> Self {
10869            Self(RequestBuilder::new(stub))
10870        }
10871
10872        /// Sets the full request, replacing any prior values.
10873        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
10874            mut self,
10875            v: V,
10876        ) -> Self {
10877            self.0.request = v.into();
10878            self
10879        }
10880
10881        /// Sets all the options, replacing any prior values.
10882        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10883            self.0.options = v.into();
10884            self
10885        }
10886
10887        /// Sends the request.
10888        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
10889            (*self.0.stub)
10890                .get_location(self.0.request, self.0.options)
10891                .await
10892                .map(crate::Response::into_body)
10893        }
10894
10895        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
10896        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10897            self.0.request.name = v.into();
10898            self
10899        }
10900    }
10901
10902    #[doc(hidden)]
10903    impl crate::RequestBuilder for GetLocation {
10904        fn request_options(&mut self) -> &mut crate::RequestOptions {
10905            &mut self.0.options
10906        }
10907    }
10908
10909    /// The request builder for [DataTaxonomyService::set_iam_policy][crate::client::DataTaxonomyService::set_iam_policy] calls.
10910    ///
10911    /// # Example
10912    /// ```
10913    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::SetIamPolicy;
10914    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10915    ///
10916    /// let builder = prepare_request_builder();
10917    /// let response = builder.send().await?;
10918    /// # Ok(()) }
10919    ///
10920    /// fn prepare_request_builder() -> SetIamPolicy {
10921    ///   # panic!();
10922    ///   // ... details omitted ...
10923    /// }
10924    /// ```
10925    #[derive(Clone, Debug)]
10926    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
10927
10928    impl SetIamPolicy {
10929        pub(crate) fn new(
10930            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10931        ) -> Self {
10932            Self(RequestBuilder::new(stub))
10933        }
10934
10935        /// Sets the full request, replacing any prior values.
10936        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
10937            mut self,
10938            v: V,
10939        ) -> Self {
10940            self.0.request = v.into();
10941            self
10942        }
10943
10944        /// Sets all the options, replacing any prior values.
10945        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10946            self.0.options = v.into();
10947            self
10948        }
10949
10950        /// Sends the request.
10951        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
10952            (*self.0.stub)
10953                .set_iam_policy(self.0.request, self.0.options)
10954                .await
10955                .map(crate::Response::into_body)
10956        }
10957
10958        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
10959        ///
10960        /// This is a **required** field for requests.
10961        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
10962            self.0.request.resource = v.into();
10963            self
10964        }
10965
10966        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
10967        ///
10968        /// This is a **required** field for requests.
10969        pub fn set_policy<T>(mut self, v: T) -> Self
10970        where
10971            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
10972        {
10973            self.0.request.policy = std::option::Option::Some(v.into());
10974            self
10975        }
10976
10977        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
10978        ///
10979        /// This is a **required** field for requests.
10980        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
10981        where
10982            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
10983        {
10984            self.0.request.policy = v.map(|x| x.into());
10985            self
10986        }
10987
10988        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
10989        pub fn set_update_mask<T>(mut self, v: T) -> Self
10990        where
10991            T: std::convert::Into<wkt::FieldMask>,
10992        {
10993            self.0.request.update_mask = std::option::Option::Some(v.into());
10994            self
10995        }
10996
10997        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
10998        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10999        where
11000            T: std::convert::Into<wkt::FieldMask>,
11001        {
11002            self.0.request.update_mask = v.map(|x| x.into());
11003            self
11004        }
11005    }
11006
11007    #[doc(hidden)]
11008    impl crate::RequestBuilder for SetIamPolicy {
11009        fn request_options(&mut self) -> &mut crate::RequestOptions {
11010            &mut self.0.options
11011        }
11012    }
11013
11014    /// The request builder for [DataTaxonomyService::get_iam_policy][crate::client::DataTaxonomyService::get_iam_policy] calls.
11015    ///
11016    /// # Example
11017    /// ```
11018    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetIamPolicy;
11019    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11020    ///
11021    /// let builder = prepare_request_builder();
11022    /// let response = builder.send().await?;
11023    /// # Ok(()) }
11024    ///
11025    /// fn prepare_request_builder() -> GetIamPolicy {
11026    ///   # panic!();
11027    ///   // ... details omitted ...
11028    /// }
11029    /// ```
11030    #[derive(Clone, Debug)]
11031    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
11032
11033    impl GetIamPolicy {
11034        pub(crate) fn new(
11035            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11036        ) -> Self {
11037            Self(RequestBuilder::new(stub))
11038        }
11039
11040        /// Sets the full request, replacing any prior values.
11041        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
11042            mut self,
11043            v: V,
11044        ) -> Self {
11045            self.0.request = v.into();
11046            self
11047        }
11048
11049        /// Sets all the options, replacing any prior values.
11050        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11051            self.0.options = v.into();
11052            self
11053        }
11054
11055        /// Sends the request.
11056        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
11057            (*self.0.stub)
11058                .get_iam_policy(self.0.request, self.0.options)
11059                .await
11060                .map(crate::Response::into_body)
11061        }
11062
11063        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
11064        ///
11065        /// This is a **required** field for requests.
11066        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
11067            self.0.request.resource = v.into();
11068            self
11069        }
11070
11071        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
11072        pub fn set_options<T>(mut self, v: T) -> Self
11073        where
11074            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
11075        {
11076            self.0.request.options = std::option::Option::Some(v.into());
11077            self
11078        }
11079
11080        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
11081        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
11082        where
11083            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
11084        {
11085            self.0.request.options = v.map(|x| x.into());
11086            self
11087        }
11088    }
11089
11090    #[doc(hidden)]
11091    impl crate::RequestBuilder for GetIamPolicy {
11092        fn request_options(&mut self) -> &mut crate::RequestOptions {
11093            &mut self.0.options
11094        }
11095    }
11096
11097    /// The request builder for [DataTaxonomyService::test_iam_permissions][crate::client::DataTaxonomyService::test_iam_permissions] calls.
11098    ///
11099    /// # Example
11100    /// ```
11101    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::TestIamPermissions;
11102    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11103    ///
11104    /// let builder = prepare_request_builder();
11105    /// let response = builder.send().await?;
11106    /// # Ok(()) }
11107    ///
11108    /// fn prepare_request_builder() -> TestIamPermissions {
11109    ///   # panic!();
11110    ///   // ... details omitted ...
11111    /// }
11112    /// ```
11113    #[derive(Clone, Debug)]
11114    pub struct TestIamPermissions(
11115        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
11116    );
11117
11118    impl TestIamPermissions {
11119        pub(crate) fn new(
11120            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11121        ) -> Self {
11122            Self(RequestBuilder::new(stub))
11123        }
11124
11125        /// Sets the full request, replacing any prior values.
11126        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
11127            mut self,
11128            v: V,
11129        ) -> Self {
11130            self.0.request = v.into();
11131            self
11132        }
11133
11134        /// Sets all the options, replacing any prior values.
11135        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11136            self.0.options = v.into();
11137            self
11138        }
11139
11140        /// Sends the request.
11141        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
11142            (*self.0.stub)
11143                .test_iam_permissions(self.0.request, self.0.options)
11144                .await
11145                .map(crate::Response::into_body)
11146        }
11147
11148        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
11149        ///
11150        /// This is a **required** field for requests.
11151        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
11152            self.0.request.resource = v.into();
11153            self
11154        }
11155
11156        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
11157        ///
11158        /// This is a **required** field for requests.
11159        pub fn set_permissions<T, V>(mut self, v: T) -> Self
11160        where
11161            T: std::iter::IntoIterator<Item = V>,
11162            V: std::convert::Into<std::string::String>,
11163        {
11164            use std::iter::Iterator;
11165            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
11166            self
11167        }
11168    }
11169
11170    #[doc(hidden)]
11171    impl crate::RequestBuilder for TestIamPermissions {
11172        fn request_options(&mut self) -> &mut crate::RequestOptions {
11173            &mut self.0.options
11174        }
11175    }
11176
11177    /// The request builder for [DataTaxonomyService::list_operations][crate::client::DataTaxonomyService::list_operations] calls.
11178    ///
11179    /// # Example
11180    /// ```
11181    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListOperations;
11182    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11183    /// use google_cloud_gax::paginator::ItemPaginator;
11184    ///
11185    /// let builder = prepare_request_builder();
11186    /// let mut items = builder.by_item();
11187    /// while let Some(result) = items.next().await {
11188    ///   let item = result?;
11189    /// }
11190    /// # Ok(()) }
11191    ///
11192    /// fn prepare_request_builder() -> ListOperations {
11193    ///   # panic!();
11194    ///   // ... details omitted ...
11195    /// }
11196    /// ```
11197    #[derive(Clone, Debug)]
11198    pub struct ListOperations(
11199        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
11200    );
11201
11202    impl ListOperations {
11203        pub(crate) fn new(
11204            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11205        ) -> Self {
11206            Self(RequestBuilder::new(stub))
11207        }
11208
11209        /// Sets the full request, replacing any prior values.
11210        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
11211            mut self,
11212            v: V,
11213        ) -> Self {
11214            self.0.request = v.into();
11215            self
11216        }
11217
11218        /// Sets all the options, replacing any prior values.
11219        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11220            self.0.options = v.into();
11221            self
11222        }
11223
11224        /// Sends the request.
11225        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
11226            (*self.0.stub)
11227                .list_operations(self.0.request, self.0.options)
11228                .await
11229                .map(crate::Response::into_body)
11230        }
11231
11232        /// Streams each page in the collection.
11233        pub fn by_page(
11234            self,
11235        ) -> impl google_cloud_gax::paginator::Paginator<
11236            google_cloud_longrunning::model::ListOperationsResponse,
11237            crate::Error,
11238        > {
11239            use std::clone::Clone;
11240            let token = self.0.request.page_token.clone();
11241            let execute = move |token: String| {
11242                let mut builder = self.clone();
11243                builder.0.request = builder.0.request.set_page_token(token);
11244                builder.send()
11245            };
11246            google_cloud_gax::paginator::internal::new_paginator(token, execute)
11247        }
11248
11249        /// Streams each item in the collection.
11250        pub fn by_item(
11251            self,
11252        ) -> impl google_cloud_gax::paginator::ItemPaginator<
11253            google_cloud_longrunning::model::ListOperationsResponse,
11254            crate::Error,
11255        > {
11256            use google_cloud_gax::paginator::Paginator;
11257            self.by_page().items()
11258        }
11259
11260        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
11261        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11262            self.0.request.name = v.into();
11263            self
11264        }
11265
11266        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
11267        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
11268            self.0.request.filter = v.into();
11269            self
11270        }
11271
11272        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
11273        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
11274            self.0.request.page_size = v.into();
11275            self
11276        }
11277
11278        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
11279        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
11280            self.0.request.page_token = v.into();
11281            self
11282        }
11283
11284        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
11285        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
11286            self.0.request.return_partial_success = v.into();
11287            self
11288        }
11289    }
11290
11291    #[doc(hidden)]
11292    impl crate::RequestBuilder for ListOperations {
11293        fn request_options(&mut self) -> &mut crate::RequestOptions {
11294            &mut self.0.options
11295        }
11296    }
11297
11298    /// The request builder for [DataTaxonomyService::get_operation][crate::client::DataTaxonomyService::get_operation] calls.
11299    ///
11300    /// # Example
11301    /// ```
11302    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetOperation;
11303    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11304    ///
11305    /// let builder = prepare_request_builder();
11306    /// let response = builder.send().await?;
11307    /// # Ok(()) }
11308    ///
11309    /// fn prepare_request_builder() -> GetOperation {
11310    ///   # panic!();
11311    ///   // ... details omitted ...
11312    /// }
11313    /// ```
11314    #[derive(Clone, Debug)]
11315    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
11316
11317    impl GetOperation {
11318        pub(crate) fn new(
11319            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11320        ) -> Self {
11321            Self(RequestBuilder::new(stub))
11322        }
11323
11324        /// Sets the full request, replacing any prior values.
11325        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
11326            mut self,
11327            v: V,
11328        ) -> Self {
11329            self.0.request = v.into();
11330            self
11331        }
11332
11333        /// Sets all the options, replacing any prior values.
11334        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11335            self.0.options = v.into();
11336            self
11337        }
11338
11339        /// Sends the request.
11340        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11341            (*self.0.stub)
11342                .get_operation(self.0.request, self.0.options)
11343                .await
11344                .map(crate::Response::into_body)
11345        }
11346
11347        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
11348        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11349            self.0.request.name = v.into();
11350            self
11351        }
11352    }
11353
11354    #[doc(hidden)]
11355    impl crate::RequestBuilder for GetOperation {
11356        fn request_options(&mut self) -> &mut crate::RequestOptions {
11357            &mut self.0.options
11358        }
11359    }
11360
11361    /// The request builder for [DataTaxonomyService::delete_operation][crate::client::DataTaxonomyService::delete_operation] calls.
11362    ///
11363    /// # Example
11364    /// ```
11365    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteOperation;
11366    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11367    ///
11368    /// let builder = prepare_request_builder();
11369    /// let response = builder.send().await?;
11370    /// # Ok(()) }
11371    ///
11372    /// fn prepare_request_builder() -> DeleteOperation {
11373    ///   # panic!();
11374    ///   // ... details omitted ...
11375    /// }
11376    /// ```
11377    #[derive(Clone, Debug)]
11378    pub struct DeleteOperation(
11379        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
11380    );
11381
11382    impl DeleteOperation {
11383        pub(crate) fn new(
11384            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11385        ) -> Self {
11386            Self(RequestBuilder::new(stub))
11387        }
11388
11389        /// Sets the full request, replacing any prior values.
11390        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
11391            mut self,
11392            v: V,
11393        ) -> Self {
11394            self.0.request = v.into();
11395            self
11396        }
11397
11398        /// Sets all the options, replacing any prior values.
11399        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11400            self.0.options = v.into();
11401            self
11402        }
11403
11404        /// Sends the request.
11405        pub async fn send(self) -> Result<()> {
11406            (*self.0.stub)
11407                .delete_operation(self.0.request, self.0.options)
11408                .await
11409                .map(crate::Response::into_body)
11410        }
11411
11412        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
11413        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11414            self.0.request.name = v.into();
11415            self
11416        }
11417    }
11418
11419    #[doc(hidden)]
11420    impl crate::RequestBuilder for DeleteOperation {
11421        fn request_options(&mut self) -> &mut crate::RequestOptions {
11422            &mut self.0.options
11423        }
11424    }
11425
11426    /// The request builder for [DataTaxonomyService::cancel_operation][crate::client::DataTaxonomyService::cancel_operation] calls.
11427    ///
11428    /// # Example
11429    /// ```
11430    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CancelOperation;
11431    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11432    ///
11433    /// let builder = prepare_request_builder();
11434    /// let response = builder.send().await?;
11435    /// # Ok(()) }
11436    ///
11437    /// fn prepare_request_builder() -> CancelOperation {
11438    ///   # panic!();
11439    ///   // ... details omitted ...
11440    /// }
11441    /// ```
11442    #[derive(Clone, Debug)]
11443    pub struct CancelOperation(
11444        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
11445    );
11446
11447    impl CancelOperation {
11448        pub(crate) fn new(
11449            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11450        ) -> Self {
11451            Self(RequestBuilder::new(stub))
11452        }
11453
11454        /// Sets the full request, replacing any prior values.
11455        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
11456            mut self,
11457            v: V,
11458        ) -> Self {
11459            self.0.request = v.into();
11460            self
11461        }
11462
11463        /// Sets all the options, replacing any prior values.
11464        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11465            self.0.options = v.into();
11466            self
11467        }
11468
11469        /// Sends the request.
11470        pub async fn send(self) -> Result<()> {
11471            (*self.0.stub)
11472                .cancel_operation(self.0.request, self.0.options)
11473                .await
11474                .map(crate::Response::into_body)
11475        }
11476
11477        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
11478        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11479            self.0.request.name = v.into();
11480            self
11481        }
11482    }
11483
11484    #[doc(hidden)]
11485    impl crate::RequestBuilder for CancelOperation {
11486        fn request_options(&mut self) -> &mut crate::RequestOptions {
11487            &mut self.0.options
11488        }
11489    }
11490}
11491
11492pub mod data_scan_service {
11493    use crate::Result;
11494
11495    /// A builder for [DataScanService][crate::client::DataScanService].
11496    ///
11497    /// ```
11498    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
11499    /// # use google_cloud_dataplex_v1::*;
11500    /// # use builder::data_scan_service::ClientBuilder;
11501    /// # use client::DataScanService;
11502    /// let builder : ClientBuilder = DataScanService::builder();
11503    /// let client = builder
11504    ///     .with_endpoint("https://dataplex.googleapis.com")
11505    ///     .build().await?;
11506    /// # Ok(()) }
11507    /// ```
11508    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
11509
11510    pub(crate) mod client {
11511        use super::super::super::client::DataScanService;
11512        pub struct Factory;
11513        impl crate::ClientFactory for Factory {
11514            type Client = DataScanService;
11515            type Credentials = gaxi::options::Credentials;
11516            async fn build(
11517                self,
11518                config: gaxi::options::ClientConfig,
11519            ) -> crate::ClientBuilderResult<Self::Client> {
11520                Self::Client::new(config).await
11521            }
11522        }
11523    }
11524
11525    /// Common implementation for [crate::client::DataScanService] request builders.
11526    #[derive(Clone, Debug)]
11527    pub(crate) struct RequestBuilder<R: std::default::Default> {
11528        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11529        request: R,
11530        options: crate::RequestOptions,
11531    }
11532
11533    impl<R> RequestBuilder<R>
11534    where
11535        R: std::default::Default,
11536    {
11537        pub(crate) fn new(
11538            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11539        ) -> Self {
11540            Self {
11541                stub,
11542                request: R::default(),
11543                options: crate::RequestOptions::default(),
11544            }
11545        }
11546    }
11547
11548    /// The request builder for [DataScanService::create_data_scan][crate::client::DataScanService::create_data_scan] calls.
11549    ///
11550    /// # Example
11551    /// ```
11552    /// # use google_cloud_dataplex_v1::builder::data_scan_service::CreateDataScan;
11553    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11554    /// use google_cloud_lro::Poller;
11555    ///
11556    /// let builder = prepare_request_builder();
11557    /// let response = builder.poller().until_done().await?;
11558    /// # Ok(()) }
11559    ///
11560    /// fn prepare_request_builder() -> CreateDataScan {
11561    ///   # panic!();
11562    ///   // ... details omitted ...
11563    /// }
11564    /// ```
11565    #[derive(Clone, Debug)]
11566    pub struct CreateDataScan(RequestBuilder<crate::model::CreateDataScanRequest>);
11567
11568    impl CreateDataScan {
11569        pub(crate) fn new(
11570            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11571        ) -> Self {
11572            Self(RequestBuilder::new(stub))
11573        }
11574
11575        /// Sets the full request, replacing any prior values.
11576        pub fn with_request<V: Into<crate::model::CreateDataScanRequest>>(mut self, v: V) -> Self {
11577            self.0.request = v.into();
11578            self
11579        }
11580
11581        /// Sets all the options, replacing any prior values.
11582        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11583            self.0.options = v.into();
11584            self
11585        }
11586
11587        /// Sends the request.
11588        ///
11589        /// # Long running operations
11590        ///
11591        /// This starts, but does not poll, a longrunning operation. More information
11592        /// on [create_data_scan][crate::client::DataScanService::create_data_scan].
11593        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11594            (*self.0.stub)
11595                .create_data_scan(self.0.request, self.0.options)
11596                .await
11597                .map(crate::Response::into_body)
11598        }
11599
11600        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_scan`.
11601        pub fn poller(
11602            self,
11603        ) -> impl google_cloud_lro::Poller<crate::model::DataScan, crate::model::OperationMetadata>
11604        {
11605            type Operation = google_cloud_lro::internal::Operation<
11606                crate::model::DataScan,
11607                crate::model::OperationMetadata,
11608            >;
11609            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11610            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11611
11612            let stub = self.0.stub.clone();
11613            let mut options = self.0.options.clone();
11614            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
11615            let query = move |name| {
11616                let stub = stub.clone();
11617                let options = options.clone();
11618                async {
11619                    let op = GetOperation::new(stub)
11620                        .set_name(name)
11621                        .with_options(options)
11622                        .send()
11623                        .await?;
11624                    Ok(Operation::new(op))
11625                }
11626            };
11627
11628            let start = move || async {
11629                let op = self.send().await?;
11630                Ok(Operation::new(op))
11631            };
11632
11633            google_cloud_lro::internal::new_poller(
11634                polling_error_policy,
11635                polling_backoff_policy,
11636                start,
11637                query,
11638            )
11639        }
11640
11641        /// Sets the value of [parent][crate::model::CreateDataScanRequest::parent].
11642        ///
11643        /// This is a **required** field for requests.
11644        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
11645            self.0.request.parent = v.into();
11646            self
11647        }
11648
11649        /// Sets the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
11650        ///
11651        /// This is a **required** field for requests.
11652        pub fn set_data_scan<T>(mut self, v: T) -> Self
11653        where
11654            T: std::convert::Into<crate::model::DataScan>,
11655        {
11656            self.0.request.data_scan = std::option::Option::Some(v.into());
11657            self
11658        }
11659
11660        /// Sets or clears the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
11661        ///
11662        /// This is a **required** field for requests.
11663        pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
11664        where
11665            T: std::convert::Into<crate::model::DataScan>,
11666        {
11667            self.0.request.data_scan = v.map(|x| x.into());
11668            self
11669        }
11670
11671        /// Sets the value of [data_scan_id][crate::model::CreateDataScanRequest::data_scan_id].
11672        ///
11673        /// This is a **required** field for requests.
11674        pub fn set_data_scan_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
11675            self.0.request.data_scan_id = v.into();
11676            self
11677        }
11678
11679        /// Sets the value of [validate_only][crate::model::CreateDataScanRequest::validate_only].
11680        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
11681            self.0.request.validate_only = v.into();
11682            self
11683        }
11684    }
11685
11686    #[doc(hidden)]
11687    impl crate::RequestBuilder for CreateDataScan {
11688        fn request_options(&mut self) -> &mut crate::RequestOptions {
11689            &mut self.0.options
11690        }
11691    }
11692
11693    /// The request builder for [DataScanService::update_data_scan][crate::client::DataScanService::update_data_scan] calls.
11694    ///
11695    /// # Example
11696    /// ```
11697    /// # use google_cloud_dataplex_v1::builder::data_scan_service::UpdateDataScan;
11698    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11699    /// use google_cloud_lro::Poller;
11700    ///
11701    /// let builder = prepare_request_builder();
11702    /// let response = builder.poller().until_done().await?;
11703    /// # Ok(()) }
11704    ///
11705    /// fn prepare_request_builder() -> UpdateDataScan {
11706    ///   # panic!();
11707    ///   // ... details omitted ...
11708    /// }
11709    /// ```
11710    #[derive(Clone, Debug)]
11711    pub struct UpdateDataScan(RequestBuilder<crate::model::UpdateDataScanRequest>);
11712
11713    impl UpdateDataScan {
11714        pub(crate) fn new(
11715            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11716        ) -> Self {
11717            Self(RequestBuilder::new(stub))
11718        }
11719
11720        /// Sets the full request, replacing any prior values.
11721        pub fn with_request<V: Into<crate::model::UpdateDataScanRequest>>(mut self, v: V) -> Self {
11722            self.0.request = v.into();
11723            self
11724        }
11725
11726        /// Sets all the options, replacing any prior values.
11727        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11728            self.0.options = v.into();
11729            self
11730        }
11731
11732        /// Sends the request.
11733        ///
11734        /// # Long running operations
11735        ///
11736        /// This starts, but does not poll, a longrunning operation. More information
11737        /// on [update_data_scan][crate::client::DataScanService::update_data_scan].
11738        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11739            (*self.0.stub)
11740                .update_data_scan(self.0.request, self.0.options)
11741                .await
11742                .map(crate::Response::into_body)
11743        }
11744
11745        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_scan`.
11746        pub fn poller(
11747            self,
11748        ) -> impl google_cloud_lro::Poller<crate::model::DataScan, crate::model::OperationMetadata>
11749        {
11750            type Operation = google_cloud_lro::internal::Operation<
11751                crate::model::DataScan,
11752                crate::model::OperationMetadata,
11753            >;
11754            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11755            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11756
11757            let stub = self.0.stub.clone();
11758            let mut options = self.0.options.clone();
11759            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
11760            let query = move |name| {
11761                let stub = stub.clone();
11762                let options = options.clone();
11763                async {
11764                    let op = GetOperation::new(stub)
11765                        .set_name(name)
11766                        .with_options(options)
11767                        .send()
11768                        .await?;
11769                    Ok(Operation::new(op))
11770                }
11771            };
11772
11773            let start = move || async {
11774                let op = self.send().await?;
11775                Ok(Operation::new(op))
11776            };
11777
11778            google_cloud_lro::internal::new_poller(
11779                polling_error_policy,
11780                polling_backoff_policy,
11781                start,
11782                query,
11783            )
11784        }
11785
11786        /// Sets the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
11787        ///
11788        /// This is a **required** field for requests.
11789        pub fn set_data_scan<T>(mut self, v: T) -> Self
11790        where
11791            T: std::convert::Into<crate::model::DataScan>,
11792        {
11793            self.0.request.data_scan = std::option::Option::Some(v.into());
11794            self
11795        }
11796
11797        /// Sets or clears the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
11798        ///
11799        /// This is a **required** field for requests.
11800        pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
11801        where
11802            T: std::convert::Into<crate::model::DataScan>,
11803        {
11804            self.0.request.data_scan = v.map(|x| x.into());
11805            self
11806        }
11807
11808        /// Sets the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
11809        pub fn set_update_mask<T>(mut self, v: T) -> Self
11810        where
11811            T: std::convert::Into<wkt::FieldMask>,
11812        {
11813            self.0.request.update_mask = std::option::Option::Some(v.into());
11814            self
11815        }
11816
11817        /// Sets or clears the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
11818        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
11819        where
11820            T: std::convert::Into<wkt::FieldMask>,
11821        {
11822            self.0.request.update_mask = v.map(|x| x.into());
11823            self
11824        }
11825
11826        /// Sets the value of [validate_only][crate::model::UpdateDataScanRequest::validate_only].
11827        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
11828            self.0.request.validate_only = v.into();
11829            self
11830        }
11831    }
11832
11833    #[doc(hidden)]
11834    impl crate::RequestBuilder for UpdateDataScan {
11835        fn request_options(&mut self) -> &mut crate::RequestOptions {
11836            &mut self.0.options
11837        }
11838    }
11839
11840    /// The request builder for [DataScanService::delete_data_scan][crate::client::DataScanService::delete_data_scan] calls.
11841    ///
11842    /// # Example
11843    /// ```
11844    /// # use google_cloud_dataplex_v1::builder::data_scan_service::DeleteDataScan;
11845    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11846    /// use google_cloud_lro::Poller;
11847    ///
11848    /// let builder = prepare_request_builder();
11849    /// let response = builder.poller().until_done().await?;
11850    /// # Ok(()) }
11851    ///
11852    /// fn prepare_request_builder() -> DeleteDataScan {
11853    ///   # panic!();
11854    ///   // ... details omitted ...
11855    /// }
11856    /// ```
11857    #[derive(Clone, Debug)]
11858    pub struct DeleteDataScan(RequestBuilder<crate::model::DeleteDataScanRequest>);
11859
11860    impl DeleteDataScan {
11861        pub(crate) fn new(
11862            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11863        ) -> Self {
11864            Self(RequestBuilder::new(stub))
11865        }
11866
11867        /// Sets the full request, replacing any prior values.
11868        pub fn with_request<V: Into<crate::model::DeleteDataScanRequest>>(mut self, v: V) -> Self {
11869            self.0.request = v.into();
11870            self
11871        }
11872
11873        /// Sets all the options, replacing any prior values.
11874        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11875            self.0.options = v.into();
11876            self
11877        }
11878
11879        /// Sends the request.
11880        ///
11881        /// # Long running operations
11882        ///
11883        /// This starts, but does not poll, a longrunning operation. More information
11884        /// on [delete_data_scan][crate::client::DataScanService::delete_data_scan].
11885        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11886            (*self.0.stub)
11887                .delete_data_scan(self.0.request, self.0.options)
11888                .await
11889                .map(crate::Response::into_body)
11890        }
11891
11892        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_scan`.
11893        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
11894            type Operation =
11895                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
11896            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11897            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11898
11899            let stub = self.0.stub.clone();
11900            let mut options = self.0.options.clone();
11901            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
11902            let query = move |name| {
11903                let stub = stub.clone();
11904                let options = options.clone();
11905                async {
11906                    let op = GetOperation::new(stub)
11907                        .set_name(name)
11908                        .with_options(options)
11909                        .send()
11910                        .await?;
11911                    Ok(Operation::new(op))
11912                }
11913            };
11914
11915            let start = move || async {
11916                let op = self.send().await?;
11917                Ok(Operation::new(op))
11918            };
11919
11920            google_cloud_lro::internal::new_unit_response_poller(
11921                polling_error_policy,
11922                polling_backoff_policy,
11923                start,
11924                query,
11925            )
11926        }
11927
11928        /// Sets the value of [name][crate::model::DeleteDataScanRequest::name].
11929        ///
11930        /// This is a **required** field for requests.
11931        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11932            self.0.request.name = v.into();
11933            self
11934        }
11935
11936        /// Sets the value of [force][crate::model::DeleteDataScanRequest::force].
11937        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
11938            self.0.request.force = v.into();
11939            self
11940        }
11941    }
11942
11943    #[doc(hidden)]
11944    impl crate::RequestBuilder for DeleteDataScan {
11945        fn request_options(&mut self) -> &mut crate::RequestOptions {
11946            &mut self.0.options
11947        }
11948    }
11949
11950    /// The request builder for [DataScanService::get_data_scan][crate::client::DataScanService::get_data_scan] calls.
11951    ///
11952    /// # Example
11953    /// ```
11954    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetDataScan;
11955    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11956    ///
11957    /// let builder = prepare_request_builder();
11958    /// let response = builder.send().await?;
11959    /// # Ok(()) }
11960    ///
11961    /// fn prepare_request_builder() -> GetDataScan {
11962    ///   # panic!();
11963    ///   // ... details omitted ...
11964    /// }
11965    /// ```
11966    #[derive(Clone, Debug)]
11967    pub struct GetDataScan(RequestBuilder<crate::model::GetDataScanRequest>);
11968
11969    impl GetDataScan {
11970        pub(crate) fn new(
11971            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11972        ) -> Self {
11973            Self(RequestBuilder::new(stub))
11974        }
11975
11976        /// Sets the full request, replacing any prior values.
11977        pub fn with_request<V: Into<crate::model::GetDataScanRequest>>(mut self, v: V) -> Self {
11978            self.0.request = v.into();
11979            self
11980        }
11981
11982        /// Sets all the options, replacing any prior values.
11983        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11984            self.0.options = v.into();
11985            self
11986        }
11987
11988        /// Sends the request.
11989        pub async fn send(self) -> Result<crate::model::DataScan> {
11990            (*self.0.stub)
11991                .get_data_scan(self.0.request, self.0.options)
11992                .await
11993                .map(crate::Response::into_body)
11994        }
11995
11996        /// Sets the value of [name][crate::model::GetDataScanRequest::name].
11997        ///
11998        /// This is a **required** field for requests.
11999        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12000            self.0.request.name = v.into();
12001            self
12002        }
12003
12004        /// Sets the value of [view][crate::model::GetDataScanRequest::view].
12005        pub fn set_view<T: Into<crate::model::get_data_scan_request::DataScanView>>(
12006            mut self,
12007            v: T,
12008        ) -> Self {
12009            self.0.request.view = v.into();
12010            self
12011        }
12012    }
12013
12014    #[doc(hidden)]
12015    impl crate::RequestBuilder for GetDataScan {
12016        fn request_options(&mut self) -> &mut crate::RequestOptions {
12017            &mut self.0.options
12018        }
12019    }
12020
12021    /// The request builder for [DataScanService::list_data_scans][crate::client::DataScanService::list_data_scans] calls.
12022    ///
12023    /// # Example
12024    /// ```
12025    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListDataScans;
12026    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12027    /// use google_cloud_gax::paginator::ItemPaginator;
12028    ///
12029    /// let builder = prepare_request_builder();
12030    /// let mut items = builder.by_item();
12031    /// while let Some(result) = items.next().await {
12032    ///   let item = result?;
12033    /// }
12034    /// # Ok(()) }
12035    ///
12036    /// fn prepare_request_builder() -> ListDataScans {
12037    ///   # panic!();
12038    ///   // ... details omitted ...
12039    /// }
12040    /// ```
12041    #[derive(Clone, Debug)]
12042    pub struct ListDataScans(RequestBuilder<crate::model::ListDataScansRequest>);
12043
12044    impl ListDataScans {
12045        pub(crate) fn new(
12046            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12047        ) -> Self {
12048            Self(RequestBuilder::new(stub))
12049        }
12050
12051        /// Sets the full request, replacing any prior values.
12052        pub fn with_request<V: Into<crate::model::ListDataScansRequest>>(mut self, v: V) -> Self {
12053            self.0.request = v.into();
12054            self
12055        }
12056
12057        /// Sets all the options, replacing any prior values.
12058        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12059            self.0.options = v.into();
12060            self
12061        }
12062
12063        /// Sends the request.
12064        pub async fn send(self) -> Result<crate::model::ListDataScansResponse> {
12065            (*self.0.stub)
12066                .list_data_scans(self.0.request, self.0.options)
12067                .await
12068                .map(crate::Response::into_body)
12069        }
12070
12071        /// Streams each page in the collection.
12072        pub fn by_page(
12073            self,
12074        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListDataScansResponse, crate::Error>
12075        {
12076            use std::clone::Clone;
12077            let token = self.0.request.page_token.clone();
12078            let execute = move |token: String| {
12079                let mut builder = self.clone();
12080                builder.0.request = builder.0.request.set_page_token(token);
12081                builder.send()
12082            };
12083            google_cloud_gax::paginator::internal::new_paginator(token, execute)
12084        }
12085
12086        /// Streams each item in the collection.
12087        pub fn by_item(
12088            self,
12089        ) -> impl google_cloud_gax::paginator::ItemPaginator<
12090            crate::model::ListDataScansResponse,
12091            crate::Error,
12092        > {
12093            use google_cloud_gax::paginator::Paginator;
12094            self.by_page().items()
12095        }
12096
12097        /// Sets the value of [parent][crate::model::ListDataScansRequest::parent].
12098        ///
12099        /// This is a **required** field for requests.
12100        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12101            self.0.request.parent = v.into();
12102            self
12103        }
12104
12105        /// Sets the value of [page_size][crate::model::ListDataScansRequest::page_size].
12106        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12107            self.0.request.page_size = v.into();
12108            self
12109        }
12110
12111        /// Sets the value of [page_token][crate::model::ListDataScansRequest::page_token].
12112        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12113            self.0.request.page_token = v.into();
12114            self
12115        }
12116
12117        /// Sets the value of [filter][crate::model::ListDataScansRequest::filter].
12118        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12119            self.0.request.filter = v.into();
12120            self
12121        }
12122
12123        /// Sets the value of [order_by][crate::model::ListDataScansRequest::order_by].
12124        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
12125            self.0.request.order_by = v.into();
12126            self
12127        }
12128    }
12129
12130    #[doc(hidden)]
12131    impl crate::RequestBuilder for ListDataScans {
12132        fn request_options(&mut self) -> &mut crate::RequestOptions {
12133            &mut self.0.options
12134        }
12135    }
12136
12137    /// The request builder for [DataScanService::run_data_scan][crate::client::DataScanService::run_data_scan] calls.
12138    ///
12139    /// # Example
12140    /// ```
12141    /// # use google_cloud_dataplex_v1::builder::data_scan_service::RunDataScan;
12142    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12143    ///
12144    /// let builder = prepare_request_builder();
12145    /// let response = builder.send().await?;
12146    /// # Ok(()) }
12147    ///
12148    /// fn prepare_request_builder() -> RunDataScan {
12149    ///   # panic!();
12150    ///   // ... details omitted ...
12151    /// }
12152    /// ```
12153    #[derive(Clone, Debug)]
12154    pub struct RunDataScan(RequestBuilder<crate::model::RunDataScanRequest>);
12155
12156    impl RunDataScan {
12157        pub(crate) fn new(
12158            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12159        ) -> Self {
12160            Self(RequestBuilder::new(stub))
12161        }
12162
12163        /// Sets the full request, replacing any prior values.
12164        pub fn with_request<V: Into<crate::model::RunDataScanRequest>>(mut self, v: V) -> Self {
12165            self.0.request = v.into();
12166            self
12167        }
12168
12169        /// Sets all the options, replacing any prior values.
12170        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12171            self.0.options = v.into();
12172            self
12173        }
12174
12175        /// Sends the request.
12176        pub async fn send(self) -> Result<crate::model::RunDataScanResponse> {
12177            (*self.0.stub)
12178                .run_data_scan(self.0.request, self.0.options)
12179                .await
12180                .map(crate::Response::into_body)
12181        }
12182
12183        /// Sets the value of [name][crate::model::RunDataScanRequest::name].
12184        ///
12185        /// This is a **required** field for requests.
12186        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12187            self.0.request.name = v.into();
12188            self
12189        }
12190    }
12191
12192    #[doc(hidden)]
12193    impl crate::RequestBuilder for RunDataScan {
12194        fn request_options(&mut self) -> &mut crate::RequestOptions {
12195            &mut self.0.options
12196        }
12197    }
12198
12199    /// The request builder for [DataScanService::get_data_scan_job][crate::client::DataScanService::get_data_scan_job] calls.
12200    ///
12201    /// # Example
12202    /// ```
12203    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetDataScanJob;
12204    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12205    ///
12206    /// let builder = prepare_request_builder();
12207    /// let response = builder.send().await?;
12208    /// # Ok(()) }
12209    ///
12210    /// fn prepare_request_builder() -> GetDataScanJob {
12211    ///   # panic!();
12212    ///   // ... details omitted ...
12213    /// }
12214    /// ```
12215    #[derive(Clone, Debug)]
12216    pub struct GetDataScanJob(RequestBuilder<crate::model::GetDataScanJobRequest>);
12217
12218    impl GetDataScanJob {
12219        pub(crate) fn new(
12220            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12221        ) -> Self {
12222            Self(RequestBuilder::new(stub))
12223        }
12224
12225        /// Sets the full request, replacing any prior values.
12226        pub fn with_request<V: Into<crate::model::GetDataScanJobRequest>>(mut self, v: V) -> Self {
12227            self.0.request = v.into();
12228            self
12229        }
12230
12231        /// Sets all the options, replacing any prior values.
12232        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12233            self.0.options = v.into();
12234            self
12235        }
12236
12237        /// Sends the request.
12238        pub async fn send(self) -> Result<crate::model::DataScanJob> {
12239            (*self.0.stub)
12240                .get_data_scan_job(self.0.request, self.0.options)
12241                .await
12242                .map(crate::Response::into_body)
12243        }
12244
12245        /// Sets the value of [name][crate::model::GetDataScanJobRequest::name].
12246        ///
12247        /// This is a **required** field for requests.
12248        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12249            self.0.request.name = v.into();
12250            self
12251        }
12252
12253        /// Sets the value of [view][crate::model::GetDataScanJobRequest::view].
12254        pub fn set_view<T: Into<crate::model::get_data_scan_job_request::DataScanJobView>>(
12255            mut self,
12256            v: T,
12257        ) -> Self {
12258            self.0.request.view = v.into();
12259            self
12260        }
12261    }
12262
12263    #[doc(hidden)]
12264    impl crate::RequestBuilder for GetDataScanJob {
12265        fn request_options(&mut self) -> &mut crate::RequestOptions {
12266            &mut self.0.options
12267        }
12268    }
12269
12270    /// The request builder for [DataScanService::list_data_scan_jobs][crate::client::DataScanService::list_data_scan_jobs] calls.
12271    ///
12272    /// # Example
12273    /// ```
12274    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListDataScanJobs;
12275    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12276    /// use google_cloud_gax::paginator::ItemPaginator;
12277    ///
12278    /// let builder = prepare_request_builder();
12279    /// let mut items = builder.by_item();
12280    /// while let Some(result) = items.next().await {
12281    ///   let item = result?;
12282    /// }
12283    /// # Ok(()) }
12284    ///
12285    /// fn prepare_request_builder() -> ListDataScanJobs {
12286    ///   # panic!();
12287    ///   // ... details omitted ...
12288    /// }
12289    /// ```
12290    #[derive(Clone, Debug)]
12291    pub struct ListDataScanJobs(RequestBuilder<crate::model::ListDataScanJobsRequest>);
12292
12293    impl ListDataScanJobs {
12294        pub(crate) fn new(
12295            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12296        ) -> Self {
12297            Self(RequestBuilder::new(stub))
12298        }
12299
12300        /// Sets the full request, replacing any prior values.
12301        pub fn with_request<V: Into<crate::model::ListDataScanJobsRequest>>(
12302            mut self,
12303            v: V,
12304        ) -> Self {
12305            self.0.request = v.into();
12306            self
12307        }
12308
12309        /// Sets all the options, replacing any prior values.
12310        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12311            self.0.options = v.into();
12312            self
12313        }
12314
12315        /// Sends the request.
12316        pub async fn send(self) -> Result<crate::model::ListDataScanJobsResponse> {
12317            (*self.0.stub)
12318                .list_data_scan_jobs(self.0.request, self.0.options)
12319                .await
12320                .map(crate::Response::into_body)
12321        }
12322
12323        /// Streams each page in the collection.
12324        pub fn by_page(
12325            self,
12326        ) -> impl google_cloud_gax::paginator::Paginator<
12327            crate::model::ListDataScanJobsResponse,
12328            crate::Error,
12329        > {
12330            use std::clone::Clone;
12331            let token = self.0.request.page_token.clone();
12332            let execute = move |token: String| {
12333                let mut builder = self.clone();
12334                builder.0.request = builder.0.request.set_page_token(token);
12335                builder.send()
12336            };
12337            google_cloud_gax::paginator::internal::new_paginator(token, execute)
12338        }
12339
12340        /// Streams each item in the collection.
12341        pub fn by_item(
12342            self,
12343        ) -> impl google_cloud_gax::paginator::ItemPaginator<
12344            crate::model::ListDataScanJobsResponse,
12345            crate::Error,
12346        > {
12347            use google_cloud_gax::paginator::Paginator;
12348            self.by_page().items()
12349        }
12350
12351        /// Sets the value of [parent][crate::model::ListDataScanJobsRequest::parent].
12352        ///
12353        /// This is a **required** field for requests.
12354        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12355            self.0.request.parent = v.into();
12356            self
12357        }
12358
12359        /// Sets the value of [page_size][crate::model::ListDataScanJobsRequest::page_size].
12360        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12361            self.0.request.page_size = v.into();
12362            self
12363        }
12364
12365        /// Sets the value of [page_token][crate::model::ListDataScanJobsRequest::page_token].
12366        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12367            self.0.request.page_token = v.into();
12368            self
12369        }
12370
12371        /// Sets the value of [filter][crate::model::ListDataScanJobsRequest::filter].
12372        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12373            self.0.request.filter = v.into();
12374            self
12375        }
12376    }
12377
12378    #[doc(hidden)]
12379    impl crate::RequestBuilder for ListDataScanJobs {
12380        fn request_options(&mut self) -> &mut crate::RequestOptions {
12381            &mut self.0.options
12382        }
12383    }
12384
12385    /// The request builder for [DataScanService::generate_data_quality_rules][crate::client::DataScanService::generate_data_quality_rules] calls.
12386    ///
12387    /// # Example
12388    /// ```
12389    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GenerateDataQualityRules;
12390    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12391    ///
12392    /// let builder = prepare_request_builder();
12393    /// let response = builder.send().await?;
12394    /// # Ok(()) }
12395    ///
12396    /// fn prepare_request_builder() -> GenerateDataQualityRules {
12397    ///   # panic!();
12398    ///   // ... details omitted ...
12399    /// }
12400    /// ```
12401    #[derive(Clone, Debug)]
12402    pub struct GenerateDataQualityRules(
12403        RequestBuilder<crate::model::GenerateDataQualityRulesRequest>,
12404    );
12405
12406    impl GenerateDataQualityRules {
12407        pub(crate) fn new(
12408            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12409        ) -> Self {
12410            Self(RequestBuilder::new(stub))
12411        }
12412
12413        /// Sets the full request, replacing any prior values.
12414        pub fn with_request<V: Into<crate::model::GenerateDataQualityRulesRequest>>(
12415            mut self,
12416            v: V,
12417        ) -> Self {
12418            self.0.request = v.into();
12419            self
12420        }
12421
12422        /// Sets all the options, replacing any prior values.
12423        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12424            self.0.options = v.into();
12425            self
12426        }
12427
12428        /// Sends the request.
12429        pub async fn send(self) -> Result<crate::model::GenerateDataQualityRulesResponse> {
12430            (*self.0.stub)
12431                .generate_data_quality_rules(self.0.request, self.0.options)
12432                .await
12433                .map(crate::Response::into_body)
12434        }
12435
12436        /// Sets the value of [name][crate::model::GenerateDataQualityRulesRequest::name].
12437        ///
12438        /// This is a **required** field for requests.
12439        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12440            self.0.request.name = v.into();
12441            self
12442        }
12443    }
12444
12445    #[doc(hidden)]
12446    impl crate::RequestBuilder for GenerateDataQualityRules {
12447        fn request_options(&mut self) -> &mut crate::RequestOptions {
12448            &mut self.0.options
12449        }
12450    }
12451
12452    /// The request builder for [DataScanService::list_locations][crate::client::DataScanService::list_locations] calls.
12453    ///
12454    /// # Example
12455    /// ```
12456    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListLocations;
12457    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12458    /// use google_cloud_gax::paginator::ItemPaginator;
12459    ///
12460    /// let builder = prepare_request_builder();
12461    /// let mut items = builder.by_item();
12462    /// while let Some(result) = items.next().await {
12463    ///   let item = result?;
12464    /// }
12465    /// # Ok(()) }
12466    ///
12467    /// fn prepare_request_builder() -> ListLocations {
12468    ///   # panic!();
12469    ///   // ... details omitted ...
12470    /// }
12471    /// ```
12472    #[derive(Clone, Debug)]
12473    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
12474
12475    impl ListLocations {
12476        pub(crate) fn new(
12477            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12478        ) -> Self {
12479            Self(RequestBuilder::new(stub))
12480        }
12481
12482        /// Sets the full request, replacing any prior values.
12483        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
12484            mut self,
12485            v: V,
12486        ) -> Self {
12487            self.0.request = v.into();
12488            self
12489        }
12490
12491        /// Sets all the options, replacing any prior values.
12492        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12493            self.0.options = v.into();
12494            self
12495        }
12496
12497        /// Sends the request.
12498        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
12499            (*self.0.stub)
12500                .list_locations(self.0.request, self.0.options)
12501                .await
12502                .map(crate::Response::into_body)
12503        }
12504
12505        /// Streams each page in the collection.
12506        pub fn by_page(
12507            self,
12508        ) -> impl google_cloud_gax::paginator::Paginator<
12509            google_cloud_location::model::ListLocationsResponse,
12510            crate::Error,
12511        > {
12512            use std::clone::Clone;
12513            let token = self.0.request.page_token.clone();
12514            let execute = move |token: String| {
12515                let mut builder = self.clone();
12516                builder.0.request = builder.0.request.set_page_token(token);
12517                builder.send()
12518            };
12519            google_cloud_gax::paginator::internal::new_paginator(token, execute)
12520        }
12521
12522        /// Streams each item in the collection.
12523        pub fn by_item(
12524            self,
12525        ) -> impl google_cloud_gax::paginator::ItemPaginator<
12526            google_cloud_location::model::ListLocationsResponse,
12527            crate::Error,
12528        > {
12529            use google_cloud_gax::paginator::Paginator;
12530            self.by_page().items()
12531        }
12532
12533        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
12534        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12535            self.0.request.name = v.into();
12536            self
12537        }
12538
12539        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
12540        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12541            self.0.request.filter = v.into();
12542            self
12543        }
12544
12545        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
12546        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12547            self.0.request.page_size = v.into();
12548            self
12549        }
12550
12551        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
12552        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12553            self.0.request.page_token = v.into();
12554            self
12555        }
12556    }
12557
12558    #[doc(hidden)]
12559    impl crate::RequestBuilder for ListLocations {
12560        fn request_options(&mut self) -> &mut crate::RequestOptions {
12561            &mut self.0.options
12562        }
12563    }
12564
12565    /// The request builder for [DataScanService::get_location][crate::client::DataScanService::get_location] calls.
12566    ///
12567    /// # Example
12568    /// ```
12569    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetLocation;
12570    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12571    ///
12572    /// let builder = prepare_request_builder();
12573    /// let response = builder.send().await?;
12574    /// # Ok(()) }
12575    ///
12576    /// fn prepare_request_builder() -> GetLocation {
12577    ///   # panic!();
12578    ///   // ... details omitted ...
12579    /// }
12580    /// ```
12581    #[derive(Clone, Debug)]
12582    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
12583
12584    impl GetLocation {
12585        pub(crate) fn new(
12586            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12587        ) -> Self {
12588            Self(RequestBuilder::new(stub))
12589        }
12590
12591        /// Sets the full request, replacing any prior values.
12592        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
12593            mut self,
12594            v: V,
12595        ) -> Self {
12596            self.0.request = v.into();
12597            self
12598        }
12599
12600        /// Sets all the options, replacing any prior values.
12601        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12602            self.0.options = v.into();
12603            self
12604        }
12605
12606        /// Sends the request.
12607        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
12608            (*self.0.stub)
12609                .get_location(self.0.request, self.0.options)
12610                .await
12611                .map(crate::Response::into_body)
12612        }
12613
12614        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
12615        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12616            self.0.request.name = v.into();
12617            self
12618        }
12619    }
12620
12621    #[doc(hidden)]
12622    impl crate::RequestBuilder for GetLocation {
12623        fn request_options(&mut self) -> &mut crate::RequestOptions {
12624            &mut self.0.options
12625        }
12626    }
12627
12628    /// The request builder for [DataScanService::set_iam_policy][crate::client::DataScanService::set_iam_policy] calls.
12629    ///
12630    /// # Example
12631    /// ```
12632    /// # use google_cloud_dataplex_v1::builder::data_scan_service::SetIamPolicy;
12633    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12634    ///
12635    /// let builder = prepare_request_builder();
12636    /// let response = builder.send().await?;
12637    /// # Ok(()) }
12638    ///
12639    /// fn prepare_request_builder() -> SetIamPolicy {
12640    ///   # panic!();
12641    ///   // ... details omitted ...
12642    /// }
12643    /// ```
12644    #[derive(Clone, Debug)]
12645    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
12646
12647    impl SetIamPolicy {
12648        pub(crate) fn new(
12649            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12650        ) -> Self {
12651            Self(RequestBuilder::new(stub))
12652        }
12653
12654        /// Sets the full request, replacing any prior values.
12655        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
12656            mut self,
12657            v: V,
12658        ) -> Self {
12659            self.0.request = v.into();
12660            self
12661        }
12662
12663        /// Sets all the options, replacing any prior values.
12664        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12665            self.0.options = v.into();
12666            self
12667        }
12668
12669        /// Sends the request.
12670        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
12671            (*self.0.stub)
12672                .set_iam_policy(self.0.request, self.0.options)
12673                .await
12674                .map(crate::Response::into_body)
12675        }
12676
12677        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
12678        ///
12679        /// This is a **required** field for requests.
12680        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
12681            self.0.request.resource = v.into();
12682            self
12683        }
12684
12685        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
12686        ///
12687        /// This is a **required** field for requests.
12688        pub fn set_policy<T>(mut self, v: T) -> Self
12689        where
12690            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
12691        {
12692            self.0.request.policy = std::option::Option::Some(v.into());
12693            self
12694        }
12695
12696        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
12697        ///
12698        /// This is a **required** field for requests.
12699        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
12700        where
12701            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
12702        {
12703            self.0.request.policy = v.map(|x| x.into());
12704            self
12705        }
12706
12707        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
12708        pub fn set_update_mask<T>(mut self, v: T) -> Self
12709        where
12710            T: std::convert::Into<wkt::FieldMask>,
12711        {
12712            self.0.request.update_mask = std::option::Option::Some(v.into());
12713            self
12714        }
12715
12716        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
12717        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
12718        where
12719            T: std::convert::Into<wkt::FieldMask>,
12720        {
12721            self.0.request.update_mask = v.map(|x| x.into());
12722            self
12723        }
12724    }
12725
12726    #[doc(hidden)]
12727    impl crate::RequestBuilder for SetIamPolicy {
12728        fn request_options(&mut self) -> &mut crate::RequestOptions {
12729            &mut self.0.options
12730        }
12731    }
12732
12733    /// The request builder for [DataScanService::get_iam_policy][crate::client::DataScanService::get_iam_policy] calls.
12734    ///
12735    /// # Example
12736    /// ```
12737    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetIamPolicy;
12738    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12739    ///
12740    /// let builder = prepare_request_builder();
12741    /// let response = builder.send().await?;
12742    /// # Ok(()) }
12743    ///
12744    /// fn prepare_request_builder() -> GetIamPolicy {
12745    ///   # panic!();
12746    ///   // ... details omitted ...
12747    /// }
12748    /// ```
12749    #[derive(Clone, Debug)]
12750    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
12751
12752    impl GetIamPolicy {
12753        pub(crate) fn new(
12754            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12755        ) -> Self {
12756            Self(RequestBuilder::new(stub))
12757        }
12758
12759        /// Sets the full request, replacing any prior values.
12760        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
12761            mut self,
12762            v: V,
12763        ) -> Self {
12764            self.0.request = v.into();
12765            self
12766        }
12767
12768        /// Sets all the options, replacing any prior values.
12769        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12770            self.0.options = v.into();
12771            self
12772        }
12773
12774        /// Sends the request.
12775        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
12776            (*self.0.stub)
12777                .get_iam_policy(self.0.request, self.0.options)
12778                .await
12779                .map(crate::Response::into_body)
12780        }
12781
12782        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
12783        ///
12784        /// This is a **required** field for requests.
12785        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
12786            self.0.request.resource = v.into();
12787            self
12788        }
12789
12790        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
12791        pub fn set_options<T>(mut self, v: T) -> Self
12792        where
12793            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
12794        {
12795            self.0.request.options = std::option::Option::Some(v.into());
12796            self
12797        }
12798
12799        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
12800        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
12801        where
12802            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
12803        {
12804            self.0.request.options = v.map(|x| x.into());
12805            self
12806        }
12807    }
12808
12809    #[doc(hidden)]
12810    impl crate::RequestBuilder for GetIamPolicy {
12811        fn request_options(&mut self) -> &mut crate::RequestOptions {
12812            &mut self.0.options
12813        }
12814    }
12815
12816    /// The request builder for [DataScanService::test_iam_permissions][crate::client::DataScanService::test_iam_permissions] calls.
12817    ///
12818    /// # Example
12819    /// ```
12820    /// # use google_cloud_dataplex_v1::builder::data_scan_service::TestIamPermissions;
12821    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12822    ///
12823    /// let builder = prepare_request_builder();
12824    /// let response = builder.send().await?;
12825    /// # Ok(()) }
12826    ///
12827    /// fn prepare_request_builder() -> TestIamPermissions {
12828    ///   # panic!();
12829    ///   // ... details omitted ...
12830    /// }
12831    /// ```
12832    #[derive(Clone, Debug)]
12833    pub struct TestIamPermissions(
12834        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
12835    );
12836
12837    impl TestIamPermissions {
12838        pub(crate) fn new(
12839            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12840        ) -> Self {
12841            Self(RequestBuilder::new(stub))
12842        }
12843
12844        /// Sets the full request, replacing any prior values.
12845        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
12846            mut self,
12847            v: V,
12848        ) -> Self {
12849            self.0.request = v.into();
12850            self
12851        }
12852
12853        /// Sets all the options, replacing any prior values.
12854        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12855            self.0.options = v.into();
12856            self
12857        }
12858
12859        /// Sends the request.
12860        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
12861            (*self.0.stub)
12862                .test_iam_permissions(self.0.request, self.0.options)
12863                .await
12864                .map(crate::Response::into_body)
12865        }
12866
12867        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
12868        ///
12869        /// This is a **required** field for requests.
12870        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
12871            self.0.request.resource = v.into();
12872            self
12873        }
12874
12875        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
12876        ///
12877        /// This is a **required** field for requests.
12878        pub fn set_permissions<T, V>(mut self, v: T) -> Self
12879        where
12880            T: std::iter::IntoIterator<Item = V>,
12881            V: std::convert::Into<std::string::String>,
12882        {
12883            use std::iter::Iterator;
12884            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
12885            self
12886        }
12887    }
12888
12889    #[doc(hidden)]
12890    impl crate::RequestBuilder for TestIamPermissions {
12891        fn request_options(&mut self) -> &mut crate::RequestOptions {
12892            &mut self.0.options
12893        }
12894    }
12895
12896    /// The request builder for [DataScanService::list_operations][crate::client::DataScanService::list_operations] calls.
12897    ///
12898    /// # Example
12899    /// ```
12900    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListOperations;
12901    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12902    /// use google_cloud_gax::paginator::ItemPaginator;
12903    ///
12904    /// let builder = prepare_request_builder();
12905    /// let mut items = builder.by_item();
12906    /// while let Some(result) = items.next().await {
12907    ///   let item = result?;
12908    /// }
12909    /// # Ok(()) }
12910    ///
12911    /// fn prepare_request_builder() -> ListOperations {
12912    ///   # panic!();
12913    ///   // ... details omitted ...
12914    /// }
12915    /// ```
12916    #[derive(Clone, Debug)]
12917    pub struct ListOperations(
12918        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
12919    );
12920
12921    impl ListOperations {
12922        pub(crate) fn new(
12923            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12924        ) -> Self {
12925            Self(RequestBuilder::new(stub))
12926        }
12927
12928        /// Sets the full request, replacing any prior values.
12929        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
12930            mut self,
12931            v: V,
12932        ) -> Self {
12933            self.0.request = v.into();
12934            self
12935        }
12936
12937        /// Sets all the options, replacing any prior values.
12938        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12939            self.0.options = v.into();
12940            self
12941        }
12942
12943        /// Sends the request.
12944        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
12945            (*self.0.stub)
12946                .list_operations(self.0.request, self.0.options)
12947                .await
12948                .map(crate::Response::into_body)
12949        }
12950
12951        /// Streams each page in the collection.
12952        pub fn by_page(
12953            self,
12954        ) -> impl google_cloud_gax::paginator::Paginator<
12955            google_cloud_longrunning::model::ListOperationsResponse,
12956            crate::Error,
12957        > {
12958            use std::clone::Clone;
12959            let token = self.0.request.page_token.clone();
12960            let execute = move |token: String| {
12961                let mut builder = self.clone();
12962                builder.0.request = builder.0.request.set_page_token(token);
12963                builder.send()
12964            };
12965            google_cloud_gax::paginator::internal::new_paginator(token, execute)
12966        }
12967
12968        /// Streams each item in the collection.
12969        pub fn by_item(
12970            self,
12971        ) -> impl google_cloud_gax::paginator::ItemPaginator<
12972            google_cloud_longrunning::model::ListOperationsResponse,
12973            crate::Error,
12974        > {
12975            use google_cloud_gax::paginator::Paginator;
12976            self.by_page().items()
12977        }
12978
12979        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
12980        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12981            self.0.request.name = v.into();
12982            self
12983        }
12984
12985        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
12986        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12987            self.0.request.filter = v.into();
12988            self
12989        }
12990
12991        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
12992        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12993            self.0.request.page_size = v.into();
12994            self
12995        }
12996
12997        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
12998        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12999            self.0.request.page_token = v.into();
13000            self
13001        }
13002
13003        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
13004        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
13005            self.0.request.return_partial_success = v.into();
13006            self
13007        }
13008    }
13009
13010    #[doc(hidden)]
13011    impl crate::RequestBuilder for ListOperations {
13012        fn request_options(&mut self) -> &mut crate::RequestOptions {
13013            &mut self.0.options
13014        }
13015    }
13016
13017    /// The request builder for [DataScanService::get_operation][crate::client::DataScanService::get_operation] calls.
13018    ///
13019    /// # Example
13020    /// ```
13021    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetOperation;
13022    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13023    ///
13024    /// let builder = prepare_request_builder();
13025    /// let response = builder.send().await?;
13026    /// # Ok(()) }
13027    ///
13028    /// fn prepare_request_builder() -> GetOperation {
13029    ///   # panic!();
13030    ///   // ... details omitted ...
13031    /// }
13032    /// ```
13033    #[derive(Clone, Debug)]
13034    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
13035
13036    impl GetOperation {
13037        pub(crate) fn new(
13038            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
13039        ) -> Self {
13040            Self(RequestBuilder::new(stub))
13041        }
13042
13043        /// Sets the full request, replacing any prior values.
13044        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
13045            mut self,
13046            v: V,
13047        ) -> Self {
13048            self.0.request = v.into();
13049            self
13050        }
13051
13052        /// Sets all the options, replacing any prior values.
13053        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13054            self.0.options = v.into();
13055            self
13056        }
13057
13058        /// Sends the request.
13059        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
13060            (*self.0.stub)
13061                .get_operation(self.0.request, self.0.options)
13062                .await
13063                .map(crate::Response::into_body)
13064        }
13065
13066        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
13067        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13068            self.0.request.name = v.into();
13069            self
13070        }
13071    }
13072
13073    #[doc(hidden)]
13074    impl crate::RequestBuilder for GetOperation {
13075        fn request_options(&mut self) -> &mut crate::RequestOptions {
13076            &mut self.0.options
13077        }
13078    }
13079
13080    /// The request builder for [DataScanService::delete_operation][crate::client::DataScanService::delete_operation] calls.
13081    ///
13082    /// # Example
13083    /// ```
13084    /// # use google_cloud_dataplex_v1::builder::data_scan_service::DeleteOperation;
13085    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13086    ///
13087    /// let builder = prepare_request_builder();
13088    /// let response = builder.send().await?;
13089    /// # Ok(()) }
13090    ///
13091    /// fn prepare_request_builder() -> DeleteOperation {
13092    ///   # panic!();
13093    ///   // ... details omitted ...
13094    /// }
13095    /// ```
13096    #[derive(Clone, Debug)]
13097    pub struct DeleteOperation(
13098        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
13099    );
13100
13101    impl DeleteOperation {
13102        pub(crate) fn new(
13103            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
13104        ) -> Self {
13105            Self(RequestBuilder::new(stub))
13106        }
13107
13108        /// Sets the full request, replacing any prior values.
13109        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
13110            mut self,
13111            v: V,
13112        ) -> Self {
13113            self.0.request = v.into();
13114            self
13115        }
13116
13117        /// Sets all the options, replacing any prior values.
13118        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13119            self.0.options = v.into();
13120            self
13121        }
13122
13123        /// Sends the request.
13124        pub async fn send(self) -> Result<()> {
13125            (*self.0.stub)
13126                .delete_operation(self.0.request, self.0.options)
13127                .await
13128                .map(crate::Response::into_body)
13129        }
13130
13131        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
13132        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13133            self.0.request.name = v.into();
13134            self
13135        }
13136    }
13137
13138    #[doc(hidden)]
13139    impl crate::RequestBuilder for DeleteOperation {
13140        fn request_options(&mut self) -> &mut crate::RequestOptions {
13141            &mut self.0.options
13142        }
13143    }
13144
13145    /// The request builder for [DataScanService::cancel_operation][crate::client::DataScanService::cancel_operation] calls.
13146    ///
13147    /// # Example
13148    /// ```
13149    /// # use google_cloud_dataplex_v1::builder::data_scan_service::CancelOperation;
13150    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13151    ///
13152    /// let builder = prepare_request_builder();
13153    /// let response = builder.send().await?;
13154    /// # Ok(()) }
13155    ///
13156    /// fn prepare_request_builder() -> CancelOperation {
13157    ///   # panic!();
13158    ///   // ... details omitted ...
13159    /// }
13160    /// ```
13161    #[derive(Clone, Debug)]
13162    pub struct CancelOperation(
13163        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
13164    );
13165
13166    impl CancelOperation {
13167        pub(crate) fn new(
13168            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
13169        ) -> Self {
13170            Self(RequestBuilder::new(stub))
13171        }
13172
13173        /// Sets the full request, replacing any prior values.
13174        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
13175            mut self,
13176            v: V,
13177        ) -> Self {
13178            self.0.request = v.into();
13179            self
13180        }
13181
13182        /// Sets all the options, replacing any prior values.
13183        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13184            self.0.options = v.into();
13185            self
13186        }
13187
13188        /// Sends the request.
13189        pub async fn send(self) -> Result<()> {
13190            (*self.0.stub)
13191                .cancel_operation(self.0.request, self.0.options)
13192                .await
13193                .map(crate::Response::into_body)
13194        }
13195
13196        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
13197        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13198            self.0.request.name = v.into();
13199            self
13200        }
13201    }
13202
13203    #[doc(hidden)]
13204    impl crate::RequestBuilder for CancelOperation {
13205        fn request_options(&mut self) -> &mut crate::RequestOptions {
13206            &mut self.0.options
13207        }
13208    }
13209}
13210
13211pub mod metadata_service {
13212    use crate::Result;
13213
13214    /// A builder for [MetadataService][crate::client::MetadataService].
13215    ///
13216    /// ```
13217    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
13218    /// # use google_cloud_dataplex_v1::*;
13219    /// # use builder::metadata_service::ClientBuilder;
13220    /// # use client::MetadataService;
13221    /// let builder : ClientBuilder = MetadataService::builder();
13222    /// let client = builder
13223    ///     .with_endpoint("https://dataplex.googleapis.com")
13224    ///     .build().await?;
13225    /// # Ok(()) }
13226    /// ```
13227    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
13228
13229    pub(crate) mod client {
13230        use super::super::super::client::MetadataService;
13231        pub struct Factory;
13232        impl crate::ClientFactory for Factory {
13233            type Client = MetadataService;
13234            type Credentials = gaxi::options::Credentials;
13235            async fn build(
13236                self,
13237                config: gaxi::options::ClientConfig,
13238            ) -> crate::ClientBuilderResult<Self::Client> {
13239                Self::Client::new(config).await
13240            }
13241        }
13242    }
13243
13244    /// Common implementation for [crate::client::MetadataService] request builders.
13245    #[derive(Clone, Debug)]
13246    pub(crate) struct RequestBuilder<R: std::default::Default> {
13247        stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13248        request: R,
13249        options: crate::RequestOptions,
13250    }
13251
13252    impl<R> RequestBuilder<R>
13253    where
13254        R: std::default::Default,
13255    {
13256        pub(crate) fn new(
13257            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13258        ) -> Self {
13259            Self {
13260                stub,
13261                request: R::default(),
13262                options: crate::RequestOptions::default(),
13263            }
13264        }
13265    }
13266
13267    /// The request builder for [MetadataService::create_entity][crate::client::MetadataService::create_entity] calls.
13268    ///
13269    /// # Example
13270    /// ```
13271    /// # use google_cloud_dataplex_v1::builder::metadata_service::CreateEntity;
13272    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13273    ///
13274    /// let builder = prepare_request_builder();
13275    /// let response = builder.send().await?;
13276    /// # Ok(()) }
13277    ///
13278    /// fn prepare_request_builder() -> CreateEntity {
13279    ///   # panic!();
13280    ///   // ... details omitted ...
13281    /// }
13282    /// ```
13283    #[derive(Clone, Debug)]
13284    pub struct CreateEntity(RequestBuilder<crate::model::CreateEntityRequest>);
13285
13286    impl CreateEntity {
13287        pub(crate) fn new(
13288            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13289        ) -> Self {
13290            Self(RequestBuilder::new(stub))
13291        }
13292
13293        /// Sets the full request, replacing any prior values.
13294        pub fn with_request<V: Into<crate::model::CreateEntityRequest>>(mut self, v: V) -> Self {
13295            self.0.request = v.into();
13296            self
13297        }
13298
13299        /// Sets all the options, replacing any prior values.
13300        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13301            self.0.options = v.into();
13302            self
13303        }
13304
13305        /// Sends the request.
13306        pub async fn send(self) -> Result<crate::model::Entity> {
13307            (*self.0.stub)
13308                .create_entity(self.0.request, self.0.options)
13309                .await
13310                .map(crate::Response::into_body)
13311        }
13312
13313        /// Sets the value of [parent][crate::model::CreateEntityRequest::parent].
13314        ///
13315        /// This is a **required** field for requests.
13316        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13317            self.0.request.parent = v.into();
13318            self
13319        }
13320
13321        /// Sets the value of [entity][crate::model::CreateEntityRequest::entity].
13322        ///
13323        /// This is a **required** field for requests.
13324        pub fn set_entity<T>(mut self, v: T) -> Self
13325        where
13326            T: std::convert::Into<crate::model::Entity>,
13327        {
13328            self.0.request.entity = std::option::Option::Some(v.into());
13329            self
13330        }
13331
13332        /// Sets or clears the value of [entity][crate::model::CreateEntityRequest::entity].
13333        ///
13334        /// This is a **required** field for requests.
13335        pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
13336        where
13337            T: std::convert::Into<crate::model::Entity>,
13338        {
13339            self.0.request.entity = v.map(|x| x.into());
13340            self
13341        }
13342
13343        /// Sets the value of [validate_only][crate::model::CreateEntityRequest::validate_only].
13344        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
13345            self.0.request.validate_only = v.into();
13346            self
13347        }
13348    }
13349
13350    #[doc(hidden)]
13351    impl crate::RequestBuilder for CreateEntity {
13352        fn request_options(&mut self) -> &mut crate::RequestOptions {
13353            &mut self.0.options
13354        }
13355    }
13356
13357    /// The request builder for [MetadataService::update_entity][crate::client::MetadataService::update_entity] calls.
13358    ///
13359    /// # Example
13360    /// ```
13361    /// # use google_cloud_dataplex_v1::builder::metadata_service::UpdateEntity;
13362    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13363    ///
13364    /// let builder = prepare_request_builder();
13365    /// let response = builder.send().await?;
13366    /// # Ok(()) }
13367    ///
13368    /// fn prepare_request_builder() -> UpdateEntity {
13369    ///   # panic!();
13370    ///   // ... details omitted ...
13371    /// }
13372    /// ```
13373    #[derive(Clone, Debug)]
13374    pub struct UpdateEntity(RequestBuilder<crate::model::UpdateEntityRequest>);
13375
13376    impl UpdateEntity {
13377        pub(crate) fn new(
13378            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13379        ) -> Self {
13380            Self(RequestBuilder::new(stub))
13381        }
13382
13383        /// Sets the full request, replacing any prior values.
13384        pub fn with_request<V: Into<crate::model::UpdateEntityRequest>>(mut self, v: V) -> Self {
13385            self.0.request = v.into();
13386            self
13387        }
13388
13389        /// Sets all the options, replacing any prior values.
13390        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13391            self.0.options = v.into();
13392            self
13393        }
13394
13395        /// Sends the request.
13396        pub async fn send(self) -> Result<crate::model::Entity> {
13397            (*self.0.stub)
13398                .update_entity(self.0.request, self.0.options)
13399                .await
13400                .map(crate::Response::into_body)
13401        }
13402
13403        /// Sets the value of [entity][crate::model::UpdateEntityRequest::entity].
13404        ///
13405        /// This is a **required** field for requests.
13406        pub fn set_entity<T>(mut self, v: T) -> Self
13407        where
13408            T: std::convert::Into<crate::model::Entity>,
13409        {
13410            self.0.request.entity = std::option::Option::Some(v.into());
13411            self
13412        }
13413
13414        /// Sets or clears the value of [entity][crate::model::UpdateEntityRequest::entity].
13415        ///
13416        /// This is a **required** field for requests.
13417        pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
13418        where
13419            T: std::convert::Into<crate::model::Entity>,
13420        {
13421            self.0.request.entity = v.map(|x| x.into());
13422            self
13423        }
13424
13425        /// Sets the value of [validate_only][crate::model::UpdateEntityRequest::validate_only].
13426        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
13427            self.0.request.validate_only = v.into();
13428            self
13429        }
13430    }
13431
13432    #[doc(hidden)]
13433    impl crate::RequestBuilder for UpdateEntity {
13434        fn request_options(&mut self) -> &mut crate::RequestOptions {
13435            &mut self.0.options
13436        }
13437    }
13438
13439    /// The request builder for [MetadataService::delete_entity][crate::client::MetadataService::delete_entity] calls.
13440    ///
13441    /// # Example
13442    /// ```
13443    /// # use google_cloud_dataplex_v1::builder::metadata_service::DeleteEntity;
13444    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13445    ///
13446    /// let builder = prepare_request_builder();
13447    /// let response = builder.send().await?;
13448    /// # Ok(()) }
13449    ///
13450    /// fn prepare_request_builder() -> DeleteEntity {
13451    ///   # panic!();
13452    ///   // ... details omitted ...
13453    /// }
13454    /// ```
13455    #[derive(Clone, Debug)]
13456    pub struct DeleteEntity(RequestBuilder<crate::model::DeleteEntityRequest>);
13457
13458    impl DeleteEntity {
13459        pub(crate) fn new(
13460            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13461        ) -> Self {
13462            Self(RequestBuilder::new(stub))
13463        }
13464
13465        /// Sets the full request, replacing any prior values.
13466        pub fn with_request<V: Into<crate::model::DeleteEntityRequest>>(mut self, v: V) -> Self {
13467            self.0.request = v.into();
13468            self
13469        }
13470
13471        /// Sets all the options, replacing any prior values.
13472        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13473            self.0.options = v.into();
13474            self
13475        }
13476
13477        /// Sends the request.
13478        pub async fn send(self) -> Result<()> {
13479            (*self.0.stub)
13480                .delete_entity(self.0.request, self.0.options)
13481                .await
13482                .map(crate::Response::into_body)
13483        }
13484
13485        /// Sets the value of [name][crate::model::DeleteEntityRequest::name].
13486        ///
13487        /// This is a **required** field for requests.
13488        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13489            self.0.request.name = v.into();
13490            self
13491        }
13492
13493        /// Sets the value of [etag][crate::model::DeleteEntityRequest::etag].
13494        ///
13495        /// This is a **required** field for requests.
13496        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
13497            self.0.request.etag = v.into();
13498            self
13499        }
13500    }
13501
13502    #[doc(hidden)]
13503    impl crate::RequestBuilder for DeleteEntity {
13504        fn request_options(&mut self) -> &mut crate::RequestOptions {
13505            &mut self.0.options
13506        }
13507    }
13508
13509    /// The request builder for [MetadataService::get_entity][crate::client::MetadataService::get_entity] calls.
13510    ///
13511    /// # Example
13512    /// ```
13513    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetEntity;
13514    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13515    ///
13516    /// let builder = prepare_request_builder();
13517    /// let response = builder.send().await?;
13518    /// # Ok(()) }
13519    ///
13520    /// fn prepare_request_builder() -> GetEntity {
13521    ///   # panic!();
13522    ///   // ... details omitted ...
13523    /// }
13524    /// ```
13525    #[derive(Clone, Debug)]
13526    pub struct GetEntity(RequestBuilder<crate::model::GetEntityRequest>);
13527
13528    impl GetEntity {
13529        pub(crate) fn new(
13530            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13531        ) -> Self {
13532            Self(RequestBuilder::new(stub))
13533        }
13534
13535        /// Sets the full request, replacing any prior values.
13536        pub fn with_request<V: Into<crate::model::GetEntityRequest>>(mut self, v: V) -> Self {
13537            self.0.request = v.into();
13538            self
13539        }
13540
13541        /// Sets all the options, replacing any prior values.
13542        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13543            self.0.options = v.into();
13544            self
13545        }
13546
13547        /// Sends the request.
13548        pub async fn send(self) -> Result<crate::model::Entity> {
13549            (*self.0.stub)
13550                .get_entity(self.0.request, self.0.options)
13551                .await
13552                .map(crate::Response::into_body)
13553        }
13554
13555        /// Sets the value of [name][crate::model::GetEntityRequest::name].
13556        ///
13557        /// This is a **required** field for requests.
13558        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13559            self.0.request.name = v.into();
13560            self
13561        }
13562
13563        /// Sets the value of [view][crate::model::GetEntityRequest::view].
13564        pub fn set_view<T: Into<crate::model::get_entity_request::EntityView>>(
13565            mut self,
13566            v: T,
13567        ) -> Self {
13568            self.0.request.view = v.into();
13569            self
13570        }
13571    }
13572
13573    #[doc(hidden)]
13574    impl crate::RequestBuilder for GetEntity {
13575        fn request_options(&mut self) -> &mut crate::RequestOptions {
13576            &mut self.0.options
13577        }
13578    }
13579
13580    /// The request builder for [MetadataService::list_entities][crate::client::MetadataService::list_entities] calls.
13581    ///
13582    /// # Example
13583    /// ```
13584    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListEntities;
13585    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13586    /// use google_cloud_gax::paginator::ItemPaginator;
13587    ///
13588    /// let builder = prepare_request_builder();
13589    /// let mut items = builder.by_item();
13590    /// while let Some(result) = items.next().await {
13591    ///   let item = result?;
13592    /// }
13593    /// # Ok(()) }
13594    ///
13595    /// fn prepare_request_builder() -> ListEntities {
13596    ///   # panic!();
13597    ///   // ... details omitted ...
13598    /// }
13599    /// ```
13600    #[derive(Clone, Debug)]
13601    pub struct ListEntities(RequestBuilder<crate::model::ListEntitiesRequest>);
13602
13603    impl ListEntities {
13604        pub(crate) fn new(
13605            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13606        ) -> Self {
13607            Self(RequestBuilder::new(stub))
13608        }
13609
13610        /// Sets the full request, replacing any prior values.
13611        pub fn with_request<V: Into<crate::model::ListEntitiesRequest>>(mut self, v: V) -> Self {
13612            self.0.request = v.into();
13613            self
13614        }
13615
13616        /// Sets all the options, replacing any prior values.
13617        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13618            self.0.options = v.into();
13619            self
13620        }
13621
13622        /// Sends the request.
13623        pub async fn send(self) -> Result<crate::model::ListEntitiesResponse> {
13624            (*self.0.stub)
13625                .list_entities(self.0.request, self.0.options)
13626                .await
13627                .map(crate::Response::into_body)
13628        }
13629
13630        /// Streams each page in the collection.
13631        pub fn by_page(
13632            self,
13633        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListEntitiesResponse, crate::Error>
13634        {
13635            use std::clone::Clone;
13636            let token = self.0.request.page_token.clone();
13637            let execute = move |token: String| {
13638                let mut builder = self.clone();
13639                builder.0.request = builder.0.request.set_page_token(token);
13640                builder.send()
13641            };
13642            google_cloud_gax::paginator::internal::new_paginator(token, execute)
13643        }
13644
13645        /// Streams each item in the collection.
13646        pub fn by_item(
13647            self,
13648        ) -> impl google_cloud_gax::paginator::ItemPaginator<
13649            crate::model::ListEntitiesResponse,
13650            crate::Error,
13651        > {
13652            use google_cloud_gax::paginator::Paginator;
13653            self.by_page().items()
13654        }
13655
13656        /// Sets the value of [parent][crate::model::ListEntitiesRequest::parent].
13657        ///
13658        /// This is a **required** field for requests.
13659        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13660            self.0.request.parent = v.into();
13661            self
13662        }
13663
13664        /// Sets the value of [view][crate::model::ListEntitiesRequest::view].
13665        ///
13666        /// This is a **required** field for requests.
13667        pub fn set_view<T: Into<crate::model::list_entities_request::EntityView>>(
13668            mut self,
13669            v: T,
13670        ) -> Self {
13671            self.0.request.view = v.into();
13672            self
13673        }
13674
13675        /// Sets the value of [page_size][crate::model::ListEntitiesRequest::page_size].
13676        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13677            self.0.request.page_size = v.into();
13678            self
13679        }
13680
13681        /// Sets the value of [page_token][crate::model::ListEntitiesRequest::page_token].
13682        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13683            self.0.request.page_token = v.into();
13684            self
13685        }
13686
13687        /// Sets the value of [filter][crate::model::ListEntitiesRequest::filter].
13688        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13689            self.0.request.filter = v.into();
13690            self
13691        }
13692    }
13693
13694    #[doc(hidden)]
13695    impl crate::RequestBuilder for ListEntities {
13696        fn request_options(&mut self) -> &mut crate::RequestOptions {
13697            &mut self.0.options
13698        }
13699    }
13700
13701    /// The request builder for [MetadataService::create_partition][crate::client::MetadataService::create_partition] calls.
13702    ///
13703    /// # Example
13704    /// ```
13705    /// # use google_cloud_dataplex_v1::builder::metadata_service::CreatePartition;
13706    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13707    ///
13708    /// let builder = prepare_request_builder();
13709    /// let response = builder.send().await?;
13710    /// # Ok(()) }
13711    ///
13712    /// fn prepare_request_builder() -> CreatePartition {
13713    ///   # panic!();
13714    ///   // ... details omitted ...
13715    /// }
13716    /// ```
13717    #[derive(Clone, Debug)]
13718    pub struct CreatePartition(RequestBuilder<crate::model::CreatePartitionRequest>);
13719
13720    impl CreatePartition {
13721        pub(crate) fn new(
13722            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13723        ) -> Self {
13724            Self(RequestBuilder::new(stub))
13725        }
13726
13727        /// Sets the full request, replacing any prior values.
13728        pub fn with_request<V: Into<crate::model::CreatePartitionRequest>>(mut self, v: V) -> Self {
13729            self.0.request = v.into();
13730            self
13731        }
13732
13733        /// Sets all the options, replacing any prior values.
13734        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13735            self.0.options = v.into();
13736            self
13737        }
13738
13739        /// Sends the request.
13740        pub async fn send(self) -> Result<crate::model::Partition> {
13741            (*self.0.stub)
13742                .create_partition(self.0.request, self.0.options)
13743                .await
13744                .map(crate::Response::into_body)
13745        }
13746
13747        /// Sets the value of [parent][crate::model::CreatePartitionRequest::parent].
13748        ///
13749        /// This is a **required** field for requests.
13750        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13751            self.0.request.parent = v.into();
13752            self
13753        }
13754
13755        /// Sets the value of [partition][crate::model::CreatePartitionRequest::partition].
13756        ///
13757        /// This is a **required** field for requests.
13758        pub fn set_partition<T>(mut self, v: T) -> Self
13759        where
13760            T: std::convert::Into<crate::model::Partition>,
13761        {
13762            self.0.request.partition = std::option::Option::Some(v.into());
13763            self
13764        }
13765
13766        /// Sets or clears the value of [partition][crate::model::CreatePartitionRequest::partition].
13767        ///
13768        /// This is a **required** field for requests.
13769        pub fn set_or_clear_partition<T>(mut self, v: std::option::Option<T>) -> Self
13770        where
13771            T: std::convert::Into<crate::model::Partition>,
13772        {
13773            self.0.request.partition = v.map(|x| x.into());
13774            self
13775        }
13776
13777        /// Sets the value of [validate_only][crate::model::CreatePartitionRequest::validate_only].
13778        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
13779            self.0.request.validate_only = v.into();
13780            self
13781        }
13782    }
13783
13784    #[doc(hidden)]
13785    impl crate::RequestBuilder for CreatePartition {
13786        fn request_options(&mut self) -> &mut crate::RequestOptions {
13787            &mut self.0.options
13788        }
13789    }
13790
13791    /// The request builder for [MetadataService::delete_partition][crate::client::MetadataService::delete_partition] calls.
13792    ///
13793    /// # Example
13794    /// ```
13795    /// # use google_cloud_dataplex_v1::builder::metadata_service::DeletePartition;
13796    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13797    ///
13798    /// let builder = prepare_request_builder();
13799    /// let response = builder.send().await?;
13800    /// # Ok(()) }
13801    ///
13802    /// fn prepare_request_builder() -> DeletePartition {
13803    ///   # panic!();
13804    ///   // ... details omitted ...
13805    /// }
13806    /// ```
13807    #[derive(Clone, Debug)]
13808    pub struct DeletePartition(RequestBuilder<crate::model::DeletePartitionRequest>);
13809
13810    impl DeletePartition {
13811        pub(crate) fn new(
13812            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13813        ) -> Self {
13814            Self(RequestBuilder::new(stub))
13815        }
13816
13817        /// Sets the full request, replacing any prior values.
13818        pub fn with_request<V: Into<crate::model::DeletePartitionRequest>>(mut self, v: V) -> Self {
13819            self.0.request = v.into();
13820            self
13821        }
13822
13823        /// Sets all the options, replacing any prior values.
13824        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13825            self.0.options = v.into();
13826            self
13827        }
13828
13829        /// Sends the request.
13830        pub async fn send(self) -> Result<()> {
13831            (*self.0.stub)
13832                .delete_partition(self.0.request, self.0.options)
13833                .await
13834                .map(crate::Response::into_body)
13835        }
13836
13837        /// Sets the value of [name][crate::model::DeletePartitionRequest::name].
13838        ///
13839        /// This is a **required** field for requests.
13840        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13841            self.0.request.name = v.into();
13842            self
13843        }
13844
13845        /// Sets the value of [etag][crate::model::DeletePartitionRequest::etag].
13846        #[deprecated]
13847        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
13848            self.0.request.etag = v.into();
13849            self
13850        }
13851    }
13852
13853    #[doc(hidden)]
13854    impl crate::RequestBuilder for DeletePartition {
13855        fn request_options(&mut self) -> &mut crate::RequestOptions {
13856            &mut self.0.options
13857        }
13858    }
13859
13860    /// The request builder for [MetadataService::get_partition][crate::client::MetadataService::get_partition] calls.
13861    ///
13862    /// # Example
13863    /// ```
13864    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetPartition;
13865    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13866    ///
13867    /// let builder = prepare_request_builder();
13868    /// let response = builder.send().await?;
13869    /// # Ok(()) }
13870    ///
13871    /// fn prepare_request_builder() -> GetPartition {
13872    ///   # panic!();
13873    ///   // ... details omitted ...
13874    /// }
13875    /// ```
13876    #[derive(Clone, Debug)]
13877    pub struct GetPartition(RequestBuilder<crate::model::GetPartitionRequest>);
13878
13879    impl GetPartition {
13880        pub(crate) fn new(
13881            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13882        ) -> Self {
13883            Self(RequestBuilder::new(stub))
13884        }
13885
13886        /// Sets the full request, replacing any prior values.
13887        pub fn with_request<V: Into<crate::model::GetPartitionRequest>>(mut self, v: V) -> Self {
13888            self.0.request = v.into();
13889            self
13890        }
13891
13892        /// Sets all the options, replacing any prior values.
13893        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13894            self.0.options = v.into();
13895            self
13896        }
13897
13898        /// Sends the request.
13899        pub async fn send(self) -> Result<crate::model::Partition> {
13900            (*self.0.stub)
13901                .get_partition(self.0.request, self.0.options)
13902                .await
13903                .map(crate::Response::into_body)
13904        }
13905
13906        /// Sets the value of [name][crate::model::GetPartitionRequest::name].
13907        ///
13908        /// This is a **required** field for requests.
13909        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13910            self.0.request.name = v.into();
13911            self
13912        }
13913    }
13914
13915    #[doc(hidden)]
13916    impl crate::RequestBuilder for GetPartition {
13917        fn request_options(&mut self) -> &mut crate::RequestOptions {
13918            &mut self.0.options
13919        }
13920    }
13921
13922    /// The request builder for [MetadataService::list_partitions][crate::client::MetadataService::list_partitions] calls.
13923    ///
13924    /// # Example
13925    /// ```
13926    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListPartitions;
13927    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13928    /// use google_cloud_gax::paginator::ItemPaginator;
13929    ///
13930    /// let builder = prepare_request_builder();
13931    /// let mut items = builder.by_item();
13932    /// while let Some(result) = items.next().await {
13933    ///   let item = result?;
13934    /// }
13935    /// # Ok(()) }
13936    ///
13937    /// fn prepare_request_builder() -> ListPartitions {
13938    ///   # panic!();
13939    ///   // ... details omitted ...
13940    /// }
13941    /// ```
13942    #[derive(Clone, Debug)]
13943    pub struct ListPartitions(RequestBuilder<crate::model::ListPartitionsRequest>);
13944
13945    impl ListPartitions {
13946        pub(crate) fn new(
13947            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13948        ) -> Self {
13949            Self(RequestBuilder::new(stub))
13950        }
13951
13952        /// Sets the full request, replacing any prior values.
13953        pub fn with_request<V: Into<crate::model::ListPartitionsRequest>>(mut self, v: V) -> Self {
13954            self.0.request = v.into();
13955            self
13956        }
13957
13958        /// Sets all the options, replacing any prior values.
13959        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13960            self.0.options = v.into();
13961            self
13962        }
13963
13964        /// Sends the request.
13965        pub async fn send(self) -> Result<crate::model::ListPartitionsResponse> {
13966            (*self.0.stub)
13967                .list_partitions(self.0.request, self.0.options)
13968                .await
13969                .map(crate::Response::into_body)
13970        }
13971
13972        /// Streams each page in the collection.
13973        pub fn by_page(
13974            self,
13975        ) -> impl google_cloud_gax::paginator::Paginator<
13976            crate::model::ListPartitionsResponse,
13977            crate::Error,
13978        > {
13979            use std::clone::Clone;
13980            let token = self.0.request.page_token.clone();
13981            let execute = move |token: String| {
13982                let mut builder = self.clone();
13983                builder.0.request = builder.0.request.set_page_token(token);
13984                builder.send()
13985            };
13986            google_cloud_gax::paginator::internal::new_paginator(token, execute)
13987        }
13988
13989        /// Streams each item in the collection.
13990        pub fn by_item(
13991            self,
13992        ) -> impl google_cloud_gax::paginator::ItemPaginator<
13993            crate::model::ListPartitionsResponse,
13994            crate::Error,
13995        > {
13996            use google_cloud_gax::paginator::Paginator;
13997            self.by_page().items()
13998        }
13999
14000        /// Sets the value of [parent][crate::model::ListPartitionsRequest::parent].
14001        ///
14002        /// This is a **required** field for requests.
14003        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14004            self.0.request.parent = v.into();
14005            self
14006        }
14007
14008        /// Sets the value of [page_size][crate::model::ListPartitionsRequest::page_size].
14009        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
14010            self.0.request.page_size = v.into();
14011            self
14012        }
14013
14014        /// Sets the value of [page_token][crate::model::ListPartitionsRequest::page_token].
14015        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
14016            self.0.request.page_token = v.into();
14017            self
14018        }
14019
14020        /// Sets the value of [filter][crate::model::ListPartitionsRequest::filter].
14021        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
14022            self.0.request.filter = v.into();
14023            self
14024        }
14025    }
14026
14027    #[doc(hidden)]
14028    impl crate::RequestBuilder for ListPartitions {
14029        fn request_options(&mut self) -> &mut crate::RequestOptions {
14030            &mut self.0.options
14031        }
14032    }
14033
14034    /// The request builder for [MetadataService::list_locations][crate::client::MetadataService::list_locations] calls.
14035    ///
14036    /// # Example
14037    /// ```
14038    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListLocations;
14039    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14040    /// use google_cloud_gax::paginator::ItemPaginator;
14041    ///
14042    /// let builder = prepare_request_builder();
14043    /// let mut items = builder.by_item();
14044    /// while let Some(result) = items.next().await {
14045    ///   let item = result?;
14046    /// }
14047    /// # Ok(()) }
14048    ///
14049    /// fn prepare_request_builder() -> ListLocations {
14050    ///   # panic!();
14051    ///   // ... details omitted ...
14052    /// }
14053    /// ```
14054    #[derive(Clone, Debug)]
14055    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
14056
14057    impl ListLocations {
14058        pub(crate) fn new(
14059            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14060        ) -> Self {
14061            Self(RequestBuilder::new(stub))
14062        }
14063
14064        /// Sets the full request, replacing any prior values.
14065        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
14066            mut self,
14067            v: V,
14068        ) -> Self {
14069            self.0.request = v.into();
14070            self
14071        }
14072
14073        /// Sets all the options, replacing any prior values.
14074        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14075            self.0.options = v.into();
14076            self
14077        }
14078
14079        /// Sends the request.
14080        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
14081            (*self.0.stub)
14082                .list_locations(self.0.request, self.0.options)
14083                .await
14084                .map(crate::Response::into_body)
14085        }
14086
14087        /// Streams each page in the collection.
14088        pub fn by_page(
14089            self,
14090        ) -> impl google_cloud_gax::paginator::Paginator<
14091            google_cloud_location::model::ListLocationsResponse,
14092            crate::Error,
14093        > {
14094            use std::clone::Clone;
14095            let token = self.0.request.page_token.clone();
14096            let execute = move |token: String| {
14097                let mut builder = self.clone();
14098                builder.0.request = builder.0.request.set_page_token(token);
14099                builder.send()
14100            };
14101            google_cloud_gax::paginator::internal::new_paginator(token, execute)
14102        }
14103
14104        /// Streams each item in the collection.
14105        pub fn by_item(
14106            self,
14107        ) -> impl google_cloud_gax::paginator::ItemPaginator<
14108            google_cloud_location::model::ListLocationsResponse,
14109            crate::Error,
14110        > {
14111            use google_cloud_gax::paginator::Paginator;
14112            self.by_page().items()
14113        }
14114
14115        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
14116        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14117            self.0.request.name = v.into();
14118            self
14119        }
14120
14121        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
14122        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
14123            self.0.request.filter = v.into();
14124            self
14125        }
14126
14127        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
14128        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
14129            self.0.request.page_size = v.into();
14130            self
14131        }
14132
14133        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
14134        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
14135            self.0.request.page_token = v.into();
14136            self
14137        }
14138    }
14139
14140    #[doc(hidden)]
14141    impl crate::RequestBuilder for ListLocations {
14142        fn request_options(&mut self) -> &mut crate::RequestOptions {
14143            &mut self.0.options
14144        }
14145    }
14146
14147    /// The request builder for [MetadataService::get_location][crate::client::MetadataService::get_location] calls.
14148    ///
14149    /// # Example
14150    /// ```
14151    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetLocation;
14152    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14153    ///
14154    /// let builder = prepare_request_builder();
14155    /// let response = builder.send().await?;
14156    /// # Ok(()) }
14157    ///
14158    /// fn prepare_request_builder() -> GetLocation {
14159    ///   # panic!();
14160    ///   // ... details omitted ...
14161    /// }
14162    /// ```
14163    #[derive(Clone, Debug)]
14164    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
14165
14166    impl GetLocation {
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<google_cloud_location::model::GetLocationRequest>>(
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<crate::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<google_cloud_location::model::Location> {
14190            (*self.0.stub)
14191                .get_location(self.0.request, self.0.options)
14192                .await
14193                .map(crate::Response::into_body)
14194        }
14195
14196        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
14197        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14198            self.0.request.name = v.into();
14199            self
14200        }
14201    }
14202
14203    #[doc(hidden)]
14204    impl crate::RequestBuilder for GetLocation {
14205        fn request_options(&mut self) -> &mut crate::RequestOptions {
14206            &mut self.0.options
14207        }
14208    }
14209
14210    /// The request builder for [MetadataService::set_iam_policy][crate::client::MetadataService::set_iam_policy] calls.
14211    ///
14212    /// # Example
14213    /// ```
14214    /// # use google_cloud_dataplex_v1::builder::metadata_service::SetIamPolicy;
14215    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14216    ///
14217    /// let builder = prepare_request_builder();
14218    /// let response = builder.send().await?;
14219    /// # Ok(()) }
14220    ///
14221    /// fn prepare_request_builder() -> SetIamPolicy {
14222    ///   # panic!();
14223    ///   // ... details omitted ...
14224    /// }
14225    /// ```
14226    #[derive(Clone, Debug)]
14227    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
14228
14229    impl SetIamPolicy {
14230        pub(crate) fn new(
14231            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14232        ) -> Self {
14233            Self(RequestBuilder::new(stub))
14234        }
14235
14236        /// Sets the full request, replacing any prior values.
14237        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
14238            mut self,
14239            v: V,
14240        ) -> Self {
14241            self.0.request = v.into();
14242            self
14243        }
14244
14245        /// Sets all the options, replacing any prior values.
14246        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14247            self.0.options = v.into();
14248            self
14249        }
14250
14251        /// Sends the request.
14252        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
14253            (*self.0.stub)
14254                .set_iam_policy(self.0.request, self.0.options)
14255                .await
14256                .map(crate::Response::into_body)
14257        }
14258
14259        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
14260        ///
14261        /// This is a **required** field for requests.
14262        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
14263            self.0.request.resource = v.into();
14264            self
14265        }
14266
14267        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
14268        ///
14269        /// This is a **required** field for requests.
14270        pub fn set_policy<T>(mut self, v: T) -> Self
14271        where
14272            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
14273        {
14274            self.0.request.policy = std::option::Option::Some(v.into());
14275            self
14276        }
14277
14278        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
14279        ///
14280        /// This is a **required** field for requests.
14281        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
14282        where
14283            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
14284        {
14285            self.0.request.policy = v.map(|x| x.into());
14286            self
14287        }
14288
14289        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
14290        pub fn set_update_mask<T>(mut self, v: T) -> Self
14291        where
14292            T: std::convert::Into<wkt::FieldMask>,
14293        {
14294            self.0.request.update_mask = std::option::Option::Some(v.into());
14295            self
14296        }
14297
14298        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
14299        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
14300        where
14301            T: std::convert::Into<wkt::FieldMask>,
14302        {
14303            self.0.request.update_mask = v.map(|x| x.into());
14304            self
14305        }
14306    }
14307
14308    #[doc(hidden)]
14309    impl crate::RequestBuilder for SetIamPolicy {
14310        fn request_options(&mut self) -> &mut crate::RequestOptions {
14311            &mut self.0.options
14312        }
14313    }
14314
14315    /// The request builder for [MetadataService::get_iam_policy][crate::client::MetadataService::get_iam_policy] calls.
14316    ///
14317    /// # Example
14318    /// ```
14319    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetIamPolicy;
14320    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14321    ///
14322    /// let builder = prepare_request_builder();
14323    /// let response = builder.send().await?;
14324    /// # Ok(()) }
14325    ///
14326    /// fn prepare_request_builder() -> GetIamPolicy {
14327    ///   # panic!();
14328    ///   // ... details omitted ...
14329    /// }
14330    /// ```
14331    #[derive(Clone, Debug)]
14332    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
14333
14334    impl GetIamPolicy {
14335        pub(crate) fn new(
14336            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14337        ) -> Self {
14338            Self(RequestBuilder::new(stub))
14339        }
14340
14341        /// Sets the full request, replacing any prior values.
14342        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
14343            mut self,
14344            v: V,
14345        ) -> Self {
14346            self.0.request = v.into();
14347            self
14348        }
14349
14350        /// Sets all the options, replacing any prior values.
14351        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14352            self.0.options = v.into();
14353            self
14354        }
14355
14356        /// Sends the request.
14357        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
14358            (*self.0.stub)
14359                .get_iam_policy(self.0.request, self.0.options)
14360                .await
14361                .map(crate::Response::into_body)
14362        }
14363
14364        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
14365        ///
14366        /// This is a **required** field for requests.
14367        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
14368            self.0.request.resource = v.into();
14369            self
14370        }
14371
14372        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
14373        pub fn set_options<T>(mut self, v: T) -> Self
14374        where
14375            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
14376        {
14377            self.0.request.options = std::option::Option::Some(v.into());
14378            self
14379        }
14380
14381        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
14382        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
14383        where
14384            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
14385        {
14386            self.0.request.options = v.map(|x| x.into());
14387            self
14388        }
14389    }
14390
14391    #[doc(hidden)]
14392    impl crate::RequestBuilder for GetIamPolicy {
14393        fn request_options(&mut self) -> &mut crate::RequestOptions {
14394            &mut self.0.options
14395        }
14396    }
14397
14398    /// The request builder for [MetadataService::test_iam_permissions][crate::client::MetadataService::test_iam_permissions] calls.
14399    ///
14400    /// # Example
14401    /// ```
14402    /// # use google_cloud_dataplex_v1::builder::metadata_service::TestIamPermissions;
14403    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14404    ///
14405    /// let builder = prepare_request_builder();
14406    /// let response = builder.send().await?;
14407    /// # Ok(()) }
14408    ///
14409    /// fn prepare_request_builder() -> TestIamPermissions {
14410    ///   # panic!();
14411    ///   // ... details omitted ...
14412    /// }
14413    /// ```
14414    #[derive(Clone, Debug)]
14415    pub struct TestIamPermissions(
14416        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
14417    );
14418
14419    impl TestIamPermissions {
14420        pub(crate) fn new(
14421            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14422        ) -> Self {
14423            Self(RequestBuilder::new(stub))
14424        }
14425
14426        /// Sets the full request, replacing any prior values.
14427        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
14428            mut self,
14429            v: V,
14430        ) -> Self {
14431            self.0.request = v.into();
14432            self
14433        }
14434
14435        /// Sets all the options, replacing any prior values.
14436        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14437            self.0.options = v.into();
14438            self
14439        }
14440
14441        /// Sends the request.
14442        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
14443            (*self.0.stub)
14444                .test_iam_permissions(self.0.request, self.0.options)
14445                .await
14446                .map(crate::Response::into_body)
14447        }
14448
14449        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
14450        ///
14451        /// This is a **required** field for requests.
14452        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
14453            self.0.request.resource = v.into();
14454            self
14455        }
14456
14457        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
14458        ///
14459        /// This is a **required** field for requests.
14460        pub fn set_permissions<T, V>(mut self, v: T) -> Self
14461        where
14462            T: std::iter::IntoIterator<Item = V>,
14463            V: std::convert::Into<std::string::String>,
14464        {
14465            use std::iter::Iterator;
14466            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
14467            self
14468        }
14469    }
14470
14471    #[doc(hidden)]
14472    impl crate::RequestBuilder for TestIamPermissions {
14473        fn request_options(&mut self) -> &mut crate::RequestOptions {
14474            &mut self.0.options
14475        }
14476    }
14477
14478    /// The request builder for [MetadataService::list_operations][crate::client::MetadataService::list_operations] calls.
14479    ///
14480    /// # Example
14481    /// ```
14482    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListOperations;
14483    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14484    /// use google_cloud_gax::paginator::ItemPaginator;
14485    ///
14486    /// let builder = prepare_request_builder();
14487    /// let mut items = builder.by_item();
14488    /// while let Some(result) = items.next().await {
14489    ///   let item = result?;
14490    /// }
14491    /// # Ok(()) }
14492    ///
14493    /// fn prepare_request_builder() -> ListOperations {
14494    ///   # panic!();
14495    ///   // ... details omitted ...
14496    /// }
14497    /// ```
14498    #[derive(Clone, Debug)]
14499    pub struct ListOperations(
14500        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
14501    );
14502
14503    impl ListOperations {
14504        pub(crate) fn new(
14505            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14506        ) -> Self {
14507            Self(RequestBuilder::new(stub))
14508        }
14509
14510        /// Sets the full request, replacing any prior values.
14511        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
14512            mut self,
14513            v: V,
14514        ) -> Self {
14515            self.0.request = v.into();
14516            self
14517        }
14518
14519        /// Sets all the options, replacing any prior values.
14520        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14521            self.0.options = v.into();
14522            self
14523        }
14524
14525        /// Sends the request.
14526        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
14527            (*self.0.stub)
14528                .list_operations(self.0.request, self.0.options)
14529                .await
14530                .map(crate::Response::into_body)
14531        }
14532
14533        /// Streams each page in the collection.
14534        pub fn by_page(
14535            self,
14536        ) -> impl google_cloud_gax::paginator::Paginator<
14537            google_cloud_longrunning::model::ListOperationsResponse,
14538            crate::Error,
14539        > {
14540            use std::clone::Clone;
14541            let token = self.0.request.page_token.clone();
14542            let execute = move |token: String| {
14543                let mut builder = self.clone();
14544                builder.0.request = builder.0.request.set_page_token(token);
14545                builder.send()
14546            };
14547            google_cloud_gax::paginator::internal::new_paginator(token, execute)
14548        }
14549
14550        /// Streams each item in the collection.
14551        pub fn by_item(
14552            self,
14553        ) -> impl google_cloud_gax::paginator::ItemPaginator<
14554            google_cloud_longrunning::model::ListOperationsResponse,
14555            crate::Error,
14556        > {
14557            use google_cloud_gax::paginator::Paginator;
14558            self.by_page().items()
14559        }
14560
14561        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
14562        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14563            self.0.request.name = v.into();
14564            self
14565        }
14566
14567        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
14568        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
14569            self.0.request.filter = v.into();
14570            self
14571        }
14572
14573        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
14574        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
14575            self.0.request.page_size = v.into();
14576            self
14577        }
14578
14579        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
14580        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
14581            self.0.request.page_token = v.into();
14582            self
14583        }
14584
14585        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
14586        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
14587            self.0.request.return_partial_success = v.into();
14588            self
14589        }
14590    }
14591
14592    #[doc(hidden)]
14593    impl crate::RequestBuilder for ListOperations {
14594        fn request_options(&mut self) -> &mut crate::RequestOptions {
14595            &mut self.0.options
14596        }
14597    }
14598
14599    /// The request builder for [MetadataService::get_operation][crate::client::MetadataService::get_operation] calls.
14600    ///
14601    /// # Example
14602    /// ```
14603    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetOperation;
14604    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14605    ///
14606    /// let builder = prepare_request_builder();
14607    /// let response = builder.send().await?;
14608    /// # Ok(()) }
14609    ///
14610    /// fn prepare_request_builder() -> GetOperation {
14611    ///   # panic!();
14612    ///   // ... details omitted ...
14613    /// }
14614    /// ```
14615    #[derive(Clone, Debug)]
14616    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
14617
14618    impl GetOperation {
14619        pub(crate) fn new(
14620            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14621        ) -> Self {
14622            Self(RequestBuilder::new(stub))
14623        }
14624
14625        /// Sets the full request, replacing any prior values.
14626        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
14627            mut self,
14628            v: V,
14629        ) -> Self {
14630            self.0.request = v.into();
14631            self
14632        }
14633
14634        /// Sets all the options, replacing any prior values.
14635        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14636            self.0.options = v.into();
14637            self
14638        }
14639
14640        /// Sends the request.
14641        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14642            (*self.0.stub)
14643                .get_operation(self.0.request, self.0.options)
14644                .await
14645                .map(crate::Response::into_body)
14646        }
14647
14648        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
14649        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14650            self.0.request.name = v.into();
14651            self
14652        }
14653    }
14654
14655    #[doc(hidden)]
14656    impl crate::RequestBuilder for GetOperation {
14657        fn request_options(&mut self) -> &mut crate::RequestOptions {
14658            &mut self.0.options
14659        }
14660    }
14661
14662    /// The request builder for [MetadataService::delete_operation][crate::client::MetadataService::delete_operation] calls.
14663    ///
14664    /// # Example
14665    /// ```
14666    /// # use google_cloud_dataplex_v1::builder::metadata_service::DeleteOperation;
14667    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14668    ///
14669    /// let builder = prepare_request_builder();
14670    /// let response = builder.send().await?;
14671    /// # Ok(()) }
14672    ///
14673    /// fn prepare_request_builder() -> DeleteOperation {
14674    ///   # panic!();
14675    ///   // ... details omitted ...
14676    /// }
14677    /// ```
14678    #[derive(Clone, Debug)]
14679    pub struct DeleteOperation(
14680        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
14681    );
14682
14683    impl DeleteOperation {
14684        pub(crate) fn new(
14685            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14686        ) -> Self {
14687            Self(RequestBuilder::new(stub))
14688        }
14689
14690        /// Sets the full request, replacing any prior values.
14691        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
14692            mut self,
14693            v: V,
14694        ) -> Self {
14695            self.0.request = v.into();
14696            self
14697        }
14698
14699        /// Sets all the options, replacing any prior values.
14700        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14701            self.0.options = v.into();
14702            self
14703        }
14704
14705        /// Sends the request.
14706        pub async fn send(self) -> Result<()> {
14707            (*self.0.stub)
14708                .delete_operation(self.0.request, self.0.options)
14709                .await
14710                .map(crate::Response::into_body)
14711        }
14712
14713        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
14714        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14715            self.0.request.name = v.into();
14716            self
14717        }
14718    }
14719
14720    #[doc(hidden)]
14721    impl crate::RequestBuilder for DeleteOperation {
14722        fn request_options(&mut self) -> &mut crate::RequestOptions {
14723            &mut self.0.options
14724        }
14725    }
14726
14727    /// The request builder for [MetadataService::cancel_operation][crate::client::MetadataService::cancel_operation] calls.
14728    ///
14729    /// # Example
14730    /// ```
14731    /// # use google_cloud_dataplex_v1::builder::metadata_service::CancelOperation;
14732    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14733    ///
14734    /// let builder = prepare_request_builder();
14735    /// let response = builder.send().await?;
14736    /// # Ok(()) }
14737    ///
14738    /// fn prepare_request_builder() -> CancelOperation {
14739    ///   # panic!();
14740    ///   // ... details omitted ...
14741    /// }
14742    /// ```
14743    #[derive(Clone, Debug)]
14744    pub struct CancelOperation(
14745        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
14746    );
14747
14748    impl CancelOperation {
14749        pub(crate) fn new(
14750            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14751        ) -> Self {
14752            Self(RequestBuilder::new(stub))
14753        }
14754
14755        /// Sets the full request, replacing any prior values.
14756        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
14757            mut self,
14758            v: V,
14759        ) -> Self {
14760            self.0.request = v.into();
14761            self
14762        }
14763
14764        /// Sets all the options, replacing any prior values.
14765        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14766            self.0.options = v.into();
14767            self
14768        }
14769
14770        /// Sends the request.
14771        pub async fn send(self) -> Result<()> {
14772            (*self.0.stub)
14773                .cancel_operation(self.0.request, self.0.options)
14774                .await
14775                .map(crate::Response::into_body)
14776        }
14777
14778        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
14779        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14780            self.0.request.name = v.into();
14781            self
14782        }
14783    }
14784
14785    #[doc(hidden)]
14786    impl crate::RequestBuilder for CancelOperation {
14787        fn request_options(&mut self) -> &mut crate::RequestOptions {
14788            &mut self.0.options
14789        }
14790    }
14791}
14792
14793pub mod dataplex_service {
14794    use crate::Result;
14795
14796    /// A builder for [DataplexService][crate::client::DataplexService].
14797    ///
14798    /// ```
14799    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
14800    /// # use google_cloud_dataplex_v1::*;
14801    /// # use builder::dataplex_service::ClientBuilder;
14802    /// # use client::DataplexService;
14803    /// let builder : ClientBuilder = DataplexService::builder();
14804    /// let client = builder
14805    ///     .with_endpoint("https://dataplex.googleapis.com")
14806    ///     .build().await?;
14807    /// # Ok(()) }
14808    /// ```
14809    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
14810
14811    pub(crate) mod client {
14812        use super::super::super::client::DataplexService;
14813        pub struct Factory;
14814        impl crate::ClientFactory for Factory {
14815            type Client = DataplexService;
14816            type Credentials = gaxi::options::Credentials;
14817            async fn build(
14818                self,
14819                config: gaxi::options::ClientConfig,
14820            ) -> crate::ClientBuilderResult<Self::Client> {
14821                Self::Client::new(config).await
14822            }
14823        }
14824    }
14825
14826    /// Common implementation for [crate::client::DataplexService] request builders.
14827    #[derive(Clone, Debug)]
14828    pub(crate) struct RequestBuilder<R: std::default::Default> {
14829        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14830        request: R,
14831        options: crate::RequestOptions,
14832    }
14833
14834    impl<R> RequestBuilder<R>
14835    where
14836        R: std::default::Default,
14837    {
14838        pub(crate) fn new(
14839            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14840        ) -> Self {
14841            Self {
14842                stub,
14843                request: R::default(),
14844                options: crate::RequestOptions::default(),
14845            }
14846        }
14847    }
14848
14849    /// The request builder for [DataplexService::create_lake][crate::client::DataplexService::create_lake] calls.
14850    ///
14851    /// # Example
14852    /// ```
14853    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateLake;
14854    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14855    /// use google_cloud_lro::Poller;
14856    ///
14857    /// let builder = prepare_request_builder();
14858    /// let response = builder.poller().until_done().await?;
14859    /// # Ok(()) }
14860    ///
14861    /// fn prepare_request_builder() -> CreateLake {
14862    ///   # panic!();
14863    ///   // ... details omitted ...
14864    /// }
14865    /// ```
14866    #[derive(Clone, Debug)]
14867    pub struct CreateLake(RequestBuilder<crate::model::CreateLakeRequest>);
14868
14869    impl CreateLake {
14870        pub(crate) fn new(
14871            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14872        ) -> Self {
14873            Self(RequestBuilder::new(stub))
14874        }
14875
14876        /// Sets the full request, replacing any prior values.
14877        pub fn with_request<V: Into<crate::model::CreateLakeRequest>>(mut self, v: V) -> Self {
14878            self.0.request = v.into();
14879            self
14880        }
14881
14882        /// Sets all the options, replacing any prior values.
14883        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14884            self.0.options = v.into();
14885            self
14886        }
14887
14888        /// Sends the request.
14889        ///
14890        /// # Long running operations
14891        ///
14892        /// This starts, but does not poll, a longrunning operation. More information
14893        /// on [create_lake][crate::client::DataplexService::create_lake].
14894        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14895            (*self.0.stub)
14896                .create_lake(self.0.request, self.0.options)
14897                .await
14898                .map(crate::Response::into_body)
14899        }
14900
14901        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_lake`.
14902        pub fn poller(
14903            self,
14904        ) -> impl google_cloud_lro::Poller<crate::model::Lake, crate::model::OperationMetadata>
14905        {
14906            type Operation = google_cloud_lro::internal::Operation<
14907                crate::model::Lake,
14908                crate::model::OperationMetadata,
14909            >;
14910            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14911            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14912
14913            let stub = self.0.stub.clone();
14914            let mut options = self.0.options.clone();
14915            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
14916            let query = move |name| {
14917                let stub = stub.clone();
14918                let options = options.clone();
14919                async {
14920                    let op = GetOperation::new(stub)
14921                        .set_name(name)
14922                        .with_options(options)
14923                        .send()
14924                        .await?;
14925                    Ok(Operation::new(op))
14926                }
14927            };
14928
14929            let start = move || async {
14930                let op = self.send().await?;
14931                Ok(Operation::new(op))
14932            };
14933
14934            google_cloud_lro::internal::new_poller(
14935                polling_error_policy,
14936                polling_backoff_policy,
14937                start,
14938                query,
14939            )
14940        }
14941
14942        /// Sets the value of [parent][crate::model::CreateLakeRequest::parent].
14943        ///
14944        /// This is a **required** field for requests.
14945        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14946            self.0.request.parent = v.into();
14947            self
14948        }
14949
14950        /// Sets the value of [lake_id][crate::model::CreateLakeRequest::lake_id].
14951        ///
14952        /// This is a **required** field for requests.
14953        pub fn set_lake_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
14954            self.0.request.lake_id = v.into();
14955            self
14956        }
14957
14958        /// Sets the value of [lake][crate::model::CreateLakeRequest::lake].
14959        ///
14960        /// This is a **required** field for requests.
14961        pub fn set_lake<T>(mut self, v: T) -> Self
14962        where
14963            T: std::convert::Into<crate::model::Lake>,
14964        {
14965            self.0.request.lake = std::option::Option::Some(v.into());
14966            self
14967        }
14968
14969        /// Sets or clears the value of [lake][crate::model::CreateLakeRequest::lake].
14970        ///
14971        /// This is a **required** field for requests.
14972        pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
14973        where
14974            T: std::convert::Into<crate::model::Lake>,
14975        {
14976            self.0.request.lake = v.map(|x| x.into());
14977            self
14978        }
14979
14980        /// Sets the value of [validate_only][crate::model::CreateLakeRequest::validate_only].
14981        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
14982            self.0.request.validate_only = v.into();
14983            self
14984        }
14985    }
14986
14987    #[doc(hidden)]
14988    impl crate::RequestBuilder for CreateLake {
14989        fn request_options(&mut self) -> &mut crate::RequestOptions {
14990            &mut self.0.options
14991        }
14992    }
14993
14994    /// The request builder for [DataplexService::update_lake][crate::client::DataplexService::update_lake] calls.
14995    ///
14996    /// # Example
14997    /// ```
14998    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateLake;
14999    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15000    /// use google_cloud_lro::Poller;
15001    ///
15002    /// let builder = prepare_request_builder();
15003    /// let response = builder.poller().until_done().await?;
15004    /// # Ok(()) }
15005    ///
15006    /// fn prepare_request_builder() -> UpdateLake {
15007    ///   # panic!();
15008    ///   // ... details omitted ...
15009    /// }
15010    /// ```
15011    #[derive(Clone, Debug)]
15012    pub struct UpdateLake(RequestBuilder<crate::model::UpdateLakeRequest>);
15013
15014    impl UpdateLake {
15015        pub(crate) fn new(
15016            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15017        ) -> Self {
15018            Self(RequestBuilder::new(stub))
15019        }
15020
15021        /// Sets the full request, replacing any prior values.
15022        pub fn with_request<V: Into<crate::model::UpdateLakeRequest>>(mut self, v: V) -> Self {
15023            self.0.request = v.into();
15024            self
15025        }
15026
15027        /// Sets all the options, replacing any prior values.
15028        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15029            self.0.options = v.into();
15030            self
15031        }
15032
15033        /// Sends the request.
15034        ///
15035        /// # Long running operations
15036        ///
15037        /// This starts, but does not poll, a longrunning operation. More information
15038        /// on [update_lake][crate::client::DataplexService::update_lake].
15039        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
15040            (*self.0.stub)
15041                .update_lake(self.0.request, self.0.options)
15042                .await
15043                .map(crate::Response::into_body)
15044        }
15045
15046        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_lake`.
15047        pub fn poller(
15048            self,
15049        ) -> impl google_cloud_lro::Poller<crate::model::Lake, crate::model::OperationMetadata>
15050        {
15051            type Operation = google_cloud_lro::internal::Operation<
15052                crate::model::Lake,
15053                crate::model::OperationMetadata,
15054            >;
15055            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
15056            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
15057
15058            let stub = self.0.stub.clone();
15059            let mut options = self.0.options.clone();
15060            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
15061            let query = move |name| {
15062                let stub = stub.clone();
15063                let options = options.clone();
15064                async {
15065                    let op = GetOperation::new(stub)
15066                        .set_name(name)
15067                        .with_options(options)
15068                        .send()
15069                        .await?;
15070                    Ok(Operation::new(op))
15071                }
15072            };
15073
15074            let start = move || async {
15075                let op = self.send().await?;
15076                Ok(Operation::new(op))
15077            };
15078
15079            google_cloud_lro::internal::new_poller(
15080                polling_error_policy,
15081                polling_backoff_policy,
15082                start,
15083                query,
15084            )
15085        }
15086
15087        /// Sets the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
15088        ///
15089        /// This is a **required** field for requests.
15090        pub fn set_update_mask<T>(mut self, v: T) -> Self
15091        where
15092            T: std::convert::Into<wkt::FieldMask>,
15093        {
15094            self.0.request.update_mask = std::option::Option::Some(v.into());
15095            self
15096        }
15097
15098        /// Sets or clears the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
15099        ///
15100        /// This is a **required** field for requests.
15101        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15102        where
15103            T: std::convert::Into<wkt::FieldMask>,
15104        {
15105            self.0.request.update_mask = v.map(|x| x.into());
15106            self
15107        }
15108
15109        /// Sets the value of [lake][crate::model::UpdateLakeRequest::lake].
15110        ///
15111        /// This is a **required** field for requests.
15112        pub fn set_lake<T>(mut self, v: T) -> Self
15113        where
15114            T: std::convert::Into<crate::model::Lake>,
15115        {
15116            self.0.request.lake = std::option::Option::Some(v.into());
15117            self
15118        }
15119
15120        /// Sets or clears the value of [lake][crate::model::UpdateLakeRequest::lake].
15121        ///
15122        /// This is a **required** field for requests.
15123        pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
15124        where
15125            T: std::convert::Into<crate::model::Lake>,
15126        {
15127            self.0.request.lake = v.map(|x| x.into());
15128            self
15129        }
15130
15131        /// Sets the value of [validate_only][crate::model::UpdateLakeRequest::validate_only].
15132        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
15133            self.0.request.validate_only = v.into();
15134            self
15135        }
15136    }
15137
15138    #[doc(hidden)]
15139    impl crate::RequestBuilder for UpdateLake {
15140        fn request_options(&mut self) -> &mut crate::RequestOptions {
15141            &mut self.0.options
15142        }
15143    }
15144
15145    /// The request builder for [DataplexService::delete_lake][crate::client::DataplexService::delete_lake] calls.
15146    ///
15147    /// # Example
15148    /// ```
15149    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteLake;
15150    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15151    /// use google_cloud_lro::Poller;
15152    ///
15153    /// let builder = prepare_request_builder();
15154    /// let response = builder.poller().until_done().await?;
15155    /// # Ok(()) }
15156    ///
15157    /// fn prepare_request_builder() -> DeleteLake {
15158    ///   # panic!();
15159    ///   // ... details omitted ...
15160    /// }
15161    /// ```
15162    #[derive(Clone, Debug)]
15163    pub struct DeleteLake(RequestBuilder<crate::model::DeleteLakeRequest>);
15164
15165    impl DeleteLake {
15166        pub(crate) fn new(
15167            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15168        ) -> Self {
15169            Self(RequestBuilder::new(stub))
15170        }
15171
15172        /// Sets the full request, replacing any prior values.
15173        pub fn with_request<V: Into<crate::model::DeleteLakeRequest>>(mut self, v: V) -> Self {
15174            self.0.request = v.into();
15175            self
15176        }
15177
15178        /// Sets all the options, replacing any prior values.
15179        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15180            self.0.options = v.into();
15181            self
15182        }
15183
15184        /// Sends the request.
15185        ///
15186        /// # Long running operations
15187        ///
15188        /// This starts, but does not poll, a longrunning operation. More information
15189        /// on [delete_lake][crate::client::DataplexService::delete_lake].
15190        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
15191            (*self.0.stub)
15192                .delete_lake(self.0.request, self.0.options)
15193                .await
15194                .map(crate::Response::into_body)
15195        }
15196
15197        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_lake`.
15198        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
15199            type Operation =
15200                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
15201            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
15202            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
15203
15204            let stub = self.0.stub.clone();
15205            let mut options = self.0.options.clone();
15206            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
15207            let query = move |name| {
15208                let stub = stub.clone();
15209                let options = options.clone();
15210                async {
15211                    let op = GetOperation::new(stub)
15212                        .set_name(name)
15213                        .with_options(options)
15214                        .send()
15215                        .await?;
15216                    Ok(Operation::new(op))
15217                }
15218            };
15219
15220            let start = move || async {
15221                let op = self.send().await?;
15222                Ok(Operation::new(op))
15223            };
15224
15225            google_cloud_lro::internal::new_unit_response_poller(
15226                polling_error_policy,
15227                polling_backoff_policy,
15228                start,
15229                query,
15230            )
15231        }
15232
15233        /// Sets the value of [name][crate::model::DeleteLakeRequest::name].
15234        ///
15235        /// This is a **required** field for requests.
15236        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15237            self.0.request.name = v.into();
15238            self
15239        }
15240    }
15241
15242    #[doc(hidden)]
15243    impl crate::RequestBuilder for DeleteLake {
15244        fn request_options(&mut self) -> &mut crate::RequestOptions {
15245            &mut self.0.options
15246        }
15247    }
15248
15249    /// The request builder for [DataplexService::list_lakes][crate::client::DataplexService::list_lakes] calls.
15250    ///
15251    /// # Example
15252    /// ```
15253    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListLakes;
15254    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15255    /// use google_cloud_gax::paginator::ItemPaginator;
15256    ///
15257    /// let builder = prepare_request_builder();
15258    /// let mut items = builder.by_item();
15259    /// while let Some(result) = items.next().await {
15260    ///   let item = result?;
15261    /// }
15262    /// # Ok(()) }
15263    ///
15264    /// fn prepare_request_builder() -> ListLakes {
15265    ///   # panic!();
15266    ///   // ... details omitted ...
15267    /// }
15268    /// ```
15269    #[derive(Clone, Debug)]
15270    pub struct ListLakes(RequestBuilder<crate::model::ListLakesRequest>);
15271
15272    impl ListLakes {
15273        pub(crate) fn new(
15274            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15275        ) -> Self {
15276            Self(RequestBuilder::new(stub))
15277        }
15278
15279        /// Sets the full request, replacing any prior values.
15280        pub fn with_request<V: Into<crate::model::ListLakesRequest>>(mut self, v: V) -> Self {
15281            self.0.request = v.into();
15282            self
15283        }
15284
15285        /// Sets all the options, replacing any prior values.
15286        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15287            self.0.options = v.into();
15288            self
15289        }
15290
15291        /// Sends the request.
15292        pub async fn send(self) -> Result<crate::model::ListLakesResponse> {
15293            (*self.0.stub)
15294                .list_lakes(self.0.request, self.0.options)
15295                .await
15296                .map(crate::Response::into_body)
15297        }
15298
15299        /// Streams each page in the collection.
15300        pub fn by_page(
15301            self,
15302        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListLakesResponse, crate::Error>
15303        {
15304            use std::clone::Clone;
15305            let token = self.0.request.page_token.clone();
15306            let execute = move |token: String| {
15307                let mut builder = self.clone();
15308                builder.0.request = builder.0.request.set_page_token(token);
15309                builder.send()
15310            };
15311            google_cloud_gax::paginator::internal::new_paginator(token, execute)
15312        }
15313
15314        /// Streams each item in the collection.
15315        pub fn by_item(
15316            self,
15317        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListLakesResponse, crate::Error>
15318        {
15319            use google_cloud_gax::paginator::Paginator;
15320            self.by_page().items()
15321        }
15322
15323        /// Sets the value of [parent][crate::model::ListLakesRequest::parent].
15324        ///
15325        /// This is a **required** field for requests.
15326        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15327            self.0.request.parent = v.into();
15328            self
15329        }
15330
15331        /// Sets the value of [page_size][crate::model::ListLakesRequest::page_size].
15332        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15333            self.0.request.page_size = v.into();
15334            self
15335        }
15336
15337        /// Sets the value of [page_token][crate::model::ListLakesRequest::page_token].
15338        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15339            self.0.request.page_token = v.into();
15340            self
15341        }
15342
15343        /// Sets the value of [filter][crate::model::ListLakesRequest::filter].
15344        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15345            self.0.request.filter = v.into();
15346            self
15347        }
15348
15349        /// Sets the value of [order_by][crate::model::ListLakesRequest::order_by].
15350        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
15351            self.0.request.order_by = v.into();
15352            self
15353        }
15354    }
15355
15356    #[doc(hidden)]
15357    impl crate::RequestBuilder for ListLakes {
15358        fn request_options(&mut self) -> &mut crate::RequestOptions {
15359            &mut self.0.options
15360        }
15361    }
15362
15363    /// The request builder for [DataplexService::get_lake][crate::client::DataplexService::get_lake] calls.
15364    ///
15365    /// # Example
15366    /// ```
15367    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetLake;
15368    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15369    ///
15370    /// let builder = prepare_request_builder();
15371    /// let response = builder.send().await?;
15372    /// # Ok(()) }
15373    ///
15374    /// fn prepare_request_builder() -> GetLake {
15375    ///   # panic!();
15376    ///   // ... details omitted ...
15377    /// }
15378    /// ```
15379    #[derive(Clone, Debug)]
15380    pub struct GetLake(RequestBuilder<crate::model::GetLakeRequest>);
15381
15382    impl GetLake {
15383        pub(crate) fn new(
15384            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15385        ) -> Self {
15386            Self(RequestBuilder::new(stub))
15387        }
15388
15389        /// Sets the full request, replacing any prior values.
15390        pub fn with_request<V: Into<crate::model::GetLakeRequest>>(mut self, v: V) -> Self {
15391            self.0.request = v.into();
15392            self
15393        }
15394
15395        /// Sets all the options, replacing any prior values.
15396        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15397            self.0.options = v.into();
15398            self
15399        }
15400
15401        /// Sends the request.
15402        pub async fn send(self) -> Result<crate::model::Lake> {
15403            (*self.0.stub)
15404                .get_lake(self.0.request, self.0.options)
15405                .await
15406                .map(crate::Response::into_body)
15407        }
15408
15409        /// Sets the value of [name][crate::model::GetLakeRequest::name].
15410        ///
15411        /// This is a **required** field for requests.
15412        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15413            self.0.request.name = v.into();
15414            self
15415        }
15416    }
15417
15418    #[doc(hidden)]
15419    impl crate::RequestBuilder for GetLake {
15420        fn request_options(&mut self) -> &mut crate::RequestOptions {
15421            &mut self.0.options
15422        }
15423    }
15424
15425    /// The request builder for [DataplexService::list_lake_actions][crate::client::DataplexService::list_lake_actions] calls.
15426    ///
15427    /// # Example
15428    /// ```
15429    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListLakeActions;
15430    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15431    /// use google_cloud_gax::paginator::ItemPaginator;
15432    ///
15433    /// let builder = prepare_request_builder();
15434    /// let mut items = builder.by_item();
15435    /// while let Some(result) = items.next().await {
15436    ///   let item = result?;
15437    /// }
15438    /// # Ok(()) }
15439    ///
15440    /// fn prepare_request_builder() -> ListLakeActions {
15441    ///   # panic!();
15442    ///   // ... details omitted ...
15443    /// }
15444    /// ```
15445    #[derive(Clone, Debug)]
15446    pub struct ListLakeActions(RequestBuilder<crate::model::ListLakeActionsRequest>);
15447
15448    impl ListLakeActions {
15449        pub(crate) fn new(
15450            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15451        ) -> Self {
15452            Self(RequestBuilder::new(stub))
15453        }
15454
15455        /// Sets the full request, replacing any prior values.
15456        pub fn with_request<V: Into<crate::model::ListLakeActionsRequest>>(mut self, v: V) -> Self {
15457            self.0.request = v.into();
15458            self
15459        }
15460
15461        /// Sets all the options, replacing any prior values.
15462        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15463            self.0.options = v.into();
15464            self
15465        }
15466
15467        /// Sends the request.
15468        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
15469            (*self.0.stub)
15470                .list_lake_actions(self.0.request, self.0.options)
15471                .await
15472                .map(crate::Response::into_body)
15473        }
15474
15475        /// Streams each page in the collection.
15476        pub fn by_page(
15477            self,
15478        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListActionsResponse, crate::Error>
15479        {
15480            use std::clone::Clone;
15481            let token = self.0.request.page_token.clone();
15482            let execute = move |token: String| {
15483                let mut builder = self.clone();
15484                builder.0.request = builder.0.request.set_page_token(token);
15485                builder.send()
15486            };
15487            google_cloud_gax::paginator::internal::new_paginator(token, execute)
15488        }
15489
15490        /// Streams each item in the collection.
15491        pub fn by_item(
15492            self,
15493        ) -> impl google_cloud_gax::paginator::ItemPaginator<
15494            crate::model::ListActionsResponse,
15495            crate::Error,
15496        > {
15497            use google_cloud_gax::paginator::Paginator;
15498            self.by_page().items()
15499        }
15500
15501        /// Sets the value of [parent][crate::model::ListLakeActionsRequest::parent].
15502        ///
15503        /// This is a **required** field for requests.
15504        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15505            self.0.request.parent = v.into();
15506            self
15507        }
15508
15509        /// Sets the value of [page_size][crate::model::ListLakeActionsRequest::page_size].
15510        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15511            self.0.request.page_size = v.into();
15512            self
15513        }
15514
15515        /// Sets the value of [page_token][crate::model::ListLakeActionsRequest::page_token].
15516        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15517            self.0.request.page_token = v.into();
15518            self
15519        }
15520    }
15521
15522    #[doc(hidden)]
15523    impl crate::RequestBuilder for ListLakeActions {
15524        fn request_options(&mut self) -> &mut crate::RequestOptions {
15525            &mut self.0.options
15526        }
15527    }
15528
15529    /// The request builder for [DataplexService::create_zone][crate::client::DataplexService::create_zone] calls.
15530    ///
15531    /// # Example
15532    /// ```
15533    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateZone;
15534    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15535    /// use google_cloud_lro::Poller;
15536    ///
15537    /// let builder = prepare_request_builder();
15538    /// let response = builder.poller().until_done().await?;
15539    /// # Ok(()) }
15540    ///
15541    /// fn prepare_request_builder() -> CreateZone {
15542    ///   # panic!();
15543    ///   // ... details omitted ...
15544    /// }
15545    /// ```
15546    #[derive(Clone, Debug)]
15547    pub struct CreateZone(RequestBuilder<crate::model::CreateZoneRequest>);
15548
15549    impl CreateZone {
15550        pub(crate) fn new(
15551            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15552        ) -> Self {
15553            Self(RequestBuilder::new(stub))
15554        }
15555
15556        /// Sets the full request, replacing any prior values.
15557        pub fn with_request<V: Into<crate::model::CreateZoneRequest>>(mut self, v: V) -> Self {
15558            self.0.request = v.into();
15559            self
15560        }
15561
15562        /// Sets all the options, replacing any prior values.
15563        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15564            self.0.options = v.into();
15565            self
15566        }
15567
15568        /// Sends the request.
15569        ///
15570        /// # Long running operations
15571        ///
15572        /// This starts, but does not poll, a longrunning operation. More information
15573        /// on [create_zone][crate::client::DataplexService::create_zone].
15574        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
15575            (*self.0.stub)
15576                .create_zone(self.0.request, self.0.options)
15577                .await
15578                .map(crate::Response::into_body)
15579        }
15580
15581        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_zone`.
15582        pub fn poller(
15583            self,
15584        ) -> impl google_cloud_lro::Poller<crate::model::Zone, crate::model::OperationMetadata>
15585        {
15586            type Operation = google_cloud_lro::internal::Operation<
15587                crate::model::Zone,
15588                crate::model::OperationMetadata,
15589            >;
15590            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
15591            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
15592
15593            let stub = self.0.stub.clone();
15594            let mut options = self.0.options.clone();
15595            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
15596            let query = move |name| {
15597                let stub = stub.clone();
15598                let options = options.clone();
15599                async {
15600                    let op = GetOperation::new(stub)
15601                        .set_name(name)
15602                        .with_options(options)
15603                        .send()
15604                        .await?;
15605                    Ok(Operation::new(op))
15606                }
15607            };
15608
15609            let start = move || async {
15610                let op = self.send().await?;
15611                Ok(Operation::new(op))
15612            };
15613
15614            google_cloud_lro::internal::new_poller(
15615                polling_error_policy,
15616                polling_backoff_policy,
15617                start,
15618                query,
15619            )
15620        }
15621
15622        /// Sets the value of [parent][crate::model::CreateZoneRequest::parent].
15623        ///
15624        /// This is a **required** field for requests.
15625        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15626            self.0.request.parent = v.into();
15627            self
15628        }
15629
15630        /// Sets the value of [zone_id][crate::model::CreateZoneRequest::zone_id].
15631        ///
15632        /// This is a **required** field for requests.
15633        pub fn set_zone_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
15634            self.0.request.zone_id = v.into();
15635            self
15636        }
15637
15638        /// Sets the value of [zone][crate::model::CreateZoneRequest::zone].
15639        ///
15640        /// This is a **required** field for requests.
15641        pub fn set_zone<T>(mut self, v: T) -> Self
15642        where
15643            T: std::convert::Into<crate::model::Zone>,
15644        {
15645            self.0.request.zone = std::option::Option::Some(v.into());
15646            self
15647        }
15648
15649        /// Sets or clears the value of [zone][crate::model::CreateZoneRequest::zone].
15650        ///
15651        /// This is a **required** field for requests.
15652        pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
15653        where
15654            T: std::convert::Into<crate::model::Zone>,
15655        {
15656            self.0.request.zone = v.map(|x| x.into());
15657            self
15658        }
15659
15660        /// Sets the value of [validate_only][crate::model::CreateZoneRequest::validate_only].
15661        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
15662            self.0.request.validate_only = v.into();
15663            self
15664        }
15665    }
15666
15667    #[doc(hidden)]
15668    impl crate::RequestBuilder for CreateZone {
15669        fn request_options(&mut self) -> &mut crate::RequestOptions {
15670            &mut self.0.options
15671        }
15672    }
15673
15674    /// The request builder for [DataplexService::update_zone][crate::client::DataplexService::update_zone] calls.
15675    ///
15676    /// # Example
15677    /// ```
15678    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateZone;
15679    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15680    /// use google_cloud_lro::Poller;
15681    ///
15682    /// let builder = prepare_request_builder();
15683    /// let response = builder.poller().until_done().await?;
15684    /// # Ok(()) }
15685    ///
15686    /// fn prepare_request_builder() -> UpdateZone {
15687    ///   # panic!();
15688    ///   // ... details omitted ...
15689    /// }
15690    /// ```
15691    #[derive(Clone, Debug)]
15692    pub struct UpdateZone(RequestBuilder<crate::model::UpdateZoneRequest>);
15693
15694    impl UpdateZone {
15695        pub(crate) fn new(
15696            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15697        ) -> Self {
15698            Self(RequestBuilder::new(stub))
15699        }
15700
15701        /// Sets the full request, replacing any prior values.
15702        pub fn with_request<V: Into<crate::model::UpdateZoneRequest>>(mut self, v: V) -> Self {
15703            self.0.request = v.into();
15704            self
15705        }
15706
15707        /// Sets all the options, replacing any prior values.
15708        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15709            self.0.options = v.into();
15710            self
15711        }
15712
15713        /// Sends the request.
15714        ///
15715        /// # Long running operations
15716        ///
15717        /// This starts, but does not poll, a longrunning operation. More information
15718        /// on [update_zone][crate::client::DataplexService::update_zone].
15719        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
15720            (*self.0.stub)
15721                .update_zone(self.0.request, self.0.options)
15722                .await
15723                .map(crate::Response::into_body)
15724        }
15725
15726        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_zone`.
15727        pub fn poller(
15728            self,
15729        ) -> impl google_cloud_lro::Poller<crate::model::Zone, crate::model::OperationMetadata>
15730        {
15731            type Operation = google_cloud_lro::internal::Operation<
15732                crate::model::Zone,
15733                crate::model::OperationMetadata,
15734            >;
15735            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
15736            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
15737
15738            let stub = self.0.stub.clone();
15739            let mut options = self.0.options.clone();
15740            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
15741            let query = move |name| {
15742                let stub = stub.clone();
15743                let options = options.clone();
15744                async {
15745                    let op = GetOperation::new(stub)
15746                        .set_name(name)
15747                        .with_options(options)
15748                        .send()
15749                        .await?;
15750                    Ok(Operation::new(op))
15751                }
15752            };
15753
15754            let start = move || async {
15755                let op = self.send().await?;
15756                Ok(Operation::new(op))
15757            };
15758
15759            google_cloud_lro::internal::new_poller(
15760                polling_error_policy,
15761                polling_backoff_policy,
15762                start,
15763                query,
15764            )
15765        }
15766
15767        /// Sets the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
15768        ///
15769        /// This is a **required** field for requests.
15770        pub fn set_update_mask<T>(mut self, v: T) -> Self
15771        where
15772            T: std::convert::Into<wkt::FieldMask>,
15773        {
15774            self.0.request.update_mask = std::option::Option::Some(v.into());
15775            self
15776        }
15777
15778        /// Sets or clears the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
15779        ///
15780        /// This is a **required** field for requests.
15781        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15782        where
15783            T: std::convert::Into<wkt::FieldMask>,
15784        {
15785            self.0.request.update_mask = v.map(|x| x.into());
15786            self
15787        }
15788
15789        /// Sets the value of [zone][crate::model::UpdateZoneRequest::zone].
15790        ///
15791        /// This is a **required** field for requests.
15792        pub fn set_zone<T>(mut self, v: T) -> Self
15793        where
15794            T: std::convert::Into<crate::model::Zone>,
15795        {
15796            self.0.request.zone = std::option::Option::Some(v.into());
15797            self
15798        }
15799
15800        /// Sets or clears the value of [zone][crate::model::UpdateZoneRequest::zone].
15801        ///
15802        /// This is a **required** field for requests.
15803        pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
15804        where
15805            T: std::convert::Into<crate::model::Zone>,
15806        {
15807            self.0.request.zone = v.map(|x| x.into());
15808            self
15809        }
15810
15811        /// Sets the value of [validate_only][crate::model::UpdateZoneRequest::validate_only].
15812        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
15813            self.0.request.validate_only = v.into();
15814            self
15815        }
15816    }
15817
15818    #[doc(hidden)]
15819    impl crate::RequestBuilder for UpdateZone {
15820        fn request_options(&mut self) -> &mut crate::RequestOptions {
15821            &mut self.0.options
15822        }
15823    }
15824
15825    /// The request builder for [DataplexService::delete_zone][crate::client::DataplexService::delete_zone] calls.
15826    ///
15827    /// # Example
15828    /// ```
15829    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteZone;
15830    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15831    /// use google_cloud_lro::Poller;
15832    ///
15833    /// let builder = prepare_request_builder();
15834    /// let response = builder.poller().until_done().await?;
15835    /// # Ok(()) }
15836    ///
15837    /// fn prepare_request_builder() -> DeleteZone {
15838    ///   # panic!();
15839    ///   // ... details omitted ...
15840    /// }
15841    /// ```
15842    #[derive(Clone, Debug)]
15843    pub struct DeleteZone(RequestBuilder<crate::model::DeleteZoneRequest>);
15844
15845    impl DeleteZone {
15846        pub(crate) fn new(
15847            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15848        ) -> Self {
15849            Self(RequestBuilder::new(stub))
15850        }
15851
15852        /// Sets the full request, replacing any prior values.
15853        pub fn with_request<V: Into<crate::model::DeleteZoneRequest>>(mut self, v: V) -> Self {
15854            self.0.request = v.into();
15855            self
15856        }
15857
15858        /// Sets all the options, replacing any prior values.
15859        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15860            self.0.options = v.into();
15861            self
15862        }
15863
15864        /// Sends the request.
15865        ///
15866        /// # Long running operations
15867        ///
15868        /// This starts, but does not poll, a longrunning operation. More information
15869        /// on [delete_zone][crate::client::DataplexService::delete_zone].
15870        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
15871            (*self.0.stub)
15872                .delete_zone(self.0.request, self.0.options)
15873                .await
15874                .map(crate::Response::into_body)
15875        }
15876
15877        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_zone`.
15878        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
15879            type Operation =
15880                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
15881            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
15882            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
15883
15884            let stub = self.0.stub.clone();
15885            let mut options = self.0.options.clone();
15886            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
15887            let query = move |name| {
15888                let stub = stub.clone();
15889                let options = options.clone();
15890                async {
15891                    let op = GetOperation::new(stub)
15892                        .set_name(name)
15893                        .with_options(options)
15894                        .send()
15895                        .await?;
15896                    Ok(Operation::new(op))
15897                }
15898            };
15899
15900            let start = move || async {
15901                let op = self.send().await?;
15902                Ok(Operation::new(op))
15903            };
15904
15905            google_cloud_lro::internal::new_unit_response_poller(
15906                polling_error_policy,
15907                polling_backoff_policy,
15908                start,
15909                query,
15910            )
15911        }
15912
15913        /// Sets the value of [name][crate::model::DeleteZoneRequest::name].
15914        ///
15915        /// This is a **required** field for requests.
15916        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15917            self.0.request.name = v.into();
15918            self
15919        }
15920    }
15921
15922    #[doc(hidden)]
15923    impl crate::RequestBuilder for DeleteZone {
15924        fn request_options(&mut self) -> &mut crate::RequestOptions {
15925            &mut self.0.options
15926        }
15927    }
15928
15929    /// The request builder for [DataplexService::list_zones][crate::client::DataplexService::list_zones] calls.
15930    ///
15931    /// # Example
15932    /// ```
15933    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListZones;
15934    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15935    /// use google_cloud_gax::paginator::ItemPaginator;
15936    ///
15937    /// let builder = prepare_request_builder();
15938    /// let mut items = builder.by_item();
15939    /// while let Some(result) = items.next().await {
15940    ///   let item = result?;
15941    /// }
15942    /// # Ok(()) }
15943    ///
15944    /// fn prepare_request_builder() -> ListZones {
15945    ///   # panic!();
15946    ///   // ... details omitted ...
15947    /// }
15948    /// ```
15949    #[derive(Clone, Debug)]
15950    pub struct ListZones(RequestBuilder<crate::model::ListZonesRequest>);
15951
15952    impl ListZones {
15953        pub(crate) fn new(
15954            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15955        ) -> Self {
15956            Self(RequestBuilder::new(stub))
15957        }
15958
15959        /// Sets the full request, replacing any prior values.
15960        pub fn with_request<V: Into<crate::model::ListZonesRequest>>(mut self, v: V) -> Self {
15961            self.0.request = v.into();
15962            self
15963        }
15964
15965        /// Sets all the options, replacing any prior values.
15966        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15967            self.0.options = v.into();
15968            self
15969        }
15970
15971        /// Sends the request.
15972        pub async fn send(self) -> Result<crate::model::ListZonesResponse> {
15973            (*self.0.stub)
15974                .list_zones(self.0.request, self.0.options)
15975                .await
15976                .map(crate::Response::into_body)
15977        }
15978
15979        /// Streams each page in the collection.
15980        pub fn by_page(
15981            self,
15982        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListZonesResponse, crate::Error>
15983        {
15984            use std::clone::Clone;
15985            let token = self.0.request.page_token.clone();
15986            let execute = move |token: String| {
15987                let mut builder = self.clone();
15988                builder.0.request = builder.0.request.set_page_token(token);
15989                builder.send()
15990            };
15991            google_cloud_gax::paginator::internal::new_paginator(token, execute)
15992        }
15993
15994        /// Streams each item in the collection.
15995        pub fn by_item(
15996            self,
15997        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListZonesResponse, crate::Error>
15998        {
15999            use google_cloud_gax::paginator::Paginator;
16000            self.by_page().items()
16001        }
16002
16003        /// Sets the value of [parent][crate::model::ListZonesRequest::parent].
16004        ///
16005        /// This is a **required** field for requests.
16006        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16007            self.0.request.parent = v.into();
16008            self
16009        }
16010
16011        /// Sets the value of [page_size][crate::model::ListZonesRequest::page_size].
16012        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16013            self.0.request.page_size = v.into();
16014            self
16015        }
16016
16017        /// Sets the value of [page_token][crate::model::ListZonesRequest::page_token].
16018        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16019            self.0.request.page_token = v.into();
16020            self
16021        }
16022
16023        /// Sets the value of [filter][crate::model::ListZonesRequest::filter].
16024        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16025            self.0.request.filter = v.into();
16026            self
16027        }
16028
16029        /// Sets the value of [order_by][crate::model::ListZonesRequest::order_by].
16030        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
16031            self.0.request.order_by = v.into();
16032            self
16033        }
16034    }
16035
16036    #[doc(hidden)]
16037    impl crate::RequestBuilder for ListZones {
16038        fn request_options(&mut self) -> &mut crate::RequestOptions {
16039            &mut self.0.options
16040        }
16041    }
16042
16043    /// The request builder for [DataplexService::get_zone][crate::client::DataplexService::get_zone] calls.
16044    ///
16045    /// # Example
16046    /// ```
16047    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetZone;
16048    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16049    ///
16050    /// let builder = prepare_request_builder();
16051    /// let response = builder.send().await?;
16052    /// # Ok(()) }
16053    ///
16054    /// fn prepare_request_builder() -> GetZone {
16055    ///   # panic!();
16056    ///   // ... details omitted ...
16057    /// }
16058    /// ```
16059    #[derive(Clone, Debug)]
16060    pub struct GetZone(RequestBuilder<crate::model::GetZoneRequest>);
16061
16062    impl GetZone {
16063        pub(crate) fn new(
16064            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16065        ) -> Self {
16066            Self(RequestBuilder::new(stub))
16067        }
16068
16069        /// Sets the full request, replacing any prior values.
16070        pub fn with_request<V: Into<crate::model::GetZoneRequest>>(mut self, v: V) -> Self {
16071            self.0.request = v.into();
16072            self
16073        }
16074
16075        /// Sets all the options, replacing any prior values.
16076        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16077            self.0.options = v.into();
16078            self
16079        }
16080
16081        /// Sends the request.
16082        pub async fn send(self) -> Result<crate::model::Zone> {
16083            (*self.0.stub)
16084                .get_zone(self.0.request, self.0.options)
16085                .await
16086                .map(crate::Response::into_body)
16087        }
16088
16089        /// Sets the value of [name][crate::model::GetZoneRequest::name].
16090        ///
16091        /// This is a **required** field for requests.
16092        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16093            self.0.request.name = v.into();
16094            self
16095        }
16096    }
16097
16098    #[doc(hidden)]
16099    impl crate::RequestBuilder for GetZone {
16100        fn request_options(&mut self) -> &mut crate::RequestOptions {
16101            &mut self.0.options
16102        }
16103    }
16104
16105    /// The request builder for [DataplexService::list_zone_actions][crate::client::DataplexService::list_zone_actions] calls.
16106    ///
16107    /// # Example
16108    /// ```
16109    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListZoneActions;
16110    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16111    /// use google_cloud_gax::paginator::ItemPaginator;
16112    ///
16113    /// let builder = prepare_request_builder();
16114    /// let mut items = builder.by_item();
16115    /// while let Some(result) = items.next().await {
16116    ///   let item = result?;
16117    /// }
16118    /// # Ok(()) }
16119    ///
16120    /// fn prepare_request_builder() -> ListZoneActions {
16121    ///   # panic!();
16122    ///   // ... details omitted ...
16123    /// }
16124    /// ```
16125    #[derive(Clone, Debug)]
16126    pub struct ListZoneActions(RequestBuilder<crate::model::ListZoneActionsRequest>);
16127
16128    impl ListZoneActions {
16129        pub(crate) fn new(
16130            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16131        ) -> Self {
16132            Self(RequestBuilder::new(stub))
16133        }
16134
16135        /// Sets the full request, replacing any prior values.
16136        pub fn with_request<V: Into<crate::model::ListZoneActionsRequest>>(mut self, v: V) -> Self {
16137            self.0.request = v.into();
16138            self
16139        }
16140
16141        /// Sets all the options, replacing any prior values.
16142        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16143            self.0.options = v.into();
16144            self
16145        }
16146
16147        /// Sends the request.
16148        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
16149            (*self.0.stub)
16150                .list_zone_actions(self.0.request, self.0.options)
16151                .await
16152                .map(crate::Response::into_body)
16153        }
16154
16155        /// Streams each page in the collection.
16156        pub fn by_page(
16157            self,
16158        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListActionsResponse, crate::Error>
16159        {
16160            use std::clone::Clone;
16161            let token = self.0.request.page_token.clone();
16162            let execute = move |token: String| {
16163                let mut builder = self.clone();
16164                builder.0.request = builder.0.request.set_page_token(token);
16165                builder.send()
16166            };
16167            google_cloud_gax::paginator::internal::new_paginator(token, execute)
16168        }
16169
16170        /// Streams each item in the collection.
16171        pub fn by_item(
16172            self,
16173        ) -> impl google_cloud_gax::paginator::ItemPaginator<
16174            crate::model::ListActionsResponse,
16175            crate::Error,
16176        > {
16177            use google_cloud_gax::paginator::Paginator;
16178            self.by_page().items()
16179        }
16180
16181        /// Sets the value of [parent][crate::model::ListZoneActionsRequest::parent].
16182        ///
16183        /// This is a **required** field for requests.
16184        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16185            self.0.request.parent = v.into();
16186            self
16187        }
16188
16189        /// Sets the value of [page_size][crate::model::ListZoneActionsRequest::page_size].
16190        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16191            self.0.request.page_size = v.into();
16192            self
16193        }
16194
16195        /// Sets the value of [page_token][crate::model::ListZoneActionsRequest::page_token].
16196        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16197            self.0.request.page_token = v.into();
16198            self
16199        }
16200    }
16201
16202    #[doc(hidden)]
16203    impl crate::RequestBuilder for ListZoneActions {
16204        fn request_options(&mut self) -> &mut crate::RequestOptions {
16205            &mut self.0.options
16206        }
16207    }
16208
16209    /// The request builder for [DataplexService::create_asset][crate::client::DataplexService::create_asset] calls.
16210    ///
16211    /// # Example
16212    /// ```
16213    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateAsset;
16214    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16215    /// use google_cloud_lro::Poller;
16216    ///
16217    /// let builder = prepare_request_builder();
16218    /// let response = builder.poller().until_done().await?;
16219    /// # Ok(()) }
16220    ///
16221    /// fn prepare_request_builder() -> CreateAsset {
16222    ///   # panic!();
16223    ///   // ... details omitted ...
16224    /// }
16225    /// ```
16226    #[derive(Clone, Debug)]
16227    pub struct CreateAsset(RequestBuilder<crate::model::CreateAssetRequest>);
16228
16229    impl CreateAsset {
16230        pub(crate) fn new(
16231            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16232        ) -> Self {
16233            Self(RequestBuilder::new(stub))
16234        }
16235
16236        /// Sets the full request, replacing any prior values.
16237        pub fn with_request<V: Into<crate::model::CreateAssetRequest>>(mut self, v: V) -> Self {
16238            self.0.request = v.into();
16239            self
16240        }
16241
16242        /// Sets all the options, replacing any prior values.
16243        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16244            self.0.options = v.into();
16245            self
16246        }
16247
16248        /// Sends the request.
16249        ///
16250        /// # Long running operations
16251        ///
16252        /// This starts, but does not poll, a longrunning operation. More information
16253        /// on [create_asset][crate::client::DataplexService::create_asset].
16254        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
16255            (*self.0.stub)
16256                .create_asset(self.0.request, self.0.options)
16257                .await
16258                .map(crate::Response::into_body)
16259        }
16260
16261        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_asset`.
16262        pub fn poller(
16263            self,
16264        ) -> impl google_cloud_lro::Poller<crate::model::Asset, crate::model::OperationMetadata>
16265        {
16266            type Operation = google_cloud_lro::internal::Operation<
16267                crate::model::Asset,
16268                crate::model::OperationMetadata,
16269            >;
16270            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
16271            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
16272
16273            let stub = self.0.stub.clone();
16274            let mut options = self.0.options.clone();
16275            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
16276            let query = move |name| {
16277                let stub = stub.clone();
16278                let options = options.clone();
16279                async {
16280                    let op = GetOperation::new(stub)
16281                        .set_name(name)
16282                        .with_options(options)
16283                        .send()
16284                        .await?;
16285                    Ok(Operation::new(op))
16286                }
16287            };
16288
16289            let start = move || async {
16290                let op = self.send().await?;
16291                Ok(Operation::new(op))
16292            };
16293
16294            google_cloud_lro::internal::new_poller(
16295                polling_error_policy,
16296                polling_backoff_policy,
16297                start,
16298                query,
16299            )
16300        }
16301
16302        /// Sets the value of [parent][crate::model::CreateAssetRequest::parent].
16303        ///
16304        /// This is a **required** field for requests.
16305        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16306            self.0.request.parent = v.into();
16307            self
16308        }
16309
16310        /// Sets the value of [asset_id][crate::model::CreateAssetRequest::asset_id].
16311        ///
16312        /// This is a **required** field for requests.
16313        pub fn set_asset_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
16314            self.0.request.asset_id = v.into();
16315            self
16316        }
16317
16318        /// Sets the value of [asset][crate::model::CreateAssetRequest::asset].
16319        ///
16320        /// This is a **required** field for requests.
16321        pub fn set_asset<T>(mut self, v: T) -> Self
16322        where
16323            T: std::convert::Into<crate::model::Asset>,
16324        {
16325            self.0.request.asset = std::option::Option::Some(v.into());
16326            self
16327        }
16328
16329        /// Sets or clears the value of [asset][crate::model::CreateAssetRequest::asset].
16330        ///
16331        /// This is a **required** field for requests.
16332        pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
16333        where
16334            T: std::convert::Into<crate::model::Asset>,
16335        {
16336            self.0.request.asset = v.map(|x| x.into());
16337            self
16338        }
16339
16340        /// Sets the value of [validate_only][crate::model::CreateAssetRequest::validate_only].
16341        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16342            self.0.request.validate_only = v.into();
16343            self
16344        }
16345    }
16346
16347    #[doc(hidden)]
16348    impl crate::RequestBuilder for CreateAsset {
16349        fn request_options(&mut self) -> &mut crate::RequestOptions {
16350            &mut self.0.options
16351        }
16352    }
16353
16354    /// The request builder for [DataplexService::update_asset][crate::client::DataplexService::update_asset] calls.
16355    ///
16356    /// # Example
16357    /// ```
16358    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateAsset;
16359    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16360    /// use google_cloud_lro::Poller;
16361    ///
16362    /// let builder = prepare_request_builder();
16363    /// let response = builder.poller().until_done().await?;
16364    /// # Ok(()) }
16365    ///
16366    /// fn prepare_request_builder() -> UpdateAsset {
16367    ///   # panic!();
16368    ///   // ... details omitted ...
16369    /// }
16370    /// ```
16371    #[derive(Clone, Debug)]
16372    pub struct UpdateAsset(RequestBuilder<crate::model::UpdateAssetRequest>);
16373
16374    impl UpdateAsset {
16375        pub(crate) fn new(
16376            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16377        ) -> Self {
16378            Self(RequestBuilder::new(stub))
16379        }
16380
16381        /// Sets the full request, replacing any prior values.
16382        pub fn with_request<V: Into<crate::model::UpdateAssetRequest>>(mut self, v: V) -> Self {
16383            self.0.request = v.into();
16384            self
16385        }
16386
16387        /// Sets all the options, replacing any prior values.
16388        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16389            self.0.options = v.into();
16390            self
16391        }
16392
16393        /// Sends the request.
16394        ///
16395        /// # Long running operations
16396        ///
16397        /// This starts, but does not poll, a longrunning operation. More information
16398        /// on [update_asset][crate::client::DataplexService::update_asset].
16399        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
16400            (*self.0.stub)
16401                .update_asset(self.0.request, self.0.options)
16402                .await
16403                .map(crate::Response::into_body)
16404        }
16405
16406        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_asset`.
16407        pub fn poller(
16408            self,
16409        ) -> impl google_cloud_lro::Poller<crate::model::Asset, crate::model::OperationMetadata>
16410        {
16411            type Operation = google_cloud_lro::internal::Operation<
16412                crate::model::Asset,
16413                crate::model::OperationMetadata,
16414            >;
16415            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
16416            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
16417
16418            let stub = self.0.stub.clone();
16419            let mut options = self.0.options.clone();
16420            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
16421            let query = move |name| {
16422                let stub = stub.clone();
16423                let options = options.clone();
16424                async {
16425                    let op = GetOperation::new(stub)
16426                        .set_name(name)
16427                        .with_options(options)
16428                        .send()
16429                        .await?;
16430                    Ok(Operation::new(op))
16431                }
16432            };
16433
16434            let start = move || async {
16435                let op = self.send().await?;
16436                Ok(Operation::new(op))
16437            };
16438
16439            google_cloud_lro::internal::new_poller(
16440                polling_error_policy,
16441                polling_backoff_policy,
16442                start,
16443                query,
16444            )
16445        }
16446
16447        /// Sets the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
16448        ///
16449        /// This is a **required** field for requests.
16450        pub fn set_update_mask<T>(mut self, v: T) -> Self
16451        where
16452            T: std::convert::Into<wkt::FieldMask>,
16453        {
16454            self.0.request.update_mask = std::option::Option::Some(v.into());
16455            self
16456        }
16457
16458        /// Sets or clears the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
16459        ///
16460        /// This is a **required** field for requests.
16461        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
16462        where
16463            T: std::convert::Into<wkt::FieldMask>,
16464        {
16465            self.0.request.update_mask = v.map(|x| x.into());
16466            self
16467        }
16468
16469        /// Sets the value of [asset][crate::model::UpdateAssetRequest::asset].
16470        ///
16471        /// This is a **required** field for requests.
16472        pub fn set_asset<T>(mut self, v: T) -> Self
16473        where
16474            T: std::convert::Into<crate::model::Asset>,
16475        {
16476            self.0.request.asset = std::option::Option::Some(v.into());
16477            self
16478        }
16479
16480        /// Sets or clears the value of [asset][crate::model::UpdateAssetRequest::asset].
16481        ///
16482        /// This is a **required** field for requests.
16483        pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
16484        where
16485            T: std::convert::Into<crate::model::Asset>,
16486        {
16487            self.0.request.asset = v.map(|x| x.into());
16488            self
16489        }
16490
16491        /// Sets the value of [validate_only][crate::model::UpdateAssetRequest::validate_only].
16492        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16493            self.0.request.validate_only = v.into();
16494            self
16495        }
16496    }
16497
16498    #[doc(hidden)]
16499    impl crate::RequestBuilder for UpdateAsset {
16500        fn request_options(&mut self) -> &mut crate::RequestOptions {
16501            &mut self.0.options
16502        }
16503    }
16504
16505    /// The request builder for [DataplexService::delete_asset][crate::client::DataplexService::delete_asset] calls.
16506    ///
16507    /// # Example
16508    /// ```
16509    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteAsset;
16510    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16511    /// use google_cloud_lro::Poller;
16512    ///
16513    /// let builder = prepare_request_builder();
16514    /// let response = builder.poller().until_done().await?;
16515    /// # Ok(()) }
16516    ///
16517    /// fn prepare_request_builder() -> DeleteAsset {
16518    ///   # panic!();
16519    ///   // ... details omitted ...
16520    /// }
16521    /// ```
16522    #[derive(Clone, Debug)]
16523    pub struct DeleteAsset(RequestBuilder<crate::model::DeleteAssetRequest>);
16524
16525    impl DeleteAsset {
16526        pub(crate) fn new(
16527            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16528        ) -> Self {
16529            Self(RequestBuilder::new(stub))
16530        }
16531
16532        /// Sets the full request, replacing any prior values.
16533        pub fn with_request<V: Into<crate::model::DeleteAssetRequest>>(mut self, v: V) -> Self {
16534            self.0.request = v.into();
16535            self
16536        }
16537
16538        /// Sets all the options, replacing any prior values.
16539        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16540            self.0.options = v.into();
16541            self
16542        }
16543
16544        /// Sends the request.
16545        ///
16546        /// # Long running operations
16547        ///
16548        /// This starts, but does not poll, a longrunning operation. More information
16549        /// on [delete_asset][crate::client::DataplexService::delete_asset].
16550        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
16551            (*self.0.stub)
16552                .delete_asset(self.0.request, self.0.options)
16553                .await
16554                .map(crate::Response::into_body)
16555        }
16556
16557        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_asset`.
16558        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
16559            type Operation =
16560                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
16561            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
16562            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
16563
16564            let stub = self.0.stub.clone();
16565            let mut options = self.0.options.clone();
16566            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
16567            let query = move |name| {
16568                let stub = stub.clone();
16569                let options = options.clone();
16570                async {
16571                    let op = GetOperation::new(stub)
16572                        .set_name(name)
16573                        .with_options(options)
16574                        .send()
16575                        .await?;
16576                    Ok(Operation::new(op))
16577                }
16578            };
16579
16580            let start = move || async {
16581                let op = self.send().await?;
16582                Ok(Operation::new(op))
16583            };
16584
16585            google_cloud_lro::internal::new_unit_response_poller(
16586                polling_error_policy,
16587                polling_backoff_policy,
16588                start,
16589                query,
16590            )
16591        }
16592
16593        /// Sets the value of [name][crate::model::DeleteAssetRequest::name].
16594        ///
16595        /// This is a **required** field for requests.
16596        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16597            self.0.request.name = v.into();
16598            self
16599        }
16600    }
16601
16602    #[doc(hidden)]
16603    impl crate::RequestBuilder for DeleteAsset {
16604        fn request_options(&mut self) -> &mut crate::RequestOptions {
16605            &mut self.0.options
16606        }
16607    }
16608
16609    /// The request builder for [DataplexService::list_assets][crate::client::DataplexService::list_assets] calls.
16610    ///
16611    /// # Example
16612    /// ```
16613    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListAssets;
16614    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16615    /// use google_cloud_gax::paginator::ItemPaginator;
16616    ///
16617    /// let builder = prepare_request_builder();
16618    /// let mut items = builder.by_item();
16619    /// while let Some(result) = items.next().await {
16620    ///   let item = result?;
16621    /// }
16622    /// # Ok(()) }
16623    ///
16624    /// fn prepare_request_builder() -> ListAssets {
16625    ///   # panic!();
16626    ///   // ... details omitted ...
16627    /// }
16628    /// ```
16629    #[derive(Clone, Debug)]
16630    pub struct ListAssets(RequestBuilder<crate::model::ListAssetsRequest>);
16631
16632    impl ListAssets {
16633        pub(crate) fn new(
16634            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16635        ) -> Self {
16636            Self(RequestBuilder::new(stub))
16637        }
16638
16639        /// Sets the full request, replacing any prior values.
16640        pub fn with_request<V: Into<crate::model::ListAssetsRequest>>(mut self, v: V) -> Self {
16641            self.0.request = v.into();
16642            self
16643        }
16644
16645        /// Sets all the options, replacing any prior values.
16646        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16647            self.0.options = v.into();
16648            self
16649        }
16650
16651        /// Sends the request.
16652        pub async fn send(self) -> Result<crate::model::ListAssetsResponse> {
16653            (*self.0.stub)
16654                .list_assets(self.0.request, self.0.options)
16655                .await
16656                .map(crate::Response::into_body)
16657        }
16658
16659        /// Streams each page in the collection.
16660        pub fn by_page(
16661            self,
16662        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListAssetsResponse, crate::Error>
16663        {
16664            use std::clone::Clone;
16665            let token = self.0.request.page_token.clone();
16666            let execute = move |token: String| {
16667                let mut builder = self.clone();
16668                builder.0.request = builder.0.request.set_page_token(token);
16669                builder.send()
16670            };
16671            google_cloud_gax::paginator::internal::new_paginator(token, execute)
16672        }
16673
16674        /// Streams each item in the collection.
16675        pub fn by_item(
16676            self,
16677        ) -> impl google_cloud_gax::paginator::ItemPaginator<
16678            crate::model::ListAssetsResponse,
16679            crate::Error,
16680        > {
16681            use google_cloud_gax::paginator::Paginator;
16682            self.by_page().items()
16683        }
16684
16685        /// Sets the value of [parent][crate::model::ListAssetsRequest::parent].
16686        ///
16687        /// This is a **required** field for requests.
16688        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16689            self.0.request.parent = v.into();
16690            self
16691        }
16692
16693        /// Sets the value of [page_size][crate::model::ListAssetsRequest::page_size].
16694        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16695            self.0.request.page_size = v.into();
16696            self
16697        }
16698
16699        /// Sets the value of [page_token][crate::model::ListAssetsRequest::page_token].
16700        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16701            self.0.request.page_token = v.into();
16702            self
16703        }
16704
16705        /// Sets the value of [filter][crate::model::ListAssetsRequest::filter].
16706        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16707            self.0.request.filter = v.into();
16708            self
16709        }
16710
16711        /// Sets the value of [order_by][crate::model::ListAssetsRequest::order_by].
16712        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
16713            self.0.request.order_by = v.into();
16714            self
16715        }
16716    }
16717
16718    #[doc(hidden)]
16719    impl crate::RequestBuilder for ListAssets {
16720        fn request_options(&mut self) -> &mut crate::RequestOptions {
16721            &mut self.0.options
16722        }
16723    }
16724
16725    /// The request builder for [DataplexService::get_asset][crate::client::DataplexService::get_asset] calls.
16726    ///
16727    /// # Example
16728    /// ```
16729    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetAsset;
16730    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16731    ///
16732    /// let builder = prepare_request_builder();
16733    /// let response = builder.send().await?;
16734    /// # Ok(()) }
16735    ///
16736    /// fn prepare_request_builder() -> GetAsset {
16737    ///   # panic!();
16738    ///   // ... details omitted ...
16739    /// }
16740    /// ```
16741    #[derive(Clone, Debug)]
16742    pub struct GetAsset(RequestBuilder<crate::model::GetAssetRequest>);
16743
16744    impl GetAsset {
16745        pub(crate) fn new(
16746            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16747        ) -> Self {
16748            Self(RequestBuilder::new(stub))
16749        }
16750
16751        /// Sets the full request, replacing any prior values.
16752        pub fn with_request<V: Into<crate::model::GetAssetRequest>>(mut self, v: V) -> Self {
16753            self.0.request = v.into();
16754            self
16755        }
16756
16757        /// Sets all the options, replacing any prior values.
16758        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16759            self.0.options = v.into();
16760            self
16761        }
16762
16763        /// Sends the request.
16764        pub async fn send(self) -> Result<crate::model::Asset> {
16765            (*self.0.stub)
16766                .get_asset(self.0.request, self.0.options)
16767                .await
16768                .map(crate::Response::into_body)
16769        }
16770
16771        /// Sets the value of [name][crate::model::GetAssetRequest::name].
16772        ///
16773        /// This is a **required** field for requests.
16774        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16775            self.0.request.name = v.into();
16776            self
16777        }
16778    }
16779
16780    #[doc(hidden)]
16781    impl crate::RequestBuilder for GetAsset {
16782        fn request_options(&mut self) -> &mut crate::RequestOptions {
16783            &mut self.0.options
16784        }
16785    }
16786
16787    /// The request builder for [DataplexService::list_asset_actions][crate::client::DataplexService::list_asset_actions] calls.
16788    ///
16789    /// # Example
16790    /// ```
16791    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListAssetActions;
16792    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16793    /// use google_cloud_gax::paginator::ItemPaginator;
16794    ///
16795    /// let builder = prepare_request_builder();
16796    /// let mut items = builder.by_item();
16797    /// while let Some(result) = items.next().await {
16798    ///   let item = result?;
16799    /// }
16800    /// # Ok(()) }
16801    ///
16802    /// fn prepare_request_builder() -> ListAssetActions {
16803    ///   # panic!();
16804    ///   // ... details omitted ...
16805    /// }
16806    /// ```
16807    #[derive(Clone, Debug)]
16808    pub struct ListAssetActions(RequestBuilder<crate::model::ListAssetActionsRequest>);
16809
16810    impl ListAssetActions {
16811        pub(crate) fn new(
16812            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16813        ) -> Self {
16814            Self(RequestBuilder::new(stub))
16815        }
16816
16817        /// Sets the full request, replacing any prior values.
16818        pub fn with_request<V: Into<crate::model::ListAssetActionsRequest>>(
16819            mut self,
16820            v: V,
16821        ) -> Self {
16822            self.0.request = v.into();
16823            self
16824        }
16825
16826        /// Sets all the options, replacing any prior values.
16827        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16828            self.0.options = v.into();
16829            self
16830        }
16831
16832        /// Sends the request.
16833        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
16834            (*self.0.stub)
16835                .list_asset_actions(self.0.request, self.0.options)
16836                .await
16837                .map(crate::Response::into_body)
16838        }
16839
16840        /// Streams each page in the collection.
16841        pub fn by_page(
16842            self,
16843        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListActionsResponse, crate::Error>
16844        {
16845            use std::clone::Clone;
16846            let token = self.0.request.page_token.clone();
16847            let execute = move |token: String| {
16848                let mut builder = self.clone();
16849                builder.0.request = builder.0.request.set_page_token(token);
16850                builder.send()
16851            };
16852            google_cloud_gax::paginator::internal::new_paginator(token, execute)
16853        }
16854
16855        /// Streams each item in the collection.
16856        pub fn by_item(
16857            self,
16858        ) -> impl google_cloud_gax::paginator::ItemPaginator<
16859            crate::model::ListActionsResponse,
16860            crate::Error,
16861        > {
16862            use google_cloud_gax::paginator::Paginator;
16863            self.by_page().items()
16864        }
16865
16866        /// Sets the value of [parent][crate::model::ListAssetActionsRequest::parent].
16867        ///
16868        /// This is a **required** field for requests.
16869        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16870            self.0.request.parent = v.into();
16871            self
16872        }
16873
16874        /// Sets the value of [page_size][crate::model::ListAssetActionsRequest::page_size].
16875        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16876            self.0.request.page_size = v.into();
16877            self
16878        }
16879
16880        /// Sets the value of [page_token][crate::model::ListAssetActionsRequest::page_token].
16881        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16882            self.0.request.page_token = v.into();
16883            self
16884        }
16885    }
16886
16887    #[doc(hidden)]
16888    impl crate::RequestBuilder for ListAssetActions {
16889        fn request_options(&mut self) -> &mut crate::RequestOptions {
16890            &mut self.0.options
16891        }
16892    }
16893
16894    /// The request builder for [DataplexService::create_task][crate::client::DataplexService::create_task] calls.
16895    ///
16896    /// # Example
16897    /// ```
16898    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateTask;
16899    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16900    /// use google_cloud_lro::Poller;
16901    ///
16902    /// let builder = prepare_request_builder();
16903    /// let response = builder.poller().until_done().await?;
16904    /// # Ok(()) }
16905    ///
16906    /// fn prepare_request_builder() -> CreateTask {
16907    ///   # panic!();
16908    ///   // ... details omitted ...
16909    /// }
16910    /// ```
16911    #[derive(Clone, Debug)]
16912    pub struct CreateTask(RequestBuilder<crate::model::CreateTaskRequest>);
16913
16914    impl CreateTask {
16915        pub(crate) fn new(
16916            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16917        ) -> Self {
16918            Self(RequestBuilder::new(stub))
16919        }
16920
16921        /// Sets the full request, replacing any prior values.
16922        pub fn with_request<V: Into<crate::model::CreateTaskRequest>>(mut self, v: V) -> Self {
16923            self.0.request = v.into();
16924            self
16925        }
16926
16927        /// Sets all the options, replacing any prior values.
16928        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16929            self.0.options = v.into();
16930            self
16931        }
16932
16933        /// Sends the request.
16934        ///
16935        /// # Long running operations
16936        ///
16937        /// This starts, but does not poll, a longrunning operation. More information
16938        /// on [create_task][crate::client::DataplexService::create_task].
16939        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
16940            (*self.0.stub)
16941                .create_task(self.0.request, self.0.options)
16942                .await
16943                .map(crate::Response::into_body)
16944        }
16945
16946        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_task`.
16947        pub fn poller(
16948            self,
16949        ) -> impl google_cloud_lro::Poller<crate::model::Task, crate::model::OperationMetadata>
16950        {
16951            type Operation = google_cloud_lro::internal::Operation<
16952                crate::model::Task,
16953                crate::model::OperationMetadata,
16954            >;
16955            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
16956            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
16957
16958            let stub = self.0.stub.clone();
16959            let mut options = self.0.options.clone();
16960            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
16961            let query = move |name| {
16962                let stub = stub.clone();
16963                let options = options.clone();
16964                async {
16965                    let op = GetOperation::new(stub)
16966                        .set_name(name)
16967                        .with_options(options)
16968                        .send()
16969                        .await?;
16970                    Ok(Operation::new(op))
16971                }
16972            };
16973
16974            let start = move || async {
16975                let op = self.send().await?;
16976                Ok(Operation::new(op))
16977            };
16978
16979            google_cloud_lro::internal::new_poller(
16980                polling_error_policy,
16981                polling_backoff_policy,
16982                start,
16983                query,
16984            )
16985        }
16986
16987        /// Sets the value of [parent][crate::model::CreateTaskRequest::parent].
16988        ///
16989        /// This is a **required** field for requests.
16990        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16991            self.0.request.parent = v.into();
16992            self
16993        }
16994
16995        /// Sets the value of [task_id][crate::model::CreateTaskRequest::task_id].
16996        ///
16997        /// This is a **required** field for requests.
16998        pub fn set_task_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
16999            self.0.request.task_id = v.into();
17000            self
17001        }
17002
17003        /// Sets the value of [task][crate::model::CreateTaskRequest::task].
17004        ///
17005        /// This is a **required** field for requests.
17006        pub fn set_task<T>(mut self, v: T) -> Self
17007        where
17008            T: std::convert::Into<crate::model::Task>,
17009        {
17010            self.0.request.task = std::option::Option::Some(v.into());
17011            self
17012        }
17013
17014        /// Sets or clears the value of [task][crate::model::CreateTaskRequest::task].
17015        ///
17016        /// This is a **required** field for requests.
17017        pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
17018        where
17019            T: std::convert::Into<crate::model::Task>,
17020        {
17021            self.0.request.task = v.map(|x| x.into());
17022            self
17023        }
17024
17025        /// Sets the value of [validate_only][crate::model::CreateTaskRequest::validate_only].
17026        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
17027            self.0.request.validate_only = v.into();
17028            self
17029        }
17030    }
17031
17032    #[doc(hidden)]
17033    impl crate::RequestBuilder for CreateTask {
17034        fn request_options(&mut self) -> &mut crate::RequestOptions {
17035            &mut self.0.options
17036        }
17037    }
17038
17039    /// The request builder for [DataplexService::update_task][crate::client::DataplexService::update_task] calls.
17040    ///
17041    /// # Example
17042    /// ```
17043    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateTask;
17044    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17045    /// use google_cloud_lro::Poller;
17046    ///
17047    /// let builder = prepare_request_builder();
17048    /// let response = builder.poller().until_done().await?;
17049    /// # Ok(()) }
17050    ///
17051    /// fn prepare_request_builder() -> UpdateTask {
17052    ///   # panic!();
17053    ///   // ... details omitted ...
17054    /// }
17055    /// ```
17056    #[derive(Clone, Debug)]
17057    pub struct UpdateTask(RequestBuilder<crate::model::UpdateTaskRequest>);
17058
17059    impl UpdateTask {
17060        pub(crate) fn new(
17061            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17062        ) -> Self {
17063            Self(RequestBuilder::new(stub))
17064        }
17065
17066        /// Sets the full request, replacing any prior values.
17067        pub fn with_request<V: Into<crate::model::UpdateTaskRequest>>(mut self, v: V) -> Self {
17068            self.0.request = v.into();
17069            self
17070        }
17071
17072        /// Sets all the options, replacing any prior values.
17073        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17074            self.0.options = v.into();
17075            self
17076        }
17077
17078        /// Sends the request.
17079        ///
17080        /// # Long running operations
17081        ///
17082        /// This starts, but does not poll, a longrunning operation. More information
17083        /// on [update_task][crate::client::DataplexService::update_task].
17084        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17085            (*self.0.stub)
17086                .update_task(self.0.request, self.0.options)
17087                .await
17088                .map(crate::Response::into_body)
17089        }
17090
17091        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_task`.
17092        pub fn poller(
17093            self,
17094        ) -> impl google_cloud_lro::Poller<crate::model::Task, crate::model::OperationMetadata>
17095        {
17096            type Operation = google_cloud_lro::internal::Operation<
17097                crate::model::Task,
17098                crate::model::OperationMetadata,
17099            >;
17100            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17101            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17102
17103            let stub = self.0.stub.clone();
17104            let mut options = self.0.options.clone();
17105            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
17106            let query = move |name| {
17107                let stub = stub.clone();
17108                let options = options.clone();
17109                async {
17110                    let op = GetOperation::new(stub)
17111                        .set_name(name)
17112                        .with_options(options)
17113                        .send()
17114                        .await?;
17115                    Ok(Operation::new(op))
17116                }
17117            };
17118
17119            let start = move || async {
17120                let op = self.send().await?;
17121                Ok(Operation::new(op))
17122            };
17123
17124            google_cloud_lro::internal::new_poller(
17125                polling_error_policy,
17126                polling_backoff_policy,
17127                start,
17128                query,
17129            )
17130        }
17131
17132        /// Sets the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
17133        ///
17134        /// This is a **required** field for requests.
17135        pub fn set_update_mask<T>(mut self, v: T) -> Self
17136        where
17137            T: std::convert::Into<wkt::FieldMask>,
17138        {
17139            self.0.request.update_mask = std::option::Option::Some(v.into());
17140            self
17141        }
17142
17143        /// Sets or clears the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
17144        ///
17145        /// This is a **required** field for requests.
17146        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
17147        where
17148            T: std::convert::Into<wkt::FieldMask>,
17149        {
17150            self.0.request.update_mask = v.map(|x| x.into());
17151            self
17152        }
17153
17154        /// Sets the value of [task][crate::model::UpdateTaskRequest::task].
17155        ///
17156        /// This is a **required** field for requests.
17157        pub fn set_task<T>(mut self, v: T) -> Self
17158        where
17159            T: std::convert::Into<crate::model::Task>,
17160        {
17161            self.0.request.task = std::option::Option::Some(v.into());
17162            self
17163        }
17164
17165        /// Sets or clears the value of [task][crate::model::UpdateTaskRequest::task].
17166        ///
17167        /// This is a **required** field for requests.
17168        pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
17169        where
17170            T: std::convert::Into<crate::model::Task>,
17171        {
17172            self.0.request.task = v.map(|x| x.into());
17173            self
17174        }
17175
17176        /// Sets the value of [validate_only][crate::model::UpdateTaskRequest::validate_only].
17177        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
17178            self.0.request.validate_only = v.into();
17179            self
17180        }
17181    }
17182
17183    #[doc(hidden)]
17184    impl crate::RequestBuilder for UpdateTask {
17185        fn request_options(&mut self) -> &mut crate::RequestOptions {
17186            &mut self.0.options
17187        }
17188    }
17189
17190    /// The request builder for [DataplexService::delete_task][crate::client::DataplexService::delete_task] calls.
17191    ///
17192    /// # Example
17193    /// ```
17194    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteTask;
17195    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17196    /// use google_cloud_lro::Poller;
17197    ///
17198    /// let builder = prepare_request_builder();
17199    /// let response = builder.poller().until_done().await?;
17200    /// # Ok(()) }
17201    ///
17202    /// fn prepare_request_builder() -> DeleteTask {
17203    ///   # panic!();
17204    ///   // ... details omitted ...
17205    /// }
17206    /// ```
17207    #[derive(Clone, Debug)]
17208    pub struct DeleteTask(RequestBuilder<crate::model::DeleteTaskRequest>);
17209
17210    impl DeleteTask {
17211        pub(crate) fn new(
17212            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17213        ) -> Self {
17214            Self(RequestBuilder::new(stub))
17215        }
17216
17217        /// Sets the full request, replacing any prior values.
17218        pub fn with_request<V: Into<crate::model::DeleteTaskRequest>>(mut self, v: V) -> Self {
17219            self.0.request = v.into();
17220            self
17221        }
17222
17223        /// Sets all the options, replacing any prior values.
17224        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17225            self.0.options = v.into();
17226            self
17227        }
17228
17229        /// Sends the request.
17230        ///
17231        /// # Long running operations
17232        ///
17233        /// This starts, but does not poll, a longrunning operation. More information
17234        /// on [delete_task][crate::client::DataplexService::delete_task].
17235        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17236            (*self.0.stub)
17237                .delete_task(self.0.request, self.0.options)
17238                .await
17239                .map(crate::Response::into_body)
17240        }
17241
17242        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_task`.
17243        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
17244            type Operation =
17245                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
17246            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17247            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17248
17249            let stub = self.0.stub.clone();
17250            let mut options = self.0.options.clone();
17251            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
17252            let query = move |name| {
17253                let stub = stub.clone();
17254                let options = options.clone();
17255                async {
17256                    let op = GetOperation::new(stub)
17257                        .set_name(name)
17258                        .with_options(options)
17259                        .send()
17260                        .await?;
17261                    Ok(Operation::new(op))
17262                }
17263            };
17264
17265            let start = move || async {
17266                let op = self.send().await?;
17267                Ok(Operation::new(op))
17268            };
17269
17270            google_cloud_lro::internal::new_unit_response_poller(
17271                polling_error_policy,
17272                polling_backoff_policy,
17273                start,
17274                query,
17275            )
17276        }
17277
17278        /// Sets the value of [name][crate::model::DeleteTaskRequest::name].
17279        ///
17280        /// This is a **required** field for requests.
17281        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17282            self.0.request.name = v.into();
17283            self
17284        }
17285    }
17286
17287    #[doc(hidden)]
17288    impl crate::RequestBuilder for DeleteTask {
17289        fn request_options(&mut self) -> &mut crate::RequestOptions {
17290            &mut self.0.options
17291        }
17292    }
17293
17294    /// The request builder for [DataplexService::list_tasks][crate::client::DataplexService::list_tasks] calls.
17295    ///
17296    /// # Example
17297    /// ```
17298    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListTasks;
17299    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17300    /// use google_cloud_gax::paginator::ItemPaginator;
17301    ///
17302    /// let builder = prepare_request_builder();
17303    /// let mut items = builder.by_item();
17304    /// while let Some(result) = items.next().await {
17305    ///   let item = result?;
17306    /// }
17307    /// # Ok(()) }
17308    ///
17309    /// fn prepare_request_builder() -> ListTasks {
17310    ///   # panic!();
17311    ///   // ... details omitted ...
17312    /// }
17313    /// ```
17314    #[derive(Clone, Debug)]
17315    pub struct ListTasks(RequestBuilder<crate::model::ListTasksRequest>);
17316
17317    impl ListTasks {
17318        pub(crate) fn new(
17319            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17320        ) -> Self {
17321            Self(RequestBuilder::new(stub))
17322        }
17323
17324        /// Sets the full request, replacing any prior values.
17325        pub fn with_request<V: Into<crate::model::ListTasksRequest>>(mut self, v: V) -> Self {
17326            self.0.request = v.into();
17327            self
17328        }
17329
17330        /// Sets all the options, replacing any prior values.
17331        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17332            self.0.options = v.into();
17333            self
17334        }
17335
17336        /// Sends the request.
17337        pub async fn send(self) -> Result<crate::model::ListTasksResponse> {
17338            (*self.0.stub)
17339                .list_tasks(self.0.request, self.0.options)
17340                .await
17341                .map(crate::Response::into_body)
17342        }
17343
17344        /// Streams each page in the collection.
17345        pub fn by_page(
17346            self,
17347        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListTasksResponse, crate::Error>
17348        {
17349            use std::clone::Clone;
17350            let token = self.0.request.page_token.clone();
17351            let execute = move |token: String| {
17352                let mut builder = self.clone();
17353                builder.0.request = builder.0.request.set_page_token(token);
17354                builder.send()
17355            };
17356            google_cloud_gax::paginator::internal::new_paginator(token, execute)
17357        }
17358
17359        /// Streams each item in the collection.
17360        pub fn by_item(
17361            self,
17362        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListTasksResponse, crate::Error>
17363        {
17364            use google_cloud_gax::paginator::Paginator;
17365            self.by_page().items()
17366        }
17367
17368        /// Sets the value of [parent][crate::model::ListTasksRequest::parent].
17369        ///
17370        /// This is a **required** field for requests.
17371        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
17372            self.0.request.parent = v.into();
17373            self
17374        }
17375
17376        /// Sets the value of [page_size][crate::model::ListTasksRequest::page_size].
17377        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17378            self.0.request.page_size = v.into();
17379            self
17380        }
17381
17382        /// Sets the value of [page_token][crate::model::ListTasksRequest::page_token].
17383        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17384            self.0.request.page_token = v.into();
17385            self
17386        }
17387
17388        /// Sets the value of [filter][crate::model::ListTasksRequest::filter].
17389        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
17390            self.0.request.filter = v.into();
17391            self
17392        }
17393
17394        /// Sets the value of [order_by][crate::model::ListTasksRequest::order_by].
17395        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
17396            self.0.request.order_by = v.into();
17397            self
17398        }
17399    }
17400
17401    #[doc(hidden)]
17402    impl crate::RequestBuilder for ListTasks {
17403        fn request_options(&mut self) -> &mut crate::RequestOptions {
17404            &mut self.0.options
17405        }
17406    }
17407
17408    /// The request builder for [DataplexService::get_task][crate::client::DataplexService::get_task] calls.
17409    ///
17410    /// # Example
17411    /// ```
17412    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetTask;
17413    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17414    ///
17415    /// let builder = prepare_request_builder();
17416    /// let response = builder.send().await?;
17417    /// # Ok(()) }
17418    ///
17419    /// fn prepare_request_builder() -> GetTask {
17420    ///   # panic!();
17421    ///   // ... details omitted ...
17422    /// }
17423    /// ```
17424    #[derive(Clone, Debug)]
17425    pub struct GetTask(RequestBuilder<crate::model::GetTaskRequest>);
17426
17427    impl GetTask {
17428        pub(crate) fn new(
17429            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17430        ) -> Self {
17431            Self(RequestBuilder::new(stub))
17432        }
17433
17434        /// Sets the full request, replacing any prior values.
17435        pub fn with_request<V: Into<crate::model::GetTaskRequest>>(mut self, v: V) -> Self {
17436            self.0.request = v.into();
17437            self
17438        }
17439
17440        /// Sets all the options, replacing any prior values.
17441        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17442            self.0.options = v.into();
17443            self
17444        }
17445
17446        /// Sends the request.
17447        pub async fn send(self) -> Result<crate::model::Task> {
17448            (*self.0.stub)
17449                .get_task(self.0.request, self.0.options)
17450                .await
17451                .map(crate::Response::into_body)
17452        }
17453
17454        /// Sets the value of [name][crate::model::GetTaskRequest::name].
17455        ///
17456        /// This is a **required** field for requests.
17457        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17458            self.0.request.name = v.into();
17459            self
17460        }
17461    }
17462
17463    #[doc(hidden)]
17464    impl crate::RequestBuilder for GetTask {
17465        fn request_options(&mut self) -> &mut crate::RequestOptions {
17466            &mut self.0.options
17467        }
17468    }
17469
17470    /// The request builder for [DataplexService::list_jobs][crate::client::DataplexService::list_jobs] calls.
17471    ///
17472    /// # Example
17473    /// ```
17474    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListJobs;
17475    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17476    /// use google_cloud_gax::paginator::ItemPaginator;
17477    ///
17478    /// let builder = prepare_request_builder();
17479    /// let mut items = builder.by_item();
17480    /// while let Some(result) = items.next().await {
17481    ///   let item = result?;
17482    /// }
17483    /// # Ok(()) }
17484    ///
17485    /// fn prepare_request_builder() -> ListJobs {
17486    ///   # panic!();
17487    ///   // ... details omitted ...
17488    /// }
17489    /// ```
17490    #[derive(Clone, Debug)]
17491    pub struct ListJobs(RequestBuilder<crate::model::ListJobsRequest>);
17492
17493    impl ListJobs {
17494        pub(crate) fn new(
17495            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17496        ) -> Self {
17497            Self(RequestBuilder::new(stub))
17498        }
17499
17500        /// Sets the full request, replacing any prior values.
17501        pub fn with_request<V: Into<crate::model::ListJobsRequest>>(mut self, v: V) -> Self {
17502            self.0.request = v.into();
17503            self
17504        }
17505
17506        /// Sets all the options, replacing any prior values.
17507        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17508            self.0.options = v.into();
17509            self
17510        }
17511
17512        /// Sends the request.
17513        pub async fn send(self) -> Result<crate::model::ListJobsResponse> {
17514            (*self.0.stub)
17515                .list_jobs(self.0.request, self.0.options)
17516                .await
17517                .map(crate::Response::into_body)
17518        }
17519
17520        /// Streams each page in the collection.
17521        pub fn by_page(
17522            self,
17523        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListJobsResponse, crate::Error>
17524        {
17525            use std::clone::Clone;
17526            let token = self.0.request.page_token.clone();
17527            let execute = move |token: String| {
17528                let mut builder = self.clone();
17529                builder.0.request = builder.0.request.set_page_token(token);
17530                builder.send()
17531            };
17532            google_cloud_gax::paginator::internal::new_paginator(token, execute)
17533        }
17534
17535        /// Streams each item in the collection.
17536        pub fn by_item(
17537            self,
17538        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListJobsResponse, crate::Error>
17539        {
17540            use google_cloud_gax::paginator::Paginator;
17541            self.by_page().items()
17542        }
17543
17544        /// Sets the value of [parent][crate::model::ListJobsRequest::parent].
17545        ///
17546        /// This is a **required** field for requests.
17547        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
17548            self.0.request.parent = v.into();
17549            self
17550        }
17551
17552        /// Sets the value of [page_size][crate::model::ListJobsRequest::page_size].
17553        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17554            self.0.request.page_size = v.into();
17555            self
17556        }
17557
17558        /// Sets the value of [page_token][crate::model::ListJobsRequest::page_token].
17559        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17560            self.0.request.page_token = v.into();
17561            self
17562        }
17563    }
17564
17565    #[doc(hidden)]
17566    impl crate::RequestBuilder for ListJobs {
17567        fn request_options(&mut self) -> &mut crate::RequestOptions {
17568            &mut self.0.options
17569        }
17570    }
17571
17572    /// The request builder for [DataplexService::run_task][crate::client::DataplexService::run_task] calls.
17573    ///
17574    /// # Example
17575    /// ```
17576    /// # use google_cloud_dataplex_v1::builder::dataplex_service::RunTask;
17577    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17578    ///
17579    /// let builder = prepare_request_builder();
17580    /// let response = builder.send().await?;
17581    /// # Ok(()) }
17582    ///
17583    /// fn prepare_request_builder() -> RunTask {
17584    ///   # panic!();
17585    ///   // ... details omitted ...
17586    /// }
17587    /// ```
17588    #[derive(Clone, Debug)]
17589    pub struct RunTask(RequestBuilder<crate::model::RunTaskRequest>);
17590
17591    impl RunTask {
17592        pub(crate) fn new(
17593            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17594        ) -> Self {
17595            Self(RequestBuilder::new(stub))
17596        }
17597
17598        /// Sets the full request, replacing any prior values.
17599        pub fn with_request<V: Into<crate::model::RunTaskRequest>>(mut self, v: V) -> Self {
17600            self.0.request = v.into();
17601            self
17602        }
17603
17604        /// Sets all the options, replacing any prior values.
17605        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17606            self.0.options = v.into();
17607            self
17608        }
17609
17610        /// Sends the request.
17611        pub async fn send(self) -> Result<crate::model::RunTaskResponse> {
17612            (*self.0.stub)
17613                .run_task(self.0.request, self.0.options)
17614                .await
17615                .map(crate::Response::into_body)
17616        }
17617
17618        /// Sets the value of [name][crate::model::RunTaskRequest::name].
17619        ///
17620        /// This is a **required** field for requests.
17621        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17622            self.0.request.name = v.into();
17623            self
17624        }
17625
17626        /// Sets the value of [labels][crate::model::RunTaskRequest::labels].
17627        pub fn set_labels<T, K, V>(mut self, v: T) -> Self
17628        where
17629            T: std::iter::IntoIterator<Item = (K, V)>,
17630            K: std::convert::Into<std::string::String>,
17631            V: std::convert::Into<std::string::String>,
17632        {
17633            self.0.request.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
17634            self
17635        }
17636
17637        /// Sets the value of [args][crate::model::RunTaskRequest::args].
17638        pub fn set_args<T, K, V>(mut self, v: T) -> Self
17639        where
17640            T: std::iter::IntoIterator<Item = (K, V)>,
17641            K: std::convert::Into<std::string::String>,
17642            V: std::convert::Into<std::string::String>,
17643        {
17644            self.0.request.args = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
17645            self
17646        }
17647    }
17648
17649    #[doc(hidden)]
17650    impl crate::RequestBuilder for RunTask {
17651        fn request_options(&mut self) -> &mut crate::RequestOptions {
17652            &mut self.0.options
17653        }
17654    }
17655
17656    /// The request builder for [DataplexService::get_job][crate::client::DataplexService::get_job] calls.
17657    ///
17658    /// # Example
17659    /// ```
17660    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetJob;
17661    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17662    ///
17663    /// let builder = prepare_request_builder();
17664    /// let response = builder.send().await?;
17665    /// # Ok(()) }
17666    ///
17667    /// fn prepare_request_builder() -> GetJob {
17668    ///   # panic!();
17669    ///   // ... details omitted ...
17670    /// }
17671    /// ```
17672    #[derive(Clone, Debug)]
17673    pub struct GetJob(RequestBuilder<crate::model::GetJobRequest>);
17674
17675    impl GetJob {
17676        pub(crate) fn new(
17677            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17678        ) -> Self {
17679            Self(RequestBuilder::new(stub))
17680        }
17681
17682        /// Sets the full request, replacing any prior values.
17683        pub fn with_request<V: Into<crate::model::GetJobRequest>>(mut self, v: V) -> 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<crate::RequestOptions>>(mut self, v: V) -> Self {
17690            self.0.options = v.into();
17691            self
17692        }
17693
17694        /// Sends the request.
17695        pub async fn send(self) -> Result<crate::model::Job> {
17696            (*self.0.stub)
17697                .get_job(self.0.request, self.0.options)
17698                .await
17699                .map(crate::Response::into_body)
17700        }
17701
17702        /// Sets the value of [name][crate::model::GetJobRequest::name].
17703        ///
17704        /// This is a **required** field for requests.
17705        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17706            self.0.request.name = v.into();
17707            self
17708        }
17709    }
17710
17711    #[doc(hidden)]
17712    impl crate::RequestBuilder for GetJob {
17713        fn request_options(&mut self) -> &mut crate::RequestOptions {
17714            &mut self.0.options
17715        }
17716    }
17717
17718    /// The request builder for [DataplexService::cancel_job][crate::client::DataplexService::cancel_job] calls.
17719    ///
17720    /// # Example
17721    /// ```
17722    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CancelJob;
17723    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17724    ///
17725    /// let builder = prepare_request_builder();
17726    /// let response = builder.send().await?;
17727    /// # Ok(()) }
17728    ///
17729    /// fn prepare_request_builder() -> CancelJob {
17730    ///   # panic!();
17731    ///   // ... details omitted ...
17732    /// }
17733    /// ```
17734    #[derive(Clone, Debug)]
17735    pub struct CancelJob(RequestBuilder<crate::model::CancelJobRequest>);
17736
17737    impl CancelJob {
17738        pub(crate) fn new(
17739            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17740        ) -> Self {
17741            Self(RequestBuilder::new(stub))
17742        }
17743
17744        /// Sets the full request, replacing any prior values.
17745        pub fn with_request<V: Into<crate::model::CancelJobRequest>>(mut self, v: V) -> Self {
17746            self.0.request = v.into();
17747            self
17748        }
17749
17750        /// Sets all the options, replacing any prior values.
17751        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17752            self.0.options = v.into();
17753            self
17754        }
17755
17756        /// Sends the request.
17757        pub async fn send(self) -> Result<()> {
17758            (*self.0.stub)
17759                .cancel_job(self.0.request, self.0.options)
17760                .await
17761                .map(crate::Response::into_body)
17762        }
17763
17764        /// Sets the value of [name][crate::model::CancelJobRequest::name].
17765        ///
17766        /// This is a **required** field for requests.
17767        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17768            self.0.request.name = v.into();
17769            self
17770        }
17771    }
17772
17773    #[doc(hidden)]
17774    impl crate::RequestBuilder for CancelJob {
17775        fn request_options(&mut self) -> &mut crate::RequestOptions {
17776            &mut self.0.options
17777        }
17778    }
17779
17780    /// The request builder for [DataplexService::create_environment][crate::client::DataplexService::create_environment] calls.
17781    ///
17782    /// # Example
17783    /// ```
17784    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateEnvironment;
17785    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17786    /// use google_cloud_lro::Poller;
17787    ///
17788    /// let builder = prepare_request_builder();
17789    /// let response = builder.poller().until_done().await?;
17790    /// # Ok(()) }
17791    ///
17792    /// fn prepare_request_builder() -> CreateEnvironment {
17793    ///   # panic!();
17794    ///   // ... details omitted ...
17795    /// }
17796    /// ```
17797    #[derive(Clone, Debug)]
17798    pub struct CreateEnvironment(RequestBuilder<crate::model::CreateEnvironmentRequest>);
17799
17800    impl CreateEnvironment {
17801        pub(crate) fn new(
17802            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17803        ) -> Self {
17804            Self(RequestBuilder::new(stub))
17805        }
17806
17807        /// Sets the full request, replacing any prior values.
17808        pub fn with_request<V: Into<crate::model::CreateEnvironmentRequest>>(
17809            mut self,
17810            v: V,
17811        ) -> Self {
17812            self.0.request = v.into();
17813            self
17814        }
17815
17816        /// Sets all the options, replacing any prior values.
17817        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17818            self.0.options = v.into();
17819            self
17820        }
17821
17822        /// Sends the request.
17823        ///
17824        /// # Long running operations
17825        ///
17826        /// This starts, but does not poll, a longrunning operation. More information
17827        /// on [create_environment][crate::client::DataplexService::create_environment].
17828        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17829            (*self.0.stub)
17830                .create_environment(self.0.request, self.0.options)
17831                .await
17832                .map(crate::Response::into_body)
17833        }
17834
17835        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_environment`.
17836        pub fn poller(
17837            self,
17838        ) -> impl google_cloud_lro::Poller<crate::model::Environment, crate::model::OperationMetadata>
17839        {
17840            type Operation = google_cloud_lro::internal::Operation<
17841                crate::model::Environment,
17842                crate::model::OperationMetadata,
17843            >;
17844            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17845            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17846
17847            let stub = self.0.stub.clone();
17848            let mut options = self.0.options.clone();
17849            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
17850            let query = move |name| {
17851                let stub = stub.clone();
17852                let options = options.clone();
17853                async {
17854                    let op = GetOperation::new(stub)
17855                        .set_name(name)
17856                        .with_options(options)
17857                        .send()
17858                        .await?;
17859                    Ok(Operation::new(op))
17860                }
17861            };
17862
17863            let start = move || async {
17864                let op = self.send().await?;
17865                Ok(Operation::new(op))
17866            };
17867
17868            google_cloud_lro::internal::new_poller(
17869                polling_error_policy,
17870                polling_backoff_policy,
17871                start,
17872                query,
17873            )
17874        }
17875
17876        /// Sets the value of [parent][crate::model::CreateEnvironmentRequest::parent].
17877        ///
17878        /// This is a **required** field for requests.
17879        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
17880            self.0.request.parent = v.into();
17881            self
17882        }
17883
17884        /// Sets the value of [environment_id][crate::model::CreateEnvironmentRequest::environment_id].
17885        ///
17886        /// This is a **required** field for requests.
17887        pub fn set_environment_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
17888            self.0.request.environment_id = v.into();
17889            self
17890        }
17891
17892        /// Sets the value of [environment][crate::model::CreateEnvironmentRequest::environment].
17893        ///
17894        /// This is a **required** field for requests.
17895        pub fn set_environment<T>(mut self, v: T) -> Self
17896        where
17897            T: std::convert::Into<crate::model::Environment>,
17898        {
17899            self.0.request.environment = std::option::Option::Some(v.into());
17900            self
17901        }
17902
17903        /// Sets or clears the value of [environment][crate::model::CreateEnvironmentRequest::environment].
17904        ///
17905        /// This is a **required** field for requests.
17906        pub fn set_or_clear_environment<T>(mut self, v: std::option::Option<T>) -> Self
17907        where
17908            T: std::convert::Into<crate::model::Environment>,
17909        {
17910            self.0.request.environment = v.map(|x| x.into());
17911            self
17912        }
17913
17914        /// Sets the value of [validate_only][crate::model::CreateEnvironmentRequest::validate_only].
17915        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
17916            self.0.request.validate_only = v.into();
17917            self
17918        }
17919    }
17920
17921    #[doc(hidden)]
17922    impl crate::RequestBuilder for CreateEnvironment {
17923        fn request_options(&mut self) -> &mut crate::RequestOptions {
17924            &mut self.0.options
17925        }
17926    }
17927
17928    /// The request builder for [DataplexService::update_environment][crate::client::DataplexService::update_environment] calls.
17929    ///
17930    /// # Example
17931    /// ```
17932    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateEnvironment;
17933    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17934    /// use google_cloud_lro::Poller;
17935    ///
17936    /// let builder = prepare_request_builder();
17937    /// let response = builder.poller().until_done().await?;
17938    /// # Ok(()) }
17939    ///
17940    /// fn prepare_request_builder() -> UpdateEnvironment {
17941    ///   # panic!();
17942    ///   // ... details omitted ...
17943    /// }
17944    /// ```
17945    #[derive(Clone, Debug)]
17946    pub struct UpdateEnvironment(RequestBuilder<crate::model::UpdateEnvironmentRequest>);
17947
17948    impl UpdateEnvironment {
17949        pub(crate) fn new(
17950            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17951        ) -> Self {
17952            Self(RequestBuilder::new(stub))
17953        }
17954
17955        /// Sets the full request, replacing any prior values.
17956        pub fn with_request<V: Into<crate::model::UpdateEnvironmentRequest>>(
17957            mut self,
17958            v: V,
17959        ) -> Self {
17960            self.0.request = v.into();
17961            self
17962        }
17963
17964        /// Sets all the options, replacing any prior values.
17965        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17966            self.0.options = v.into();
17967            self
17968        }
17969
17970        /// Sends the request.
17971        ///
17972        /// # Long running operations
17973        ///
17974        /// This starts, but does not poll, a longrunning operation. More information
17975        /// on [update_environment][crate::client::DataplexService::update_environment].
17976        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17977            (*self.0.stub)
17978                .update_environment(self.0.request, self.0.options)
17979                .await
17980                .map(crate::Response::into_body)
17981        }
17982
17983        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_environment`.
17984        pub fn poller(
17985            self,
17986        ) -> impl google_cloud_lro::Poller<crate::model::Environment, crate::model::OperationMetadata>
17987        {
17988            type Operation = google_cloud_lro::internal::Operation<
17989                crate::model::Environment,
17990                crate::model::OperationMetadata,
17991            >;
17992            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17993            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17994
17995            let stub = self.0.stub.clone();
17996            let mut options = self.0.options.clone();
17997            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
17998            let query = move |name| {
17999                let stub = stub.clone();
18000                let options = options.clone();
18001                async {
18002                    let op = GetOperation::new(stub)
18003                        .set_name(name)
18004                        .with_options(options)
18005                        .send()
18006                        .await?;
18007                    Ok(Operation::new(op))
18008                }
18009            };
18010
18011            let start = move || async {
18012                let op = self.send().await?;
18013                Ok(Operation::new(op))
18014            };
18015
18016            google_cloud_lro::internal::new_poller(
18017                polling_error_policy,
18018                polling_backoff_policy,
18019                start,
18020                query,
18021            )
18022        }
18023
18024        /// Sets the value of [update_mask][crate::model::UpdateEnvironmentRequest::update_mask].
18025        ///
18026        /// This is a **required** field for requests.
18027        pub fn set_update_mask<T>(mut self, v: T) -> Self
18028        where
18029            T: std::convert::Into<wkt::FieldMask>,
18030        {
18031            self.0.request.update_mask = std::option::Option::Some(v.into());
18032            self
18033        }
18034
18035        /// Sets or clears the value of [update_mask][crate::model::UpdateEnvironmentRequest::update_mask].
18036        ///
18037        /// This is a **required** field for requests.
18038        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
18039        where
18040            T: std::convert::Into<wkt::FieldMask>,
18041        {
18042            self.0.request.update_mask = v.map(|x| x.into());
18043            self
18044        }
18045
18046        /// Sets the value of [environment][crate::model::UpdateEnvironmentRequest::environment].
18047        ///
18048        /// This is a **required** field for requests.
18049        pub fn set_environment<T>(mut self, v: T) -> Self
18050        where
18051            T: std::convert::Into<crate::model::Environment>,
18052        {
18053            self.0.request.environment = std::option::Option::Some(v.into());
18054            self
18055        }
18056
18057        /// Sets or clears the value of [environment][crate::model::UpdateEnvironmentRequest::environment].
18058        ///
18059        /// This is a **required** field for requests.
18060        pub fn set_or_clear_environment<T>(mut self, v: std::option::Option<T>) -> Self
18061        where
18062            T: std::convert::Into<crate::model::Environment>,
18063        {
18064            self.0.request.environment = v.map(|x| x.into());
18065            self
18066        }
18067
18068        /// Sets the value of [validate_only][crate::model::UpdateEnvironmentRequest::validate_only].
18069        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18070            self.0.request.validate_only = v.into();
18071            self
18072        }
18073    }
18074
18075    #[doc(hidden)]
18076    impl crate::RequestBuilder for UpdateEnvironment {
18077        fn request_options(&mut self) -> &mut crate::RequestOptions {
18078            &mut self.0.options
18079        }
18080    }
18081
18082    /// The request builder for [DataplexService::delete_environment][crate::client::DataplexService::delete_environment] calls.
18083    ///
18084    /// # Example
18085    /// ```
18086    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteEnvironment;
18087    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18088    /// use google_cloud_lro::Poller;
18089    ///
18090    /// let builder = prepare_request_builder();
18091    /// let response = builder.poller().until_done().await?;
18092    /// # Ok(()) }
18093    ///
18094    /// fn prepare_request_builder() -> DeleteEnvironment {
18095    ///   # panic!();
18096    ///   // ... details omitted ...
18097    /// }
18098    /// ```
18099    #[derive(Clone, Debug)]
18100    pub struct DeleteEnvironment(RequestBuilder<crate::model::DeleteEnvironmentRequest>);
18101
18102    impl DeleteEnvironment {
18103        pub(crate) fn new(
18104            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18105        ) -> Self {
18106            Self(RequestBuilder::new(stub))
18107        }
18108
18109        /// Sets the full request, replacing any prior values.
18110        pub fn with_request<V: Into<crate::model::DeleteEnvironmentRequest>>(
18111            mut self,
18112            v: V,
18113        ) -> Self {
18114            self.0.request = v.into();
18115            self
18116        }
18117
18118        /// Sets all the options, replacing any prior values.
18119        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18120            self.0.options = v.into();
18121            self
18122        }
18123
18124        /// Sends the request.
18125        ///
18126        /// # Long running operations
18127        ///
18128        /// This starts, but does not poll, a longrunning operation. More information
18129        /// on [delete_environment][crate::client::DataplexService::delete_environment].
18130        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18131            (*self.0.stub)
18132                .delete_environment(self.0.request, self.0.options)
18133                .await
18134                .map(crate::Response::into_body)
18135        }
18136
18137        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_environment`.
18138        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
18139            type Operation =
18140                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
18141            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18142            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18143
18144            let stub = self.0.stub.clone();
18145            let mut options = self.0.options.clone();
18146            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18147            let query = move |name| {
18148                let stub = stub.clone();
18149                let options = options.clone();
18150                async {
18151                    let op = GetOperation::new(stub)
18152                        .set_name(name)
18153                        .with_options(options)
18154                        .send()
18155                        .await?;
18156                    Ok(Operation::new(op))
18157                }
18158            };
18159
18160            let start = move || async {
18161                let op = self.send().await?;
18162                Ok(Operation::new(op))
18163            };
18164
18165            google_cloud_lro::internal::new_unit_response_poller(
18166                polling_error_policy,
18167                polling_backoff_policy,
18168                start,
18169                query,
18170            )
18171        }
18172
18173        /// Sets the value of [name][crate::model::DeleteEnvironmentRequest::name].
18174        ///
18175        /// This is a **required** field for requests.
18176        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18177            self.0.request.name = v.into();
18178            self
18179        }
18180    }
18181
18182    #[doc(hidden)]
18183    impl crate::RequestBuilder for DeleteEnvironment {
18184        fn request_options(&mut self) -> &mut crate::RequestOptions {
18185            &mut self.0.options
18186        }
18187    }
18188
18189    /// The request builder for [DataplexService::list_environments][crate::client::DataplexService::list_environments] calls.
18190    ///
18191    /// # Example
18192    /// ```
18193    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListEnvironments;
18194    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18195    /// use google_cloud_gax::paginator::ItemPaginator;
18196    ///
18197    /// let builder = prepare_request_builder();
18198    /// let mut items = builder.by_item();
18199    /// while let Some(result) = items.next().await {
18200    ///   let item = result?;
18201    /// }
18202    /// # Ok(()) }
18203    ///
18204    /// fn prepare_request_builder() -> ListEnvironments {
18205    ///   # panic!();
18206    ///   // ... details omitted ...
18207    /// }
18208    /// ```
18209    #[derive(Clone, Debug)]
18210    pub struct ListEnvironments(RequestBuilder<crate::model::ListEnvironmentsRequest>);
18211
18212    impl ListEnvironments {
18213        pub(crate) fn new(
18214            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18215        ) -> Self {
18216            Self(RequestBuilder::new(stub))
18217        }
18218
18219        /// Sets the full request, replacing any prior values.
18220        pub fn with_request<V: Into<crate::model::ListEnvironmentsRequest>>(
18221            mut self,
18222            v: V,
18223        ) -> Self {
18224            self.0.request = v.into();
18225            self
18226        }
18227
18228        /// Sets all the options, replacing any prior values.
18229        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18230            self.0.options = v.into();
18231            self
18232        }
18233
18234        /// Sends the request.
18235        pub async fn send(self) -> Result<crate::model::ListEnvironmentsResponse> {
18236            (*self.0.stub)
18237                .list_environments(self.0.request, self.0.options)
18238                .await
18239                .map(crate::Response::into_body)
18240        }
18241
18242        /// Streams each page in the collection.
18243        pub fn by_page(
18244            self,
18245        ) -> impl google_cloud_gax::paginator::Paginator<
18246            crate::model::ListEnvironmentsResponse,
18247            crate::Error,
18248        > {
18249            use std::clone::Clone;
18250            let token = self.0.request.page_token.clone();
18251            let execute = move |token: String| {
18252                let mut builder = self.clone();
18253                builder.0.request = builder.0.request.set_page_token(token);
18254                builder.send()
18255            };
18256            google_cloud_gax::paginator::internal::new_paginator(token, execute)
18257        }
18258
18259        /// Streams each item in the collection.
18260        pub fn by_item(
18261            self,
18262        ) -> impl google_cloud_gax::paginator::ItemPaginator<
18263            crate::model::ListEnvironmentsResponse,
18264            crate::Error,
18265        > {
18266            use google_cloud_gax::paginator::Paginator;
18267            self.by_page().items()
18268        }
18269
18270        /// Sets the value of [parent][crate::model::ListEnvironmentsRequest::parent].
18271        ///
18272        /// This is a **required** field for requests.
18273        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18274            self.0.request.parent = v.into();
18275            self
18276        }
18277
18278        /// Sets the value of [page_size][crate::model::ListEnvironmentsRequest::page_size].
18279        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18280            self.0.request.page_size = v.into();
18281            self
18282        }
18283
18284        /// Sets the value of [page_token][crate::model::ListEnvironmentsRequest::page_token].
18285        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18286            self.0.request.page_token = v.into();
18287            self
18288        }
18289
18290        /// Sets the value of [filter][crate::model::ListEnvironmentsRequest::filter].
18291        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
18292            self.0.request.filter = v.into();
18293            self
18294        }
18295
18296        /// Sets the value of [order_by][crate::model::ListEnvironmentsRequest::order_by].
18297        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
18298            self.0.request.order_by = v.into();
18299            self
18300        }
18301    }
18302
18303    #[doc(hidden)]
18304    impl crate::RequestBuilder for ListEnvironments {
18305        fn request_options(&mut self) -> &mut crate::RequestOptions {
18306            &mut self.0.options
18307        }
18308    }
18309
18310    /// The request builder for [DataplexService::get_environment][crate::client::DataplexService::get_environment] calls.
18311    ///
18312    /// # Example
18313    /// ```
18314    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetEnvironment;
18315    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18316    ///
18317    /// let builder = prepare_request_builder();
18318    /// let response = builder.send().await?;
18319    /// # Ok(()) }
18320    ///
18321    /// fn prepare_request_builder() -> GetEnvironment {
18322    ///   # panic!();
18323    ///   // ... details omitted ...
18324    /// }
18325    /// ```
18326    #[derive(Clone, Debug)]
18327    pub struct GetEnvironment(RequestBuilder<crate::model::GetEnvironmentRequest>);
18328
18329    impl GetEnvironment {
18330        pub(crate) fn new(
18331            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18332        ) -> Self {
18333            Self(RequestBuilder::new(stub))
18334        }
18335
18336        /// Sets the full request, replacing any prior values.
18337        pub fn with_request<V: Into<crate::model::GetEnvironmentRequest>>(mut self, v: V) -> Self {
18338            self.0.request = v.into();
18339            self
18340        }
18341
18342        /// Sets all the options, replacing any prior values.
18343        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18344            self.0.options = v.into();
18345            self
18346        }
18347
18348        /// Sends the request.
18349        pub async fn send(self) -> Result<crate::model::Environment> {
18350            (*self.0.stub)
18351                .get_environment(self.0.request, self.0.options)
18352                .await
18353                .map(crate::Response::into_body)
18354        }
18355
18356        /// Sets the value of [name][crate::model::GetEnvironmentRequest::name].
18357        ///
18358        /// This is a **required** field for requests.
18359        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18360            self.0.request.name = v.into();
18361            self
18362        }
18363    }
18364
18365    #[doc(hidden)]
18366    impl crate::RequestBuilder for GetEnvironment {
18367        fn request_options(&mut self) -> &mut crate::RequestOptions {
18368            &mut self.0.options
18369        }
18370    }
18371
18372    /// The request builder for [DataplexService::list_sessions][crate::client::DataplexService::list_sessions] calls.
18373    ///
18374    /// # Example
18375    /// ```
18376    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListSessions;
18377    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18378    /// use google_cloud_gax::paginator::ItemPaginator;
18379    ///
18380    /// let builder = prepare_request_builder();
18381    /// let mut items = builder.by_item();
18382    /// while let Some(result) = items.next().await {
18383    ///   let item = result?;
18384    /// }
18385    /// # Ok(()) }
18386    ///
18387    /// fn prepare_request_builder() -> ListSessions {
18388    ///   # panic!();
18389    ///   // ... details omitted ...
18390    /// }
18391    /// ```
18392    #[derive(Clone, Debug)]
18393    pub struct ListSessions(RequestBuilder<crate::model::ListSessionsRequest>);
18394
18395    impl ListSessions {
18396        pub(crate) fn new(
18397            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18398        ) -> Self {
18399            Self(RequestBuilder::new(stub))
18400        }
18401
18402        /// Sets the full request, replacing any prior values.
18403        pub fn with_request<V: Into<crate::model::ListSessionsRequest>>(mut self, v: V) -> Self {
18404            self.0.request = v.into();
18405            self
18406        }
18407
18408        /// Sets all the options, replacing any prior values.
18409        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18410            self.0.options = v.into();
18411            self
18412        }
18413
18414        /// Sends the request.
18415        pub async fn send(self) -> Result<crate::model::ListSessionsResponse> {
18416            (*self.0.stub)
18417                .list_sessions(self.0.request, self.0.options)
18418                .await
18419                .map(crate::Response::into_body)
18420        }
18421
18422        /// Streams each page in the collection.
18423        pub fn by_page(
18424            self,
18425        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListSessionsResponse, crate::Error>
18426        {
18427            use std::clone::Clone;
18428            let token = self.0.request.page_token.clone();
18429            let execute = move |token: String| {
18430                let mut builder = self.clone();
18431                builder.0.request = builder.0.request.set_page_token(token);
18432                builder.send()
18433            };
18434            google_cloud_gax::paginator::internal::new_paginator(token, execute)
18435        }
18436
18437        /// Streams each item in the collection.
18438        pub fn by_item(
18439            self,
18440        ) -> impl google_cloud_gax::paginator::ItemPaginator<
18441            crate::model::ListSessionsResponse,
18442            crate::Error,
18443        > {
18444            use google_cloud_gax::paginator::Paginator;
18445            self.by_page().items()
18446        }
18447
18448        /// Sets the value of [parent][crate::model::ListSessionsRequest::parent].
18449        ///
18450        /// This is a **required** field for requests.
18451        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18452            self.0.request.parent = v.into();
18453            self
18454        }
18455
18456        /// Sets the value of [page_size][crate::model::ListSessionsRequest::page_size].
18457        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18458            self.0.request.page_size = v.into();
18459            self
18460        }
18461
18462        /// Sets the value of [page_token][crate::model::ListSessionsRequest::page_token].
18463        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18464            self.0.request.page_token = v.into();
18465            self
18466        }
18467
18468        /// Sets the value of [filter][crate::model::ListSessionsRequest::filter].
18469        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
18470            self.0.request.filter = v.into();
18471            self
18472        }
18473    }
18474
18475    #[doc(hidden)]
18476    impl crate::RequestBuilder for ListSessions {
18477        fn request_options(&mut self) -> &mut crate::RequestOptions {
18478            &mut self.0.options
18479        }
18480    }
18481
18482    /// The request builder for [DataplexService::list_locations][crate::client::DataplexService::list_locations] calls.
18483    ///
18484    /// # Example
18485    /// ```
18486    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListLocations;
18487    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18488    /// use google_cloud_gax::paginator::ItemPaginator;
18489    ///
18490    /// let builder = prepare_request_builder();
18491    /// let mut items = builder.by_item();
18492    /// while let Some(result) = items.next().await {
18493    ///   let item = result?;
18494    /// }
18495    /// # Ok(()) }
18496    ///
18497    /// fn prepare_request_builder() -> ListLocations {
18498    ///   # panic!();
18499    ///   // ... details omitted ...
18500    /// }
18501    /// ```
18502    #[derive(Clone, Debug)]
18503    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
18504
18505    impl ListLocations {
18506        pub(crate) fn new(
18507            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18508        ) -> Self {
18509            Self(RequestBuilder::new(stub))
18510        }
18511
18512        /// Sets the full request, replacing any prior values.
18513        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
18514            mut self,
18515            v: V,
18516        ) -> Self {
18517            self.0.request = v.into();
18518            self
18519        }
18520
18521        /// Sets all the options, replacing any prior values.
18522        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18523            self.0.options = v.into();
18524            self
18525        }
18526
18527        /// Sends the request.
18528        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
18529            (*self.0.stub)
18530                .list_locations(self.0.request, self.0.options)
18531                .await
18532                .map(crate::Response::into_body)
18533        }
18534
18535        /// Streams each page in the collection.
18536        pub fn by_page(
18537            self,
18538        ) -> impl google_cloud_gax::paginator::Paginator<
18539            google_cloud_location::model::ListLocationsResponse,
18540            crate::Error,
18541        > {
18542            use std::clone::Clone;
18543            let token = self.0.request.page_token.clone();
18544            let execute = move |token: String| {
18545                let mut builder = self.clone();
18546                builder.0.request = builder.0.request.set_page_token(token);
18547                builder.send()
18548            };
18549            google_cloud_gax::paginator::internal::new_paginator(token, execute)
18550        }
18551
18552        /// Streams each item in the collection.
18553        pub fn by_item(
18554            self,
18555        ) -> impl google_cloud_gax::paginator::ItemPaginator<
18556            google_cloud_location::model::ListLocationsResponse,
18557            crate::Error,
18558        > {
18559            use google_cloud_gax::paginator::Paginator;
18560            self.by_page().items()
18561        }
18562
18563        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
18564        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18565            self.0.request.name = v.into();
18566            self
18567        }
18568
18569        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
18570        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
18571            self.0.request.filter = v.into();
18572            self
18573        }
18574
18575        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
18576        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18577            self.0.request.page_size = v.into();
18578            self
18579        }
18580
18581        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
18582        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18583            self.0.request.page_token = v.into();
18584            self
18585        }
18586    }
18587
18588    #[doc(hidden)]
18589    impl crate::RequestBuilder for ListLocations {
18590        fn request_options(&mut self) -> &mut crate::RequestOptions {
18591            &mut self.0.options
18592        }
18593    }
18594
18595    /// The request builder for [DataplexService::get_location][crate::client::DataplexService::get_location] calls.
18596    ///
18597    /// # Example
18598    /// ```
18599    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetLocation;
18600    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18601    ///
18602    /// let builder = prepare_request_builder();
18603    /// let response = builder.send().await?;
18604    /// # Ok(()) }
18605    ///
18606    /// fn prepare_request_builder() -> GetLocation {
18607    ///   # panic!();
18608    ///   // ... details omitted ...
18609    /// }
18610    /// ```
18611    #[derive(Clone, Debug)]
18612    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
18613
18614    impl GetLocation {
18615        pub(crate) fn new(
18616            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18617        ) -> Self {
18618            Self(RequestBuilder::new(stub))
18619        }
18620
18621        /// Sets the full request, replacing any prior values.
18622        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
18623            mut self,
18624            v: V,
18625        ) -> Self {
18626            self.0.request = v.into();
18627            self
18628        }
18629
18630        /// Sets all the options, replacing any prior values.
18631        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18632            self.0.options = v.into();
18633            self
18634        }
18635
18636        /// Sends the request.
18637        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
18638            (*self.0.stub)
18639                .get_location(self.0.request, self.0.options)
18640                .await
18641                .map(crate::Response::into_body)
18642        }
18643
18644        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
18645        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18646            self.0.request.name = v.into();
18647            self
18648        }
18649    }
18650
18651    #[doc(hidden)]
18652    impl crate::RequestBuilder for GetLocation {
18653        fn request_options(&mut self) -> &mut crate::RequestOptions {
18654            &mut self.0.options
18655        }
18656    }
18657
18658    /// The request builder for [DataplexService::set_iam_policy][crate::client::DataplexService::set_iam_policy] calls.
18659    ///
18660    /// # Example
18661    /// ```
18662    /// # use google_cloud_dataplex_v1::builder::dataplex_service::SetIamPolicy;
18663    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18664    ///
18665    /// let builder = prepare_request_builder();
18666    /// let response = builder.send().await?;
18667    /// # Ok(()) }
18668    ///
18669    /// fn prepare_request_builder() -> SetIamPolicy {
18670    ///   # panic!();
18671    ///   // ... details omitted ...
18672    /// }
18673    /// ```
18674    #[derive(Clone, Debug)]
18675    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
18676
18677    impl SetIamPolicy {
18678        pub(crate) fn new(
18679            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18680        ) -> Self {
18681            Self(RequestBuilder::new(stub))
18682        }
18683
18684        /// Sets the full request, replacing any prior values.
18685        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
18686            mut self,
18687            v: V,
18688        ) -> Self {
18689            self.0.request = v.into();
18690            self
18691        }
18692
18693        /// Sets all the options, replacing any prior values.
18694        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18695            self.0.options = v.into();
18696            self
18697        }
18698
18699        /// Sends the request.
18700        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
18701            (*self.0.stub)
18702                .set_iam_policy(self.0.request, self.0.options)
18703                .await
18704                .map(crate::Response::into_body)
18705        }
18706
18707        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
18708        ///
18709        /// This is a **required** field for requests.
18710        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
18711            self.0.request.resource = v.into();
18712            self
18713        }
18714
18715        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
18716        ///
18717        /// This is a **required** field for requests.
18718        pub fn set_policy<T>(mut self, v: T) -> Self
18719        where
18720            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
18721        {
18722            self.0.request.policy = std::option::Option::Some(v.into());
18723            self
18724        }
18725
18726        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
18727        ///
18728        /// This is a **required** field for requests.
18729        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
18730        where
18731            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
18732        {
18733            self.0.request.policy = v.map(|x| x.into());
18734            self
18735        }
18736
18737        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
18738        pub fn set_update_mask<T>(mut self, v: T) -> Self
18739        where
18740            T: std::convert::Into<wkt::FieldMask>,
18741        {
18742            self.0.request.update_mask = std::option::Option::Some(v.into());
18743            self
18744        }
18745
18746        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
18747        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
18748        where
18749            T: std::convert::Into<wkt::FieldMask>,
18750        {
18751            self.0.request.update_mask = v.map(|x| x.into());
18752            self
18753        }
18754    }
18755
18756    #[doc(hidden)]
18757    impl crate::RequestBuilder for SetIamPolicy {
18758        fn request_options(&mut self) -> &mut crate::RequestOptions {
18759            &mut self.0.options
18760        }
18761    }
18762
18763    /// The request builder for [DataplexService::get_iam_policy][crate::client::DataplexService::get_iam_policy] calls.
18764    ///
18765    /// # Example
18766    /// ```
18767    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetIamPolicy;
18768    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18769    ///
18770    /// let builder = prepare_request_builder();
18771    /// let response = builder.send().await?;
18772    /// # Ok(()) }
18773    ///
18774    /// fn prepare_request_builder() -> GetIamPolicy {
18775    ///   # panic!();
18776    ///   // ... details omitted ...
18777    /// }
18778    /// ```
18779    #[derive(Clone, Debug)]
18780    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
18781
18782    impl GetIamPolicy {
18783        pub(crate) fn new(
18784            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18785        ) -> Self {
18786            Self(RequestBuilder::new(stub))
18787        }
18788
18789        /// Sets the full request, replacing any prior values.
18790        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
18791            mut self,
18792            v: V,
18793        ) -> Self {
18794            self.0.request = v.into();
18795            self
18796        }
18797
18798        /// Sets all the options, replacing any prior values.
18799        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18800            self.0.options = v.into();
18801            self
18802        }
18803
18804        /// Sends the request.
18805        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
18806            (*self.0.stub)
18807                .get_iam_policy(self.0.request, self.0.options)
18808                .await
18809                .map(crate::Response::into_body)
18810        }
18811
18812        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
18813        ///
18814        /// This is a **required** field for requests.
18815        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
18816            self.0.request.resource = v.into();
18817            self
18818        }
18819
18820        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
18821        pub fn set_options<T>(mut self, v: T) -> Self
18822        where
18823            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
18824        {
18825            self.0.request.options = std::option::Option::Some(v.into());
18826            self
18827        }
18828
18829        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
18830        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
18831        where
18832            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
18833        {
18834            self.0.request.options = v.map(|x| x.into());
18835            self
18836        }
18837    }
18838
18839    #[doc(hidden)]
18840    impl crate::RequestBuilder for GetIamPolicy {
18841        fn request_options(&mut self) -> &mut crate::RequestOptions {
18842            &mut self.0.options
18843        }
18844    }
18845
18846    /// The request builder for [DataplexService::test_iam_permissions][crate::client::DataplexService::test_iam_permissions] calls.
18847    ///
18848    /// # Example
18849    /// ```
18850    /// # use google_cloud_dataplex_v1::builder::dataplex_service::TestIamPermissions;
18851    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18852    ///
18853    /// let builder = prepare_request_builder();
18854    /// let response = builder.send().await?;
18855    /// # Ok(()) }
18856    ///
18857    /// fn prepare_request_builder() -> TestIamPermissions {
18858    ///   # panic!();
18859    ///   // ... details omitted ...
18860    /// }
18861    /// ```
18862    #[derive(Clone, Debug)]
18863    pub struct TestIamPermissions(
18864        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
18865    );
18866
18867    impl TestIamPermissions {
18868        pub(crate) fn new(
18869            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18870        ) -> Self {
18871            Self(RequestBuilder::new(stub))
18872        }
18873
18874        /// Sets the full request, replacing any prior values.
18875        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
18876            mut self,
18877            v: V,
18878        ) -> Self {
18879            self.0.request = v.into();
18880            self
18881        }
18882
18883        /// Sets all the options, replacing any prior values.
18884        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18885            self.0.options = v.into();
18886            self
18887        }
18888
18889        /// Sends the request.
18890        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
18891            (*self.0.stub)
18892                .test_iam_permissions(self.0.request, self.0.options)
18893                .await
18894                .map(crate::Response::into_body)
18895        }
18896
18897        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
18898        ///
18899        /// This is a **required** field for requests.
18900        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
18901            self.0.request.resource = v.into();
18902            self
18903        }
18904
18905        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
18906        ///
18907        /// This is a **required** field for requests.
18908        pub fn set_permissions<T, V>(mut self, v: T) -> Self
18909        where
18910            T: std::iter::IntoIterator<Item = V>,
18911            V: std::convert::Into<std::string::String>,
18912        {
18913            use std::iter::Iterator;
18914            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
18915            self
18916        }
18917    }
18918
18919    #[doc(hidden)]
18920    impl crate::RequestBuilder for TestIamPermissions {
18921        fn request_options(&mut self) -> &mut crate::RequestOptions {
18922            &mut self.0.options
18923        }
18924    }
18925
18926    /// The request builder for [DataplexService::list_operations][crate::client::DataplexService::list_operations] calls.
18927    ///
18928    /// # Example
18929    /// ```
18930    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListOperations;
18931    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18932    /// use google_cloud_gax::paginator::ItemPaginator;
18933    ///
18934    /// let builder = prepare_request_builder();
18935    /// let mut items = builder.by_item();
18936    /// while let Some(result) = items.next().await {
18937    ///   let item = result?;
18938    /// }
18939    /// # Ok(()) }
18940    ///
18941    /// fn prepare_request_builder() -> ListOperations {
18942    ///   # panic!();
18943    ///   // ... details omitted ...
18944    /// }
18945    /// ```
18946    #[derive(Clone, Debug)]
18947    pub struct ListOperations(
18948        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
18949    );
18950
18951    impl ListOperations {
18952        pub(crate) fn new(
18953            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18954        ) -> Self {
18955            Self(RequestBuilder::new(stub))
18956        }
18957
18958        /// Sets the full request, replacing any prior values.
18959        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
18960            mut self,
18961            v: V,
18962        ) -> Self {
18963            self.0.request = v.into();
18964            self
18965        }
18966
18967        /// Sets all the options, replacing any prior values.
18968        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18969            self.0.options = v.into();
18970            self
18971        }
18972
18973        /// Sends the request.
18974        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
18975            (*self.0.stub)
18976                .list_operations(self.0.request, self.0.options)
18977                .await
18978                .map(crate::Response::into_body)
18979        }
18980
18981        /// Streams each page in the collection.
18982        pub fn by_page(
18983            self,
18984        ) -> impl google_cloud_gax::paginator::Paginator<
18985            google_cloud_longrunning::model::ListOperationsResponse,
18986            crate::Error,
18987        > {
18988            use std::clone::Clone;
18989            let token = self.0.request.page_token.clone();
18990            let execute = move |token: String| {
18991                let mut builder = self.clone();
18992                builder.0.request = builder.0.request.set_page_token(token);
18993                builder.send()
18994            };
18995            google_cloud_gax::paginator::internal::new_paginator(token, execute)
18996        }
18997
18998        /// Streams each item in the collection.
18999        pub fn by_item(
19000            self,
19001        ) -> impl google_cloud_gax::paginator::ItemPaginator<
19002            google_cloud_longrunning::model::ListOperationsResponse,
19003            crate::Error,
19004        > {
19005            use google_cloud_gax::paginator::Paginator;
19006            self.by_page().items()
19007        }
19008
19009        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
19010        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19011            self.0.request.name = v.into();
19012            self
19013        }
19014
19015        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
19016        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
19017            self.0.request.filter = v.into();
19018            self
19019        }
19020
19021        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
19022        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
19023            self.0.request.page_size = v.into();
19024            self
19025        }
19026
19027        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
19028        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
19029            self.0.request.page_token = v.into();
19030            self
19031        }
19032
19033        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
19034        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
19035            self.0.request.return_partial_success = v.into();
19036            self
19037        }
19038    }
19039
19040    #[doc(hidden)]
19041    impl crate::RequestBuilder for ListOperations {
19042        fn request_options(&mut self) -> &mut crate::RequestOptions {
19043            &mut self.0.options
19044        }
19045    }
19046
19047    /// The request builder for [DataplexService::get_operation][crate::client::DataplexService::get_operation] calls.
19048    ///
19049    /// # Example
19050    /// ```
19051    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetOperation;
19052    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19053    ///
19054    /// let builder = prepare_request_builder();
19055    /// let response = builder.send().await?;
19056    /// # Ok(()) }
19057    ///
19058    /// fn prepare_request_builder() -> GetOperation {
19059    ///   # panic!();
19060    ///   // ... details omitted ...
19061    /// }
19062    /// ```
19063    #[derive(Clone, Debug)]
19064    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
19065
19066    impl GetOperation {
19067        pub(crate) fn new(
19068            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19069        ) -> Self {
19070            Self(RequestBuilder::new(stub))
19071        }
19072
19073        /// Sets the full request, replacing any prior values.
19074        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
19075            mut self,
19076            v: V,
19077        ) -> Self {
19078            self.0.request = v.into();
19079            self
19080        }
19081
19082        /// Sets all the options, replacing any prior values.
19083        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19084            self.0.options = v.into();
19085            self
19086        }
19087
19088        /// Sends the request.
19089        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19090            (*self.0.stub)
19091                .get_operation(self.0.request, self.0.options)
19092                .await
19093                .map(crate::Response::into_body)
19094        }
19095
19096        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
19097        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19098            self.0.request.name = v.into();
19099            self
19100        }
19101    }
19102
19103    #[doc(hidden)]
19104    impl crate::RequestBuilder for GetOperation {
19105        fn request_options(&mut self) -> &mut crate::RequestOptions {
19106            &mut self.0.options
19107        }
19108    }
19109
19110    /// The request builder for [DataplexService::delete_operation][crate::client::DataplexService::delete_operation] calls.
19111    ///
19112    /// # Example
19113    /// ```
19114    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteOperation;
19115    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19116    ///
19117    /// let builder = prepare_request_builder();
19118    /// let response = builder.send().await?;
19119    /// # Ok(()) }
19120    ///
19121    /// fn prepare_request_builder() -> DeleteOperation {
19122    ///   # panic!();
19123    ///   // ... details omitted ...
19124    /// }
19125    /// ```
19126    #[derive(Clone, Debug)]
19127    pub struct DeleteOperation(
19128        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
19129    );
19130
19131    impl DeleteOperation {
19132        pub(crate) fn new(
19133            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19134        ) -> Self {
19135            Self(RequestBuilder::new(stub))
19136        }
19137
19138        /// Sets the full request, replacing any prior values.
19139        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
19140            mut self,
19141            v: V,
19142        ) -> Self {
19143            self.0.request = v.into();
19144            self
19145        }
19146
19147        /// Sets all the options, replacing any prior values.
19148        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19149            self.0.options = v.into();
19150            self
19151        }
19152
19153        /// Sends the request.
19154        pub async fn send(self) -> Result<()> {
19155            (*self.0.stub)
19156                .delete_operation(self.0.request, self.0.options)
19157                .await
19158                .map(crate::Response::into_body)
19159        }
19160
19161        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
19162        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19163            self.0.request.name = v.into();
19164            self
19165        }
19166    }
19167
19168    #[doc(hidden)]
19169    impl crate::RequestBuilder for DeleteOperation {
19170        fn request_options(&mut self) -> &mut crate::RequestOptions {
19171            &mut self.0.options
19172        }
19173    }
19174
19175    /// The request builder for [DataplexService::cancel_operation][crate::client::DataplexService::cancel_operation] calls.
19176    ///
19177    /// # Example
19178    /// ```
19179    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CancelOperation;
19180    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19181    ///
19182    /// let builder = prepare_request_builder();
19183    /// let response = builder.send().await?;
19184    /// # Ok(()) }
19185    ///
19186    /// fn prepare_request_builder() -> CancelOperation {
19187    ///   # panic!();
19188    ///   // ... details omitted ...
19189    /// }
19190    /// ```
19191    #[derive(Clone, Debug)]
19192    pub struct CancelOperation(
19193        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
19194    );
19195
19196    impl CancelOperation {
19197        pub(crate) fn new(
19198            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19199        ) -> Self {
19200            Self(RequestBuilder::new(stub))
19201        }
19202
19203        /// Sets the full request, replacing any prior values.
19204        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
19205            mut self,
19206            v: V,
19207        ) -> Self {
19208            self.0.request = v.into();
19209            self
19210        }
19211
19212        /// Sets all the options, replacing any prior values.
19213        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19214            self.0.options = v.into();
19215            self
19216        }
19217
19218        /// Sends the request.
19219        pub async fn send(self) -> Result<()> {
19220            (*self.0.stub)
19221                .cancel_operation(self.0.request, self.0.options)
19222                .await
19223                .map(crate::Response::into_body)
19224        }
19225
19226        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
19227        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19228            self.0.request.name = v.into();
19229            self
19230        }
19231    }
19232
19233    #[doc(hidden)]
19234    impl crate::RequestBuilder for CancelOperation {
19235        fn request_options(&mut self) -> &mut crate::RequestOptions {
19236            &mut self.0.options
19237        }
19238    }
19239}