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
17/// Request and client builders for [BusinessGlossaryService][crate::client::BusinessGlossaryService].
18pub mod business_glossary_service {
19    use crate::Result;
20
21    /// A builder for [BusinessGlossaryService][crate::client::BusinessGlossaryService].
22    ///
23    /// ```
24    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
25    /// # use google_cloud_dataplex_v1::*;
26    /// # use builder::business_glossary_service::ClientBuilder;
27    /// # use client::BusinessGlossaryService;
28    /// let builder : ClientBuilder = BusinessGlossaryService::builder();
29    /// let client = builder
30    ///     .with_endpoint("https://dataplex.googleapis.com")
31    ///     .build().await?;
32    /// # Ok(()) }
33    /// ```
34    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36    pub(crate) mod client {
37        use super::super::super::client::BusinessGlossaryService;
38        pub struct Factory;
39        impl crate::ClientFactory for Factory {
40            type Client = BusinessGlossaryService;
41            type Credentials = gaxi::options::Credentials;
42            async fn build(
43                self,
44                config: gaxi::options::ClientConfig,
45            ) -> crate::ClientBuilderResult<Self::Client> {
46                Self::Client::new(config).await
47            }
48        }
49    }
50
51    /// Common implementation for [crate::client::BusinessGlossaryService] request builders.
52    #[derive(Clone, Debug)]
53    pub(crate) struct RequestBuilder<R: std::default::Default> {
54        stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
55        request: R,
56        options: crate::RequestOptions,
57    }
58
59    impl<R> RequestBuilder<R>
60    where
61        R: std::default::Default,
62    {
63        pub(crate) fn new(
64            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
65        ) -> Self {
66            Self {
67                stub,
68                request: R::default(),
69                options: crate::RequestOptions::default(),
70            }
71        }
72    }
73
74    /// The request builder for [BusinessGlossaryService::create_glossary][crate::client::BusinessGlossaryService::create_glossary] calls.
75    ///
76    /// # Example
77    /// ```
78    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CreateGlossary;
79    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
80    /// use google_cloud_lro::Poller;
81    ///
82    /// let builder = prepare_request_builder();
83    /// let response = builder.poller().until_done().await?;
84    /// # Ok(()) }
85    ///
86    /// fn prepare_request_builder() -> CreateGlossary {
87    ///   # panic!();
88    ///   // ... details omitted ...
89    /// }
90    /// ```
91    #[derive(Clone, Debug)]
92    pub struct CreateGlossary(RequestBuilder<crate::model::CreateGlossaryRequest>);
93
94    impl CreateGlossary {
95        pub(crate) fn new(
96            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
97        ) -> Self {
98            Self(RequestBuilder::new(stub))
99        }
100
101        /// Sets the full request, replacing any prior values.
102        pub fn with_request<V: Into<crate::model::CreateGlossaryRequest>>(mut self, v: V) -> Self {
103            self.0.request = v.into();
104            self
105        }
106
107        /// Sets all the options, replacing any prior values.
108        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
109            self.0.options = v.into();
110            self
111        }
112
113        /// Sends the request.
114        ///
115        /// # Long running operations
116        ///
117        /// This starts, but does not poll, a longrunning operation. More information
118        /// on [create_glossary][crate::client::BusinessGlossaryService::create_glossary].
119        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
120            (*self.0.stub)
121                .create_glossary(self.0.request, self.0.options)
122                .await
123                .map(crate::Response::into_body)
124        }
125
126        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_glossary`.
127        pub fn poller(
128            self,
129        ) -> impl google_cloud_lro::Poller<crate::model::Glossary, crate::model::OperationMetadata>
130        {
131            type Operation = google_cloud_lro::internal::Operation<
132                crate::model::Glossary,
133                crate::model::OperationMetadata,
134            >;
135            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
136            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
137
138            let stub = self.0.stub.clone();
139            let mut options = self.0.options.clone();
140            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
141            let query = move |name| {
142                let stub = stub.clone();
143                let options = options.clone();
144                async {
145                    let op = GetOperation::new(stub)
146                        .set_name(name)
147                        .with_options(options)
148                        .send()
149                        .await?;
150                    Ok(Operation::new(op))
151                }
152            };
153
154            let start = move || async {
155                let op = self.send().await?;
156                Ok(Operation::new(op))
157            };
158
159            google_cloud_lro::internal::new_poller(
160                polling_error_policy,
161                polling_backoff_policy,
162                start,
163                query,
164            )
165        }
166
167        /// Sets the value of [parent][crate::model::CreateGlossaryRequest::parent].
168        ///
169        /// This is a **required** field for requests.
170        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
171            self.0.request.parent = v.into();
172            self
173        }
174
175        /// Sets the value of [glossary_id][crate::model::CreateGlossaryRequest::glossary_id].
176        ///
177        /// This is a **required** field for requests.
178        pub fn set_glossary_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
179            self.0.request.glossary_id = v.into();
180            self
181        }
182
183        /// Sets the value of [glossary][crate::model::CreateGlossaryRequest::glossary].
184        ///
185        /// This is a **required** field for requests.
186        pub fn set_glossary<T>(mut self, v: T) -> Self
187        where
188            T: std::convert::Into<crate::model::Glossary>,
189        {
190            self.0.request.glossary = std::option::Option::Some(v.into());
191            self
192        }
193
194        /// Sets or clears the value of [glossary][crate::model::CreateGlossaryRequest::glossary].
195        ///
196        /// This is a **required** field for requests.
197        pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
198        where
199            T: std::convert::Into<crate::model::Glossary>,
200        {
201            self.0.request.glossary = v.map(|x| x.into());
202            self
203        }
204
205        /// Sets the value of [validate_only][crate::model::CreateGlossaryRequest::validate_only].
206        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
207            self.0.request.validate_only = v.into();
208            self
209        }
210    }
211
212    #[doc(hidden)]
213    impl crate::RequestBuilder for CreateGlossary {
214        fn request_options(&mut self) -> &mut crate::RequestOptions {
215            &mut self.0.options
216        }
217    }
218
219    /// The request builder for [BusinessGlossaryService::update_glossary][crate::client::BusinessGlossaryService::update_glossary] calls.
220    ///
221    /// # Example
222    /// ```
223    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::UpdateGlossary;
224    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
225    /// use google_cloud_lro::Poller;
226    ///
227    /// let builder = prepare_request_builder();
228    /// let response = builder.poller().until_done().await?;
229    /// # Ok(()) }
230    ///
231    /// fn prepare_request_builder() -> UpdateGlossary {
232    ///   # panic!();
233    ///   // ... details omitted ...
234    /// }
235    /// ```
236    #[derive(Clone, Debug)]
237    pub struct UpdateGlossary(RequestBuilder<crate::model::UpdateGlossaryRequest>);
238
239    impl UpdateGlossary {
240        pub(crate) fn new(
241            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
242        ) -> Self {
243            Self(RequestBuilder::new(stub))
244        }
245
246        /// Sets the full request, replacing any prior values.
247        pub fn with_request<V: Into<crate::model::UpdateGlossaryRequest>>(mut self, v: V) -> Self {
248            self.0.request = v.into();
249            self
250        }
251
252        /// Sets all the options, replacing any prior values.
253        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
254            self.0.options = v.into();
255            self
256        }
257
258        /// Sends the request.
259        ///
260        /// # Long running operations
261        ///
262        /// This starts, but does not poll, a longrunning operation. More information
263        /// on [update_glossary][crate::client::BusinessGlossaryService::update_glossary].
264        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
265            (*self.0.stub)
266                .update_glossary(self.0.request, self.0.options)
267                .await
268                .map(crate::Response::into_body)
269        }
270
271        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_glossary`.
272        pub fn poller(
273            self,
274        ) -> impl google_cloud_lro::Poller<crate::model::Glossary, crate::model::OperationMetadata>
275        {
276            type Operation = google_cloud_lro::internal::Operation<
277                crate::model::Glossary,
278                crate::model::OperationMetadata,
279            >;
280            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
281            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
282
283            let stub = self.0.stub.clone();
284            let mut options = self.0.options.clone();
285            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
286            let query = move |name| {
287                let stub = stub.clone();
288                let options = options.clone();
289                async {
290                    let op = GetOperation::new(stub)
291                        .set_name(name)
292                        .with_options(options)
293                        .send()
294                        .await?;
295                    Ok(Operation::new(op))
296                }
297            };
298
299            let start = move || async {
300                let op = self.send().await?;
301                Ok(Operation::new(op))
302            };
303
304            google_cloud_lro::internal::new_poller(
305                polling_error_policy,
306                polling_backoff_policy,
307                start,
308                query,
309            )
310        }
311
312        /// Sets the value of [glossary][crate::model::UpdateGlossaryRequest::glossary].
313        ///
314        /// This is a **required** field for requests.
315        pub fn set_glossary<T>(mut self, v: T) -> Self
316        where
317            T: std::convert::Into<crate::model::Glossary>,
318        {
319            self.0.request.glossary = std::option::Option::Some(v.into());
320            self
321        }
322
323        /// Sets or clears the value of [glossary][crate::model::UpdateGlossaryRequest::glossary].
324        ///
325        /// This is a **required** field for requests.
326        pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
327        where
328            T: std::convert::Into<crate::model::Glossary>,
329        {
330            self.0.request.glossary = v.map(|x| x.into());
331            self
332        }
333
334        /// Sets the value of [update_mask][crate::model::UpdateGlossaryRequest::update_mask].
335        ///
336        /// This is a **required** field for requests.
337        pub fn set_update_mask<T>(mut self, v: T) -> Self
338        where
339            T: std::convert::Into<wkt::FieldMask>,
340        {
341            self.0.request.update_mask = std::option::Option::Some(v.into());
342            self
343        }
344
345        /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryRequest::update_mask].
346        ///
347        /// This is a **required** field for requests.
348        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
349        where
350            T: std::convert::Into<wkt::FieldMask>,
351        {
352            self.0.request.update_mask = v.map(|x| x.into());
353            self
354        }
355
356        /// Sets the value of [validate_only][crate::model::UpdateGlossaryRequest::validate_only].
357        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
358            self.0.request.validate_only = v.into();
359            self
360        }
361    }
362
363    #[doc(hidden)]
364    impl crate::RequestBuilder for UpdateGlossary {
365        fn request_options(&mut self) -> &mut crate::RequestOptions {
366            &mut self.0.options
367        }
368    }
369
370    /// The request builder for [BusinessGlossaryService::delete_glossary][crate::client::BusinessGlossaryService::delete_glossary] calls.
371    ///
372    /// # Example
373    /// ```
374    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteGlossary;
375    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
376    /// use google_cloud_lro::Poller;
377    ///
378    /// let builder = prepare_request_builder();
379    /// let response = builder.poller().until_done().await?;
380    /// # Ok(()) }
381    ///
382    /// fn prepare_request_builder() -> DeleteGlossary {
383    ///   # panic!();
384    ///   // ... details omitted ...
385    /// }
386    /// ```
387    #[derive(Clone, Debug)]
388    pub struct DeleteGlossary(RequestBuilder<crate::model::DeleteGlossaryRequest>);
389
390    impl DeleteGlossary {
391        pub(crate) fn new(
392            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
393        ) -> Self {
394            Self(RequestBuilder::new(stub))
395        }
396
397        /// Sets the full request, replacing any prior values.
398        pub fn with_request<V: Into<crate::model::DeleteGlossaryRequest>>(mut self, v: V) -> Self {
399            self.0.request = v.into();
400            self
401        }
402
403        /// Sets all the options, replacing any prior values.
404        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
405            self.0.options = v.into();
406            self
407        }
408
409        /// Sends the request.
410        ///
411        /// # Long running operations
412        ///
413        /// This starts, but does not poll, a longrunning operation. More information
414        /// on [delete_glossary][crate::client::BusinessGlossaryService::delete_glossary].
415        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
416            (*self.0.stub)
417                .delete_glossary(self.0.request, self.0.options)
418                .await
419                .map(crate::Response::into_body)
420        }
421
422        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_glossary`.
423        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
424            type Operation =
425                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
426            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
427            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
428
429            let stub = self.0.stub.clone();
430            let mut options = self.0.options.clone();
431            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
432            let query = move |name| {
433                let stub = stub.clone();
434                let options = options.clone();
435                async {
436                    let op = GetOperation::new(stub)
437                        .set_name(name)
438                        .with_options(options)
439                        .send()
440                        .await?;
441                    Ok(Operation::new(op))
442                }
443            };
444
445            let start = move || async {
446                let op = self.send().await?;
447                Ok(Operation::new(op))
448            };
449
450            google_cloud_lro::internal::new_unit_response_poller(
451                polling_error_policy,
452                polling_backoff_policy,
453                start,
454                query,
455            )
456        }
457
458        /// Sets the value of [name][crate::model::DeleteGlossaryRequest::name].
459        ///
460        /// This is a **required** field for requests.
461        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
462            self.0.request.name = v.into();
463            self
464        }
465
466        /// Sets the value of [etag][crate::model::DeleteGlossaryRequest::etag].
467        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
468            self.0.request.etag = v.into();
469            self
470        }
471    }
472
473    #[doc(hidden)]
474    impl crate::RequestBuilder for DeleteGlossary {
475        fn request_options(&mut self) -> &mut crate::RequestOptions {
476            &mut self.0.options
477        }
478    }
479
480    /// The request builder for [BusinessGlossaryService::get_glossary][crate::client::BusinessGlossaryService::get_glossary] calls.
481    ///
482    /// # Example
483    /// ```
484    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetGlossary;
485    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
486    ///
487    /// let builder = prepare_request_builder();
488    /// let response = builder.send().await?;
489    /// # Ok(()) }
490    ///
491    /// fn prepare_request_builder() -> GetGlossary {
492    ///   # panic!();
493    ///   // ... details omitted ...
494    /// }
495    /// ```
496    #[derive(Clone, Debug)]
497    pub struct GetGlossary(RequestBuilder<crate::model::GetGlossaryRequest>);
498
499    impl GetGlossary {
500        pub(crate) fn new(
501            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
502        ) -> Self {
503            Self(RequestBuilder::new(stub))
504        }
505
506        /// Sets the full request, replacing any prior values.
507        pub fn with_request<V: Into<crate::model::GetGlossaryRequest>>(mut self, v: V) -> Self {
508            self.0.request = v.into();
509            self
510        }
511
512        /// Sets all the options, replacing any prior values.
513        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
514            self.0.options = v.into();
515            self
516        }
517
518        /// Sends the request.
519        pub async fn send(self) -> Result<crate::model::Glossary> {
520            (*self.0.stub)
521                .get_glossary(self.0.request, self.0.options)
522                .await
523                .map(crate::Response::into_body)
524        }
525
526        /// Sets the value of [name][crate::model::GetGlossaryRequest::name].
527        ///
528        /// This is a **required** field for requests.
529        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
530            self.0.request.name = v.into();
531            self
532        }
533    }
534
535    #[doc(hidden)]
536    impl crate::RequestBuilder for GetGlossary {
537        fn request_options(&mut self) -> &mut crate::RequestOptions {
538            &mut self.0.options
539        }
540    }
541
542    /// The request builder for [BusinessGlossaryService::list_glossaries][crate::client::BusinessGlossaryService::list_glossaries] calls.
543    ///
544    /// # Example
545    /// ```
546    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListGlossaries;
547    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
548    /// use google_cloud_gax::paginator::ItemPaginator;
549    ///
550    /// let builder = prepare_request_builder();
551    /// let mut items = builder.by_item();
552    /// while let Some(result) = items.next().await {
553    ///   let item = result?;
554    /// }
555    /// # Ok(()) }
556    ///
557    /// fn prepare_request_builder() -> ListGlossaries {
558    ///   # panic!();
559    ///   // ... details omitted ...
560    /// }
561    /// ```
562    #[derive(Clone, Debug)]
563    pub struct ListGlossaries(RequestBuilder<crate::model::ListGlossariesRequest>);
564
565    impl ListGlossaries {
566        pub(crate) fn new(
567            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
568        ) -> Self {
569            Self(RequestBuilder::new(stub))
570        }
571
572        /// Sets the full request, replacing any prior values.
573        pub fn with_request<V: Into<crate::model::ListGlossariesRequest>>(mut self, v: V) -> Self {
574            self.0.request = v.into();
575            self
576        }
577
578        /// Sets all the options, replacing any prior values.
579        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
580            self.0.options = v.into();
581            self
582        }
583
584        /// Sends the request.
585        pub async fn send(self) -> Result<crate::model::ListGlossariesResponse> {
586            (*self.0.stub)
587                .list_glossaries(self.0.request, self.0.options)
588                .await
589                .map(crate::Response::into_body)
590        }
591
592        /// Streams each page in the collection.
593        pub fn by_page(
594            self,
595        ) -> impl google_cloud_gax::paginator::Paginator<
596            crate::model::ListGlossariesResponse,
597            crate::Error,
598        > {
599            use std::clone::Clone;
600            let token = self.0.request.page_token.clone();
601            let execute = move |token: String| {
602                let mut builder = self.clone();
603                builder.0.request = builder.0.request.set_page_token(token);
604                builder.send()
605            };
606            google_cloud_gax::paginator::internal::new_paginator(token, execute)
607        }
608
609        /// Streams each item in the collection.
610        pub fn by_item(
611            self,
612        ) -> impl google_cloud_gax::paginator::ItemPaginator<
613            crate::model::ListGlossariesResponse,
614            crate::Error,
615        > {
616            use google_cloud_gax::paginator::Paginator;
617            self.by_page().items()
618        }
619
620        /// Sets the value of [parent][crate::model::ListGlossariesRequest::parent].
621        ///
622        /// This is a **required** field for requests.
623        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
624            self.0.request.parent = v.into();
625            self
626        }
627
628        /// Sets the value of [page_size][crate::model::ListGlossariesRequest::page_size].
629        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
630            self.0.request.page_size = v.into();
631            self
632        }
633
634        /// Sets the value of [page_token][crate::model::ListGlossariesRequest::page_token].
635        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
636            self.0.request.page_token = v.into();
637            self
638        }
639
640        /// Sets the value of [filter][crate::model::ListGlossariesRequest::filter].
641        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
642            self.0.request.filter = v.into();
643            self
644        }
645
646        /// Sets the value of [order_by][crate::model::ListGlossariesRequest::order_by].
647        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
648            self.0.request.order_by = v.into();
649            self
650        }
651    }
652
653    #[doc(hidden)]
654    impl crate::RequestBuilder for ListGlossaries {
655        fn request_options(&mut self) -> &mut crate::RequestOptions {
656            &mut self.0.options
657        }
658    }
659
660    /// The request builder for [BusinessGlossaryService::create_glossary_category][crate::client::BusinessGlossaryService::create_glossary_category] calls.
661    ///
662    /// # Example
663    /// ```
664    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CreateGlossaryCategory;
665    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
666    ///
667    /// let builder = prepare_request_builder();
668    /// let response = builder.send().await?;
669    /// # Ok(()) }
670    ///
671    /// fn prepare_request_builder() -> CreateGlossaryCategory {
672    ///   # panic!();
673    ///   // ... details omitted ...
674    /// }
675    /// ```
676    #[derive(Clone, Debug)]
677    pub struct CreateGlossaryCategory(RequestBuilder<crate::model::CreateGlossaryCategoryRequest>);
678
679    impl CreateGlossaryCategory {
680        pub(crate) fn new(
681            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
682        ) -> Self {
683            Self(RequestBuilder::new(stub))
684        }
685
686        /// Sets the full request, replacing any prior values.
687        pub fn with_request<V: Into<crate::model::CreateGlossaryCategoryRequest>>(
688            mut self,
689            v: V,
690        ) -> Self {
691            self.0.request = v.into();
692            self
693        }
694
695        /// Sets all the options, replacing any prior values.
696        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
697            self.0.options = v.into();
698            self
699        }
700
701        /// Sends the request.
702        pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
703            (*self.0.stub)
704                .create_glossary_category(self.0.request, self.0.options)
705                .await
706                .map(crate::Response::into_body)
707        }
708
709        /// Sets the value of [parent][crate::model::CreateGlossaryCategoryRequest::parent].
710        ///
711        /// This is a **required** field for requests.
712        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
713            self.0.request.parent = v.into();
714            self
715        }
716
717        /// Sets the value of [category_id][crate::model::CreateGlossaryCategoryRequest::category_id].
718        ///
719        /// This is a **required** field for requests.
720        pub fn set_category_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
721            self.0.request.category_id = v.into();
722            self
723        }
724
725        /// Sets the value of [category][crate::model::CreateGlossaryCategoryRequest::category].
726        ///
727        /// This is a **required** field for requests.
728        pub fn set_category<T>(mut self, v: T) -> Self
729        where
730            T: std::convert::Into<crate::model::GlossaryCategory>,
731        {
732            self.0.request.category = std::option::Option::Some(v.into());
733            self
734        }
735
736        /// Sets or clears the value of [category][crate::model::CreateGlossaryCategoryRequest::category].
737        ///
738        /// This is a **required** field for requests.
739        pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
740        where
741            T: std::convert::Into<crate::model::GlossaryCategory>,
742        {
743            self.0.request.category = v.map(|x| x.into());
744            self
745        }
746    }
747
748    #[doc(hidden)]
749    impl crate::RequestBuilder for CreateGlossaryCategory {
750        fn request_options(&mut self) -> &mut crate::RequestOptions {
751            &mut self.0.options
752        }
753    }
754
755    /// The request builder for [BusinessGlossaryService::update_glossary_category][crate::client::BusinessGlossaryService::update_glossary_category] calls.
756    ///
757    /// # Example
758    /// ```
759    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::UpdateGlossaryCategory;
760    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
761    ///
762    /// let builder = prepare_request_builder();
763    /// let response = builder.send().await?;
764    /// # Ok(()) }
765    ///
766    /// fn prepare_request_builder() -> UpdateGlossaryCategory {
767    ///   # panic!();
768    ///   // ... details omitted ...
769    /// }
770    /// ```
771    #[derive(Clone, Debug)]
772    pub struct UpdateGlossaryCategory(RequestBuilder<crate::model::UpdateGlossaryCategoryRequest>);
773
774    impl UpdateGlossaryCategory {
775        pub(crate) fn new(
776            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
777        ) -> Self {
778            Self(RequestBuilder::new(stub))
779        }
780
781        /// Sets the full request, replacing any prior values.
782        pub fn with_request<V: Into<crate::model::UpdateGlossaryCategoryRequest>>(
783            mut self,
784            v: V,
785        ) -> Self {
786            self.0.request = v.into();
787            self
788        }
789
790        /// Sets all the options, replacing any prior values.
791        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
792            self.0.options = v.into();
793            self
794        }
795
796        /// Sends the request.
797        pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
798            (*self.0.stub)
799                .update_glossary_category(self.0.request, self.0.options)
800                .await
801                .map(crate::Response::into_body)
802        }
803
804        /// Sets the value of [category][crate::model::UpdateGlossaryCategoryRequest::category].
805        ///
806        /// This is a **required** field for requests.
807        pub fn set_category<T>(mut self, v: T) -> Self
808        where
809            T: std::convert::Into<crate::model::GlossaryCategory>,
810        {
811            self.0.request.category = std::option::Option::Some(v.into());
812            self
813        }
814
815        /// Sets or clears the value of [category][crate::model::UpdateGlossaryCategoryRequest::category].
816        ///
817        /// This is a **required** field for requests.
818        pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
819        where
820            T: std::convert::Into<crate::model::GlossaryCategory>,
821        {
822            self.0.request.category = v.map(|x| x.into());
823            self
824        }
825
826        /// Sets the value of [update_mask][crate::model::UpdateGlossaryCategoryRequest::update_mask].
827        ///
828        /// This is a **required** field for requests.
829        pub fn set_update_mask<T>(mut self, v: T) -> Self
830        where
831            T: std::convert::Into<wkt::FieldMask>,
832        {
833            self.0.request.update_mask = std::option::Option::Some(v.into());
834            self
835        }
836
837        /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryCategoryRequest::update_mask].
838        ///
839        /// This is a **required** field for requests.
840        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
841        where
842            T: std::convert::Into<wkt::FieldMask>,
843        {
844            self.0.request.update_mask = v.map(|x| x.into());
845            self
846        }
847    }
848
849    #[doc(hidden)]
850    impl crate::RequestBuilder for UpdateGlossaryCategory {
851        fn request_options(&mut self) -> &mut crate::RequestOptions {
852            &mut self.0.options
853        }
854    }
855
856    /// The request builder for [BusinessGlossaryService::delete_glossary_category][crate::client::BusinessGlossaryService::delete_glossary_category] calls.
857    ///
858    /// # Example
859    /// ```
860    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteGlossaryCategory;
861    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
862    ///
863    /// let builder = prepare_request_builder();
864    /// let response = builder.send().await?;
865    /// # Ok(()) }
866    ///
867    /// fn prepare_request_builder() -> DeleteGlossaryCategory {
868    ///   # panic!();
869    ///   // ... details omitted ...
870    /// }
871    /// ```
872    #[derive(Clone, Debug)]
873    pub struct DeleteGlossaryCategory(RequestBuilder<crate::model::DeleteGlossaryCategoryRequest>);
874
875    impl DeleteGlossaryCategory {
876        pub(crate) fn new(
877            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
878        ) -> Self {
879            Self(RequestBuilder::new(stub))
880        }
881
882        /// Sets the full request, replacing any prior values.
883        pub fn with_request<V: Into<crate::model::DeleteGlossaryCategoryRequest>>(
884            mut self,
885            v: V,
886        ) -> Self {
887            self.0.request = v.into();
888            self
889        }
890
891        /// Sets all the options, replacing any prior values.
892        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
893            self.0.options = v.into();
894            self
895        }
896
897        /// Sends the request.
898        pub async fn send(self) -> Result<()> {
899            (*self.0.stub)
900                .delete_glossary_category(self.0.request, self.0.options)
901                .await
902                .map(crate::Response::into_body)
903        }
904
905        /// Sets the value of [name][crate::model::DeleteGlossaryCategoryRequest::name].
906        ///
907        /// This is a **required** field for requests.
908        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
909            self.0.request.name = v.into();
910            self
911        }
912    }
913
914    #[doc(hidden)]
915    impl crate::RequestBuilder for DeleteGlossaryCategory {
916        fn request_options(&mut self) -> &mut crate::RequestOptions {
917            &mut self.0.options
918        }
919    }
920
921    /// The request builder for [BusinessGlossaryService::get_glossary_category][crate::client::BusinessGlossaryService::get_glossary_category] calls.
922    ///
923    /// # Example
924    /// ```
925    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetGlossaryCategory;
926    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
927    ///
928    /// let builder = prepare_request_builder();
929    /// let response = builder.send().await?;
930    /// # Ok(()) }
931    ///
932    /// fn prepare_request_builder() -> GetGlossaryCategory {
933    ///   # panic!();
934    ///   // ... details omitted ...
935    /// }
936    /// ```
937    #[derive(Clone, Debug)]
938    pub struct GetGlossaryCategory(RequestBuilder<crate::model::GetGlossaryCategoryRequest>);
939
940    impl GetGlossaryCategory {
941        pub(crate) fn new(
942            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
943        ) -> Self {
944            Self(RequestBuilder::new(stub))
945        }
946
947        /// Sets the full request, replacing any prior values.
948        pub fn with_request<V: Into<crate::model::GetGlossaryCategoryRequest>>(
949            mut self,
950            v: V,
951        ) -> Self {
952            self.0.request = v.into();
953            self
954        }
955
956        /// Sets all the options, replacing any prior values.
957        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
958            self.0.options = v.into();
959            self
960        }
961
962        /// Sends the request.
963        pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
964            (*self.0.stub)
965                .get_glossary_category(self.0.request, self.0.options)
966                .await
967                .map(crate::Response::into_body)
968        }
969
970        /// Sets the value of [name][crate::model::GetGlossaryCategoryRequest::name].
971        ///
972        /// This is a **required** field for requests.
973        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
974            self.0.request.name = v.into();
975            self
976        }
977    }
978
979    #[doc(hidden)]
980    impl crate::RequestBuilder for GetGlossaryCategory {
981        fn request_options(&mut self) -> &mut crate::RequestOptions {
982            &mut self.0.options
983        }
984    }
985
986    /// The request builder for [BusinessGlossaryService::list_glossary_categories][crate::client::BusinessGlossaryService::list_glossary_categories] calls.
987    ///
988    /// # Example
989    /// ```
990    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListGlossaryCategories;
991    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
992    /// use google_cloud_gax::paginator::ItemPaginator;
993    ///
994    /// let builder = prepare_request_builder();
995    /// let mut items = builder.by_item();
996    /// while let Some(result) = items.next().await {
997    ///   let item = result?;
998    /// }
999    /// # Ok(()) }
1000    ///
1001    /// fn prepare_request_builder() -> ListGlossaryCategories {
1002    ///   # panic!();
1003    ///   // ... details omitted ...
1004    /// }
1005    /// ```
1006    #[derive(Clone, Debug)]
1007    pub struct ListGlossaryCategories(RequestBuilder<crate::model::ListGlossaryCategoriesRequest>);
1008
1009    impl ListGlossaryCategories {
1010        pub(crate) fn new(
1011            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1012        ) -> Self {
1013            Self(RequestBuilder::new(stub))
1014        }
1015
1016        /// Sets the full request, replacing any prior values.
1017        pub fn with_request<V: Into<crate::model::ListGlossaryCategoriesRequest>>(
1018            mut self,
1019            v: V,
1020        ) -> Self {
1021            self.0.request = v.into();
1022            self
1023        }
1024
1025        /// Sets all the options, replacing any prior values.
1026        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1027            self.0.options = v.into();
1028            self
1029        }
1030
1031        /// Sends the request.
1032        pub async fn send(self) -> Result<crate::model::ListGlossaryCategoriesResponse> {
1033            (*self.0.stub)
1034                .list_glossary_categories(self.0.request, self.0.options)
1035                .await
1036                .map(crate::Response::into_body)
1037        }
1038
1039        /// Streams each page in the collection.
1040        pub fn by_page(
1041            self,
1042        ) -> impl google_cloud_gax::paginator::Paginator<
1043            crate::model::ListGlossaryCategoriesResponse,
1044            crate::Error,
1045        > {
1046            use std::clone::Clone;
1047            let token = self.0.request.page_token.clone();
1048            let execute = move |token: String| {
1049                let mut builder = self.clone();
1050                builder.0.request = builder.0.request.set_page_token(token);
1051                builder.send()
1052            };
1053            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1054        }
1055
1056        /// Streams each item in the collection.
1057        pub fn by_item(
1058            self,
1059        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1060            crate::model::ListGlossaryCategoriesResponse,
1061            crate::Error,
1062        > {
1063            use google_cloud_gax::paginator::Paginator;
1064            self.by_page().items()
1065        }
1066
1067        /// Sets the value of [parent][crate::model::ListGlossaryCategoriesRequest::parent].
1068        ///
1069        /// This is a **required** field for requests.
1070        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1071            self.0.request.parent = v.into();
1072            self
1073        }
1074
1075        /// Sets the value of [page_size][crate::model::ListGlossaryCategoriesRequest::page_size].
1076        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1077            self.0.request.page_size = v.into();
1078            self
1079        }
1080
1081        /// Sets the value of [page_token][crate::model::ListGlossaryCategoriesRequest::page_token].
1082        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1083            self.0.request.page_token = v.into();
1084            self
1085        }
1086
1087        /// Sets the value of [filter][crate::model::ListGlossaryCategoriesRequest::filter].
1088        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1089            self.0.request.filter = v.into();
1090            self
1091        }
1092
1093        /// Sets the value of [order_by][crate::model::ListGlossaryCategoriesRequest::order_by].
1094        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1095            self.0.request.order_by = v.into();
1096            self
1097        }
1098    }
1099
1100    #[doc(hidden)]
1101    impl crate::RequestBuilder for ListGlossaryCategories {
1102        fn request_options(&mut self) -> &mut crate::RequestOptions {
1103            &mut self.0.options
1104        }
1105    }
1106
1107    /// The request builder for [BusinessGlossaryService::create_glossary_term][crate::client::BusinessGlossaryService::create_glossary_term] calls.
1108    ///
1109    /// # Example
1110    /// ```
1111    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CreateGlossaryTerm;
1112    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1113    ///
1114    /// let builder = prepare_request_builder();
1115    /// let response = builder.send().await?;
1116    /// # Ok(()) }
1117    ///
1118    /// fn prepare_request_builder() -> CreateGlossaryTerm {
1119    ///   # panic!();
1120    ///   // ... details omitted ...
1121    /// }
1122    /// ```
1123    #[derive(Clone, Debug)]
1124    pub struct CreateGlossaryTerm(RequestBuilder<crate::model::CreateGlossaryTermRequest>);
1125
1126    impl CreateGlossaryTerm {
1127        pub(crate) fn new(
1128            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1129        ) -> Self {
1130            Self(RequestBuilder::new(stub))
1131        }
1132
1133        /// Sets the full request, replacing any prior values.
1134        pub fn with_request<V: Into<crate::model::CreateGlossaryTermRequest>>(
1135            mut self,
1136            v: V,
1137        ) -> Self {
1138            self.0.request = v.into();
1139            self
1140        }
1141
1142        /// Sets all the options, replacing any prior values.
1143        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1144            self.0.options = v.into();
1145            self
1146        }
1147
1148        /// Sends the request.
1149        pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1150            (*self.0.stub)
1151                .create_glossary_term(self.0.request, self.0.options)
1152                .await
1153                .map(crate::Response::into_body)
1154        }
1155
1156        /// Sets the value of [parent][crate::model::CreateGlossaryTermRequest::parent].
1157        ///
1158        /// This is a **required** field for requests.
1159        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1160            self.0.request.parent = v.into();
1161            self
1162        }
1163
1164        /// Sets the value of [term_id][crate::model::CreateGlossaryTermRequest::term_id].
1165        ///
1166        /// This is a **required** field for requests.
1167        pub fn set_term_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1168            self.0.request.term_id = v.into();
1169            self
1170        }
1171
1172        /// Sets the value of [term][crate::model::CreateGlossaryTermRequest::term].
1173        ///
1174        /// This is a **required** field for requests.
1175        pub fn set_term<T>(mut self, v: T) -> Self
1176        where
1177            T: std::convert::Into<crate::model::GlossaryTerm>,
1178        {
1179            self.0.request.term = std::option::Option::Some(v.into());
1180            self
1181        }
1182
1183        /// Sets or clears the value of [term][crate::model::CreateGlossaryTermRequest::term].
1184        ///
1185        /// This is a **required** field for requests.
1186        pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
1187        where
1188            T: std::convert::Into<crate::model::GlossaryTerm>,
1189        {
1190            self.0.request.term = v.map(|x| x.into());
1191            self
1192        }
1193    }
1194
1195    #[doc(hidden)]
1196    impl crate::RequestBuilder for CreateGlossaryTerm {
1197        fn request_options(&mut self) -> &mut crate::RequestOptions {
1198            &mut self.0.options
1199        }
1200    }
1201
1202    /// The request builder for [BusinessGlossaryService::update_glossary_term][crate::client::BusinessGlossaryService::update_glossary_term] calls.
1203    ///
1204    /// # Example
1205    /// ```
1206    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::UpdateGlossaryTerm;
1207    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1208    ///
1209    /// let builder = prepare_request_builder();
1210    /// let response = builder.send().await?;
1211    /// # Ok(()) }
1212    ///
1213    /// fn prepare_request_builder() -> UpdateGlossaryTerm {
1214    ///   # panic!();
1215    ///   // ... details omitted ...
1216    /// }
1217    /// ```
1218    #[derive(Clone, Debug)]
1219    pub struct UpdateGlossaryTerm(RequestBuilder<crate::model::UpdateGlossaryTermRequest>);
1220
1221    impl UpdateGlossaryTerm {
1222        pub(crate) fn new(
1223            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1224        ) -> Self {
1225            Self(RequestBuilder::new(stub))
1226        }
1227
1228        /// Sets the full request, replacing any prior values.
1229        pub fn with_request<V: Into<crate::model::UpdateGlossaryTermRequest>>(
1230            mut self,
1231            v: V,
1232        ) -> Self {
1233            self.0.request = v.into();
1234            self
1235        }
1236
1237        /// Sets all the options, replacing any prior values.
1238        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1239            self.0.options = v.into();
1240            self
1241        }
1242
1243        /// Sends the request.
1244        pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1245            (*self.0.stub)
1246                .update_glossary_term(self.0.request, self.0.options)
1247                .await
1248                .map(crate::Response::into_body)
1249        }
1250
1251        /// Sets the value of [term][crate::model::UpdateGlossaryTermRequest::term].
1252        ///
1253        /// This is a **required** field for requests.
1254        pub fn set_term<T>(mut self, v: T) -> Self
1255        where
1256            T: std::convert::Into<crate::model::GlossaryTerm>,
1257        {
1258            self.0.request.term = std::option::Option::Some(v.into());
1259            self
1260        }
1261
1262        /// Sets or clears the value of [term][crate::model::UpdateGlossaryTermRequest::term].
1263        ///
1264        /// This is a **required** field for requests.
1265        pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
1266        where
1267            T: std::convert::Into<crate::model::GlossaryTerm>,
1268        {
1269            self.0.request.term = v.map(|x| x.into());
1270            self
1271        }
1272
1273        /// Sets the value of [update_mask][crate::model::UpdateGlossaryTermRequest::update_mask].
1274        ///
1275        /// This is a **required** field for requests.
1276        pub fn set_update_mask<T>(mut self, v: T) -> Self
1277        where
1278            T: std::convert::Into<wkt::FieldMask>,
1279        {
1280            self.0.request.update_mask = std::option::Option::Some(v.into());
1281            self
1282        }
1283
1284        /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryTermRequest::update_mask].
1285        ///
1286        /// This is a **required** field for requests.
1287        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1288        where
1289            T: std::convert::Into<wkt::FieldMask>,
1290        {
1291            self.0.request.update_mask = v.map(|x| x.into());
1292            self
1293        }
1294    }
1295
1296    #[doc(hidden)]
1297    impl crate::RequestBuilder for UpdateGlossaryTerm {
1298        fn request_options(&mut self) -> &mut crate::RequestOptions {
1299            &mut self.0.options
1300        }
1301    }
1302
1303    /// The request builder for [BusinessGlossaryService::delete_glossary_term][crate::client::BusinessGlossaryService::delete_glossary_term] calls.
1304    ///
1305    /// # Example
1306    /// ```
1307    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteGlossaryTerm;
1308    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1309    ///
1310    /// let builder = prepare_request_builder();
1311    /// let response = builder.send().await?;
1312    /// # Ok(()) }
1313    ///
1314    /// fn prepare_request_builder() -> DeleteGlossaryTerm {
1315    ///   # panic!();
1316    ///   // ... details omitted ...
1317    /// }
1318    /// ```
1319    #[derive(Clone, Debug)]
1320    pub struct DeleteGlossaryTerm(RequestBuilder<crate::model::DeleteGlossaryTermRequest>);
1321
1322    impl DeleteGlossaryTerm {
1323        pub(crate) fn new(
1324            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1325        ) -> Self {
1326            Self(RequestBuilder::new(stub))
1327        }
1328
1329        /// Sets the full request, replacing any prior values.
1330        pub fn with_request<V: Into<crate::model::DeleteGlossaryTermRequest>>(
1331            mut self,
1332            v: V,
1333        ) -> Self {
1334            self.0.request = v.into();
1335            self
1336        }
1337
1338        /// Sets all the options, replacing any prior values.
1339        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1340            self.0.options = v.into();
1341            self
1342        }
1343
1344        /// Sends the request.
1345        pub async fn send(self) -> Result<()> {
1346            (*self.0.stub)
1347                .delete_glossary_term(self.0.request, self.0.options)
1348                .await
1349                .map(crate::Response::into_body)
1350        }
1351
1352        /// Sets the value of [name][crate::model::DeleteGlossaryTermRequest::name].
1353        ///
1354        /// This is a **required** field for requests.
1355        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1356            self.0.request.name = v.into();
1357            self
1358        }
1359    }
1360
1361    #[doc(hidden)]
1362    impl crate::RequestBuilder for DeleteGlossaryTerm {
1363        fn request_options(&mut self) -> &mut crate::RequestOptions {
1364            &mut self.0.options
1365        }
1366    }
1367
1368    /// The request builder for [BusinessGlossaryService::get_glossary_term][crate::client::BusinessGlossaryService::get_glossary_term] calls.
1369    ///
1370    /// # Example
1371    /// ```
1372    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetGlossaryTerm;
1373    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1374    ///
1375    /// let builder = prepare_request_builder();
1376    /// let response = builder.send().await?;
1377    /// # Ok(()) }
1378    ///
1379    /// fn prepare_request_builder() -> GetGlossaryTerm {
1380    ///   # panic!();
1381    ///   // ... details omitted ...
1382    /// }
1383    /// ```
1384    #[derive(Clone, Debug)]
1385    pub struct GetGlossaryTerm(RequestBuilder<crate::model::GetGlossaryTermRequest>);
1386
1387    impl GetGlossaryTerm {
1388        pub(crate) fn new(
1389            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1390        ) -> Self {
1391            Self(RequestBuilder::new(stub))
1392        }
1393
1394        /// Sets the full request, replacing any prior values.
1395        pub fn with_request<V: Into<crate::model::GetGlossaryTermRequest>>(mut self, v: V) -> Self {
1396            self.0.request = v.into();
1397            self
1398        }
1399
1400        /// Sets all the options, replacing any prior values.
1401        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1402            self.0.options = v.into();
1403            self
1404        }
1405
1406        /// Sends the request.
1407        pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1408            (*self.0.stub)
1409                .get_glossary_term(self.0.request, self.0.options)
1410                .await
1411                .map(crate::Response::into_body)
1412        }
1413
1414        /// Sets the value of [name][crate::model::GetGlossaryTermRequest::name].
1415        ///
1416        /// This is a **required** field for requests.
1417        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1418            self.0.request.name = v.into();
1419            self
1420        }
1421    }
1422
1423    #[doc(hidden)]
1424    impl crate::RequestBuilder for GetGlossaryTerm {
1425        fn request_options(&mut self) -> &mut crate::RequestOptions {
1426            &mut self.0.options
1427        }
1428    }
1429
1430    /// The request builder for [BusinessGlossaryService::list_glossary_terms][crate::client::BusinessGlossaryService::list_glossary_terms] calls.
1431    ///
1432    /// # Example
1433    /// ```
1434    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListGlossaryTerms;
1435    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1436    /// use google_cloud_gax::paginator::ItemPaginator;
1437    ///
1438    /// let builder = prepare_request_builder();
1439    /// let mut items = builder.by_item();
1440    /// while let Some(result) = items.next().await {
1441    ///   let item = result?;
1442    /// }
1443    /// # Ok(()) }
1444    ///
1445    /// fn prepare_request_builder() -> ListGlossaryTerms {
1446    ///   # panic!();
1447    ///   // ... details omitted ...
1448    /// }
1449    /// ```
1450    #[derive(Clone, Debug)]
1451    pub struct ListGlossaryTerms(RequestBuilder<crate::model::ListGlossaryTermsRequest>);
1452
1453    impl ListGlossaryTerms {
1454        pub(crate) fn new(
1455            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1456        ) -> Self {
1457            Self(RequestBuilder::new(stub))
1458        }
1459
1460        /// Sets the full request, replacing any prior values.
1461        pub fn with_request<V: Into<crate::model::ListGlossaryTermsRequest>>(
1462            mut self,
1463            v: V,
1464        ) -> Self {
1465            self.0.request = v.into();
1466            self
1467        }
1468
1469        /// Sets all the options, replacing any prior values.
1470        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1471            self.0.options = v.into();
1472            self
1473        }
1474
1475        /// Sends the request.
1476        pub async fn send(self) -> Result<crate::model::ListGlossaryTermsResponse> {
1477            (*self.0.stub)
1478                .list_glossary_terms(self.0.request, self.0.options)
1479                .await
1480                .map(crate::Response::into_body)
1481        }
1482
1483        /// Streams each page in the collection.
1484        pub fn by_page(
1485            self,
1486        ) -> impl google_cloud_gax::paginator::Paginator<
1487            crate::model::ListGlossaryTermsResponse,
1488            crate::Error,
1489        > {
1490            use std::clone::Clone;
1491            let token = self.0.request.page_token.clone();
1492            let execute = move |token: String| {
1493                let mut builder = self.clone();
1494                builder.0.request = builder.0.request.set_page_token(token);
1495                builder.send()
1496            };
1497            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1498        }
1499
1500        /// Streams each item in the collection.
1501        pub fn by_item(
1502            self,
1503        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1504            crate::model::ListGlossaryTermsResponse,
1505            crate::Error,
1506        > {
1507            use google_cloud_gax::paginator::Paginator;
1508            self.by_page().items()
1509        }
1510
1511        /// Sets the value of [parent][crate::model::ListGlossaryTermsRequest::parent].
1512        ///
1513        /// This is a **required** field for requests.
1514        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1515            self.0.request.parent = v.into();
1516            self
1517        }
1518
1519        /// Sets the value of [page_size][crate::model::ListGlossaryTermsRequest::page_size].
1520        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1521            self.0.request.page_size = v.into();
1522            self
1523        }
1524
1525        /// Sets the value of [page_token][crate::model::ListGlossaryTermsRequest::page_token].
1526        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1527            self.0.request.page_token = v.into();
1528            self
1529        }
1530
1531        /// Sets the value of [filter][crate::model::ListGlossaryTermsRequest::filter].
1532        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1533            self.0.request.filter = v.into();
1534            self
1535        }
1536
1537        /// Sets the value of [order_by][crate::model::ListGlossaryTermsRequest::order_by].
1538        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1539            self.0.request.order_by = v.into();
1540            self
1541        }
1542    }
1543
1544    #[doc(hidden)]
1545    impl crate::RequestBuilder for ListGlossaryTerms {
1546        fn request_options(&mut self) -> &mut crate::RequestOptions {
1547            &mut self.0.options
1548        }
1549    }
1550
1551    /// The request builder for [BusinessGlossaryService::list_locations][crate::client::BusinessGlossaryService::list_locations] calls.
1552    ///
1553    /// # Example
1554    /// ```
1555    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListLocations;
1556    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1557    /// use google_cloud_gax::paginator::ItemPaginator;
1558    ///
1559    /// let builder = prepare_request_builder();
1560    /// let mut items = builder.by_item();
1561    /// while let Some(result) = items.next().await {
1562    ///   let item = result?;
1563    /// }
1564    /// # Ok(()) }
1565    ///
1566    /// fn prepare_request_builder() -> ListLocations {
1567    ///   # panic!();
1568    ///   // ... details omitted ...
1569    /// }
1570    /// ```
1571    #[derive(Clone, Debug)]
1572    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
1573
1574    impl ListLocations {
1575        pub(crate) fn new(
1576            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1577        ) -> Self {
1578            Self(RequestBuilder::new(stub))
1579        }
1580
1581        /// Sets the full request, replacing any prior values.
1582        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
1583            mut self,
1584            v: V,
1585        ) -> Self {
1586            self.0.request = v.into();
1587            self
1588        }
1589
1590        /// Sets all the options, replacing any prior values.
1591        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1592            self.0.options = v.into();
1593            self
1594        }
1595
1596        /// Sends the request.
1597        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
1598            (*self.0.stub)
1599                .list_locations(self.0.request, self.0.options)
1600                .await
1601                .map(crate::Response::into_body)
1602        }
1603
1604        /// Streams each page in the collection.
1605        pub fn by_page(
1606            self,
1607        ) -> impl google_cloud_gax::paginator::Paginator<
1608            google_cloud_location::model::ListLocationsResponse,
1609            crate::Error,
1610        > {
1611            use std::clone::Clone;
1612            let token = self.0.request.page_token.clone();
1613            let execute = move |token: String| {
1614                let mut builder = self.clone();
1615                builder.0.request = builder.0.request.set_page_token(token);
1616                builder.send()
1617            };
1618            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1619        }
1620
1621        /// Streams each item in the collection.
1622        pub fn by_item(
1623            self,
1624        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1625            google_cloud_location::model::ListLocationsResponse,
1626            crate::Error,
1627        > {
1628            use google_cloud_gax::paginator::Paginator;
1629            self.by_page().items()
1630        }
1631
1632        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
1633        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1634            self.0.request.name = v.into();
1635            self
1636        }
1637
1638        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
1639        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1640            self.0.request.filter = v.into();
1641            self
1642        }
1643
1644        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
1645        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1646            self.0.request.page_size = v.into();
1647            self
1648        }
1649
1650        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
1651        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1652            self.0.request.page_token = v.into();
1653            self
1654        }
1655    }
1656
1657    #[doc(hidden)]
1658    impl crate::RequestBuilder for ListLocations {
1659        fn request_options(&mut self) -> &mut crate::RequestOptions {
1660            &mut self.0.options
1661        }
1662    }
1663
1664    /// The request builder for [BusinessGlossaryService::get_location][crate::client::BusinessGlossaryService::get_location] calls.
1665    ///
1666    /// # Example
1667    /// ```
1668    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetLocation;
1669    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1670    ///
1671    /// let builder = prepare_request_builder();
1672    /// let response = builder.send().await?;
1673    /// # Ok(()) }
1674    ///
1675    /// fn prepare_request_builder() -> GetLocation {
1676    ///   # panic!();
1677    ///   // ... details omitted ...
1678    /// }
1679    /// ```
1680    #[derive(Clone, Debug)]
1681    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
1682
1683    impl GetLocation {
1684        pub(crate) fn new(
1685            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1686        ) -> Self {
1687            Self(RequestBuilder::new(stub))
1688        }
1689
1690        /// Sets the full request, replacing any prior values.
1691        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
1692            mut self,
1693            v: V,
1694        ) -> Self {
1695            self.0.request = v.into();
1696            self
1697        }
1698
1699        /// Sets all the options, replacing any prior values.
1700        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1701            self.0.options = v.into();
1702            self
1703        }
1704
1705        /// Sends the request.
1706        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
1707            (*self.0.stub)
1708                .get_location(self.0.request, self.0.options)
1709                .await
1710                .map(crate::Response::into_body)
1711        }
1712
1713        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
1714        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1715            self.0.request.name = v.into();
1716            self
1717        }
1718    }
1719
1720    #[doc(hidden)]
1721    impl crate::RequestBuilder for GetLocation {
1722        fn request_options(&mut self) -> &mut crate::RequestOptions {
1723            &mut self.0.options
1724        }
1725    }
1726
1727    /// The request builder for [BusinessGlossaryService::set_iam_policy][crate::client::BusinessGlossaryService::set_iam_policy] calls.
1728    ///
1729    /// # Example
1730    /// ```
1731    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::SetIamPolicy;
1732    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1733    ///
1734    /// let builder = prepare_request_builder();
1735    /// let response = builder.send().await?;
1736    /// # Ok(()) }
1737    ///
1738    /// fn prepare_request_builder() -> SetIamPolicy {
1739    ///   # panic!();
1740    ///   // ... details omitted ...
1741    /// }
1742    /// ```
1743    #[derive(Clone, Debug)]
1744    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
1745
1746    impl SetIamPolicy {
1747        pub(crate) fn new(
1748            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1749        ) -> Self {
1750            Self(RequestBuilder::new(stub))
1751        }
1752
1753        /// Sets the full request, replacing any prior values.
1754        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
1755            mut self,
1756            v: V,
1757        ) -> Self {
1758            self.0.request = v.into();
1759            self
1760        }
1761
1762        /// Sets all the options, replacing any prior values.
1763        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1764            self.0.options = v.into();
1765            self
1766        }
1767
1768        /// Sends the request.
1769        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
1770            (*self.0.stub)
1771                .set_iam_policy(self.0.request, self.0.options)
1772                .await
1773                .map(crate::Response::into_body)
1774        }
1775
1776        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
1777        ///
1778        /// This is a **required** field for requests.
1779        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1780            self.0.request.resource = v.into();
1781            self
1782        }
1783
1784        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
1785        ///
1786        /// This is a **required** field for requests.
1787        pub fn set_policy<T>(mut self, v: T) -> Self
1788        where
1789            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
1790        {
1791            self.0.request.policy = std::option::Option::Some(v.into());
1792            self
1793        }
1794
1795        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
1796        ///
1797        /// This is a **required** field for requests.
1798        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
1799        where
1800            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
1801        {
1802            self.0.request.policy = v.map(|x| x.into());
1803            self
1804        }
1805
1806        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
1807        pub fn set_update_mask<T>(mut self, v: T) -> Self
1808        where
1809            T: std::convert::Into<wkt::FieldMask>,
1810        {
1811            self.0.request.update_mask = std::option::Option::Some(v.into());
1812            self
1813        }
1814
1815        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
1816        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1817        where
1818            T: std::convert::Into<wkt::FieldMask>,
1819        {
1820            self.0.request.update_mask = v.map(|x| x.into());
1821            self
1822        }
1823    }
1824
1825    #[doc(hidden)]
1826    impl crate::RequestBuilder for SetIamPolicy {
1827        fn request_options(&mut self) -> &mut crate::RequestOptions {
1828            &mut self.0.options
1829        }
1830    }
1831
1832    /// The request builder for [BusinessGlossaryService::get_iam_policy][crate::client::BusinessGlossaryService::get_iam_policy] calls.
1833    ///
1834    /// # Example
1835    /// ```
1836    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetIamPolicy;
1837    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1838    ///
1839    /// let builder = prepare_request_builder();
1840    /// let response = builder.send().await?;
1841    /// # Ok(()) }
1842    ///
1843    /// fn prepare_request_builder() -> GetIamPolicy {
1844    ///   # panic!();
1845    ///   // ... details omitted ...
1846    /// }
1847    /// ```
1848    #[derive(Clone, Debug)]
1849    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
1850
1851    impl GetIamPolicy {
1852        pub(crate) fn new(
1853            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1854        ) -> Self {
1855            Self(RequestBuilder::new(stub))
1856        }
1857
1858        /// Sets the full request, replacing any prior values.
1859        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
1860            mut self,
1861            v: V,
1862        ) -> Self {
1863            self.0.request = v.into();
1864            self
1865        }
1866
1867        /// Sets all the options, replacing any prior values.
1868        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1869            self.0.options = v.into();
1870            self
1871        }
1872
1873        /// Sends the request.
1874        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
1875            (*self.0.stub)
1876                .get_iam_policy(self.0.request, self.0.options)
1877                .await
1878                .map(crate::Response::into_body)
1879        }
1880
1881        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
1882        ///
1883        /// This is a **required** field for requests.
1884        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1885            self.0.request.resource = v.into();
1886            self
1887        }
1888
1889        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
1890        pub fn set_options<T>(mut self, v: T) -> Self
1891        where
1892            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
1893        {
1894            self.0.request.options = std::option::Option::Some(v.into());
1895            self
1896        }
1897
1898        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
1899        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
1900        where
1901            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
1902        {
1903            self.0.request.options = v.map(|x| x.into());
1904            self
1905        }
1906    }
1907
1908    #[doc(hidden)]
1909    impl crate::RequestBuilder for GetIamPolicy {
1910        fn request_options(&mut self) -> &mut crate::RequestOptions {
1911            &mut self.0.options
1912        }
1913    }
1914
1915    /// The request builder for [BusinessGlossaryService::test_iam_permissions][crate::client::BusinessGlossaryService::test_iam_permissions] calls.
1916    ///
1917    /// # Example
1918    /// ```
1919    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::TestIamPermissions;
1920    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1921    ///
1922    /// let builder = prepare_request_builder();
1923    /// let response = builder.send().await?;
1924    /// # Ok(()) }
1925    ///
1926    /// fn prepare_request_builder() -> TestIamPermissions {
1927    ///   # panic!();
1928    ///   // ... details omitted ...
1929    /// }
1930    /// ```
1931    #[derive(Clone, Debug)]
1932    pub struct TestIamPermissions(
1933        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
1934    );
1935
1936    impl TestIamPermissions {
1937        pub(crate) fn new(
1938            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1939        ) -> Self {
1940            Self(RequestBuilder::new(stub))
1941        }
1942
1943        /// Sets the full request, replacing any prior values.
1944        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
1945            mut self,
1946            v: V,
1947        ) -> Self {
1948            self.0.request = v.into();
1949            self
1950        }
1951
1952        /// Sets all the options, replacing any prior values.
1953        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1954            self.0.options = v.into();
1955            self
1956        }
1957
1958        /// Sends the request.
1959        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
1960            (*self.0.stub)
1961                .test_iam_permissions(self.0.request, self.0.options)
1962                .await
1963                .map(crate::Response::into_body)
1964        }
1965
1966        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
1967        ///
1968        /// This is a **required** field for requests.
1969        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1970            self.0.request.resource = v.into();
1971            self
1972        }
1973
1974        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
1975        ///
1976        /// This is a **required** field for requests.
1977        pub fn set_permissions<T, V>(mut self, v: T) -> Self
1978        where
1979            T: std::iter::IntoIterator<Item = V>,
1980            V: std::convert::Into<std::string::String>,
1981        {
1982            use std::iter::Iterator;
1983            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
1984            self
1985        }
1986    }
1987
1988    #[doc(hidden)]
1989    impl crate::RequestBuilder for TestIamPermissions {
1990        fn request_options(&mut self) -> &mut crate::RequestOptions {
1991            &mut self.0.options
1992        }
1993    }
1994
1995    /// The request builder for [BusinessGlossaryService::list_operations][crate::client::BusinessGlossaryService::list_operations] calls.
1996    ///
1997    /// # Example
1998    /// ```
1999    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListOperations;
2000    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2001    /// use google_cloud_gax::paginator::ItemPaginator;
2002    ///
2003    /// let builder = prepare_request_builder();
2004    /// let mut items = builder.by_item();
2005    /// while let Some(result) = items.next().await {
2006    ///   let item = result?;
2007    /// }
2008    /// # Ok(()) }
2009    ///
2010    /// fn prepare_request_builder() -> ListOperations {
2011    ///   # panic!();
2012    ///   // ... details omitted ...
2013    /// }
2014    /// ```
2015    #[derive(Clone, Debug)]
2016    pub struct ListOperations(
2017        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
2018    );
2019
2020    impl ListOperations {
2021        pub(crate) fn new(
2022            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2023        ) -> Self {
2024            Self(RequestBuilder::new(stub))
2025        }
2026
2027        /// Sets the full request, replacing any prior values.
2028        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
2029            mut self,
2030            v: V,
2031        ) -> Self {
2032            self.0.request = v.into();
2033            self
2034        }
2035
2036        /// Sets all the options, replacing any prior values.
2037        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2038            self.0.options = v.into();
2039            self
2040        }
2041
2042        /// Sends the request.
2043        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
2044            (*self.0.stub)
2045                .list_operations(self.0.request, self.0.options)
2046                .await
2047                .map(crate::Response::into_body)
2048        }
2049
2050        /// Streams each page in the collection.
2051        pub fn by_page(
2052            self,
2053        ) -> impl google_cloud_gax::paginator::Paginator<
2054            google_cloud_longrunning::model::ListOperationsResponse,
2055            crate::Error,
2056        > {
2057            use std::clone::Clone;
2058            let token = self.0.request.page_token.clone();
2059            let execute = move |token: String| {
2060                let mut builder = self.clone();
2061                builder.0.request = builder.0.request.set_page_token(token);
2062                builder.send()
2063            };
2064            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2065        }
2066
2067        /// Streams each item in the collection.
2068        pub fn by_item(
2069            self,
2070        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2071            google_cloud_longrunning::model::ListOperationsResponse,
2072            crate::Error,
2073        > {
2074            use google_cloud_gax::paginator::Paginator;
2075            self.by_page().items()
2076        }
2077
2078        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
2079        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2080            self.0.request.name = v.into();
2081            self
2082        }
2083
2084        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
2085        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2086            self.0.request.filter = v.into();
2087            self
2088        }
2089
2090        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
2091        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2092            self.0.request.page_size = v.into();
2093            self
2094        }
2095
2096        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
2097        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2098            self.0.request.page_token = v.into();
2099            self
2100        }
2101
2102        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
2103        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
2104            self.0.request.return_partial_success = v.into();
2105            self
2106        }
2107    }
2108
2109    #[doc(hidden)]
2110    impl crate::RequestBuilder for ListOperations {
2111        fn request_options(&mut self) -> &mut crate::RequestOptions {
2112            &mut self.0.options
2113        }
2114    }
2115
2116    /// The request builder for [BusinessGlossaryService::get_operation][crate::client::BusinessGlossaryService::get_operation] calls.
2117    ///
2118    /// # Example
2119    /// ```
2120    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetOperation;
2121    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2122    ///
2123    /// let builder = prepare_request_builder();
2124    /// let response = builder.send().await?;
2125    /// # Ok(()) }
2126    ///
2127    /// fn prepare_request_builder() -> GetOperation {
2128    ///   # panic!();
2129    ///   // ... details omitted ...
2130    /// }
2131    /// ```
2132    #[derive(Clone, Debug)]
2133    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
2134
2135    impl GetOperation {
2136        pub(crate) fn new(
2137            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2138        ) -> Self {
2139            Self(RequestBuilder::new(stub))
2140        }
2141
2142        /// Sets the full request, replacing any prior values.
2143        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
2144            mut self,
2145            v: V,
2146        ) -> Self {
2147            self.0.request = v.into();
2148            self
2149        }
2150
2151        /// Sets all the options, replacing any prior values.
2152        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2153            self.0.options = v.into();
2154            self
2155        }
2156
2157        /// Sends the request.
2158        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2159            (*self.0.stub)
2160                .get_operation(self.0.request, self.0.options)
2161                .await
2162                .map(crate::Response::into_body)
2163        }
2164
2165        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
2166        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2167            self.0.request.name = v.into();
2168            self
2169        }
2170    }
2171
2172    #[doc(hidden)]
2173    impl crate::RequestBuilder for GetOperation {
2174        fn request_options(&mut self) -> &mut crate::RequestOptions {
2175            &mut self.0.options
2176        }
2177    }
2178
2179    /// The request builder for [BusinessGlossaryService::delete_operation][crate::client::BusinessGlossaryService::delete_operation] calls.
2180    ///
2181    /// # Example
2182    /// ```
2183    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteOperation;
2184    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2185    ///
2186    /// let builder = prepare_request_builder();
2187    /// let response = builder.send().await?;
2188    /// # Ok(()) }
2189    ///
2190    /// fn prepare_request_builder() -> DeleteOperation {
2191    ///   # panic!();
2192    ///   // ... details omitted ...
2193    /// }
2194    /// ```
2195    #[derive(Clone, Debug)]
2196    pub struct DeleteOperation(
2197        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
2198    );
2199
2200    impl DeleteOperation {
2201        pub(crate) fn new(
2202            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2203        ) -> Self {
2204            Self(RequestBuilder::new(stub))
2205        }
2206
2207        /// Sets the full request, replacing any prior values.
2208        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
2209            mut self,
2210            v: V,
2211        ) -> Self {
2212            self.0.request = v.into();
2213            self
2214        }
2215
2216        /// Sets all the options, replacing any prior values.
2217        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2218            self.0.options = v.into();
2219            self
2220        }
2221
2222        /// Sends the request.
2223        pub async fn send(self) -> Result<()> {
2224            (*self.0.stub)
2225                .delete_operation(self.0.request, self.0.options)
2226                .await
2227                .map(crate::Response::into_body)
2228        }
2229
2230        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
2231        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2232            self.0.request.name = v.into();
2233            self
2234        }
2235    }
2236
2237    #[doc(hidden)]
2238    impl crate::RequestBuilder for DeleteOperation {
2239        fn request_options(&mut self) -> &mut crate::RequestOptions {
2240            &mut self.0.options
2241        }
2242    }
2243
2244    /// The request builder for [BusinessGlossaryService::cancel_operation][crate::client::BusinessGlossaryService::cancel_operation] calls.
2245    ///
2246    /// # Example
2247    /// ```
2248    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CancelOperation;
2249    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2250    ///
2251    /// let builder = prepare_request_builder();
2252    /// let response = builder.send().await?;
2253    /// # Ok(()) }
2254    ///
2255    /// fn prepare_request_builder() -> CancelOperation {
2256    ///   # panic!();
2257    ///   // ... details omitted ...
2258    /// }
2259    /// ```
2260    #[derive(Clone, Debug)]
2261    pub struct CancelOperation(
2262        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
2263    );
2264
2265    impl CancelOperation {
2266        pub(crate) fn new(
2267            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2268        ) -> Self {
2269            Self(RequestBuilder::new(stub))
2270        }
2271
2272        /// Sets the full request, replacing any prior values.
2273        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
2274            mut self,
2275            v: V,
2276        ) -> Self {
2277            self.0.request = v.into();
2278            self
2279        }
2280
2281        /// Sets all the options, replacing any prior values.
2282        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2283            self.0.options = v.into();
2284            self
2285        }
2286
2287        /// Sends the request.
2288        pub async fn send(self) -> Result<()> {
2289            (*self.0.stub)
2290                .cancel_operation(self.0.request, self.0.options)
2291                .await
2292                .map(crate::Response::into_body)
2293        }
2294
2295        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
2296        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2297            self.0.request.name = v.into();
2298            self
2299        }
2300    }
2301
2302    #[doc(hidden)]
2303    impl crate::RequestBuilder for CancelOperation {
2304        fn request_options(&mut self) -> &mut crate::RequestOptions {
2305            &mut self.0.options
2306        }
2307    }
2308}
2309
2310/// Request and client builders for [CatalogService][crate::client::CatalogService].
2311pub mod catalog_service {
2312    use crate::Result;
2313
2314    /// A builder for [CatalogService][crate::client::CatalogService].
2315    ///
2316    /// ```
2317    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
2318    /// # use google_cloud_dataplex_v1::*;
2319    /// # use builder::catalog_service::ClientBuilder;
2320    /// # use client::CatalogService;
2321    /// let builder : ClientBuilder = CatalogService::builder();
2322    /// let client = builder
2323    ///     .with_endpoint("https://dataplex.googleapis.com")
2324    ///     .build().await?;
2325    /// # Ok(()) }
2326    /// ```
2327    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
2328
2329    pub(crate) mod client {
2330        use super::super::super::client::CatalogService;
2331        pub struct Factory;
2332        impl crate::ClientFactory for Factory {
2333            type Client = CatalogService;
2334            type Credentials = gaxi::options::Credentials;
2335            async fn build(
2336                self,
2337                config: gaxi::options::ClientConfig,
2338            ) -> crate::ClientBuilderResult<Self::Client> {
2339                Self::Client::new(config).await
2340            }
2341        }
2342    }
2343
2344    /// Common implementation for [crate::client::CatalogService] request builders.
2345    #[derive(Clone, Debug)]
2346    pub(crate) struct RequestBuilder<R: std::default::Default> {
2347        stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2348        request: R,
2349        options: crate::RequestOptions,
2350    }
2351
2352    impl<R> RequestBuilder<R>
2353    where
2354        R: std::default::Default,
2355    {
2356        pub(crate) fn new(
2357            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2358        ) -> Self {
2359            Self {
2360                stub,
2361                request: R::default(),
2362                options: crate::RequestOptions::default(),
2363            }
2364        }
2365    }
2366
2367    /// The request builder for [CatalogService::create_entry_type][crate::client::CatalogService::create_entry_type] calls.
2368    ///
2369    /// # Example
2370    /// ```
2371    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntryType;
2372    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2373    /// use google_cloud_lro::Poller;
2374    ///
2375    /// let builder = prepare_request_builder();
2376    /// let response = builder.poller().until_done().await?;
2377    /// # Ok(()) }
2378    ///
2379    /// fn prepare_request_builder() -> CreateEntryType {
2380    ///   # panic!();
2381    ///   // ... details omitted ...
2382    /// }
2383    /// ```
2384    #[derive(Clone, Debug)]
2385    pub struct CreateEntryType(RequestBuilder<crate::model::CreateEntryTypeRequest>);
2386
2387    impl CreateEntryType {
2388        pub(crate) fn new(
2389            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2390        ) -> Self {
2391            Self(RequestBuilder::new(stub))
2392        }
2393
2394        /// Sets the full request, replacing any prior values.
2395        pub fn with_request<V: Into<crate::model::CreateEntryTypeRequest>>(mut self, v: V) -> Self {
2396            self.0.request = v.into();
2397            self
2398        }
2399
2400        /// Sets all the options, replacing any prior values.
2401        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2402            self.0.options = v.into();
2403            self
2404        }
2405
2406        /// Sends the request.
2407        ///
2408        /// # Long running operations
2409        ///
2410        /// This starts, but does not poll, a longrunning operation. More information
2411        /// on [create_entry_type][crate::client::CatalogService::create_entry_type].
2412        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2413            (*self.0.stub)
2414                .create_entry_type(self.0.request, self.0.options)
2415                .await
2416                .map(crate::Response::into_body)
2417        }
2418
2419        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_entry_type`.
2420        pub fn poller(
2421            self,
2422        ) -> impl google_cloud_lro::Poller<crate::model::EntryType, crate::model::OperationMetadata>
2423        {
2424            type Operation = google_cloud_lro::internal::Operation<
2425                crate::model::EntryType,
2426                crate::model::OperationMetadata,
2427            >;
2428            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2429            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2430
2431            let stub = self.0.stub.clone();
2432            let mut options = self.0.options.clone();
2433            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2434            let query = move |name| {
2435                let stub = stub.clone();
2436                let options = options.clone();
2437                async {
2438                    let op = GetOperation::new(stub)
2439                        .set_name(name)
2440                        .with_options(options)
2441                        .send()
2442                        .await?;
2443                    Ok(Operation::new(op))
2444                }
2445            };
2446
2447            let start = move || async {
2448                let op = self.send().await?;
2449                Ok(Operation::new(op))
2450            };
2451
2452            google_cloud_lro::internal::new_poller(
2453                polling_error_policy,
2454                polling_backoff_policy,
2455                start,
2456                query,
2457            )
2458        }
2459
2460        /// Sets the value of [parent][crate::model::CreateEntryTypeRequest::parent].
2461        ///
2462        /// This is a **required** field for requests.
2463        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2464            self.0.request.parent = v.into();
2465            self
2466        }
2467
2468        /// Sets the value of [entry_type_id][crate::model::CreateEntryTypeRequest::entry_type_id].
2469        ///
2470        /// This is a **required** field for requests.
2471        pub fn set_entry_type_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2472            self.0.request.entry_type_id = v.into();
2473            self
2474        }
2475
2476        /// Sets the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
2477        ///
2478        /// This is a **required** field for requests.
2479        pub fn set_entry_type<T>(mut self, v: T) -> Self
2480        where
2481            T: std::convert::Into<crate::model::EntryType>,
2482        {
2483            self.0.request.entry_type = std::option::Option::Some(v.into());
2484            self
2485        }
2486
2487        /// Sets or clears the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
2488        ///
2489        /// This is a **required** field for requests.
2490        pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
2491        where
2492            T: std::convert::Into<crate::model::EntryType>,
2493        {
2494            self.0.request.entry_type = v.map(|x| x.into());
2495            self
2496        }
2497
2498        /// Sets the value of [validate_only][crate::model::CreateEntryTypeRequest::validate_only].
2499        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2500            self.0.request.validate_only = v.into();
2501            self
2502        }
2503    }
2504
2505    #[doc(hidden)]
2506    impl crate::RequestBuilder for CreateEntryType {
2507        fn request_options(&mut self) -> &mut crate::RequestOptions {
2508            &mut self.0.options
2509        }
2510    }
2511
2512    /// The request builder for [CatalogService::update_entry_type][crate::client::CatalogService::update_entry_type] calls.
2513    ///
2514    /// # Example
2515    /// ```
2516    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntryType;
2517    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2518    /// use google_cloud_lro::Poller;
2519    ///
2520    /// let builder = prepare_request_builder();
2521    /// let response = builder.poller().until_done().await?;
2522    /// # Ok(()) }
2523    ///
2524    /// fn prepare_request_builder() -> UpdateEntryType {
2525    ///   # panic!();
2526    ///   // ... details omitted ...
2527    /// }
2528    /// ```
2529    #[derive(Clone, Debug)]
2530    pub struct UpdateEntryType(RequestBuilder<crate::model::UpdateEntryTypeRequest>);
2531
2532    impl UpdateEntryType {
2533        pub(crate) fn new(
2534            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2535        ) -> Self {
2536            Self(RequestBuilder::new(stub))
2537        }
2538
2539        /// Sets the full request, replacing any prior values.
2540        pub fn with_request<V: Into<crate::model::UpdateEntryTypeRequest>>(mut self, v: V) -> Self {
2541            self.0.request = v.into();
2542            self
2543        }
2544
2545        /// Sets all the options, replacing any prior values.
2546        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2547            self.0.options = v.into();
2548            self
2549        }
2550
2551        /// Sends the request.
2552        ///
2553        /// # Long running operations
2554        ///
2555        /// This starts, but does not poll, a longrunning operation. More information
2556        /// on [update_entry_type][crate::client::CatalogService::update_entry_type].
2557        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2558            (*self.0.stub)
2559                .update_entry_type(self.0.request, self.0.options)
2560                .await
2561                .map(crate::Response::into_body)
2562        }
2563
2564        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_entry_type`.
2565        pub fn poller(
2566            self,
2567        ) -> impl google_cloud_lro::Poller<crate::model::EntryType, crate::model::OperationMetadata>
2568        {
2569            type Operation = google_cloud_lro::internal::Operation<
2570                crate::model::EntryType,
2571                crate::model::OperationMetadata,
2572            >;
2573            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2574            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2575
2576            let stub = self.0.stub.clone();
2577            let mut options = self.0.options.clone();
2578            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2579            let query = move |name| {
2580                let stub = stub.clone();
2581                let options = options.clone();
2582                async {
2583                    let op = GetOperation::new(stub)
2584                        .set_name(name)
2585                        .with_options(options)
2586                        .send()
2587                        .await?;
2588                    Ok(Operation::new(op))
2589                }
2590            };
2591
2592            let start = move || async {
2593                let op = self.send().await?;
2594                Ok(Operation::new(op))
2595            };
2596
2597            google_cloud_lro::internal::new_poller(
2598                polling_error_policy,
2599                polling_backoff_policy,
2600                start,
2601                query,
2602            )
2603        }
2604
2605        /// Sets the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
2606        ///
2607        /// This is a **required** field for requests.
2608        pub fn set_entry_type<T>(mut self, v: T) -> Self
2609        where
2610            T: std::convert::Into<crate::model::EntryType>,
2611        {
2612            self.0.request.entry_type = std::option::Option::Some(v.into());
2613            self
2614        }
2615
2616        /// Sets or clears the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
2617        ///
2618        /// This is a **required** field for requests.
2619        pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
2620        where
2621            T: std::convert::Into<crate::model::EntryType>,
2622        {
2623            self.0.request.entry_type = v.map(|x| x.into());
2624            self
2625        }
2626
2627        /// Sets the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
2628        ///
2629        /// This is a **required** field for requests.
2630        pub fn set_update_mask<T>(mut self, v: T) -> Self
2631        where
2632            T: std::convert::Into<wkt::FieldMask>,
2633        {
2634            self.0.request.update_mask = std::option::Option::Some(v.into());
2635            self
2636        }
2637
2638        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
2639        ///
2640        /// This is a **required** field for requests.
2641        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2642        where
2643            T: std::convert::Into<wkt::FieldMask>,
2644        {
2645            self.0.request.update_mask = v.map(|x| x.into());
2646            self
2647        }
2648
2649        /// Sets the value of [validate_only][crate::model::UpdateEntryTypeRequest::validate_only].
2650        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2651            self.0.request.validate_only = v.into();
2652            self
2653        }
2654    }
2655
2656    #[doc(hidden)]
2657    impl crate::RequestBuilder for UpdateEntryType {
2658        fn request_options(&mut self) -> &mut crate::RequestOptions {
2659            &mut self.0.options
2660        }
2661    }
2662
2663    /// The request builder for [CatalogService::delete_entry_type][crate::client::CatalogService::delete_entry_type] calls.
2664    ///
2665    /// # Example
2666    /// ```
2667    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntryType;
2668    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2669    /// use google_cloud_lro::Poller;
2670    ///
2671    /// let builder = prepare_request_builder();
2672    /// let response = builder.poller().until_done().await?;
2673    /// # Ok(()) }
2674    ///
2675    /// fn prepare_request_builder() -> DeleteEntryType {
2676    ///   # panic!();
2677    ///   // ... details omitted ...
2678    /// }
2679    /// ```
2680    #[derive(Clone, Debug)]
2681    pub struct DeleteEntryType(RequestBuilder<crate::model::DeleteEntryTypeRequest>);
2682
2683    impl DeleteEntryType {
2684        pub(crate) fn new(
2685            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2686        ) -> Self {
2687            Self(RequestBuilder::new(stub))
2688        }
2689
2690        /// Sets the full request, replacing any prior values.
2691        pub fn with_request<V: Into<crate::model::DeleteEntryTypeRequest>>(mut self, v: V) -> Self {
2692            self.0.request = v.into();
2693            self
2694        }
2695
2696        /// Sets all the options, replacing any prior values.
2697        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2698            self.0.options = v.into();
2699            self
2700        }
2701
2702        /// Sends the request.
2703        ///
2704        /// # Long running operations
2705        ///
2706        /// This starts, but does not poll, a longrunning operation. More information
2707        /// on [delete_entry_type][crate::client::CatalogService::delete_entry_type].
2708        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2709            (*self.0.stub)
2710                .delete_entry_type(self.0.request, self.0.options)
2711                .await
2712                .map(crate::Response::into_body)
2713        }
2714
2715        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_entry_type`.
2716        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2717            type Operation =
2718                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2719            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2720            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2721
2722            let stub = self.0.stub.clone();
2723            let mut options = self.0.options.clone();
2724            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2725            let query = move |name| {
2726                let stub = stub.clone();
2727                let options = options.clone();
2728                async {
2729                    let op = GetOperation::new(stub)
2730                        .set_name(name)
2731                        .with_options(options)
2732                        .send()
2733                        .await?;
2734                    Ok(Operation::new(op))
2735                }
2736            };
2737
2738            let start = move || async {
2739                let op = self.send().await?;
2740                Ok(Operation::new(op))
2741            };
2742
2743            google_cloud_lro::internal::new_unit_response_poller(
2744                polling_error_policy,
2745                polling_backoff_policy,
2746                start,
2747                query,
2748            )
2749        }
2750
2751        /// Sets the value of [name][crate::model::DeleteEntryTypeRequest::name].
2752        ///
2753        /// This is a **required** field for requests.
2754        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2755            self.0.request.name = v.into();
2756            self
2757        }
2758
2759        /// Sets the value of [etag][crate::model::DeleteEntryTypeRequest::etag].
2760        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
2761            self.0.request.etag = v.into();
2762            self
2763        }
2764    }
2765
2766    #[doc(hidden)]
2767    impl crate::RequestBuilder for DeleteEntryType {
2768        fn request_options(&mut self) -> &mut crate::RequestOptions {
2769            &mut self.0.options
2770        }
2771    }
2772
2773    /// The request builder for [CatalogService::list_entry_types][crate::client::CatalogService::list_entry_types] calls.
2774    ///
2775    /// # Example
2776    /// ```
2777    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListEntryTypes;
2778    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2779    /// use google_cloud_gax::paginator::ItemPaginator;
2780    ///
2781    /// let builder = prepare_request_builder();
2782    /// let mut items = builder.by_item();
2783    /// while let Some(result) = items.next().await {
2784    ///   let item = result?;
2785    /// }
2786    /// # Ok(()) }
2787    ///
2788    /// fn prepare_request_builder() -> ListEntryTypes {
2789    ///   # panic!();
2790    ///   // ... details omitted ...
2791    /// }
2792    /// ```
2793    #[derive(Clone, Debug)]
2794    pub struct ListEntryTypes(RequestBuilder<crate::model::ListEntryTypesRequest>);
2795
2796    impl ListEntryTypes {
2797        pub(crate) fn new(
2798            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2799        ) -> Self {
2800            Self(RequestBuilder::new(stub))
2801        }
2802
2803        /// Sets the full request, replacing any prior values.
2804        pub fn with_request<V: Into<crate::model::ListEntryTypesRequest>>(mut self, v: V) -> Self {
2805            self.0.request = v.into();
2806            self
2807        }
2808
2809        /// Sets all the options, replacing any prior values.
2810        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2811            self.0.options = v.into();
2812            self
2813        }
2814
2815        /// Sends the request.
2816        pub async fn send(self) -> Result<crate::model::ListEntryTypesResponse> {
2817            (*self.0.stub)
2818                .list_entry_types(self.0.request, self.0.options)
2819                .await
2820                .map(crate::Response::into_body)
2821        }
2822
2823        /// Streams each page in the collection.
2824        pub fn by_page(
2825            self,
2826        ) -> impl google_cloud_gax::paginator::Paginator<
2827            crate::model::ListEntryTypesResponse,
2828            crate::Error,
2829        > {
2830            use std::clone::Clone;
2831            let token = self.0.request.page_token.clone();
2832            let execute = move |token: String| {
2833                let mut builder = self.clone();
2834                builder.0.request = builder.0.request.set_page_token(token);
2835                builder.send()
2836            };
2837            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2838        }
2839
2840        /// Streams each item in the collection.
2841        pub fn by_item(
2842            self,
2843        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2844            crate::model::ListEntryTypesResponse,
2845            crate::Error,
2846        > {
2847            use google_cloud_gax::paginator::Paginator;
2848            self.by_page().items()
2849        }
2850
2851        /// Sets the value of [parent][crate::model::ListEntryTypesRequest::parent].
2852        ///
2853        /// This is a **required** field for requests.
2854        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2855            self.0.request.parent = v.into();
2856            self
2857        }
2858
2859        /// Sets the value of [page_size][crate::model::ListEntryTypesRequest::page_size].
2860        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2861            self.0.request.page_size = v.into();
2862            self
2863        }
2864
2865        /// Sets the value of [page_token][crate::model::ListEntryTypesRequest::page_token].
2866        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2867            self.0.request.page_token = v.into();
2868            self
2869        }
2870
2871        /// Sets the value of [filter][crate::model::ListEntryTypesRequest::filter].
2872        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2873            self.0.request.filter = v.into();
2874            self
2875        }
2876
2877        /// Sets the value of [order_by][crate::model::ListEntryTypesRequest::order_by].
2878        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2879            self.0.request.order_by = v.into();
2880            self
2881        }
2882    }
2883
2884    #[doc(hidden)]
2885    impl crate::RequestBuilder for ListEntryTypes {
2886        fn request_options(&mut self) -> &mut crate::RequestOptions {
2887            &mut self.0.options
2888        }
2889    }
2890
2891    /// The request builder for [CatalogService::get_entry_type][crate::client::CatalogService::get_entry_type] calls.
2892    ///
2893    /// # Example
2894    /// ```
2895    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntryType;
2896    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2897    ///
2898    /// let builder = prepare_request_builder();
2899    /// let response = builder.send().await?;
2900    /// # Ok(()) }
2901    ///
2902    /// fn prepare_request_builder() -> GetEntryType {
2903    ///   # panic!();
2904    ///   // ... details omitted ...
2905    /// }
2906    /// ```
2907    #[derive(Clone, Debug)]
2908    pub struct GetEntryType(RequestBuilder<crate::model::GetEntryTypeRequest>);
2909
2910    impl GetEntryType {
2911        pub(crate) fn new(
2912            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2913        ) -> Self {
2914            Self(RequestBuilder::new(stub))
2915        }
2916
2917        /// Sets the full request, replacing any prior values.
2918        pub fn with_request<V: Into<crate::model::GetEntryTypeRequest>>(mut self, v: V) -> Self {
2919            self.0.request = v.into();
2920            self
2921        }
2922
2923        /// Sets all the options, replacing any prior values.
2924        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2925            self.0.options = v.into();
2926            self
2927        }
2928
2929        /// Sends the request.
2930        pub async fn send(self) -> Result<crate::model::EntryType> {
2931            (*self.0.stub)
2932                .get_entry_type(self.0.request, self.0.options)
2933                .await
2934                .map(crate::Response::into_body)
2935        }
2936
2937        /// Sets the value of [name][crate::model::GetEntryTypeRequest::name].
2938        ///
2939        /// This is a **required** field for requests.
2940        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2941            self.0.request.name = v.into();
2942            self
2943        }
2944    }
2945
2946    #[doc(hidden)]
2947    impl crate::RequestBuilder for GetEntryType {
2948        fn request_options(&mut self) -> &mut crate::RequestOptions {
2949            &mut self.0.options
2950        }
2951    }
2952
2953    /// The request builder for [CatalogService::create_aspect_type][crate::client::CatalogService::create_aspect_type] calls.
2954    ///
2955    /// # Example
2956    /// ```
2957    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateAspectType;
2958    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2959    /// use google_cloud_lro::Poller;
2960    ///
2961    /// let builder = prepare_request_builder();
2962    /// let response = builder.poller().until_done().await?;
2963    /// # Ok(()) }
2964    ///
2965    /// fn prepare_request_builder() -> CreateAspectType {
2966    ///   # panic!();
2967    ///   // ... details omitted ...
2968    /// }
2969    /// ```
2970    #[derive(Clone, Debug)]
2971    pub struct CreateAspectType(RequestBuilder<crate::model::CreateAspectTypeRequest>);
2972
2973    impl CreateAspectType {
2974        pub(crate) fn new(
2975            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2976        ) -> Self {
2977            Self(RequestBuilder::new(stub))
2978        }
2979
2980        /// Sets the full request, replacing any prior values.
2981        pub fn with_request<V: Into<crate::model::CreateAspectTypeRequest>>(
2982            mut self,
2983            v: V,
2984        ) -> Self {
2985            self.0.request = v.into();
2986            self
2987        }
2988
2989        /// Sets all the options, replacing any prior values.
2990        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2991            self.0.options = v.into();
2992            self
2993        }
2994
2995        /// Sends the request.
2996        ///
2997        /// # Long running operations
2998        ///
2999        /// This starts, but does not poll, a longrunning operation. More information
3000        /// on [create_aspect_type][crate::client::CatalogService::create_aspect_type].
3001        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3002            (*self.0.stub)
3003                .create_aspect_type(self.0.request, self.0.options)
3004                .await
3005                .map(crate::Response::into_body)
3006        }
3007
3008        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_aspect_type`.
3009        pub fn poller(
3010            self,
3011        ) -> impl google_cloud_lro::Poller<crate::model::AspectType, crate::model::OperationMetadata>
3012        {
3013            type Operation = google_cloud_lro::internal::Operation<
3014                crate::model::AspectType,
3015                crate::model::OperationMetadata,
3016            >;
3017            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3018            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3019
3020            let stub = self.0.stub.clone();
3021            let mut options = self.0.options.clone();
3022            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3023            let query = move |name| {
3024                let stub = stub.clone();
3025                let options = options.clone();
3026                async {
3027                    let op = GetOperation::new(stub)
3028                        .set_name(name)
3029                        .with_options(options)
3030                        .send()
3031                        .await?;
3032                    Ok(Operation::new(op))
3033                }
3034            };
3035
3036            let start = move || async {
3037                let op = self.send().await?;
3038                Ok(Operation::new(op))
3039            };
3040
3041            google_cloud_lro::internal::new_poller(
3042                polling_error_policy,
3043                polling_backoff_policy,
3044                start,
3045                query,
3046            )
3047        }
3048
3049        /// Sets the value of [parent][crate::model::CreateAspectTypeRequest::parent].
3050        ///
3051        /// This is a **required** field for requests.
3052        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3053            self.0.request.parent = v.into();
3054            self
3055        }
3056
3057        /// Sets the value of [aspect_type_id][crate::model::CreateAspectTypeRequest::aspect_type_id].
3058        ///
3059        /// This is a **required** field for requests.
3060        pub fn set_aspect_type_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3061            self.0.request.aspect_type_id = v.into();
3062            self
3063        }
3064
3065        /// Sets the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
3066        ///
3067        /// This is a **required** field for requests.
3068        pub fn set_aspect_type<T>(mut self, v: T) -> Self
3069        where
3070            T: std::convert::Into<crate::model::AspectType>,
3071        {
3072            self.0.request.aspect_type = std::option::Option::Some(v.into());
3073            self
3074        }
3075
3076        /// Sets or clears the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
3077        ///
3078        /// This is a **required** field for requests.
3079        pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
3080        where
3081            T: std::convert::Into<crate::model::AspectType>,
3082        {
3083            self.0.request.aspect_type = v.map(|x| x.into());
3084            self
3085        }
3086
3087        /// Sets the value of [validate_only][crate::model::CreateAspectTypeRequest::validate_only].
3088        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3089            self.0.request.validate_only = v.into();
3090            self
3091        }
3092    }
3093
3094    #[doc(hidden)]
3095    impl crate::RequestBuilder for CreateAspectType {
3096        fn request_options(&mut self) -> &mut crate::RequestOptions {
3097            &mut self.0.options
3098        }
3099    }
3100
3101    /// The request builder for [CatalogService::update_aspect_type][crate::client::CatalogService::update_aspect_type] calls.
3102    ///
3103    /// # Example
3104    /// ```
3105    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateAspectType;
3106    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3107    /// use google_cloud_lro::Poller;
3108    ///
3109    /// let builder = prepare_request_builder();
3110    /// let response = builder.poller().until_done().await?;
3111    /// # Ok(()) }
3112    ///
3113    /// fn prepare_request_builder() -> UpdateAspectType {
3114    ///   # panic!();
3115    ///   // ... details omitted ...
3116    /// }
3117    /// ```
3118    #[derive(Clone, Debug)]
3119    pub struct UpdateAspectType(RequestBuilder<crate::model::UpdateAspectTypeRequest>);
3120
3121    impl UpdateAspectType {
3122        pub(crate) fn new(
3123            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3124        ) -> Self {
3125            Self(RequestBuilder::new(stub))
3126        }
3127
3128        /// Sets the full request, replacing any prior values.
3129        pub fn with_request<V: Into<crate::model::UpdateAspectTypeRequest>>(
3130            mut self,
3131            v: V,
3132        ) -> Self {
3133            self.0.request = v.into();
3134            self
3135        }
3136
3137        /// Sets all the options, replacing any prior values.
3138        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3139            self.0.options = v.into();
3140            self
3141        }
3142
3143        /// Sends the request.
3144        ///
3145        /// # Long running operations
3146        ///
3147        /// This starts, but does not poll, a longrunning operation. More information
3148        /// on [update_aspect_type][crate::client::CatalogService::update_aspect_type].
3149        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3150            (*self.0.stub)
3151                .update_aspect_type(self.0.request, self.0.options)
3152                .await
3153                .map(crate::Response::into_body)
3154        }
3155
3156        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_aspect_type`.
3157        pub fn poller(
3158            self,
3159        ) -> impl google_cloud_lro::Poller<crate::model::AspectType, crate::model::OperationMetadata>
3160        {
3161            type Operation = google_cloud_lro::internal::Operation<
3162                crate::model::AspectType,
3163                crate::model::OperationMetadata,
3164            >;
3165            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3166            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3167
3168            let stub = self.0.stub.clone();
3169            let mut options = self.0.options.clone();
3170            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3171            let query = move |name| {
3172                let stub = stub.clone();
3173                let options = options.clone();
3174                async {
3175                    let op = GetOperation::new(stub)
3176                        .set_name(name)
3177                        .with_options(options)
3178                        .send()
3179                        .await?;
3180                    Ok(Operation::new(op))
3181                }
3182            };
3183
3184            let start = move || async {
3185                let op = self.send().await?;
3186                Ok(Operation::new(op))
3187            };
3188
3189            google_cloud_lro::internal::new_poller(
3190                polling_error_policy,
3191                polling_backoff_policy,
3192                start,
3193                query,
3194            )
3195        }
3196
3197        /// Sets the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
3198        ///
3199        /// This is a **required** field for requests.
3200        pub fn set_aspect_type<T>(mut self, v: T) -> Self
3201        where
3202            T: std::convert::Into<crate::model::AspectType>,
3203        {
3204            self.0.request.aspect_type = std::option::Option::Some(v.into());
3205            self
3206        }
3207
3208        /// Sets or clears the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
3209        ///
3210        /// This is a **required** field for requests.
3211        pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
3212        where
3213            T: std::convert::Into<crate::model::AspectType>,
3214        {
3215            self.0.request.aspect_type = v.map(|x| x.into());
3216            self
3217        }
3218
3219        /// Sets the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
3220        ///
3221        /// This is a **required** field for requests.
3222        pub fn set_update_mask<T>(mut self, v: T) -> Self
3223        where
3224            T: std::convert::Into<wkt::FieldMask>,
3225        {
3226            self.0.request.update_mask = std::option::Option::Some(v.into());
3227            self
3228        }
3229
3230        /// Sets or clears the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
3231        ///
3232        /// This is a **required** field for requests.
3233        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3234        where
3235            T: std::convert::Into<wkt::FieldMask>,
3236        {
3237            self.0.request.update_mask = v.map(|x| x.into());
3238            self
3239        }
3240
3241        /// Sets the value of [validate_only][crate::model::UpdateAspectTypeRequest::validate_only].
3242        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3243            self.0.request.validate_only = v.into();
3244            self
3245        }
3246    }
3247
3248    #[doc(hidden)]
3249    impl crate::RequestBuilder for UpdateAspectType {
3250        fn request_options(&mut self) -> &mut crate::RequestOptions {
3251            &mut self.0.options
3252        }
3253    }
3254
3255    /// The request builder for [CatalogService::delete_aspect_type][crate::client::CatalogService::delete_aspect_type] calls.
3256    ///
3257    /// # Example
3258    /// ```
3259    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteAspectType;
3260    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3261    /// use google_cloud_lro::Poller;
3262    ///
3263    /// let builder = prepare_request_builder();
3264    /// let response = builder.poller().until_done().await?;
3265    /// # Ok(()) }
3266    ///
3267    /// fn prepare_request_builder() -> DeleteAspectType {
3268    ///   # panic!();
3269    ///   // ... details omitted ...
3270    /// }
3271    /// ```
3272    #[derive(Clone, Debug)]
3273    pub struct DeleteAspectType(RequestBuilder<crate::model::DeleteAspectTypeRequest>);
3274
3275    impl DeleteAspectType {
3276        pub(crate) fn new(
3277            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3278        ) -> Self {
3279            Self(RequestBuilder::new(stub))
3280        }
3281
3282        /// Sets the full request, replacing any prior values.
3283        pub fn with_request<V: Into<crate::model::DeleteAspectTypeRequest>>(
3284            mut self,
3285            v: V,
3286        ) -> Self {
3287            self.0.request = v.into();
3288            self
3289        }
3290
3291        /// Sets all the options, replacing any prior values.
3292        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3293            self.0.options = v.into();
3294            self
3295        }
3296
3297        /// Sends the request.
3298        ///
3299        /// # Long running operations
3300        ///
3301        /// This starts, but does not poll, a longrunning operation. More information
3302        /// on [delete_aspect_type][crate::client::CatalogService::delete_aspect_type].
3303        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3304            (*self.0.stub)
3305                .delete_aspect_type(self.0.request, self.0.options)
3306                .await
3307                .map(crate::Response::into_body)
3308        }
3309
3310        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_aspect_type`.
3311        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3312            type Operation =
3313                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3314            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3315            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3316
3317            let stub = self.0.stub.clone();
3318            let mut options = self.0.options.clone();
3319            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3320            let query = move |name| {
3321                let stub = stub.clone();
3322                let options = options.clone();
3323                async {
3324                    let op = GetOperation::new(stub)
3325                        .set_name(name)
3326                        .with_options(options)
3327                        .send()
3328                        .await?;
3329                    Ok(Operation::new(op))
3330                }
3331            };
3332
3333            let start = move || async {
3334                let op = self.send().await?;
3335                Ok(Operation::new(op))
3336            };
3337
3338            google_cloud_lro::internal::new_unit_response_poller(
3339                polling_error_policy,
3340                polling_backoff_policy,
3341                start,
3342                query,
3343            )
3344        }
3345
3346        /// Sets the value of [name][crate::model::DeleteAspectTypeRequest::name].
3347        ///
3348        /// This is a **required** field for requests.
3349        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3350            self.0.request.name = v.into();
3351            self
3352        }
3353
3354        /// Sets the value of [etag][crate::model::DeleteAspectTypeRequest::etag].
3355        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3356            self.0.request.etag = v.into();
3357            self
3358        }
3359    }
3360
3361    #[doc(hidden)]
3362    impl crate::RequestBuilder for DeleteAspectType {
3363        fn request_options(&mut self) -> &mut crate::RequestOptions {
3364            &mut self.0.options
3365        }
3366    }
3367
3368    /// The request builder for [CatalogService::list_aspect_types][crate::client::CatalogService::list_aspect_types] calls.
3369    ///
3370    /// # Example
3371    /// ```
3372    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListAspectTypes;
3373    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3374    /// use google_cloud_gax::paginator::ItemPaginator;
3375    ///
3376    /// let builder = prepare_request_builder();
3377    /// let mut items = builder.by_item();
3378    /// while let Some(result) = items.next().await {
3379    ///   let item = result?;
3380    /// }
3381    /// # Ok(()) }
3382    ///
3383    /// fn prepare_request_builder() -> ListAspectTypes {
3384    ///   # panic!();
3385    ///   // ... details omitted ...
3386    /// }
3387    /// ```
3388    #[derive(Clone, Debug)]
3389    pub struct ListAspectTypes(RequestBuilder<crate::model::ListAspectTypesRequest>);
3390
3391    impl ListAspectTypes {
3392        pub(crate) fn new(
3393            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3394        ) -> Self {
3395            Self(RequestBuilder::new(stub))
3396        }
3397
3398        /// Sets the full request, replacing any prior values.
3399        pub fn with_request<V: Into<crate::model::ListAspectTypesRequest>>(mut self, v: V) -> Self {
3400            self.0.request = v.into();
3401            self
3402        }
3403
3404        /// Sets all the options, replacing any prior values.
3405        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3406            self.0.options = v.into();
3407            self
3408        }
3409
3410        /// Sends the request.
3411        pub async fn send(self) -> Result<crate::model::ListAspectTypesResponse> {
3412            (*self.0.stub)
3413                .list_aspect_types(self.0.request, self.0.options)
3414                .await
3415                .map(crate::Response::into_body)
3416        }
3417
3418        /// Streams each page in the collection.
3419        pub fn by_page(
3420            self,
3421        ) -> impl google_cloud_gax::paginator::Paginator<
3422            crate::model::ListAspectTypesResponse,
3423            crate::Error,
3424        > {
3425            use std::clone::Clone;
3426            let token = self.0.request.page_token.clone();
3427            let execute = move |token: String| {
3428                let mut builder = self.clone();
3429                builder.0.request = builder.0.request.set_page_token(token);
3430                builder.send()
3431            };
3432            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3433        }
3434
3435        /// Streams each item in the collection.
3436        pub fn by_item(
3437            self,
3438        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3439            crate::model::ListAspectTypesResponse,
3440            crate::Error,
3441        > {
3442            use google_cloud_gax::paginator::Paginator;
3443            self.by_page().items()
3444        }
3445
3446        /// Sets the value of [parent][crate::model::ListAspectTypesRequest::parent].
3447        ///
3448        /// This is a **required** field for requests.
3449        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3450            self.0.request.parent = v.into();
3451            self
3452        }
3453
3454        /// Sets the value of [page_size][crate::model::ListAspectTypesRequest::page_size].
3455        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3456            self.0.request.page_size = v.into();
3457            self
3458        }
3459
3460        /// Sets the value of [page_token][crate::model::ListAspectTypesRequest::page_token].
3461        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3462            self.0.request.page_token = v.into();
3463            self
3464        }
3465
3466        /// Sets the value of [filter][crate::model::ListAspectTypesRequest::filter].
3467        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3468            self.0.request.filter = v.into();
3469            self
3470        }
3471
3472        /// Sets the value of [order_by][crate::model::ListAspectTypesRequest::order_by].
3473        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3474            self.0.request.order_by = v.into();
3475            self
3476        }
3477    }
3478
3479    #[doc(hidden)]
3480    impl crate::RequestBuilder for ListAspectTypes {
3481        fn request_options(&mut self) -> &mut crate::RequestOptions {
3482            &mut self.0.options
3483        }
3484    }
3485
3486    /// The request builder for [CatalogService::get_aspect_type][crate::client::CatalogService::get_aspect_type] calls.
3487    ///
3488    /// # Example
3489    /// ```
3490    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetAspectType;
3491    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3492    ///
3493    /// let builder = prepare_request_builder();
3494    /// let response = builder.send().await?;
3495    /// # Ok(()) }
3496    ///
3497    /// fn prepare_request_builder() -> GetAspectType {
3498    ///   # panic!();
3499    ///   // ... details omitted ...
3500    /// }
3501    /// ```
3502    #[derive(Clone, Debug)]
3503    pub struct GetAspectType(RequestBuilder<crate::model::GetAspectTypeRequest>);
3504
3505    impl GetAspectType {
3506        pub(crate) fn new(
3507            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3508        ) -> Self {
3509            Self(RequestBuilder::new(stub))
3510        }
3511
3512        /// Sets the full request, replacing any prior values.
3513        pub fn with_request<V: Into<crate::model::GetAspectTypeRequest>>(mut self, v: V) -> Self {
3514            self.0.request = v.into();
3515            self
3516        }
3517
3518        /// Sets all the options, replacing any prior values.
3519        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3520            self.0.options = v.into();
3521            self
3522        }
3523
3524        /// Sends the request.
3525        pub async fn send(self) -> Result<crate::model::AspectType> {
3526            (*self.0.stub)
3527                .get_aspect_type(self.0.request, self.0.options)
3528                .await
3529                .map(crate::Response::into_body)
3530        }
3531
3532        /// Sets the value of [name][crate::model::GetAspectTypeRequest::name].
3533        ///
3534        /// This is a **required** field for requests.
3535        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3536            self.0.request.name = v.into();
3537            self
3538        }
3539    }
3540
3541    #[doc(hidden)]
3542    impl crate::RequestBuilder for GetAspectType {
3543        fn request_options(&mut self) -> &mut crate::RequestOptions {
3544            &mut self.0.options
3545        }
3546    }
3547
3548    /// The request builder for [CatalogService::create_entry_group][crate::client::CatalogService::create_entry_group] calls.
3549    ///
3550    /// # Example
3551    /// ```
3552    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntryGroup;
3553    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3554    /// use google_cloud_lro::Poller;
3555    ///
3556    /// let builder = prepare_request_builder();
3557    /// let response = builder.poller().until_done().await?;
3558    /// # Ok(()) }
3559    ///
3560    /// fn prepare_request_builder() -> CreateEntryGroup {
3561    ///   # panic!();
3562    ///   // ... details omitted ...
3563    /// }
3564    /// ```
3565    #[derive(Clone, Debug)]
3566    pub struct CreateEntryGroup(RequestBuilder<crate::model::CreateEntryGroupRequest>);
3567
3568    impl CreateEntryGroup {
3569        pub(crate) fn new(
3570            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3571        ) -> Self {
3572            Self(RequestBuilder::new(stub))
3573        }
3574
3575        /// Sets the full request, replacing any prior values.
3576        pub fn with_request<V: Into<crate::model::CreateEntryGroupRequest>>(
3577            mut self,
3578            v: V,
3579        ) -> Self {
3580            self.0.request = v.into();
3581            self
3582        }
3583
3584        /// Sets all the options, replacing any prior values.
3585        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3586            self.0.options = v.into();
3587            self
3588        }
3589
3590        /// Sends the request.
3591        ///
3592        /// # Long running operations
3593        ///
3594        /// This starts, but does not poll, a longrunning operation. More information
3595        /// on [create_entry_group][crate::client::CatalogService::create_entry_group].
3596        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3597            (*self.0.stub)
3598                .create_entry_group(self.0.request, self.0.options)
3599                .await
3600                .map(crate::Response::into_body)
3601        }
3602
3603        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_entry_group`.
3604        pub fn poller(
3605            self,
3606        ) -> impl google_cloud_lro::Poller<crate::model::EntryGroup, crate::model::OperationMetadata>
3607        {
3608            type Operation = google_cloud_lro::internal::Operation<
3609                crate::model::EntryGroup,
3610                crate::model::OperationMetadata,
3611            >;
3612            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3613            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3614
3615            let stub = self.0.stub.clone();
3616            let mut options = self.0.options.clone();
3617            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3618            let query = move |name| {
3619                let stub = stub.clone();
3620                let options = options.clone();
3621                async {
3622                    let op = GetOperation::new(stub)
3623                        .set_name(name)
3624                        .with_options(options)
3625                        .send()
3626                        .await?;
3627                    Ok(Operation::new(op))
3628                }
3629            };
3630
3631            let start = move || async {
3632                let op = self.send().await?;
3633                Ok(Operation::new(op))
3634            };
3635
3636            google_cloud_lro::internal::new_poller(
3637                polling_error_policy,
3638                polling_backoff_policy,
3639                start,
3640                query,
3641            )
3642        }
3643
3644        /// Sets the value of [parent][crate::model::CreateEntryGroupRequest::parent].
3645        ///
3646        /// This is a **required** field for requests.
3647        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3648            self.0.request.parent = v.into();
3649            self
3650        }
3651
3652        /// Sets the value of [entry_group_id][crate::model::CreateEntryGroupRequest::entry_group_id].
3653        ///
3654        /// This is a **required** field for requests.
3655        pub fn set_entry_group_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3656            self.0.request.entry_group_id = v.into();
3657            self
3658        }
3659
3660        /// Sets the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
3661        ///
3662        /// This is a **required** field for requests.
3663        pub fn set_entry_group<T>(mut self, v: T) -> Self
3664        where
3665            T: std::convert::Into<crate::model::EntryGroup>,
3666        {
3667            self.0.request.entry_group = std::option::Option::Some(v.into());
3668            self
3669        }
3670
3671        /// Sets or clears the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
3672        ///
3673        /// This is a **required** field for requests.
3674        pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
3675        where
3676            T: std::convert::Into<crate::model::EntryGroup>,
3677        {
3678            self.0.request.entry_group = v.map(|x| x.into());
3679            self
3680        }
3681
3682        /// Sets the value of [validate_only][crate::model::CreateEntryGroupRequest::validate_only].
3683        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3684            self.0.request.validate_only = v.into();
3685            self
3686        }
3687    }
3688
3689    #[doc(hidden)]
3690    impl crate::RequestBuilder for CreateEntryGroup {
3691        fn request_options(&mut self) -> &mut crate::RequestOptions {
3692            &mut self.0.options
3693        }
3694    }
3695
3696    /// The request builder for [CatalogService::update_entry_group][crate::client::CatalogService::update_entry_group] calls.
3697    ///
3698    /// # Example
3699    /// ```
3700    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntryGroup;
3701    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3702    /// use google_cloud_lro::Poller;
3703    ///
3704    /// let builder = prepare_request_builder();
3705    /// let response = builder.poller().until_done().await?;
3706    /// # Ok(()) }
3707    ///
3708    /// fn prepare_request_builder() -> UpdateEntryGroup {
3709    ///   # panic!();
3710    ///   // ... details omitted ...
3711    /// }
3712    /// ```
3713    #[derive(Clone, Debug)]
3714    pub struct UpdateEntryGroup(RequestBuilder<crate::model::UpdateEntryGroupRequest>);
3715
3716    impl UpdateEntryGroup {
3717        pub(crate) fn new(
3718            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3719        ) -> Self {
3720            Self(RequestBuilder::new(stub))
3721        }
3722
3723        /// Sets the full request, replacing any prior values.
3724        pub fn with_request<V: Into<crate::model::UpdateEntryGroupRequest>>(
3725            mut self,
3726            v: V,
3727        ) -> Self {
3728            self.0.request = v.into();
3729            self
3730        }
3731
3732        /// Sets all the options, replacing any prior values.
3733        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3734            self.0.options = v.into();
3735            self
3736        }
3737
3738        /// Sends the request.
3739        ///
3740        /// # Long running operations
3741        ///
3742        /// This starts, but does not poll, a longrunning operation. More information
3743        /// on [update_entry_group][crate::client::CatalogService::update_entry_group].
3744        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3745            (*self.0.stub)
3746                .update_entry_group(self.0.request, self.0.options)
3747                .await
3748                .map(crate::Response::into_body)
3749        }
3750
3751        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_entry_group`.
3752        pub fn poller(
3753            self,
3754        ) -> impl google_cloud_lro::Poller<crate::model::EntryGroup, crate::model::OperationMetadata>
3755        {
3756            type Operation = google_cloud_lro::internal::Operation<
3757                crate::model::EntryGroup,
3758                crate::model::OperationMetadata,
3759            >;
3760            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3761            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3762
3763            let stub = self.0.stub.clone();
3764            let mut options = self.0.options.clone();
3765            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3766            let query = move |name| {
3767                let stub = stub.clone();
3768                let options = options.clone();
3769                async {
3770                    let op = GetOperation::new(stub)
3771                        .set_name(name)
3772                        .with_options(options)
3773                        .send()
3774                        .await?;
3775                    Ok(Operation::new(op))
3776                }
3777            };
3778
3779            let start = move || async {
3780                let op = self.send().await?;
3781                Ok(Operation::new(op))
3782            };
3783
3784            google_cloud_lro::internal::new_poller(
3785                polling_error_policy,
3786                polling_backoff_policy,
3787                start,
3788                query,
3789            )
3790        }
3791
3792        /// Sets the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
3793        ///
3794        /// This is a **required** field for requests.
3795        pub fn set_entry_group<T>(mut self, v: T) -> Self
3796        where
3797            T: std::convert::Into<crate::model::EntryGroup>,
3798        {
3799            self.0.request.entry_group = std::option::Option::Some(v.into());
3800            self
3801        }
3802
3803        /// Sets or clears the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
3804        ///
3805        /// This is a **required** field for requests.
3806        pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
3807        where
3808            T: std::convert::Into<crate::model::EntryGroup>,
3809        {
3810            self.0.request.entry_group = v.map(|x| x.into());
3811            self
3812        }
3813
3814        /// Sets the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
3815        ///
3816        /// This is a **required** field for requests.
3817        pub fn set_update_mask<T>(mut self, v: T) -> Self
3818        where
3819            T: std::convert::Into<wkt::FieldMask>,
3820        {
3821            self.0.request.update_mask = std::option::Option::Some(v.into());
3822            self
3823        }
3824
3825        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
3826        ///
3827        /// This is a **required** field for requests.
3828        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3829        where
3830            T: std::convert::Into<wkt::FieldMask>,
3831        {
3832            self.0.request.update_mask = v.map(|x| x.into());
3833            self
3834        }
3835
3836        /// Sets the value of [validate_only][crate::model::UpdateEntryGroupRequest::validate_only].
3837        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3838            self.0.request.validate_only = v.into();
3839            self
3840        }
3841    }
3842
3843    #[doc(hidden)]
3844    impl crate::RequestBuilder for UpdateEntryGroup {
3845        fn request_options(&mut self) -> &mut crate::RequestOptions {
3846            &mut self.0.options
3847        }
3848    }
3849
3850    /// The request builder for [CatalogService::delete_entry_group][crate::client::CatalogService::delete_entry_group] calls.
3851    ///
3852    /// # Example
3853    /// ```
3854    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntryGroup;
3855    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3856    /// use google_cloud_lro::Poller;
3857    ///
3858    /// let builder = prepare_request_builder();
3859    /// let response = builder.poller().until_done().await?;
3860    /// # Ok(()) }
3861    ///
3862    /// fn prepare_request_builder() -> DeleteEntryGroup {
3863    ///   # panic!();
3864    ///   // ... details omitted ...
3865    /// }
3866    /// ```
3867    #[derive(Clone, Debug)]
3868    pub struct DeleteEntryGroup(RequestBuilder<crate::model::DeleteEntryGroupRequest>);
3869
3870    impl DeleteEntryGroup {
3871        pub(crate) fn new(
3872            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3873        ) -> Self {
3874            Self(RequestBuilder::new(stub))
3875        }
3876
3877        /// Sets the full request, replacing any prior values.
3878        pub fn with_request<V: Into<crate::model::DeleteEntryGroupRequest>>(
3879            mut self,
3880            v: V,
3881        ) -> Self {
3882            self.0.request = v.into();
3883            self
3884        }
3885
3886        /// Sets all the options, replacing any prior values.
3887        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3888            self.0.options = v.into();
3889            self
3890        }
3891
3892        /// Sends the request.
3893        ///
3894        /// # Long running operations
3895        ///
3896        /// This starts, but does not poll, a longrunning operation. More information
3897        /// on [delete_entry_group][crate::client::CatalogService::delete_entry_group].
3898        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3899            (*self.0.stub)
3900                .delete_entry_group(self.0.request, self.0.options)
3901                .await
3902                .map(crate::Response::into_body)
3903        }
3904
3905        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_entry_group`.
3906        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3907            type Operation =
3908                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3909            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3910            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3911
3912            let stub = self.0.stub.clone();
3913            let mut options = self.0.options.clone();
3914            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3915            let query = move |name| {
3916                let stub = stub.clone();
3917                let options = options.clone();
3918                async {
3919                    let op = GetOperation::new(stub)
3920                        .set_name(name)
3921                        .with_options(options)
3922                        .send()
3923                        .await?;
3924                    Ok(Operation::new(op))
3925                }
3926            };
3927
3928            let start = move || async {
3929                let op = self.send().await?;
3930                Ok(Operation::new(op))
3931            };
3932
3933            google_cloud_lro::internal::new_unit_response_poller(
3934                polling_error_policy,
3935                polling_backoff_policy,
3936                start,
3937                query,
3938            )
3939        }
3940
3941        /// Sets the value of [name][crate::model::DeleteEntryGroupRequest::name].
3942        ///
3943        /// This is a **required** field for requests.
3944        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3945            self.0.request.name = v.into();
3946            self
3947        }
3948
3949        /// Sets the value of [etag][crate::model::DeleteEntryGroupRequest::etag].
3950        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3951            self.0.request.etag = v.into();
3952            self
3953        }
3954    }
3955
3956    #[doc(hidden)]
3957    impl crate::RequestBuilder for DeleteEntryGroup {
3958        fn request_options(&mut self) -> &mut crate::RequestOptions {
3959            &mut self.0.options
3960        }
3961    }
3962
3963    /// The request builder for [CatalogService::list_entry_groups][crate::client::CatalogService::list_entry_groups] calls.
3964    ///
3965    /// # Example
3966    /// ```
3967    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListEntryGroups;
3968    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3969    /// use google_cloud_gax::paginator::ItemPaginator;
3970    ///
3971    /// let builder = prepare_request_builder();
3972    /// let mut items = builder.by_item();
3973    /// while let Some(result) = items.next().await {
3974    ///   let item = result?;
3975    /// }
3976    /// # Ok(()) }
3977    ///
3978    /// fn prepare_request_builder() -> ListEntryGroups {
3979    ///   # panic!();
3980    ///   // ... details omitted ...
3981    /// }
3982    /// ```
3983    #[derive(Clone, Debug)]
3984    pub struct ListEntryGroups(RequestBuilder<crate::model::ListEntryGroupsRequest>);
3985
3986    impl ListEntryGroups {
3987        pub(crate) fn new(
3988            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3989        ) -> Self {
3990            Self(RequestBuilder::new(stub))
3991        }
3992
3993        /// Sets the full request, replacing any prior values.
3994        pub fn with_request<V: Into<crate::model::ListEntryGroupsRequest>>(mut self, v: V) -> Self {
3995            self.0.request = v.into();
3996            self
3997        }
3998
3999        /// Sets all the options, replacing any prior values.
4000        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4001            self.0.options = v.into();
4002            self
4003        }
4004
4005        /// Sends the request.
4006        pub async fn send(self) -> Result<crate::model::ListEntryGroupsResponse> {
4007            (*self.0.stub)
4008                .list_entry_groups(self.0.request, self.0.options)
4009                .await
4010                .map(crate::Response::into_body)
4011        }
4012
4013        /// Streams each page in the collection.
4014        pub fn by_page(
4015            self,
4016        ) -> impl google_cloud_gax::paginator::Paginator<
4017            crate::model::ListEntryGroupsResponse,
4018            crate::Error,
4019        > {
4020            use std::clone::Clone;
4021            let token = self.0.request.page_token.clone();
4022            let execute = move |token: String| {
4023                let mut builder = self.clone();
4024                builder.0.request = builder.0.request.set_page_token(token);
4025                builder.send()
4026            };
4027            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4028        }
4029
4030        /// Streams each item in the collection.
4031        pub fn by_item(
4032            self,
4033        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4034            crate::model::ListEntryGroupsResponse,
4035            crate::Error,
4036        > {
4037            use google_cloud_gax::paginator::Paginator;
4038            self.by_page().items()
4039        }
4040
4041        /// Sets the value of [parent][crate::model::ListEntryGroupsRequest::parent].
4042        ///
4043        /// This is a **required** field for requests.
4044        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4045            self.0.request.parent = v.into();
4046            self
4047        }
4048
4049        /// Sets the value of [page_size][crate::model::ListEntryGroupsRequest::page_size].
4050        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4051            self.0.request.page_size = v.into();
4052            self
4053        }
4054
4055        /// Sets the value of [page_token][crate::model::ListEntryGroupsRequest::page_token].
4056        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4057            self.0.request.page_token = v.into();
4058            self
4059        }
4060
4061        /// Sets the value of [filter][crate::model::ListEntryGroupsRequest::filter].
4062        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4063            self.0.request.filter = v.into();
4064            self
4065        }
4066
4067        /// Sets the value of [order_by][crate::model::ListEntryGroupsRequest::order_by].
4068        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4069            self.0.request.order_by = v.into();
4070            self
4071        }
4072    }
4073
4074    #[doc(hidden)]
4075    impl crate::RequestBuilder for ListEntryGroups {
4076        fn request_options(&mut self) -> &mut crate::RequestOptions {
4077            &mut self.0.options
4078        }
4079    }
4080
4081    /// The request builder for [CatalogService::get_entry_group][crate::client::CatalogService::get_entry_group] calls.
4082    ///
4083    /// # Example
4084    /// ```
4085    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntryGroup;
4086    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4087    ///
4088    /// let builder = prepare_request_builder();
4089    /// let response = builder.send().await?;
4090    /// # Ok(()) }
4091    ///
4092    /// fn prepare_request_builder() -> GetEntryGroup {
4093    ///   # panic!();
4094    ///   // ... details omitted ...
4095    /// }
4096    /// ```
4097    #[derive(Clone, Debug)]
4098    pub struct GetEntryGroup(RequestBuilder<crate::model::GetEntryGroupRequest>);
4099
4100    impl GetEntryGroup {
4101        pub(crate) fn new(
4102            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4103        ) -> Self {
4104            Self(RequestBuilder::new(stub))
4105        }
4106
4107        /// Sets the full request, replacing any prior values.
4108        pub fn with_request<V: Into<crate::model::GetEntryGroupRequest>>(mut self, v: V) -> Self {
4109            self.0.request = v.into();
4110            self
4111        }
4112
4113        /// Sets all the options, replacing any prior values.
4114        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4115            self.0.options = v.into();
4116            self
4117        }
4118
4119        /// Sends the request.
4120        pub async fn send(self) -> Result<crate::model::EntryGroup> {
4121            (*self.0.stub)
4122                .get_entry_group(self.0.request, self.0.options)
4123                .await
4124                .map(crate::Response::into_body)
4125        }
4126
4127        /// Sets the value of [name][crate::model::GetEntryGroupRequest::name].
4128        ///
4129        /// This is a **required** field for requests.
4130        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4131            self.0.request.name = v.into();
4132            self
4133        }
4134    }
4135
4136    #[doc(hidden)]
4137    impl crate::RequestBuilder for GetEntryGroup {
4138        fn request_options(&mut self) -> &mut crate::RequestOptions {
4139            &mut self.0.options
4140        }
4141    }
4142
4143    /// The request builder for [CatalogService::create_entry][crate::client::CatalogService::create_entry] calls.
4144    ///
4145    /// # Example
4146    /// ```
4147    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntry;
4148    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4149    ///
4150    /// let builder = prepare_request_builder();
4151    /// let response = builder.send().await?;
4152    /// # Ok(()) }
4153    ///
4154    /// fn prepare_request_builder() -> CreateEntry {
4155    ///   # panic!();
4156    ///   // ... details omitted ...
4157    /// }
4158    /// ```
4159    #[derive(Clone, Debug)]
4160    pub struct CreateEntry(RequestBuilder<crate::model::CreateEntryRequest>);
4161
4162    impl CreateEntry {
4163        pub(crate) fn new(
4164            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4165        ) -> Self {
4166            Self(RequestBuilder::new(stub))
4167        }
4168
4169        /// Sets the full request, replacing any prior values.
4170        pub fn with_request<V: Into<crate::model::CreateEntryRequest>>(mut self, v: V) -> Self {
4171            self.0.request = v.into();
4172            self
4173        }
4174
4175        /// Sets all the options, replacing any prior values.
4176        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4177            self.0.options = v.into();
4178            self
4179        }
4180
4181        /// Sends the request.
4182        pub async fn send(self) -> Result<crate::model::Entry> {
4183            (*self.0.stub)
4184                .create_entry(self.0.request, self.0.options)
4185                .await
4186                .map(crate::Response::into_body)
4187        }
4188
4189        /// Sets the value of [parent][crate::model::CreateEntryRequest::parent].
4190        ///
4191        /// This is a **required** field for requests.
4192        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4193            self.0.request.parent = v.into();
4194            self
4195        }
4196
4197        /// Sets the value of [entry_id][crate::model::CreateEntryRequest::entry_id].
4198        ///
4199        /// This is a **required** field for requests.
4200        pub fn set_entry_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4201            self.0.request.entry_id = v.into();
4202            self
4203        }
4204
4205        /// Sets the value of [entry][crate::model::CreateEntryRequest::entry].
4206        ///
4207        /// This is a **required** field for requests.
4208        pub fn set_entry<T>(mut self, v: T) -> Self
4209        where
4210            T: std::convert::Into<crate::model::Entry>,
4211        {
4212            self.0.request.entry = std::option::Option::Some(v.into());
4213            self
4214        }
4215
4216        /// Sets or clears the value of [entry][crate::model::CreateEntryRequest::entry].
4217        ///
4218        /// This is a **required** field for requests.
4219        pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
4220        where
4221            T: std::convert::Into<crate::model::Entry>,
4222        {
4223            self.0.request.entry = v.map(|x| x.into());
4224            self
4225        }
4226    }
4227
4228    #[doc(hidden)]
4229    impl crate::RequestBuilder for CreateEntry {
4230        fn request_options(&mut self) -> &mut crate::RequestOptions {
4231            &mut self.0.options
4232        }
4233    }
4234
4235    /// The request builder for [CatalogService::update_entry][crate::client::CatalogService::update_entry] calls.
4236    ///
4237    /// # Example
4238    /// ```
4239    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntry;
4240    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4241    ///
4242    /// let builder = prepare_request_builder();
4243    /// let response = builder.send().await?;
4244    /// # Ok(()) }
4245    ///
4246    /// fn prepare_request_builder() -> UpdateEntry {
4247    ///   # panic!();
4248    ///   // ... details omitted ...
4249    /// }
4250    /// ```
4251    #[derive(Clone, Debug)]
4252    pub struct UpdateEntry(RequestBuilder<crate::model::UpdateEntryRequest>);
4253
4254    impl UpdateEntry {
4255        pub(crate) fn new(
4256            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4257        ) -> Self {
4258            Self(RequestBuilder::new(stub))
4259        }
4260
4261        /// Sets the full request, replacing any prior values.
4262        pub fn with_request<V: Into<crate::model::UpdateEntryRequest>>(mut self, v: V) -> Self {
4263            self.0.request = v.into();
4264            self
4265        }
4266
4267        /// Sets all the options, replacing any prior values.
4268        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4269            self.0.options = v.into();
4270            self
4271        }
4272
4273        /// Sends the request.
4274        pub async fn send(self) -> Result<crate::model::Entry> {
4275            (*self.0.stub)
4276                .update_entry(self.0.request, self.0.options)
4277                .await
4278                .map(crate::Response::into_body)
4279        }
4280
4281        /// Sets the value of [entry][crate::model::UpdateEntryRequest::entry].
4282        ///
4283        /// This is a **required** field for requests.
4284        pub fn set_entry<T>(mut self, v: T) -> Self
4285        where
4286            T: std::convert::Into<crate::model::Entry>,
4287        {
4288            self.0.request.entry = std::option::Option::Some(v.into());
4289            self
4290        }
4291
4292        /// Sets or clears the value of [entry][crate::model::UpdateEntryRequest::entry].
4293        ///
4294        /// This is a **required** field for requests.
4295        pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
4296        where
4297            T: std::convert::Into<crate::model::Entry>,
4298        {
4299            self.0.request.entry = v.map(|x| x.into());
4300            self
4301        }
4302
4303        /// Sets the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
4304        pub fn set_update_mask<T>(mut self, v: T) -> Self
4305        where
4306            T: std::convert::Into<wkt::FieldMask>,
4307        {
4308            self.0.request.update_mask = std::option::Option::Some(v.into());
4309            self
4310        }
4311
4312        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
4313        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4314        where
4315            T: std::convert::Into<wkt::FieldMask>,
4316        {
4317            self.0.request.update_mask = v.map(|x| x.into());
4318            self
4319        }
4320
4321        /// Sets the value of [allow_missing][crate::model::UpdateEntryRequest::allow_missing].
4322        pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
4323            self.0.request.allow_missing = v.into();
4324            self
4325        }
4326
4327        /// Sets the value of [delete_missing_aspects][crate::model::UpdateEntryRequest::delete_missing_aspects].
4328        pub fn set_delete_missing_aspects<T: Into<bool>>(mut self, v: T) -> Self {
4329            self.0.request.delete_missing_aspects = v.into();
4330            self
4331        }
4332
4333        /// Sets the value of [aspect_keys][crate::model::UpdateEntryRequest::aspect_keys].
4334        pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
4335        where
4336            T: std::iter::IntoIterator<Item = V>,
4337            V: std::convert::Into<std::string::String>,
4338        {
4339            use std::iter::Iterator;
4340            self.0.request.aspect_keys = v.into_iter().map(|i| i.into()).collect();
4341            self
4342        }
4343    }
4344
4345    #[doc(hidden)]
4346    impl crate::RequestBuilder for UpdateEntry {
4347        fn request_options(&mut self) -> &mut crate::RequestOptions {
4348            &mut self.0.options
4349        }
4350    }
4351
4352    /// The request builder for [CatalogService::delete_entry][crate::client::CatalogService::delete_entry] calls.
4353    ///
4354    /// # Example
4355    /// ```
4356    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntry;
4357    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4358    ///
4359    /// let builder = prepare_request_builder();
4360    /// let response = builder.send().await?;
4361    /// # Ok(()) }
4362    ///
4363    /// fn prepare_request_builder() -> DeleteEntry {
4364    ///   # panic!();
4365    ///   // ... details omitted ...
4366    /// }
4367    /// ```
4368    #[derive(Clone, Debug)]
4369    pub struct DeleteEntry(RequestBuilder<crate::model::DeleteEntryRequest>);
4370
4371    impl DeleteEntry {
4372        pub(crate) fn new(
4373            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4374        ) -> Self {
4375            Self(RequestBuilder::new(stub))
4376        }
4377
4378        /// Sets the full request, replacing any prior values.
4379        pub fn with_request<V: Into<crate::model::DeleteEntryRequest>>(mut self, v: V) -> Self {
4380            self.0.request = v.into();
4381            self
4382        }
4383
4384        /// Sets all the options, replacing any prior values.
4385        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4386            self.0.options = v.into();
4387            self
4388        }
4389
4390        /// Sends the request.
4391        pub async fn send(self) -> Result<crate::model::Entry> {
4392            (*self.0.stub)
4393                .delete_entry(self.0.request, self.0.options)
4394                .await
4395                .map(crate::Response::into_body)
4396        }
4397
4398        /// Sets the value of [name][crate::model::DeleteEntryRequest::name].
4399        ///
4400        /// This is a **required** field for requests.
4401        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4402            self.0.request.name = v.into();
4403            self
4404        }
4405    }
4406
4407    #[doc(hidden)]
4408    impl crate::RequestBuilder for DeleteEntry {
4409        fn request_options(&mut self) -> &mut crate::RequestOptions {
4410            &mut self.0.options
4411        }
4412    }
4413
4414    /// The request builder for [CatalogService::list_entries][crate::client::CatalogService::list_entries] calls.
4415    ///
4416    /// # Example
4417    /// ```
4418    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListEntries;
4419    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4420    /// use google_cloud_gax::paginator::ItemPaginator;
4421    ///
4422    /// let builder = prepare_request_builder();
4423    /// let mut items = builder.by_item();
4424    /// while let Some(result) = items.next().await {
4425    ///   let item = result?;
4426    /// }
4427    /// # Ok(()) }
4428    ///
4429    /// fn prepare_request_builder() -> ListEntries {
4430    ///   # panic!();
4431    ///   // ... details omitted ...
4432    /// }
4433    /// ```
4434    #[derive(Clone, Debug)]
4435    pub struct ListEntries(RequestBuilder<crate::model::ListEntriesRequest>);
4436
4437    impl ListEntries {
4438        pub(crate) fn new(
4439            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4440        ) -> Self {
4441            Self(RequestBuilder::new(stub))
4442        }
4443
4444        /// Sets the full request, replacing any prior values.
4445        pub fn with_request<V: Into<crate::model::ListEntriesRequest>>(mut self, v: V) -> Self {
4446            self.0.request = v.into();
4447            self
4448        }
4449
4450        /// Sets all the options, replacing any prior values.
4451        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4452            self.0.options = v.into();
4453            self
4454        }
4455
4456        /// Sends the request.
4457        pub async fn send(self) -> Result<crate::model::ListEntriesResponse> {
4458            (*self.0.stub)
4459                .list_entries(self.0.request, self.0.options)
4460                .await
4461                .map(crate::Response::into_body)
4462        }
4463
4464        /// Streams each page in the collection.
4465        pub fn by_page(
4466            self,
4467        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListEntriesResponse, crate::Error>
4468        {
4469            use std::clone::Clone;
4470            let token = self.0.request.page_token.clone();
4471            let execute = move |token: String| {
4472                let mut builder = self.clone();
4473                builder.0.request = builder.0.request.set_page_token(token);
4474                builder.send()
4475            };
4476            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4477        }
4478
4479        /// Streams each item in the collection.
4480        pub fn by_item(
4481            self,
4482        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4483            crate::model::ListEntriesResponse,
4484            crate::Error,
4485        > {
4486            use google_cloud_gax::paginator::Paginator;
4487            self.by_page().items()
4488        }
4489
4490        /// Sets the value of [parent][crate::model::ListEntriesRequest::parent].
4491        ///
4492        /// This is a **required** field for requests.
4493        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4494            self.0.request.parent = v.into();
4495            self
4496        }
4497
4498        /// Sets the value of [page_size][crate::model::ListEntriesRequest::page_size].
4499        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4500            self.0.request.page_size = v.into();
4501            self
4502        }
4503
4504        /// Sets the value of [page_token][crate::model::ListEntriesRequest::page_token].
4505        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4506            self.0.request.page_token = v.into();
4507            self
4508        }
4509
4510        /// Sets the value of [filter][crate::model::ListEntriesRequest::filter].
4511        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4512            self.0.request.filter = v.into();
4513            self
4514        }
4515    }
4516
4517    #[doc(hidden)]
4518    impl crate::RequestBuilder for ListEntries {
4519        fn request_options(&mut self) -> &mut crate::RequestOptions {
4520            &mut self.0.options
4521        }
4522    }
4523
4524    /// The request builder for [CatalogService::get_entry][crate::client::CatalogService::get_entry] calls.
4525    ///
4526    /// # Example
4527    /// ```
4528    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntry;
4529    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4530    ///
4531    /// let builder = prepare_request_builder();
4532    /// let response = builder.send().await?;
4533    /// # Ok(()) }
4534    ///
4535    /// fn prepare_request_builder() -> GetEntry {
4536    ///   # panic!();
4537    ///   // ... details omitted ...
4538    /// }
4539    /// ```
4540    #[derive(Clone, Debug)]
4541    pub struct GetEntry(RequestBuilder<crate::model::GetEntryRequest>);
4542
4543    impl GetEntry {
4544        pub(crate) fn new(
4545            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4546        ) -> Self {
4547            Self(RequestBuilder::new(stub))
4548        }
4549
4550        /// Sets the full request, replacing any prior values.
4551        pub fn with_request<V: Into<crate::model::GetEntryRequest>>(mut self, v: V) -> Self {
4552            self.0.request = v.into();
4553            self
4554        }
4555
4556        /// Sets all the options, replacing any prior values.
4557        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4558            self.0.options = v.into();
4559            self
4560        }
4561
4562        /// Sends the request.
4563        pub async fn send(self) -> Result<crate::model::Entry> {
4564            (*self.0.stub)
4565                .get_entry(self.0.request, self.0.options)
4566                .await
4567                .map(crate::Response::into_body)
4568        }
4569
4570        /// Sets the value of [name][crate::model::GetEntryRequest::name].
4571        ///
4572        /// This is a **required** field for requests.
4573        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4574            self.0.request.name = v.into();
4575            self
4576        }
4577
4578        /// Sets the value of [view][crate::model::GetEntryRequest::view].
4579        pub fn set_view<T: Into<crate::model::EntryView>>(mut self, v: T) -> Self {
4580            self.0.request.view = v.into();
4581            self
4582        }
4583
4584        /// Sets the value of [aspect_types][crate::model::GetEntryRequest::aspect_types].
4585        pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
4586        where
4587            T: std::iter::IntoIterator<Item = V>,
4588            V: std::convert::Into<std::string::String>,
4589        {
4590            use std::iter::Iterator;
4591            self.0.request.aspect_types = v.into_iter().map(|i| i.into()).collect();
4592            self
4593        }
4594
4595        /// Sets the value of [paths][crate::model::GetEntryRequest::paths].
4596        pub fn set_paths<T, V>(mut self, v: T) -> Self
4597        where
4598            T: std::iter::IntoIterator<Item = V>,
4599            V: std::convert::Into<std::string::String>,
4600        {
4601            use std::iter::Iterator;
4602            self.0.request.paths = v.into_iter().map(|i| i.into()).collect();
4603            self
4604        }
4605    }
4606
4607    #[doc(hidden)]
4608    impl crate::RequestBuilder for GetEntry {
4609        fn request_options(&mut self) -> &mut crate::RequestOptions {
4610            &mut self.0.options
4611        }
4612    }
4613
4614    /// The request builder for [CatalogService::lookup_entry][crate::client::CatalogService::lookup_entry] calls.
4615    ///
4616    /// # Example
4617    /// ```
4618    /// # use google_cloud_dataplex_v1::builder::catalog_service::LookupEntry;
4619    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4620    ///
4621    /// let builder = prepare_request_builder();
4622    /// let response = builder.send().await?;
4623    /// # Ok(()) }
4624    ///
4625    /// fn prepare_request_builder() -> LookupEntry {
4626    ///   # panic!();
4627    ///   // ... details omitted ...
4628    /// }
4629    /// ```
4630    #[derive(Clone, Debug)]
4631    pub struct LookupEntry(RequestBuilder<crate::model::LookupEntryRequest>);
4632
4633    impl LookupEntry {
4634        pub(crate) fn new(
4635            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4636        ) -> Self {
4637            Self(RequestBuilder::new(stub))
4638        }
4639
4640        /// Sets the full request, replacing any prior values.
4641        pub fn with_request<V: Into<crate::model::LookupEntryRequest>>(mut self, v: V) -> Self {
4642            self.0.request = v.into();
4643            self
4644        }
4645
4646        /// Sets all the options, replacing any prior values.
4647        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4648            self.0.options = v.into();
4649            self
4650        }
4651
4652        /// Sends the request.
4653        pub async fn send(self) -> Result<crate::model::Entry> {
4654            (*self.0.stub)
4655                .lookup_entry(self.0.request, self.0.options)
4656                .await
4657                .map(crate::Response::into_body)
4658        }
4659
4660        /// Sets the value of [name][crate::model::LookupEntryRequest::name].
4661        ///
4662        /// This is a **required** field for requests.
4663        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4664            self.0.request.name = v.into();
4665            self
4666        }
4667
4668        /// Sets the value of [view][crate::model::LookupEntryRequest::view].
4669        pub fn set_view<T: Into<crate::model::EntryView>>(mut self, v: T) -> Self {
4670            self.0.request.view = v.into();
4671            self
4672        }
4673
4674        /// Sets the value of [aspect_types][crate::model::LookupEntryRequest::aspect_types].
4675        pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
4676        where
4677            T: std::iter::IntoIterator<Item = V>,
4678            V: std::convert::Into<std::string::String>,
4679        {
4680            use std::iter::Iterator;
4681            self.0.request.aspect_types = v.into_iter().map(|i| i.into()).collect();
4682            self
4683        }
4684
4685        /// Sets the value of [paths][crate::model::LookupEntryRequest::paths].
4686        pub fn set_paths<T, V>(mut self, v: T) -> Self
4687        where
4688            T: std::iter::IntoIterator<Item = V>,
4689            V: std::convert::Into<std::string::String>,
4690        {
4691            use std::iter::Iterator;
4692            self.0.request.paths = v.into_iter().map(|i| i.into()).collect();
4693            self
4694        }
4695
4696        /// Sets the value of [entry][crate::model::LookupEntryRequest::entry].
4697        ///
4698        /// This is a **required** field for requests.
4699        pub fn set_entry<T: Into<std::string::String>>(mut self, v: T) -> Self {
4700            self.0.request.entry = v.into();
4701            self
4702        }
4703    }
4704
4705    #[doc(hidden)]
4706    impl crate::RequestBuilder for LookupEntry {
4707        fn request_options(&mut self) -> &mut crate::RequestOptions {
4708            &mut self.0.options
4709        }
4710    }
4711
4712    /// The request builder for [CatalogService::search_entries][crate::client::CatalogService::search_entries] calls.
4713    ///
4714    /// # Example
4715    /// ```
4716    /// # use google_cloud_dataplex_v1::builder::catalog_service::SearchEntries;
4717    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4718    /// use google_cloud_gax::paginator::ItemPaginator;
4719    ///
4720    /// let builder = prepare_request_builder();
4721    /// let mut items = builder.by_item();
4722    /// while let Some(result) = items.next().await {
4723    ///   let item = result?;
4724    /// }
4725    /// # Ok(()) }
4726    ///
4727    /// fn prepare_request_builder() -> SearchEntries {
4728    ///   # panic!();
4729    ///   // ... details omitted ...
4730    /// }
4731    /// ```
4732    #[derive(Clone, Debug)]
4733    pub struct SearchEntries(RequestBuilder<crate::model::SearchEntriesRequest>);
4734
4735    impl SearchEntries {
4736        pub(crate) fn new(
4737            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4738        ) -> Self {
4739            Self(RequestBuilder::new(stub))
4740        }
4741
4742        /// Sets the full request, replacing any prior values.
4743        pub fn with_request<V: Into<crate::model::SearchEntriesRequest>>(mut self, v: V) -> Self {
4744            self.0.request = v.into();
4745            self
4746        }
4747
4748        /// Sets all the options, replacing any prior values.
4749        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4750            self.0.options = v.into();
4751            self
4752        }
4753
4754        /// Sends the request.
4755        pub async fn send(self) -> Result<crate::model::SearchEntriesResponse> {
4756            (*self.0.stub)
4757                .search_entries(self.0.request, self.0.options)
4758                .await
4759                .map(crate::Response::into_body)
4760        }
4761
4762        /// Streams each page in the collection.
4763        pub fn by_page(
4764            self,
4765        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::SearchEntriesResponse, crate::Error>
4766        {
4767            use std::clone::Clone;
4768            let token = self.0.request.page_token.clone();
4769            let execute = move |token: String| {
4770                let mut builder = self.clone();
4771                builder.0.request = builder.0.request.set_page_token(token);
4772                builder.send()
4773            };
4774            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4775        }
4776
4777        /// Streams each item in the collection.
4778        pub fn by_item(
4779            self,
4780        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4781            crate::model::SearchEntriesResponse,
4782            crate::Error,
4783        > {
4784            use google_cloud_gax::paginator::Paginator;
4785            self.by_page().items()
4786        }
4787
4788        /// Sets the value of [name][crate::model::SearchEntriesRequest::name].
4789        ///
4790        /// This is a **required** field for requests.
4791        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4792            self.0.request.name = v.into();
4793            self
4794        }
4795
4796        /// Sets the value of [query][crate::model::SearchEntriesRequest::query].
4797        ///
4798        /// This is a **required** field for requests.
4799        pub fn set_query<T: Into<std::string::String>>(mut self, v: T) -> Self {
4800            self.0.request.query = v.into();
4801            self
4802        }
4803
4804        /// Sets the value of [page_size][crate::model::SearchEntriesRequest::page_size].
4805        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4806            self.0.request.page_size = v.into();
4807            self
4808        }
4809
4810        /// Sets the value of [page_token][crate::model::SearchEntriesRequest::page_token].
4811        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4812            self.0.request.page_token = v.into();
4813            self
4814        }
4815
4816        /// Sets the value of [order_by][crate::model::SearchEntriesRequest::order_by].
4817        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4818            self.0.request.order_by = v.into();
4819            self
4820        }
4821
4822        /// Sets the value of [scope][crate::model::SearchEntriesRequest::scope].
4823        pub fn set_scope<T: Into<std::string::String>>(mut self, v: T) -> Self {
4824            self.0.request.scope = v.into();
4825            self
4826        }
4827
4828        /// Sets the value of [semantic_search][crate::model::SearchEntriesRequest::semantic_search].
4829        pub fn set_semantic_search<T: Into<bool>>(mut self, v: T) -> Self {
4830            self.0.request.semantic_search = v.into();
4831            self
4832        }
4833    }
4834
4835    #[doc(hidden)]
4836    impl crate::RequestBuilder for SearchEntries {
4837        fn request_options(&mut self) -> &mut crate::RequestOptions {
4838            &mut self.0.options
4839        }
4840    }
4841
4842    /// The request builder for [CatalogService::create_metadata_job][crate::client::CatalogService::create_metadata_job] calls.
4843    ///
4844    /// # Example
4845    /// ```
4846    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateMetadataJob;
4847    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4848    /// use google_cloud_lro::Poller;
4849    ///
4850    /// let builder = prepare_request_builder();
4851    /// let response = builder.poller().until_done().await?;
4852    /// # Ok(()) }
4853    ///
4854    /// fn prepare_request_builder() -> CreateMetadataJob {
4855    ///   # panic!();
4856    ///   // ... details omitted ...
4857    /// }
4858    /// ```
4859    #[derive(Clone, Debug)]
4860    pub struct CreateMetadataJob(RequestBuilder<crate::model::CreateMetadataJobRequest>);
4861
4862    impl CreateMetadataJob {
4863        pub(crate) fn new(
4864            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4865        ) -> Self {
4866            Self(RequestBuilder::new(stub))
4867        }
4868
4869        /// Sets the full request, replacing any prior values.
4870        pub fn with_request<V: Into<crate::model::CreateMetadataJobRequest>>(
4871            mut self,
4872            v: V,
4873        ) -> Self {
4874            self.0.request = v.into();
4875            self
4876        }
4877
4878        /// Sets all the options, replacing any prior values.
4879        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4880            self.0.options = v.into();
4881            self
4882        }
4883
4884        /// Sends the request.
4885        ///
4886        /// # Long running operations
4887        ///
4888        /// This starts, but does not poll, a longrunning operation. More information
4889        /// on [create_metadata_job][crate::client::CatalogService::create_metadata_job].
4890        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4891            (*self.0.stub)
4892                .create_metadata_job(self.0.request, self.0.options)
4893                .await
4894                .map(crate::Response::into_body)
4895        }
4896
4897        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_metadata_job`.
4898        pub fn poller(
4899            self,
4900        ) -> impl google_cloud_lro::Poller<crate::model::MetadataJob, crate::model::OperationMetadata>
4901        {
4902            type Operation = google_cloud_lro::internal::Operation<
4903                crate::model::MetadataJob,
4904                crate::model::OperationMetadata,
4905            >;
4906            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4907            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4908
4909            let stub = self.0.stub.clone();
4910            let mut options = self.0.options.clone();
4911            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4912            let query = move |name| {
4913                let stub = stub.clone();
4914                let options = options.clone();
4915                async {
4916                    let op = GetOperation::new(stub)
4917                        .set_name(name)
4918                        .with_options(options)
4919                        .send()
4920                        .await?;
4921                    Ok(Operation::new(op))
4922                }
4923            };
4924
4925            let start = move || async {
4926                let op = self.send().await?;
4927                Ok(Operation::new(op))
4928            };
4929
4930            google_cloud_lro::internal::new_poller(
4931                polling_error_policy,
4932                polling_backoff_policy,
4933                start,
4934                query,
4935            )
4936        }
4937
4938        /// Sets the value of [parent][crate::model::CreateMetadataJobRequest::parent].
4939        ///
4940        /// This is a **required** field for requests.
4941        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4942            self.0.request.parent = v.into();
4943            self
4944        }
4945
4946        /// Sets the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
4947        ///
4948        /// This is a **required** field for requests.
4949        pub fn set_metadata_job<T>(mut self, v: T) -> Self
4950        where
4951            T: std::convert::Into<crate::model::MetadataJob>,
4952        {
4953            self.0.request.metadata_job = std::option::Option::Some(v.into());
4954            self
4955        }
4956
4957        /// Sets or clears the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
4958        ///
4959        /// This is a **required** field for requests.
4960        pub fn set_or_clear_metadata_job<T>(mut self, v: std::option::Option<T>) -> Self
4961        where
4962            T: std::convert::Into<crate::model::MetadataJob>,
4963        {
4964            self.0.request.metadata_job = v.map(|x| x.into());
4965            self
4966        }
4967
4968        /// Sets the value of [metadata_job_id][crate::model::CreateMetadataJobRequest::metadata_job_id].
4969        pub fn set_metadata_job_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4970            self.0.request.metadata_job_id = v.into();
4971            self
4972        }
4973
4974        /// Sets the value of [validate_only][crate::model::CreateMetadataJobRequest::validate_only].
4975        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
4976            self.0.request.validate_only = v.into();
4977            self
4978        }
4979    }
4980
4981    #[doc(hidden)]
4982    impl crate::RequestBuilder for CreateMetadataJob {
4983        fn request_options(&mut self) -> &mut crate::RequestOptions {
4984            &mut self.0.options
4985        }
4986    }
4987
4988    /// The request builder for [CatalogService::get_metadata_job][crate::client::CatalogService::get_metadata_job] calls.
4989    ///
4990    /// # Example
4991    /// ```
4992    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetMetadataJob;
4993    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4994    ///
4995    /// let builder = prepare_request_builder();
4996    /// let response = builder.send().await?;
4997    /// # Ok(()) }
4998    ///
4999    /// fn prepare_request_builder() -> GetMetadataJob {
5000    ///   # panic!();
5001    ///   // ... details omitted ...
5002    /// }
5003    /// ```
5004    #[derive(Clone, Debug)]
5005    pub struct GetMetadataJob(RequestBuilder<crate::model::GetMetadataJobRequest>);
5006
5007    impl GetMetadataJob {
5008        pub(crate) fn new(
5009            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5010        ) -> Self {
5011            Self(RequestBuilder::new(stub))
5012        }
5013
5014        /// Sets the full request, replacing any prior values.
5015        pub fn with_request<V: Into<crate::model::GetMetadataJobRequest>>(mut self, v: V) -> Self {
5016            self.0.request = v.into();
5017            self
5018        }
5019
5020        /// Sets all the options, replacing any prior values.
5021        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5022            self.0.options = v.into();
5023            self
5024        }
5025
5026        /// Sends the request.
5027        pub async fn send(self) -> Result<crate::model::MetadataJob> {
5028            (*self.0.stub)
5029                .get_metadata_job(self.0.request, self.0.options)
5030                .await
5031                .map(crate::Response::into_body)
5032        }
5033
5034        /// Sets the value of [name][crate::model::GetMetadataJobRequest::name].
5035        ///
5036        /// This is a **required** field for requests.
5037        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5038            self.0.request.name = v.into();
5039            self
5040        }
5041    }
5042
5043    #[doc(hidden)]
5044    impl crate::RequestBuilder for GetMetadataJob {
5045        fn request_options(&mut self) -> &mut crate::RequestOptions {
5046            &mut self.0.options
5047        }
5048    }
5049
5050    /// The request builder for [CatalogService::list_metadata_jobs][crate::client::CatalogService::list_metadata_jobs] calls.
5051    ///
5052    /// # Example
5053    /// ```
5054    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListMetadataJobs;
5055    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5056    /// use google_cloud_gax::paginator::ItemPaginator;
5057    ///
5058    /// let builder = prepare_request_builder();
5059    /// let mut items = builder.by_item();
5060    /// while let Some(result) = items.next().await {
5061    ///   let item = result?;
5062    /// }
5063    /// # Ok(()) }
5064    ///
5065    /// fn prepare_request_builder() -> ListMetadataJobs {
5066    ///   # panic!();
5067    ///   // ... details omitted ...
5068    /// }
5069    /// ```
5070    #[derive(Clone, Debug)]
5071    pub struct ListMetadataJobs(RequestBuilder<crate::model::ListMetadataJobsRequest>);
5072
5073    impl ListMetadataJobs {
5074        pub(crate) fn new(
5075            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5076        ) -> Self {
5077            Self(RequestBuilder::new(stub))
5078        }
5079
5080        /// Sets the full request, replacing any prior values.
5081        pub fn with_request<V: Into<crate::model::ListMetadataJobsRequest>>(
5082            mut self,
5083            v: V,
5084        ) -> Self {
5085            self.0.request = v.into();
5086            self
5087        }
5088
5089        /// Sets all the options, replacing any prior values.
5090        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5091            self.0.options = v.into();
5092            self
5093        }
5094
5095        /// Sends the request.
5096        pub async fn send(self) -> Result<crate::model::ListMetadataJobsResponse> {
5097            (*self.0.stub)
5098                .list_metadata_jobs(self.0.request, self.0.options)
5099                .await
5100                .map(crate::Response::into_body)
5101        }
5102
5103        /// Streams each page in the collection.
5104        pub fn by_page(
5105            self,
5106        ) -> impl google_cloud_gax::paginator::Paginator<
5107            crate::model::ListMetadataJobsResponse,
5108            crate::Error,
5109        > {
5110            use std::clone::Clone;
5111            let token = self.0.request.page_token.clone();
5112            let execute = move |token: String| {
5113                let mut builder = self.clone();
5114                builder.0.request = builder.0.request.set_page_token(token);
5115                builder.send()
5116            };
5117            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5118        }
5119
5120        /// Streams each item in the collection.
5121        pub fn by_item(
5122            self,
5123        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5124            crate::model::ListMetadataJobsResponse,
5125            crate::Error,
5126        > {
5127            use google_cloud_gax::paginator::Paginator;
5128            self.by_page().items()
5129        }
5130
5131        /// Sets the value of [parent][crate::model::ListMetadataJobsRequest::parent].
5132        ///
5133        /// This is a **required** field for requests.
5134        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5135            self.0.request.parent = v.into();
5136            self
5137        }
5138
5139        /// Sets the value of [page_size][crate::model::ListMetadataJobsRequest::page_size].
5140        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5141            self.0.request.page_size = v.into();
5142            self
5143        }
5144
5145        /// Sets the value of [page_token][crate::model::ListMetadataJobsRequest::page_token].
5146        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5147            self.0.request.page_token = v.into();
5148            self
5149        }
5150
5151        /// Sets the value of [filter][crate::model::ListMetadataJobsRequest::filter].
5152        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5153            self.0.request.filter = v.into();
5154            self
5155        }
5156
5157        /// Sets the value of [order_by][crate::model::ListMetadataJobsRequest::order_by].
5158        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5159            self.0.request.order_by = v.into();
5160            self
5161        }
5162    }
5163
5164    #[doc(hidden)]
5165    impl crate::RequestBuilder for ListMetadataJobs {
5166        fn request_options(&mut self) -> &mut crate::RequestOptions {
5167            &mut self.0.options
5168        }
5169    }
5170
5171    /// The request builder for [CatalogService::cancel_metadata_job][crate::client::CatalogService::cancel_metadata_job] calls.
5172    ///
5173    /// # Example
5174    /// ```
5175    /// # use google_cloud_dataplex_v1::builder::catalog_service::CancelMetadataJob;
5176    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5177    ///
5178    /// let builder = prepare_request_builder();
5179    /// let response = builder.send().await?;
5180    /// # Ok(()) }
5181    ///
5182    /// fn prepare_request_builder() -> CancelMetadataJob {
5183    ///   # panic!();
5184    ///   // ... details omitted ...
5185    /// }
5186    /// ```
5187    #[derive(Clone, Debug)]
5188    pub struct CancelMetadataJob(RequestBuilder<crate::model::CancelMetadataJobRequest>);
5189
5190    impl CancelMetadataJob {
5191        pub(crate) fn new(
5192            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5193        ) -> Self {
5194            Self(RequestBuilder::new(stub))
5195        }
5196
5197        /// Sets the full request, replacing any prior values.
5198        pub fn with_request<V: Into<crate::model::CancelMetadataJobRequest>>(
5199            mut self,
5200            v: V,
5201        ) -> Self {
5202            self.0.request = v.into();
5203            self
5204        }
5205
5206        /// Sets all the options, replacing any prior values.
5207        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5208            self.0.options = v.into();
5209            self
5210        }
5211
5212        /// Sends the request.
5213        pub async fn send(self) -> Result<()> {
5214            (*self.0.stub)
5215                .cancel_metadata_job(self.0.request, self.0.options)
5216                .await
5217                .map(crate::Response::into_body)
5218        }
5219
5220        /// Sets the value of [name][crate::model::CancelMetadataJobRequest::name].
5221        ///
5222        /// This is a **required** field for requests.
5223        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5224            self.0.request.name = v.into();
5225            self
5226        }
5227    }
5228
5229    #[doc(hidden)]
5230    impl crate::RequestBuilder for CancelMetadataJob {
5231        fn request_options(&mut self) -> &mut crate::RequestOptions {
5232            &mut self.0.options
5233        }
5234    }
5235
5236    /// The request builder for [CatalogService::create_entry_link][crate::client::CatalogService::create_entry_link] calls.
5237    ///
5238    /// # Example
5239    /// ```
5240    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntryLink;
5241    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5242    ///
5243    /// let builder = prepare_request_builder();
5244    /// let response = builder.send().await?;
5245    /// # Ok(()) }
5246    ///
5247    /// fn prepare_request_builder() -> CreateEntryLink {
5248    ///   # panic!();
5249    ///   // ... details omitted ...
5250    /// }
5251    /// ```
5252    #[derive(Clone, Debug)]
5253    pub struct CreateEntryLink(RequestBuilder<crate::model::CreateEntryLinkRequest>);
5254
5255    impl CreateEntryLink {
5256        pub(crate) fn new(
5257            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5258        ) -> Self {
5259            Self(RequestBuilder::new(stub))
5260        }
5261
5262        /// Sets the full request, replacing any prior values.
5263        pub fn with_request<V: Into<crate::model::CreateEntryLinkRequest>>(mut self, v: V) -> Self {
5264            self.0.request = v.into();
5265            self
5266        }
5267
5268        /// Sets all the options, replacing any prior values.
5269        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5270            self.0.options = v.into();
5271            self
5272        }
5273
5274        /// Sends the request.
5275        pub async fn send(self) -> Result<crate::model::EntryLink> {
5276            (*self.0.stub)
5277                .create_entry_link(self.0.request, self.0.options)
5278                .await
5279                .map(crate::Response::into_body)
5280        }
5281
5282        /// Sets the value of [parent][crate::model::CreateEntryLinkRequest::parent].
5283        ///
5284        /// This is a **required** field for requests.
5285        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5286            self.0.request.parent = v.into();
5287            self
5288        }
5289
5290        /// Sets the value of [entry_link_id][crate::model::CreateEntryLinkRequest::entry_link_id].
5291        ///
5292        /// This is a **required** field for requests.
5293        pub fn set_entry_link_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5294            self.0.request.entry_link_id = v.into();
5295            self
5296        }
5297
5298        /// Sets the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
5299        ///
5300        /// This is a **required** field for requests.
5301        pub fn set_entry_link<T>(mut self, v: T) -> Self
5302        where
5303            T: std::convert::Into<crate::model::EntryLink>,
5304        {
5305            self.0.request.entry_link = std::option::Option::Some(v.into());
5306            self
5307        }
5308
5309        /// Sets or clears the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
5310        ///
5311        /// This is a **required** field for requests.
5312        pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
5313        where
5314            T: std::convert::Into<crate::model::EntryLink>,
5315        {
5316            self.0.request.entry_link = v.map(|x| x.into());
5317            self
5318        }
5319    }
5320
5321    #[doc(hidden)]
5322    impl crate::RequestBuilder for CreateEntryLink {
5323        fn request_options(&mut self) -> &mut crate::RequestOptions {
5324            &mut self.0.options
5325        }
5326    }
5327
5328    /// The request builder for [CatalogService::update_entry_link][crate::client::CatalogService::update_entry_link] calls.
5329    ///
5330    /// # Example
5331    /// ```
5332    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntryLink;
5333    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5334    ///
5335    /// let builder = prepare_request_builder();
5336    /// let response = builder.send().await?;
5337    /// # Ok(()) }
5338    ///
5339    /// fn prepare_request_builder() -> UpdateEntryLink {
5340    ///   # panic!();
5341    ///   // ... details omitted ...
5342    /// }
5343    /// ```
5344    #[derive(Clone, Debug)]
5345    pub struct UpdateEntryLink(RequestBuilder<crate::model::UpdateEntryLinkRequest>);
5346
5347    impl UpdateEntryLink {
5348        pub(crate) fn new(
5349            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5350        ) -> Self {
5351            Self(RequestBuilder::new(stub))
5352        }
5353
5354        /// Sets the full request, replacing any prior values.
5355        pub fn with_request<V: Into<crate::model::UpdateEntryLinkRequest>>(mut self, v: V) -> Self {
5356            self.0.request = v.into();
5357            self
5358        }
5359
5360        /// Sets all the options, replacing any prior values.
5361        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5362            self.0.options = v.into();
5363            self
5364        }
5365
5366        /// Sends the request.
5367        pub async fn send(self) -> Result<crate::model::EntryLink> {
5368            (*self.0.stub)
5369                .update_entry_link(self.0.request, self.0.options)
5370                .await
5371                .map(crate::Response::into_body)
5372        }
5373
5374        /// Sets the value of [entry_link][crate::model::UpdateEntryLinkRequest::entry_link].
5375        ///
5376        /// This is a **required** field for requests.
5377        pub fn set_entry_link<T>(mut self, v: T) -> Self
5378        where
5379            T: std::convert::Into<crate::model::EntryLink>,
5380        {
5381            self.0.request.entry_link = std::option::Option::Some(v.into());
5382            self
5383        }
5384
5385        /// Sets or clears the value of [entry_link][crate::model::UpdateEntryLinkRequest::entry_link].
5386        ///
5387        /// This is a **required** field for requests.
5388        pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
5389        where
5390            T: std::convert::Into<crate::model::EntryLink>,
5391        {
5392            self.0.request.entry_link = v.map(|x| x.into());
5393            self
5394        }
5395
5396        /// Sets the value of [allow_missing][crate::model::UpdateEntryLinkRequest::allow_missing].
5397        pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
5398            self.0.request.allow_missing = v.into();
5399            self
5400        }
5401
5402        /// Sets the value of [aspect_keys][crate::model::UpdateEntryLinkRequest::aspect_keys].
5403        pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
5404        where
5405            T: std::iter::IntoIterator<Item = V>,
5406            V: std::convert::Into<std::string::String>,
5407        {
5408            use std::iter::Iterator;
5409            self.0.request.aspect_keys = v.into_iter().map(|i| i.into()).collect();
5410            self
5411        }
5412    }
5413
5414    #[doc(hidden)]
5415    impl crate::RequestBuilder for UpdateEntryLink {
5416        fn request_options(&mut self) -> &mut crate::RequestOptions {
5417            &mut self.0.options
5418        }
5419    }
5420
5421    /// The request builder for [CatalogService::delete_entry_link][crate::client::CatalogService::delete_entry_link] calls.
5422    ///
5423    /// # Example
5424    /// ```
5425    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntryLink;
5426    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5427    ///
5428    /// let builder = prepare_request_builder();
5429    /// let response = builder.send().await?;
5430    /// # Ok(()) }
5431    ///
5432    /// fn prepare_request_builder() -> DeleteEntryLink {
5433    ///   # panic!();
5434    ///   // ... details omitted ...
5435    /// }
5436    /// ```
5437    #[derive(Clone, Debug)]
5438    pub struct DeleteEntryLink(RequestBuilder<crate::model::DeleteEntryLinkRequest>);
5439
5440    impl DeleteEntryLink {
5441        pub(crate) fn new(
5442            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5443        ) -> Self {
5444            Self(RequestBuilder::new(stub))
5445        }
5446
5447        /// Sets the full request, replacing any prior values.
5448        pub fn with_request<V: Into<crate::model::DeleteEntryLinkRequest>>(mut self, v: V) -> Self {
5449            self.0.request = v.into();
5450            self
5451        }
5452
5453        /// Sets all the options, replacing any prior values.
5454        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5455            self.0.options = v.into();
5456            self
5457        }
5458
5459        /// Sends the request.
5460        pub async fn send(self) -> Result<crate::model::EntryLink> {
5461            (*self.0.stub)
5462                .delete_entry_link(self.0.request, self.0.options)
5463                .await
5464                .map(crate::Response::into_body)
5465        }
5466
5467        /// Sets the value of [name][crate::model::DeleteEntryLinkRequest::name].
5468        ///
5469        /// This is a **required** field for requests.
5470        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5471            self.0.request.name = v.into();
5472            self
5473        }
5474    }
5475
5476    #[doc(hidden)]
5477    impl crate::RequestBuilder for DeleteEntryLink {
5478        fn request_options(&mut self) -> &mut crate::RequestOptions {
5479            &mut self.0.options
5480        }
5481    }
5482
5483    /// The request builder for [CatalogService::lookup_entry_links][crate::client::CatalogService::lookup_entry_links] calls.
5484    ///
5485    /// # Example
5486    /// ```
5487    /// # use google_cloud_dataplex_v1::builder::catalog_service::LookupEntryLinks;
5488    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5489    /// use google_cloud_gax::paginator::ItemPaginator;
5490    ///
5491    /// let builder = prepare_request_builder();
5492    /// let mut items = builder.by_item();
5493    /// while let Some(result) = items.next().await {
5494    ///   let item = result?;
5495    /// }
5496    /// # Ok(()) }
5497    ///
5498    /// fn prepare_request_builder() -> LookupEntryLinks {
5499    ///   # panic!();
5500    ///   // ... details omitted ...
5501    /// }
5502    /// ```
5503    #[derive(Clone, Debug)]
5504    pub struct LookupEntryLinks(RequestBuilder<crate::model::LookupEntryLinksRequest>);
5505
5506    impl LookupEntryLinks {
5507        pub(crate) fn new(
5508            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5509        ) -> Self {
5510            Self(RequestBuilder::new(stub))
5511        }
5512
5513        /// Sets the full request, replacing any prior values.
5514        pub fn with_request<V: Into<crate::model::LookupEntryLinksRequest>>(
5515            mut self,
5516            v: V,
5517        ) -> Self {
5518            self.0.request = v.into();
5519            self
5520        }
5521
5522        /// Sets all the options, replacing any prior values.
5523        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5524            self.0.options = v.into();
5525            self
5526        }
5527
5528        /// Sends the request.
5529        pub async fn send(self) -> Result<crate::model::LookupEntryLinksResponse> {
5530            (*self.0.stub)
5531                .lookup_entry_links(self.0.request, self.0.options)
5532                .await
5533                .map(crate::Response::into_body)
5534        }
5535
5536        /// Streams each page in the collection.
5537        pub fn by_page(
5538            self,
5539        ) -> impl google_cloud_gax::paginator::Paginator<
5540            crate::model::LookupEntryLinksResponse,
5541            crate::Error,
5542        > {
5543            use std::clone::Clone;
5544            let token = self.0.request.page_token.clone();
5545            let execute = move |token: String| {
5546                let mut builder = self.clone();
5547                builder.0.request = builder.0.request.set_page_token(token);
5548                builder.send()
5549            };
5550            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5551        }
5552
5553        /// Streams each item in the collection.
5554        pub fn by_item(
5555            self,
5556        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5557            crate::model::LookupEntryLinksResponse,
5558            crate::Error,
5559        > {
5560            use google_cloud_gax::paginator::Paginator;
5561            self.by_page().items()
5562        }
5563
5564        /// Sets the value of [name][crate::model::LookupEntryLinksRequest::name].
5565        ///
5566        /// This is a **required** field for requests.
5567        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5568            self.0.request.name = v.into();
5569            self
5570        }
5571
5572        /// Sets the value of [entry][crate::model::LookupEntryLinksRequest::entry].
5573        ///
5574        /// This is a **required** field for requests.
5575        pub fn set_entry<T: Into<std::string::String>>(mut self, v: T) -> Self {
5576            self.0.request.entry = v.into();
5577            self
5578        }
5579
5580        /// Sets the value of [entry_mode][crate::model::LookupEntryLinksRequest::entry_mode].
5581        pub fn set_entry_mode<T: Into<crate::model::lookup_entry_links_request::EntryMode>>(
5582            mut self,
5583            v: T,
5584        ) -> Self {
5585            self.0.request.entry_mode = v.into();
5586            self
5587        }
5588
5589        /// Sets the value of [entry_link_types][crate::model::LookupEntryLinksRequest::entry_link_types].
5590        pub fn set_entry_link_types<T, V>(mut self, v: T) -> Self
5591        where
5592            T: std::iter::IntoIterator<Item = V>,
5593            V: std::convert::Into<std::string::String>,
5594        {
5595            use std::iter::Iterator;
5596            self.0.request.entry_link_types = v.into_iter().map(|i| i.into()).collect();
5597            self
5598        }
5599
5600        /// Sets the value of [page_size][crate::model::LookupEntryLinksRequest::page_size].
5601        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5602            self.0.request.page_size = v.into();
5603            self
5604        }
5605
5606        /// Sets the value of [page_token][crate::model::LookupEntryLinksRequest::page_token].
5607        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5608            self.0.request.page_token = v.into();
5609            self
5610        }
5611    }
5612
5613    #[doc(hidden)]
5614    impl crate::RequestBuilder for LookupEntryLinks {
5615        fn request_options(&mut self) -> &mut crate::RequestOptions {
5616            &mut self.0.options
5617        }
5618    }
5619
5620    /// The request builder for [CatalogService::lookup_context][crate::client::CatalogService::lookup_context] calls.
5621    ///
5622    /// # Example
5623    /// ```
5624    /// # use google_cloud_dataplex_v1::builder::catalog_service::LookupContext;
5625    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5626    ///
5627    /// let builder = prepare_request_builder();
5628    /// let response = builder.send().await?;
5629    /// # Ok(()) }
5630    ///
5631    /// fn prepare_request_builder() -> LookupContext {
5632    ///   # panic!();
5633    ///   // ... details omitted ...
5634    /// }
5635    /// ```
5636    #[derive(Clone, Debug)]
5637    pub struct LookupContext(RequestBuilder<crate::model::LookupContextRequest>);
5638
5639    impl LookupContext {
5640        pub(crate) fn new(
5641            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5642        ) -> Self {
5643            Self(RequestBuilder::new(stub))
5644        }
5645
5646        /// Sets the full request, replacing any prior values.
5647        pub fn with_request<V: Into<crate::model::LookupContextRequest>>(mut self, v: V) -> Self {
5648            self.0.request = v.into();
5649            self
5650        }
5651
5652        /// Sets all the options, replacing any prior values.
5653        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5654            self.0.options = v.into();
5655            self
5656        }
5657
5658        /// Sends the request.
5659        pub async fn send(self) -> Result<crate::model::LookupContextResponse> {
5660            (*self.0.stub)
5661                .lookup_context(self.0.request, self.0.options)
5662                .await
5663                .map(crate::Response::into_body)
5664        }
5665
5666        /// Sets the value of [name][crate::model::LookupContextRequest::name].
5667        ///
5668        /// This is a **required** field for requests.
5669        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5670            self.0.request.name = v.into();
5671            self
5672        }
5673
5674        /// Sets the value of [resources][crate::model::LookupContextRequest::resources].
5675        ///
5676        /// This is a **required** field for requests.
5677        pub fn set_resources<T, V>(mut self, v: T) -> Self
5678        where
5679            T: std::iter::IntoIterator<Item = V>,
5680            V: std::convert::Into<std::string::String>,
5681        {
5682            use std::iter::Iterator;
5683            self.0.request.resources = v.into_iter().map(|i| i.into()).collect();
5684            self
5685        }
5686
5687        /// Sets the value of [options][crate::model::LookupContextRequest::options].
5688        pub fn set_options<T, K, V>(mut self, v: T) -> Self
5689        where
5690            T: std::iter::IntoIterator<Item = (K, V)>,
5691            K: std::convert::Into<std::string::String>,
5692            V: std::convert::Into<std::string::String>,
5693        {
5694            self.0.request.options = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5695            self
5696        }
5697    }
5698
5699    #[doc(hidden)]
5700    impl crate::RequestBuilder for LookupContext {
5701        fn request_options(&mut self) -> &mut crate::RequestOptions {
5702            &mut self.0.options
5703        }
5704    }
5705
5706    /// The request builder for [CatalogService::get_entry_link][crate::client::CatalogService::get_entry_link] calls.
5707    ///
5708    /// # Example
5709    /// ```
5710    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntryLink;
5711    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5712    ///
5713    /// let builder = prepare_request_builder();
5714    /// let response = builder.send().await?;
5715    /// # Ok(()) }
5716    ///
5717    /// fn prepare_request_builder() -> GetEntryLink {
5718    ///   # panic!();
5719    ///   // ... details omitted ...
5720    /// }
5721    /// ```
5722    #[derive(Clone, Debug)]
5723    pub struct GetEntryLink(RequestBuilder<crate::model::GetEntryLinkRequest>);
5724
5725    impl GetEntryLink {
5726        pub(crate) fn new(
5727            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5728        ) -> Self {
5729            Self(RequestBuilder::new(stub))
5730        }
5731
5732        /// Sets the full request, replacing any prior values.
5733        pub fn with_request<V: Into<crate::model::GetEntryLinkRequest>>(mut self, v: V) -> Self {
5734            self.0.request = v.into();
5735            self
5736        }
5737
5738        /// Sets all the options, replacing any prior values.
5739        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5740            self.0.options = v.into();
5741            self
5742        }
5743
5744        /// Sends the request.
5745        pub async fn send(self) -> Result<crate::model::EntryLink> {
5746            (*self.0.stub)
5747                .get_entry_link(self.0.request, self.0.options)
5748                .await
5749                .map(crate::Response::into_body)
5750        }
5751
5752        /// Sets the value of [name][crate::model::GetEntryLinkRequest::name].
5753        ///
5754        /// This is a **required** field for requests.
5755        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5756            self.0.request.name = v.into();
5757            self
5758        }
5759    }
5760
5761    #[doc(hidden)]
5762    impl crate::RequestBuilder for GetEntryLink {
5763        fn request_options(&mut self) -> &mut crate::RequestOptions {
5764            &mut self.0.options
5765        }
5766    }
5767
5768    /// The request builder for [CatalogService::create_metadata_feed][crate::client::CatalogService::create_metadata_feed] calls.
5769    ///
5770    /// # Example
5771    /// ```
5772    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateMetadataFeed;
5773    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5774    /// use google_cloud_lro::Poller;
5775    ///
5776    /// let builder = prepare_request_builder();
5777    /// let response = builder.poller().until_done().await?;
5778    /// # Ok(()) }
5779    ///
5780    /// fn prepare_request_builder() -> CreateMetadataFeed {
5781    ///   # panic!();
5782    ///   // ... details omitted ...
5783    /// }
5784    /// ```
5785    #[derive(Clone, Debug)]
5786    pub struct CreateMetadataFeed(RequestBuilder<crate::model::CreateMetadataFeedRequest>);
5787
5788    impl CreateMetadataFeed {
5789        pub(crate) fn new(
5790            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5791        ) -> Self {
5792            Self(RequestBuilder::new(stub))
5793        }
5794
5795        /// Sets the full request, replacing any prior values.
5796        pub fn with_request<V: Into<crate::model::CreateMetadataFeedRequest>>(
5797            mut self,
5798            v: V,
5799        ) -> Self {
5800            self.0.request = v.into();
5801            self
5802        }
5803
5804        /// Sets all the options, replacing any prior values.
5805        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5806            self.0.options = v.into();
5807            self
5808        }
5809
5810        /// Sends the request.
5811        ///
5812        /// # Long running operations
5813        ///
5814        /// This starts, but does not poll, a longrunning operation. More information
5815        /// on [create_metadata_feed][crate::client::CatalogService::create_metadata_feed].
5816        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5817            (*self.0.stub)
5818                .create_metadata_feed(self.0.request, self.0.options)
5819                .await
5820                .map(crate::Response::into_body)
5821        }
5822
5823        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_metadata_feed`.
5824        pub fn poller(
5825            self,
5826        ) -> impl google_cloud_lro::Poller<crate::model::MetadataFeed, crate::model::OperationMetadata>
5827        {
5828            type Operation = google_cloud_lro::internal::Operation<
5829                crate::model::MetadataFeed,
5830                crate::model::OperationMetadata,
5831            >;
5832            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5833            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5834
5835            let stub = self.0.stub.clone();
5836            let mut options = self.0.options.clone();
5837            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5838            let query = move |name| {
5839                let stub = stub.clone();
5840                let options = options.clone();
5841                async {
5842                    let op = GetOperation::new(stub)
5843                        .set_name(name)
5844                        .with_options(options)
5845                        .send()
5846                        .await?;
5847                    Ok(Operation::new(op))
5848                }
5849            };
5850
5851            let start = move || async {
5852                let op = self.send().await?;
5853                Ok(Operation::new(op))
5854            };
5855
5856            google_cloud_lro::internal::new_poller(
5857                polling_error_policy,
5858                polling_backoff_policy,
5859                start,
5860                query,
5861            )
5862        }
5863
5864        /// Sets the value of [parent][crate::model::CreateMetadataFeedRequest::parent].
5865        ///
5866        /// This is a **required** field for requests.
5867        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5868            self.0.request.parent = v.into();
5869            self
5870        }
5871
5872        /// Sets the value of [metadata_feed][crate::model::CreateMetadataFeedRequest::metadata_feed].
5873        ///
5874        /// This is a **required** field for requests.
5875        pub fn set_metadata_feed<T>(mut self, v: T) -> Self
5876        where
5877            T: std::convert::Into<crate::model::MetadataFeed>,
5878        {
5879            self.0.request.metadata_feed = std::option::Option::Some(v.into());
5880            self
5881        }
5882
5883        /// Sets or clears the value of [metadata_feed][crate::model::CreateMetadataFeedRequest::metadata_feed].
5884        ///
5885        /// This is a **required** field for requests.
5886        pub fn set_or_clear_metadata_feed<T>(mut self, v: std::option::Option<T>) -> Self
5887        where
5888            T: std::convert::Into<crate::model::MetadataFeed>,
5889        {
5890            self.0.request.metadata_feed = v.map(|x| x.into());
5891            self
5892        }
5893
5894        /// Sets the value of [metadata_feed_id][crate::model::CreateMetadataFeedRequest::metadata_feed_id].
5895        pub fn set_metadata_feed_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5896            self.0.request.metadata_feed_id = v.into();
5897            self
5898        }
5899
5900        /// Sets the value of [validate_only][crate::model::CreateMetadataFeedRequest::validate_only].
5901        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
5902            self.0.request.validate_only = v.into();
5903            self
5904        }
5905    }
5906
5907    #[doc(hidden)]
5908    impl crate::RequestBuilder for CreateMetadataFeed {
5909        fn request_options(&mut self) -> &mut crate::RequestOptions {
5910            &mut self.0.options
5911        }
5912    }
5913
5914    /// The request builder for [CatalogService::get_metadata_feed][crate::client::CatalogService::get_metadata_feed] calls.
5915    ///
5916    /// # Example
5917    /// ```
5918    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetMetadataFeed;
5919    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5920    ///
5921    /// let builder = prepare_request_builder();
5922    /// let response = builder.send().await?;
5923    /// # Ok(()) }
5924    ///
5925    /// fn prepare_request_builder() -> GetMetadataFeed {
5926    ///   # panic!();
5927    ///   // ... details omitted ...
5928    /// }
5929    /// ```
5930    #[derive(Clone, Debug)]
5931    pub struct GetMetadataFeed(RequestBuilder<crate::model::GetMetadataFeedRequest>);
5932
5933    impl GetMetadataFeed {
5934        pub(crate) fn new(
5935            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5936        ) -> Self {
5937            Self(RequestBuilder::new(stub))
5938        }
5939
5940        /// Sets the full request, replacing any prior values.
5941        pub fn with_request<V: Into<crate::model::GetMetadataFeedRequest>>(mut self, v: V) -> Self {
5942            self.0.request = v.into();
5943            self
5944        }
5945
5946        /// Sets all the options, replacing any prior values.
5947        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5948            self.0.options = v.into();
5949            self
5950        }
5951
5952        /// Sends the request.
5953        pub async fn send(self) -> Result<crate::model::MetadataFeed> {
5954            (*self.0.stub)
5955                .get_metadata_feed(self.0.request, self.0.options)
5956                .await
5957                .map(crate::Response::into_body)
5958        }
5959
5960        /// Sets the value of [name][crate::model::GetMetadataFeedRequest::name].
5961        ///
5962        /// This is a **required** field for requests.
5963        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5964            self.0.request.name = v.into();
5965            self
5966        }
5967    }
5968
5969    #[doc(hidden)]
5970    impl crate::RequestBuilder for GetMetadataFeed {
5971        fn request_options(&mut self) -> &mut crate::RequestOptions {
5972            &mut self.0.options
5973        }
5974    }
5975
5976    /// The request builder for [CatalogService::list_metadata_feeds][crate::client::CatalogService::list_metadata_feeds] calls.
5977    ///
5978    /// # Example
5979    /// ```
5980    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListMetadataFeeds;
5981    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5982    /// use google_cloud_gax::paginator::ItemPaginator;
5983    ///
5984    /// let builder = prepare_request_builder();
5985    /// let mut items = builder.by_item();
5986    /// while let Some(result) = items.next().await {
5987    ///   let item = result?;
5988    /// }
5989    /// # Ok(()) }
5990    ///
5991    /// fn prepare_request_builder() -> ListMetadataFeeds {
5992    ///   # panic!();
5993    ///   // ... details omitted ...
5994    /// }
5995    /// ```
5996    #[derive(Clone, Debug)]
5997    pub struct ListMetadataFeeds(RequestBuilder<crate::model::ListMetadataFeedsRequest>);
5998
5999    impl ListMetadataFeeds {
6000        pub(crate) fn new(
6001            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6002        ) -> Self {
6003            Self(RequestBuilder::new(stub))
6004        }
6005
6006        /// Sets the full request, replacing any prior values.
6007        pub fn with_request<V: Into<crate::model::ListMetadataFeedsRequest>>(
6008            mut self,
6009            v: V,
6010        ) -> Self {
6011            self.0.request = v.into();
6012            self
6013        }
6014
6015        /// Sets all the options, replacing any prior values.
6016        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6017            self.0.options = v.into();
6018            self
6019        }
6020
6021        /// Sends the request.
6022        pub async fn send(self) -> Result<crate::model::ListMetadataFeedsResponse> {
6023            (*self.0.stub)
6024                .list_metadata_feeds(self.0.request, self.0.options)
6025                .await
6026                .map(crate::Response::into_body)
6027        }
6028
6029        /// Streams each page in the collection.
6030        pub fn by_page(
6031            self,
6032        ) -> impl google_cloud_gax::paginator::Paginator<
6033            crate::model::ListMetadataFeedsResponse,
6034            crate::Error,
6035        > {
6036            use std::clone::Clone;
6037            let token = self.0.request.page_token.clone();
6038            let execute = move |token: String| {
6039                let mut builder = self.clone();
6040                builder.0.request = builder.0.request.set_page_token(token);
6041                builder.send()
6042            };
6043            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6044        }
6045
6046        /// Streams each item in the collection.
6047        pub fn by_item(
6048            self,
6049        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6050            crate::model::ListMetadataFeedsResponse,
6051            crate::Error,
6052        > {
6053            use google_cloud_gax::paginator::Paginator;
6054            self.by_page().items()
6055        }
6056
6057        /// Sets the value of [parent][crate::model::ListMetadataFeedsRequest::parent].
6058        ///
6059        /// This is a **required** field for requests.
6060        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6061            self.0.request.parent = v.into();
6062            self
6063        }
6064
6065        /// Sets the value of [page_size][crate::model::ListMetadataFeedsRequest::page_size].
6066        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6067            self.0.request.page_size = v.into();
6068            self
6069        }
6070
6071        /// Sets the value of [page_token][crate::model::ListMetadataFeedsRequest::page_token].
6072        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6073            self.0.request.page_token = v.into();
6074            self
6075        }
6076
6077        /// Sets the value of [filter][crate::model::ListMetadataFeedsRequest::filter].
6078        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6079            self.0.request.filter = v.into();
6080            self
6081        }
6082
6083        /// Sets the value of [order_by][crate::model::ListMetadataFeedsRequest::order_by].
6084        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6085            self.0.request.order_by = v.into();
6086            self
6087        }
6088    }
6089
6090    #[doc(hidden)]
6091    impl crate::RequestBuilder for ListMetadataFeeds {
6092        fn request_options(&mut self) -> &mut crate::RequestOptions {
6093            &mut self.0.options
6094        }
6095    }
6096
6097    /// The request builder for [CatalogService::delete_metadata_feed][crate::client::CatalogService::delete_metadata_feed] calls.
6098    ///
6099    /// # Example
6100    /// ```
6101    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteMetadataFeed;
6102    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6103    /// use google_cloud_lro::Poller;
6104    ///
6105    /// let builder = prepare_request_builder();
6106    /// let response = builder.poller().until_done().await?;
6107    /// # Ok(()) }
6108    ///
6109    /// fn prepare_request_builder() -> DeleteMetadataFeed {
6110    ///   # panic!();
6111    ///   // ... details omitted ...
6112    /// }
6113    /// ```
6114    #[derive(Clone, Debug)]
6115    pub struct DeleteMetadataFeed(RequestBuilder<crate::model::DeleteMetadataFeedRequest>);
6116
6117    impl DeleteMetadataFeed {
6118        pub(crate) fn new(
6119            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6120        ) -> Self {
6121            Self(RequestBuilder::new(stub))
6122        }
6123
6124        /// Sets the full request, replacing any prior values.
6125        pub fn with_request<V: Into<crate::model::DeleteMetadataFeedRequest>>(
6126            mut self,
6127            v: V,
6128        ) -> Self {
6129            self.0.request = v.into();
6130            self
6131        }
6132
6133        /// Sets all the options, replacing any prior values.
6134        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6135            self.0.options = v.into();
6136            self
6137        }
6138
6139        /// Sends the request.
6140        ///
6141        /// # Long running operations
6142        ///
6143        /// This starts, but does not poll, a longrunning operation. More information
6144        /// on [delete_metadata_feed][crate::client::CatalogService::delete_metadata_feed].
6145        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6146            (*self.0.stub)
6147                .delete_metadata_feed(self.0.request, self.0.options)
6148                .await
6149                .map(crate::Response::into_body)
6150        }
6151
6152        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_metadata_feed`.
6153        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6154            type Operation =
6155                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6156            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6157            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6158
6159            let stub = self.0.stub.clone();
6160            let mut options = self.0.options.clone();
6161            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6162            let query = move |name| {
6163                let stub = stub.clone();
6164                let options = options.clone();
6165                async {
6166                    let op = GetOperation::new(stub)
6167                        .set_name(name)
6168                        .with_options(options)
6169                        .send()
6170                        .await?;
6171                    Ok(Operation::new(op))
6172                }
6173            };
6174
6175            let start = move || async {
6176                let op = self.send().await?;
6177                Ok(Operation::new(op))
6178            };
6179
6180            google_cloud_lro::internal::new_unit_response_poller(
6181                polling_error_policy,
6182                polling_backoff_policy,
6183                start,
6184                query,
6185            )
6186        }
6187
6188        /// Sets the value of [name][crate::model::DeleteMetadataFeedRequest::name].
6189        ///
6190        /// This is a **required** field for requests.
6191        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6192            self.0.request.name = v.into();
6193            self
6194        }
6195    }
6196
6197    #[doc(hidden)]
6198    impl crate::RequestBuilder for DeleteMetadataFeed {
6199        fn request_options(&mut self) -> &mut crate::RequestOptions {
6200            &mut self.0.options
6201        }
6202    }
6203
6204    /// The request builder for [CatalogService::update_metadata_feed][crate::client::CatalogService::update_metadata_feed] calls.
6205    ///
6206    /// # Example
6207    /// ```
6208    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateMetadataFeed;
6209    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6210    /// use google_cloud_lro::Poller;
6211    ///
6212    /// let builder = prepare_request_builder();
6213    /// let response = builder.poller().until_done().await?;
6214    /// # Ok(()) }
6215    ///
6216    /// fn prepare_request_builder() -> UpdateMetadataFeed {
6217    ///   # panic!();
6218    ///   // ... details omitted ...
6219    /// }
6220    /// ```
6221    #[derive(Clone, Debug)]
6222    pub struct UpdateMetadataFeed(RequestBuilder<crate::model::UpdateMetadataFeedRequest>);
6223
6224    impl UpdateMetadataFeed {
6225        pub(crate) fn new(
6226            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6227        ) -> Self {
6228            Self(RequestBuilder::new(stub))
6229        }
6230
6231        /// Sets the full request, replacing any prior values.
6232        pub fn with_request<V: Into<crate::model::UpdateMetadataFeedRequest>>(
6233            mut self,
6234            v: V,
6235        ) -> Self {
6236            self.0.request = v.into();
6237            self
6238        }
6239
6240        /// Sets all the options, replacing any prior values.
6241        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6242            self.0.options = v.into();
6243            self
6244        }
6245
6246        /// Sends the request.
6247        ///
6248        /// # Long running operations
6249        ///
6250        /// This starts, but does not poll, a longrunning operation. More information
6251        /// on [update_metadata_feed][crate::client::CatalogService::update_metadata_feed].
6252        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6253            (*self.0.stub)
6254                .update_metadata_feed(self.0.request, self.0.options)
6255                .await
6256                .map(crate::Response::into_body)
6257        }
6258
6259        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_metadata_feed`.
6260        pub fn poller(
6261            self,
6262        ) -> impl google_cloud_lro::Poller<crate::model::MetadataFeed, crate::model::OperationMetadata>
6263        {
6264            type Operation = google_cloud_lro::internal::Operation<
6265                crate::model::MetadataFeed,
6266                crate::model::OperationMetadata,
6267            >;
6268            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6269            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6270
6271            let stub = self.0.stub.clone();
6272            let mut options = self.0.options.clone();
6273            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6274            let query = move |name| {
6275                let stub = stub.clone();
6276                let options = options.clone();
6277                async {
6278                    let op = GetOperation::new(stub)
6279                        .set_name(name)
6280                        .with_options(options)
6281                        .send()
6282                        .await?;
6283                    Ok(Operation::new(op))
6284                }
6285            };
6286
6287            let start = move || async {
6288                let op = self.send().await?;
6289                Ok(Operation::new(op))
6290            };
6291
6292            google_cloud_lro::internal::new_poller(
6293                polling_error_policy,
6294                polling_backoff_policy,
6295                start,
6296                query,
6297            )
6298        }
6299
6300        /// Sets the value of [metadata_feed][crate::model::UpdateMetadataFeedRequest::metadata_feed].
6301        ///
6302        /// This is a **required** field for requests.
6303        pub fn set_metadata_feed<T>(mut self, v: T) -> Self
6304        where
6305            T: std::convert::Into<crate::model::MetadataFeed>,
6306        {
6307            self.0.request.metadata_feed = std::option::Option::Some(v.into());
6308            self
6309        }
6310
6311        /// Sets or clears the value of [metadata_feed][crate::model::UpdateMetadataFeedRequest::metadata_feed].
6312        ///
6313        /// This is a **required** field for requests.
6314        pub fn set_or_clear_metadata_feed<T>(mut self, v: std::option::Option<T>) -> Self
6315        where
6316            T: std::convert::Into<crate::model::MetadataFeed>,
6317        {
6318            self.0.request.metadata_feed = v.map(|x| x.into());
6319            self
6320        }
6321
6322        /// Sets the value of [update_mask][crate::model::UpdateMetadataFeedRequest::update_mask].
6323        pub fn set_update_mask<T>(mut self, v: T) -> Self
6324        where
6325            T: std::convert::Into<wkt::FieldMask>,
6326        {
6327            self.0.request.update_mask = std::option::Option::Some(v.into());
6328            self
6329        }
6330
6331        /// Sets or clears the value of [update_mask][crate::model::UpdateMetadataFeedRequest::update_mask].
6332        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6333        where
6334            T: std::convert::Into<wkt::FieldMask>,
6335        {
6336            self.0.request.update_mask = v.map(|x| x.into());
6337            self
6338        }
6339
6340        /// Sets the value of [validate_only][crate::model::UpdateMetadataFeedRequest::validate_only].
6341        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
6342            self.0.request.validate_only = v.into();
6343            self
6344        }
6345    }
6346
6347    #[doc(hidden)]
6348    impl crate::RequestBuilder for UpdateMetadataFeed {
6349        fn request_options(&mut self) -> &mut crate::RequestOptions {
6350            &mut self.0.options
6351        }
6352    }
6353
6354    /// The request builder for [CatalogService::list_locations][crate::client::CatalogService::list_locations] calls.
6355    ///
6356    /// # Example
6357    /// ```
6358    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListLocations;
6359    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6360    /// use google_cloud_gax::paginator::ItemPaginator;
6361    ///
6362    /// let builder = prepare_request_builder();
6363    /// let mut items = builder.by_item();
6364    /// while let Some(result) = items.next().await {
6365    ///   let item = result?;
6366    /// }
6367    /// # Ok(()) }
6368    ///
6369    /// fn prepare_request_builder() -> ListLocations {
6370    ///   # panic!();
6371    ///   // ... details omitted ...
6372    /// }
6373    /// ```
6374    #[derive(Clone, Debug)]
6375    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
6376
6377    impl ListLocations {
6378        pub(crate) fn new(
6379            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6380        ) -> Self {
6381            Self(RequestBuilder::new(stub))
6382        }
6383
6384        /// Sets the full request, replacing any prior values.
6385        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
6386            mut self,
6387            v: V,
6388        ) -> Self {
6389            self.0.request = v.into();
6390            self
6391        }
6392
6393        /// Sets all the options, replacing any prior values.
6394        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6395            self.0.options = v.into();
6396            self
6397        }
6398
6399        /// Sends the request.
6400        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
6401            (*self.0.stub)
6402                .list_locations(self.0.request, self.0.options)
6403                .await
6404                .map(crate::Response::into_body)
6405        }
6406
6407        /// Streams each page in the collection.
6408        pub fn by_page(
6409            self,
6410        ) -> impl google_cloud_gax::paginator::Paginator<
6411            google_cloud_location::model::ListLocationsResponse,
6412            crate::Error,
6413        > {
6414            use std::clone::Clone;
6415            let token = self.0.request.page_token.clone();
6416            let execute = move |token: String| {
6417                let mut builder = self.clone();
6418                builder.0.request = builder.0.request.set_page_token(token);
6419                builder.send()
6420            };
6421            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6422        }
6423
6424        /// Streams each item in the collection.
6425        pub fn by_item(
6426            self,
6427        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6428            google_cloud_location::model::ListLocationsResponse,
6429            crate::Error,
6430        > {
6431            use google_cloud_gax::paginator::Paginator;
6432            self.by_page().items()
6433        }
6434
6435        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
6436        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6437            self.0.request.name = v.into();
6438            self
6439        }
6440
6441        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
6442        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6443            self.0.request.filter = v.into();
6444            self
6445        }
6446
6447        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
6448        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6449            self.0.request.page_size = v.into();
6450            self
6451        }
6452
6453        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
6454        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6455            self.0.request.page_token = v.into();
6456            self
6457        }
6458    }
6459
6460    #[doc(hidden)]
6461    impl crate::RequestBuilder for ListLocations {
6462        fn request_options(&mut self) -> &mut crate::RequestOptions {
6463            &mut self.0.options
6464        }
6465    }
6466
6467    /// The request builder for [CatalogService::get_location][crate::client::CatalogService::get_location] calls.
6468    ///
6469    /// # Example
6470    /// ```
6471    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetLocation;
6472    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6473    ///
6474    /// let builder = prepare_request_builder();
6475    /// let response = builder.send().await?;
6476    /// # Ok(()) }
6477    ///
6478    /// fn prepare_request_builder() -> GetLocation {
6479    ///   # panic!();
6480    ///   // ... details omitted ...
6481    /// }
6482    /// ```
6483    #[derive(Clone, Debug)]
6484    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
6485
6486    impl GetLocation {
6487        pub(crate) fn new(
6488            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6489        ) -> Self {
6490            Self(RequestBuilder::new(stub))
6491        }
6492
6493        /// Sets the full request, replacing any prior values.
6494        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
6495            mut self,
6496            v: V,
6497        ) -> Self {
6498            self.0.request = v.into();
6499            self
6500        }
6501
6502        /// Sets all the options, replacing any prior values.
6503        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6504            self.0.options = v.into();
6505            self
6506        }
6507
6508        /// Sends the request.
6509        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
6510            (*self.0.stub)
6511                .get_location(self.0.request, self.0.options)
6512                .await
6513                .map(crate::Response::into_body)
6514        }
6515
6516        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
6517        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6518            self.0.request.name = v.into();
6519            self
6520        }
6521    }
6522
6523    #[doc(hidden)]
6524    impl crate::RequestBuilder for GetLocation {
6525        fn request_options(&mut self) -> &mut crate::RequestOptions {
6526            &mut self.0.options
6527        }
6528    }
6529
6530    /// The request builder for [CatalogService::set_iam_policy][crate::client::CatalogService::set_iam_policy] calls.
6531    ///
6532    /// # Example
6533    /// ```
6534    /// # use google_cloud_dataplex_v1::builder::catalog_service::SetIamPolicy;
6535    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6536    ///
6537    /// let builder = prepare_request_builder();
6538    /// let response = builder.send().await?;
6539    /// # Ok(()) }
6540    ///
6541    /// fn prepare_request_builder() -> SetIamPolicy {
6542    ///   # panic!();
6543    ///   // ... details omitted ...
6544    /// }
6545    /// ```
6546    #[derive(Clone, Debug)]
6547    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
6548
6549    impl SetIamPolicy {
6550        pub(crate) fn new(
6551            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6552        ) -> Self {
6553            Self(RequestBuilder::new(stub))
6554        }
6555
6556        /// Sets the full request, replacing any prior values.
6557        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
6558            mut self,
6559            v: V,
6560        ) -> Self {
6561            self.0.request = v.into();
6562            self
6563        }
6564
6565        /// Sets all the options, replacing any prior values.
6566        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6567            self.0.options = v.into();
6568            self
6569        }
6570
6571        /// Sends the request.
6572        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
6573            (*self.0.stub)
6574                .set_iam_policy(self.0.request, self.0.options)
6575                .await
6576                .map(crate::Response::into_body)
6577        }
6578
6579        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
6580        ///
6581        /// This is a **required** field for requests.
6582        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6583            self.0.request.resource = v.into();
6584            self
6585        }
6586
6587        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
6588        ///
6589        /// This is a **required** field for requests.
6590        pub fn set_policy<T>(mut self, v: T) -> Self
6591        where
6592            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
6593        {
6594            self.0.request.policy = std::option::Option::Some(v.into());
6595            self
6596        }
6597
6598        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
6599        ///
6600        /// This is a **required** field for requests.
6601        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
6602        where
6603            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
6604        {
6605            self.0.request.policy = v.map(|x| x.into());
6606            self
6607        }
6608
6609        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
6610        pub fn set_update_mask<T>(mut self, v: T) -> Self
6611        where
6612            T: std::convert::Into<wkt::FieldMask>,
6613        {
6614            self.0.request.update_mask = std::option::Option::Some(v.into());
6615            self
6616        }
6617
6618        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
6619        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6620        where
6621            T: std::convert::Into<wkt::FieldMask>,
6622        {
6623            self.0.request.update_mask = v.map(|x| x.into());
6624            self
6625        }
6626    }
6627
6628    #[doc(hidden)]
6629    impl crate::RequestBuilder for SetIamPolicy {
6630        fn request_options(&mut self) -> &mut crate::RequestOptions {
6631            &mut self.0.options
6632        }
6633    }
6634
6635    /// The request builder for [CatalogService::get_iam_policy][crate::client::CatalogService::get_iam_policy] calls.
6636    ///
6637    /// # Example
6638    /// ```
6639    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetIamPolicy;
6640    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6641    ///
6642    /// let builder = prepare_request_builder();
6643    /// let response = builder.send().await?;
6644    /// # Ok(()) }
6645    ///
6646    /// fn prepare_request_builder() -> GetIamPolicy {
6647    ///   # panic!();
6648    ///   // ... details omitted ...
6649    /// }
6650    /// ```
6651    #[derive(Clone, Debug)]
6652    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
6653
6654    impl GetIamPolicy {
6655        pub(crate) fn new(
6656            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6657        ) -> Self {
6658            Self(RequestBuilder::new(stub))
6659        }
6660
6661        /// Sets the full request, replacing any prior values.
6662        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
6663            mut self,
6664            v: V,
6665        ) -> Self {
6666            self.0.request = v.into();
6667            self
6668        }
6669
6670        /// Sets all the options, replacing any prior values.
6671        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6672            self.0.options = v.into();
6673            self
6674        }
6675
6676        /// Sends the request.
6677        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
6678            (*self.0.stub)
6679                .get_iam_policy(self.0.request, self.0.options)
6680                .await
6681                .map(crate::Response::into_body)
6682        }
6683
6684        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
6685        ///
6686        /// This is a **required** field for requests.
6687        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6688            self.0.request.resource = v.into();
6689            self
6690        }
6691
6692        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
6693        pub fn set_options<T>(mut self, v: T) -> Self
6694        where
6695            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
6696        {
6697            self.0.request.options = std::option::Option::Some(v.into());
6698            self
6699        }
6700
6701        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
6702        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
6703        where
6704            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
6705        {
6706            self.0.request.options = v.map(|x| x.into());
6707            self
6708        }
6709    }
6710
6711    #[doc(hidden)]
6712    impl crate::RequestBuilder for GetIamPolicy {
6713        fn request_options(&mut self) -> &mut crate::RequestOptions {
6714            &mut self.0.options
6715        }
6716    }
6717
6718    /// The request builder for [CatalogService::test_iam_permissions][crate::client::CatalogService::test_iam_permissions] calls.
6719    ///
6720    /// # Example
6721    /// ```
6722    /// # use google_cloud_dataplex_v1::builder::catalog_service::TestIamPermissions;
6723    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6724    ///
6725    /// let builder = prepare_request_builder();
6726    /// let response = builder.send().await?;
6727    /// # Ok(()) }
6728    ///
6729    /// fn prepare_request_builder() -> TestIamPermissions {
6730    ///   # panic!();
6731    ///   // ... details omitted ...
6732    /// }
6733    /// ```
6734    #[derive(Clone, Debug)]
6735    pub struct TestIamPermissions(
6736        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
6737    );
6738
6739    impl TestIamPermissions {
6740        pub(crate) fn new(
6741            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6742        ) -> Self {
6743            Self(RequestBuilder::new(stub))
6744        }
6745
6746        /// Sets the full request, replacing any prior values.
6747        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
6748            mut self,
6749            v: V,
6750        ) -> Self {
6751            self.0.request = v.into();
6752            self
6753        }
6754
6755        /// Sets all the options, replacing any prior values.
6756        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6757            self.0.options = v.into();
6758            self
6759        }
6760
6761        /// Sends the request.
6762        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
6763            (*self.0.stub)
6764                .test_iam_permissions(self.0.request, self.0.options)
6765                .await
6766                .map(crate::Response::into_body)
6767        }
6768
6769        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
6770        ///
6771        /// This is a **required** field for requests.
6772        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6773            self.0.request.resource = v.into();
6774            self
6775        }
6776
6777        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
6778        ///
6779        /// This is a **required** field for requests.
6780        pub fn set_permissions<T, V>(mut self, v: T) -> Self
6781        where
6782            T: std::iter::IntoIterator<Item = V>,
6783            V: std::convert::Into<std::string::String>,
6784        {
6785            use std::iter::Iterator;
6786            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
6787            self
6788        }
6789    }
6790
6791    #[doc(hidden)]
6792    impl crate::RequestBuilder for TestIamPermissions {
6793        fn request_options(&mut self) -> &mut crate::RequestOptions {
6794            &mut self.0.options
6795        }
6796    }
6797
6798    /// The request builder for [CatalogService::list_operations][crate::client::CatalogService::list_operations] calls.
6799    ///
6800    /// # Example
6801    /// ```
6802    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListOperations;
6803    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6804    /// use google_cloud_gax::paginator::ItemPaginator;
6805    ///
6806    /// let builder = prepare_request_builder();
6807    /// let mut items = builder.by_item();
6808    /// while let Some(result) = items.next().await {
6809    ///   let item = result?;
6810    /// }
6811    /// # Ok(()) }
6812    ///
6813    /// fn prepare_request_builder() -> ListOperations {
6814    ///   # panic!();
6815    ///   // ... details omitted ...
6816    /// }
6817    /// ```
6818    #[derive(Clone, Debug)]
6819    pub struct ListOperations(
6820        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
6821    );
6822
6823    impl ListOperations {
6824        pub(crate) fn new(
6825            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6826        ) -> Self {
6827            Self(RequestBuilder::new(stub))
6828        }
6829
6830        /// Sets the full request, replacing any prior values.
6831        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
6832            mut self,
6833            v: V,
6834        ) -> Self {
6835            self.0.request = v.into();
6836            self
6837        }
6838
6839        /// Sets all the options, replacing any prior values.
6840        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6841            self.0.options = v.into();
6842            self
6843        }
6844
6845        /// Sends the request.
6846        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
6847            (*self.0.stub)
6848                .list_operations(self.0.request, self.0.options)
6849                .await
6850                .map(crate::Response::into_body)
6851        }
6852
6853        /// Streams each page in the collection.
6854        pub fn by_page(
6855            self,
6856        ) -> impl google_cloud_gax::paginator::Paginator<
6857            google_cloud_longrunning::model::ListOperationsResponse,
6858            crate::Error,
6859        > {
6860            use std::clone::Clone;
6861            let token = self.0.request.page_token.clone();
6862            let execute = move |token: String| {
6863                let mut builder = self.clone();
6864                builder.0.request = builder.0.request.set_page_token(token);
6865                builder.send()
6866            };
6867            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6868        }
6869
6870        /// Streams each item in the collection.
6871        pub fn by_item(
6872            self,
6873        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6874            google_cloud_longrunning::model::ListOperationsResponse,
6875            crate::Error,
6876        > {
6877            use google_cloud_gax::paginator::Paginator;
6878            self.by_page().items()
6879        }
6880
6881        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
6882        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6883            self.0.request.name = v.into();
6884            self
6885        }
6886
6887        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
6888        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6889            self.0.request.filter = v.into();
6890            self
6891        }
6892
6893        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
6894        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6895            self.0.request.page_size = v.into();
6896            self
6897        }
6898
6899        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
6900        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6901            self.0.request.page_token = v.into();
6902            self
6903        }
6904
6905        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
6906        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
6907            self.0.request.return_partial_success = v.into();
6908            self
6909        }
6910    }
6911
6912    #[doc(hidden)]
6913    impl crate::RequestBuilder for ListOperations {
6914        fn request_options(&mut self) -> &mut crate::RequestOptions {
6915            &mut self.0.options
6916        }
6917    }
6918
6919    /// The request builder for [CatalogService::get_operation][crate::client::CatalogService::get_operation] calls.
6920    ///
6921    /// # Example
6922    /// ```
6923    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetOperation;
6924    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6925    ///
6926    /// let builder = prepare_request_builder();
6927    /// let response = builder.send().await?;
6928    /// # Ok(()) }
6929    ///
6930    /// fn prepare_request_builder() -> GetOperation {
6931    ///   # panic!();
6932    ///   // ... details omitted ...
6933    /// }
6934    /// ```
6935    #[derive(Clone, Debug)]
6936    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
6937
6938    impl GetOperation {
6939        pub(crate) fn new(
6940            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6941        ) -> Self {
6942            Self(RequestBuilder::new(stub))
6943        }
6944
6945        /// Sets the full request, replacing any prior values.
6946        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
6947            mut self,
6948            v: V,
6949        ) -> Self {
6950            self.0.request = v.into();
6951            self
6952        }
6953
6954        /// Sets all the options, replacing any prior values.
6955        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6956            self.0.options = v.into();
6957            self
6958        }
6959
6960        /// Sends the request.
6961        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6962            (*self.0.stub)
6963                .get_operation(self.0.request, self.0.options)
6964                .await
6965                .map(crate::Response::into_body)
6966        }
6967
6968        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
6969        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6970            self.0.request.name = v.into();
6971            self
6972        }
6973    }
6974
6975    #[doc(hidden)]
6976    impl crate::RequestBuilder for GetOperation {
6977        fn request_options(&mut self) -> &mut crate::RequestOptions {
6978            &mut self.0.options
6979        }
6980    }
6981
6982    /// The request builder for [CatalogService::delete_operation][crate::client::CatalogService::delete_operation] calls.
6983    ///
6984    /// # Example
6985    /// ```
6986    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteOperation;
6987    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6988    ///
6989    /// let builder = prepare_request_builder();
6990    /// let response = builder.send().await?;
6991    /// # Ok(()) }
6992    ///
6993    /// fn prepare_request_builder() -> DeleteOperation {
6994    ///   # panic!();
6995    ///   // ... details omitted ...
6996    /// }
6997    /// ```
6998    #[derive(Clone, Debug)]
6999    pub struct DeleteOperation(
7000        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
7001    );
7002
7003    impl DeleteOperation {
7004        pub(crate) fn new(
7005            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
7006        ) -> Self {
7007            Self(RequestBuilder::new(stub))
7008        }
7009
7010        /// Sets the full request, replacing any prior values.
7011        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
7012            mut self,
7013            v: V,
7014        ) -> Self {
7015            self.0.request = v.into();
7016            self
7017        }
7018
7019        /// Sets all the options, replacing any prior values.
7020        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7021            self.0.options = v.into();
7022            self
7023        }
7024
7025        /// Sends the request.
7026        pub async fn send(self) -> Result<()> {
7027            (*self.0.stub)
7028                .delete_operation(self.0.request, self.0.options)
7029                .await
7030                .map(crate::Response::into_body)
7031        }
7032
7033        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
7034        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7035            self.0.request.name = v.into();
7036            self
7037        }
7038    }
7039
7040    #[doc(hidden)]
7041    impl crate::RequestBuilder for DeleteOperation {
7042        fn request_options(&mut self) -> &mut crate::RequestOptions {
7043            &mut self.0.options
7044        }
7045    }
7046
7047    /// The request builder for [CatalogService::cancel_operation][crate::client::CatalogService::cancel_operation] calls.
7048    ///
7049    /// # Example
7050    /// ```
7051    /// # use google_cloud_dataplex_v1::builder::catalog_service::CancelOperation;
7052    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7053    ///
7054    /// let builder = prepare_request_builder();
7055    /// let response = builder.send().await?;
7056    /// # Ok(()) }
7057    ///
7058    /// fn prepare_request_builder() -> CancelOperation {
7059    ///   # panic!();
7060    ///   // ... details omitted ...
7061    /// }
7062    /// ```
7063    #[derive(Clone, Debug)]
7064    pub struct CancelOperation(
7065        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
7066    );
7067
7068    impl CancelOperation {
7069        pub(crate) fn new(
7070            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
7071        ) -> Self {
7072            Self(RequestBuilder::new(stub))
7073        }
7074
7075        /// Sets the full request, replacing any prior values.
7076        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
7077            mut self,
7078            v: V,
7079        ) -> Self {
7080            self.0.request = v.into();
7081            self
7082        }
7083
7084        /// Sets all the options, replacing any prior values.
7085        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7086            self.0.options = v.into();
7087            self
7088        }
7089
7090        /// Sends the request.
7091        pub async fn send(self) -> Result<()> {
7092            (*self.0.stub)
7093                .cancel_operation(self.0.request, self.0.options)
7094                .await
7095                .map(crate::Response::into_body)
7096        }
7097
7098        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
7099        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7100            self.0.request.name = v.into();
7101            self
7102        }
7103    }
7104
7105    #[doc(hidden)]
7106    impl crate::RequestBuilder for CancelOperation {
7107        fn request_options(&mut self) -> &mut crate::RequestOptions {
7108            &mut self.0.options
7109        }
7110    }
7111}
7112
7113/// Request and client builders for [CmekService][crate::client::CmekService].
7114pub mod cmek_service {
7115    use crate::Result;
7116
7117    /// A builder for [CmekService][crate::client::CmekService].
7118    ///
7119    /// ```
7120    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
7121    /// # use google_cloud_dataplex_v1::*;
7122    /// # use builder::cmek_service::ClientBuilder;
7123    /// # use client::CmekService;
7124    /// let builder : ClientBuilder = CmekService::builder();
7125    /// let client = builder
7126    ///     .with_endpoint("https://dataplex.googleapis.com")
7127    ///     .build().await?;
7128    /// # Ok(()) }
7129    /// ```
7130    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
7131
7132    pub(crate) mod client {
7133        use super::super::super::client::CmekService;
7134        pub struct Factory;
7135        impl crate::ClientFactory for Factory {
7136            type Client = CmekService;
7137            type Credentials = gaxi::options::Credentials;
7138            async fn build(
7139                self,
7140                config: gaxi::options::ClientConfig,
7141            ) -> crate::ClientBuilderResult<Self::Client> {
7142                Self::Client::new(config).await
7143            }
7144        }
7145    }
7146
7147    /// Common implementation for [crate::client::CmekService] request builders.
7148    #[derive(Clone, Debug)]
7149    pub(crate) struct RequestBuilder<R: std::default::Default> {
7150        stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7151        request: R,
7152        options: crate::RequestOptions,
7153    }
7154
7155    impl<R> RequestBuilder<R>
7156    where
7157        R: std::default::Default,
7158    {
7159        pub(crate) fn new(
7160            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7161        ) -> Self {
7162            Self {
7163                stub,
7164                request: R::default(),
7165                options: crate::RequestOptions::default(),
7166            }
7167        }
7168    }
7169
7170    /// The request builder for [CmekService::create_encryption_config][crate::client::CmekService::create_encryption_config] calls.
7171    ///
7172    /// # Example
7173    /// ```
7174    /// # use google_cloud_dataplex_v1::builder::cmek_service::CreateEncryptionConfig;
7175    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7176    /// use google_cloud_lro::Poller;
7177    ///
7178    /// let builder = prepare_request_builder();
7179    /// let response = builder.poller().until_done().await?;
7180    /// # Ok(()) }
7181    ///
7182    /// fn prepare_request_builder() -> CreateEncryptionConfig {
7183    ///   # panic!();
7184    ///   // ... details omitted ...
7185    /// }
7186    /// ```
7187    #[derive(Clone, Debug)]
7188    pub struct CreateEncryptionConfig(RequestBuilder<crate::model::CreateEncryptionConfigRequest>);
7189
7190    impl CreateEncryptionConfig {
7191        pub(crate) fn new(
7192            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7193        ) -> Self {
7194            Self(RequestBuilder::new(stub))
7195        }
7196
7197        /// Sets the full request, replacing any prior values.
7198        pub fn with_request<V: Into<crate::model::CreateEncryptionConfigRequest>>(
7199            mut self,
7200            v: V,
7201        ) -> Self {
7202            self.0.request = v.into();
7203            self
7204        }
7205
7206        /// Sets all the options, replacing any prior values.
7207        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7208            self.0.options = v.into();
7209            self
7210        }
7211
7212        /// Sends the request.
7213        ///
7214        /// # Long running operations
7215        ///
7216        /// This starts, but does not poll, a longrunning operation. More information
7217        /// on [create_encryption_config][crate::client::CmekService::create_encryption_config].
7218        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7219            (*self.0.stub)
7220                .create_encryption_config(self.0.request, self.0.options)
7221                .await
7222                .map(crate::Response::into_body)
7223        }
7224
7225        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_encryption_config`.
7226        pub fn poller(
7227            self,
7228        ) -> impl google_cloud_lro::Poller<crate::model::EncryptionConfig, crate::model::OperationMetadata>
7229        {
7230            type Operation = google_cloud_lro::internal::Operation<
7231                crate::model::EncryptionConfig,
7232                crate::model::OperationMetadata,
7233            >;
7234            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7235            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7236
7237            let stub = self.0.stub.clone();
7238            let mut options = self.0.options.clone();
7239            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7240            let query = move |name| {
7241                let stub = stub.clone();
7242                let options = options.clone();
7243                async {
7244                    let op = GetOperation::new(stub)
7245                        .set_name(name)
7246                        .with_options(options)
7247                        .send()
7248                        .await?;
7249                    Ok(Operation::new(op))
7250                }
7251            };
7252
7253            let start = move || async {
7254                let op = self.send().await?;
7255                Ok(Operation::new(op))
7256            };
7257
7258            google_cloud_lro::internal::new_poller(
7259                polling_error_policy,
7260                polling_backoff_policy,
7261                start,
7262                query,
7263            )
7264        }
7265
7266        /// Sets the value of [parent][crate::model::CreateEncryptionConfigRequest::parent].
7267        ///
7268        /// This is a **required** field for requests.
7269        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7270            self.0.request.parent = v.into();
7271            self
7272        }
7273
7274        /// Sets the value of [encryption_config_id][crate::model::CreateEncryptionConfigRequest::encryption_config_id].
7275        ///
7276        /// This is a **required** field for requests.
7277        pub fn set_encryption_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7278            self.0.request.encryption_config_id = v.into();
7279            self
7280        }
7281
7282        /// Sets the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
7283        ///
7284        /// This is a **required** field for requests.
7285        pub fn set_encryption_config<T>(mut self, v: T) -> Self
7286        where
7287            T: std::convert::Into<crate::model::EncryptionConfig>,
7288        {
7289            self.0.request.encryption_config = std::option::Option::Some(v.into());
7290            self
7291        }
7292
7293        /// Sets or clears the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
7294        ///
7295        /// This is a **required** field for requests.
7296        pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
7297        where
7298            T: std::convert::Into<crate::model::EncryptionConfig>,
7299        {
7300            self.0.request.encryption_config = v.map(|x| x.into());
7301            self
7302        }
7303    }
7304
7305    #[doc(hidden)]
7306    impl crate::RequestBuilder for CreateEncryptionConfig {
7307        fn request_options(&mut self) -> &mut crate::RequestOptions {
7308            &mut self.0.options
7309        }
7310    }
7311
7312    /// The request builder for [CmekService::update_encryption_config][crate::client::CmekService::update_encryption_config] calls.
7313    ///
7314    /// # Example
7315    /// ```
7316    /// # use google_cloud_dataplex_v1::builder::cmek_service::UpdateEncryptionConfig;
7317    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7318    /// use google_cloud_lro::Poller;
7319    ///
7320    /// let builder = prepare_request_builder();
7321    /// let response = builder.poller().until_done().await?;
7322    /// # Ok(()) }
7323    ///
7324    /// fn prepare_request_builder() -> UpdateEncryptionConfig {
7325    ///   # panic!();
7326    ///   // ... details omitted ...
7327    /// }
7328    /// ```
7329    #[derive(Clone, Debug)]
7330    pub struct UpdateEncryptionConfig(RequestBuilder<crate::model::UpdateEncryptionConfigRequest>);
7331
7332    impl UpdateEncryptionConfig {
7333        pub(crate) fn new(
7334            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7335        ) -> Self {
7336            Self(RequestBuilder::new(stub))
7337        }
7338
7339        /// Sets the full request, replacing any prior values.
7340        pub fn with_request<V: Into<crate::model::UpdateEncryptionConfigRequest>>(
7341            mut self,
7342            v: V,
7343        ) -> Self {
7344            self.0.request = v.into();
7345            self
7346        }
7347
7348        /// Sets all the options, replacing any prior values.
7349        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7350            self.0.options = v.into();
7351            self
7352        }
7353
7354        /// Sends the request.
7355        ///
7356        /// # Long running operations
7357        ///
7358        /// This starts, but does not poll, a longrunning operation. More information
7359        /// on [update_encryption_config][crate::client::CmekService::update_encryption_config].
7360        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7361            (*self.0.stub)
7362                .update_encryption_config(self.0.request, self.0.options)
7363                .await
7364                .map(crate::Response::into_body)
7365        }
7366
7367        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_encryption_config`.
7368        pub fn poller(
7369            self,
7370        ) -> impl google_cloud_lro::Poller<crate::model::EncryptionConfig, crate::model::OperationMetadata>
7371        {
7372            type Operation = google_cloud_lro::internal::Operation<
7373                crate::model::EncryptionConfig,
7374                crate::model::OperationMetadata,
7375            >;
7376            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7377            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7378
7379            let stub = self.0.stub.clone();
7380            let mut options = self.0.options.clone();
7381            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7382            let query = move |name| {
7383                let stub = stub.clone();
7384                let options = options.clone();
7385                async {
7386                    let op = GetOperation::new(stub)
7387                        .set_name(name)
7388                        .with_options(options)
7389                        .send()
7390                        .await?;
7391                    Ok(Operation::new(op))
7392                }
7393            };
7394
7395            let start = move || async {
7396                let op = self.send().await?;
7397                Ok(Operation::new(op))
7398            };
7399
7400            google_cloud_lro::internal::new_poller(
7401                polling_error_policy,
7402                polling_backoff_policy,
7403                start,
7404                query,
7405            )
7406        }
7407
7408        /// Sets the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
7409        ///
7410        /// This is a **required** field for requests.
7411        pub fn set_encryption_config<T>(mut self, v: T) -> Self
7412        where
7413            T: std::convert::Into<crate::model::EncryptionConfig>,
7414        {
7415            self.0.request.encryption_config = std::option::Option::Some(v.into());
7416            self
7417        }
7418
7419        /// Sets or clears the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
7420        ///
7421        /// This is a **required** field for requests.
7422        pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
7423        where
7424            T: std::convert::Into<crate::model::EncryptionConfig>,
7425        {
7426            self.0.request.encryption_config = v.map(|x| x.into());
7427            self
7428        }
7429
7430        /// Sets the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
7431        pub fn set_update_mask<T>(mut self, v: T) -> Self
7432        where
7433            T: std::convert::Into<wkt::FieldMask>,
7434        {
7435            self.0.request.update_mask = std::option::Option::Some(v.into());
7436            self
7437        }
7438
7439        /// Sets or clears the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
7440        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7441        where
7442            T: std::convert::Into<wkt::FieldMask>,
7443        {
7444            self.0.request.update_mask = v.map(|x| x.into());
7445            self
7446        }
7447    }
7448
7449    #[doc(hidden)]
7450    impl crate::RequestBuilder for UpdateEncryptionConfig {
7451        fn request_options(&mut self) -> &mut crate::RequestOptions {
7452            &mut self.0.options
7453        }
7454    }
7455
7456    /// The request builder for [CmekService::delete_encryption_config][crate::client::CmekService::delete_encryption_config] calls.
7457    ///
7458    /// # Example
7459    /// ```
7460    /// # use google_cloud_dataplex_v1::builder::cmek_service::DeleteEncryptionConfig;
7461    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7462    /// use google_cloud_lro::Poller;
7463    ///
7464    /// let builder = prepare_request_builder();
7465    /// let response = builder.poller().until_done().await?;
7466    /// # Ok(()) }
7467    ///
7468    /// fn prepare_request_builder() -> DeleteEncryptionConfig {
7469    ///   # panic!();
7470    ///   // ... details omitted ...
7471    /// }
7472    /// ```
7473    #[derive(Clone, Debug)]
7474    pub struct DeleteEncryptionConfig(RequestBuilder<crate::model::DeleteEncryptionConfigRequest>);
7475
7476    impl DeleteEncryptionConfig {
7477        pub(crate) fn new(
7478            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7479        ) -> Self {
7480            Self(RequestBuilder::new(stub))
7481        }
7482
7483        /// Sets the full request, replacing any prior values.
7484        pub fn with_request<V: Into<crate::model::DeleteEncryptionConfigRequest>>(
7485            mut self,
7486            v: V,
7487        ) -> Self {
7488            self.0.request = v.into();
7489            self
7490        }
7491
7492        /// Sets all the options, replacing any prior values.
7493        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7494            self.0.options = v.into();
7495            self
7496        }
7497
7498        /// Sends the request.
7499        ///
7500        /// # Long running operations
7501        ///
7502        /// This starts, but does not poll, a longrunning operation. More information
7503        /// on [delete_encryption_config][crate::client::CmekService::delete_encryption_config].
7504        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7505            (*self.0.stub)
7506                .delete_encryption_config(self.0.request, self.0.options)
7507                .await
7508                .map(crate::Response::into_body)
7509        }
7510
7511        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_encryption_config`.
7512        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
7513            type Operation =
7514                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7515            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7516            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7517
7518            let stub = self.0.stub.clone();
7519            let mut options = self.0.options.clone();
7520            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7521            let query = move |name| {
7522                let stub = stub.clone();
7523                let options = options.clone();
7524                async {
7525                    let op = GetOperation::new(stub)
7526                        .set_name(name)
7527                        .with_options(options)
7528                        .send()
7529                        .await?;
7530                    Ok(Operation::new(op))
7531                }
7532            };
7533
7534            let start = move || async {
7535                let op = self.send().await?;
7536                Ok(Operation::new(op))
7537            };
7538
7539            google_cloud_lro::internal::new_unit_response_poller(
7540                polling_error_policy,
7541                polling_backoff_policy,
7542                start,
7543                query,
7544            )
7545        }
7546
7547        /// Sets the value of [name][crate::model::DeleteEncryptionConfigRequest::name].
7548        ///
7549        /// This is a **required** field for requests.
7550        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7551            self.0.request.name = v.into();
7552            self
7553        }
7554
7555        /// Sets the value of [etag][crate::model::DeleteEncryptionConfigRequest::etag].
7556        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
7557            self.0.request.etag = v.into();
7558            self
7559        }
7560    }
7561
7562    #[doc(hidden)]
7563    impl crate::RequestBuilder for DeleteEncryptionConfig {
7564        fn request_options(&mut self) -> &mut crate::RequestOptions {
7565            &mut self.0.options
7566        }
7567    }
7568
7569    /// The request builder for [CmekService::list_encryption_configs][crate::client::CmekService::list_encryption_configs] calls.
7570    ///
7571    /// # Example
7572    /// ```
7573    /// # use google_cloud_dataplex_v1::builder::cmek_service::ListEncryptionConfigs;
7574    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7575    /// use google_cloud_gax::paginator::ItemPaginator;
7576    ///
7577    /// let builder = prepare_request_builder();
7578    /// let mut items = builder.by_item();
7579    /// while let Some(result) = items.next().await {
7580    ///   let item = result?;
7581    /// }
7582    /// # Ok(()) }
7583    ///
7584    /// fn prepare_request_builder() -> ListEncryptionConfigs {
7585    ///   # panic!();
7586    ///   // ... details omitted ...
7587    /// }
7588    /// ```
7589    #[derive(Clone, Debug)]
7590    pub struct ListEncryptionConfigs(RequestBuilder<crate::model::ListEncryptionConfigsRequest>);
7591
7592    impl ListEncryptionConfigs {
7593        pub(crate) fn new(
7594            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7595        ) -> Self {
7596            Self(RequestBuilder::new(stub))
7597        }
7598
7599        /// Sets the full request, replacing any prior values.
7600        pub fn with_request<V: Into<crate::model::ListEncryptionConfigsRequest>>(
7601            mut self,
7602            v: V,
7603        ) -> Self {
7604            self.0.request = v.into();
7605            self
7606        }
7607
7608        /// Sets all the options, replacing any prior values.
7609        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7610            self.0.options = v.into();
7611            self
7612        }
7613
7614        /// Sends the request.
7615        pub async fn send(self) -> Result<crate::model::ListEncryptionConfigsResponse> {
7616            (*self.0.stub)
7617                .list_encryption_configs(self.0.request, self.0.options)
7618                .await
7619                .map(crate::Response::into_body)
7620        }
7621
7622        /// Streams each page in the collection.
7623        pub fn by_page(
7624            self,
7625        ) -> impl google_cloud_gax::paginator::Paginator<
7626            crate::model::ListEncryptionConfigsResponse,
7627            crate::Error,
7628        > {
7629            use std::clone::Clone;
7630            let token = self.0.request.page_token.clone();
7631            let execute = move |token: String| {
7632                let mut builder = self.clone();
7633                builder.0.request = builder.0.request.set_page_token(token);
7634                builder.send()
7635            };
7636            google_cloud_gax::paginator::internal::new_paginator(token, execute)
7637        }
7638
7639        /// Streams each item in the collection.
7640        pub fn by_item(
7641            self,
7642        ) -> impl google_cloud_gax::paginator::ItemPaginator<
7643            crate::model::ListEncryptionConfigsResponse,
7644            crate::Error,
7645        > {
7646            use google_cloud_gax::paginator::Paginator;
7647            self.by_page().items()
7648        }
7649
7650        /// Sets the value of [parent][crate::model::ListEncryptionConfigsRequest::parent].
7651        ///
7652        /// This is a **required** field for requests.
7653        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7654            self.0.request.parent = v.into();
7655            self
7656        }
7657
7658        /// Sets the value of [page_size][crate::model::ListEncryptionConfigsRequest::page_size].
7659        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7660            self.0.request.page_size = v.into();
7661            self
7662        }
7663
7664        /// Sets the value of [page_token][crate::model::ListEncryptionConfigsRequest::page_token].
7665        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7666            self.0.request.page_token = v.into();
7667            self
7668        }
7669
7670        /// Sets the value of [filter][crate::model::ListEncryptionConfigsRequest::filter].
7671        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7672            self.0.request.filter = v.into();
7673            self
7674        }
7675
7676        /// Sets the value of [order_by][crate::model::ListEncryptionConfigsRequest::order_by].
7677        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7678            self.0.request.order_by = v.into();
7679            self
7680        }
7681    }
7682
7683    #[doc(hidden)]
7684    impl crate::RequestBuilder for ListEncryptionConfigs {
7685        fn request_options(&mut self) -> &mut crate::RequestOptions {
7686            &mut self.0.options
7687        }
7688    }
7689
7690    /// The request builder for [CmekService::get_encryption_config][crate::client::CmekService::get_encryption_config] calls.
7691    ///
7692    /// # Example
7693    /// ```
7694    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetEncryptionConfig;
7695    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7696    ///
7697    /// let builder = prepare_request_builder();
7698    /// let response = builder.send().await?;
7699    /// # Ok(()) }
7700    ///
7701    /// fn prepare_request_builder() -> GetEncryptionConfig {
7702    ///   # panic!();
7703    ///   // ... details omitted ...
7704    /// }
7705    /// ```
7706    #[derive(Clone, Debug)]
7707    pub struct GetEncryptionConfig(RequestBuilder<crate::model::GetEncryptionConfigRequest>);
7708
7709    impl GetEncryptionConfig {
7710        pub(crate) fn new(
7711            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7712        ) -> Self {
7713            Self(RequestBuilder::new(stub))
7714        }
7715
7716        /// Sets the full request, replacing any prior values.
7717        pub fn with_request<V: Into<crate::model::GetEncryptionConfigRequest>>(
7718            mut self,
7719            v: V,
7720        ) -> Self {
7721            self.0.request = v.into();
7722            self
7723        }
7724
7725        /// Sets all the options, replacing any prior values.
7726        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7727            self.0.options = v.into();
7728            self
7729        }
7730
7731        /// Sends the request.
7732        pub async fn send(self) -> Result<crate::model::EncryptionConfig> {
7733            (*self.0.stub)
7734                .get_encryption_config(self.0.request, self.0.options)
7735                .await
7736                .map(crate::Response::into_body)
7737        }
7738
7739        /// Sets the value of [name][crate::model::GetEncryptionConfigRequest::name].
7740        ///
7741        /// This is a **required** field for requests.
7742        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7743            self.0.request.name = v.into();
7744            self
7745        }
7746    }
7747
7748    #[doc(hidden)]
7749    impl crate::RequestBuilder for GetEncryptionConfig {
7750        fn request_options(&mut self) -> &mut crate::RequestOptions {
7751            &mut self.0.options
7752        }
7753    }
7754
7755    /// The request builder for [CmekService::list_locations][crate::client::CmekService::list_locations] calls.
7756    ///
7757    /// # Example
7758    /// ```
7759    /// # use google_cloud_dataplex_v1::builder::cmek_service::ListLocations;
7760    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7761    /// use google_cloud_gax::paginator::ItemPaginator;
7762    ///
7763    /// let builder = prepare_request_builder();
7764    /// let mut items = builder.by_item();
7765    /// while let Some(result) = items.next().await {
7766    ///   let item = result?;
7767    /// }
7768    /// # Ok(()) }
7769    ///
7770    /// fn prepare_request_builder() -> ListLocations {
7771    ///   # panic!();
7772    ///   // ... details omitted ...
7773    /// }
7774    /// ```
7775    #[derive(Clone, Debug)]
7776    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
7777
7778    impl ListLocations {
7779        pub(crate) fn new(
7780            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7781        ) -> Self {
7782            Self(RequestBuilder::new(stub))
7783        }
7784
7785        /// Sets the full request, replacing any prior values.
7786        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
7787            mut self,
7788            v: V,
7789        ) -> Self {
7790            self.0.request = v.into();
7791            self
7792        }
7793
7794        /// Sets all the options, replacing any prior values.
7795        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7796            self.0.options = v.into();
7797            self
7798        }
7799
7800        /// Sends the request.
7801        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
7802            (*self.0.stub)
7803                .list_locations(self.0.request, self.0.options)
7804                .await
7805                .map(crate::Response::into_body)
7806        }
7807
7808        /// Streams each page in the collection.
7809        pub fn by_page(
7810            self,
7811        ) -> impl google_cloud_gax::paginator::Paginator<
7812            google_cloud_location::model::ListLocationsResponse,
7813            crate::Error,
7814        > {
7815            use std::clone::Clone;
7816            let token = self.0.request.page_token.clone();
7817            let execute = move |token: String| {
7818                let mut builder = self.clone();
7819                builder.0.request = builder.0.request.set_page_token(token);
7820                builder.send()
7821            };
7822            google_cloud_gax::paginator::internal::new_paginator(token, execute)
7823        }
7824
7825        /// Streams each item in the collection.
7826        pub fn by_item(
7827            self,
7828        ) -> impl google_cloud_gax::paginator::ItemPaginator<
7829            google_cloud_location::model::ListLocationsResponse,
7830            crate::Error,
7831        > {
7832            use google_cloud_gax::paginator::Paginator;
7833            self.by_page().items()
7834        }
7835
7836        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
7837        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7838            self.0.request.name = v.into();
7839            self
7840        }
7841
7842        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
7843        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7844            self.0.request.filter = v.into();
7845            self
7846        }
7847
7848        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
7849        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7850            self.0.request.page_size = v.into();
7851            self
7852        }
7853
7854        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
7855        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7856            self.0.request.page_token = v.into();
7857            self
7858        }
7859    }
7860
7861    #[doc(hidden)]
7862    impl crate::RequestBuilder for ListLocations {
7863        fn request_options(&mut self) -> &mut crate::RequestOptions {
7864            &mut self.0.options
7865        }
7866    }
7867
7868    /// The request builder for [CmekService::get_location][crate::client::CmekService::get_location] calls.
7869    ///
7870    /// # Example
7871    /// ```
7872    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetLocation;
7873    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7874    ///
7875    /// let builder = prepare_request_builder();
7876    /// let response = builder.send().await?;
7877    /// # Ok(()) }
7878    ///
7879    /// fn prepare_request_builder() -> GetLocation {
7880    ///   # panic!();
7881    ///   // ... details omitted ...
7882    /// }
7883    /// ```
7884    #[derive(Clone, Debug)]
7885    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
7886
7887    impl GetLocation {
7888        pub(crate) fn new(
7889            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7890        ) -> Self {
7891            Self(RequestBuilder::new(stub))
7892        }
7893
7894        /// Sets the full request, replacing any prior values.
7895        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
7896            mut self,
7897            v: V,
7898        ) -> Self {
7899            self.0.request = v.into();
7900            self
7901        }
7902
7903        /// Sets all the options, replacing any prior values.
7904        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7905            self.0.options = v.into();
7906            self
7907        }
7908
7909        /// Sends the request.
7910        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
7911            (*self.0.stub)
7912                .get_location(self.0.request, self.0.options)
7913                .await
7914                .map(crate::Response::into_body)
7915        }
7916
7917        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
7918        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7919            self.0.request.name = v.into();
7920            self
7921        }
7922    }
7923
7924    #[doc(hidden)]
7925    impl crate::RequestBuilder for GetLocation {
7926        fn request_options(&mut self) -> &mut crate::RequestOptions {
7927            &mut self.0.options
7928        }
7929    }
7930
7931    /// The request builder for [CmekService::set_iam_policy][crate::client::CmekService::set_iam_policy] calls.
7932    ///
7933    /// # Example
7934    /// ```
7935    /// # use google_cloud_dataplex_v1::builder::cmek_service::SetIamPolicy;
7936    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7937    ///
7938    /// let builder = prepare_request_builder();
7939    /// let response = builder.send().await?;
7940    /// # Ok(()) }
7941    ///
7942    /// fn prepare_request_builder() -> SetIamPolicy {
7943    ///   # panic!();
7944    ///   // ... details omitted ...
7945    /// }
7946    /// ```
7947    #[derive(Clone, Debug)]
7948    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
7949
7950    impl SetIamPolicy {
7951        pub(crate) fn new(
7952            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7953        ) -> Self {
7954            Self(RequestBuilder::new(stub))
7955        }
7956
7957        /// Sets the full request, replacing any prior values.
7958        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
7959            mut self,
7960            v: V,
7961        ) -> Self {
7962            self.0.request = v.into();
7963            self
7964        }
7965
7966        /// Sets all the options, replacing any prior values.
7967        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7968            self.0.options = v.into();
7969            self
7970        }
7971
7972        /// Sends the request.
7973        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
7974            (*self.0.stub)
7975                .set_iam_policy(self.0.request, self.0.options)
7976                .await
7977                .map(crate::Response::into_body)
7978        }
7979
7980        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
7981        ///
7982        /// This is a **required** field for requests.
7983        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7984            self.0.request.resource = v.into();
7985            self
7986        }
7987
7988        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
7989        ///
7990        /// This is a **required** field for requests.
7991        pub fn set_policy<T>(mut self, v: T) -> Self
7992        where
7993            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
7994        {
7995            self.0.request.policy = std::option::Option::Some(v.into());
7996            self
7997        }
7998
7999        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
8000        ///
8001        /// This is a **required** field for requests.
8002        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
8003        where
8004            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8005        {
8006            self.0.request.policy = v.map(|x| x.into());
8007            self
8008        }
8009
8010        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
8011        pub fn set_update_mask<T>(mut self, v: T) -> Self
8012        where
8013            T: std::convert::Into<wkt::FieldMask>,
8014        {
8015            self.0.request.update_mask = std::option::Option::Some(v.into());
8016            self
8017        }
8018
8019        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
8020        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8021        where
8022            T: std::convert::Into<wkt::FieldMask>,
8023        {
8024            self.0.request.update_mask = v.map(|x| x.into());
8025            self
8026        }
8027    }
8028
8029    #[doc(hidden)]
8030    impl crate::RequestBuilder for SetIamPolicy {
8031        fn request_options(&mut self) -> &mut crate::RequestOptions {
8032            &mut self.0.options
8033        }
8034    }
8035
8036    /// The request builder for [CmekService::get_iam_policy][crate::client::CmekService::get_iam_policy] calls.
8037    ///
8038    /// # Example
8039    /// ```
8040    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetIamPolicy;
8041    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8042    ///
8043    /// let builder = prepare_request_builder();
8044    /// let response = builder.send().await?;
8045    /// # Ok(()) }
8046    ///
8047    /// fn prepare_request_builder() -> GetIamPolicy {
8048    ///   # panic!();
8049    ///   // ... details omitted ...
8050    /// }
8051    /// ```
8052    #[derive(Clone, Debug)]
8053    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
8054
8055    impl GetIamPolicy {
8056        pub(crate) fn new(
8057            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8058        ) -> Self {
8059            Self(RequestBuilder::new(stub))
8060        }
8061
8062        /// Sets the full request, replacing any prior values.
8063        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
8064            mut self,
8065            v: V,
8066        ) -> Self {
8067            self.0.request = v.into();
8068            self
8069        }
8070
8071        /// Sets all the options, replacing any prior values.
8072        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8073            self.0.options = v.into();
8074            self
8075        }
8076
8077        /// Sends the request.
8078        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8079            (*self.0.stub)
8080                .get_iam_policy(self.0.request, self.0.options)
8081                .await
8082                .map(crate::Response::into_body)
8083        }
8084
8085        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
8086        ///
8087        /// This is a **required** field for requests.
8088        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8089            self.0.request.resource = v.into();
8090            self
8091        }
8092
8093        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
8094        pub fn set_options<T>(mut self, v: T) -> Self
8095        where
8096            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
8097        {
8098            self.0.request.options = std::option::Option::Some(v.into());
8099            self
8100        }
8101
8102        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
8103        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
8104        where
8105            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
8106        {
8107            self.0.request.options = v.map(|x| x.into());
8108            self
8109        }
8110    }
8111
8112    #[doc(hidden)]
8113    impl crate::RequestBuilder for GetIamPolicy {
8114        fn request_options(&mut self) -> &mut crate::RequestOptions {
8115            &mut self.0.options
8116        }
8117    }
8118
8119    /// The request builder for [CmekService::test_iam_permissions][crate::client::CmekService::test_iam_permissions] calls.
8120    ///
8121    /// # Example
8122    /// ```
8123    /// # use google_cloud_dataplex_v1::builder::cmek_service::TestIamPermissions;
8124    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8125    ///
8126    /// let builder = prepare_request_builder();
8127    /// let response = builder.send().await?;
8128    /// # Ok(()) }
8129    ///
8130    /// fn prepare_request_builder() -> TestIamPermissions {
8131    ///   # panic!();
8132    ///   // ... details omitted ...
8133    /// }
8134    /// ```
8135    #[derive(Clone, Debug)]
8136    pub struct TestIamPermissions(
8137        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
8138    );
8139
8140    impl TestIamPermissions {
8141        pub(crate) fn new(
8142            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8143        ) -> Self {
8144            Self(RequestBuilder::new(stub))
8145        }
8146
8147        /// Sets the full request, replacing any prior values.
8148        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
8149            mut self,
8150            v: V,
8151        ) -> Self {
8152            self.0.request = v.into();
8153            self
8154        }
8155
8156        /// Sets all the options, replacing any prior values.
8157        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8158            self.0.options = v.into();
8159            self
8160        }
8161
8162        /// Sends the request.
8163        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
8164            (*self.0.stub)
8165                .test_iam_permissions(self.0.request, self.0.options)
8166                .await
8167                .map(crate::Response::into_body)
8168        }
8169
8170        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
8171        ///
8172        /// This is a **required** field for requests.
8173        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8174            self.0.request.resource = v.into();
8175            self
8176        }
8177
8178        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
8179        ///
8180        /// This is a **required** field for requests.
8181        pub fn set_permissions<T, V>(mut self, v: T) -> Self
8182        where
8183            T: std::iter::IntoIterator<Item = V>,
8184            V: std::convert::Into<std::string::String>,
8185        {
8186            use std::iter::Iterator;
8187            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
8188            self
8189        }
8190    }
8191
8192    #[doc(hidden)]
8193    impl crate::RequestBuilder for TestIamPermissions {
8194        fn request_options(&mut self) -> &mut crate::RequestOptions {
8195            &mut self.0.options
8196        }
8197    }
8198
8199    /// The request builder for [CmekService::list_operations][crate::client::CmekService::list_operations] calls.
8200    ///
8201    /// # Example
8202    /// ```
8203    /// # use google_cloud_dataplex_v1::builder::cmek_service::ListOperations;
8204    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8205    /// use google_cloud_gax::paginator::ItemPaginator;
8206    ///
8207    /// let builder = prepare_request_builder();
8208    /// let mut items = builder.by_item();
8209    /// while let Some(result) = items.next().await {
8210    ///   let item = result?;
8211    /// }
8212    /// # Ok(()) }
8213    ///
8214    /// fn prepare_request_builder() -> ListOperations {
8215    ///   # panic!();
8216    ///   // ... details omitted ...
8217    /// }
8218    /// ```
8219    #[derive(Clone, Debug)]
8220    pub struct ListOperations(
8221        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
8222    );
8223
8224    impl ListOperations {
8225        pub(crate) fn new(
8226            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8227        ) -> Self {
8228            Self(RequestBuilder::new(stub))
8229        }
8230
8231        /// Sets the full request, replacing any prior values.
8232        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
8233            mut self,
8234            v: V,
8235        ) -> Self {
8236            self.0.request = v.into();
8237            self
8238        }
8239
8240        /// Sets all the options, replacing any prior values.
8241        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8242            self.0.options = v.into();
8243            self
8244        }
8245
8246        /// Sends the request.
8247        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
8248            (*self.0.stub)
8249                .list_operations(self.0.request, self.0.options)
8250                .await
8251                .map(crate::Response::into_body)
8252        }
8253
8254        /// Streams each page in the collection.
8255        pub fn by_page(
8256            self,
8257        ) -> impl google_cloud_gax::paginator::Paginator<
8258            google_cloud_longrunning::model::ListOperationsResponse,
8259            crate::Error,
8260        > {
8261            use std::clone::Clone;
8262            let token = self.0.request.page_token.clone();
8263            let execute = move |token: String| {
8264                let mut builder = self.clone();
8265                builder.0.request = builder.0.request.set_page_token(token);
8266                builder.send()
8267            };
8268            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8269        }
8270
8271        /// Streams each item in the collection.
8272        pub fn by_item(
8273            self,
8274        ) -> impl google_cloud_gax::paginator::ItemPaginator<
8275            google_cloud_longrunning::model::ListOperationsResponse,
8276            crate::Error,
8277        > {
8278            use google_cloud_gax::paginator::Paginator;
8279            self.by_page().items()
8280        }
8281
8282        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
8283        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8284            self.0.request.name = v.into();
8285            self
8286        }
8287
8288        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
8289        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8290            self.0.request.filter = v.into();
8291            self
8292        }
8293
8294        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
8295        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8296            self.0.request.page_size = v.into();
8297            self
8298        }
8299
8300        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
8301        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8302            self.0.request.page_token = v.into();
8303            self
8304        }
8305
8306        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
8307        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
8308            self.0.request.return_partial_success = v.into();
8309            self
8310        }
8311    }
8312
8313    #[doc(hidden)]
8314    impl crate::RequestBuilder for ListOperations {
8315        fn request_options(&mut self) -> &mut crate::RequestOptions {
8316            &mut self.0.options
8317        }
8318    }
8319
8320    /// The request builder for [CmekService::get_operation][crate::client::CmekService::get_operation] calls.
8321    ///
8322    /// # Example
8323    /// ```
8324    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetOperation;
8325    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8326    ///
8327    /// let builder = prepare_request_builder();
8328    /// let response = builder.send().await?;
8329    /// # Ok(()) }
8330    ///
8331    /// fn prepare_request_builder() -> GetOperation {
8332    ///   # panic!();
8333    ///   // ... details omitted ...
8334    /// }
8335    /// ```
8336    #[derive(Clone, Debug)]
8337    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
8338
8339    impl GetOperation {
8340        pub(crate) fn new(
8341            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8342        ) -> Self {
8343            Self(RequestBuilder::new(stub))
8344        }
8345
8346        /// Sets the full request, replacing any prior values.
8347        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
8348            mut self,
8349            v: V,
8350        ) -> Self {
8351            self.0.request = v.into();
8352            self
8353        }
8354
8355        /// Sets all the options, replacing any prior values.
8356        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8357            self.0.options = v.into();
8358            self
8359        }
8360
8361        /// Sends the request.
8362        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8363            (*self.0.stub)
8364                .get_operation(self.0.request, self.0.options)
8365                .await
8366                .map(crate::Response::into_body)
8367        }
8368
8369        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
8370        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8371            self.0.request.name = v.into();
8372            self
8373        }
8374    }
8375
8376    #[doc(hidden)]
8377    impl crate::RequestBuilder for GetOperation {
8378        fn request_options(&mut self) -> &mut crate::RequestOptions {
8379            &mut self.0.options
8380        }
8381    }
8382
8383    /// The request builder for [CmekService::delete_operation][crate::client::CmekService::delete_operation] calls.
8384    ///
8385    /// # Example
8386    /// ```
8387    /// # use google_cloud_dataplex_v1::builder::cmek_service::DeleteOperation;
8388    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8389    ///
8390    /// let builder = prepare_request_builder();
8391    /// let response = builder.send().await?;
8392    /// # Ok(()) }
8393    ///
8394    /// fn prepare_request_builder() -> DeleteOperation {
8395    ///   # panic!();
8396    ///   // ... details omitted ...
8397    /// }
8398    /// ```
8399    #[derive(Clone, Debug)]
8400    pub struct DeleteOperation(
8401        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
8402    );
8403
8404    impl DeleteOperation {
8405        pub(crate) fn new(
8406            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8407        ) -> Self {
8408            Self(RequestBuilder::new(stub))
8409        }
8410
8411        /// Sets the full request, replacing any prior values.
8412        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
8413            mut self,
8414            v: V,
8415        ) -> Self {
8416            self.0.request = v.into();
8417            self
8418        }
8419
8420        /// Sets all the options, replacing any prior values.
8421        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8422            self.0.options = v.into();
8423            self
8424        }
8425
8426        /// Sends the request.
8427        pub async fn send(self) -> Result<()> {
8428            (*self.0.stub)
8429                .delete_operation(self.0.request, self.0.options)
8430                .await
8431                .map(crate::Response::into_body)
8432        }
8433
8434        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
8435        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8436            self.0.request.name = v.into();
8437            self
8438        }
8439    }
8440
8441    #[doc(hidden)]
8442    impl crate::RequestBuilder for DeleteOperation {
8443        fn request_options(&mut self) -> &mut crate::RequestOptions {
8444            &mut self.0.options
8445        }
8446    }
8447
8448    /// The request builder for [CmekService::cancel_operation][crate::client::CmekService::cancel_operation] calls.
8449    ///
8450    /// # Example
8451    /// ```
8452    /// # use google_cloud_dataplex_v1::builder::cmek_service::CancelOperation;
8453    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8454    ///
8455    /// let builder = prepare_request_builder();
8456    /// let response = builder.send().await?;
8457    /// # Ok(()) }
8458    ///
8459    /// fn prepare_request_builder() -> CancelOperation {
8460    ///   # panic!();
8461    ///   // ... details omitted ...
8462    /// }
8463    /// ```
8464    #[derive(Clone, Debug)]
8465    pub struct CancelOperation(
8466        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
8467    );
8468
8469    impl CancelOperation {
8470        pub(crate) fn new(
8471            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8472        ) -> Self {
8473            Self(RequestBuilder::new(stub))
8474        }
8475
8476        /// Sets the full request, replacing any prior values.
8477        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
8478            mut self,
8479            v: V,
8480        ) -> Self {
8481            self.0.request = v.into();
8482            self
8483        }
8484
8485        /// Sets all the options, replacing any prior values.
8486        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8487            self.0.options = v.into();
8488            self
8489        }
8490
8491        /// Sends the request.
8492        pub async fn send(self) -> Result<()> {
8493            (*self.0.stub)
8494                .cancel_operation(self.0.request, self.0.options)
8495                .await
8496                .map(crate::Response::into_body)
8497        }
8498
8499        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
8500        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8501            self.0.request.name = v.into();
8502            self
8503        }
8504    }
8505
8506    #[doc(hidden)]
8507    impl crate::RequestBuilder for CancelOperation {
8508        fn request_options(&mut self) -> &mut crate::RequestOptions {
8509            &mut self.0.options
8510        }
8511    }
8512}
8513
8514/// Request and client builders for [ContentService][crate::client::ContentService].
8515pub mod content_service {
8516    use crate::Result;
8517
8518    /// A builder for [ContentService][crate::client::ContentService].
8519    ///
8520    /// ```
8521    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
8522    /// # use google_cloud_dataplex_v1::*;
8523    /// # use builder::content_service::ClientBuilder;
8524    /// # use client::ContentService;
8525    /// let builder : ClientBuilder = ContentService::builder();
8526    /// let client = builder
8527    ///     .with_endpoint("https://dataplex.googleapis.com")
8528    ///     .build().await?;
8529    /// # Ok(()) }
8530    /// ```
8531    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
8532
8533    pub(crate) mod client {
8534        use super::super::super::client::ContentService;
8535        pub struct Factory;
8536        impl crate::ClientFactory for Factory {
8537            type Client = ContentService;
8538            type Credentials = gaxi::options::Credentials;
8539            async fn build(
8540                self,
8541                config: gaxi::options::ClientConfig,
8542            ) -> crate::ClientBuilderResult<Self::Client> {
8543                Self::Client::new(config).await
8544            }
8545        }
8546    }
8547
8548    /// Common implementation for [crate::client::ContentService] request builders.
8549    #[derive(Clone, Debug)]
8550    pub(crate) struct RequestBuilder<R: std::default::Default> {
8551        stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8552        request: R,
8553        options: crate::RequestOptions,
8554    }
8555
8556    impl<R> RequestBuilder<R>
8557    where
8558        R: std::default::Default,
8559    {
8560        pub(crate) fn new(
8561            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8562        ) -> Self {
8563            Self {
8564                stub,
8565                request: R::default(),
8566                options: crate::RequestOptions::default(),
8567            }
8568        }
8569    }
8570
8571    /// The request builder for [ContentService::list_locations][crate::client::ContentService::list_locations] calls.
8572    ///
8573    /// # Example
8574    /// ```
8575    /// # use google_cloud_dataplex_v1::builder::content_service::ListLocations;
8576    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8577    /// use google_cloud_gax::paginator::ItemPaginator;
8578    ///
8579    /// let builder = prepare_request_builder();
8580    /// let mut items = builder.by_item();
8581    /// while let Some(result) = items.next().await {
8582    ///   let item = result?;
8583    /// }
8584    /// # Ok(()) }
8585    ///
8586    /// fn prepare_request_builder() -> ListLocations {
8587    ///   # panic!();
8588    ///   // ... details omitted ...
8589    /// }
8590    /// ```
8591    #[derive(Clone, Debug)]
8592    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
8593
8594    impl ListLocations {
8595        pub(crate) fn new(
8596            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8597        ) -> Self {
8598            Self(RequestBuilder::new(stub))
8599        }
8600
8601        /// Sets the full request, replacing any prior values.
8602        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
8603            mut self,
8604            v: V,
8605        ) -> Self {
8606            self.0.request = v.into();
8607            self
8608        }
8609
8610        /// Sets all the options, replacing any prior values.
8611        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8612            self.0.options = v.into();
8613            self
8614        }
8615
8616        /// Sends the request.
8617        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
8618            (*self.0.stub)
8619                .list_locations(self.0.request, self.0.options)
8620                .await
8621                .map(crate::Response::into_body)
8622        }
8623
8624        /// Streams each page in the collection.
8625        pub fn by_page(
8626            self,
8627        ) -> impl google_cloud_gax::paginator::Paginator<
8628            google_cloud_location::model::ListLocationsResponse,
8629            crate::Error,
8630        > {
8631            use std::clone::Clone;
8632            let token = self.0.request.page_token.clone();
8633            let execute = move |token: String| {
8634                let mut builder = self.clone();
8635                builder.0.request = builder.0.request.set_page_token(token);
8636                builder.send()
8637            };
8638            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8639        }
8640
8641        /// Streams each item in the collection.
8642        pub fn by_item(
8643            self,
8644        ) -> impl google_cloud_gax::paginator::ItemPaginator<
8645            google_cloud_location::model::ListLocationsResponse,
8646            crate::Error,
8647        > {
8648            use google_cloud_gax::paginator::Paginator;
8649            self.by_page().items()
8650        }
8651
8652        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
8653        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8654            self.0.request.name = v.into();
8655            self
8656        }
8657
8658        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
8659        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8660            self.0.request.filter = v.into();
8661            self
8662        }
8663
8664        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
8665        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8666            self.0.request.page_size = v.into();
8667            self
8668        }
8669
8670        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
8671        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8672            self.0.request.page_token = v.into();
8673            self
8674        }
8675    }
8676
8677    #[doc(hidden)]
8678    impl crate::RequestBuilder for ListLocations {
8679        fn request_options(&mut self) -> &mut crate::RequestOptions {
8680            &mut self.0.options
8681        }
8682    }
8683
8684    /// The request builder for [ContentService::get_location][crate::client::ContentService::get_location] calls.
8685    ///
8686    /// # Example
8687    /// ```
8688    /// # use google_cloud_dataplex_v1::builder::content_service::GetLocation;
8689    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8690    ///
8691    /// let builder = prepare_request_builder();
8692    /// let response = builder.send().await?;
8693    /// # Ok(()) }
8694    ///
8695    /// fn prepare_request_builder() -> GetLocation {
8696    ///   # panic!();
8697    ///   // ... details omitted ...
8698    /// }
8699    /// ```
8700    #[derive(Clone, Debug)]
8701    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
8702
8703    impl GetLocation {
8704        pub(crate) fn new(
8705            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8706        ) -> Self {
8707            Self(RequestBuilder::new(stub))
8708        }
8709
8710        /// Sets the full request, replacing any prior values.
8711        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
8712            mut self,
8713            v: V,
8714        ) -> Self {
8715            self.0.request = v.into();
8716            self
8717        }
8718
8719        /// Sets all the options, replacing any prior values.
8720        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8721            self.0.options = v.into();
8722            self
8723        }
8724
8725        /// Sends the request.
8726        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
8727            (*self.0.stub)
8728                .get_location(self.0.request, self.0.options)
8729                .await
8730                .map(crate::Response::into_body)
8731        }
8732
8733        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
8734        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8735            self.0.request.name = v.into();
8736            self
8737        }
8738    }
8739
8740    #[doc(hidden)]
8741    impl crate::RequestBuilder for GetLocation {
8742        fn request_options(&mut self) -> &mut crate::RequestOptions {
8743            &mut self.0.options
8744        }
8745    }
8746
8747    /// The request builder for [ContentService::set_iam_policy][crate::client::ContentService::set_iam_policy] calls.
8748    ///
8749    /// # Example
8750    /// ```
8751    /// # use google_cloud_dataplex_v1::builder::content_service::SetIamPolicy;
8752    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8753    ///
8754    /// let builder = prepare_request_builder();
8755    /// let response = builder.send().await?;
8756    /// # Ok(()) }
8757    ///
8758    /// fn prepare_request_builder() -> SetIamPolicy {
8759    ///   # panic!();
8760    ///   // ... details omitted ...
8761    /// }
8762    /// ```
8763    #[derive(Clone, Debug)]
8764    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
8765
8766    impl SetIamPolicy {
8767        pub(crate) fn new(
8768            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8769        ) -> Self {
8770            Self(RequestBuilder::new(stub))
8771        }
8772
8773        /// Sets the full request, replacing any prior values.
8774        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
8775            mut self,
8776            v: V,
8777        ) -> Self {
8778            self.0.request = v.into();
8779            self
8780        }
8781
8782        /// Sets all the options, replacing any prior values.
8783        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8784            self.0.options = v.into();
8785            self
8786        }
8787
8788        /// Sends the request.
8789        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8790            (*self.0.stub)
8791                .set_iam_policy(self.0.request, self.0.options)
8792                .await
8793                .map(crate::Response::into_body)
8794        }
8795
8796        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
8797        ///
8798        /// This is a **required** field for requests.
8799        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8800            self.0.request.resource = v.into();
8801            self
8802        }
8803
8804        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
8805        ///
8806        /// This is a **required** field for requests.
8807        pub fn set_policy<T>(mut self, v: T) -> Self
8808        where
8809            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8810        {
8811            self.0.request.policy = std::option::Option::Some(v.into());
8812            self
8813        }
8814
8815        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
8816        ///
8817        /// This is a **required** field for requests.
8818        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
8819        where
8820            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8821        {
8822            self.0.request.policy = v.map(|x| x.into());
8823            self
8824        }
8825
8826        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
8827        pub fn set_update_mask<T>(mut self, v: T) -> Self
8828        where
8829            T: std::convert::Into<wkt::FieldMask>,
8830        {
8831            self.0.request.update_mask = std::option::Option::Some(v.into());
8832            self
8833        }
8834
8835        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
8836        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8837        where
8838            T: std::convert::Into<wkt::FieldMask>,
8839        {
8840            self.0.request.update_mask = v.map(|x| x.into());
8841            self
8842        }
8843    }
8844
8845    #[doc(hidden)]
8846    impl crate::RequestBuilder for SetIamPolicy {
8847        fn request_options(&mut self) -> &mut crate::RequestOptions {
8848            &mut self.0.options
8849        }
8850    }
8851
8852    /// The request builder for [ContentService::get_iam_policy][crate::client::ContentService::get_iam_policy] calls.
8853    ///
8854    /// # Example
8855    /// ```
8856    /// # use google_cloud_dataplex_v1::builder::content_service::GetIamPolicy;
8857    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8858    ///
8859    /// let builder = prepare_request_builder();
8860    /// let response = builder.send().await?;
8861    /// # Ok(()) }
8862    ///
8863    /// fn prepare_request_builder() -> GetIamPolicy {
8864    ///   # panic!();
8865    ///   // ... details omitted ...
8866    /// }
8867    /// ```
8868    #[derive(Clone, Debug)]
8869    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
8870
8871    impl GetIamPolicy {
8872        pub(crate) fn new(
8873            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8874        ) -> Self {
8875            Self(RequestBuilder::new(stub))
8876        }
8877
8878        /// Sets the full request, replacing any prior values.
8879        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
8880            mut self,
8881            v: V,
8882        ) -> Self {
8883            self.0.request = v.into();
8884            self
8885        }
8886
8887        /// Sets all the options, replacing any prior values.
8888        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8889            self.0.options = v.into();
8890            self
8891        }
8892
8893        /// Sends the request.
8894        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8895            (*self.0.stub)
8896                .get_iam_policy(self.0.request, self.0.options)
8897                .await
8898                .map(crate::Response::into_body)
8899        }
8900
8901        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
8902        ///
8903        /// This is a **required** field for requests.
8904        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8905            self.0.request.resource = v.into();
8906            self
8907        }
8908
8909        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
8910        pub fn set_options<T>(mut self, v: T) -> Self
8911        where
8912            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
8913        {
8914            self.0.request.options = std::option::Option::Some(v.into());
8915            self
8916        }
8917
8918        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
8919        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
8920        where
8921            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
8922        {
8923            self.0.request.options = v.map(|x| x.into());
8924            self
8925        }
8926    }
8927
8928    #[doc(hidden)]
8929    impl crate::RequestBuilder for GetIamPolicy {
8930        fn request_options(&mut self) -> &mut crate::RequestOptions {
8931            &mut self.0.options
8932        }
8933    }
8934
8935    /// The request builder for [ContentService::test_iam_permissions][crate::client::ContentService::test_iam_permissions] calls.
8936    ///
8937    /// # Example
8938    /// ```
8939    /// # use google_cloud_dataplex_v1::builder::content_service::TestIamPermissions;
8940    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8941    ///
8942    /// let builder = prepare_request_builder();
8943    /// let response = builder.send().await?;
8944    /// # Ok(()) }
8945    ///
8946    /// fn prepare_request_builder() -> TestIamPermissions {
8947    ///   # panic!();
8948    ///   // ... details omitted ...
8949    /// }
8950    /// ```
8951    #[derive(Clone, Debug)]
8952    pub struct TestIamPermissions(
8953        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
8954    );
8955
8956    impl TestIamPermissions {
8957        pub(crate) fn new(
8958            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8959        ) -> Self {
8960            Self(RequestBuilder::new(stub))
8961        }
8962
8963        /// Sets the full request, replacing any prior values.
8964        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
8965            mut self,
8966            v: V,
8967        ) -> Self {
8968            self.0.request = v.into();
8969            self
8970        }
8971
8972        /// Sets all the options, replacing any prior values.
8973        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8974            self.0.options = v.into();
8975            self
8976        }
8977
8978        /// Sends the request.
8979        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
8980            (*self.0.stub)
8981                .test_iam_permissions(self.0.request, self.0.options)
8982                .await
8983                .map(crate::Response::into_body)
8984        }
8985
8986        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
8987        ///
8988        /// This is a **required** field for requests.
8989        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8990            self.0.request.resource = v.into();
8991            self
8992        }
8993
8994        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
8995        ///
8996        /// This is a **required** field for requests.
8997        pub fn set_permissions<T, V>(mut self, v: T) -> Self
8998        where
8999            T: std::iter::IntoIterator<Item = V>,
9000            V: std::convert::Into<std::string::String>,
9001        {
9002            use std::iter::Iterator;
9003            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
9004            self
9005        }
9006    }
9007
9008    #[doc(hidden)]
9009    impl crate::RequestBuilder for TestIamPermissions {
9010        fn request_options(&mut self) -> &mut crate::RequestOptions {
9011            &mut self.0.options
9012        }
9013    }
9014
9015    /// The request builder for [ContentService::list_operations][crate::client::ContentService::list_operations] calls.
9016    ///
9017    /// # Example
9018    /// ```
9019    /// # use google_cloud_dataplex_v1::builder::content_service::ListOperations;
9020    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9021    /// use google_cloud_gax::paginator::ItemPaginator;
9022    ///
9023    /// let builder = prepare_request_builder();
9024    /// let mut items = builder.by_item();
9025    /// while let Some(result) = items.next().await {
9026    ///   let item = result?;
9027    /// }
9028    /// # Ok(()) }
9029    ///
9030    /// fn prepare_request_builder() -> ListOperations {
9031    ///   # panic!();
9032    ///   // ... details omitted ...
9033    /// }
9034    /// ```
9035    #[derive(Clone, Debug)]
9036    pub struct ListOperations(
9037        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
9038    );
9039
9040    impl ListOperations {
9041        pub(crate) fn new(
9042            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9043        ) -> Self {
9044            Self(RequestBuilder::new(stub))
9045        }
9046
9047        /// Sets the full request, replacing any prior values.
9048        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
9049            mut self,
9050            v: V,
9051        ) -> Self {
9052            self.0.request = v.into();
9053            self
9054        }
9055
9056        /// Sets all the options, replacing any prior values.
9057        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9058            self.0.options = v.into();
9059            self
9060        }
9061
9062        /// Sends the request.
9063        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
9064            (*self.0.stub)
9065                .list_operations(self.0.request, self.0.options)
9066                .await
9067                .map(crate::Response::into_body)
9068        }
9069
9070        /// Streams each page in the collection.
9071        pub fn by_page(
9072            self,
9073        ) -> impl google_cloud_gax::paginator::Paginator<
9074            google_cloud_longrunning::model::ListOperationsResponse,
9075            crate::Error,
9076        > {
9077            use std::clone::Clone;
9078            let token = self.0.request.page_token.clone();
9079            let execute = move |token: String| {
9080                let mut builder = self.clone();
9081                builder.0.request = builder.0.request.set_page_token(token);
9082                builder.send()
9083            };
9084            google_cloud_gax::paginator::internal::new_paginator(token, execute)
9085        }
9086
9087        /// Streams each item in the collection.
9088        pub fn by_item(
9089            self,
9090        ) -> impl google_cloud_gax::paginator::ItemPaginator<
9091            google_cloud_longrunning::model::ListOperationsResponse,
9092            crate::Error,
9093        > {
9094            use google_cloud_gax::paginator::Paginator;
9095            self.by_page().items()
9096        }
9097
9098        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
9099        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9100            self.0.request.name = v.into();
9101            self
9102        }
9103
9104        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
9105        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9106            self.0.request.filter = v.into();
9107            self
9108        }
9109
9110        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
9111        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9112            self.0.request.page_size = v.into();
9113            self
9114        }
9115
9116        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
9117        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9118            self.0.request.page_token = v.into();
9119            self
9120        }
9121
9122        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
9123        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
9124            self.0.request.return_partial_success = v.into();
9125            self
9126        }
9127    }
9128
9129    #[doc(hidden)]
9130    impl crate::RequestBuilder for ListOperations {
9131        fn request_options(&mut self) -> &mut crate::RequestOptions {
9132            &mut self.0.options
9133        }
9134    }
9135
9136    /// The request builder for [ContentService::get_operation][crate::client::ContentService::get_operation] calls.
9137    ///
9138    /// # Example
9139    /// ```
9140    /// # use google_cloud_dataplex_v1::builder::content_service::GetOperation;
9141    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9142    ///
9143    /// let builder = prepare_request_builder();
9144    /// let response = builder.send().await?;
9145    /// # Ok(()) }
9146    ///
9147    /// fn prepare_request_builder() -> GetOperation {
9148    ///   # panic!();
9149    ///   // ... details omitted ...
9150    /// }
9151    /// ```
9152    #[derive(Clone, Debug)]
9153    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
9154
9155    impl GetOperation {
9156        pub(crate) fn new(
9157            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9158        ) -> Self {
9159            Self(RequestBuilder::new(stub))
9160        }
9161
9162        /// Sets the full request, replacing any prior values.
9163        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
9164            mut self,
9165            v: V,
9166        ) -> Self {
9167            self.0.request = v.into();
9168            self
9169        }
9170
9171        /// Sets all the options, replacing any prior values.
9172        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9173            self.0.options = v.into();
9174            self
9175        }
9176
9177        /// Sends the request.
9178        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9179            (*self.0.stub)
9180                .get_operation(self.0.request, self.0.options)
9181                .await
9182                .map(crate::Response::into_body)
9183        }
9184
9185        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
9186        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9187            self.0.request.name = v.into();
9188            self
9189        }
9190    }
9191
9192    #[doc(hidden)]
9193    impl crate::RequestBuilder for GetOperation {
9194        fn request_options(&mut self) -> &mut crate::RequestOptions {
9195            &mut self.0.options
9196        }
9197    }
9198
9199    /// The request builder for [ContentService::delete_operation][crate::client::ContentService::delete_operation] calls.
9200    ///
9201    /// # Example
9202    /// ```
9203    /// # use google_cloud_dataplex_v1::builder::content_service::DeleteOperation;
9204    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9205    ///
9206    /// let builder = prepare_request_builder();
9207    /// let response = builder.send().await?;
9208    /// # Ok(()) }
9209    ///
9210    /// fn prepare_request_builder() -> DeleteOperation {
9211    ///   # panic!();
9212    ///   // ... details omitted ...
9213    /// }
9214    /// ```
9215    #[derive(Clone, Debug)]
9216    pub struct DeleteOperation(
9217        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
9218    );
9219
9220    impl DeleteOperation {
9221        pub(crate) fn new(
9222            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9223        ) -> Self {
9224            Self(RequestBuilder::new(stub))
9225        }
9226
9227        /// Sets the full request, replacing any prior values.
9228        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
9229            mut self,
9230            v: V,
9231        ) -> Self {
9232            self.0.request = v.into();
9233            self
9234        }
9235
9236        /// Sets all the options, replacing any prior values.
9237        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9238            self.0.options = v.into();
9239            self
9240        }
9241
9242        /// Sends the request.
9243        pub async fn send(self) -> Result<()> {
9244            (*self.0.stub)
9245                .delete_operation(self.0.request, self.0.options)
9246                .await
9247                .map(crate::Response::into_body)
9248        }
9249
9250        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
9251        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9252            self.0.request.name = v.into();
9253            self
9254        }
9255    }
9256
9257    #[doc(hidden)]
9258    impl crate::RequestBuilder for DeleteOperation {
9259        fn request_options(&mut self) -> &mut crate::RequestOptions {
9260            &mut self.0.options
9261        }
9262    }
9263
9264    /// The request builder for [ContentService::cancel_operation][crate::client::ContentService::cancel_operation] calls.
9265    ///
9266    /// # Example
9267    /// ```
9268    /// # use google_cloud_dataplex_v1::builder::content_service::CancelOperation;
9269    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9270    ///
9271    /// let builder = prepare_request_builder();
9272    /// let response = builder.send().await?;
9273    /// # Ok(()) }
9274    ///
9275    /// fn prepare_request_builder() -> CancelOperation {
9276    ///   # panic!();
9277    ///   // ... details omitted ...
9278    /// }
9279    /// ```
9280    #[derive(Clone, Debug)]
9281    pub struct CancelOperation(
9282        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
9283    );
9284
9285    impl CancelOperation {
9286        pub(crate) fn new(
9287            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9288        ) -> Self {
9289            Self(RequestBuilder::new(stub))
9290        }
9291
9292        /// Sets the full request, replacing any prior values.
9293        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
9294            mut self,
9295            v: V,
9296        ) -> Self {
9297            self.0.request = v.into();
9298            self
9299        }
9300
9301        /// Sets all the options, replacing any prior values.
9302        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9303            self.0.options = v.into();
9304            self
9305        }
9306
9307        /// Sends the request.
9308        pub async fn send(self) -> Result<()> {
9309            (*self.0.stub)
9310                .cancel_operation(self.0.request, self.0.options)
9311                .await
9312                .map(crate::Response::into_body)
9313        }
9314
9315        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
9316        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9317            self.0.request.name = v.into();
9318            self
9319        }
9320    }
9321
9322    #[doc(hidden)]
9323    impl crate::RequestBuilder for CancelOperation {
9324        fn request_options(&mut self) -> &mut crate::RequestOptions {
9325            &mut self.0.options
9326        }
9327    }
9328}
9329
9330/// Request and client builders for [DataProductService][crate::client::DataProductService].
9331pub mod data_product_service {
9332    use crate::Result;
9333
9334    /// A builder for [DataProductService][crate::client::DataProductService].
9335    ///
9336    /// ```
9337    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
9338    /// # use google_cloud_dataplex_v1::*;
9339    /// # use builder::data_product_service::ClientBuilder;
9340    /// # use client::DataProductService;
9341    /// let builder : ClientBuilder = DataProductService::builder();
9342    /// let client = builder
9343    ///     .with_endpoint("https://dataplex.googleapis.com")
9344    ///     .build().await?;
9345    /// # Ok(()) }
9346    /// ```
9347    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
9348
9349    pub(crate) mod client {
9350        use super::super::super::client::DataProductService;
9351        pub struct Factory;
9352        impl crate::ClientFactory for Factory {
9353            type Client = DataProductService;
9354            type Credentials = gaxi::options::Credentials;
9355            async fn build(
9356                self,
9357                config: gaxi::options::ClientConfig,
9358            ) -> crate::ClientBuilderResult<Self::Client> {
9359                Self::Client::new(config).await
9360            }
9361        }
9362    }
9363
9364    /// Common implementation for [crate::client::DataProductService] request builders.
9365    #[derive(Clone, Debug)]
9366    pub(crate) struct RequestBuilder<R: std::default::Default> {
9367        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9368        request: R,
9369        options: crate::RequestOptions,
9370    }
9371
9372    impl<R> RequestBuilder<R>
9373    where
9374        R: std::default::Default,
9375    {
9376        pub(crate) fn new(
9377            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9378        ) -> Self {
9379            Self {
9380                stub,
9381                request: R::default(),
9382                options: crate::RequestOptions::default(),
9383            }
9384        }
9385    }
9386
9387    /// The request builder for [DataProductService::create_data_product][crate::client::DataProductService::create_data_product] calls.
9388    ///
9389    /// # Example
9390    /// ```
9391    /// # use google_cloud_dataplex_v1::builder::data_product_service::CreateDataProduct;
9392    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9393    /// use google_cloud_lro::Poller;
9394    ///
9395    /// let builder = prepare_request_builder();
9396    /// let response = builder.poller().until_done().await?;
9397    /// # Ok(()) }
9398    ///
9399    /// fn prepare_request_builder() -> CreateDataProduct {
9400    ///   # panic!();
9401    ///   // ... details omitted ...
9402    /// }
9403    /// ```
9404    #[derive(Clone, Debug)]
9405    pub struct CreateDataProduct(RequestBuilder<crate::model::CreateDataProductRequest>);
9406
9407    impl CreateDataProduct {
9408        pub(crate) fn new(
9409            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9410        ) -> Self {
9411            Self(RequestBuilder::new(stub))
9412        }
9413
9414        /// Sets the full request, replacing any prior values.
9415        pub fn with_request<V: Into<crate::model::CreateDataProductRequest>>(
9416            mut self,
9417            v: V,
9418        ) -> Self {
9419            self.0.request = v.into();
9420            self
9421        }
9422
9423        /// Sets all the options, replacing any prior values.
9424        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9425            self.0.options = v.into();
9426            self
9427        }
9428
9429        /// Sends the request.
9430        ///
9431        /// # Long running operations
9432        ///
9433        /// This starts, but does not poll, a longrunning operation. More information
9434        /// on [create_data_product][crate::client::DataProductService::create_data_product].
9435        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9436            (*self.0.stub)
9437                .create_data_product(self.0.request, self.0.options)
9438                .await
9439                .map(crate::Response::into_body)
9440        }
9441
9442        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_product`.
9443        pub fn poller(
9444            self,
9445        ) -> impl google_cloud_lro::Poller<crate::model::DataProduct, crate::model::OperationMetadata>
9446        {
9447            type Operation = google_cloud_lro::internal::Operation<
9448                crate::model::DataProduct,
9449                crate::model::OperationMetadata,
9450            >;
9451            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9452            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9453
9454            let stub = self.0.stub.clone();
9455            let mut options = self.0.options.clone();
9456            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
9457            let query = move |name| {
9458                let stub = stub.clone();
9459                let options = options.clone();
9460                async {
9461                    let op = GetOperation::new(stub)
9462                        .set_name(name)
9463                        .with_options(options)
9464                        .send()
9465                        .await?;
9466                    Ok(Operation::new(op))
9467                }
9468            };
9469
9470            let start = move || async {
9471                let op = self.send().await?;
9472                Ok(Operation::new(op))
9473            };
9474
9475            google_cloud_lro::internal::new_poller(
9476                polling_error_policy,
9477                polling_backoff_policy,
9478                start,
9479                query,
9480            )
9481        }
9482
9483        /// Sets the value of [parent][crate::model::CreateDataProductRequest::parent].
9484        ///
9485        /// This is a **required** field for requests.
9486        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9487            self.0.request.parent = v.into();
9488            self
9489        }
9490
9491        /// Sets the value of [data_product_id][crate::model::CreateDataProductRequest::data_product_id].
9492        pub fn set_data_product_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
9493            self.0.request.data_product_id = v.into();
9494            self
9495        }
9496
9497        /// Sets the value of [data_product][crate::model::CreateDataProductRequest::data_product].
9498        ///
9499        /// This is a **required** field for requests.
9500        pub fn set_data_product<T>(mut self, v: T) -> Self
9501        where
9502            T: std::convert::Into<crate::model::DataProduct>,
9503        {
9504            self.0.request.data_product = std::option::Option::Some(v.into());
9505            self
9506        }
9507
9508        /// Sets or clears the value of [data_product][crate::model::CreateDataProductRequest::data_product].
9509        ///
9510        /// This is a **required** field for requests.
9511        pub fn set_or_clear_data_product<T>(mut self, v: std::option::Option<T>) -> Self
9512        where
9513            T: std::convert::Into<crate::model::DataProduct>,
9514        {
9515            self.0.request.data_product = v.map(|x| x.into());
9516            self
9517        }
9518
9519        /// Sets the value of [validate_only][crate::model::CreateDataProductRequest::validate_only].
9520        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9521            self.0.request.validate_only = v.into();
9522            self
9523        }
9524    }
9525
9526    #[doc(hidden)]
9527    impl crate::RequestBuilder for CreateDataProduct {
9528        fn request_options(&mut self) -> &mut crate::RequestOptions {
9529            &mut self.0.options
9530        }
9531    }
9532
9533    /// The request builder for [DataProductService::delete_data_product][crate::client::DataProductService::delete_data_product] calls.
9534    ///
9535    /// # Example
9536    /// ```
9537    /// # use google_cloud_dataplex_v1::builder::data_product_service::DeleteDataProduct;
9538    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9539    /// use google_cloud_lro::Poller;
9540    ///
9541    /// let builder = prepare_request_builder();
9542    /// let response = builder.poller().until_done().await?;
9543    /// # Ok(()) }
9544    ///
9545    /// fn prepare_request_builder() -> DeleteDataProduct {
9546    ///   # panic!();
9547    ///   // ... details omitted ...
9548    /// }
9549    /// ```
9550    #[derive(Clone, Debug)]
9551    pub struct DeleteDataProduct(RequestBuilder<crate::model::DeleteDataProductRequest>);
9552
9553    impl DeleteDataProduct {
9554        pub(crate) fn new(
9555            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9556        ) -> Self {
9557            Self(RequestBuilder::new(stub))
9558        }
9559
9560        /// Sets the full request, replacing any prior values.
9561        pub fn with_request<V: Into<crate::model::DeleteDataProductRequest>>(
9562            mut self,
9563            v: V,
9564        ) -> Self {
9565            self.0.request = v.into();
9566            self
9567        }
9568
9569        /// Sets all the options, replacing any prior values.
9570        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9571            self.0.options = v.into();
9572            self
9573        }
9574
9575        /// Sends the request.
9576        ///
9577        /// # Long running operations
9578        ///
9579        /// This starts, but does not poll, a longrunning operation. More information
9580        /// on [delete_data_product][crate::client::DataProductService::delete_data_product].
9581        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9582            (*self.0.stub)
9583                .delete_data_product(self.0.request, self.0.options)
9584                .await
9585                .map(crate::Response::into_body)
9586        }
9587
9588        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_product`.
9589        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
9590            type Operation =
9591                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
9592            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9593            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9594
9595            let stub = self.0.stub.clone();
9596            let mut options = self.0.options.clone();
9597            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
9598            let query = move |name| {
9599                let stub = stub.clone();
9600                let options = options.clone();
9601                async {
9602                    let op = GetOperation::new(stub)
9603                        .set_name(name)
9604                        .with_options(options)
9605                        .send()
9606                        .await?;
9607                    Ok(Operation::new(op))
9608                }
9609            };
9610
9611            let start = move || async {
9612                let op = self.send().await?;
9613                Ok(Operation::new(op))
9614            };
9615
9616            google_cloud_lro::internal::new_unit_response_poller(
9617                polling_error_policy,
9618                polling_backoff_policy,
9619                start,
9620                query,
9621            )
9622        }
9623
9624        /// Sets the value of [name][crate::model::DeleteDataProductRequest::name].
9625        ///
9626        /// This is a **required** field for requests.
9627        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9628            self.0.request.name = v.into();
9629            self
9630        }
9631
9632        /// Sets the value of [etag][crate::model::DeleteDataProductRequest::etag].
9633        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
9634            self.0.request.etag = v.into();
9635            self
9636        }
9637
9638        /// Sets the value of [validate_only][crate::model::DeleteDataProductRequest::validate_only].
9639        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9640            self.0.request.validate_only = v.into();
9641            self
9642        }
9643    }
9644
9645    #[doc(hidden)]
9646    impl crate::RequestBuilder for DeleteDataProduct {
9647        fn request_options(&mut self) -> &mut crate::RequestOptions {
9648            &mut self.0.options
9649        }
9650    }
9651
9652    /// The request builder for [DataProductService::get_data_product][crate::client::DataProductService::get_data_product] calls.
9653    ///
9654    /// # Example
9655    /// ```
9656    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetDataProduct;
9657    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9658    ///
9659    /// let builder = prepare_request_builder();
9660    /// let response = builder.send().await?;
9661    /// # Ok(()) }
9662    ///
9663    /// fn prepare_request_builder() -> GetDataProduct {
9664    ///   # panic!();
9665    ///   // ... details omitted ...
9666    /// }
9667    /// ```
9668    #[derive(Clone, Debug)]
9669    pub struct GetDataProduct(RequestBuilder<crate::model::GetDataProductRequest>);
9670
9671    impl GetDataProduct {
9672        pub(crate) fn new(
9673            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9674        ) -> Self {
9675            Self(RequestBuilder::new(stub))
9676        }
9677
9678        /// Sets the full request, replacing any prior values.
9679        pub fn with_request<V: Into<crate::model::GetDataProductRequest>>(mut self, v: V) -> Self {
9680            self.0.request = v.into();
9681            self
9682        }
9683
9684        /// Sets all the options, replacing any prior values.
9685        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9686            self.0.options = v.into();
9687            self
9688        }
9689
9690        /// Sends the request.
9691        pub async fn send(self) -> Result<crate::model::DataProduct> {
9692            (*self.0.stub)
9693                .get_data_product(self.0.request, self.0.options)
9694                .await
9695                .map(crate::Response::into_body)
9696        }
9697
9698        /// Sets the value of [name][crate::model::GetDataProductRequest::name].
9699        ///
9700        /// This is a **required** field for requests.
9701        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9702            self.0.request.name = v.into();
9703            self
9704        }
9705    }
9706
9707    #[doc(hidden)]
9708    impl crate::RequestBuilder for GetDataProduct {
9709        fn request_options(&mut self) -> &mut crate::RequestOptions {
9710            &mut self.0.options
9711        }
9712    }
9713
9714    /// The request builder for [DataProductService::list_data_products][crate::client::DataProductService::list_data_products] calls.
9715    ///
9716    /// # Example
9717    /// ```
9718    /// # use google_cloud_dataplex_v1::builder::data_product_service::ListDataProducts;
9719    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9720    /// use google_cloud_gax::paginator::ItemPaginator;
9721    ///
9722    /// let builder = prepare_request_builder();
9723    /// let mut items = builder.by_item();
9724    /// while let Some(result) = items.next().await {
9725    ///   let item = result?;
9726    /// }
9727    /// # Ok(()) }
9728    ///
9729    /// fn prepare_request_builder() -> ListDataProducts {
9730    ///   # panic!();
9731    ///   // ... details omitted ...
9732    /// }
9733    /// ```
9734    #[derive(Clone, Debug)]
9735    pub struct ListDataProducts(RequestBuilder<crate::model::ListDataProductsRequest>);
9736
9737    impl ListDataProducts {
9738        pub(crate) fn new(
9739            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9740        ) -> Self {
9741            Self(RequestBuilder::new(stub))
9742        }
9743
9744        /// Sets the full request, replacing any prior values.
9745        pub fn with_request<V: Into<crate::model::ListDataProductsRequest>>(
9746            mut self,
9747            v: V,
9748        ) -> Self {
9749            self.0.request = v.into();
9750            self
9751        }
9752
9753        /// Sets all the options, replacing any prior values.
9754        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9755            self.0.options = v.into();
9756            self
9757        }
9758
9759        /// Sends the request.
9760        pub async fn send(self) -> Result<crate::model::ListDataProductsResponse> {
9761            (*self.0.stub)
9762                .list_data_products(self.0.request, self.0.options)
9763                .await
9764                .map(crate::Response::into_body)
9765        }
9766
9767        /// Streams each page in the collection.
9768        pub fn by_page(
9769            self,
9770        ) -> impl google_cloud_gax::paginator::Paginator<
9771            crate::model::ListDataProductsResponse,
9772            crate::Error,
9773        > {
9774            use std::clone::Clone;
9775            let token = self.0.request.page_token.clone();
9776            let execute = move |token: String| {
9777                let mut builder = self.clone();
9778                builder.0.request = builder.0.request.set_page_token(token);
9779                builder.send()
9780            };
9781            google_cloud_gax::paginator::internal::new_paginator(token, execute)
9782        }
9783
9784        /// Streams each item in the collection.
9785        pub fn by_item(
9786            self,
9787        ) -> impl google_cloud_gax::paginator::ItemPaginator<
9788            crate::model::ListDataProductsResponse,
9789            crate::Error,
9790        > {
9791            use google_cloud_gax::paginator::Paginator;
9792            self.by_page().items()
9793        }
9794
9795        /// Sets the value of [parent][crate::model::ListDataProductsRequest::parent].
9796        ///
9797        /// This is a **required** field for requests.
9798        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9799            self.0.request.parent = v.into();
9800            self
9801        }
9802
9803        /// Sets the value of [filter][crate::model::ListDataProductsRequest::filter].
9804        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9805            self.0.request.filter = v.into();
9806            self
9807        }
9808
9809        /// Sets the value of [page_size][crate::model::ListDataProductsRequest::page_size].
9810        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9811            self.0.request.page_size = v.into();
9812            self
9813        }
9814
9815        /// Sets the value of [page_token][crate::model::ListDataProductsRequest::page_token].
9816        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9817            self.0.request.page_token = v.into();
9818            self
9819        }
9820
9821        /// Sets the value of [order_by][crate::model::ListDataProductsRequest::order_by].
9822        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
9823            self.0.request.order_by = v.into();
9824            self
9825        }
9826    }
9827
9828    #[doc(hidden)]
9829    impl crate::RequestBuilder for ListDataProducts {
9830        fn request_options(&mut self) -> &mut crate::RequestOptions {
9831            &mut self.0.options
9832        }
9833    }
9834
9835    /// The request builder for [DataProductService::update_data_product][crate::client::DataProductService::update_data_product] calls.
9836    ///
9837    /// # Example
9838    /// ```
9839    /// # use google_cloud_dataplex_v1::builder::data_product_service::UpdateDataProduct;
9840    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9841    /// use google_cloud_lro::Poller;
9842    ///
9843    /// let builder = prepare_request_builder();
9844    /// let response = builder.poller().until_done().await?;
9845    /// # Ok(()) }
9846    ///
9847    /// fn prepare_request_builder() -> UpdateDataProduct {
9848    ///   # panic!();
9849    ///   // ... details omitted ...
9850    /// }
9851    /// ```
9852    #[derive(Clone, Debug)]
9853    pub struct UpdateDataProduct(RequestBuilder<crate::model::UpdateDataProductRequest>);
9854
9855    impl UpdateDataProduct {
9856        pub(crate) fn new(
9857            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9858        ) -> Self {
9859            Self(RequestBuilder::new(stub))
9860        }
9861
9862        /// Sets the full request, replacing any prior values.
9863        pub fn with_request<V: Into<crate::model::UpdateDataProductRequest>>(
9864            mut self,
9865            v: V,
9866        ) -> Self {
9867            self.0.request = v.into();
9868            self
9869        }
9870
9871        /// Sets all the options, replacing any prior values.
9872        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9873            self.0.options = v.into();
9874            self
9875        }
9876
9877        /// Sends the request.
9878        ///
9879        /// # Long running operations
9880        ///
9881        /// This starts, but does not poll, a longrunning operation. More information
9882        /// on [update_data_product][crate::client::DataProductService::update_data_product].
9883        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9884            (*self.0.stub)
9885                .update_data_product(self.0.request, self.0.options)
9886                .await
9887                .map(crate::Response::into_body)
9888        }
9889
9890        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_product`.
9891        pub fn poller(
9892            self,
9893        ) -> impl google_cloud_lro::Poller<crate::model::DataProduct, crate::model::OperationMetadata>
9894        {
9895            type Operation = google_cloud_lro::internal::Operation<
9896                crate::model::DataProduct,
9897                crate::model::OperationMetadata,
9898            >;
9899            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9900            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9901
9902            let stub = self.0.stub.clone();
9903            let mut options = self.0.options.clone();
9904            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
9905            let query = move |name| {
9906                let stub = stub.clone();
9907                let options = options.clone();
9908                async {
9909                    let op = GetOperation::new(stub)
9910                        .set_name(name)
9911                        .with_options(options)
9912                        .send()
9913                        .await?;
9914                    Ok(Operation::new(op))
9915                }
9916            };
9917
9918            let start = move || async {
9919                let op = self.send().await?;
9920                Ok(Operation::new(op))
9921            };
9922
9923            google_cloud_lro::internal::new_poller(
9924                polling_error_policy,
9925                polling_backoff_policy,
9926                start,
9927                query,
9928            )
9929        }
9930
9931        /// Sets the value of [data_product][crate::model::UpdateDataProductRequest::data_product].
9932        ///
9933        /// This is a **required** field for requests.
9934        pub fn set_data_product<T>(mut self, v: T) -> Self
9935        where
9936            T: std::convert::Into<crate::model::DataProduct>,
9937        {
9938            self.0.request.data_product = std::option::Option::Some(v.into());
9939            self
9940        }
9941
9942        /// Sets or clears the value of [data_product][crate::model::UpdateDataProductRequest::data_product].
9943        ///
9944        /// This is a **required** field for requests.
9945        pub fn set_or_clear_data_product<T>(mut self, v: std::option::Option<T>) -> Self
9946        where
9947            T: std::convert::Into<crate::model::DataProduct>,
9948        {
9949            self.0.request.data_product = v.map(|x| x.into());
9950            self
9951        }
9952
9953        /// Sets the value of [update_mask][crate::model::UpdateDataProductRequest::update_mask].
9954        pub fn set_update_mask<T>(mut self, v: T) -> Self
9955        where
9956            T: std::convert::Into<wkt::FieldMask>,
9957        {
9958            self.0.request.update_mask = std::option::Option::Some(v.into());
9959            self
9960        }
9961
9962        /// Sets or clears the value of [update_mask][crate::model::UpdateDataProductRequest::update_mask].
9963        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9964        where
9965            T: std::convert::Into<wkt::FieldMask>,
9966        {
9967            self.0.request.update_mask = v.map(|x| x.into());
9968            self
9969        }
9970
9971        /// Sets the value of [validate_only][crate::model::UpdateDataProductRequest::validate_only].
9972        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9973            self.0.request.validate_only = v.into();
9974            self
9975        }
9976    }
9977
9978    #[doc(hidden)]
9979    impl crate::RequestBuilder for UpdateDataProduct {
9980        fn request_options(&mut self) -> &mut crate::RequestOptions {
9981            &mut self.0.options
9982        }
9983    }
9984
9985    /// The request builder for [DataProductService::create_data_asset][crate::client::DataProductService::create_data_asset] calls.
9986    ///
9987    /// # Example
9988    /// ```
9989    /// # use google_cloud_dataplex_v1::builder::data_product_service::CreateDataAsset;
9990    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9991    /// use google_cloud_lro::Poller;
9992    ///
9993    /// let builder = prepare_request_builder();
9994    /// let response = builder.poller().until_done().await?;
9995    /// # Ok(()) }
9996    ///
9997    /// fn prepare_request_builder() -> CreateDataAsset {
9998    ///   # panic!();
9999    ///   // ... details omitted ...
10000    /// }
10001    /// ```
10002    #[derive(Clone, Debug)]
10003    pub struct CreateDataAsset(RequestBuilder<crate::model::CreateDataAssetRequest>);
10004
10005    impl CreateDataAsset {
10006        pub(crate) fn new(
10007            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10008        ) -> Self {
10009            Self(RequestBuilder::new(stub))
10010        }
10011
10012        /// Sets the full request, replacing any prior values.
10013        pub fn with_request<V: Into<crate::model::CreateDataAssetRequest>>(mut self, v: V) -> Self {
10014            self.0.request = v.into();
10015            self
10016        }
10017
10018        /// Sets all the options, replacing any prior values.
10019        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10020            self.0.options = v.into();
10021            self
10022        }
10023
10024        /// Sends the request.
10025        ///
10026        /// # Long running operations
10027        ///
10028        /// This starts, but does not poll, a longrunning operation. More information
10029        /// on [create_data_asset][crate::client::DataProductService::create_data_asset].
10030        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10031            (*self.0.stub)
10032                .create_data_asset(self.0.request, self.0.options)
10033                .await
10034                .map(crate::Response::into_body)
10035        }
10036
10037        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_asset`.
10038        pub fn poller(
10039            self,
10040        ) -> impl google_cloud_lro::Poller<crate::model::DataAsset, crate::model::OperationMetadata>
10041        {
10042            type Operation = google_cloud_lro::internal::Operation<
10043                crate::model::DataAsset,
10044                crate::model::OperationMetadata,
10045            >;
10046            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10047            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10048
10049            let stub = self.0.stub.clone();
10050            let mut options = self.0.options.clone();
10051            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10052            let query = move |name| {
10053                let stub = stub.clone();
10054                let options = options.clone();
10055                async {
10056                    let op = GetOperation::new(stub)
10057                        .set_name(name)
10058                        .with_options(options)
10059                        .send()
10060                        .await?;
10061                    Ok(Operation::new(op))
10062                }
10063            };
10064
10065            let start = move || async {
10066                let op = self.send().await?;
10067                Ok(Operation::new(op))
10068            };
10069
10070            google_cloud_lro::internal::new_poller(
10071                polling_error_policy,
10072                polling_backoff_policy,
10073                start,
10074                query,
10075            )
10076        }
10077
10078        /// Sets the value of [parent][crate::model::CreateDataAssetRequest::parent].
10079        ///
10080        /// This is a **required** field for requests.
10081        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10082            self.0.request.parent = v.into();
10083            self
10084        }
10085
10086        /// Sets the value of [data_asset_id][crate::model::CreateDataAssetRequest::data_asset_id].
10087        pub fn set_data_asset_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
10088            self.0.request.data_asset_id = v.into();
10089            self
10090        }
10091
10092        /// Sets the value of [data_asset][crate::model::CreateDataAssetRequest::data_asset].
10093        ///
10094        /// This is a **required** field for requests.
10095        pub fn set_data_asset<T>(mut self, v: T) -> Self
10096        where
10097            T: std::convert::Into<crate::model::DataAsset>,
10098        {
10099            self.0.request.data_asset = std::option::Option::Some(v.into());
10100            self
10101        }
10102
10103        /// Sets or clears the value of [data_asset][crate::model::CreateDataAssetRequest::data_asset].
10104        ///
10105        /// This is a **required** field for requests.
10106        pub fn set_or_clear_data_asset<T>(mut self, v: std::option::Option<T>) -> Self
10107        where
10108            T: std::convert::Into<crate::model::DataAsset>,
10109        {
10110            self.0.request.data_asset = v.map(|x| x.into());
10111            self
10112        }
10113
10114        /// Sets the value of [validate_only][crate::model::CreateDataAssetRequest::validate_only].
10115        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10116            self.0.request.validate_only = v.into();
10117            self
10118        }
10119    }
10120
10121    #[doc(hidden)]
10122    impl crate::RequestBuilder for CreateDataAsset {
10123        fn request_options(&mut self) -> &mut crate::RequestOptions {
10124            &mut self.0.options
10125        }
10126    }
10127
10128    /// The request builder for [DataProductService::update_data_asset][crate::client::DataProductService::update_data_asset] calls.
10129    ///
10130    /// # Example
10131    /// ```
10132    /// # use google_cloud_dataplex_v1::builder::data_product_service::UpdateDataAsset;
10133    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10134    /// use google_cloud_lro::Poller;
10135    ///
10136    /// let builder = prepare_request_builder();
10137    /// let response = builder.poller().until_done().await?;
10138    /// # Ok(()) }
10139    ///
10140    /// fn prepare_request_builder() -> UpdateDataAsset {
10141    ///   # panic!();
10142    ///   // ... details omitted ...
10143    /// }
10144    /// ```
10145    #[derive(Clone, Debug)]
10146    pub struct UpdateDataAsset(RequestBuilder<crate::model::UpdateDataAssetRequest>);
10147
10148    impl UpdateDataAsset {
10149        pub(crate) fn new(
10150            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10151        ) -> Self {
10152            Self(RequestBuilder::new(stub))
10153        }
10154
10155        /// Sets the full request, replacing any prior values.
10156        pub fn with_request<V: Into<crate::model::UpdateDataAssetRequest>>(mut self, v: V) -> Self {
10157            self.0.request = v.into();
10158            self
10159        }
10160
10161        /// Sets all the options, replacing any prior values.
10162        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10163            self.0.options = v.into();
10164            self
10165        }
10166
10167        /// Sends the request.
10168        ///
10169        /// # Long running operations
10170        ///
10171        /// This starts, but does not poll, a longrunning operation. More information
10172        /// on [update_data_asset][crate::client::DataProductService::update_data_asset].
10173        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10174            (*self.0.stub)
10175                .update_data_asset(self.0.request, self.0.options)
10176                .await
10177                .map(crate::Response::into_body)
10178        }
10179
10180        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_asset`.
10181        pub fn poller(
10182            self,
10183        ) -> impl google_cloud_lro::Poller<crate::model::DataAsset, crate::model::OperationMetadata>
10184        {
10185            type Operation = google_cloud_lro::internal::Operation<
10186                crate::model::DataAsset,
10187                crate::model::OperationMetadata,
10188            >;
10189            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10190            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10191
10192            let stub = self.0.stub.clone();
10193            let mut options = self.0.options.clone();
10194            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10195            let query = move |name| {
10196                let stub = stub.clone();
10197                let options = options.clone();
10198                async {
10199                    let op = GetOperation::new(stub)
10200                        .set_name(name)
10201                        .with_options(options)
10202                        .send()
10203                        .await?;
10204                    Ok(Operation::new(op))
10205                }
10206            };
10207
10208            let start = move || async {
10209                let op = self.send().await?;
10210                Ok(Operation::new(op))
10211            };
10212
10213            google_cloud_lro::internal::new_poller(
10214                polling_error_policy,
10215                polling_backoff_policy,
10216                start,
10217                query,
10218            )
10219        }
10220
10221        /// Sets the value of [data_asset][crate::model::UpdateDataAssetRequest::data_asset].
10222        ///
10223        /// This is a **required** field for requests.
10224        pub fn set_data_asset<T>(mut self, v: T) -> Self
10225        where
10226            T: std::convert::Into<crate::model::DataAsset>,
10227        {
10228            self.0.request.data_asset = std::option::Option::Some(v.into());
10229            self
10230        }
10231
10232        /// Sets or clears the value of [data_asset][crate::model::UpdateDataAssetRequest::data_asset].
10233        ///
10234        /// This is a **required** field for requests.
10235        pub fn set_or_clear_data_asset<T>(mut self, v: std::option::Option<T>) -> Self
10236        where
10237            T: std::convert::Into<crate::model::DataAsset>,
10238        {
10239            self.0.request.data_asset = v.map(|x| x.into());
10240            self
10241        }
10242
10243        /// Sets the value of [update_mask][crate::model::UpdateDataAssetRequest::update_mask].
10244        pub fn set_update_mask<T>(mut self, v: T) -> Self
10245        where
10246            T: std::convert::Into<wkt::FieldMask>,
10247        {
10248            self.0.request.update_mask = std::option::Option::Some(v.into());
10249            self
10250        }
10251
10252        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAssetRequest::update_mask].
10253        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10254        where
10255            T: std::convert::Into<wkt::FieldMask>,
10256        {
10257            self.0.request.update_mask = v.map(|x| x.into());
10258            self
10259        }
10260
10261        /// Sets the value of [validate_only][crate::model::UpdateDataAssetRequest::validate_only].
10262        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10263            self.0.request.validate_only = v.into();
10264            self
10265        }
10266    }
10267
10268    #[doc(hidden)]
10269    impl crate::RequestBuilder for UpdateDataAsset {
10270        fn request_options(&mut self) -> &mut crate::RequestOptions {
10271            &mut self.0.options
10272        }
10273    }
10274
10275    /// The request builder for [DataProductService::delete_data_asset][crate::client::DataProductService::delete_data_asset] calls.
10276    ///
10277    /// # Example
10278    /// ```
10279    /// # use google_cloud_dataplex_v1::builder::data_product_service::DeleteDataAsset;
10280    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10281    /// use google_cloud_lro::Poller;
10282    ///
10283    /// let builder = prepare_request_builder();
10284    /// let response = builder.poller().until_done().await?;
10285    /// # Ok(()) }
10286    ///
10287    /// fn prepare_request_builder() -> DeleteDataAsset {
10288    ///   # panic!();
10289    ///   // ... details omitted ...
10290    /// }
10291    /// ```
10292    #[derive(Clone, Debug)]
10293    pub struct DeleteDataAsset(RequestBuilder<crate::model::DeleteDataAssetRequest>);
10294
10295    impl DeleteDataAsset {
10296        pub(crate) fn new(
10297            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10298        ) -> Self {
10299            Self(RequestBuilder::new(stub))
10300        }
10301
10302        /// Sets the full request, replacing any prior values.
10303        pub fn with_request<V: Into<crate::model::DeleteDataAssetRequest>>(mut self, v: V) -> Self {
10304            self.0.request = v.into();
10305            self
10306        }
10307
10308        /// Sets all the options, replacing any prior values.
10309        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10310            self.0.options = v.into();
10311            self
10312        }
10313
10314        /// Sends the request.
10315        ///
10316        /// # Long running operations
10317        ///
10318        /// This starts, but does not poll, a longrunning operation. More information
10319        /// on [delete_data_asset][crate::client::DataProductService::delete_data_asset].
10320        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10321            (*self.0.stub)
10322                .delete_data_asset(self.0.request, self.0.options)
10323                .await
10324                .map(crate::Response::into_body)
10325        }
10326
10327        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_asset`.
10328        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
10329            type Operation =
10330                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
10331            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10332            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10333
10334            let stub = self.0.stub.clone();
10335            let mut options = self.0.options.clone();
10336            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10337            let query = move |name| {
10338                let stub = stub.clone();
10339                let options = options.clone();
10340                async {
10341                    let op = GetOperation::new(stub)
10342                        .set_name(name)
10343                        .with_options(options)
10344                        .send()
10345                        .await?;
10346                    Ok(Operation::new(op))
10347                }
10348            };
10349
10350            let start = move || async {
10351                let op = self.send().await?;
10352                Ok(Operation::new(op))
10353            };
10354
10355            google_cloud_lro::internal::new_unit_response_poller(
10356                polling_error_policy,
10357                polling_backoff_policy,
10358                start,
10359                query,
10360            )
10361        }
10362
10363        /// Sets the value of [name][crate::model::DeleteDataAssetRequest::name].
10364        ///
10365        /// This is a **required** field for requests.
10366        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10367            self.0.request.name = v.into();
10368            self
10369        }
10370
10371        /// Sets the value of [etag][crate::model::DeleteDataAssetRequest::etag].
10372        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
10373            self.0.request.etag = v.into();
10374            self
10375        }
10376
10377        /// Sets the value of [validate_only][crate::model::DeleteDataAssetRequest::validate_only].
10378        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10379            self.0.request.validate_only = v.into();
10380            self
10381        }
10382    }
10383
10384    #[doc(hidden)]
10385    impl crate::RequestBuilder for DeleteDataAsset {
10386        fn request_options(&mut self) -> &mut crate::RequestOptions {
10387            &mut self.0.options
10388        }
10389    }
10390
10391    /// The request builder for [DataProductService::get_data_asset][crate::client::DataProductService::get_data_asset] calls.
10392    ///
10393    /// # Example
10394    /// ```
10395    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetDataAsset;
10396    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10397    ///
10398    /// let builder = prepare_request_builder();
10399    /// let response = builder.send().await?;
10400    /// # Ok(()) }
10401    ///
10402    /// fn prepare_request_builder() -> GetDataAsset {
10403    ///   # panic!();
10404    ///   // ... details omitted ...
10405    /// }
10406    /// ```
10407    #[derive(Clone, Debug)]
10408    pub struct GetDataAsset(RequestBuilder<crate::model::GetDataAssetRequest>);
10409
10410    impl GetDataAsset {
10411        pub(crate) fn new(
10412            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10413        ) -> Self {
10414            Self(RequestBuilder::new(stub))
10415        }
10416
10417        /// Sets the full request, replacing any prior values.
10418        pub fn with_request<V: Into<crate::model::GetDataAssetRequest>>(mut self, v: V) -> Self {
10419            self.0.request = v.into();
10420            self
10421        }
10422
10423        /// Sets all the options, replacing any prior values.
10424        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10425            self.0.options = v.into();
10426            self
10427        }
10428
10429        /// Sends the request.
10430        pub async fn send(self) -> Result<crate::model::DataAsset> {
10431            (*self.0.stub)
10432                .get_data_asset(self.0.request, self.0.options)
10433                .await
10434                .map(crate::Response::into_body)
10435        }
10436
10437        /// Sets the value of [name][crate::model::GetDataAssetRequest::name].
10438        ///
10439        /// This is a **required** field for requests.
10440        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10441            self.0.request.name = v.into();
10442            self
10443        }
10444    }
10445
10446    #[doc(hidden)]
10447    impl crate::RequestBuilder for GetDataAsset {
10448        fn request_options(&mut self) -> &mut crate::RequestOptions {
10449            &mut self.0.options
10450        }
10451    }
10452
10453    /// The request builder for [DataProductService::list_data_assets][crate::client::DataProductService::list_data_assets] calls.
10454    ///
10455    /// # Example
10456    /// ```
10457    /// # use google_cloud_dataplex_v1::builder::data_product_service::ListDataAssets;
10458    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10459    /// use google_cloud_gax::paginator::ItemPaginator;
10460    ///
10461    /// let builder = prepare_request_builder();
10462    /// let mut items = builder.by_item();
10463    /// while let Some(result) = items.next().await {
10464    ///   let item = result?;
10465    /// }
10466    /// # Ok(()) }
10467    ///
10468    /// fn prepare_request_builder() -> ListDataAssets {
10469    ///   # panic!();
10470    ///   // ... details omitted ...
10471    /// }
10472    /// ```
10473    #[derive(Clone, Debug)]
10474    pub struct ListDataAssets(RequestBuilder<crate::model::ListDataAssetsRequest>);
10475
10476    impl ListDataAssets {
10477        pub(crate) fn new(
10478            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10479        ) -> Self {
10480            Self(RequestBuilder::new(stub))
10481        }
10482
10483        /// Sets the full request, replacing any prior values.
10484        pub fn with_request<V: Into<crate::model::ListDataAssetsRequest>>(mut self, v: V) -> Self {
10485            self.0.request = v.into();
10486            self
10487        }
10488
10489        /// Sets all the options, replacing any prior values.
10490        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10491            self.0.options = v.into();
10492            self
10493        }
10494
10495        /// Sends the request.
10496        pub async fn send(self) -> Result<crate::model::ListDataAssetsResponse> {
10497            (*self.0.stub)
10498                .list_data_assets(self.0.request, self.0.options)
10499                .await
10500                .map(crate::Response::into_body)
10501        }
10502
10503        /// Streams each page in the collection.
10504        pub fn by_page(
10505            self,
10506        ) -> impl google_cloud_gax::paginator::Paginator<
10507            crate::model::ListDataAssetsResponse,
10508            crate::Error,
10509        > {
10510            use std::clone::Clone;
10511            let token = self.0.request.page_token.clone();
10512            let execute = move |token: String| {
10513                let mut builder = self.clone();
10514                builder.0.request = builder.0.request.set_page_token(token);
10515                builder.send()
10516            };
10517            google_cloud_gax::paginator::internal::new_paginator(token, execute)
10518        }
10519
10520        /// Streams each item in the collection.
10521        pub fn by_item(
10522            self,
10523        ) -> impl google_cloud_gax::paginator::ItemPaginator<
10524            crate::model::ListDataAssetsResponse,
10525            crate::Error,
10526        > {
10527            use google_cloud_gax::paginator::Paginator;
10528            self.by_page().items()
10529        }
10530
10531        /// Sets the value of [parent][crate::model::ListDataAssetsRequest::parent].
10532        ///
10533        /// This is a **required** field for requests.
10534        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10535            self.0.request.parent = v.into();
10536            self
10537        }
10538
10539        /// Sets the value of [filter][crate::model::ListDataAssetsRequest::filter].
10540        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10541            self.0.request.filter = v.into();
10542            self
10543        }
10544
10545        /// Sets the value of [order_by][crate::model::ListDataAssetsRequest::order_by].
10546        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
10547            self.0.request.order_by = v.into();
10548            self
10549        }
10550
10551        /// Sets the value of [page_size][crate::model::ListDataAssetsRequest::page_size].
10552        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10553            self.0.request.page_size = v.into();
10554            self
10555        }
10556
10557        /// Sets the value of [page_token][crate::model::ListDataAssetsRequest::page_token].
10558        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10559            self.0.request.page_token = v.into();
10560            self
10561        }
10562    }
10563
10564    #[doc(hidden)]
10565    impl crate::RequestBuilder for ListDataAssets {
10566        fn request_options(&mut self) -> &mut crate::RequestOptions {
10567            &mut self.0.options
10568        }
10569    }
10570
10571    /// The request builder for [DataProductService::list_locations][crate::client::DataProductService::list_locations] calls.
10572    ///
10573    /// # Example
10574    /// ```
10575    /// # use google_cloud_dataplex_v1::builder::data_product_service::ListLocations;
10576    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10577    /// use google_cloud_gax::paginator::ItemPaginator;
10578    ///
10579    /// let builder = prepare_request_builder();
10580    /// let mut items = builder.by_item();
10581    /// while let Some(result) = items.next().await {
10582    ///   let item = result?;
10583    /// }
10584    /// # Ok(()) }
10585    ///
10586    /// fn prepare_request_builder() -> ListLocations {
10587    ///   # panic!();
10588    ///   // ... details omitted ...
10589    /// }
10590    /// ```
10591    #[derive(Clone, Debug)]
10592    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
10593
10594    impl ListLocations {
10595        pub(crate) fn new(
10596            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10597        ) -> Self {
10598            Self(RequestBuilder::new(stub))
10599        }
10600
10601        /// Sets the full request, replacing any prior values.
10602        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
10603            mut self,
10604            v: V,
10605        ) -> Self {
10606            self.0.request = v.into();
10607            self
10608        }
10609
10610        /// Sets all the options, replacing any prior values.
10611        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10612            self.0.options = v.into();
10613            self
10614        }
10615
10616        /// Sends the request.
10617        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
10618            (*self.0.stub)
10619                .list_locations(self.0.request, self.0.options)
10620                .await
10621                .map(crate::Response::into_body)
10622        }
10623
10624        /// Streams each page in the collection.
10625        pub fn by_page(
10626            self,
10627        ) -> impl google_cloud_gax::paginator::Paginator<
10628            google_cloud_location::model::ListLocationsResponse,
10629            crate::Error,
10630        > {
10631            use std::clone::Clone;
10632            let token = self.0.request.page_token.clone();
10633            let execute = move |token: String| {
10634                let mut builder = self.clone();
10635                builder.0.request = builder.0.request.set_page_token(token);
10636                builder.send()
10637            };
10638            google_cloud_gax::paginator::internal::new_paginator(token, execute)
10639        }
10640
10641        /// Streams each item in the collection.
10642        pub fn by_item(
10643            self,
10644        ) -> impl google_cloud_gax::paginator::ItemPaginator<
10645            google_cloud_location::model::ListLocationsResponse,
10646            crate::Error,
10647        > {
10648            use google_cloud_gax::paginator::Paginator;
10649            self.by_page().items()
10650        }
10651
10652        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
10653        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10654            self.0.request.name = v.into();
10655            self
10656        }
10657
10658        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
10659        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10660            self.0.request.filter = v.into();
10661            self
10662        }
10663
10664        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
10665        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10666            self.0.request.page_size = v.into();
10667            self
10668        }
10669
10670        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
10671        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10672            self.0.request.page_token = v.into();
10673            self
10674        }
10675    }
10676
10677    #[doc(hidden)]
10678    impl crate::RequestBuilder for ListLocations {
10679        fn request_options(&mut self) -> &mut crate::RequestOptions {
10680            &mut self.0.options
10681        }
10682    }
10683
10684    /// The request builder for [DataProductService::get_location][crate::client::DataProductService::get_location] calls.
10685    ///
10686    /// # Example
10687    /// ```
10688    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetLocation;
10689    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10690    ///
10691    /// let builder = prepare_request_builder();
10692    /// let response = builder.send().await?;
10693    /// # Ok(()) }
10694    ///
10695    /// fn prepare_request_builder() -> GetLocation {
10696    ///   # panic!();
10697    ///   // ... details omitted ...
10698    /// }
10699    /// ```
10700    #[derive(Clone, Debug)]
10701    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
10702
10703    impl GetLocation {
10704        pub(crate) fn new(
10705            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10706        ) -> Self {
10707            Self(RequestBuilder::new(stub))
10708        }
10709
10710        /// Sets the full request, replacing any prior values.
10711        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
10712            mut self,
10713            v: V,
10714        ) -> Self {
10715            self.0.request = v.into();
10716            self
10717        }
10718
10719        /// Sets all the options, replacing any prior values.
10720        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10721            self.0.options = v.into();
10722            self
10723        }
10724
10725        /// Sends the request.
10726        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
10727            (*self.0.stub)
10728                .get_location(self.0.request, self.0.options)
10729                .await
10730                .map(crate::Response::into_body)
10731        }
10732
10733        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
10734        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10735            self.0.request.name = v.into();
10736            self
10737        }
10738    }
10739
10740    #[doc(hidden)]
10741    impl crate::RequestBuilder for GetLocation {
10742        fn request_options(&mut self) -> &mut crate::RequestOptions {
10743            &mut self.0.options
10744        }
10745    }
10746
10747    /// The request builder for [DataProductService::set_iam_policy][crate::client::DataProductService::set_iam_policy] calls.
10748    ///
10749    /// # Example
10750    /// ```
10751    /// # use google_cloud_dataplex_v1::builder::data_product_service::SetIamPolicy;
10752    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10753    ///
10754    /// let builder = prepare_request_builder();
10755    /// let response = builder.send().await?;
10756    /// # Ok(()) }
10757    ///
10758    /// fn prepare_request_builder() -> SetIamPolicy {
10759    ///   # panic!();
10760    ///   // ... details omitted ...
10761    /// }
10762    /// ```
10763    #[derive(Clone, Debug)]
10764    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
10765
10766    impl SetIamPolicy {
10767        pub(crate) fn new(
10768            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10769        ) -> Self {
10770            Self(RequestBuilder::new(stub))
10771        }
10772
10773        /// Sets the full request, replacing any prior values.
10774        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
10775            mut self,
10776            v: V,
10777        ) -> Self {
10778            self.0.request = v.into();
10779            self
10780        }
10781
10782        /// Sets all the options, replacing any prior values.
10783        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10784            self.0.options = v.into();
10785            self
10786        }
10787
10788        /// Sends the request.
10789        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
10790            (*self.0.stub)
10791                .set_iam_policy(self.0.request, self.0.options)
10792                .await
10793                .map(crate::Response::into_body)
10794        }
10795
10796        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
10797        ///
10798        /// This is a **required** field for requests.
10799        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
10800            self.0.request.resource = v.into();
10801            self
10802        }
10803
10804        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
10805        ///
10806        /// This is a **required** field for requests.
10807        pub fn set_policy<T>(mut self, v: T) -> Self
10808        where
10809            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
10810        {
10811            self.0.request.policy = std::option::Option::Some(v.into());
10812            self
10813        }
10814
10815        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
10816        ///
10817        /// This is a **required** field for requests.
10818        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
10819        where
10820            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
10821        {
10822            self.0.request.policy = v.map(|x| x.into());
10823            self
10824        }
10825
10826        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
10827        pub fn set_update_mask<T>(mut self, v: T) -> Self
10828        where
10829            T: std::convert::Into<wkt::FieldMask>,
10830        {
10831            self.0.request.update_mask = std::option::Option::Some(v.into());
10832            self
10833        }
10834
10835        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
10836        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10837        where
10838            T: std::convert::Into<wkt::FieldMask>,
10839        {
10840            self.0.request.update_mask = v.map(|x| x.into());
10841            self
10842        }
10843    }
10844
10845    #[doc(hidden)]
10846    impl crate::RequestBuilder for SetIamPolicy {
10847        fn request_options(&mut self) -> &mut crate::RequestOptions {
10848            &mut self.0.options
10849        }
10850    }
10851
10852    /// The request builder for [DataProductService::get_iam_policy][crate::client::DataProductService::get_iam_policy] calls.
10853    ///
10854    /// # Example
10855    /// ```
10856    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetIamPolicy;
10857    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10858    ///
10859    /// let builder = prepare_request_builder();
10860    /// let response = builder.send().await?;
10861    /// # Ok(()) }
10862    ///
10863    /// fn prepare_request_builder() -> GetIamPolicy {
10864    ///   # panic!();
10865    ///   // ... details omitted ...
10866    /// }
10867    /// ```
10868    #[derive(Clone, Debug)]
10869    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
10870
10871    impl GetIamPolicy {
10872        pub(crate) fn new(
10873            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10874        ) -> Self {
10875            Self(RequestBuilder::new(stub))
10876        }
10877
10878        /// Sets the full request, replacing any prior values.
10879        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
10880            mut self,
10881            v: V,
10882        ) -> Self {
10883            self.0.request = v.into();
10884            self
10885        }
10886
10887        /// Sets all the options, replacing any prior values.
10888        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10889            self.0.options = v.into();
10890            self
10891        }
10892
10893        /// Sends the request.
10894        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
10895            (*self.0.stub)
10896                .get_iam_policy(self.0.request, self.0.options)
10897                .await
10898                .map(crate::Response::into_body)
10899        }
10900
10901        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
10902        ///
10903        /// This is a **required** field for requests.
10904        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
10905            self.0.request.resource = v.into();
10906            self
10907        }
10908
10909        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
10910        pub fn set_options<T>(mut self, v: T) -> Self
10911        where
10912            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
10913        {
10914            self.0.request.options = std::option::Option::Some(v.into());
10915            self
10916        }
10917
10918        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
10919        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
10920        where
10921            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
10922        {
10923            self.0.request.options = v.map(|x| x.into());
10924            self
10925        }
10926    }
10927
10928    #[doc(hidden)]
10929    impl crate::RequestBuilder for GetIamPolicy {
10930        fn request_options(&mut self) -> &mut crate::RequestOptions {
10931            &mut self.0.options
10932        }
10933    }
10934
10935    /// The request builder for [DataProductService::test_iam_permissions][crate::client::DataProductService::test_iam_permissions] calls.
10936    ///
10937    /// # Example
10938    /// ```
10939    /// # use google_cloud_dataplex_v1::builder::data_product_service::TestIamPermissions;
10940    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10941    ///
10942    /// let builder = prepare_request_builder();
10943    /// let response = builder.send().await?;
10944    /// # Ok(()) }
10945    ///
10946    /// fn prepare_request_builder() -> TestIamPermissions {
10947    ///   # panic!();
10948    ///   // ... details omitted ...
10949    /// }
10950    /// ```
10951    #[derive(Clone, Debug)]
10952    pub struct TestIamPermissions(
10953        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
10954    );
10955
10956    impl TestIamPermissions {
10957        pub(crate) fn new(
10958            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10959        ) -> Self {
10960            Self(RequestBuilder::new(stub))
10961        }
10962
10963        /// Sets the full request, replacing any prior values.
10964        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
10965            mut self,
10966            v: V,
10967        ) -> Self {
10968            self.0.request = v.into();
10969            self
10970        }
10971
10972        /// Sets all the options, replacing any prior values.
10973        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10974            self.0.options = v.into();
10975            self
10976        }
10977
10978        /// Sends the request.
10979        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
10980            (*self.0.stub)
10981                .test_iam_permissions(self.0.request, self.0.options)
10982                .await
10983                .map(crate::Response::into_body)
10984        }
10985
10986        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
10987        ///
10988        /// This is a **required** field for requests.
10989        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
10990            self.0.request.resource = v.into();
10991            self
10992        }
10993
10994        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
10995        ///
10996        /// This is a **required** field for requests.
10997        pub fn set_permissions<T, V>(mut self, v: T) -> Self
10998        where
10999            T: std::iter::IntoIterator<Item = V>,
11000            V: std::convert::Into<std::string::String>,
11001        {
11002            use std::iter::Iterator;
11003            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
11004            self
11005        }
11006    }
11007
11008    #[doc(hidden)]
11009    impl crate::RequestBuilder for TestIamPermissions {
11010        fn request_options(&mut self) -> &mut crate::RequestOptions {
11011            &mut self.0.options
11012        }
11013    }
11014
11015    /// The request builder for [DataProductService::list_operations][crate::client::DataProductService::list_operations] calls.
11016    ///
11017    /// # Example
11018    /// ```
11019    /// # use google_cloud_dataplex_v1::builder::data_product_service::ListOperations;
11020    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11021    /// use google_cloud_gax::paginator::ItemPaginator;
11022    ///
11023    /// let builder = prepare_request_builder();
11024    /// let mut items = builder.by_item();
11025    /// while let Some(result) = items.next().await {
11026    ///   let item = result?;
11027    /// }
11028    /// # Ok(()) }
11029    ///
11030    /// fn prepare_request_builder() -> ListOperations {
11031    ///   # panic!();
11032    ///   // ... details omitted ...
11033    /// }
11034    /// ```
11035    #[derive(Clone, Debug)]
11036    pub struct ListOperations(
11037        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
11038    );
11039
11040    impl ListOperations {
11041        pub(crate) fn new(
11042            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11043        ) -> Self {
11044            Self(RequestBuilder::new(stub))
11045        }
11046
11047        /// Sets the full request, replacing any prior values.
11048        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
11049            mut self,
11050            v: V,
11051        ) -> Self {
11052            self.0.request = v.into();
11053            self
11054        }
11055
11056        /// Sets all the options, replacing any prior values.
11057        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11058            self.0.options = v.into();
11059            self
11060        }
11061
11062        /// Sends the request.
11063        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
11064            (*self.0.stub)
11065                .list_operations(self.0.request, self.0.options)
11066                .await
11067                .map(crate::Response::into_body)
11068        }
11069
11070        /// Streams each page in the collection.
11071        pub fn by_page(
11072            self,
11073        ) -> impl google_cloud_gax::paginator::Paginator<
11074            google_cloud_longrunning::model::ListOperationsResponse,
11075            crate::Error,
11076        > {
11077            use std::clone::Clone;
11078            let token = self.0.request.page_token.clone();
11079            let execute = move |token: String| {
11080                let mut builder = self.clone();
11081                builder.0.request = builder.0.request.set_page_token(token);
11082                builder.send()
11083            };
11084            google_cloud_gax::paginator::internal::new_paginator(token, execute)
11085        }
11086
11087        /// Streams each item in the collection.
11088        pub fn by_item(
11089            self,
11090        ) -> impl google_cloud_gax::paginator::ItemPaginator<
11091            google_cloud_longrunning::model::ListOperationsResponse,
11092            crate::Error,
11093        > {
11094            use google_cloud_gax::paginator::Paginator;
11095            self.by_page().items()
11096        }
11097
11098        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
11099        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11100            self.0.request.name = v.into();
11101            self
11102        }
11103
11104        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
11105        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
11106            self.0.request.filter = v.into();
11107            self
11108        }
11109
11110        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
11111        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
11112            self.0.request.page_size = v.into();
11113            self
11114        }
11115
11116        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
11117        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
11118            self.0.request.page_token = v.into();
11119            self
11120        }
11121
11122        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
11123        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
11124            self.0.request.return_partial_success = v.into();
11125            self
11126        }
11127    }
11128
11129    #[doc(hidden)]
11130    impl crate::RequestBuilder for ListOperations {
11131        fn request_options(&mut self) -> &mut crate::RequestOptions {
11132            &mut self.0.options
11133        }
11134    }
11135
11136    /// The request builder for [DataProductService::get_operation][crate::client::DataProductService::get_operation] calls.
11137    ///
11138    /// # Example
11139    /// ```
11140    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetOperation;
11141    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11142    ///
11143    /// let builder = prepare_request_builder();
11144    /// let response = builder.send().await?;
11145    /// # Ok(()) }
11146    ///
11147    /// fn prepare_request_builder() -> GetOperation {
11148    ///   # panic!();
11149    ///   // ... details omitted ...
11150    /// }
11151    /// ```
11152    #[derive(Clone, Debug)]
11153    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
11154
11155    impl GetOperation {
11156        pub(crate) fn new(
11157            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11158        ) -> Self {
11159            Self(RequestBuilder::new(stub))
11160        }
11161
11162        /// Sets the full request, replacing any prior values.
11163        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
11164            mut self,
11165            v: V,
11166        ) -> Self {
11167            self.0.request = v.into();
11168            self
11169        }
11170
11171        /// Sets all the options, replacing any prior values.
11172        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11173            self.0.options = v.into();
11174            self
11175        }
11176
11177        /// Sends the request.
11178        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11179            (*self.0.stub)
11180                .get_operation(self.0.request, self.0.options)
11181                .await
11182                .map(crate::Response::into_body)
11183        }
11184
11185        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
11186        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11187            self.0.request.name = v.into();
11188            self
11189        }
11190    }
11191
11192    #[doc(hidden)]
11193    impl crate::RequestBuilder for GetOperation {
11194        fn request_options(&mut self) -> &mut crate::RequestOptions {
11195            &mut self.0.options
11196        }
11197    }
11198
11199    /// The request builder for [DataProductService::delete_operation][crate::client::DataProductService::delete_operation] calls.
11200    ///
11201    /// # Example
11202    /// ```
11203    /// # use google_cloud_dataplex_v1::builder::data_product_service::DeleteOperation;
11204    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11205    ///
11206    /// let builder = prepare_request_builder();
11207    /// let response = builder.send().await?;
11208    /// # Ok(()) }
11209    ///
11210    /// fn prepare_request_builder() -> DeleteOperation {
11211    ///   # panic!();
11212    ///   // ... details omitted ...
11213    /// }
11214    /// ```
11215    #[derive(Clone, Debug)]
11216    pub struct DeleteOperation(
11217        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
11218    );
11219
11220    impl DeleteOperation {
11221        pub(crate) fn new(
11222            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11223        ) -> Self {
11224            Self(RequestBuilder::new(stub))
11225        }
11226
11227        /// Sets the full request, replacing any prior values.
11228        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
11229            mut self,
11230            v: V,
11231        ) -> Self {
11232            self.0.request = v.into();
11233            self
11234        }
11235
11236        /// Sets all the options, replacing any prior values.
11237        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11238            self.0.options = v.into();
11239            self
11240        }
11241
11242        /// Sends the request.
11243        pub async fn send(self) -> Result<()> {
11244            (*self.0.stub)
11245                .delete_operation(self.0.request, self.0.options)
11246                .await
11247                .map(crate::Response::into_body)
11248        }
11249
11250        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
11251        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11252            self.0.request.name = v.into();
11253            self
11254        }
11255    }
11256
11257    #[doc(hidden)]
11258    impl crate::RequestBuilder for DeleteOperation {
11259        fn request_options(&mut self) -> &mut crate::RequestOptions {
11260            &mut self.0.options
11261        }
11262    }
11263
11264    /// The request builder for [DataProductService::cancel_operation][crate::client::DataProductService::cancel_operation] calls.
11265    ///
11266    /// # Example
11267    /// ```
11268    /// # use google_cloud_dataplex_v1::builder::data_product_service::CancelOperation;
11269    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11270    ///
11271    /// let builder = prepare_request_builder();
11272    /// let response = builder.send().await?;
11273    /// # Ok(()) }
11274    ///
11275    /// fn prepare_request_builder() -> CancelOperation {
11276    ///   # panic!();
11277    ///   // ... details omitted ...
11278    /// }
11279    /// ```
11280    #[derive(Clone, Debug)]
11281    pub struct CancelOperation(
11282        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
11283    );
11284
11285    impl CancelOperation {
11286        pub(crate) fn new(
11287            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11288        ) -> Self {
11289            Self(RequestBuilder::new(stub))
11290        }
11291
11292        /// Sets the full request, replacing any prior values.
11293        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
11294            mut self,
11295            v: V,
11296        ) -> Self {
11297            self.0.request = v.into();
11298            self
11299        }
11300
11301        /// Sets all the options, replacing any prior values.
11302        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11303            self.0.options = v.into();
11304            self
11305        }
11306
11307        /// Sends the request.
11308        pub async fn send(self) -> Result<()> {
11309            (*self.0.stub)
11310                .cancel_operation(self.0.request, self.0.options)
11311                .await
11312                .map(crate::Response::into_body)
11313        }
11314
11315        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
11316        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11317            self.0.request.name = v.into();
11318            self
11319        }
11320    }
11321
11322    #[doc(hidden)]
11323    impl crate::RequestBuilder for CancelOperation {
11324        fn request_options(&mut self) -> &mut crate::RequestOptions {
11325            &mut self.0.options
11326        }
11327    }
11328}
11329
11330/// Request and client builders for [DataTaxonomyService][crate::client::DataTaxonomyService].
11331pub mod data_taxonomy_service {
11332    use crate::Result;
11333
11334    /// A builder for [DataTaxonomyService][crate::client::DataTaxonomyService].
11335    ///
11336    /// ```
11337    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
11338    /// # use google_cloud_dataplex_v1::*;
11339    /// # use builder::data_taxonomy_service::ClientBuilder;
11340    /// # use client::DataTaxonomyService;
11341    /// let builder : ClientBuilder = DataTaxonomyService::builder();
11342    /// let client = builder
11343    ///     .with_endpoint("https://dataplex.googleapis.com")
11344    ///     .build().await?;
11345    /// # Ok(()) }
11346    /// ```
11347    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
11348
11349    pub(crate) mod client {
11350        use super::super::super::client::DataTaxonomyService;
11351        pub struct Factory;
11352        impl crate::ClientFactory for Factory {
11353            type Client = DataTaxonomyService;
11354            type Credentials = gaxi::options::Credentials;
11355            async fn build(
11356                self,
11357                config: gaxi::options::ClientConfig,
11358            ) -> crate::ClientBuilderResult<Self::Client> {
11359                Self::Client::new(config).await
11360            }
11361        }
11362    }
11363
11364    /// Common implementation for [crate::client::DataTaxonomyService] request builders.
11365    #[derive(Clone, Debug)]
11366    pub(crate) struct RequestBuilder<R: std::default::Default> {
11367        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11368        request: R,
11369        options: crate::RequestOptions,
11370    }
11371
11372    impl<R> RequestBuilder<R>
11373    where
11374        R: std::default::Default,
11375    {
11376        pub(crate) fn new(
11377            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11378        ) -> Self {
11379            Self {
11380                stub,
11381                request: R::default(),
11382                options: crate::RequestOptions::default(),
11383            }
11384        }
11385    }
11386
11387    /// The request builder for [DataTaxonomyService::create_data_taxonomy][crate::client::DataTaxonomyService::create_data_taxonomy] calls.
11388    ///
11389    /// # Example
11390    /// ```
11391    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CreateDataTaxonomy;
11392    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11393    /// use google_cloud_lro::Poller;
11394    ///
11395    /// let builder = prepare_request_builder();
11396    /// let response = builder.poller().until_done().await?;
11397    /// # Ok(()) }
11398    ///
11399    /// fn prepare_request_builder() -> CreateDataTaxonomy {
11400    ///   # panic!();
11401    ///   // ... details omitted ...
11402    /// }
11403    /// ```
11404    #[derive(Clone, Debug)]
11405    pub struct CreateDataTaxonomy(RequestBuilder<crate::model::CreateDataTaxonomyRequest>);
11406
11407    impl CreateDataTaxonomy {
11408        pub(crate) fn new(
11409            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11410        ) -> Self {
11411            Self(RequestBuilder::new(stub))
11412        }
11413
11414        /// Sets the full request, replacing any prior values.
11415        pub fn with_request<V: Into<crate::model::CreateDataTaxonomyRequest>>(
11416            mut self,
11417            v: V,
11418        ) -> Self {
11419            self.0.request = v.into();
11420            self
11421        }
11422
11423        /// Sets all the options, replacing any prior values.
11424        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11425            self.0.options = v.into();
11426            self
11427        }
11428
11429        /// Sends the request.
11430        ///
11431        /// # Long running operations
11432        ///
11433        /// This starts, but does not poll, a longrunning operation. More information
11434        /// on [create_data_taxonomy][crate::client::DataTaxonomyService::create_data_taxonomy].
11435        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11436            (*self.0.stub)
11437                .create_data_taxonomy(self.0.request, self.0.options)
11438                .await
11439                .map(crate::Response::into_body)
11440        }
11441
11442        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_taxonomy`.
11443        pub fn poller(
11444            self,
11445        ) -> impl google_cloud_lro::Poller<crate::model::DataTaxonomy, crate::model::OperationMetadata>
11446        {
11447            type Operation = google_cloud_lro::internal::Operation<
11448                crate::model::DataTaxonomy,
11449                crate::model::OperationMetadata,
11450            >;
11451            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11452            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11453
11454            let stub = self.0.stub.clone();
11455            let mut options = self.0.options.clone();
11456            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
11457            let query = move |name| {
11458                let stub = stub.clone();
11459                let options = options.clone();
11460                async {
11461                    let op = GetOperation::new(stub)
11462                        .set_name(name)
11463                        .with_options(options)
11464                        .send()
11465                        .await?;
11466                    Ok(Operation::new(op))
11467                }
11468            };
11469
11470            let start = move || async {
11471                let op = self.send().await?;
11472                Ok(Operation::new(op))
11473            };
11474
11475            google_cloud_lro::internal::new_poller(
11476                polling_error_policy,
11477                polling_backoff_policy,
11478                start,
11479                query,
11480            )
11481        }
11482
11483        /// Sets the value of [parent][crate::model::CreateDataTaxonomyRequest::parent].
11484        ///
11485        /// This is a **required** field for requests.
11486        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
11487            self.0.request.parent = v.into();
11488            self
11489        }
11490
11491        /// Sets the value of [data_taxonomy_id][crate::model::CreateDataTaxonomyRequest::data_taxonomy_id].
11492        ///
11493        /// This is a **required** field for requests.
11494        pub fn set_data_taxonomy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
11495            self.0.request.data_taxonomy_id = v.into();
11496            self
11497        }
11498
11499        /// Sets the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
11500        ///
11501        /// This is a **required** field for requests.
11502        pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
11503        where
11504            T: std::convert::Into<crate::model::DataTaxonomy>,
11505        {
11506            self.0.request.data_taxonomy = std::option::Option::Some(v.into());
11507            self
11508        }
11509
11510        /// Sets or clears the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
11511        ///
11512        /// This is a **required** field for requests.
11513        pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
11514        where
11515            T: std::convert::Into<crate::model::DataTaxonomy>,
11516        {
11517            self.0.request.data_taxonomy = v.map(|x| x.into());
11518            self
11519        }
11520
11521        /// Sets the value of [validate_only][crate::model::CreateDataTaxonomyRequest::validate_only].
11522        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
11523            self.0.request.validate_only = v.into();
11524            self
11525        }
11526    }
11527
11528    #[doc(hidden)]
11529    impl crate::RequestBuilder for CreateDataTaxonomy {
11530        fn request_options(&mut self) -> &mut crate::RequestOptions {
11531            &mut self.0.options
11532        }
11533    }
11534
11535    /// The request builder for [DataTaxonomyService::update_data_taxonomy][crate::client::DataTaxonomyService::update_data_taxonomy] calls.
11536    ///
11537    /// # Example
11538    /// ```
11539    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::UpdateDataTaxonomy;
11540    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11541    /// use google_cloud_lro::Poller;
11542    ///
11543    /// let builder = prepare_request_builder();
11544    /// let response = builder.poller().until_done().await?;
11545    /// # Ok(()) }
11546    ///
11547    /// fn prepare_request_builder() -> UpdateDataTaxonomy {
11548    ///   # panic!();
11549    ///   // ... details omitted ...
11550    /// }
11551    /// ```
11552    #[derive(Clone, Debug)]
11553    pub struct UpdateDataTaxonomy(RequestBuilder<crate::model::UpdateDataTaxonomyRequest>);
11554
11555    impl UpdateDataTaxonomy {
11556        pub(crate) fn new(
11557            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11558        ) -> Self {
11559            Self(RequestBuilder::new(stub))
11560        }
11561
11562        /// Sets the full request, replacing any prior values.
11563        pub fn with_request<V: Into<crate::model::UpdateDataTaxonomyRequest>>(
11564            mut self,
11565            v: V,
11566        ) -> Self {
11567            self.0.request = v.into();
11568            self
11569        }
11570
11571        /// Sets all the options, replacing any prior values.
11572        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11573            self.0.options = v.into();
11574            self
11575        }
11576
11577        /// Sends the request.
11578        ///
11579        /// # Long running operations
11580        ///
11581        /// This starts, but does not poll, a longrunning operation. More information
11582        /// on [update_data_taxonomy][crate::client::DataTaxonomyService::update_data_taxonomy].
11583        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11584            (*self.0.stub)
11585                .update_data_taxonomy(self.0.request, self.0.options)
11586                .await
11587                .map(crate::Response::into_body)
11588        }
11589
11590        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_taxonomy`.
11591        pub fn poller(
11592            self,
11593        ) -> impl google_cloud_lro::Poller<crate::model::DataTaxonomy, crate::model::OperationMetadata>
11594        {
11595            type Operation = google_cloud_lro::internal::Operation<
11596                crate::model::DataTaxonomy,
11597                crate::model::OperationMetadata,
11598            >;
11599            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11600            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11601
11602            let stub = self.0.stub.clone();
11603            let mut options = self.0.options.clone();
11604            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
11605            let query = move |name| {
11606                let stub = stub.clone();
11607                let options = options.clone();
11608                async {
11609                    let op = GetOperation::new(stub)
11610                        .set_name(name)
11611                        .with_options(options)
11612                        .send()
11613                        .await?;
11614                    Ok(Operation::new(op))
11615                }
11616            };
11617
11618            let start = move || async {
11619                let op = self.send().await?;
11620                Ok(Operation::new(op))
11621            };
11622
11623            google_cloud_lro::internal::new_poller(
11624                polling_error_policy,
11625                polling_backoff_policy,
11626                start,
11627                query,
11628            )
11629        }
11630
11631        /// Sets the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
11632        ///
11633        /// This is a **required** field for requests.
11634        pub fn set_update_mask<T>(mut self, v: T) -> Self
11635        where
11636            T: std::convert::Into<wkt::FieldMask>,
11637        {
11638            self.0.request.update_mask = std::option::Option::Some(v.into());
11639            self
11640        }
11641
11642        /// Sets or clears the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
11643        ///
11644        /// This is a **required** field for requests.
11645        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
11646        where
11647            T: std::convert::Into<wkt::FieldMask>,
11648        {
11649            self.0.request.update_mask = v.map(|x| x.into());
11650            self
11651        }
11652
11653        /// Sets the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
11654        ///
11655        /// This is a **required** field for requests.
11656        pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
11657        where
11658            T: std::convert::Into<crate::model::DataTaxonomy>,
11659        {
11660            self.0.request.data_taxonomy = std::option::Option::Some(v.into());
11661            self
11662        }
11663
11664        /// Sets or clears the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
11665        ///
11666        /// This is a **required** field for requests.
11667        pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
11668        where
11669            T: std::convert::Into<crate::model::DataTaxonomy>,
11670        {
11671            self.0.request.data_taxonomy = v.map(|x| x.into());
11672            self
11673        }
11674
11675        /// Sets the value of [validate_only][crate::model::UpdateDataTaxonomyRequest::validate_only].
11676        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
11677            self.0.request.validate_only = v.into();
11678            self
11679        }
11680    }
11681
11682    #[doc(hidden)]
11683    impl crate::RequestBuilder for UpdateDataTaxonomy {
11684        fn request_options(&mut self) -> &mut crate::RequestOptions {
11685            &mut self.0.options
11686        }
11687    }
11688
11689    /// The request builder for [DataTaxonomyService::delete_data_taxonomy][crate::client::DataTaxonomyService::delete_data_taxonomy] calls.
11690    ///
11691    /// # Example
11692    /// ```
11693    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteDataTaxonomy;
11694    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11695    /// use google_cloud_lro::Poller;
11696    ///
11697    /// let builder = prepare_request_builder();
11698    /// let response = builder.poller().until_done().await?;
11699    /// # Ok(()) }
11700    ///
11701    /// fn prepare_request_builder() -> DeleteDataTaxonomy {
11702    ///   # panic!();
11703    ///   // ... details omitted ...
11704    /// }
11705    /// ```
11706    #[derive(Clone, Debug)]
11707    pub struct DeleteDataTaxonomy(RequestBuilder<crate::model::DeleteDataTaxonomyRequest>);
11708
11709    impl DeleteDataTaxonomy {
11710        pub(crate) fn new(
11711            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11712        ) -> Self {
11713            Self(RequestBuilder::new(stub))
11714        }
11715
11716        /// Sets the full request, replacing any prior values.
11717        pub fn with_request<V: Into<crate::model::DeleteDataTaxonomyRequest>>(
11718            mut self,
11719            v: V,
11720        ) -> Self {
11721            self.0.request = v.into();
11722            self
11723        }
11724
11725        /// Sets all the options, replacing any prior values.
11726        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11727            self.0.options = v.into();
11728            self
11729        }
11730
11731        /// Sends the request.
11732        ///
11733        /// # Long running operations
11734        ///
11735        /// This starts, but does not poll, a longrunning operation. More information
11736        /// on [delete_data_taxonomy][crate::client::DataTaxonomyService::delete_data_taxonomy].
11737        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11738            (*self.0.stub)
11739                .delete_data_taxonomy(self.0.request, self.0.options)
11740                .await
11741                .map(crate::Response::into_body)
11742        }
11743
11744        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_taxonomy`.
11745        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
11746            type Operation =
11747                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
11748            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11749            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11750
11751            let stub = self.0.stub.clone();
11752            let mut options = self.0.options.clone();
11753            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
11754            let query = move |name| {
11755                let stub = stub.clone();
11756                let options = options.clone();
11757                async {
11758                    let op = GetOperation::new(stub)
11759                        .set_name(name)
11760                        .with_options(options)
11761                        .send()
11762                        .await?;
11763                    Ok(Operation::new(op))
11764                }
11765            };
11766
11767            let start = move || async {
11768                let op = self.send().await?;
11769                Ok(Operation::new(op))
11770            };
11771
11772            google_cloud_lro::internal::new_unit_response_poller(
11773                polling_error_policy,
11774                polling_backoff_policy,
11775                start,
11776                query,
11777            )
11778        }
11779
11780        /// Sets the value of [name][crate::model::DeleteDataTaxonomyRequest::name].
11781        ///
11782        /// This is a **required** field for requests.
11783        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11784            self.0.request.name = v.into();
11785            self
11786        }
11787
11788        /// Sets the value of [etag][crate::model::DeleteDataTaxonomyRequest::etag].
11789        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
11790            self.0.request.etag = v.into();
11791            self
11792        }
11793    }
11794
11795    #[doc(hidden)]
11796    impl crate::RequestBuilder for DeleteDataTaxonomy {
11797        fn request_options(&mut self) -> &mut crate::RequestOptions {
11798            &mut self.0.options
11799        }
11800    }
11801
11802    /// The request builder for [DataTaxonomyService::list_data_taxonomies][crate::client::DataTaxonomyService::list_data_taxonomies] calls.
11803    ///
11804    /// # Example
11805    /// ```
11806    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListDataTaxonomies;
11807    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11808    /// use google_cloud_gax::paginator::ItemPaginator;
11809    ///
11810    /// let builder = prepare_request_builder();
11811    /// let mut items = builder.by_item();
11812    /// while let Some(result) = items.next().await {
11813    ///   let item = result?;
11814    /// }
11815    /// # Ok(()) }
11816    ///
11817    /// fn prepare_request_builder() -> ListDataTaxonomies {
11818    ///   # panic!();
11819    ///   // ... details omitted ...
11820    /// }
11821    /// ```
11822    #[derive(Clone, Debug)]
11823    pub struct ListDataTaxonomies(RequestBuilder<crate::model::ListDataTaxonomiesRequest>);
11824
11825    impl ListDataTaxonomies {
11826        pub(crate) fn new(
11827            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11828        ) -> Self {
11829            Self(RequestBuilder::new(stub))
11830        }
11831
11832        /// Sets the full request, replacing any prior values.
11833        pub fn with_request<V: Into<crate::model::ListDataTaxonomiesRequest>>(
11834            mut self,
11835            v: V,
11836        ) -> Self {
11837            self.0.request = v.into();
11838            self
11839        }
11840
11841        /// Sets all the options, replacing any prior values.
11842        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11843            self.0.options = v.into();
11844            self
11845        }
11846
11847        /// Sends the request.
11848        pub async fn send(self) -> Result<crate::model::ListDataTaxonomiesResponse> {
11849            (*self.0.stub)
11850                .list_data_taxonomies(self.0.request, self.0.options)
11851                .await
11852                .map(crate::Response::into_body)
11853        }
11854
11855        /// Streams each page in the collection.
11856        pub fn by_page(
11857            self,
11858        ) -> impl google_cloud_gax::paginator::Paginator<
11859            crate::model::ListDataTaxonomiesResponse,
11860            crate::Error,
11861        > {
11862            use std::clone::Clone;
11863            let token = self.0.request.page_token.clone();
11864            let execute = move |token: String| {
11865                let mut builder = self.clone();
11866                builder.0.request = builder.0.request.set_page_token(token);
11867                builder.send()
11868            };
11869            google_cloud_gax::paginator::internal::new_paginator(token, execute)
11870        }
11871
11872        /// Streams each item in the collection.
11873        pub fn by_item(
11874            self,
11875        ) -> impl google_cloud_gax::paginator::ItemPaginator<
11876            crate::model::ListDataTaxonomiesResponse,
11877            crate::Error,
11878        > {
11879            use google_cloud_gax::paginator::Paginator;
11880            self.by_page().items()
11881        }
11882
11883        /// Sets the value of [parent][crate::model::ListDataTaxonomiesRequest::parent].
11884        ///
11885        /// This is a **required** field for requests.
11886        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
11887            self.0.request.parent = v.into();
11888            self
11889        }
11890
11891        /// Sets the value of [page_size][crate::model::ListDataTaxonomiesRequest::page_size].
11892        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
11893            self.0.request.page_size = v.into();
11894            self
11895        }
11896
11897        /// Sets the value of [page_token][crate::model::ListDataTaxonomiesRequest::page_token].
11898        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
11899            self.0.request.page_token = v.into();
11900            self
11901        }
11902
11903        /// Sets the value of [filter][crate::model::ListDataTaxonomiesRequest::filter].
11904        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
11905            self.0.request.filter = v.into();
11906            self
11907        }
11908
11909        /// Sets the value of [order_by][crate::model::ListDataTaxonomiesRequest::order_by].
11910        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
11911            self.0.request.order_by = v.into();
11912            self
11913        }
11914    }
11915
11916    #[doc(hidden)]
11917    impl crate::RequestBuilder for ListDataTaxonomies {
11918        fn request_options(&mut self) -> &mut crate::RequestOptions {
11919            &mut self.0.options
11920        }
11921    }
11922
11923    /// The request builder for [DataTaxonomyService::get_data_taxonomy][crate::client::DataTaxonomyService::get_data_taxonomy] calls.
11924    ///
11925    /// # Example
11926    /// ```
11927    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetDataTaxonomy;
11928    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11929    ///
11930    /// let builder = prepare_request_builder();
11931    /// let response = builder.send().await?;
11932    /// # Ok(()) }
11933    ///
11934    /// fn prepare_request_builder() -> GetDataTaxonomy {
11935    ///   # panic!();
11936    ///   // ... details omitted ...
11937    /// }
11938    /// ```
11939    #[derive(Clone, Debug)]
11940    pub struct GetDataTaxonomy(RequestBuilder<crate::model::GetDataTaxonomyRequest>);
11941
11942    impl GetDataTaxonomy {
11943        pub(crate) fn new(
11944            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11945        ) -> Self {
11946            Self(RequestBuilder::new(stub))
11947        }
11948
11949        /// Sets the full request, replacing any prior values.
11950        pub fn with_request<V: Into<crate::model::GetDataTaxonomyRequest>>(mut self, v: V) -> Self {
11951            self.0.request = v.into();
11952            self
11953        }
11954
11955        /// Sets all the options, replacing any prior values.
11956        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11957            self.0.options = v.into();
11958            self
11959        }
11960
11961        /// Sends the request.
11962        pub async fn send(self) -> Result<crate::model::DataTaxonomy> {
11963            (*self.0.stub)
11964                .get_data_taxonomy(self.0.request, self.0.options)
11965                .await
11966                .map(crate::Response::into_body)
11967        }
11968
11969        /// Sets the value of [name][crate::model::GetDataTaxonomyRequest::name].
11970        ///
11971        /// This is a **required** field for requests.
11972        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11973            self.0.request.name = v.into();
11974            self
11975        }
11976    }
11977
11978    #[doc(hidden)]
11979    impl crate::RequestBuilder for GetDataTaxonomy {
11980        fn request_options(&mut self) -> &mut crate::RequestOptions {
11981            &mut self.0.options
11982        }
11983    }
11984
11985    /// The request builder for [DataTaxonomyService::create_data_attribute_binding][crate::client::DataTaxonomyService::create_data_attribute_binding] calls.
11986    ///
11987    /// # Example
11988    /// ```
11989    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CreateDataAttributeBinding;
11990    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11991    /// use google_cloud_lro::Poller;
11992    ///
11993    /// let builder = prepare_request_builder();
11994    /// let response = builder.poller().until_done().await?;
11995    /// # Ok(()) }
11996    ///
11997    /// fn prepare_request_builder() -> CreateDataAttributeBinding {
11998    ///   # panic!();
11999    ///   // ... details omitted ...
12000    /// }
12001    /// ```
12002    #[derive(Clone, Debug)]
12003    pub struct CreateDataAttributeBinding(
12004        RequestBuilder<crate::model::CreateDataAttributeBindingRequest>,
12005    );
12006
12007    impl CreateDataAttributeBinding {
12008        pub(crate) fn new(
12009            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12010        ) -> Self {
12011            Self(RequestBuilder::new(stub))
12012        }
12013
12014        /// Sets the full request, replacing any prior values.
12015        pub fn with_request<V: Into<crate::model::CreateDataAttributeBindingRequest>>(
12016            mut self,
12017            v: V,
12018        ) -> Self {
12019            self.0.request = v.into();
12020            self
12021        }
12022
12023        /// Sets all the options, replacing any prior values.
12024        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12025            self.0.options = v.into();
12026            self
12027        }
12028
12029        /// Sends the request.
12030        ///
12031        /// # Long running operations
12032        ///
12033        /// This starts, but does not poll, a longrunning operation. More information
12034        /// on [create_data_attribute_binding][crate::client::DataTaxonomyService::create_data_attribute_binding].
12035        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12036            (*self.0.stub)
12037                .create_data_attribute_binding(self.0.request, self.0.options)
12038                .await
12039                .map(crate::Response::into_body)
12040        }
12041
12042        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_attribute_binding`.
12043        pub fn poller(
12044            self,
12045        ) -> impl google_cloud_lro::Poller<
12046            crate::model::DataAttributeBinding,
12047            crate::model::OperationMetadata,
12048        > {
12049            type Operation = google_cloud_lro::internal::Operation<
12050                crate::model::DataAttributeBinding,
12051                crate::model::OperationMetadata,
12052            >;
12053            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12054            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12055
12056            let stub = self.0.stub.clone();
12057            let mut options = self.0.options.clone();
12058            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12059            let query = move |name| {
12060                let stub = stub.clone();
12061                let options = options.clone();
12062                async {
12063                    let op = GetOperation::new(stub)
12064                        .set_name(name)
12065                        .with_options(options)
12066                        .send()
12067                        .await?;
12068                    Ok(Operation::new(op))
12069                }
12070            };
12071
12072            let start = move || async {
12073                let op = self.send().await?;
12074                Ok(Operation::new(op))
12075            };
12076
12077            google_cloud_lro::internal::new_poller(
12078                polling_error_policy,
12079                polling_backoff_policy,
12080                start,
12081                query,
12082            )
12083        }
12084
12085        /// Sets the value of [parent][crate::model::CreateDataAttributeBindingRequest::parent].
12086        ///
12087        /// This is a **required** field for requests.
12088        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12089            self.0.request.parent = v.into();
12090            self
12091        }
12092
12093        /// Sets the value of [data_attribute_binding_id][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding_id].
12094        ///
12095        /// This is a **required** field for requests.
12096        pub fn set_data_attribute_binding_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
12097            self.0.request.data_attribute_binding_id = v.into();
12098            self
12099        }
12100
12101        /// Sets the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
12102        ///
12103        /// This is a **required** field for requests.
12104        pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
12105        where
12106            T: std::convert::Into<crate::model::DataAttributeBinding>,
12107        {
12108            self.0.request.data_attribute_binding = std::option::Option::Some(v.into());
12109            self
12110        }
12111
12112        /// Sets or clears the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
12113        ///
12114        /// This is a **required** field for requests.
12115        pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
12116        where
12117            T: std::convert::Into<crate::model::DataAttributeBinding>,
12118        {
12119            self.0.request.data_attribute_binding = v.map(|x| x.into());
12120            self
12121        }
12122
12123        /// Sets the value of [validate_only][crate::model::CreateDataAttributeBindingRequest::validate_only].
12124        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12125            self.0.request.validate_only = v.into();
12126            self
12127        }
12128    }
12129
12130    #[doc(hidden)]
12131    impl crate::RequestBuilder for CreateDataAttributeBinding {
12132        fn request_options(&mut self) -> &mut crate::RequestOptions {
12133            &mut self.0.options
12134        }
12135    }
12136
12137    /// The request builder for [DataTaxonomyService::update_data_attribute_binding][crate::client::DataTaxonomyService::update_data_attribute_binding] calls.
12138    ///
12139    /// # Example
12140    /// ```
12141    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::UpdateDataAttributeBinding;
12142    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12143    /// use google_cloud_lro::Poller;
12144    ///
12145    /// let builder = prepare_request_builder();
12146    /// let response = builder.poller().until_done().await?;
12147    /// # Ok(()) }
12148    ///
12149    /// fn prepare_request_builder() -> UpdateDataAttributeBinding {
12150    ///   # panic!();
12151    ///   // ... details omitted ...
12152    /// }
12153    /// ```
12154    #[derive(Clone, Debug)]
12155    pub struct UpdateDataAttributeBinding(
12156        RequestBuilder<crate::model::UpdateDataAttributeBindingRequest>,
12157    );
12158
12159    impl UpdateDataAttributeBinding {
12160        pub(crate) fn new(
12161            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12162        ) -> Self {
12163            Self(RequestBuilder::new(stub))
12164        }
12165
12166        /// Sets the full request, replacing any prior values.
12167        pub fn with_request<V: Into<crate::model::UpdateDataAttributeBindingRequest>>(
12168            mut self,
12169            v: V,
12170        ) -> Self {
12171            self.0.request = v.into();
12172            self
12173        }
12174
12175        /// Sets all the options, replacing any prior values.
12176        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12177            self.0.options = v.into();
12178            self
12179        }
12180
12181        /// Sends the request.
12182        ///
12183        /// # Long running operations
12184        ///
12185        /// This starts, but does not poll, a longrunning operation. More information
12186        /// on [update_data_attribute_binding][crate::client::DataTaxonomyService::update_data_attribute_binding].
12187        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12188            (*self.0.stub)
12189                .update_data_attribute_binding(self.0.request, self.0.options)
12190                .await
12191                .map(crate::Response::into_body)
12192        }
12193
12194        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_attribute_binding`.
12195        pub fn poller(
12196            self,
12197        ) -> impl google_cloud_lro::Poller<
12198            crate::model::DataAttributeBinding,
12199            crate::model::OperationMetadata,
12200        > {
12201            type Operation = google_cloud_lro::internal::Operation<
12202                crate::model::DataAttributeBinding,
12203                crate::model::OperationMetadata,
12204            >;
12205            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12206            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12207
12208            let stub = self.0.stub.clone();
12209            let mut options = self.0.options.clone();
12210            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12211            let query = move |name| {
12212                let stub = stub.clone();
12213                let options = options.clone();
12214                async {
12215                    let op = GetOperation::new(stub)
12216                        .set_name(name)
12217                        .with_options(options)
12218                        .send()
12219                        .await?;
12220                    Ok(Operation::new(op))
12221                }
12222            };
12223
12224            let start = move || async {
12225                let op = self.send().await?;
12226                Ok(Operation::new(op))
12227            };
12228
12229            google_cloud_lro::internal::new_poller(
12230                polling_error_policy,
12231                polling_backoff_policy,
12232                start,
12233                query,
12234            )
12235        }
12236
12237        /// Sets the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
12238        ///
12239        /// This is a **required** field for requests.
12240        pub fn set_update_mask<T>(mut self, v: T) -> Self
12241        where
12242            T: std::convert::Into<wkt::FieldMask>,
12243        {
12244            self.0.request.update_mask = std::option::Option::Some(v.into());
12245            self
12246        }
12247
12248        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
12249        ///
12250        /// This is a **required** field for requests.
12251        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
12252        where
12253            T: std::convert::Into<wkt::FieldMask>,
12254        {
12255            self.0.request.update_mask = v.map(|x| x.into());
12256            self
12257        }
12258
12259        /// Sets the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
12260        ///
12261        /// This is a **required** field for requests.
12262        pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
12263        where
12264            T: std::convert::Into<crate::model::DataAttributeBinding>,
12265        {
12266            self.0.request.data_attribute_binding = std::option::Option::Some(v.into());
12267            self
12268        }
12269
12270        /// Sets or clears the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
12271        ///
12272        /// This is a **required** field for requests.
12273        pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
12274        where
12275            T: std::convert::Into<crate::model::DataAttributeBinding>,
12276        {
12277            self.0.request.data_attribute_binding = v.map(|x| x.into());
12278            self
12279        }
12280
12281        /// Sets the value of [validate_only][crate::model::UpdateDataAttributeBindingRequest::validate_only].
12282        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12283            self.0.request.validate_only = v.into();
12284            self
12285        }
12286    }
12287
12288    #[doc(hidden)]
12289    impl crate::RequestBuilder for UpdateDataAttributeBinding {
12290        fn request_options(&mut self) -> &mut crate::RequestOptions {
12291            &mut self.0.options
12292        }
12293    }
12294
12295    /// The request builder for [DataTaxonomyService::delete_data_attribute_binding][crate::client::DataTaxonomyService::delete_data_attribute_binding] calls.
12296    ///
12297    /// # Example
12298    /// ```
12299    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteDataAttributeBinding;
12300    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12301    /// use google_cloud_lro::Poller;
12302    ///
12303    /// let builder = prepare_request_builder();
12304    /// let response = builder.poller().until_done().await?;
12305    /// # Ok(()) }
12306    ///
12307    /// fn prepare_request_builder() -> DeleteDataAttributeBinding {
12308    ///   # panic!();
12309    ///   // ... details omitted ...
12310    /// }
12311    /// ```
12312    #[derive(Clone, Debug)]
12313    pub struct DeleteDataAttributeBinding(
12314        RequestBuilder<crate::model::DeleteDataAttributeBindingRequest>,
12315    );
12316
12317    impl DeleteDataAttributeBinding {
12318        pub(crate) fn new(
12319            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12320        ) -> Self {
12321            Self(RequestBuilder::new(stub))
12322        }
12323
12324        /// Sets the full request, replacing any prior values.
12325        pub fn with_request<V: Into<crate::model::DeleteDataAttributeBindingRequest>>(
12326            mut self,
12327            v: V,
12328        ) -> Self {
12329            self.0.request = v.into();
12330            self
12331        }
12332
12333        /// Sets all the options, replacing any prior values.
12334        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12335            self.0.options = v.into();
12336            self
12337        }
12338
12339        /// Sends the request.
12340        ///
12341        /// # Long running operations
12342        ///
12343        /// This starts, but does not poll, a longrunning operation. More information
12344        /// on [delete_data_attribute_binding][crate::client::DataTaxonomyService::delete_data_attribute_binding].
12345        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12346            (*self.0.stub)
12347                .delete_data_attribute_binding(self.0.request, self.0.options)
12348                .await
12349                .map(crate::Response::into_body)
12350        }
12351
12352        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_attribute_binding`.
12353        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
12354            type Operation =
12355                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
12356            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12357            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12358
12359            let stub = self.0.stub.clone();
12360            let mut options = self.0.options.clone();
12361            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12362            let query = move |name| {
12363                let stub = stub.clone();
12364                let options = options.clone();
12365                async {
12366                    let op = GetOperation::new(stub)
12367                        .set_name(name)
12368                        .with_options(options)
12369                        .send()
12370                        .await?;
12371                    Ok(Operation::new(op))
12372                }
12373            };
12374
12375            let start = move || async {
12376                let op = self.send().await?;
12377                Ok(Operation::new(op))
12378            };
12379
12380            google_cloud_lro::internal::new_unit_response_poller(
12381                polling_error_policy,
12382                polling_backoff_policy,
12383                start,
12384                query,
12385            )
12386        }
12387
12388        /// Sets the value of [name][crate::model::DeleteDataAttributeBindingRequest::name].
12389        ///
12390        /// This is a **required** field for requests.
12391        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12392            self.0.request.name = v.into();
12393            self
12394        }
12395
12396        /// Sets the value of [etag][crate::model::DeleteDataAttributeBindingRequest::etag].
12397        ///
12398        /// This is a **required** field for requests.
12399        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
12400            self.0.request.etag = v.into();
12401            self
12402        }
12403    }
12404
12405    #[doc(hidden)]
12406    impl crate::RequestBuilder for DeleteDataAttributeBinding {
12407        fn request_options(&mut self) -> &mut crate::RequestOptions {
12408            &mut self.0.options
12409        }
12410    }
12411
12412    /// The request builder for [DataTaxonomyService::list_data_attribute_bindings][crate::client::DataTaxonomyService::list_data_attribute_bindings] calls.
12413    ///
12414    /// # Example
12415    /// ```
12416    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListDataAttributeBindings;
12417    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12418    /// use google_cloud_gax::paginator::ItemPaginator;
12419    ///
12420    /// let builder = prepare_request_builder();
12421    /// let mut items = builder.by_item();
12422    /// while let Some(result) = items.next().await {
12423    ///   let item = result?;
12424    /// }
12425    /// # Ok(()) }
12426    ///
12427    /// fn prepare_request_builder() -> ListDataAttributeBindings {
12428    ///   # panic!();
12429    ///   // ... details omitted ...
12430    /// }
12431    /// ```
12432    #[derive(Clone, Debug)]
12433    pub struct ListDataAttributeBindings(
12434        RequestBuilder<crate::model::ListDataAttributeBindingsRequest>,
12435    );
12436
12437    impl ListDataAttributeBindings {
12438        pub(crate) fn new(
12439            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12440        ) -> Self {
12441            Self(RequestBuilder::new(stub))
12442        }
12443
12444        /// Sets the full request, replacing any prior values.
12445        pub fn with_request<V: Into<crate::model::ListDataAttributeBindingsRequest>>(
12446            mut self,
12447            v: V,
12448        ) -> Self {
12449            self.0.request = v.into();
12450            self
12451        }
12452
12453        /// Sets all the options, replacing any prior values.
12454        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12455            self.0.options = v.into();
12456            self
12457        }
12458
12459        /// Sends the request.
12460        pub async fn send(self) -> Result<crate::model::ListDataAttributeBindingsResponse> {
12461            (*self.0.stub)
12462                .list_data_attribute_bindings(self.0.request, self.0.options)
12463                .await
12464                .map(crate::Response::into_body)
12465        }
12466
12467        /// Streams each page in the collection.
12468        pub fn by_page(
12469            self,
12470        ) -> impl google_cloud_gax::paginator::Paginator<
12471            crate::model::ListDataAttributeBindingsResponse,
12472            crate::Error,
12473        > {
12474            use std::clone::Clone;
12475            let token = self.0.request.page_token.clone();
12476            let execute = move |token: String| {
12477                let mut builder = self.clone();
12478                builder.0.request = builder.0.request.set_page_token(token);
12479                builder.send()
12480            };
12481            google_cloud_gax::paginator::internal::new_paginator(token, execute)
12482        }
12483
12484        /// Streams each item in the collection.
12485        pub fn by_item(
12486            self,
12487        ) -> impl google_cloud_gax::paginator::ItemPaginator<
12488            crate::model::ListDataAttributeBindingsResponse,
12489            crate::Error,
12490        > {
12491            use google_cloud_gax::paginator::Paginator;
12492            self.by_page().items()
12493        }
12494
12495        /// Sets the value of [parent][crate::model::ListDataAttributeBindingsRequest::parent].
12496        ///
12497        /// This is a **required** field for requests.
12498        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12499            self.0.request.parent = v.into();
12500            self
12501        }
12502
12503        /// Sets the value of [page_size][crate::model::ListDataAttributeBindingsRequest::page_size].
12504        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12505            self.0.request.page_size = v.into();
12506            self
12507        }
12508
12509        /// Sets the value of [page_token][crate::model::ListDataAttributeBindingsRequest::page_token].
12510        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12511            self.0.request.page_token = v.into();
12512            self
12513        }
12514
12515        /// Sets the value of [filter][crate::model::ListDataAttributeBindingsRequest::filter].
12516        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12517            self.0.request.filter = v.into();
12518            self
12519        }
12520
12521        /// Sets the value of [order_by][crate::model::ListDataAttributeBindingsRequest::order_by].
12522        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
12523            self.0.request.order_by = v.into();
12524            self
12525        }
12526    }
12527
12528    #[doc(hidden)]
12529    impl crate::RequestBuilder for ListDataAttributeBindings {
12530        fn request_options(&mut self) -> &mut crate::RequestOptions {
12531            &mut self.0.options
12532        }
12533    }
12534
12535    /// The request builder for [DataTaxonomyService::get_data_attribute_binding][crate::client::DataTaxonomyService::get_data_attribute_binding] calls.
12536    ///
12537    /// # Example
12538    /// ```
12539    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetDataAttributeBinding;
12540    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12541    ///
12542    /// let builder = prepare_request_builder();
12543    /// let response = builder.send().await?;
12544    /// # Ok(()) }
12545    ///
12546    /// fn prepare_request_builder() -> GetDataAttributeBinding {
12547    ///   # panic!();
12548    ///   // ... details omitted ...
12549    /// }
12550    /// ```
12551    #[derive(Clone, Debug)]
12552    pub struct GetDataAttributeBinding(
12553        RequestBuilder<crate::model::GetDataAttributeBindingRequest>,
12554    );
12555
12556    impl GetDataAttributeBinding {
12557        pub(crate) fn new(
12558            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12559        ) -> Self {
12560            Self(RequestBuilder::new(stub))
12561        }
12562
12563        /// Sets the full request, replacing any prior values.
12564        pub fn with_request<V: Into<crate::model::GetDataAttributeBindingRequest>>(
12565            mut self,
12566            v: V,
12567        ) -> Self {
12568            self.0.request = v.into();
12569            self
12570        }
12571
12572        /// Sets all the options, replacing any prior values.
12573        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12574            self.0.options = v.into();
12575            self
12576        }
12577
12578        /// Sends the request.
12579        pub async fn send(self) -> Result<crate::model::DataAttributeBinding> {
12580            (*self.0.stub)
12581                .get_data_attribute_binding(self.0.request, self.0.options)
12582                .await
12583                .map(crate::Response::into_body)
12584        }
12585
12586        /// Sets the value of [name][crate::model::GetDataAttributeBindingRequest::name].
12587        ///
12588        /// This is a **required** field for requests.
12589        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12590            self.0.request.name = v.into();
12591            self
12592        }
12593    }
12594
12595    #[doc(hidden)]
12596    impl crate::RequestBuilder for GetDataAttributeBinding {
12597        fn request_options(&mut self) -> &mut crate::RequestOptions {
12598            &mut self.0.options
12599        }
12600    }
12601
12602    /// The request builder for [DataTaxonomyService::create_data_attribute][crate::client::DataTaxonomyService::create_data_attribute] calls.
12603    ///
12604    /// # Example
12605    /// ```
12606    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CreateDataAttribute;
12607    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12608    /// use google_cloud_lro::Poller;
12609    ///
12610    /// let builder = prepare_request_builder();
12611    /// let response = builder.poller().until_done().await?;
12612    /// # Ok(()) }
12613    ///
12614    /// fn prepare_request_builder() -> CreateDataAttribute {
12615    ///   # panic!();
12616    ///   // ... details omitted ...
12617    /// }
12618    /// ```
12619    #[derive(Clone, Debug)]
12620    pub struct CreateDataAttribute(RequestBuilder<crate::model::CreateDataAttributeRequest>);
12621
12622    impl CreateDataAttribute {
12623        pub(crate) fn new(
12624            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12625        ) -> Self {
12626            Self(RequestBuilder::new(stub))
12627        }
12628
12629        /// Sets the full request, replacing any prior values.
12630        pub fn with_request<V: Into<crate::model::CreateDataAttributeRequest>>(
12631            mut self,
12632            v: V,
12633        ) -> Self {
12634            self.0.request = v.into();
12635            self
12636        }
12637
12638        /// Sets all the options, replacing any prior values.
12639        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12640            self.0.options = v.into();
12641            self
12642        }
12643
12644        /// Sends the request.
12645        ///
12646        /// # Long running operations
12647        ///
12648        /// This starts, but does not poll, a longrunning operation. More information
12649        /// on [create_data_attribute][crate::client::DataTaxonomyService::create_data_attribute].
12650        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12651            (*self.0.stub)
12652                .create_data_attribute(self.0.request, self.0.options)
12653                .await
12654                .map(crate::Response::into_body)
12655        }
12656
12657        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_attribute`.
12658        pub fn poller(
12659            self,
12660        ) -> impl google_cloud_lro::Poller<crate::model::DataAttribute, crate::model::OperationMetadata>
12661        {
12662            type Operation = google_cloud_lro::internal::Operation<
12663                crate::model::DataAttribute,
12664                crate::model::OperationMetadata,
12665            >;
12666            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12667            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12668
12669            let stub = self.0.stub.clone();
12670            let mut options = self.0.options.clone();
12671            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12672            let query = move |name| {
12673                let stub = stub.clone();
12674                let options = options.clone();
12675                async {
12676                    let op = GetOperation::new(stub)
12677                        .set_name(name)
12678                        .with_options(options)
12679                        .send()
12680                        .await?;
12681                    Ok(Operation::new(op))
12682                }
12683            };
12684
12685            let start = move || async {
12686                let op = self.send().await?;
12687                Ok(Operation::new(op))
12688            };
12689
12690            google_cloud_lro::internal::new_poller(
12691                polling_error_policy,
12692                polling_backoff_policy,
12693                start,
12694                query,
12695            )
12696        }
12697
12698        /// Sets the value of [parent][crate::model::CreateDataAttributeRequest::parent].
12699        ///
12700        /// This is a **required** field for requests.
12701        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12702            self.0.request.parent = v.into();
12703            self
12704        }
12705
12706        /// Sets the value of [data_attribute_id][crate::model::CreateDataAttributeRequest::data_attribute_id].
12707        ///
12708        /// This is a **required** field for requests.
12709        pub fn set_data_attribute_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
12710            self.0.request.data_attribute_id = v.into();
12711            self
12712        }
12713
12714        /// Sets the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
12715        ///
12716        /// This is a **required** field for requests.
12717        pub fn set_data_attribute<T>(mut self, v: T) -> Self
12718        where
12719            T: std::convert::Into<crate::model::DataAttribute>,
12720        {
12721            self.0.request.data_attribute = std::option::Option::Some(v.into());
12722            self
12723        }
12724
12725        /// Sets or clears the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
12726        ///
12727        /// This is a **required** field for requests.
12728        pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
12729        where
12730            T: std::convert::Into<crate::model::DataAttribute>,
12731        {
12732            self.0.request.data_attribute = v.map(|x| x.into());
12733            self
12734        }
12735
12736        /// Sets the value of [validate_only][crate::model::CreateDataAttributeRequest::validate_only].
12737        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12738            self.0.request.validate_only = v.into();
12739            self
12740        }
12741    }
12742
12743    #[doc(hidden)]
12744    impl crate::RequestBuilder for CreateDataAttribute {
12745        fn request_options(&mut self) -> &mut crate::RequestOptions {
12746            &mut self.0.options
12747        }
12748    }
12749
12750    /// The request builder for [DataTaxonomyService::update_data_attribute][crate::client::DataTaxonomyService::update_data_attribute] calls.
12751    ///
12752    /// # Example
12753    /// ```
12754    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::UpdateDataAttribute;
12755    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12756    /// use google_cloud_lro::Poller;
12757    ///
12758    /// let builder = prepare_request_builder();
12759    /// let response = builder.poller().until_done().await?;
12760    /// # Ok(()) }
12761    ///
12762    /// fn prepare_request_builder() -> UpdateDataAttribute {
12763    ///   # panic!();
12764    ///   // ... details omitted ...
12765    /// }
12766    /// ```
12767    #[derive(Clone, Debug)]
12768    pub struct UpdateDataAttribute(RequestBuilder<crate::model::UpdateDataAttributeRequest>);
12769
12770    impl UpdateDataAttribute {
12771        pub(crate) fn new(
12772            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12773        ) -> Self {
12774            Self(RequestBuilder::new(stub))
12775        }
12776
12777        /// Sets the full request, replacing any prior values.
12778        pub fn with_request<V: Into<crate::model::UpdateDataAttributeRequest>>(
12779            mut self,
12780            v: V,
12781        ) -> Self {
12782            self.0.request = v.into();
12783            self
12784        }
12785
12786        /// Sets all the options, replacing any prior values.
12787        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12788            self.0.options = v.into();
12789            self
12790        }
12791
12792        /// Sends the request.
12793        ///
12794        /// # Long running operations
12795        ///
12796        /// This starts, but does not poll, a longrunning operation. More information
12797        /// on [update_data_attribute][crate::client::DataTaxonomyService::update_data_attribute].
12798        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12799            (*self.0.stub)
12800                .update_data_attribute(self.0.request, self.0.options)
12801                .await
12802                .map(crate::Response::into_body)
12803        }
12804
12805        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_attribute`.
12806        pub fn poller(
12807            self,
12808        ) -> impl google_cloud_lro::Poller<crate::model::DataAttribute, crate::model::OperationMetadata>
12809        {
12810            type Operation = google_cloud_lro::internal::Operation<
12811                crate::model::DataAttribute,
12812                crate::model::OperationMetadata,
12813            >;
12814            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12815            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12816
12817            let stub = self.0.stub.clone();
12818            let mut options = self.0.options.clone();
12819            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12820            let query = move |name| {
12821                let stub = stub.clone();
12822                let options = options.clone();
12823                async {
12824                    let op = GetOperation::new(stub)
12825                        .set_name(name)
12826                        .with_options(options)
12827                        .send()
12828                        .await?;
12829                    Ok(Operation::new(op))
12830                }
12831            };
12832
12833            let start = move || async {
12834                let op = self.send().await?;
12835                Ok(Operation::new(op))
12836            };
12837
12838            google_cloud_lro::internal::new_poller(
12839                polling_error_policy,
12840                polling_backoff_policy,
12841                start,
12842                query,
12843            )
12844        }
12845
12846        /// Sets the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
12847        ///
12848        /// This is a **required** field for requests.
12849        pub fn set_update_mask<T>(mut self, v: T) -> Self
12850        where
12851            T: std::convert::Into<wkt::FieldMask>,
12852        {
12853            self.0.request.update_mask = std::option::Option::Some(v.into());
12854            self
12855        }
12856
12857        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
12858        ///
12859        /// This is a **required** field for requests.
12860        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
12861        where
12862            T: std::convert::Into<wkt::FieldMask>,
12863        {
12864            self.0.request.update_mask = v.map(|x| x.into());
12865            self
12866        }
12867
12868        /// Sets the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
12869        ///
12870        /// This is a **required** field for requests.
12871        pub fn set_data_attribute<T>(mut self, v: T) -> Self
12872        where
12873            T: std::convert::Into<crate::model::DataAttribute>,
12874        {
12875            self.0.request.data_attribute = std::option::Option::Some(v.into());
12876            self
12877        }
12878
12879        /// Sets or clears the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
12880        ///
12881        /// This is a **required** field for requests.
12882        pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
12883        where
12884            T: std::convert::Into<crate::model::DataAttribute>,
12885        {
12886            self.0.request.data_attribute = v.map(|x| x.into());
12887            self
12888        }
12889
12890        /// Sets the value of [validate_only][crate::model::UpdateDataAttributeRequest::validate_only].
12891        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12892            self.0.request.validate_only = v.into();
12893            self
12894        }
12895    }
12896
12897    #[doc(hidden)]
12898    impl crate::RequestBuilder for UpdateDataAttribute {
12899        fn request_options(&mut self) -> &mut crate::RequestOptions {
12900            &mut self.0.options
12901        }
12902    }
12903
12904    /// The request builder for [DataTaxonomyService::delete_data_attribute][crate::client::DataTaxonomyService::delete_data_attribute] calls.
12905    ///
12906    /// # Example
12907    /// ```
12908    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteDataAttribute;
12909    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12910    /// use google_cloud_lro::Poller;
12911    ///
12912    /// let builder = prepare_request_builder();
12913    /// let response = builder.poller().until_done().await?;
12914    /// # Ok(()) }
12915    ///
12916    /// fn prepare_request_builder() -> DeleteDataAttribute {
12917    ///   # panic!();
12918    ///   // ... details omitted ...
12919    /// }
12920    /// ```
12921    #[derive(Clone, Debug)]
12922    pub struct DeleteDataAttribute(RequestBuilder<crate::model::DeleteDataAttributeRequest>);
12923
12924    impl DeleteDataAttribute {
12925        pub(crate) fn new(
12926            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12927        ) -> Self {
12928            Self(RequestBuilder::new(stub))
12929        }
12930
12931        /// Sets the full request, replacing any prior values.
12932        pub fn with_request<V: Into<crate::model::DeleteDataAttributeRequest>>(
12933            mut self,
12934            v: V,
12935        ) -> Self {
12936            self.0.request = v.into();
12937            self
12938        }
12939
12940        /// Sets all the options, replacing any prior values.
12941        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12942            self.0.options = v.into();
12943            self
12944        }
12945
12946        /// Sends the request.
12947        ///
12948        /// # Long running operations
12949        ///
12950        /// This starts, but does not poll, a longrunning operation. More information
12951        /// on [delete_data_attribute][crate::client::DataTaxonomyService::delete_data_attribute].
12952        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12953            (*self.0.stub)
12954                .delete_data_attribute(self.0.request, self.0.options)
12955                .await
12956                .map(crate::Response::into_body)
12957        }
12958
12959        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_attribute`.
12960        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
12961            type Operation =
12962                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
12963            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12964            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12965
12966            let stub = self.0.stub.clone();
12967            let mut options = self.0.options.clone();
12968            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12969            let query = move |name| {
12970                let stub = stub.clone();
12971                let options = options.clone();
12972                async {
12973                    let op = GetOperation::new(stub)
12974                        .set_name(name)
12975                        .with_options(options)
12976                        .send()
12977                        .await?;
12978                    Ok(Operation::new(op))
12979                }
12980            };
12981
12982            let start = move || async {
12983                let op = self.send().await?;
12984                Ok(Operation::new(op))
12985            };
12986
12987            google_cloud_lro::internal::new_unit_response_poller(
12988                polling_error_policy,
12989                polling_backoff_policy,
12990                start,
12991                query,
12992            )
12993        }
12994
12995        /// Sets the value of [name][crate::model::DeleteDataAttributeRequest::name].
12996        ///
12997        /// This is a **required** field for requests.
12998        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12999            self.0.request.name = v.into();
13000            self
13001        }
13002
13003        /// Sets the value of [etag][crate::model::DeleteDataAttributeRequest::etag].
13004        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
13005            self.0.request.etag = v.into();
13006            self
13007        }
13008    }
13009
13010    #[doc(hidden)]
13011    impl crate::RequestBuilder for DeleteDataAttribute {
13012        fn request_options(&mut self) -> &mut crate::RequestOptions {
13013            &mut self.0.options
13014        }
13015    }
13016
13017    /// The request builder for [DataTaxonomyService::list_data_attributes][crate::client::DataTaxonomyService::list_data_attributes] calls.
13018    ///
13019    /// # Example
13020    /// ```
13021    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListDataAttributes;
13022    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13023    /// use google_cloud_gax::paginator::ItemPaginator;
13024    ///
13025    /// let builder = prepare_request_builder();
13026    /// let mut items = builder.by_item();
13027    /// while let Some(result) = items.next().await {
13028    ///   let item = result?;
13029    /// }
13030    /// # Ok(()) }
13031    ///
13032    /// fn prepare_request_builder() -> ListDataAttributes {
13033    ///   # panic!();
13034    ///   // ... details omitted ...
13035    /// }
13036    /// ```
13037    #[derive(Clone, Debug)]
13038    pub struct ListDataAttributes(RequestBuilder<crate::model::ListDataAttributesRequest>);
13039
13040    impl ListDataAttributes {
13041        pub(crate) fn new(
13042            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13043        ) -> Self {
13044            Self(RequestBuilder::new(stub))
13045        }
13046
13047        /// Sets the full request, replacing any prior values.
13048        pub fn with_request<V: Into<crate::model::ListDataAttributesRequest>>(
13049            mut self,
13050            v: V,
13051        ) -> Self {
13052            self.0.request = v.into();
13053            self
13054        }
13055
13056        /// Sets all the options, replacing any prior values.
13057        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13058            self.0.options = v.into();
13059            self
13060        }
13061
13062        /// Sends the request.
13063        pub async fn send(self) -> Result<crate::model::ListDataAttributesResponse> {
13064            (*self.0.stub)
13065                .list_data_attributes(self.0.request, self.0.options)
13066                .await
13067                .map(crate::Response::into_body)
13068        }
13069
13070        /// Streams each page in the collection.
13071        pub fn by_page(
13072            self,
13073        ) -> impl google_cloud_gax::paginator::Paginator<
13074            crate::model::ListDataAttributesResponse,
13075            crate::Error,
13076        > {
13077            use std::clone::Clone;
13078            let token = self.0.request.page_token.clone();
13079            let execute = move |token: String| {
13080                let mut builder = self.clone();
13081                builder.0.request = builder.0.request.set_page_token(token);
13082                builder.send()
13083            };
13084            google_cloud_gax::paginator::internal::new_paginator(token, execute)
13085        }
13086
13087        /// Streams each item in the collection.
13088        pub fn by_item(
13089            self,
13090        ) -> impl google_cloud_gax::paginator::ItemPaginator<
13091            crate::model::ListDataAttributesResponse,
13092            crate::Error,
13093        > {
13094            use google_cloud_gax::paginator::Paginator;
13095            self.by_page().items()
13096        }
13097
13098        /// Sets the value of [parent][crate::model::ListDataAttributesRequest::parent].
13099        ///
13100        /// This is a **required** field for requests.
13101        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13102            self.0.request.parent = v.into();
13103            self
13104        }
13105
13106        /// Sets the value of [page_size][crate::model::ListDataAttributesRequest::page_size].
13107        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13108            self.0.request.page_size = v.into();
13109            self
13110        }
13111
13112        /// Sets the value of [page_token][crate::model::ListDataAttributesRequest::page_token].
13113        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13114            self.0.request.page_token = v.into();
13115            self
13116        }
13117
13118        /// Sets the value of [filter][crate::model::ListDataAttributesRequest::filter].
13119        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13120            self.0.request.filter = v.into();
13121            self
13122        }
13123
13124        /// Sets the value of [order_by][crate::model::ListDataAttributesRequest::order_by].
13125        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
13126            self.0.request.order_by = v.into();
13127            self
13128        }
13129    }
13130
13131    #[doc(hidden)]
13132    impl crate::RequestBuilder for ListDataAttributes {
13133        fn request_options(&mut self) -> &mut crate::RequestOptions {
13134            &mut self.0.options
13135        }
13136    }
13137
13138    /// The request builder for [DataTaxonomyService::get_data_attribute][crate::client::DataTaxonomyService::get_data_attribute] calls.
13139    ///
13140    /// # Example
13141    /// ```
13142    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetDataAttribute;
13143    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13144    ///
13145    /// let builder = prepare_request_builder();
13146    /// let response = builder.send().await?;
13147    /// # Ok(()) }
13148    ///
13149    /// fn prepare_request_builder() -> GetDataAttribute {
13150    ///   # panic!();
13151    ///   // ... details omitted ...
13152    /// }
13153    /// ```
13154    #[derive(Clone, Debug)]
13155    pub struct GetDataAttribute(RequestBuilder<crate::model::GetDataAttributeRequest>);
13156
13157    impl GetDataAttribute {
13158        pub(crate) fn new(
13159            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13160        ) -> Self {
13161            Self(RequestBuilder::new(stub))
13162        }
13163
13164        /// Sets the full request, replacing any prior values.
13165        pub fn with_request<V: Into<crate::model::GetDataAttributeRequest>>(
13166            mut self,
13167            v: V,
13168        ) -> Self {
13169            self.0.request = v.into();
13170            self
13171        }
13172
13173        /// Sets all the options, replacing any prior values.
13174        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13175            self.0.options = v.into();
13176            self
13177        }
13178
13179        /// Sends the request.
13180        pub async fn send(self) -> Result<crate::model::DataAttribute> {
13181            (*self.0.stub)
13182                .get_data_attribute(self.0.request, self.0.options)
13183                .await
13184                .map(crate::Response::into_body)
13185        }
13186
13187        /// Sets the value of [name][crate::model::GetDataAttributeRequest::name].
13188        ///
13189        /// This is a **required** field for requests.
13190        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13191            self.0.request.name = v.into();
13192            self
13193        }
13194    }
13195
13196    #[doc(hidden)]
13197    impl crate::RequestBuilder for GetDataAttribute {
13198        fn request_options(&mut self) -> &mut crate::RequestOptions {
13199            &mut self.0.options
13200        }
13201    }
13202
13203    /// The request builder for [DataTaxonomyService::list_locations][crate::client::DataTaxonomyService::list_locations] calls.
13204    ///
13205    /// # Example
13206    /// ```
13207    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListLocations;
13208    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13209    /// use google_cloud_gax::paginator::ItemPaginator;
13210    ///
13211    /// let builder = prepare_request_builder();
13212    /// let mut items = builder.by_item();
13213    /// while let Some(result) = items.next().await {
13214    ///   let item = result?;
13215    /// }
13216    /// # Ok(()) }
13217    ///
13218    /// fn prepare_request_builder() -> ListLocations {
13219    ///   # panic!();
13220    ///   // ... details omitted ...
13221    /// }
13222    /// ```
13223    #[derive(Clone, Debug)]
13224    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
13225
13226    impl ListLocations {
13227        pub(crate) fn new(
13228            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13229        ) -> Self {
13230            Self(RequestBuilder::new(stub))
13231        }
13232
13233        /// Sets the full request, replacing any prior values.
13234        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
13235            mut self,
13236            v: V,
13237        ) -> Self {
13238            self.0.request = v.into();
13239            self
13240        }
13241
13242        /// Sets all the options, replacing any prior values.
13243        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13244            self.0.options = v.into();
13245            self
13246        }
13247
13248        /// Sends the request.
13249        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
13250            (*self.0.stub)
13251                .list_locations(self.0.request, self.0.options)
13252                .await
13253                .map(crate::Response::into_body)
13254        }
13255
13256        /// Streams each page in the collection.
13257        pub fn by_page(
13258            self,
13259        ) -> impl google_cloud_gax::paginator::Paginator<
13260            google_cloud_location::model::ListLocationsResponse,
13261            crate::Error,
13262        > {
13263            use std::clone::Clone;
13264            let token = self.0.request.page_token.clone();
13265            let execute = move |token: String| {
13266                let mut builder = self.clone();
13267                builder.0.request = builder.0.request.set_page_token(token);
13268                builder.send()
13269            };
13270            google_cloud_gax::paginator::internal::new_paginator(token, execute)
13271        }
13272
13273        /// Streams each item in the collection.
13274        pub fn by_item(
13275            self,
13276        ) -> impl google_cloud_gax::paginator::ItemPaginator<
13277            google_cloud_location::model::ListLocationsResponse,
13278            crate::Error,
13279        > {
13280            use google_cloud_gax::paginator::Paginator;
13281            self.by_page().items()
13282        }
13283
13284        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
13285        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13286            self.0.request.name = v.into();
13287            self
13288        }
13289
13290        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
13291        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13292            self.0.request.filter = v.into();
13293            self
13294        }
13295
13296        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
13297        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13298            self.0.request.page_size = v.into();
13299            self
13300        }
13301
13302        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
13303        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13304            self.0.request.page_token = v.into();
13305            self
13306        }
13307    }
13308
13309    #[doc(hidden)]
13310    impl crate::RequestBuilder for ListLocations {
13311        fn request_options(&mut self) -> &mut crate::RequestOptions {
13312            &mut self.0.options
13313        }
13314    }
13315
13316    /// The request builder for [DataTaxonomyService::get_location][crate::client::DataTaxonomyService::get_location] calls.
13317    ///
13318    /// # Example
13319    /// ```
13320    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetLocation;
13321    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13322    ///
13323    /// let builder = prepare_request_builder();
13324    /// let response = builder.send().await?;
13325    /// # Ok(()) }
13326    ///
13327    /// fn prepare_request_builder() -> GetLocation {
13328    ///   # panic!();
13329    ///   // ... details omitted ...
13330    /// }
13331    /// ```
13332    #[derive(Clone, Debug)]
13333    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
13334
13335    impl GetLocation {
13336        pub(crate) fn new(
13337            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13338        ) -> Self {
13339            Self(RequestBuilder::new(stub))
13340        }
13341
13342        /// Sets the full request, replacing any prior values.
13343        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
13344            mut self,
13345            v: V,
13346        ) -> Self {
13347            self.0.request = v.into();
13348            self
13349        }
13350
13351        /// Sets all the options, replacing any prior values.
13352        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13353            self.0.options = v.into();
13354            self
13355        }
13356
13357        /// Sends the request.
13358        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
13359            (*self.0.stub)
13360                .get_location(self.0.request, self.0.options)
13361                .await
13362                .map(crate::Response::into_body)
13363        }
13364
13365        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
13366        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13367            self.0.request.name = v.into();
13368            self
13369        }
13370    }
13371
13372    #[doc(hidden)]
13373    impl crate::RequestBuilder for GetLocation {
13374        fn request_options(&mut self) -> &mut crate::RequestOptions {
13375            &mut self.0.options
13376        }
13377    }
13378
13379    /// The request builder for [DataTaxonomyService::set_iam_policy][crate::client::DataTaxonomyService::set_iam_policy] calls.
13380    ///
13381    /// # Example
13382    /// ```
13383    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::SetIamPolicy;
13384    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13385    ///
13386    /// let builder = prepare_request_builder();
13387    /// let response = builder.send().await?;
13388    /// # Ok(()) }
13389    ///
13390    /// fn prepare_request_builder() -> SetIamPolicy {
13391    ///   # panic!();
13392    ///   // ... details omitted ...
13393    /// }
13394    /// ```
13395    #[derive(Clone, Debug)]
13396    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
13397
13398    impl SetIamPolicy {
13399        pub(crate) fn new(
13400            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13401        ) -> Self {
13402            Self(RequestBuilder::new(stub))
13403        }
13404
13405        /// Sets the full request, replacing any prior values.
13406        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
13407            mut self,
13408            v: V,
13409        ) -> Self {
13410            self.0.request = v.into();
13411            self
13412        }
13413
13414        /// Sets all the options, replacing any prior values.
13415        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13416            self.0.options = v.into();
13417            self
13418        }
13419
13420        /// Sends the request.
13421        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
13422            (*self.0.stub)
13423                .set_iam_policy(self.0.request, self.0.options)
13424                .await
13425                .map(crate::Response::into_body)
13426        }
13427
13428        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
13429        ///
13430        /// This is a **required** field for requests.
13431        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
13432            self.0.request.resource = v.into();
13433            self
13434        }
13435
13436        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
13437        ///
13438        /// This is a **required** field for requests.
13439        pub fn set_policy<T>(mut self, v: T) -> Self
13440        where
13441            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
13442        {
13443            self.0.request.policy = std::option::Option::Some(v.into());
13444            self
13445        }
13446
13447        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
13448        ///
13449        /// This is a **required** field for requests.
13450        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
13451        where
13452            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
13453        {
13454            self.0.request.policy = v.map(|x| x.into());
13455            self
13456        }
13457
13458        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
13459        pub fn set_update_mask<T>(mut self, v: T) -> Self
13460        where
13461            T: std::convert::Into<wkt::FieldMask>,
13462        {
13463            self.0.request.update_mask = std::option::Option::Some(v.into());
13464            self
13465        }
13466
13467        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
13468        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
13469        where
13470            T: std::convert::Into<wkt::FieldMask>,
13471        {
13472            self.0.request.update_mask = v.map(|x| x.into());
13473            self
13474        }
13475    }
13476
13477    #[doc(hidden)]
13478    impl crate::RequestBuilder for SetIamPolicy {
13479        fn request_options(&mut self) -> &mut crate::RequestOptions {
13480            &mut self.0.options
13481        }
13482    }
13483
13484    /// The request builder for [DataTaxonomyService::get_iam_policy][crate::client::DataTaxonomyService::get_iam_policy] calls.
13485    ///
13486    /// # Example
13487    /// ```
13488    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetIamPolicy;
13489    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13490    ///
13491    /// let builder = prepare_request_builder();
13492    /// let response = builder.send().await?;
13493    /// # Ok(()) }
13494    ///
13495    /// fn prepare_request_builder() -> GetIamPolicy {
13496    ///   # panic!();
13497    ///   // ... details omitted ...
13498    /// }
13499    /// ```
13500    #[derive(Clone, Debug)]
13501    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
13502
13503    impl GetIamPolicy {
13504        pub(crate) fn new(
13505            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13506        ) -> Self {
13507            Self(RequestBuilder::new(stub))
13508        }
13509
13510        /// Sets the full request, replacing any prior values.
13511        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
13512            mut self,
13513            v: V,
13514        ) -> Self {
13515            self.0.request = v.into();
13516            self
13517        }
13518
13519        /// Sets all the options, replacing any prior values.
13520        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13521            self.0.options = v.into();
13522            self
13523        }
13524
13525        /// Sends the request.
13526        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
13527            (*self.0.stub)
13528                .get_iam_policy(self.0.request, self.0.options)
13529                .await
13530                .map(crate::Response::into_body)
13531        }
13532
13533        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
13534        ///
13535        /// This is a **required** field for requests.
13536        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
13537            self.0.request.resource = v.into();
13538            self
13539        }
13540
13541        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
13542        pub fn set_options<T>(mut self, v: T) -> Self
13543        where
13544            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
13545        {
13546            self.0.request.options = std::option::Option::Some(v.into());
13547            self
13548        }
13549
13550        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
13551        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
13552        where
13553            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
13554        {
13555            self.0.request.options = v.map(|x| x.into());
13556            self
13557        }
13558    }
13559
13560    #[doc(hidden)]
13561    impl crate::RequestBuilder for GetIamPolicy {
13562        fn request_options(&mut self) -> &mut crate::RequestOptions {
13563            &mut self.0.options
13564        }
13565    }
13566
13567    /// The request builder for [DataTaxonomyService::test_iam_permissions][crate::client::DataTaxonomyService::test_iam_permissions] calls.
13568    ///
13569    /// # Example
13570    /// ```
13571    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::TestIamPermissions;
13572    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13573    ///
13574    /// let builder = prepare_request_builder();
13575    /// let response = builder.send().await?;
13576    /// # Ok(()) }
13577    ///
13578    /// fn prepare_request_builder() -> TestIamPermissions {
13579    ///   # panic!();
13580    ///   // ... details omitted ...
13581    /// }
13582    /// ```
13583    #[derive(Clone, Debug)]
13584    pub struct TestIamPermissions(
13585        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
13586    );
13587
13588    impl TestIamPermissions {
13589        pub(crate) fn new(
13590            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13591        ) -> Self {
13592            Self(RequestBuilder::new(stub))
13593        }
13594
13595        /// Sets the full request, replacing any prior values.
13596        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
13597            mut self,
13598            v: V,
13599        ) -> Self {
13600            self.0.request = v.into();
13601            self
13602        }
13603
13604        /// Sets all the options, replacing any prior values.
13605        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13606            self.0.options = v.into();
13607            self
13608        }
13609
13610        /// Sends the request.
13611        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
13612            (*self.0.stub)
13613                .test_iam_permissions(self.0.request, self.0.options)
13614                .await
13615                .map(crate::Response::into_body)
13616        }
13617
13618        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
13619        ///
13620        /// This is a **required** field for requests.
13621        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
13622            self.0.request.resource = v.into();
13623            self
13624        }
13625
13626        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
13627        ///
13628        /// This is a **required** field for requests.
13629        pub fn set_permissions<T, V>(mut self, v: T) -> Self
13630        where
13631            T: std::iter::IntoIterator<Item = V>,
13632            V: std::convert::Into<std::string::String>,
13633        {
13634            use std::iter::Iterator;
13635            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
13636            self
13637        }
13638    }
13639
13640    #[doc(hidden)]
13641    impl crate::RequestBuilder for TestIamPermissions {
13642        fn request_options(&mut self) -> &mut crate::RequestOptions {
13643            &mut self.0.options
13644        }
13645    }
13646
13647    /// The request builder for [DataTaxonomyService::list_operations][crate::client::DataTaxonomyService::list_operations] calls.
13648    ///
13649    /// # Example
13650    /// ```
13651    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListOperations;
13652    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13653    /// use google_cloud_gax::paginator::ItemPaginator;
13654    ///
13655    /// let builder = prepare_request_builder();
13656    /// let mut items = builder.by_item();
13657    /// while let Some(result) = items.next().await {
13658    ///   let item = result?;
13659    /// }
13660    /// # Ok(()) }
13661    ///
13662    /// fn prepare_request_builder() -> ListOperations {
13663    ///   # panic!();
13664    ///   // ... details omitted ...
13665    /// }
13666    /// ```
13667    #[derive(Clone, Debug)]
13668    pub struct ListOperations(
13669        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
13670    );
13671
13672    impl ListOperations {
13673        pub(crate) fn new(
13674            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13675        ) -> Self {
13676            Self(RequestBuilder::new(stub))
13677        }
13678
13679        /// Sets the full request, replacing any prior values.
13680        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
13681            mut self,
13682            v: V,
13683        ) -> Self {
13684            self.0.request = v.into();
13685            self
13686        }
13687
13688        /// Sets all the options, replacing any prior values.
13689        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13690            self.0.options = v.into();
13691            self
13692        }
13693
13694        /// Sends the request.
13695        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
13696            (*self.0.stub)
13697                .list_operations(self.0.request, self.0.options)
13698                .await
13699                .map(crate::Response::into_body)
13700        }
13701
13702        /// Streams each page in the collection.
13703        pub fn by_page(
13704            self,
13705        ) -> impl google_cloud_gax::paginator::Paginator<
13706            google_cloud_longrunning::model::ListOperationsResponse,
13707            crate::Error,
13708        > {
13709            use std::clone::Clone;
13710            let token = self.0.request.page_token.clone();
13711            let execute = move |token: String| {
13712                let mut builder = self.clone();
13713                builder.0.request = builder.0.request.set_page_token(token);
13714                builder.send()
13715            };
13716            google_cloud_gax::paginator::internal::new_paginator(token, execute)
13717        }
13718
13719        /// Streams each item in the collection.
13720        pub fn by_item(
13721            self,
13722        ) -> impl google_cloud_gax::paginator::ItemPaginator<
13723            google_cloud_longrunning::model::ListOperationsResponse,
13724            crate::Error,
13725        > {
13726            use google_cloud_gax::paginator::Paginator;
13727            self.by_page().items()
13728        }
13729
13730        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
13731        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13732            self.0.request.name = v.into();
13733            self
13734        }
13735
13736        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
13737        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13738            self.0.request.filter = v.into();
13739            self
13740        }
13741
13742        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
13743        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13744            self.0.request.page_size = v.into();
13745            self
13746        }
13747
13748        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
13749        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13750            self.0.request.page_token = v.into();
13751            self
13752        }
13753
13754        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
13755        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
13756            self.0.request.return_partial_success = v.into();
13757            self
13758        }
13759    }
13760
13761    #[doc(hidden)]
13762    impl crate::RequestBuilder for ListOperations {
13763        fn request_options(&mut self) -> &mut crate::RequestOptions {
13764            &mut self.0.options
13765        }
13766    }
13767
13768    /// The request builder for [DataTaxonomyService::get_operation][crate::client::DataTaxonomyService::get_operation] calls.
13769    ///
13770    /// # Example
13771    /// ```
13772    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetOperation;
13773    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13774    ///
13775    /// let builder = prepare_request_builder();
13776    /// let response = builder.send().await?;
13777    /// # Ok(()) }
13778    ///
13779    /// fn prepare_request_builder() -> GetOperation {
13780    ///   # panic!();
13781    ///   // ... details omitted ...
13782    /// }
13783    /// ```
13784    #[derive(Clone, Debug)]
13785    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
13786
13787    impl GetOperation {
13788        pub(crate) fn new(
13789            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13790        ) -> Self {
13791            Self(RequestBuilder::new(stub))
13792        }
13793
13794        /// Sets the full request, replacing any prior values.
13795        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
13796            mut self,
13797            v: V,
13798        ) -> Self {
13799            self.0.request = v.into();
13800            self
13801        }
13802
13803        /// Sets all the options, replacing any prior values.
13804        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13805            self.0.options = v.into();
13806            self
13807        }
13808
13809        /// Sends the request.
13810        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
13811            (*self.0.stub)
13812                .get_operation(self.0.request, self.0.options)
13813                .await
13814                .map(crate::Response::into_body)
13815        }
13816
13817        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
13818        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13819            self.0.request.name = v.into();
13820            self
13821        }
13822    }
13823
13824    #[doc(hidden)]
13825    impl crate::RequestBuilder for GetOperation {
13826        fn request_options(&mut self) -> &mut crate::RequestOptions {
13827            &mut self.0.options
13828        }
13829    }
13830
13831    /// The request builder for [DataTaxonomyService::delete_operation][crate::client::DataTaxonomyService::delete_operation] calls.
13832    ///
13833    /// # Example
13834    /// ```
13835    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteOperation;
13836    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13837    ///
13838    /// let builder = prepare_request_builder();
13839    /// let response = builder.send().await?;
13840    /// # Ok(()) }
13841    ///
13842    /// fn prepare_request_builder() -> DeleteOperation {
13843    ///   # panic!();
13844    ///   // ... details omitted ...
13845    /// }
13846    /// ```
13847    #[derive(Clone, Debug)]
13848    pub struct DeleteOperation(
13849        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
13850    );
13851
13852    impl DeleteOperation {
13853        pub(crate) fn new(
13854            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13855        ) -> Self {
13856            Self(RequestBuilder::new(stub))
13857        }
13858
13859        /// Sets the full request, replacing any prior values.
13860        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
13861            mut self,
13862            v: V,
13863        ) -> Self {
13864            self.0.request = v.into();
13865            self
13866        }
13867
13868        /// Sets all the options, replacing any prior values.
13869        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13870            self.0.options = v.into();
13871            self
13872        }
13873
13874        /// Sends the request.
13875        pub async fn send(self) -> Result<()> {
13876            (*self.0.stub)
13877                .delete_operation(self.0.request, self.0.options)
13878                .await
13879                .map(crate::Response::into_body)
13880        }
13881
13882        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
13883        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13884            self.0.request.name = v.into();
13885            self
13886        }
13887    }
13888
13889    #[doc(hidden)]
13890    impl crate::RequestBuilder for DeleteOperation {
13891        fn request_options(&mut self) -> &mut crate::RequestOptions {
13892            &mut self.0.options
13893        }
13894    }
13895
13896    /// The request builder for [DataTaxonomyService::cancel_operation][crate::client::DataTaxonomyService::cancel_operation] calls.
13897    ///
13898    /// # Example
13899    /// ```
13900    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CancelOperation;
13901    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13902    ///
13903    /// let builder = prepare_request_builder();
13904    /// let response = builder.send().await?;
13905    /// # Ok(()) }
13906    ///
13907    /// fn prepare_request_builder() -> CancelOperation {
13908    ///   # panic!();
13909    ///   // ... details omitted ...
13910    /// }
13911    /// ```
13912    #[derive(Clone, Debug)]
13913    pub struct CancelOperation(
13914        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
13915    );
13916
13917    impl CancelOperation {
13918        pub(crate) fn new(
13919            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13920        ) -> Self {
13921            Self(RequestBuilder::new(stub))
13922        }
13923
13924        /// Sets the full request, replacing any prior values.
13925        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
13926            mut self,
13927            v: V,
13928        ) -> Self {
13929            self.0.request = v.into();
13930            self
13931        }
13932
13933        /// Sets all the options, replacing any prior values.
13934        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13935            self.0.options = v.into();
13936            self
13937        }
13938
13939        /// Sends the request.
13940        pub async fn send(self) -> Result<()> {
13941            (*self.0.stub)
13942                .cancel_operation(self.0.request, self.0.options)
13943                .await
13944                .map(crate::Response::into_body)
13945        }
13946
13947        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
13948        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13949            self.0.request.name = v.into();
13950            self
13951        }
13952    }
13953
13954    #[doc(hidden)]
13955    impl crate::RequestBuilder for CancelOperation {
13956        fn request_options(&mut self) -> &mut crate::RequestOptions {
13957            &mut self.0.options
13958        }
13959    }
13960}
13961
13962/// Request and client builders for [DataScanService][crate::client::DataScanService].
13963pub mod data_scan_service {
13964    use crate::Result;
13965
13966    /// A builder for [DataScanService][crate::client::DataScanService].
13967    ///
13968    /// ```
13969    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
13970    /// # use google_cloud_dataplex_v1::*;
13971    /// # use builder::data_scan_service::ClientBuilder;
13972    /// # use client::DataScanService;
13973    /// let builder : ClientBuilder = DataScanService::builder();
13974    /// let client = builder
13975    ///     .with_endpoint("https://dataplex.googleapis.com")
13976    ///     .build().await?;
13977    /// # Ok(()) }
13978    /// ```
13979    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
13980
13981    pub(crate) mod client {
13982        use super::super::super::client::DataScanService;
13983        pub struct Factory;
13984        impl crate::ClientFactory for Factory {
13985            type Client = DataScanService;
13986            type Credentials = gaxi::options::Credentials;
13987            async fn build(
13988                self,
13989                config: gaxi::options::ClientConfig,
13990            ) -> crate::ClientBuilderResult<Self::Client> {
13991                Self::Client::new(config).await
13992            }
13993        }
13994    }
13995
13996    /// Common implementation for [crate::client::DataScanService] request builders.
13997    #[derive(Clone, Debug)]
13998    pub(crate) struct RequestBuilder<R: std::default::Default> {
13999        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14000        request: R,
14001        options: crate::RequestOptions,
14002    }
14003
14004    impl<R> RequestBuilder<R>
14005    where
14006        R: std::default::Default,
14007    {
14008        pub(crate) fn new(
14009            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14010        ) -> Self {
14011            Self {
14012                stub,
14013                request: R::default(),
14014                options: crate::RequestOptions::default(),
14015            }
14016        }
14017    }
14018
14019    /// The request builder for [DataScanService::create_data_scan][crate::client::DataScanService::create_data_scan] calls.
14020    ///
14021    /// # Example
14022    /// ```
14023    /// # use google_cloud_dataplex_v1::builder::data_scan_service::CreateDataScan;
14024    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14025    /// use google_cloud_lro::Poller;
14026    ///
14027    /// let builder = prepare_request_builder();
14028    /// let response = builder.poller().until_done().await?;
14029    /// # Ok(()) }
14030    ///
14031    /// fn prepare_request_builder() -> CreateDataScan {
14032    ///   # panic!();
14033    ///   // ... details omitted ...
14034    /// }
14035    /// ```
14036    #[derive(Clone, Debug)]
14037    pub struct CreateDataScan(RequestBuilder<crate::model::CreateDataScanRequest>);
14038
14039    impl CreateDataScan {
14040        pub(crate) fn new(
14041            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14042        ) -> Self {
14043            Self(RequestBuilder::new(stub))
14044        }
14045
14046        /// Sets the full request, replacing any prior values.
14047        pub fn with_request<V: Into<crate::model::CreateDataScanRequest>>(mut self, v: V) -> Self {
14048            self.0.request = v.into();
14049            self
14050        }
14051
14052        /// Sets all the options, replacing any prior values.
14053        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14054            self.0.options = v.into();
14055            self
14056        }
14057
14058        /// Sends the request.
14059        ///
14060        /// # Long running operations
14061        ///
14062        /// This starts, but does not poll, a longrunning operation. More information
14063        /// on [create_data_scan][crate::client::DataScanService::create_data_scan].
14064        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14065            (*self.0.stub)
14066                .create_data_scan(self.0.request, self.0.options)
14067                .await
14068                .map(crate::Response::into_body)
14069        }
14070
14071        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_scan`.
14072        pub fn poller(
14073            self,
14074        ) -> impl google_cloud_lro::Poller<crate::model::DataScan, crate::model::OperationMetadata>
14075        {
14076            type Operation = google_cloud_lro::internal::Operation<
14077                crate::model::DataScan,
14078                crate::model::OperationMetadata,
14079            >;
14080            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14081            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14082
14083            let stub = self.0.stub.clone();
14084            let mut options = self.0.options.clone();
14085            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
14086            let query = move |name| {
14087                let stub = stub.clone();
14088                let options = options.clone();
14089                async {
14090                    let op = GetOperation::new(stub)
14091                        .set_name(name)
14092                        .with_options(options)
14093                        .send()
14094                        .await?;
14095                    Ok(Operation::new(op))
14096                }
14097            };
14098
14099            let start = move || async {
14100                let op = self.send().await?;
14101                Ok(Operation::new(op))
14102            };
14103
14104            google_cloud_lro::internal::new_poller(
14105                polling_error_policy,
14106                polling_backoff_policy,
14107                start,
14108                query,
14109            )
14110        }
14111
14112        /// Sets the value of [parent][crate::model::CreateDataScanRequest::parent].
14113        ///
14114        /// This is a **required** field for requests.
14115        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14116            self.0.request.parent = v.into();
14117            self
14118        }
14119
14120        /// Sets the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
14121        ///
14122        /// This is a **required** field for requests.
14123        pub fn set_data_scan<T>(mut self, v: T) -> Self
14124        where
14125            T: std::convert::Into<crate::model::DataScan>,
14126        {
14127            self.0.request.data_scan = std::option::Option::Some(v.into());
14128            self
14129        }
14130
14131        /// Sets or clears the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
14132        ///
14133        /// This is a **required** field for requests.
14134        pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
14135        where
14136            T: std::convert::Into<crate::model::DataScan>,
14137        {
14138            self.0.request.data_scan = v.map(|x| x.into());
14139            self
14140        }
14141
14142        /// Sets the value of [data_scan_id][crate::model::CreateDataScanRequest::data_scan_id].
14143        ///
14144        /// This is a **required** field for requests.
14145        pub fn set_data_scan_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
14146            self.0.request.data_scan_id = v.into();
14147            self
14148        }
14149
14150        /// Sets the value of [validate_only][crate::model::CreateDataScanRequest::validate_only].
14151        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
14152            self.0.request.validate_only = v.into();
14153            self
14154        }
14155    }
14156
14157    #[doc(hidden)]
14158    impl crate::RequestBuilder for CreateDataScan {
14159        fn request_options(&mut self) -> &mut crate::RequestOptions {
14160            &mut self.0.options
14161        }
14162    }
14163
14164    /// The request builder for [DataScanService::update_data_scan][crate::client::DataScanService::update_data_scan] calls.
14165    ///
14166    /// # Example
14167    /// ```
14168    /// # use google_cloud_dataplex_v1::builder::data_scan_service::UpdateDataScan;
14169    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14170    /// use google_cloud_lro::Poller;
14171    ///
14172    /// let builder = prepare_request_builder();
14173    /// let response = builder.poller().until_done().await?;
14174    /// # Ok(()) }
14175    ///
14176    /// fn prepare_request_builder() -> UpdateDataScan {
14177    ///   # panic!();
14178    ///   // ... details omitted ...
14179    /// }
14180    /// ```
14181    #[derive(Clone, Debug)]
14182    pub struct UpdateDataScan(RequestBuilder<crate::model::UpdateDataScanRequest>);
14183
14184    impl UpdateDataScan {
14185        pub(crate) fn new(
14186            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14187        ) -> Self {
14188            Self(RequestBuilder::new(stub))
14189        }
14190
14191        /// Sets the full request, replacing any prior values.
14192        pub fn with_request<V: Into<crate::model::UpdateDataScanRequest>>(mut self, v: V) -> Self {
14193            self.0.request = v.into();
14194            self
14195        }
14196
14197        /// Sets all the options, replacing any prior values.
14198        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14199            self.0.options = v.into();
14200            self
14201        }
14202
14203        /// Sends the request.
14204        ///
14205        /// # Long running operations
14206        ///
14207        /// This starts, but does not poll, a longrunning operation. More information
14208        /// on [update_data_scan][crate::client::DataScanService::update_data_scan].
14209        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14210            (*self.0.stub)
14211                .update_data_scan(self.0.request, self.0.options)
14212                .await
14213                .map(crate::Response::into_body)
14214        }
14215
14216        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_scan`.
14217        pub fn poller(
14218            self,
14219        ) -> impl google_cloud_lro::Poller<crate::model::DataScan, crate::model::OperationMetadata>
14220        {
14221            type Operation = google_cloud_lro::internal::Operation<
14222                crate::model::DataScan,
14223                crate::model::OperationMetadata,
14224            >;
14225            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14226            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14227
14228            let stub = self.0.stub.clone();
14229            let mut options = self.0.options.clone();
14230            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
14231            let query = move |name| {
14232                let stub = stub.clone();
14233                let options = options.clone();
14234                async {
14235                    let op = GetOperation::new(stub)
14236                        .set_name(name)
14237                        .with_options(options)
14238                        .send()
14239                        .await?;
14240                    Ok(Operation::new(op))
14241                }
14242            };
14243
14244            let start = move || async {
14245                let op = self.send().await?;
14246                Ok(Operation::new(op))
14247            };
14248
14249            google_cloud_lro::internal::new_poller(
14250                polling_error_policy,
14251                polling_backoff_policy,
14252                start,
14253                query,
14254            )
14255        }
14256
14257        /// Sets the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
14258        ///
14259        /// This is a **required** field for requests.
14260        pub fn set_data_scan<T>(mut self, v: T) -> Self
14261        where
14262            T: std::convert::Into<crate::model::DataScan>,
14263        {
14264            self.0.request.data_scan = std::option::Option::Some(v.into());
14265            self
14266        }
14267
14268        /// Sets or clears the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
14269        ///
14270        /// This is a **required** field for requests.
14271        pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
14272        where
14273            T: std::convert::Into<crate::model::DataScan>,
14274        {
14275            self.0.request.data_scan = v.map(|x| x.into());
14276            self
14277        }
14278
14279        /// Sets the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
14280        pub fn set_update_mask<T>(mut self, v: T) -> Self
14281        where
14282            T: std::convert::Into<wkt::FieldMask>,
14283        {
14284            self.0.request.update_mask = std::option::Option::Some(v.into());
14285            self
14286        }
14287
14288        /// Sets or clears the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
14289        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
14290        where
14291            T: std::convert::Into<wkt::FieldMask>,
14292        {
14293            self.0.request.update_mask = v.map(|x| x.into());
14294            self
14295        }
14296
14297        /// Sets the value of [validate_only][crate::model::UpdateDataScanRequest::validate_only].
14298        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
14299            self.0.request.validate_only = v.into();
14300            self
14301        }
14302    }
14303
14304    #[doc(hidden)]
14305    impl crate::RequestBuilder for UpdateDataScan {
14306        fn request_options(&mut self) -> &mut crate::RequestOptions {
14307            &mut self.0.options
14308        }
14309    }
14310
14311    /// The request builder for [DataScanService::delete_data_scan][crate::client::DataScanService::delete_data_scan] calls.
14312    ///
14313    /// # Example
14314    /// ```
14315    /// # use google_cloud_dataplex_v1::builder::data_scan_service::DeleteDataScan;
14316    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14317    /// use google_cloud_lro::Poller;
14318    ///
14319    /// let builder = prepare_request_builder();
14320    /// let response = builder.poller().until_done().await?;
14321    /// # Ok(()) }
14322    ///
14323    /// fn prepare_request_builder() -> DeleteDataScan {
14324    ///   # panic!();
14325    ///   // ... details omitted ...
14326    /// }
14327    /// ```
14328    #[derive(Clone, Debug)]
14329    pub struct DeleteDataScan(RequestBuilder<crate::model::DeleteDataScanRequest>);
14330
14331    impl DeleteDataScan {
14332        pub(crate) fn new(
14333            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14334        ) -> Self {
14335            Self(RequestBuilder::new(stub))
14336        }
14337
14338        /// Sets the full request, replacing any prior values.
14339        pub fn with_request<V: Into<crate::model::DeleteDataScanRequest>>(mut self, v: V) -> Self {
14340            self.0.request = v.into();
14341            self
14342        }
14343
14344        /// Sets all the options, replacing any prior values.
14345        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14346            self.0.options = v.into();
14347            self
14348        }
14349
14350        /// Sends the request.
14351        ///
14352        /// # Long running operations
14353        ///
14354        /// This starts, but does not poll, a longrunning operation. More information
14355        /// on [delete_data_scan][crate::client::DataScanService::delete_data_scan].
14356        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14357            (*self.0.stub)
14358                .delete_data_scan(self.0.request, self.0.options)
14359                .await
14360                .map(crate::Response::into_body)
14361        }
14362
14363        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_scan`.
14364        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
14365            type Operation =
14366                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
14367            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14368            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14369
14370            let stub = self.0.stub.clone();
14371            let mut options = self.0.options.clone();
14372            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
14373            let query = move |name| {
14374                let stub = stub.clone();
14375                let options = options.clone();
14376                async {
14377                    let op = GetOperation::new(stub)
14378                        .set_name(name)
14379                        .with_options(options)
14380                        .send()
14381                        .await?;
14382                    Ok(Operation::new(op))
14383                }
14384            };
14385
14386            let start = move || async {
14387                let op = self.send().await?;
14388                Ok(Operation::new(op))
14389            };
14390
14391            google_cloud_lro::internal::new_unit_response_poller(
14392                polling_error_policy,
14393                polling_backoff_policy,
14394                start,
14395                query,
14396            )
14397        }
14398
14399        /// Sets the value of [name][crate::model::DeleteDataScanRequest::name].
14400        ///
14401        /// This is a **required** field for requests.
14402        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14403            self.0.request.name = v.into();
14404            self
14405        }
14406
14407        /// Sets the value of [force][crate::model::DeleteDataScanRequest::force].
14408        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
14409            self.0.request.force = v.into();
14410            self
14411        }
14412    }
14413
14414    #[doc(hidden)]
14415    impl crate::RequestBuilder for DeleteDataScan {
14416        fn request_options(&mut self) -> &mut crate::RequestOptions {
14417            &mut self.0.options
14418        }
14419    }
14420
14421    /// The request builder for [DataScanService::get_data_scan][crate::client::DataScanService::get_data_scan] calls.
14422    ///
14423    /// # Example
14424    /// ```
14425    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetDataScan;
14426    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14427    ///
14428    /// let builder = prepare_request_builder();
14429    /// let response = builder.send().await?;
14430    /// # Ok(()) }
14431    ///
14432    /// fn prepare_request_builder() -> GetDataScan {
14433    ///   # panic!();
14434    ///   // ... details omitted ...
14435    /// }
14436    /// ```
14437    #[derive(Clone, Debug)]
14438    pub struct GetDataScan(RequestBuilder<crate::model::GetDataScanRequest>);
14439
14440    impl GetDataScan {
14441        pub(crate) fn new(
14442            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14443        ) -> Self {
14444            Self(RequestBuilder::new(stub))
14445        }
14446
14447        /// Sets the full request, replacing any prior values.
14448        pub fn with_request<V: Into<crate::model::GetDataScanRequest>>(mut self, v: V) -> Self {
14449            self.0.request = v.into();
14450            self
14451        }
14452
14453        /// Sets all the options, replacing any prior values.
14454        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14455            self.0.options = v.into();
14456            self
14457        }
14458
14459        /// Sends the request.
14460        pub async fn send(self) -> Result<crate::model::DataScan> {
14461            (*self.0.stub)
14462                .get_data_scan(self.0.request, self.0.options)
14463                .await
14464                .map(crate::Response::into_body)
14465        }
14466
14467        /// Sets the value of [name][crate::model::GetDataScanRequest::name].
14468        ///
14469        /// This is a **required** field for requests.
14470        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14471            self.0.request.name = v.into();
14472            self
14473        }
14474
14475        /// Sets the value of [view][crate::model::GetDataScanRequest::view].
14476        pub fn set_view<T: Into<crate::model::get_data_scan_request::DataScanView>>(
14477            mut self,
14478            v: T,
14479        ) -> Self {
14480            self.0.request.view = v.into();
14481            self
14482        }
14483    }
14484
14485    #[doc(hidden)]
14486    impl crate::RequestBuilder for GetDataScan {
14487        fn request_options(&mut self) -> &mut crate::RequestOptions {
14488            &mut self.0.options
14489        }
14490    }
14491
14492    /// The request builder for [DataScanService::list_data_scans][crate::client::DataScanService::list_data_scans] calls.
14493    ///
14494    /// # Example
14495    /// ```
14496    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListDataScans;
14497    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14498    /// use google_cloud_gax::paginator::ItemPaginator;
14499    ///
14500    /// let builder = prepare_request_builder();
14501    /// let mut items = builder.by_item();
14502    /// while let Some(result) = items.next().await {
14503    ///   let item = result?;
14504    /// }
14505    /// # Ok(()) }
14506    ///
14507    /// fn prepare_request_builder() -> ListDataScans {
14508    ///   # panic!();
14509    ///   // ... details omitted ...
14510    /// }
14511    /// ```
14512    #[derive(Clone, Debug)]
14513    pub struct ListDataScans(RequestBuilder<crate::model::ListDataScansRequest>);
14514
14515    impl ListDataScans {
14516        pub(crate) fn new(
14517            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14518        ) -> Self {
14519            Self(RequestBuilder::new(stub))
14520        }
14521
14522        /// Sets the full request, replacing any prior values.
14523        pub fn with_request<V: Into<crate::model::ListDataScansRequest>>(mut self, v: V) -> Self {
14524            self.0.request = v.into();
14525            self
14526        }
14527
14528        /// Sets all the options, replacing any prior values.
14529        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14530            self.0.options = v.into();
14531            self
14532        }
14533
14534        /// Sends the request.
14535        pub async fn send(self) -> Result<crate::model::ListDataScansResponse> {
14536            (*self.0.stub)
14537                .list_data_scans(self.0.request, self.0.options)
14538                .await
14539                .map(crate::Response::into_body)
14540        }
14541
14542        /// Streams each page in the collection.
14543        pub fn by_page(
14544            self,
14545        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListDataScansResponse, crate::Error>
14546        {
14547            use std::clone::Clone;
14548            let token = self.0.request.page_token.clone();
14549            let execute = move |token: String| {
14550                let mut builder = self.clone();
14551                builder.0.request = builder.0.request.set_page_token(token);
14552                builder.send()
14553            };
14554            google_cloud_gax::paginator::internal::new_paginator(token, execute)
14555        }
14556
14557        /// Streams each item in the collection.
14558        pub fn by_item(
14559            self,
14560        ) -> impl google_cloud_gax::paginator::ItemPaginator<
14561            crate::model::ListDataScansResponse,
14562            crate::Error,
14563        > {
14564            use google_cloud_gax::paginator::Paginator;
14565            self.by_page().items()
14566        }
14567
14568        /// Sets the value of [parent][crate::model::ListDataScansRequest::parent].
14569        ///
14570        /// This is a **required** field for requests.
14571        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14572            self.0.request.parent = v.into();
14573            self
14574        }
14575
14576        /// Sets the value of [page_size][crate::model::ListDataScansRequest::page_size].
14577        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
14578            self.0.request.page_size = v.into();
14579            self
14580        }
14581
14582        /// Sets the value of [page_token][crate::model::ListDataScansRequest::page_token].
14583        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
14584            self.0.request.page_token = v.into();
14585            self
14586        }
14587
14588        /// Sets the value of [filter][crate::model::ListDataScansRequest::filter].
14589        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
14590            self.0.request.filter = v.into();
14591            self
14592        }
14593
14594        /// Sets the value of [order_by][crate::model::ListDataScansRequest::order_by].
14595        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
14596            self.0.request.order_by = v.into();
14597            self
14598        }
14599    }
14600
14601    #[doc(hidden)]
14602    impl crate::RequestBuilder for ListDataScans {
14603        fn request_options(&mut self) -> &mut crate::RequestOptions {
14604            &mut self.0.options
14605        }
14606    }
14607
14608    /// The request builder for [DataScanService::run_data_scan][crate::client::DataScanService::run_data_scan] calls.
14609    ///
14610    /// # Example
14611    /// ```
14612    /// # use google_cloud_dataplex_v1::builder::data_scan_service::RunDataScan;
14613    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14614    ///
14615    /// let builder = prepare_request_builder();
14616    /// let response = builder.send().await?;
14617    /// # Ok(()) }
14618    ///
14619    /// fn prepare_request_builder() -> RunDataScan {
14620    ///   # panic!();
14621    ///   // ... details omitted ...
14622    /// }
14623    /// ```
14624    #[derive(Clone, Debug)]
14625    pub struct RunDataScan(RequestBuilder<crate::model::RunDataScanRequest>);
14626
14627    impl RunDataScan {
14628        pub(crate) fn new(
14629            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14630        ) -> Self {
14631            Self(RequestBuilder::new(stub))
14632        }
14633
14634        /// Sets the full request, replacing any prior values.
14635        pub fn with_request<V: Into<crate::model::RunDataScanRequest>>(mut self, v: V) -> Self {
14636            self.0.request = v.into();
14637            self
14638        }
14639
14640        /// Sets all the options, replacing any prior values.
14641        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14642            self.0.options = v.into();
14643            self
14644        }
14645
14646        /// Sends the request.
14647        pub async fn send(self) -> Result<crate::model::RunDataScanResponse> {
14648            (*self.0.stub)
14649                .run_data_scan(self.0.request, self.0.options)
14650                .await
14651                .map(crate::Response::into_body)
14652        }
14653
14654        /// Sets the value of [name][crate::model::RunDataScanRequest::name].
14655        ///
14656        /// This is a **required** field for requests.
14657        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14658            self.0.request.name = v.into();
14659            self
14660        }
14661    }
14662
14663    #[doc(hidden)]
14664    impl crate::RequestBuilder for RunDataScan {
14665        fn request_options(&mut self) -> &mut crate::RequestOptions {
14666            &mut self.0.options
14667        }
14668    }
14669
14670    /// The request builder for [DataScanService::get_data_scan_job][crate::client::DataScanService::get_data_scan_job] calls.
14671    ///
14672    /// # Example
14673    /// ```
14674    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetDataScanJob;
14675    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14676    ///
14677    /// let builder = prepare_request_builder();
14678    /// let response = builder.send().await?;
14679    /// # Ok(()) }
14680    ///
14681    /// fn prepare_request_builder() -> GetDataScanJob {
14682    ///   # panic!();
14683    ///   // ... details omitted ...
14684    /// }
14685    /// ```
14686    #[derive(Clone, Debug)]
14687    pub struct GetDataScanJob(RequestBuilder<crate::model::GetDataScanJobRequest>);
14688
14689    impl GetDataScanJob {
14690        pub(crate) fn new(
14691            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14692        ) -> Self {
14693            Self(RequestBuilder::new(stub))
14694        }
14695
14696        /// Sets the full request, replacing any prior values.
14697        pub fn with_request<V: Into<crate::model::GetDataScanJobRequest>>(mut self, v: V) -> Self {
14698            self.0.request = v.into();
14699            self
14700        }
14701
14702        /// Sets all the options, replacing any prior values.
14703        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14704            self.0.options = v.into();
14705            self
14706        }
14707
14708        /// Sends the request.
14709        pub async fn send(self) -> Result<crate::model::DataScanJob> {
14710            (*self.0.stub)
14711                .get_data_scan_job(self.0.request, self.0.options)
14712                .await
14713                .map(crate::Response::into_body)
14714        }
14715
14716        /// Sets the value of [name][crate::model::GetDataScanJobRequest::name].
14717        ///
14718        /// This is a **required** field for requests.
14719        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14720            self.0.request.name = v.into();
14721            self
14722        }
14723
14724        /// Sets the value of [view][crate::model::GetDataScanJobRequest::view].
14725        pub fn set_view<T: Into<crate::model::get_data_scan_job_request::DataScanJobView>>(
14726            mut self,
14727            v: T,
14728        ) -> Self {
14729            self.0.request.view = v.into();
14730            self
14731        }
14732    }
14733
14734    #[doc(hidden)]
14735    impl crate::RequestBuilder for GetDataScanJob {
14736        fn request_options(&mut self) -> &mut crate::RequestOptions {
14737            &mut self.0.options
14738        }
14739    }
14740
14741    /// The request builder for [DataScanService::list_data_scan_jobs][crate::client::DataScanService::list_data_scan_jobs] calls.
14742    ///
14743    /// # Example
14744    /// ```
14745    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListDataScanJobs;
14746    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14747    /// use google_cloud_gax::paginator::ItemPaginator;
14748    ///
14749    /// let builder = prepare_request_builder();
14750    /// let mut items = builder.by_item();
14751    /// while let Some(result) = items.next().await {
14752    ///   let item = result?;
14753    /// }
14754    /// # Ok(()) }
14755    ///
14756    /// fn prepare_request_builder() -> ListDataScanJobs {
14757    ///   # panic!();
14758    ///   // ... details omitted ...
14759    /// }
14760    /// ```
14761    #[derive(Clone, Debug)]
14762    pub struct ListDataScanJobs(RequestBuilder<crate::model::ListDataScanJobsRequest>);
14763
14764    impl ListDataScanJobs {
14765        pub(crate) fn new(
14766            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14767        ) -> Self {
14768            Self(RequestBuilder::new(stub))
14769        }
14770
14771        /// Sets the full request, replacing any prior values.
14772        pub fn with_request<V: Into<crate::model::ListDataScanJobsRequest>>(
14773            mut self,
14774            v: V,
14775        ) -> Self {
14776            self.0.request = v.into();
14777            self
14778        }
14779
14780        /// Sets all the options, replacing any prior values.
14781        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14782            self.0.options = v.into();
14783            self
14784        }
14785
14786        /// Sends the request.
14787        pub async fn send(self) -> Result<crate::model::ListDataScanJobsResponse> {
14788            (*self.0.stub)
14789                .list_data_scan_jobs(self.0.request, self.0.options)
14790                .await
14791                .map(crate::Response::into_body)
14792        }
14793
14794        /// Streams each page in the collection.
14795        pub fn by_page(
14796            self,
14797        ) -> impl google_cloud_gax::paginator::Paginator<
14798            crate::model::ListDataScanJobsResponse,
14799            crate::Error,
14800        > {
14801            use std::clone::Clone;
14802            let token = self.0.request.page_token.clone();
14803            let execute = move |token: String| {
14804                let mut builder = self.clone();
14805                builder.0.request = builder.0.request.set_page_token(token);
14806                builder.send()
14807            };
14808            google_cloud_gax::paginator::internal::new_paginator(token, execute)
14809        }
14810
14811        /// Streams each item in the collection.
14812        pub fn by_item(
14813            self,
14814        ) -> impl google_cloud_gax::paginator::ItemPaginator<
14815            crate::model::ListDataScanJobsResponse,
14816            crate::Error,
14817        > {
14818            use google_cloud_gax::paginator::Paginator;
14819            self.by_page().items()
14820        }
14821
14822        /// Sets the value of [parent][crate::model::ListDataScanJobsRequest::parent].
14823        ///
14824        /// This is a **required** field for requests.
14825        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14826            self.0.request.parent = v.into();
14827            self
14828        }
14829
14830        /// Sets the value of [page_size][crate::model::ListDataScanJobsRequest::page_size].
14831        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
14832            self.0.request.page_size = v.into();
14833            self
14834        }
14835
14836        /// Sets the value of [page_token][crate::model::ListDataScanJobsRequest::page_token].
14837        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
14838            self.0.request.page_token = v.into();
14839            self
14840        }
14841
14842        /// Sets the value of [filter][crate::model::ListDataScanJobsRequest::filter].
14843        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
14844            self.0.request.filter = v.into();
14845            self
14846        }
14847    }
14848
14849    #[doc(hidden)]
14850    impl crate::RequestBuilder for ListDataScanJobs {
14851        fn request_options(&mut self) -> &mut crate::RequestOptions {
14852            &mut self.0.options
14853        }
14854    }
14855
14856    /// The request builder for [DataScanService::generate_data_quality_rules][crate::client::DataScanService::generate_data_quality_rules] calls.
14857    ///
14858    /// # Example
14859    /// ```
14860    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GenerateDataQualityRules;
14861    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14862    ///
14863    /// let builder = prepare_request_builder();
14864    /// let response = builder.send().await?;
14865    /// # Ok(()) }
14866    ///
14867    /// fn prepare_request_builder() -> GenerateDataQualityRules {
14868    ///   # panic!();
14869    ///   // ... details omitted ...
14870    /// }
14871    /// ```
14872    #[derive(Clone, Debug)]
14873    pub struct GenerateDataQualityRules(
14874        RequestBuilder<crate::model::GenerateDataQualityRulesRequest>,
14875    );
14876
14877    impl GenerateDataQualityRules {
14878        pub(crate) fn new(
14879            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14880        ) -> Self {
14881            Self(RequestBuilder::new(stub))
14882        }
14883
14884        /// Sets the full request, replacing any prior values.
14885        pub fn with_request<V: Into<crate::model::GenerateDataQualityRulesRequest>>(
14886            mut self,
14887            v: V,
14888        ) -> Self {
14889            self.0.request = v.into();
14890            self
14891        }
14892
14893        /// Sets all the options, replacing any prior values.
14894        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14895            self.0.options = v.into();
14896            self
14897        }
14898
14899        /// Sends the request.
14900        pub async fn send(self) -> Result<crate::model::GenerateDataQualityRulesResponse> {
14901            (*self.0.stub)
14902                .generate_data_quality_rules(self.0.request, self.0.options)
14903                .await
14904                .map(crate::Response::into_body)
14905        }
14906
14907        /// Sets the value of [name][crate::model::GenerateDataQualityRulesRequest::name].
14908        ///
14909        /// This is a **required** field for requests.
14910        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14911            self.0.request.name = v.into();
14912            self
14913        }
14914    }
14915
14916    #[doc(hidden)]
14917    impl crate::RequestBuilder for GenerateDataQualityRules {
14918        fn request_options(&mut self) -> &mut crate::RequestOptions {
14919            &mut self.0.options
14920        }
14921    }
14922
14923    /// The request builder for [DataScanService::list_locations][crate::client::DataScanService::list_locations] calls.
14924    ///
14925    /// # Example
14926    /// ```
14927    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListLocations;
14928    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14929    /// use google_cloud_gax::paginator::ItemPaginator;
14930    ///
14931    /// let builder = prepare_request_builder();
14932    /// let mut items = builder.by_item();
14933    /// while let Some(result) = items.next().await {
14934    ///   let item = result?;
14935    /// }
14936    /// # Ok(()) }
14937    ///
14938    /// fn prepare_request_builder() -> ListLocations {
14939    ///   # panic!();
14940    ///   // ... details omitted ...
14941    /// }
14942    /// ```
14943    #[derive(Clone, Debug)]
14944    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
14945
14946    impl ListLocations {
14947        pub(crate) fn new(
14948            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14949        ) -> Self {
14950            Self(RequestBuilder::new(stub))
14951        }
14952
14953        /// Sets the full request, replacing any prior values.
14954        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
14955            mut self,
14956            v: V,
14957        ) -> Self {
14958            self.0.request = v.into();
14959            self
14960        }
14961
14962        /// Sets all the options, replacing any prior values.
14963        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14964            self.0.options = v.into();
14965            self
14966        }
14967
14968        /// Sends the request.
14969        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
14970            (*self.0.stub)
14971                .list_locations(self.0.request, self.0.options)
14972                .await
14973                .map(crate::Response::into_body)
14974        }
14975
14976        /// Streams each page in the collection.
14977        pub fn by_page(
14978            self,
14979        ) -> impl google_cloud_gax::paginator::Paginator<
14980            google_cloud_location::model::ListLocationsResponse,
14981            crate::Error,
14982        > {
14983            use std::clone::Clone;
14984            let token = self.0.request.page_token.clone();
14985            let execute = move |token: String| {
14986                let mut builder = self.clone();
14987                builder.0.request = builder.0.request.set_page_token(token);
14988                builder.send()
14989            };
14990            google_cloud_gax::paginator::internal::new_paginator(token, execute)
14991        }
14992
14993        /// Streams each item in the collection.
14994        pub fn by_item(
14995            self,
14996        ) -> impl google_cloud_gax::paginator::ItemPaginator<
14997            google_cloud_location::model::ListLocationsResponse,
14998            crate::Error,
14999        > {
15000            use google_cloud_gax::paginator::Paginator;
15001            self.by_page().items()
15002        }
15003
15004        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
15005        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15006            self.0.request.name = v.into();
15007            self
15008        }
15009
15010        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
15011        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15012            self.0.request.filter = v.into();
15013            self
15014        }
15015
15016        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
15017        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15018            self.0.request.page_size = v.into();
15019            self
15020        }
15021
15022        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
15023        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15024            self.0.request.page_token = v.into();
15025            self
15026        }
15027    }
15028
15029    #[doc(hidden)]
15030    impl crate::RequestBuilder for ListLocations {
15031        fn request_options(&mut self) -> &mut crate::RequestOptions {
15032            &mut self.0.options
15033        }
15034    }
15035
15036    /// The request builder for [DataScanService::get_location][crate::client::DataScanService::get_location] calls.
15037    ///
15038    /// # Example
15039    /// ```
15040    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetLocation;
15041    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15042    ///
15043    /// let builder = prepare_request_builder();
15044    /// let response = builder.send().await?;
15045    /// # Ok(()) }
15046    ///
15047    /// fn prepare_request_builder() -> GetLocation {
15048    ///   # panic!();
15049    ///   // ... details omitted ...
15050    /// }
15051    /// ```
15052    #[derive(Clone, Debug)]
15053    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
15054
15055    impl GetLocation {
15056        pub(crate) fn new(
15057            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15058        ) -> Self {
15059            Self(RequestBuilder::new(stub))
15060        }
15061
15062        /// Sets the full request, replacing any prior values.
15063        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
15064            mut self,
15065            v: V,
15066        ) -> Self {
15067            self.0.request = v.into();
15068            self
15069        }
15070
15071        /// Sets all the options, replacing any prior values.
15072        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15073            self.0.options = v.into();
15074            self
15075        }
15076
15077        /// Sends the request.
15078        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
15079            (*self.0.stub)
15080                .get_location(self.0.request, self.0.options)
15081                .await
15082                .map(crate::Response::into_body)
15083        }
15084
15085        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
15086        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15087            self.0.request.name = v.into();
15088            self
15089        }
15090    }
15091
15092    #[doc(hidden)]
15093    impl crate::RequestBuilder for GetLocation {
15094        fn request_options(&mut self) -> &mut crate::RequestOptions {
15095            &mut self.0.options
15096        }
15097    }
15098
15099    /// The request builder for [DataScanService::set_iam_policy][crate::client::DataScanService::set_iam_policy] calls.
15100    ///
15101    /// # Example
15102    /// ```
15103    /// # use google_cloud_dataplex_v1::builder::data_scan_service::SetIamPolicy;
15104    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15105    ///
15106    /// let builder = prepare_request_builder();
15107    /// let response = builder.send().await?;
15108    /// # Ok(()) }
15109    ///
15110    /// fn prepare_request_builder() -> SetIamPolicy {
15111    ///   # panic!();
15112    ///   // ... details omitted ...
15113    /// }
15114    /// ```
15115    #[derive(Clone, Debug)]
15116    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
15117
15118    impl SetIamPolicy {
15119        pub(crate) fn new(
15120            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15121        ) -> Self {
15122            Self(RequestBuilder::new(stub))
15123        }
15124
15125        /// Sets the full request, replacing any prior values.
15126        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
15127            mut self,
15128            v: V,
15129        ) -> Self {
15130            self.0.request = v.into();
15131            self
15132        }
15133
15134        /// Sets all the options, replacing any prior values.
15135        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15136            self.0.options = v.into();
15137            self
15138        }
15139
15140        /// Sends the request.
15141        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
15142            (*self.0.stub)
15143                .set_iam_policy(self.0.request, self.0.options)
15144                .await
15145                .map(crate::Response::into_body)
15146        }
15147
15148        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
15149        ///
15150        /// This is a **required** field for requests.
15151        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
15152            self.0.request.resource = v.into();
15153            self
15154        }
15155
15156        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
15157        ///
15158        /// This is a **required** field for requests.
15159        pub fn set_policy<T>(mut self, v: T) -> Self
15160        where
15161            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
15162        {
15163            self.0.request.policy = std::option::Option::Some(v.into());
15164            self
15165        }
15166
15167        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
15168        ///
15169        /// This is a **required** field for requests.
15170        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
15171        where
15172            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
15173        {
15174            self.0.request.policy = v.map(|x| x.into());
15175            self
15176        }
15177
15178        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
15179        pub fn set_update_mask<T>(mut self, v: T) -> Self
15180        where
15181            T: std::convert::Into<wkt::FieldMask>,
15182        {
15183            self.0.request.update_mask = std::option::Option::Some(v.into());
15184            self
15185        }
15186
15187        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
15188        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15189        where
15190            T: std::convert::Into<wkt::FieldMask>,
15191        {
15192            self.0.request.update_mask = v.map(|x| x.into());
15193            self
15194        }
15195    }
15196
15197    #[doc(hidden)]
15198    impl crate::RequestBuilder for SetIamPolicy {
15199        fn request_options(&mut self) -> &mut crate::RequestOptions {
15200            &mut self.0.options
15201        }
15202    }
15203
15204    /// The request builder for [DataScanService::get_iam_policy][crate::client::DataScanService::get_iam_policy] calls.
15205    ///
15206    /// # Example
15207    /// ```
15208    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetIamPolicy;
15209    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15210    ///
15211    /// let builder = prepare_request_builder();
15212    /// let response = builder.send().await?;
15213    /// # Ok(()) }
15214    ///
15215    /// fn prepare_request_builder() -> GetIamPolicy {
15216    ///   # panic!();
15217    ///   // ... details omitted ...
15218    /// }
15219    /// ```
15220    #[derive(Clone, Debug)]
15221    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
15222
15223    impl GetIamPolicy {
15224        pub(crate) fn new(
15225            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15226        ) -> Self {
15227            Self(RequestBuilder::new(stub))
15228        }
15229
15230        /// Sets the full request, replacing any prior values.
15231        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
15232            mut self,
15233            v: V,
15234        ) -> Self {
15235            self.0.request = v.into();
15236            self
15237        }
15238
15239        /// Sets all the options, replacing any prior values.
15240        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15241            self.0.options = v.into();
15242            self
15243        }
15244
15245        /// Sends the request.
15246        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
15247            (*self.0.stub)
15248                .get_iam_policy(self.0.request, self.0.options)
15249                .await
15250                .map(crate::Response::into_body)
15251        }
15252
15253        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
15254        ///
15255        /// This is a **required** field for requests.
15256        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
15257            self.0.request.resource = v.into();
15258            self
15259        }
15260
15261        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
15262        pub fn set_options<T>(mut self, v: T) -> Self
15263        where
15264            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
15265        {
15266            self.0.request.options = std::option::Option::Some(v.into());
15267            self
15268        }
15269
15270        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
15271        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
15272        where
15273            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
15274        {
15275            self.0.request.options = v.map(|x| x.into());
15276            self
15277        }
15278    }
15279
15280    #[doc(hidden)]
15281    impl crate::RequestBuilder for GetIamPolicy {
15282        fn request_options(&mut self) -> &mut crate::RequestOptions {
15283            &mut self.0.options
15284        }
15285    }
15286
15287    /// The request builder for [DataScanService::test_iam_permissions][crate::client::DataScanService::test_iam_permissions] calls.
15288    ///
15289    /// # Example
15290    /// ```
15291    /// # use google_cloud_dataplex_v1::builder::data_scan_service::TestIamPermissions;
15292    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15293    ///
15294    /// let builder = prepare_request_builder();
15295    /// let response = builder.send().await?;
15296    /// # Ok(()) }
15297    ///
15298    /// fn prepare_request_builder() -> TestIamPermissions {
15299    ///   # panic!();
15300    ///   // ... details omitted ...
15301    /// }
15302    /// ```
15303    #[derive(Clone, Debug)]
15304    pub struct TestIamPermissions(
15305        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
15306    );
15307
15308    impl TestIamPermissions {
15309        pub(crate) fn new(
15310            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15311        ) -> Self {
15312            Self(RequestBuilder::new(stub))
15313        }
15314
15315        /// Sets the full request, replacing any prior values.
15316        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
15317            mut self,
15318            v: V,
15319        ) -> Self {
15320            self.0.request = v.into();
15321            self
15322        }
15323
15324        /// Sets all the options, replacing any prior values.
15325        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15326            self.0.options = v.into();
15327            self
15328        }
15329
15330        /// Sends the request.
15331        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
15332            (*self.0.stub)
15333                .test_iam_permissions(self.0.request, self.0.options)
15334                .await
15335                .map(crate::Response::into_body)
15336        }
15337
15338        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
15339        ///
15340        /// This is a **required** field for requests.
15341        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
15342            self.0.request.resource = v.into();
15343            self
15344        }
15345
15346        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
15347        ///
15348        /// This is a **required** field for requests.
15349        pub fn set_permissions<T, V>(mut self, v: T) -> Self
15350        where
15351            T: std::iter::IntoIterator<Item = V>,
15352            V: std::convert::Into<std::string::String>,
15353        {
15354            use std::iter::Iterator;
15355            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
15356            self
15357        }
15358    }
15359
15360    #[doc(hidden)]
15361    impl crate::RequestBuilder for TestIamPermissions {
15362        fn request_options(&mut self) -> &mut crate::RequestOptions {
15363            &mut self.0.options
15364        }
15365    }
15366
15367    /// The request builder for [DataScanService::list_operations][crate::client::DataScanService::list_operations] calls.
15368    ///
15369    /// # Example
15370    /// ```
15371    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListOperations;
15372    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15373    /// use google_cloud_gax::paginator::ItemPaginator;
15374    ///
15375    /// let builder = prepare_request_builder();
15376    /// let mut items = builder.by_item();
15377    /// while let Some(result) = items.next().await {
15378    ///   let item = result?;
15379    /// }
15380    /// # Ok(()) }
15381    ///
15382    /// fn prepare_request_builder() -> ListOperations {
15383    ///   # panic!();
15384    ///   // ... details omitted ...
15385    /// }
15386    /// ```
15387    #[derive(Clone, Debug)]
15388    pub struct ListOperations(
15389        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
15390    );
15391
15392    impl ListOperations {
15393        pub(crate) fn new(
15394            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15395        ) -> Self {
15396            Self(RequestBuilder::new(stub))
15397        }
15398
15399        /// Sets the full request, replacing any prior values.
15400        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
15401            mut self,
15402            v: V,
15403        ) -> Self {
15404            self.0.request = v.into();
15405            self
15406        }
15407
15408        /// Sets all the options, replacing any prior values.
15409        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15410            self.0.options = v.into();
15411            self
15412        }
15413
15414        /// Sends the request.
15415        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
15416            (*self.0.stub)
15417                .list_operations(self.0.request, self.0.options)
15418                .await
15419                .map(crate::Response::into_body)
15420        }
15421
15422        /// Streams each page in the collection.
15423        pub fn by_page(
15424            self,
15425        ) -> impl google_cloud_gax::paginator::Paginator<
15426            google_cloud_longrunning::model::ListOperationsResponse,
15427            crate::Error,
15428        > {
15429            use std::clone::Clone;
15430            let token = self.0.request.page_token.clone();
15431            let execute = move |token: String| {
15432                let mut builder = self.clone();
15433                builder.0.request = builder.0.request.set_page_token(token);
15434                builder.send()
15435            };
15436            google_cloud_gax::paginator::internal::new_paginator(token, execute)
15437        }
15438
15439        /// Streams each item in the collection.
15440        pub fn by_item(
15441            self,
15442        ) -> impl google_cloud_gax::paginator::ItemPaginator<
15443            google_cloud_longrunning::model::ListOperationsResponse,
15444            crate::Error,
15445        > {
15446            use google_cloud_gax::paginator::Paginator;
15447            self.by_page().items()
15448        }
15449
15450        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
15451        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15452            self.0.request.name = v.into();
15453            self
15454        }
15455
15456        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
15457        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15458            self.0.request.filter = v.into();
15459            self
15460        }
15461
15462        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
15463        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15464            self.0.request.page_size = v.into();
15465            self
15466        }
15467
15468        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
15469        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15470            self.0.request.page_token = v.into();
15471            self
15472        }
15473
15474        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
15475        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
15476            self.0.request.return_partial_success = v.into();
15477            self
15478        }
15479    }
15480
15481    #[doc(hidden)]
15482    impl crate::RequestBuilder for ListOperations {
15483        fn request_options(&mut self) -> &mut crate::RequestOptions {
15484            &mut self.0.options
15485        }
15486    }
15487
15488    /// The request builder for [DataScanService::get_operation][crate::client::DataScanService::get_operation] calls.
15489    ///
15490    /// # Example
15491    /// ```
15492    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetOperation;
15493    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15494    ///
15495    /// let builder = prepare_request_builder();
15496    /// let response = builder.send().await?;
15497    /// # Ok(()) }
15498    ///
15499    /// fn prepare_request_builder() -> GetOperation {
15500    ///   # panic!();
15501    ///   // ... details omitted ...
15502    /// }
15503    /// ```
15504    #[derive(Clone, Debug)]
15505    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
15506
15507    impl GetOperation {
15508        pub(crate) fn new(
15509            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15510        ) -> Self {
15511            Self(RequestBuilder::new(stub))
15512        }
15513
15514        /// Sets the full request, replacing any prior values.
15515        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
15516            mut self,
15517            v: V,
15518        ) -> Self {
15519            self.0.request = v.into();
15520            self
15521        }
15522
15523        /// Sets all the options, replacing any prior values.
15524        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15525            self.0.options = v.into();
15526            self
15527        }
15528
15529        /// Sends the request.
15530        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
15531            (*self.0.stub)
15532                .get_operation(self.0.request, self.0.options)
15533                .await
15534                .map(crate::Response::into_body)
15535        }
15536
15537        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
15538        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15539            self.0.request.name = v.into();
15540            self
15541        }
15542    }
15543
15544    #[doc(hidden)]
15545    impl crate::RequestBuilder for GetOperation {
15546        fn request_options(&mut self) -> &mut crate::RequestOptions {
15547            &mut self.0.options
15548        }
15549    }
15550
15551    /// The request builder for [DataScanService::delete_operation][crate::client::DataScanService::delete_operation] calls.
15552    ///
15553    /// # Example
15554    /// ```
15555    /// # use google_cloud_dataplex_v1::builder::data_scan_service::DeleteOperation;
15556    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15557    ///
15558    /// let builder = prepare_request_builder();
15559    /// let response = builder.send().await?;
15560    /// # Ok(()) }
15561    ///
15562    /// fn prepare_request_builder() -> DeleteOperation {
15563    ///   # panic!();
15564    ///   // ... details omitted ...
15565    /// }
15566    /// ```
15567    #[derive(Clone, Debug)]
15568    pub struct DeleteOperation(
15569        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
15570    );
15571
15572    impl DeleteOperation {
15573        pub(crate) fn new(
15574            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15575        ) -> Self {
15576            Self(RequestBuilder::new(stub))
15577        }
15578
15579        /// Sets the full request, replacing any prior values.
15580        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
15581            mut self,
15582            v: V,
15583        ) -> Self {
15584            self.0.request = v.into();
15585            self
15586        }
15587
15588        /// Sets all the options, replacing any prior values.
15589        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15590            self.0.options = v.into();
15591            self
15592        }
15593
15594        /// Sends the request.
15595        pub async fn send(self) -> Result<()> {
15596            (*self.0.stub)
15597                .delete_operation(self.0.request, self.0.options)
15598                .await
15599                .map(crate::Response::into_body)
15600        }
15601
15602        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
15603        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15604            self.0.request.name = v.into();
15605            self
15606        }
15607    }
15608
15609    #[doc(hidden)]
15610    impl crate::RequestBuilder for DeleteOperation {
15611        fn request_options(&mut self) -> &mut crate::RequestOptions {
15612            &mut self.0.options
15613        }
15614    }
15615
15616    /// The request builder for [DataScanService::cancel_operation][crate::client::DataScanService::cancel_operation] calls.
15617    ///
15618    /// # Example
15619    /// ```
15620    /// # use google_cloud_dataplex_v1::builder::data_scan_service::CancelOperation;
15621    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15622    ///
15623    /// let builder = prepare_request_builder();
15624    /// let response = builder.send().await?;
15625    /// # Ok(()) }
15626    ///
15627    /// fn prepare_request_builder() -> CancelOperation {
15628    ///   # panic!();
15629    ///   // ... details omitted ...
15630    /// }
15631    /// ```
15632    #[derive(Clone, Debug)]
15633    pub struct CancelOperation(
15634        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
15635    );
15636
15637    impl CancelOperation {
15638        pub(crate) fn new(
15639            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15640        ) -> Self {
15641            Self(RequestBuilder::new(stub))
15642        }
15643
15644        /// Sets the full request, replacing any prior values.
15645        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
15646            mut self,
15647            v: V,
15648        ) -> Self {
15649            self.0.request = v.into();
15650            self
15651        }
15652
15653        /// Sets all the options, replacing any prior values.
15654        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15655            self.0.options = v.into();
15656            self
15657        }
15658
15659        /// Sends the request.
15660        pub async fn send(self) -> Result<()> {
15661            (*self.0.stub)
15662                .cancel_operation(self.0.request, self.0.options)
15663                .await
15664                .map(crate::Response::into_body)
15665        }
15666
15667        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
15668        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15669            self.0.request.name = v.into();
15670            self
15671        }
15672    }
15673
15674    #[doc(hidden)]
15675    impl crate::RequestBuilder for CancelOperation {
15676        fn request_options(&mut self) -> &mut crate::RequestOptions {
15677            &mut self.0.options
15678        }
15679    }
15680}
15681
15682/// Request and client builders for [MetadataService][crate::client::MetadataService].
15683pub mod metadata_service {
15684    use crate::Result;
15685
15686    /// A builder for [MetadataService][crate::client::MetadataService].
15687    ///
15688    /// ```
15689    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
15690    /// # use google_cloud_dataplex_v1::*;
15691    /// # use builder::metadata_service::ClientBuilder;
15692    /// # use client::MetadataService;
15693    /// let builder : ClientBuilder = MetadataService::builder();
15694    /// let client = builder
15695    ///     .with_endpoint("https://dataplex.googleapis.com")
15696    ///     .build().await?;
15697    /// # Ok(()) }
15698    /// ```
15699    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
15700
15701    pub(crate) mod client {
15702        use super::super::super::client::MetadataService;
15703        pub struct Factory;
15704        impl crate::ClientFactory for Factory {
15705            type Client = MetadataService;
15706            type Credentials = gaxi::options::Credentials;
15707            async fn build(
15708                self,
15709                config: gaxi::options::ClientConfig,
15710            ) -> crate::ClientBuilderResult<Self::Client> {
15711                Self::Client::new(config).await
15712            }
15713        }
15714    }
15715
15716    /// Common implementation for [crate::client::MetadataService] request builders.
15717    #[derive(Clone, Debug)]
15718    pub(crate) struct RequestBuilder<R: std::default::Default> {
15719        stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
15720        request: R,
15721        options: crate::RequestOptions,
15722    }
15723
15724    impl<R> RequestBuilder<R>
15725    where
15726        R: std::default::Default,
15727    {
15728        pub(crate) fn new(
15729            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
15730        ) -> Self {
15731            Self {
15732                stub,
15733                request: R::default(),
15734                options: crate::RequestOptions::default(),
15735            }
15736        }
15737    }
15738
15739    /// The request builder for [MetadataService::create_entity][crate::client::MetadataService::create_entity] calls.
15740    ///
15741    /// # Example
15742    /// ```
15743    /// # use google_cloud_dataplex_v1::builder::metadata_service::CreateEntity;
15744    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15745    ///
15746    /// let builder = prepare_request_builder();
15747    /// let response = builder.send().await?;
15748    /// # Ok(()) }
15749    ///
15750    /// fn prepare_request_builder() -> CreateEntity {
15751    ///   # panic!();
15752    ///   // ... details omitted ...
15753    /// }
15754    /// ```
15755    #[derive(Clone, Debug)]
15756    pub struct CreateEntity(RequestBuilder<crate::model::CreateEntityRequest>);
15757
15758    impl CreateEntity {
15759        pub(crate) fn new(
15760            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
15761        ) -> Self {
15762            Self(RequestBuilder::new(stub))
15763        }
15764
15765        /// Sets the full request, replacing any prior values.
15766        pub fn with_request<V: Into<crate::model::CreateEntityRequest>>(mut self, v: V) -> Self {
15767            self.0.request = v.into();
15768            self
15769        }
15770
15771        /// Sets all the options, replacing any prior values.
15772        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15773            self.0.options = v.into();
15774            self
15775        }
15776
15777        /// Sends the request.
15778        pub async fn send(self) -> Result<crate::model::Entity> {
15779            (*self.0.stub)
15780                .create_entity(self.0.request, self.0.options)
15781                .await
15782                .map(crate::Response::into_body)
15783        }
15784
15785        /// Sets the value of [parent][crate::model::CreateEntityRequest::parent].
15786        ///
15787        /// This is a **required** field for requests.
15788        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15789            self.0.request.parent = v.into();
15790            self
15791        }
15792
15793        /// Sets the value of [entity][crate::model::CreateEntityRequest::entity].
15794        ///
15795        /// This is a **required** field for requests.
15796        pub fn set_entity<T>(mut self, v: T) -> Self
15797        where
15798            T: std::convert::Into<crate::model::Entity>,
15799        {
15800            self.0.request.entity = std::option::Option::Some(v.into());
15801            self
15802        }
15803
15804        /// Sets or clears the value of [entity][crate::model::CreateEntityRequest::entity].
15805        ///
15806        /// This is a **required** field for requests.
15807        pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
15808        where
15809            T: std::convert::Into<crate::model::Entity>,
15810        {
15811            self.0.request.entity = v.map(|x| x.into());
15812            self
15813        }
15814
15815        /// Sets the value of [validate_only][crate::model::CreateEntityRequest::validate_only].
15816        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
15817            self.0.request.validate_only = v.into();
15818            self
15819        }
15820    }
15821
15822    #[doc(hidden)]
15823    impl crate::RequestBuilder for CreateEntity {
15824        fn request_options(&mut self) -> &mut crate::RequestOptions {
15825            &mut self.0.options
15826        }
15827    }
15828
15829    /// The request builder for [MetadataService::update_entity][crate::client::MetadataService::update_entity] calls.
15830    ///
15831    /// # Example
15832    /// ```
15833    /// # use google_cloud_dataplex_v1::builder::metadata_service::UpdateEntity;
15834    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15835    ///
15836    /// let builder = prepare_request_builder();
15837    /// let response = builder.send().await?;
15838    /// # Ok(()) }
15839    ///
15840    /// fn prepare_request_builder() -> UpdateEntity {
15841    ///   # panic!();
15842    ///   // ... details omitted ...
15843    /// }
15844    /// ```
15845    #[derive(Clone, Debug)]
15846    pub struct UpdateEntity(RequestBuilder<crate::model::UpdateEntityRequest>);
15847
15848    impl UpdateEntity {
15849        pub(crate) fn new(
15850            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
15851        ) -> Self {
15852            Self(RequestBuilder::new(stub))
15853        }
15854
15855        /// Sets the full request, replacing any prior values.
15856        pub fn with_request<V: Into<crate::model::UpdateEntityRequest>>(mut self, v: V) -> Self {
15857            self.0.request = v.into();
15858            self
15859        }
15860
15861        /// Sets all the options, replacing any prior values.
15862        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15863            self.0.options = v.into();
15864            self
15865        }
15866
15867        /// Sends the request.
15868        pub async fn send(self) -> Result<crate::model::Entity> {
15869            (*self.0.stub)
15870                .update_entity(self.0.request, self.0.options)
15871                .await
15872                .map(crate::Response::into_body)
15873        }
15874
15875        /// Sets the value of [entity][crate::model::UpdateEntityRequest::entity].
15876        ///
15877        /// This is a **required** field for requests.
15878        pub fn set_entity<T>(mut self, v: T) -> Self
15879        where
15880            T: std::convert::Into<crate::model::Entity>,
15881        {
15882            self.0.request.entity = std::option::Option::Some(v.into());
15883            self
15884        }
15885
15886        /// Sets or clears the value of [entity][crate::model::UpdateEntityRequest::entity].
15887        ///
15888        /// This is a **required** field for requests.
15889        pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
15890        where
15891            T: std::convert::Into<crate::model::Entity>,
15892        {
15893            self.0.request.entity = v.map(|x| x.into());
15894            self
15895        }
15896
15897        /// Sets the value of [validate_only][crate::model::UpdateEntityRequest::validate_only].
15898        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
15899            self.0.request.validate_only = v.into();
15900            self
15901        }
15902    }
15903
15904    #[doc(hidden)]
15905    impl crate::RequestBuilder for UpdateEntity {
15906        fn request_options(&mut self) -> &mut crate::RequestOptions {
15907            &mut self.0.options
15908        }
15909    }
15910
15911    /// The request builder for [MetadataService::delete_entity][crate::client::MetadataService::delete_entity] calls.
15912    ///
15913    /// # Example
15914    /// ```
15915    /// # use google_cloud_dataplex_v1::builder::metadata_service::DeleteEntity;
15916    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15917    ///
15918    /// let builder = prepare_request_builder();
15919    /// let response = builder.send().await?;
15920    /// # Ok(()) }
15921    ///
15922    /// fn prepare_request_builder() -> DeleteEntity {
15923    ///   # panic!();
15924    ///   // ... details omitted ...
15925    /// }
15926    /// ```
15927    #[derive(Clone, Debug)]
15928    pub struct DeleteEntity(RequestBuilder<crate::model::DeleteEntityRequest>);
15929
15930    impl DeleteEntity {
15931        pub(crate) fn new(
15932            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
15933        ) -> Self {
15934            Self(RequestBuilder::new(stub))
15935        }
15936
15937        /// Sets the full request, replacing any prior values.
15938        pub fn with_request<V: Into<crate::model::DeleteEntityRequest>>(mut self, v: V) -> Self {
15939            self.0.request = v.into();
15940            self
15941        }
15942
15943        /// Sets all the options, replacing any prior values.
15944        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15945            self.0.options = v.into();
15946            self
15947        }
15948
15949        /// Sends the request.
15950        pub async fn send(self) -> Result<()> {
15951            (*self.0.stub)
15952                .delete_entity(self.0.request, self.0.options)
15953                .await
15954                .map(crate::Response::into_body)
15955        }
15956
15957        /// Sets the value of [name][crate::model::DeleteEntityRequest::name].
15958        ///
15959        /// This is a **required** field for requests.
15960        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15961            self.0.request.name = v.into();
15962            self
15963        }
15964
15965        /// Sets the value of [etag][crate::model::DeleteEntityRequest::etag].
15966        ///
15967        /// This is a **required** field for requests.
15968        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
15969            self.0.request.etag = v.into();
15970            self
15971        }
15972    }
15973
15974    #[doc(hidden)]
15975    impl crate::RequestBuilder for DeleteEntity {
15976        fn request_options(&mut self) -> &mut crate::RequestOptions {
15977            &mut self.0.options
15978        }
15979    }
15980
15981    /// The request builder for [MetadataService::get_entity][crate::client::MetadataService::get_entity] calls.
15982    ///
15983    /// # Example
15984    /// ```
15985    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetEntity;
15986    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15987    ///
15988    /// let builder = prepare_request_builder();
15989    /// let response = builder.send().await?;
15990    /// # Ok(()) }
15991    ///
15992    /// fn prepare_request_builder() -> GetEntity {
15993    ///   # panic!();
15994    ///   // ... details omitted ...
15995    /// }
15996    /// ```
15997    #[derive(Clone, Debug)]
15998    pub struct GetEntity(RequestBuilder<crate::model::GetEntityRequest>);
15999
16000    impl GetEntity {
16001        pub(crate) fn new(
16002            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16003        ) -> Self {
16004            Self(RequestBuilder::new(stub))
16005        }
16006
16007        /// Sets the full request, replacing any prior values.
16008        pub fn with_request<V: Into<crate::model::GetEntityRequest>>(mut self, v: V) -> Self {
16009            self.0.request = v.into();
16010            self
16011        }
16012
16013        /// Sets all the options, replacing any prior values.
16014        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16015            self.0.options = v.into();
16016            self
16017        }
16018
16019        /// Sends the request.
16020        pub async fn send(self) -> Result<crate::model::Entity> {
16021            (*self.0.stub)
16022                .get_entity(self.0.request, self.0.options)
16023                .await
16024                .map(crate::Response::into_body)
16025        }
16026
16027        /// Sets the value of [name][crate::model::GetEntityRequest::name].
16028        ///
16029        /// This is a **required** field for requests.
16030        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16031            self.0.request.name = v.into();
16032            self
16033        }
16034
16035        /// Sets the value of [view][crate::model::GetEntityRequest::view].
16036        pub fn set_view<T: Into<crate::model::get_entity_request::EntityView>>(
16037            mut self,
16038            v: T,
16039        ) -> Self {
16040            self.0.request.view = v.into();
16041            self
16042        }
16043    }
16044
16045    #[doc(hidden)]
16046    impl crate::RequestBuilder for GetEntity {
16047        fn request_options(&mut self) -> &mut crate::RequestOptions {
16048            &mut self.0.options
16049        }
16050    }
16051
16052    /// The request builder for [MetadataService::list_entities][crate::client::MetadataService::list_entities] calls.
16053    ///
16054    /// # Example
16055    /// ```
16056    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListEntities;
16057    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16058    /// use google_cloud_gax::paginator::ItemPaginator;
16059    ///
16060    /// let builder = prepare_request_builder();
16061    /// let mut items = builder.by_item();
16062    /// while let Some(result) = items.next().await {
16063    ///   let item = result?;
16064    /// }
16065    /// # Ok(()) }
16066    ///
16067    /// fn prepare_request_builder() -> ListEntities {
16068    ///   # panic!();
16069    ///   // ... details omitted ...
16070    /// }
16071    /// ```
16072    #[derive(Clone, Debug)]
16073    pub struct ListEntities(RequestBuilder<crate::model::ListEntitiesRequest>);
16074
16075    impl ListEntities {
16076        pub(crate) fn new(
16077            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16078        ) -> Self {
16079            Self(RequestBuilder::new(stub))
16080        }
16081
16082        /// Sets the full request, replacing any prior values.
16083        pub fn with_request<V: Into<crate::model::ListEntitiesRequest>>(mut self, v: V) -> Self {
16084            self.0.request = v.into();
16085            self
16086        }
16087
16088        /// Sets all the options, replacing any prior values.
16089        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16090            self.0.options = v.into();
16091            self
16092        }
16093
16094        /// Sends the request.
16095        pub async fn send(self) -> Result<crate::model::ListEntitiesResponse> {
16096            (*self.0.stub)
16097                .list_entities(self.0.request, self.0.options)
16098                .await
16099                .map(crate::Response::into_body)
16100        }
16101
16102        /// Streams each page in the collection.
16103        pub fn by_page(
16104            self,
16105        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListEntitiesResponse, crate::Error>
16106        {
16107            use std::clone::Clone;
16108            let token = self.0.request.page_token.clone();
16109            let execute = move |token: String| {
16110                let mut builder = self.clone();
16111                builder.0.request = builder.0.request.set_page_token(token);
16112                builder.send()
16113            };
16114            google_cloud_gax::paginator::internal::new_paginator(token, execute)
16115        }
16116
16117        /// Streams each item in the collection.
16118        pub fn by_item(
16119            self,
16120        ) -> impl google_cloud_gax::paginator::ItemPaginator<
16121            crate::model::ListEntitiesResponse,
16122            crate::Error,
16123        > {
16124            use google_cloud_gax::paginator::Paginator;
16125            self.by_page().items()
16126        }
16127
16128        /// Sets the value of [parent][crate::model::ListEntitiesRequest::parent].
16129        ///
16130        /// This is a **required** field for requests.
16131        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16132            self.0.request.parent = v.into();
16133            self
16134        }
16135
16136        /// Sets the value of [view][crate::model::ListEntitiesRequest::view].
16137        ///
16138        /// This is a **required** field for requests.
16139        pub fn set_view<T: Into<crate::model::list_entities_request::EntityView>>(
16140            mut self,
16141            v: T,
16142        ) -> Self {
16143            self.0.request.view = v.into();
16144            self
16145        }
16146
16147        /// Sets the value of [page_size][crate::model::ListEntitiesRequest::page_size].
16148        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16149            self.0.request.page_size = v.into();
16150            self
16151        }
16152
16153        /// Sets the value of [page_token][crate::model::ListEntitiesRequest::page_token].
16154        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16155            self.0.request.page_token = v.into();
16156            self
16157        }
16158
16159        /// Sets the value of [filter][crate::model::ListEntitiesRequest::filter].
16160        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16161            self.0.request.filter = v.into();
16162            self
16163        }
16164    }
16165
16166    #[doc(hidden)]
16167    impl crate::RequestBuilder for ListEntities {
16168        fn request_options(&mut self) -> &mut crate::RequestOptions {
16169            &mut self.0.options
16170        }
16171    }
16172
16173    /// The request builder for [MetadataService::create_partition][crate::client::MetadataService::create_partition] calls.
16174    ///
16175    /// # Example
16176    /// ```
16177    /// # use google_cloud_dataplex_v1::builder::metadata_service::CreatePartition;
16178    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16179    ///
16180    /// let builder = prepare_request_builder();
16181    /// let response = builder.send().await?;
16182    /// # Ok(()) }
16183    ///
16184    /// fn prepare_request_builder() -> CreatePartition {
16185    ///   # panic!();
16186    ///   // ... details omitted ...
16187    /// }
16188    /// ```
16189    #[derive(Clone, Debug)]
16190    pub struct CreatePartition(RequestBuilder<crate::model::CreatePartitionRequest>);
16191
16192    impl CreatePartition {
16193        pub(crate) fn new(
16194            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16195        ) -> Self {
16196            Self(RequestBuilder::new(stub))
16197        }
16198
16199        /// Sets the full request, replacing any prior values.
16200        pub fn with_request<V: Into<crate::model::CreatePartitionRequest>>(mut self, v: V) -> Self {
16201            self.0.request = v.into();
16202            self
16203        }
16204
16205        /// Sets all the options, replacing any prior values.
16206        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16207            self.0.options = v.into();
16208            self
16209        }
16210
16211        /// Sends the request.
16212        pub async fn send(self) -> Result<crate::model::Partition> {
16213            (*self.0.stub)
16214                .create_partition(self.0.request, self.0.options)
16215                .await
16216                .map(crate::Response::into_body)
16217        }
16218
16219        /// Sets the value of [parent][crate::model::CreatePartitionRequest::parent].
16220        ///
16221        /// This is a **required** field for requests.
16222        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16223            self.0.request.parent = v.into();
16224            self
16225        }
16226
16227        /// Sets the value of [partition][crate::model::CreatePartitionRequest::partition].
16228        ///
16229        /// This is a **required** field for requests.
16230        pub fn set_partition<T>(mut self, v: T) -> Self
16231        where
16232            T: std::convert::Into<crate::model::Partition>,
16233        {
16234            self.0.request.partition = std::option::Option::Some(v.into());
16235            self
16236        }
16237
16238        /// Sets or clears the value of [partition][crate::model::CreatePartitionRequest::partition].
16239        ///
16240        /// This is a **required** field for requests.
16241        pub fn set_or_clear_partition<T>(mut self, v: std::option::Option<T>) -> Self
16242        where
16243            T: std::convert::Into<crate::model::Partition>,
16244        {
16245            self.0.request.partition = v.map(|x| x.into());
16246            self
16247        }
16248
16249        /// Sets the value of [validate_only][crate::model::CreatePartitionRequest::validate_only].
16250        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16251            self.0.request.validate_only = v.into();
16252            self
16253        }
16254    }
16255
16256    #[doc(hidden)]
16257    impl crate::RequestBuilder for CreatePartition {
16258        fn request_options(&mut self) -> &mut crate::RequestOptions {
16259            &mut self.0.options
16260        }
16261    }
16262
16263    /// The request builder for [MetadataService::delete_partition][crate::client::MetadataService::delete_partition] calls.
16264    ///
16265    /// # Example
16266    /// ```
16267    /// # use google_cloud_dataplex_v1::builder::metadata_service::DeletePartition;
16268    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16269    ///
16270    /// let builder = prepare_request_builder();
16271    /// let response = builder.send().await?;
16272    /// # Ok(()) }
16273    ///
16274    /// fn prepare_request_builder() -> DeletePartition {
16275    ///   # panic!();
16276    ///   // ... details omitted ...
16277    /// }
16278    /// ```
16279    #[derive(Clone, Debug)]
16280    pub struct DeletePartition(RequestBuilder<crate::model::DeletePartitionRequest>);
16281
16282    impl DeletePartition {
16283        pub(crate) fn new(
16284            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16285        ) -> Self {
16286            Self(RequestBuilder::new(stub))
16287        }
16288
16289        /// Sets the full request, replacing any prior values.
16290        pub fn with_request<V: Into<crate::model::DeletePartitionRequest>>(mut self, v: V) -> Self {
16291            self.0.request = v.into();
16292            self
16293        }
16294
16295        /// Sets all the options, replacing any prior values.
16296        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16297            self.0.options = v.into();
16298            self
16299        }
16300
16301        /// Sends the request.
16302        pub async fn send(self) -> Result<()> {
16303            (*self.0.stub)
16304                .delete_partition(self.0.request, self.0.options)
16305                .await
16306                .map(crate::Response::into_body)
16307        }
16308
16309        /// Sets the value of [name][crate::model::DeletePartitionRequest::name].
16310        ///
16311        /// This is a **required** field for requests.
16312        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16313            self.0.request.name = v.into();
16314            self
16315        }
16316
16317        /// Sets the value of [etag][crate::model::DeletePartitionRequest::etag].
16318        #[deprecated]
16319        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
16320            self.0.request.etag = v.into();
16321            self
16322        }
16323    }
16324
16325    #[doc(hidden)]
16326    impl crate::RequestBuilder for DeletePartition {
16327        fn request_options(&mut self) -> &mut crate::RequestOptions {
16328            &mut self.0.options
16329        }
16330    }
16331
16332    /// The request builder for [MetadataService::get_partition][crate::client::MetadataService::get_partition] calls.
16333    ///
16334    /// # Example
16335    /// ```
16336    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetPartition;
16337    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16338    ///
16339    /// let builder = prepare_request_builder();
16340    /// let response = builder.send().await?;
16341    /// # Ok(()) }
16342    ///
16343    /// fn prepare_request_builder() -> GetPartition {
16344    ///   # panic!();
16345    ///   // ... details omitted ...
16346    /// }
16347    /// ```
16348    #[derive(Clone, Debug)]
16349    pub struct GetPartition(RequestBuilder<crate::model::GetPartitionRequest>);
16350
16351    impl GetPartition {
16352        pub(crate) fn new(
16353            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16354        ) -> Self {
16355            Self(RequestBuilder::new(stub))
16356        }
16357
16358        /// Sets the full request, replacing any prior values.
16359        pub fn with_request<V: Into<crate::model::GetPartitionRequest>>(mut self, v: V) -> Self {
16360            self.0.request = v.into();
16361            self
16362        }
16363
16364        /// Sets all the options, replacing any prior values.
16365        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16366            self.0.options = v.into();
16367            self
16368        }
16369
16370        /// Sends the request.
16371        pub async fn send(self) -> Result<crate::model::Partition> {
16372            (*self.0.stub)
16373                .get_partition(self.0.request, self.0.options)
16374                .await
16375                .map(crate::Response::into_body)
16376        }
16377
16378        /// Sets the value of [name][crate::model::GetPartitionRequest::name].
16379        ///
16380        /// This is a **required** field for requests.
16381        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16382            self.0.request.name = v.into();
16383            self
16384        }
16385    }
16386
16387    #[doc(hidden)]
16388    impl crate::RequestBuilder for GetPartition {
16389        fn request_options(&mut self) -> &mut crate::RequestOptions {
16390            &mut self.0.options
16391        }
16392    }
16393
16394    /// The request builder for [MetadataService::list_partitions][crate::client::MetadataService::list_partitions] calls.
16395    ///
16396    /// # Example
16397    /// ```
16398    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListPartitions;
16399    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16400    /// use google_cloud_gax::paginator::ItemPaginator;
16401    ///
16402    /// let builder = prepare_request_builder();
16403    /// let mut items = builder.by_item();
16404    /// while let Some(result) = items.next().await {
16405    ///   let item = result?;
16406    /// }
16407    /// # Ok(()) }
16408    ///
16409    /// fn prepare_request_builder() -> ListPartitions {
16410    ///   # panic!();
16411    ///   // ... details omitted ...
16412    /// }
16413    /// ```
16414    #[derive(Clone, Debug)]
16415    pub struct ListPartitions(RequestBuilder<crate::model::ListPartitionsRequest>);
16416
16417    impl ListPartitions {
16418        pub(crate) fn new(
16419            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16420        ) -> Self {
16421            Self(RequestBuilder::new(stub))
16422        }
16423
16424        /// Sets the full request, replacing any prior values.
16425        pub fn with_request<V: Into<crate::model::ListPartitionsRequest>>(mut self, v: V) -> Self {
16426            self.0.request = v.into();
16427            self
16428        }
16429
16430        /// Sets all the options, replacing any prior values.
16431        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16432            self.0.options = v.into();
16433            self
16434        }
16435
16436        /// Sends the request.
16437        pub async fn send(self) -> Result<crate::model::ListPartitionsResponse> {
16438            (*self.0.stub)
16439                .list_partitions(self.0.request, self.0.options)
16440                .await
16441                .map(crate::Response::into_body)
16442        }
16443
16444        /// Streams each page in the collection.
16445        pub fn by_page(
16446            self,
16447        ) -> impl google_cloud_gax::paginator::Paginator<
16448            crate::model::ListPartitionsResponse,
16449            crate::Error,
16450        > {
16451            use std::clone::Clone;
16452            let token = self.0.request.page_token.clone();
16453            let execute = move |token: String| {
16454                let mut builder = self.clone();
16455                builder.0.request = builder.0.request.set_page_token(token);
16456                builder.send()
16457            };
16458            google_cloud_gax::paginator::internal::new_paginator(token, execute)
16459        }
16460
16461        /// Streams each item in the collection.
16462        pub fn by_item(
16463            self,
16464        ) -> impl google_cloud_gax::paginator::ItemPaginator<
16465            crate::model::ListPartitionsResponse,
16466            crate::Error,
16467        > {
16468            use google_cloud_gax::paginator::Paginator;
16469            self.by_page().items()
16470        }
16471
16472        /// Sets the value of [parent][crate::model::ListPartitionsRequest::parent].
16473        ///
16474        /// This is a **required** field for requests.
16475        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16476            self.0.request.parent = v.into();
16477            self
16478        }
16479
16480        /// Sets the value of [page_size][crate::model::ListPartitionsRequest::page_size].
16481        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16482            self.0.request.page_size = v.into();
16483            self
16484        }
16485
16486        /// Sets the value of [page_token][crate::model::ListPartitionsRequest::page_token].
16487        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16488            self.0.request.page_token = v.into();
16489            self
16490        }
16491
16492        /// Sets the value of [filter][crate::model::ListPartitionsRequest::filter].
16493        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16494            self.0.request.filter = v.into();
16495            self
16496        }
16497    }
16498
16499    #[doc(hidden)]
16500    impl crate::RequestBuilder for ListPartitions {
16501        fn request_options(&mut self) -> &mut crate::RequestOptions {
16502            &mut self.0.options
16503        }
16504    }
16505
16506    /// The request builder for [MetadataService::list_locations][crate::client::MetadataService::list_locations] calls.
16507    ///
16508    /// # Example
16509    /// ```
16510    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListLocations;
16511    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16512    /// use google_cloud_gax::paginator::ItemPaginator;
16513    ///
16514    /// let builder = prepare_request_builder();
16515    /// let mut items = builder.by_item();
16516    /// while let Some(result) = items.next().await {
16517    ///   let item = result?;
16518    /// }
16519    /// # Ok(()) }
16520    ///
16521    /// fn prepare_request_builder() -> ListLocations {
16522    ///   # panic!();
16523    ///   // ... details omitted ...
16524    /// }
16525    /// ```
16526    #[derive(Clone, Debug)]
16527    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
16528
16529    impl ListLocations {
16530        pub(crate) fn new(
16531            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16532        ) -> Self {
16533            Self(RequestBuilder::new(stub))
16534        }
16535
16536        /// Sets the full request, replacing any prior values.
16537        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
16538            mut self,
16539            v: V,
16540        ) -> Self {
16541            self.0.request = v.into();
16542            self
16543        }
16544
16545        /// Sets all the options, replacing any prior values.
16546        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16547            self.0.options = v.into();
16548            self
16549        }
16550
16551        /// Sends the request.
16552        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
16553            (*self.0.stub)
16554                .list_locations(self.0.request, self.0.options)
16555                .await
16556                .map(crate::Response::into_body)
16557        }
16558
16559        /// Streams each page in the collection.
16560        pub fn by_page(
16561            self,
16562        ) -> impl google_cloud_gax::paginator::Paginator<
16563            google_cloud_location::model::ListLocationsResponse,
16564            crate::Error,
16565        > {
16566            use std::clone::Clone;
16567            let token = self.0.request.page_token.clone();
16568            let execute = move |token: String| {
16569                let mut builder = self.clone();
16570                builder.0.request = builder.0.request.set_page_token(token);
16571                builder.send()
16572            };
16573            google_cloud_gax::paginator::internal::new_paginator(token, execute)
16574        }
16575
16576        /// Streams each item in the collection.
16577        pub fn by_item(
16578            self,
16579        ) -> impl google_cloud_gax::paginator::ItemPaginator<
16580            google_cloud_location::model::ListLocationsResponse,
16581            crate::Error,
16582        > {
16583            use google_cloud_gax::paginator::Paginator;
16584            self.by_page().items()
16585        }
16586
16587        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
16588        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16589            self.0.request.name = v.into();
16590            self
16591        }
16592
16593        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
16594        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16595            self.0.request.filter = v.into();
16596            self
16597        }
16598
16599        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
16600        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16601            self.0.request.page_size = v.into();
16602            self
16603        }
16604
16605        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
16606        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16607            self.0.request.page_token = v.into();
16608            self
16609        }
16610    }
16611
16612    #[doc(hidden)]
16613    impl crate::RequestBuilder for ListLocations {
16614        fn request_options(&mut self) -> &mut crate::RequestOptions {
16615            &mut self.0.options
16616        }
16617    }
16618
16619    /// The request builder for [MetadataService::get_location][crate::client::MetadataService::get_location] calls.
16620    ///
16621    /// # Example
16622    /// ```
16623    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetLocation;
16624    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16625    ///
16626    /// let builder = prepare_request_builder();
16627    /// let response = builder.send().await?;
16628    /// # Ok(()) }
16629    ///
16630    /// fn prepare_request_builder() -> GetLocation {
16631    ///   # panic!();
16632    ///   // ... details omitted ...
16633    /// }
16634    /// ```
16635    #[derive(Clone, Debug)]
16636    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
16637
16638    impl GetLocation {
16639        pub(crate) fn new(
16640            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16641        ) -> Self {
16642            Self(RequestBuilder::new(stub))
16643        }
16644
16645        /// Sets the full request, replacing any prior values.
16646        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
16647            mut self,
16648            v: V,
16649        ) -> Self {
16650            self.0.request = v.into();
16651            self
16652        }
16653
16654        /// Sets all the options, replacing any prior values.
16655        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16656            self.0.options = v.into();
16657            self
16658        }
16659
16660        /// Sends the request.
16661        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
16662            (*self.0.stub)
16663                .get_location(self.0.request, self.0.options)
16664                .await
16665                .map(crate::Response::into_body)
16666        }
16667
16668        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
16669        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16670            self.0.request.name = v.into();
16671            self
16672        }
16673    }
16674
16675    #[doc(hidden)]
16676    impl crate::RequestBuilder for GetLocation {
16677        fn request_options(&mut self) -> &mut crate::RequestOptions {
16678            &mut self.0.options
16679        }
16680    }
16681
16682    /// The request builder for [MetadataService::set_iam_policy][crate::client::MetadataService::set_iam_policy] calls.
16683    ///
16684    /// # Example
16685    /// ```
16686    /// # use google_cloud_dataplex_v1::builder::metadata_service::SetIamPolicy;
16687    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16688    ///
16689    /// let builder = prepare_request_builder();
16690    /// let response = builder.send().await?;
16691    /// # Ok(()) }
16692    ///
16693    /// fn prepare_request_builder() -> SetIamPolicy {
16694    ///   # panic!();
16695    ///   // ... details omitted ...
16696    /// }
16697    /// ```
16698    #[derive(Clone, Debug)]
16699    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
16700
16701    impl SetIamPolicy {
16702        pub(crate) fn new(
16703            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16704        ) -> Self {
16705            Self(RequestBuilder::new(stub))
16706        }
16707
16708        /// Sets the full request, replacing any prior values.
16709        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
16710            mut self,
16711            v: V,
16712        ) -> Self {
16713            self.0.request = v.into();
16714            self
16715        }
16716
16717        /// Sets all the options, replacing any prior values.
16718        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16719            self.0.options = v.into();
16720            self
16721        }
16722
16723        /// Sends the request.
16724        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
16725            (*self.0.stub)
16726                .set_iam_policy(self.0.request, self.0.options)
16727                .await
16728                .map(crate::Response::into_body)
16729        }
16730
16731        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
16732        ///
16733        /// This is a **required** field for requests.
16734        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
16735            self.0.request.resource = v.into();
16736            self
16737        }
16738
16739        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
16740        ///
16741        /// This is a **required** field for requests.
16742        pub fn set_policy<T>(mut self, v: T) -> Self
16743        where
16744            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
16745        {
16746            self.0.request.policy = std::option::Option::Some(v.into());
16747            self
16748        }
16749
16750        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
16751        ///
16752        /// This is a **required** field for requests.
16753        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
16754        where
16755            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
16756        {
16757            self.0.request.policy = v.map(|x| x.into());
16758            self
16759        }
16760
16761        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
16762        pub fn set_update_mask<T>(mut self, v: T) -> Self
16763        where
16764            T: std::convert::Into<wkt::FieldMask>,
16765        {
16766            self.0.request.update_mask = std::option::Option::Some(v.into());
16767            self
16768        }
16769
16770        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
16771        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
16772        where
16773            T: std::convert::Into<wkt::FieldMask>,
16774        {
16775            self.0.request.update_mask = v.map(|x| x.into());
16776            self
16777        }
16778    }
16779
16780    #[doc(hidden)]
16781    impl crate::RequestBuilder for SetIamPolicy {
16782        fn request_options(&mut self) -> &mut crate::RequestOptions {
16783            &mut self.0.options
16784        }
16785    }
16786
16787    /// The request builder for [MetadataService::get_iam_policy][crate::client::MetadataService::get_iam_policy] calls.
16788    ///
16789    /// # Example
16790    /// ```
16791    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetIamPolicy;
16792    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16793    ///
16794    /// let builder = prepare_request_builder();
16795    /// let response = builder.send().await?;
16796    /// # Ok(()) }
16797    ///
16798    /// fn prepare_request_builder() -> GetIamPolicy {
16799    ///   # panic!();
16800    ///   // ... details omitted ...
16801    /// }
16802    /// ```
16803    #[derive(Clone, Debug)]
16804    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
16805
16806    impl GetIamPolicy {
16807        pub(crate) fn new(
16808            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16809        ) -> Self {
16810            Self(RequestBuilder::new(stub))
16811        }
16812
16813        /// Sets the full request, replacing any prior values.
16814        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
16815            mut self,
16816            v: V,
16817        ) -> Self {
16818            self.0.request = v.into();
16819            self
16820        }
16821
16822        /// Sets all the options, replacing any prior values.
16823        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16824            self.0.options = v.into();
16825            self
16826        }
16827
16828        /// Sends the request.
16829        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
16830            (*self.0.stub)
16831                .get_iam_policy(self.0.request, self.0.options)
16832                .await
16833                .map(crate::Response::into_body)
16834        }
16835
16836        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
16837        ///
16838        /// This is a **required** field for requests.
16839        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
16840            self.0.request.resource = v.into();
16841            self
16842        }
16843
16844        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
16845        pub fn set_options<T>(mut self, v: T) -> Self
16846        where
16847            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
16848        {
16849            self.0.request.options = std::option::Option::Some(v.into());
16850            self
16851        }
16852
16853        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
16854        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
16855        where
16856            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
16857        {
16858            self.0.request.options = v.map(|x| x.into());
16859            self
16860        }
16861    }
16862
16863    #[doc(hidden)]
16864    impl crate::RequestBuilder for GetIamPolicy {
16865        fn request_options(&mut self) -> &mut crate::RequestOptions {
16866            &mut self.0.options
16867        }
16868    }
16869
16870    /// The request builder for [MetadataService::test_iam_permissions][crate::client::MetadataService::test_iam_permissions] calls.
16871    ///
16872    /// # Example
16873    /// ```
16874    /// # use google_cloud_dataplex_v1::builder::metadata_service::TestIamPermissions;
16875    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16876    ///
16877    /// let builder = prepare_request_builder();
16878    /// let response = builder.send().await?;
16879    /// # Ok(()) }
16880    ///
16881    /// fn prepare_request_builder() -> TestIamPermissions {
16882    ///   # panic!();
16883    ///   // ... details omitted ...
16884    /// }
16885    /// ```
16886    #[derive(Clone, Debug)]
16887    pub struct TestIamPermissions(
16888        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
16889    );
16890
16891    impl TestIamPermissions {
16892        pub(crate) fn new(
16893            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16894        ) -> Self {
16895            Self(RequestBuilder::new(stub))
16896        }
16897
16898        /// Sets the full request, replacing any prior values.
16899        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
16900            mut self,
16901            v: V,
16902        ) -> Self {
16903            self.0.request = v.into();
16904            self
16905        }
16906
16907        /// Sets all the options, replacing any prior values.
16908        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16909            self.0.options = v.into();
16910            self
16911        }
16912
16913        /// Sends the request.
16914        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
16915            (*self.0.stub)
16916                .test_iam_permissions(self.0.request, self.0.options)
16917                .await
16918                .map(crate::Response::into_body)
16919        }
16920
16921        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
16922        ///
16923        /// This is a **required** field for requests.
16924        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
16925            self.0.request.resource = v.into();
16926            self
16927        }
16928
16929        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
16930        ///
16931        /// This is a **required** field for requests.
16932        pub fn set_permissions<T, V>(mut self, v: T) -> Self
16933        where
16934            T: std::iter::IntoIterator<Item = V>,
16935            V: std::convert::Into<std::string::String>,
16936        {
16937            use std::iter::Iterator;
16938            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
16939            self
16940        }
16941    }
16942
16943    #[doc(hidden)]
16944    impl crate::RequestBuilder for TestIamPermissions {
16945        fn request_options(&mut self) -> &mut crate::RequestOptions {
16946            &mut self.0.options
16947        }
16948    }
16949
16950    /// The request builder for [MetadataService::list_operations][crate::client::MetadataService::list_operations] calls.
16951    ///
16952    /// # Example
16953    /// ```
16954    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListOperations;
16955    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16956    /// use google_cloud_gax::paginator::ItemPaginator;
16957    ///
16958    /// let builder = prepare_request_builder();
16959    /// let mut items = builder.by_item();
16960    /// while let Some(result) = items.next().await {
16961    ///   let item = result?;
16962    /// }
16963    /// # Ok(()) }
16964    ///
16965    /// fn prepare_request_builder() -> ListOperations {
16966    ///   # panic!();
16967    ///   // ... details omitted ...
16968    /// }
16969    /// ```
16970    #[derive(Clone, Debug)]
16971    pub struct ListOperations(
16972        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
16973    );
16974
16975    impl ListOperations {
16976        pub(crate) fn new(
16977            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16978        ) -> Self {
16979            Self(RequestBuilder::new(stub))
16980        }
16981
16982        /// Sets the full request, replacing any prior values.
16983        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
16984            mut self,
16985            v: V,
16986        ) -> Self {
16987            self.0.request = v.into();
16988            self
16989        }
16990
16991        /// Sets all the options, replacing any prior values.
16992        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16993            self.0.options = v.into();
16994            self
16995        }
16996
16997        /// Sends the request.
16998        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
16999            (*self.0.stub)
17000                .list_operations(self.0.request, self.0.options)
17001                .await
17002                .map(crate::Response::into_body)
17003        }
17004
17005        /// Streams each page in the collection.
17006        pub fn by_page(
17007            self,
17008        ) -> impl google_cloud_gax::paginator::Paginator<
17009            google_cloud_longrunning::model::ListOperationsResponse,
17010            crate::Error,
17011        > {
17012            use std::clone::Clone;
17013            let token = self.0.request.page_token.clone();
17014            let execute = move |token: String| {
17015                let mut builder = self.clone();
17016                builder.0.request = builder.0.request.set_page_token(token);
17017                builder.send()
17018            };
17019            google_cloud_gax::paginator::internal::new_paginator(token, execute)
17020        }
17021
17022        /// Streams each item in the collection.
17023        pub fn by_item(
17024            self,
17025        ) -> impl google_cloud_gax::paginator::ItemPaginator<
17026            google_cloud_longrunning::model::ListOperationsResponse,
17027            crate::Error,
17028        > {
17029            use google_cloud_gax::paginator::Paginator;
17030            self.by_page().items()
17031        }
17032
17033        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
17034        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17035            self.0.request.name = v.into();
17036            self
17037        }
17038
17039        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
17040        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
17041            self.0.request.filter = v.into();
17042            self
17043        }
17044
17045        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
17046        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17047            self.0.request.page_size = v.into();
17048            self
17049        }
17050
17051        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
17052        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17053            self.0.request.page_token = v.into();
17054            self
17055        }
17056
17057        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
17058        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
17059            self.0.request.return_partial_success = v.into();
17060            self
17061        }
17062    }
17063
17064    #[doc(hidden)]
17065    impl crate::RequestBuilder for ListOperations {
17066        fn request_options(&mut self) -> &mut crate::RequestOptions {
17067            &mut self.0.options
17068        }
17069    }
17070
17071    /// The request builder for [MetadataService::get_operation][crate::client::MetadataService::get_operation] calls.
17072    ///
17073    /// # Example
17074    /// ```
17075    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetOperation;
17076    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17077    ///
17078    /// let builder = prepare_request_builder();
17079    /// let response = builder.send().await?;
17080    /// # Ok(()) }
17081    ///
17082    /// fn prepare_request_builder() -> GetOperation {
17083    ///   # panic!();
17084    ///   // ... details omitted ...
17085    /// }
17086    /// ```
17087    #[derive(Clone, Debug)]
17088    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
17089
17090    impl GetOperation {
17091        pub(crate) fn new(
17092            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17093        ) -> Self {
17094            Self(RequestBuilder::new(stub))
17095        }
17096
17097        /// Sets the full request, replacing any prior values.
17098        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
17099            mut self,
17100            v: V,
17101        ) -> Self {
17102            self.0.request = v.into();
17103            self
17104        }
17105
17106        /// Sets all the options, replacing any prior values.
17107        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17108            self.0.options = v.into();
17109            self
17110        }
17111
17112        /// Sends the request.
17113        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17114            (*self.0.stub)
17115                .get_operation(self.0.request, self.0.options)
17116                .await
17117                .map(crate::Response::into_body)
17118        }
17119
17120        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
17121        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17122            self.0.request.name = v.into();
17123            self
17124        }
17125    }
17126
17127    #[doc(hidden)]
17128    impl crate::RequestBuilder for GetOperation {
17129        fn request_options(&mut self) -> &mut crate::RequestOptions {
17130            &mut self.0.options
17131        }
17132    }
17133
17134    /// The request builder for [MetadataService::delete_operation][crate::client::MetadataService::delete_operation] calls.
17135    ///
17136    /// # Example
17137    /// ```
17138    /// # use google_cloud_dataplex_v1::builder::metadata_service::DeleteOperation;
17139    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17140    ///
17141    /// let builder = prepare_request_builder();
17142    /// let response = builder.send().await?;
17143    /// # Ok(()) }
17144    ///
17145    /// fn prepare_request_builder() -> DeleteOperation {
17146    ///   # panic!();
17147    ///   // ... details omitted ...
17148    /// }
17149    /// ```
17150    #[derive(Clone, Debug)]
17151    pub struct DeleteOperation(
17152        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
17153    );
17154
17155    impl DeleteOperation {
17156        pub(crate) fn new(
17157            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17158        ) -> Self {
17159            Self(RequestBuilder::new(stub))
17160        }
17161
17162        /// Sets the full request, replacing any prior values.
17163        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
17164            mut self,
17165            v: V,
17166        ) -> Self {
17167            self.0.request = v.into();
17168            self
17169        }
17170
17171        /// Sets all the options, replacing any prior values.
17172        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17173            self.0.options = v.into();
17174            self
17175        }
17176
17177        /// Sends the request.
17178        pub async fn send(self) -> Result<()> {
17179            (*self.0.stub)
17180                .delete_operation(self.0.request, self.0.options)
17181                .await
17182                .map(crate::Response::into_body)
17183        }
17184
17185        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
17186        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17187            self.0.request.name = v.into();
17188            self
17189        }
17190    }
17191
17192    #[doc(hidden)]
17193    impl crate::RequestBuilder for DeleteOperation {
17194        fn request_options(&mut self) -> &mut crate::RequestOptions {
17195            &mut self.0.options
17196        }
17197    }
17198
17199    /// The request builder for [MetadataService::cancel_operation][crate::client::MetadataService::cancel_operation] calls.
17200    ///
17201    /// # Example
17202    /// ```
17203    /// # use google_cloud_dataplex_v1::builder::metadata_service::CancelOperation;
17204    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17205    ///
17206    /// let builder = prepare_request_builder();
17207    /// let response = builder.send().await?;
17208    /// # Ok(()) }
17209    ///
17210    /// fn prepare_request_builder() -> CancelOperation {
17211    ///   # panic!();
17212    ///   // ... details omitted ...
17213    /// }
17214    /// ```
17215    #[derive(Clone, Debug)]
17216    pub struct CancelOperation(
17217        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
17218    );
17219
17220    impl CancelOperation {
17221        pub(crate) fn new(
17222            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17223        ) -> Self {
17224            Self(RequestBuilder::new(stub))
17225        }
17226
17227        /// Sets the full request, replacing any prior values.
17228        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
17229            mut self,
17230            v: V,
17231        ) -> Self {
17232            self.0.request = v.into();
17233            self
17234        }
17235
17236        /// Sets all the options, replacing any prior values.
17237        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17238            self.0.options = v.into();
17239            self
17240        }
17241
17242        /// Sends the request.
17243        pub async fn send(self) -> Result<()> {
17244            (*self.0.stub)
17245                .cancel_operation(self.0.request, self.0.options)
17246                .await
17247                .map(crate::Response::into_body)
17248        }
17249
17250        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
17251        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17252            self.0.request.name = v.into();
17253            self
17254        }
17255    }
17256
17257    #[doc(hidden)]
17258    impl crate::RequestBuilder for CancelOperation {
17259        fn request_options(&mut self) -> &mut crate::RequestOptions {
17260            &mut self.0.options
17261        }
17262    }
17263}
17264
17265/// Request and client builders for [DataplexService][crate::client::DataplexService].
17266pub mod dataplex_service {
17267    use crate::Result;
17268
17269    /// A builder for [DataplexService][crate::client::DataplexService].
17270    ///
17271    /// ```
17272    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
17273    /// # use google_cloud_dataplex_v1::*;
17274    /// # use builder::dataplex_service::ClientBuilder;
17275    /// # use client::DataplexService;
17276    /// let builder : ClientBuilder = DataplexService::builder();
17277    /// let client = builder
17278    ///     .with_endpoint("https://dataplex.googleapis.com")
17279    ///     .build().await?;
17280    /// # Ok(()) }
17281    /// ```
17282    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
17283
17284    pub(crate) mod client {
17285        use super::super::super::client::DataplexService;
17286        pub struct Factory;
17287        impl crate::ClientFactory for Factory {
17288            type Client = DataplexService;
17289            type Credentials = gaxi::options::Credentials;
17290            async fn build(
17291                self,
17292                config: gaxi::options::ClientConfig,
17293            ) -> crate::ClientBuilderResult<Self::Client> {
17294                Self::Client::new(config).await
17295            }
17296        }
17297    }
17298
17299    /// Common implementation for [crate::client::DataplexService] request builders.
17300    #[derive(Clone, Debug)]
17301    pub(crate) struct RequestBuilder<R: std::default::Default> {
17302        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17303        request: R,
17304        options: crate::RequestOptions,
17305    }
17306
17307    impl<R> RequestBuilder<R>
17308    where
17309        R: std::default::Default,
17310    {
17311        pub(crate) fn new(
17312            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17313        ) -> Self {
17314            Self {
17315                stub,
17316                request: R::default(),
17317                options: crate::RequestOptions::default(),
17318            }
17319        }
17320    }
17321
17322    /// The request builder for [DataplexService::create_lake][crate::client::DataplexService::create_lake] calls.
17323    ///
17324    /// # Example
17325    /// ```
17326    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateLake;
17327    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17328    /// use google_cloud_lro::Poller;
17329    ///
17330    /// let builder = prepare_request_builder();
17331    /// let response = builder.poller().until_done().await?;
17332    /// # Ok(()) }
17333    ///
17334    /// fn prepare_request_builder() -> CreateLake {
17335    ///   # panic!();
17336    ///   // ... details omitted ...
17337    /// }
17338    /// ```
17339    #[derive(Clone, Debug)]
17340    pub struct CreateLake(RequestBuilder<crate::model::CreateLakeRequest>);
17341
17342    impl CreateLake {
17343        pub(crate) fn new(
17344            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17345        ) -> Self {
17346            Self(RequestBuilder::new(stub))
17347        }
17348
17349        /// Sets the full request, replacing any prior values.
17350        pub fn with_request<V: Into<crate::model::CreateLakeRequest>>(mut self, v: V) -> Self {
17351            self.0.request = v.into();
17352            self
17353        }
17354
17355        /// Sets all the options, replacing any prior values.
17356        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17357            self.0.options = v.into();
17358            self
17359        }
17360
17361        /// Sends the request.
17362        ///
17363        /// # Long running operations
17364        ///
17365        /// This starts, but does not poll, a longrunning operation. More information
17366        /// on [create_lake][crate::client::DataplexService::create_lake].
17367        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17368            (*self.0.stub)
17369                .create_lake(self.0.request, self.0.options)
17370                .await
17371                .map(crate::Response::into_body)
17372        }
17373
17374        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_lake`.
17375        pub fn poller(
17376            self,
17377        ) -> impl google_cloud_lro::Poller<crate::model::Lake, crate::model::OperationMetadata>
17378        {
17379            type Operation = google_cloud_lro::internal::Operation<
17380                crate::model::Lake,
17381                crate::model::OperationMetadata,
17382            >;
17383            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17384            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17385
17386            let stub = self.0.stub.clone();
17387            let mut options = self.0.options.clone();
17388            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
17389            let query = move |name| {
17390                let stub = stub.clone();
17391                let options = options.clone();
17392                async {
17393                    let op = GetOperation::new(stub)
17394                        .set_name(name)
17395                        .with_options(options)
17396                        .send()
17397                        .await?;
17398                    Ok(Operation::new(op))
17399                }
17400            };
17401
17402            let start = move || async {
17403                let op = self.send().await?;
17404                Ok(Operation::new(op))
17405            };
17406
17407            google_cloud_lro::internal::new_poller(
17408                polling_error_policy,
17409                polling_backoff_policy,
17410                start,
17411                query,
17412            )
17413        }
17414
17415        /// Sets the value of [parent][crate::model::CreateLakeRequest::parent].
17416        ///
17417        /// This is a **required** field for requests.
17418        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
17419            self.0.request.parent = v.into();
17420            self
17421        }
17422
17423        /// Sets the value of [lake_id][crate::model::CreateLakeRequest::lake_id].
17424        ///
17425        /// This is a **required** field for requests.
17426        pub fn set_lake_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
17427            self.0.request.lake_id = v.into();
17428            self
17429        }
17430
17431        /// Sets the value of [lake][crate::model::CreateLakeRequest::lake].
17432        ///
17433        /// This is a **required** field for requests.
17434        pub fn set_lake<T>(mut self, v: T) -> Self
17435        where
17436            T: std::convert::Into<crate::model::Lake>,
17437        {
17438            self.0.request.lake = std::option::Option::Some(v.into());
17439            self
17440        }
17441
17442        /// Sets or clears the value of [lake][crate::model::CreateLakeRequest::lake].
17443        ///
17444        /// This is a **required** field for requests.
17445        pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
17446        where
17447            T: std::convert::Into<crate::model::Lake>,
17448        {
17449            self.0.request.lake = v.map(|x| x.into());
17450            self
17451        }
17452
17453        /// Sets the value of [validate_only][crate::model::CreateLakeRequest::validate_only].
17454        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
17455            self.0.request.validate_only = v.into();
17456            self
17457        }
17458    }
17459
17460    #[doc(hidden)]
17461    impl crate::RequestBuilder for CreateLake {
17462        fn request_options(&mut self) -> &mut crate::RequestOptions {
17463            &mut self.0.options
17464        }
17465    }
17466
17467    /// The request builder for [DataplexService::update_lake][crate::client::DataplexService::update_lake] calls.
17468    ///
17469    /// # Example
17470    /// ```
17471    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateLake;
17472    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17473    /// use google_cloud_lro::Poller;
17474    ///
17475    /// let builder = prepare_request_builder();
17476    /// let response = builder.poller().until_done().await?;
17477    /// # Ok(()) }
17478    ///
17479    /// fn prepare_request_builder() -> UpdateLake {
17480    ///   # panic!();
17481    ///   // ... details omitted ...
17482    /// }
17483    /// ```
17484    #[derive(Clone, Debug)]
17485    pub struct UpdateLake(RequestBuilder<crate::model::UpdateLakeRequest>);
17486
17487    impl UpdateLake {
17488        pub(crate) fn new(
17489            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17490        ) -> Self {
17491            Self(RequestBuilder::new(stub))
17492        }
17493
17494        /// Sets the full request, replacing any prior values.
17495        pub fn with_request<V: Into<crate::model::UpdateLakeRequest>>(mut self, v: V) -> Self {
17496            self.0.request = v.into();
17497            self
17498        }
17499
17500        /// Sets all the options, replacing any prior values.
17501        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17502            self.0.options = v.into();
17503            self
17504        }
17505
17506        /// Sends the request.
17507        ///
17508        /// # Long running operations
17509        ///
17510        /// This starts, but does not poll, a longrunning operation. More information
17511        /// on [update_lake][crate::client::DataplexService::update_lake].
17512        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17513            (*self.0.stub)
17514                .update_lake(self.0.request, self.0.options)
17515                .await
17516                .map(crate::Response::into_body)
17517        }
17518
17519        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_lake`.
17520        pub fn poller(
17521            self,
17522        ) -> impl google_cloud_lro::Poller<crate::model::Lake, crate::model::OperationMetadata>
17523        {
17524            type Operation = google_cloud_lro::internal::Operation<
17525                crate::model::Lake,
17526                crate::model::OperationMetadata,
17527            >;
17528            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17529            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17530
17531            let stub = self.0.stub.clone();
17532            let mut options = self.0.options.clone();
17533            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
17534            let query = move |name| {
17535                let stub = stub.clone();
17536                let options = options.clone();
17537                async {
17538                    let op = GetOperation::new(stub)
17539                        .set_name(name)
17540                        .with_options(options)
17541                        .send()
17542                        .await?;
17543                    Ok(Operation::new(op))
17544                }
17545            };
17546
17547            let start = move || async {
17548                let op = self.send().await?;
17549                Ok(Operation::new(op))
17550            };
17551
17552            google_cloud_lro::internal::new_poller(
17553                polling_error_policy,
17554                polling_backoff_policy,
17555                start,
17556                query,
17557            )
17558        }
17559
17560        /// Sets the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
17561        ///
17562        /// This is a **required** field for requests.
17563        pub fn set_update_mask<T>(mut self, v: T) -> Self
17564        where
17565            T: std::convert::Into<wkt::FieldMask>,
17566        {
17567            self.0.request.update_mask = std::option::Option::Some(v.into());
17568            self
17569        }
17570
17571        /// Sets or clears the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
17572        ///
17573        /// This is a **required** field for requests.
17574        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
17575        where
17576            T: std::convert::Into<wkt::FieldMask>,
17577        {
17578            self.0.request.update_mask = v.map(|x| x.into());
17579            self
17580        }
17581
17582        /// Sets the value of [lake][crate::model::UpdateLakeRequest::lake].
17583        ///
17584        /// This is a **required** field for requests.
17585        pub fn set_lake<T>(mut self, v: T) -> Self
17586        where
17587            T: std::convert::Into<crate::model::Lake>,
17588        {
17589            self.0.request.lake = std::option::Option::Some(v.into());
17590            self
17591        }
17592
17593        /// Sets or clears the value of [lake][crate::model::UpdateLakeRequest::lake].
17594        ///
17595        /// This is a **required** field for requests.
17596        pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
17597        where
17598            T: std::convert::Into<crate::model::Lake>,
17599        {
17600            self.0.request.lake = v.map(|x| x.into());
17601            self
17602        }
17603
17604        /// Sets the value of [validate_only][crate::model::UpdateLakeRequest::validate_only].
17605        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
17606            self.0.request.validate_only = v.into();
17607            self
17608        }
17609    }
17610
17611    #[doc(hidden)]
17612    impl crate::RequestBuilder for UpdateLake {
17613        fn request_options(&mut self) -> &mut crate::RequestOptions {
17614            &mut self.0.options
17615        }
17616    }
17617
17618    /// The request builder for [DataplexService::delete_lake][crate::client::DataplexService::delete_lake] calls.
17619    ///
17620    /// # Example
17621    /// ```
17622    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteLake;
17623    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17624    /// use google_cloud_lro::Poller;
17625    ///
17626    /// let builder = prepare_request_builder();
17627    /// let response = builder.poller().until_done().await?;
17628    /// # Ok(()) }
17629    ///
17630    /// fn prepare_request_builder() -> DeleteLake {
17631    ///   # panic!();
17632    ///   // ... details omitted ...
17633    /// }
17634    /// ```
17635    #[derive(Clone, Debug)]
17636    pub struct DeleteLake(RequestBuilder<crate::model::DeleteLakeRequest>);
17637
17638    impl DeleteLake {
17639        pub(crate) fn new(
17640            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17641        ) -> Self {
17642            Self(RequestBuilder::new(stub))
17643        }
17644
17645        /// Sets the full request, replacing any prior values.
17646        pub fn with_request<V: Into<crate::model::DeleteLakeRequest>>(mut self, v: V) -> Self {
17647            self.0.request = v.into();
17648            self
17649        }
17650
17651        /// Sets all the options, replacing any prior values.
17652        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17653            self.0.options = v.into();
17654            self
17655        }
17656
17657        /// Sends the request.
17658        ///
17659        /// # Long running operations
17660        ///
17661        /// This starts, but does not poll, a longrunning operation. More information
17662        /// on [delete_lake][crate::client::DataplexService::delete_lake].
17663        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17664            (*self.0.stub)
17665                .delete_lake(self.0.request, self.0.options)
17666                .await
17667                .map(crate::Response::into_body)
17668        }
17669
17670        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_lake`.
17671        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
17672            type Operation =
17673                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
17674            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17675            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17676
17677            let stub = self.0.stub.clone();
17678            let mut options = self.0.options.clone();
17679            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
17680            let query = move |name| {
17681                let stub = stub.clone();
17682                let options = options.clone();
17683                async {
17684                    let op = GetOperation::new(stub)
17685                        .set_name(name)
17686                        .with_options(options)
17687                        .send()
17688                        .await?;
17689                    Ok(Operation::new(op))
17690                }
17691            };
17692
17693            let start = move || async {
17694                let op = self.send().await?;
17695                Ok(Operation::new(op))
17696            };
17697
17698            google_cloud_lro::internal::new_unit_response_poller(
17699                polling_error_policy,
17700                polling_backoff_policy,
17701                start,
17702                query,
17703            )
17704        }
17705
17706        /// Sets the value of [name][crate::model::DeleteLakeRequest::name].
17707        ///
17708        /// This is a **required** field for requests.
17709        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17710            self.0.request.name = v.into();
17711            self
17712        }
17713    }
17714
17715    #[doc(hidden)]
17716    impl crate::RequestBuilder for DeleteLake {
17717        fn request_options(&mut self) -> &mut crate::RequestOptions {
17718            &mut self.0.options
17719        }
17720    }
17721
17722    /// The request builder for [DataplexService::list_lakes][crate::client::DataplexService::list_lakes] calls.
17723    ///
17724    /// # Example
17725    /// ```
17726    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListLakes;
17727    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17728    /// use google_cloud_gax::paginator::ItemPaginator;
17729    ///
17730    /// let builder = prepare_request_builder();
17731    /// let mut items = builder.by_item();
17732    /// while let Some(result) = items.next().await {
17733    ///   let item = result?;
17734    /// }
17735    /// # Ok(()) }
17736    ///
17737    /// fn prepare_request_builder() -> ListLakes {
17738    ///   # panic!();
17739    ///   // ... details omitted ...
17740    /// }
17741    /// ```
17742    #[derive(Clone, Debug)]
17743    pub struct ListLakes(RequestBuilder<crate::model::ListLakesRequest>);
17744
17745    impl ListLakes {
17746        pub(crate) fn new(
17747            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17748        ) -> Self {
17749            Self(RequestBuilder::new(stub))
17750        }
17751
17752        /// Sets the full request, replacing any prior values.
17753        pub fn with_request<V: Into<crate::model::ListLakesRequest>>(mut self, v: V) -> Self {
17754            self.0.request = v.into();
17755            self
17756        }
17757
17758        /// Sets all the options, replacing any prior values.
17759        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17760            self.0.options = v.into();
17761            self
17762        }
17763
17764        /// Sends the request.
17765        pub async fn send(self) -> Result<crate::model::ListLakesResponse> {
17766            (*self.0.stub)
17767                .list_lakes(self.0.request, self.0.options)
17768                .await
17769                .map(crate::Response::into_body)
17770        }
17771
17772        /// Streams each page in the collection.
17773        pub fn by_page(
17774            self,
17775        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListLakesResponse, crate::Error>
17776        {
17777            use std::clone::Clone;
17778            let token = self.0.request.page_token.clone();
17779            let execute = move |token: String| {
17780                let mut builder = self.clone();
17781                builder.0.request = builder.0.request.set_page_token(token);
17782                builder.send()
17783            };
17784            google_cloud_gax::paginator::internal::new_paginator(token, execute)
17785        }
17786
17787        /// Streams each item in the collection.
17788        pub fn by_item(
17789            self,
17790        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListLakesResponse, crate::Error>
17791        {
17792            use google_cloud_gax::paginator::Paginator;
17793            self.by_page().items()
17794        }
17795
17796        /// Sets the value of [parent][crate::model::ListLakesRequest::parent].
17797        ///
17798        /// This is a **required** field for requests.
17799        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
17800            self.0.request.parent = v.into();
17801            self
17802        }
17803
17804        /// Sets the value of [page_size][crate::model::ListLakesRequest::page_size].
17805        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17806            self.0.request.page_size = v.into();
17807            self
17808        }
17809
17810        /// Sets the value of [page_token][crate::model::ListLakesRequest::page_token].
17811        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17812            self.0.request.page_token = v.into();
17813            self
17814        }
17815
17816        /// Sets the value of [filter][crate::model::ListLakesRequest::filter].
17817        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
17818            self.0.request.filter = v.into();
17819            self
17820        }
17821
17822        /// Sets the value of [order_by][crate::model::ListLakesRequest::order_by].
17823        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
17824            self.0.request.order_by = v.into();
17825            self
17826        }
17827    }
17828
17829    #[doc(hidden)]
17830    impl crate::RequestBuilder for ListLakes {
17831        fn request_options(&mut self) -> &mut crate::RequestOptions {
17832            &mut self.0.options
17833        }
17834    }
17835
17836    /// The request builder for [DataplexService::get_lake][crate::client::DataplexService::get_lake] calls.
17837    ///
17838    /// # Example
17839    /// ```
17840    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetLake;
17841    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17842    ///
17843    /// let builder = prepare_request_builder();
17844    /// let response = builder.send().await?;
17845    /// # Ok(()) }
17846    ///
17847    /// fn prepare_request_builder() -> GetLake {
17848    ///   # panic!();
17849    ///   // ... details omitted ...
17850    /// }
17851    /// ```
17852    #[derive(Clone, Debug)]
17853    pub struct GetLake(RequestBuilder<crate::model::GetLakeRequest>);
17854
17855    impl GetLake {
17856        pub(crate) fn new(
17857            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17858        ) -> Self {
17859            Self(RequestBuilder::new(stub))
17860        }
17861
17862        /// Sets the full request, replacing any prior values.
17863        pub fn with_request<V: Into<crate::model::GetLakeRequest>>(mut self, v: V) -> Self {
17864            self.0.request = v.into();
17865            self
17866        }
17867
17868        /// Sets all the options, replacing any prior values.
17869        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17870            self.0.options = v.into();
17871            self
17872        }
17873
17874        /// Sends the request.
17875        pub async fn send(self) -> Result<crate::model::Lake> {
17876            (*self.0.stub)
17877                .get_lake(self.0.request, self.0.options)
17878                .await
17879                .map(crate::Response::into_body)
17880        }
17881
17882        /// Sets the value of [name][crate::model::GetLakeRequest::name].
17883        ///
17884        /// This is a **required** field for requests.
17885        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17886            self.0.request.name = v.into();
17887            self
17888        }
17889    }
17890
17891    #[doc(hidden)]
17892    impl crate::RequestBuilder for GetLake {
17893        fn request_options(&mut self) -> &mut crate::RequestOptions {
17894            &mut self.0.options
17895        }
17896    }
17897
17898    /// The request builder for [DataplexService::list_lake_actions][crate::client::DataplexService::list_lake_actions] calls.
17899    ///
17900    /// # Example
17901    /// ```
17902    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListLakeActions;
17903    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17904    /// use google_cloud_gax::paginator::ItemPaginator;
17905    ///
17906    /// let builder = prepare_request_builder();
17907    /// let mut items = builder.by_item();
17908    /// while let Some(result) = items.next().await {
17909    ///   let item = result?;
17910    /// }
17911    /// # Ok(()) }
17912    ///
17913    /// fn prepare_request_builder() -> ListLakeActions {
17914    ///   # panic!();
17915    ///   // ... details omitted ...
17916    /// }
17917    /// ```
17918    #[derive(Clone, Debug)]
17919    pub struct ListLakeActions(RequestBuilder<crate::model::ListLakeActionsRequest>);
17920
17921    impl ListLakeActions {
17922        pub(crate) fn new(
17923            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17924        ) -> Self {
17925            Self(RequestBuilder::new(stub))
17926        }
17927
17928        /// Sets the full request, replacing any prior values.
17929        pub fn with_request<V: Into<crate::model::ListLakeActionsRequest>>(mut self, v: V) -> Self {
17930            self.0.request = v.into();
17931            self
17932        }
17933
17934        /// Sets all the options, replacing any prior values.
17935        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17936            self.0.options = v.into();
17937            self
17938        }
17939
17940        /// Sends the request.
17941        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
17942            (*self.0.stub)
17943                .list_lake_actions(self.0.request, self.0.options)
17944                .await
17945                .map(crate::Response::into_body)
17946        }
17947
17948        /// Streams each page in the collection.
17949        pub fn by_page(
17950            self,
17951        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListActionsResponse, crate::Error>
17952        {
17953            use std::clone::Clone;
17954            let token = self.0.request.page_token.clone();
17955            let execute = move |token: String| {
17956                let mut builder = self.clone();
17957                builder.0.request = builder.0.request.set_page_token(token);
17958                builder.send()
17959            };
17960            google_cloud_gax::paginator::internal::new_paginator(token, execute)
17961        }
17962
17963        /// Streams each item in the collection.
17964        pub fn by_item(
17965            self,
17966        ) -> impl google_cloud_gax::paginator::ItemPaginator<
17967            crate::model::ListActionsResponse,
17968            crate::Error,
17969        > {
17970            use google_cloud_gax::paginator::Paginator;
17971            self.by_page().items()
17972        }
17973
17974        /// Sets the value of [parent][crate::model::ListLakeActionsRequest::parent].
17975        ///
17976        /// This is a **required** field for requests.
17977        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
17978            self.0.request.parent = v.into();
17979            self
17980        }
17981
17982        /// Sets the value of [page_size][crate::model::ListLakeActionsRequest::page_size].
17983        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17984            self.0.request.page_size = v.into();
17985            self
17986        }
17987
17988        /// Sets the value of [page_token][crate::model::ListLakeActionsRequest::page_token].
17989        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17990            self.0.request.page_token = v.into();
17991            self
17992        }
17993    }
17994
17995    #[doc(hidden)]
17996    impl crate::RequestBuilder for ListLakeActions {
17997        fn request_options(&mut self) -> &mut crate::RequestOptions {
17998            &mut self.0.options
17999        }
18000    }
18001
18002    /// The request builder for [DataplexService::create_zone][crate::client::DataplexService::create_zone] calls.
18003    ///
18004    /// # Example
18005    /// ```
18006    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateZone;
18007    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18008    /// use google_cloud_lro::Poller;
18009    ///
18010    /// let builder = prepare_request_builder();
18011    /// let response = builder.poller().until_done().await?;
18012    /// # Ok(()) }
18013    ///
18014    /// fn prepare_request_builder() -> CreateZone {
18015    ///   # panic!();
18016    ///   // ... details omitted ...
18017    /// }
18018    /// ```
18019    #[derive(Clone, Debug)]
18020    pub struct CreateZone(RequestBuilder<crate::model::CreateZoneRequest>);
18021
18022    impl CreateZone {
18023        pub(crate) fn new(
18024            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18025        ) -> Self {
18026            Self(RequestBuilder::new(stub))
18027        }
18028
18029        /// Sets the full request, replacing any prior values.
18030        pub fn with_request<V: Into<crate::model::CreateZoneRequest>>(mut self, v: V) -> Self {
18031            self.0.request = v.into();
18032            self
18033        }
18034
18035        /// Sets all the options, replacing any prior values.
18036        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18037            self.0.options = v.into();
18038            self
18039        }
18040
18041        /// Sends the request.
18042        ///
18043        /// # Long running operations
18044        ///
18045        /// This starts, but does not poll, a longrunning operation. More information
18046        /// on [create_zone][crate::client::DataplexService::create_zone].
18047        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18048            (*self.0.stub)
18049                .create_zone(self.0.request, self.0.options)
18050                .await
18051                .map(crate::Response::into_body)
18052        }
18053
18054        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_zone`.
18055        pub fn poller(
18056            self,
18057        ) -> impl google_cloud_lro::Poller<crate::model::Zone, crate::model::OperationMetadata>
18058        {
18059            type Operation = google_cloud_lro::internal::Operation<
18060                crate::model::Zone,
18061                crate::model::OperationMetadata,
18062            >;
18063            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18064            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18065
18066            let stub = self.0.stub.clone();
18067            let mut options = self.0.options.clone();
18068            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18069            let query = move |name| {
18070                let stub = stub.clone();
18071                let options = options.clone();
18072                async {
18073                    let op = GetOperation::new(stub)
18074                        .set_name(name)
18075                        .with_options(options)
18076                        .send()
18077                        .await?;
18078                    Ok(Operation::new(op))
18079                }
18080            };
18081
18082            let start = move || async {
18083                let op = self.send().await?;
18084                Ok(Operation::new(op))
18085            };
18086
18087            google_cloud_lro::internal::new_poller(
18088                polling_error_policy,
18089                polling_backoff_policy,
18090                start,
18091                query,
18092            )
18093        }
18094
18095        /// Sets the value of [parent][crate::model::CreateZoneRequest::parent].
18096        ///
18097        /// This is a **required** field for requests.
18098        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18099            self.0.request.parent = v.into();
18100            self
18101        }
18102
18103        /// Sets the value of [zone_id][crate::model::CreateZoneRequest::zone_id].
18104        ///
18105        /// This is a **required** field for requests.
18106        pub fn set_zone_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
18107            self.0.request.zone_id = v.into();
18108            self
18109        }
18110
18111        /// Sets the value of [zone][crate::model::CreateZoneRequest::zone].
18112        ///
18113        /// This is a **required** field for requests.
18114        pub fn set_zone<T>(mut self, v: T) -> Self
18115        where
18116            T: std::convert::Into<crate::model::Zone>,
18117        {
18118            self.0.request.zone = std::option::Option::Some(v.into());
18119            self
18120        }
18121
18122        /// Sets or clears the value of [zone][crate::model::CreateZoneRequest::zone].
18123        ///
18124        /// This is a **required** field for requests.
18125        pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
18126        where
18127            T: std::convert::Into<crate::model::Zone>,
18128        {
18129            self.0.request.zone = v.map(|x| x.into());
18130            self
18131        }
18132
18133        /// Sets the value of [validate_only][crate::model::CreateZoneRequest::validate_only].
18134        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18135            self.0.request.validate_only = v.into();
18136            self
18137        }
18138    }
18139
18140    #[doc(hidden)]
18141    impl crate::RequestBuilder for CreateZone {
18142        fn request_options(&mut self) -> &mut crate::RequestOptions {
18143            &mut self.0.options
18144        }
18145    }
18146
18147    /// The request builder for [DataplexService::update_zone][crate::client::DataplexService::update_zone] calls.
18148    ///
18149    /// # Example
18150    /// ```
18151    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateZone;
18152    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18153    /// use google_cloud_lro::Poller;
18154    ///
18155    /// let builder = prepare_request_builder();
18156    /// let response = builder.poller().until_done().await?;
18157    /// # Ok(()) }
18158    ///
18159    /// fn prepare_request_builder() -> UpdateZone {
18160    ///   # panic!();
18161    ///   // ... details omitted ...
18162    /// }
18163    /// ```
18164    #[derive(Clone, Debug)]
18165    pub struct UpdateZone(RequestBuilder<crate::model::UpdateZoneRequest>);
18166
18167    impl UpdateZone {
18168        pub(crate) fn new(
18169            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18170        ) -> Self {
18171            Self(RequestBuilder::new(stub))
18172        }
18173
18174        /// Sets the full request, replacing any prior values.
18175        pub fn with_request<V: Into<crate::model::UpdateZoneRequest>>(mut self, v: V) -> Self {
18176            self.0.request = v.into();
18177            self
18178        }
18179
18180        /// Sets all the options, replacing any prior values.
18181        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18182            self.0.options = v.into();
18183            self
18184        }
18185
18186        /// Sends the request.
18187        ///
18188        /// # Long running operations
18189        ///
18190        /// This starts, but does not poll, a longrunning operation. More information
18191        /// on [update_zone][crate::client::DataplexService::update_zone].
18192        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18193            (*self.0.stub)
18194                .update_zone(self.0.request, self.0.options)
18195                .await
18196                .map(crate::Response::into_body)
18197        }
18198
18199        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_zone`.
18200        pub fn poller(
18201            self,
18202        ) -> impl google_cloud_lro::Poller<crate::model::Zone, crate::model::OperationMetadata>
18203        {
18204            type Operation = google_cloud_lro::internal::Operation<
18205                crate::model::Zone,
18206                crate::model::OperationMetadata,
18207            >;
18208            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18209            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18210
18211            let stub = self.0.stub.clone();
18212            let mut options = self.0.options.clone();
18213            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18214            let query = move |name| {
18215                let stub = stub.clone();
18216                let options = options.clone();
18217                async {
18218                    let op = GetOperation::new(stub)
18219                        .set_name(name)
18220                        .with_options(options)
18221                        .send()
18222                        .await?;
18223                    Ok(Operation::new(op))
18224                }
18225            };
18226
18227            let start = move || async {
18228                let op = self.send().await?;
18229                Ok(Operation::new(op))
18230            };
18231
18232            google_cloud_lro::internal::new_poller(
18233                polling_error_policy,
18234                polling_backoff_policy,
18235                start,
18236                query,
18237            )
18238        }
18239
18240        /// Sets the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
18241        ///
18242        /// This is a **required** field for requests.
18243        pub fn set_update_mask<T>(mut self, v: T) -> Self
18244        where
18245            T: std::convert::Into<wkt::FieldMask>,
18246        {
18247            self.0.request.update_mask = std::option::Option::Some(v.into());
18248            self
18249        }
18250
18251        /// Sets or clears the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
18252        ///
18253        /// This is a **required** field for requests.
18254        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
18255        where
18256            T: std::convert::Into<wkt::FieldMask>,
18257        {
18258            self.0.request.update_mask = v.map(|x| x.into());
18259            self
18260        }
18261
18262        /// Sets the value of [zone][crate::model::UpdateZoneRequest::zone].
18263        ///
18264        /// This is a **required** field for requests.
18265        pub fn set_zone<T>(mut self, v: T) -> Self
18266        where
18267            T: std::convert::Into<crate::model::Zone>,
18268        {
18269            self.0.request.zone = std::option::Option::Some(v.into());
18270            self
18271        }
18272
18273        /// Sets or clears the value of [zone][crate::model::UpdateZoneRequest::zone].
18274        ///
18275        /// This is a **required** field for requests.
18276        pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
18277        where
18278            T: std::convert::Into<crate::model::Zone>,
18279        {
18280            self.0.request.zone = v.map(|x| x.into());
18281            self
18282        }
18283
18284        /// Sets the value of [validate_only][crate::model::UpdateZoneRequest::validate_only].
18285        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18286            self.0.request.validate_only = v.into();
18287            self
18288        }
18289    }
18290
18291    #[doc(hidden)]
18292    impl crate::RequestBuilder for UpdateZone {
18293        fn request_options(&mut self) -> &mut crate::RequestOptions {
18294            &mut self.0.options
18295        }
18296    }
18297
18298    /// The request builder for [DataplexService::delete_zone][crate::client::DataplexService::delete_zone] calls.
18299    ///
18300    /// # Example
18301    /// ```
18302    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteZone;
18303    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18304    /// use google_cloud_lro::Poller;
18305    ///
18306    /// let builder = prepare_request_builder();
18307    /// let response = builder.poller().until_done().await?;
18308    /// # Ok(()) }
18309    ///
18310    /// fn prepare_request_builder() -> DeleteZone {
18311    ///   # panic!();
18312    ///   // ... details omitted ...
18313    /// }
18314    /// ```
18315    #[derive(Clone, Debug)]
18316    pub struct DeleteZone(RequestBuilder<crate::model::DeleteZoneRequest>);
18317
18318    impl DeleteZone {
18319        pub(crate) fn new(
18320            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18321        ) -> Self {
18322            Self(RequestBuilder::new(stub))
18323        }
18324
18325        /// Sets the full request, replacing any prior values.
18326        pub fn with_request<V: Into<crate::model::DeleteZoneRequest>>(mut self, v: V) -> Self {
18327            self.0.request = v.into();
18328            self
18329        }
18330
18331        /// Sets all the options, replacing any prior values.
18332        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18333            self.0.options = v.into();
18334            self
18335        }
18336
18337        /// Sends the request.
18338        ///
18339        /// # Long running operations
18340        ///
18341        /// This starts, but does not poll, a longrunning operation. More information
18342        /// on [delete_zone][crate::client::DataplexService::delete_zone].
18343        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18344            (*self.0.stub)
18345                .delete_zone(self.0.request, self.0.options)
18346                .await
18347                .map(crate::Response::into_body)
18348        }
18349
18350        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_zone`.
18351        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
18352            type Operation =
18353                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
18354            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18355            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18356
18357            let stub = self.0.stub.clone();
18358            let mut options = self.0.options.clone();
18359            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18360            let query = move |name| {
18361                let stub = stub.clone();
18362                let options = options.clone();
18363                async {
18364                    let op = GetOperation::new(stub)
18365                        .set_name(name)
18366                        .with_options(options)
18367                        .send()
18368                        .await?;
18369                    Ok(Operation::new(op))
18370                }
18371            };
18372
18373            let start = move || async {
18374                let op = self.send().await?;
18375                Ok(Operation::new(op))
18376            };
18377
18378            google_cloud_lro::internal::new_unit_response_poller(
18379                polling_error_policy,
18380                polling_backoff_policy,
18381                start,
18382                query,
18383            )
18384        }
18385
18386        /// Sets the value of [name][crate::model::DeleteZoneRequest::name].
18387        ///
18388        /// This is a **required** field for requests.
18389        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18390            self.0.request.name = v.into();
18391            self
18392        }
18393    }
18394
18395    #[doc(hidden)]
18396    impl crate::RequestBuilder for DeleteZone {
18397        fn request_options(&mut self) -> &mut crate::RequestOptions {
18398            &mut self.0.options
18399        }
18400    }
18401
18402    /// The request builder for [DataplexService::list_zones][crate::client::DataplexService::list_zones] calls.
18403    ///
18404    /// # Example
18405    /// ```
18406    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListZones;
18407    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18408    /// use google_cloud_gax::paginator::ItemPaginator;
18409    ///
18410    /// let builder = prepare_request_builder();
18411    /// let mut items = builder.by_item();
18412    /// while let Some(result) = items.next().await {
18413    ///   let item = result?;
18414    /// }
18415    /// # Ok(()) }
18416    ///
18417    /// fn prepare_request_builder() -> ListZones {
18418    ///   # panic!();
18419    ///   // ... details omitted ...
18420    /// }
18421    /// ```
18422    #[derive(Clone, Debug)]
18423    pub struct ListZones(RequestBuilder<crate::model::ListZonesRequest>);
18424
18425    impl ListZones {
18426        pub(crate) fn new(
18427            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18428        ) -> Self {
18429            Self(RequestBuilder::new(stub))
18430        }
18431
18432        /// Sets the full request, replacing any prior values.
18433        pub fn with_request<V: Into<crate::model::ListZonesRequest>>(mut self, v: V) -> Self {
18434            self.0.request = v.into();
18435            self
18436        }
18437
18438        /// Sets all the options, replacing any prior values.
18439        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18440            self.0.options = v.into();
18441            self
18442        }
18443
18444        /// Sends the request.
18445        pub async fn send(self) -> Result<crate::model::ListZonesResponse> {
18446            (*self.0.stub)
18447                .list_zones(self.0.request, self.0.options)
18448                .await
18449                .map(crate::Response::into_body)
18450        }
18451
18452        /// Streams each page in the collection.
18453        pub fn by_page(
18454            self,
18455        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListZonesResponse, crate::Error>
18456        {
18457            use std::clone::Clone;
18458            let token = self.0.request.page_token.clone();
18459            let execute = move |token: String| {
18460                let mut builder = self.clone();
18461                builder.0.request = builder.0.request.set_page_token(token);
18462                builder.send()
18463            };
18464            google_cloud_gax::paginator::internal::new_paginator(token, execute)
18465        }
18466
18467        /// Streams each item in the collection.
18468        pub fn by_item(
18469            self,
18470        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListZonesResponse, crate::Error>
18471        {
18472            use google_cloud_gax::paginator::Paginator;
18473            self.by_page().items()
18474        }
18475
18476        /// Sets the value of [parent][crate::model::ListZonesRequest::parent].
18477        ///
18478        /// This is a **required** field for requests.
18479        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18480            self.0.request.parent = v.into();
18481            self
18482        }
18483
18484        /// Sets the value of [page_size][crate::model::ListZonesRequest::page_size].
18485        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18486            self.0.request.page_size = v.into();
18487            self
18488        }
18489
18490        /// Sets the value of [page_token][crate::model::ListZonesRequest::page_token].
18491        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18492            self.0.request.page_token = v.into();
18493            self
18494        }
18495
18496        /// Sets the value of [filter][crate::model::ListZonesRequest::filter].
18497        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
18498            self.0.request.filter = v.into();
18499            self
18500        }
18501
18502        /// Sets the value of [order_by][crate::model::ListZonesRequest::order_by].
18503        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
18504            self.0.request.order_by = v.into();
18505            self
18506        }
18507    }
18508
18509    #[doc(hidden)]
18510    impl crate::RequestBuilder for ListZones {
18511        fn request_options(&mut self) -> &mut crate::RequestOptions {
18512            &mut self.0.options
18513        }
18514    }
18515
18516    /// The request builder for [DataplexService::get_zone][crate::client::DataplexService::get_zone] calls.
18517    ///
18518    /// # Example
18519    /// ```
18520    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetZone;
18521    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18522    ///
18523    /// let builder = prepare_request_builder();
18524    /// let response = builder.send().await?;
18525    /// # Ok(()) }
18526    ///
18527    /// fn prepare_request_builder() -> GetZone {
18528    ///   # panic!();
18529    ///   // ... details omitted ...
18530    /// }
18531    /// ```
18532    #[derive(Clone, Debug)]
18533    pub struct GetZone(RequestBuilder<crate::model::GetZoneRequest>);
18534
18535    impl GetZone {
18536        pub(crate) fn new(
18537            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18538        ) -> Self {
18539            Self(RequestBuilder::new(stub))
18540        }
18541
18542        /// Sets the full request, replacing any prior values.
18543        pub fn with_request<V: Into<crate::model::GetZoneRequest>>(mut self, v: V) -> Self {
18544            self.0.request = v.into();
18545            self
18546        }
18547
18548        /// Sets all the options, replacing any prior values.
18549        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18550            self.0.options = v.into();
18551            self
18552        }
18553
18554        /// Sends the request.
18555        pub async fn send(self) -> Result<crate::model::Zone> {
18556            (*self.0.stub)
18557                .get_zone(self.0.request, self.0.options)
18558                .await
18559                .map(crate::Response::into_body)
18560        }
18561
18562        /// Sets the value of [name][crate::model::GetZoneRequest::name].
18563        ///
18564        /// This is a **required** field for requests.
18565        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18566            self.0.request.name = v.into();
18567            self
18568        }
18569    }
18570
18571    #[doc(hidden)]
18572    impl crate::RequestBuilder for GetZone {
18573        fn request_options(&mut self) -> &mut crate::RequestOptions {
18574            &mut self.0.options
18575        }
18576    }
18577
18578    /// The request builder for [DataplexService::list_zone_actions][crate::client::DataplexService::list_zone_actions] calls.
18579    ///
18580    /// # Example
18581    /// ```
18582    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListZoneActions;
18583    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18584    /// use google_cloud_gax::paginator::ItemPaginator;
18585    ///
18586    /// let builder = prepare_request_builder();
18587    /// let mut items = builder.by_item();
18588    /// while let Some(result) = items.next().await {
18589    ///   let item = result?;
18590    /// }
18591    /// # Ok(()) }
18592    ///
18593    /// fn prepare_request_builder() -> ListZoneActions {
18594    ///   # panic!();
18595    ///   // ... details omitted ...
18596    /// }
18597    /// ```
18598    #[derive(Clone, Debug)]
18599    pub struct ListZoneActions(RequestBuilder<crate::model::ListZoneActionsRequest>);
18600
18601    impl ListZoneActions {
18602        pub(crate) fn new(
18603            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18604        ) -> Self {
18605            Self(RequestBuilder::new(stub))
18606        }
18607
18608        /// Sets the full request, replacing any prior values.
18609        pub fn with_request<V: Into<crate::model::ListZoneActionsRequest>>(mut self, v: V) -> Self {
18610            self.0.request = v.into();
18611            self
18612        }
18613
18614        /// Sets all the options, replacing any prior values.
18615        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18616            self.0.options = v.into();
18617            self
18618        }
18619
18620        /// Sends the request.
18621        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
18622            (*self.0.stub)
18623                .list_zone_actions(self.0.request, self.0.options)
18624                .await
18625                .map(crate::Response::into_body)
18626        }
18627
18628        /// Streams each page in the collection.
18629        pub fn by_page(
18630            self,
18631        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListActionsResponse, crate::Error>
18632        {
18633            use std::clone::Clone;
18634            let token = self.0.request.page_token.clone();
18635            let execute = move |token: String| {
18636                let mut builder = self.clone();
18637                builder.0.request = builder.0.request.set_page_token(token);
18638                builder.send()
18639            };
18640            google_cloud_gax::paginator::internal::new_paginator(token, execute)
18641        }
18642
18643        /// Streams each item in the collection.
18644        pub fn by_item(
18645            self,
18646        ) -> impl google_cloud_gax::paginator::ItemPaginator<
18647            crate::model::ListActionsResponse,
18648            crate::Error,
18649        > {
18650            use google_cloud_gax::paginator::Paginator;
18651            self.by_page().items()
18652        }
18653
18654        /// Sets the value of [parent][crate::model::ListZoneActionsRequest::parent].
18655        ///
18656        /// This is a **required** field for requests.
18657        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18658            self.0.request.parent = v.into();
18659            self
18660        }
18661
18662        /// Sets the value of [page_size][crate::model::ListZoneActionsRequest::page_size].
18663        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18664            self.0.request.page_size = v.into();
18665            self
18666        }
18667
18668        /// Sets the value of [page_token][crate::model::ListZoneActionsRequest::page_token].
18669        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18670            self.0.request.page_token = v.into();
18671            self
18672        }
18673    }
18674
18675    #[doc(hidden)]
18676    impl crate::RequestBuilder for ListZoneActions {
18677        fn request_options(&mut self) -> &mut crate::RequestOptions {
18678            &mut self.0.options
18679        }
18680    }
18681
18682    /// The request builder for [DataplexService::create_asset][crate::client::DataplexService::create_asset] calls.
18683    ///
18684    /// # Example
18685    /// ```
18686    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateAsset;
18687    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18688    /// use google_cloud_lro::Poller;
18689    ///
18690    /// let builder = prepare_request_builder();
18691    /// let response = builder.poller().until_done().await?;
18692    /// # Ok(()) }
18693    ///
18694    /// fn prepare_request_builder() -> CreateAsset {
18695    ///   # panic!();
18696    ///   // ... details omitted ...
18697    /// }
18698    /// ```
18699    #[derive(Clone, Debug)]
18700    pub struct CreateAsset(RequestBuilder<crate::model::CreateAssetRequest>);
18701
18702    impl CreateAsset {
18703        pub(crate) fn new(
18704            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18705        ) -> Self {
18706            Self(RequestBuilder::new(stub))
18707        }
18708
18709        /// Sets the full request, replacing any prior values.
18710        pub fn with_request<V: Into<crate::model::CreateAssetRequest>>(mut self, v: V) -> Self {
18711            self.0.request = v.into();
18712            self
18713        }
18714
18715        /// Sets all the options, replacing any prior values.
18716        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18717            self.0.options = v.into();
18718            self
18719        }
18720
18721        /// Sends the request.
18722        ///
18723        /// # Long running operations
18724        ///
18725        /// This starts, but does not poll, a longrunning operation. More information
18726        /// on [create_asset][crate::client::DataplexService::create_asset].
18727        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18728            (*self.0.stub)
18729                .create_asset(self.0.request, self.0.options)
18730                .await
18731                .map(crate::Response::into_body)
18732        }
18733
18734        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_asset`.
18735        pub fn poller(
18736            self,
18737        ) -> impl google_cloud_lro::Poller<crate::model::Asset, crate::model::OperationMetadata>
18738        {
18739            type Operation = google_cloud_lro::internal::Operation<
18740                crate::model::Asset,
18741                crate::model::OperationMetadata,
18742            >;
18743            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18744            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18745
18746            let stub = self.0.stub.clone();
18747            let mut options = self.0.options.clone();
18748            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18749            let query = move |name| {
18750                let stub = stub.clone();
18751                let options = options.clone();
18752                async {
18753                    let op = GetOperation::new(stub)
18754                        .set_name(name)
18755                        .with_options(options)
18756                        .send()
18757                        .await?;
18758                    Ok(Operation::new(op))
18759                }
18760            };
18761
18762            let start = move || async {
18763                let op = self.send().await?;
18764                Ok(Operation::new(op))
18765            };
18766
18767            google_cloud_lro::internal::new_poller(
18768                polling_error_policy,
18769                polling_backoff_policy,
18770                start,
18771                query,
18772            )
18773        }
18774
18775        /// Sets the value of [parent][crate::model::CreateAssetRequest::parent].
18776        ///
18777        /// This is a **required** field for requests.
18778        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18779            self.0.request.parent = v.into();
18780            self
18781        }
18782
18783        /// Sets the value of [asset_id][crate::model::CreateAssetRequest::asset_id].
18784        ///
18785        /// This is a **required** field for requests.
18786        pub fn set_asset_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
18787            self.0.request.asset_id = v.into();
18788            self
18789        }
18790
18791        /// Sets the value of [asset][crate::model::CreateAssetRequest::asset].
18792        ///
18793        /// This is a **required** field for requests.
18794        pub fn set_asset<T>(mut self, v: T) -> Self
18795        where
18796            T: std::convert::Into<crate::model::Asset>,
18797        {
18798            self.0.request.asset = std::option::Option::Some(v.into());
18799            self
18800        }
18801
18802        /// Sets or clears the value of [asset][crate::model::CreateAssetRequest::asset].
18803        ///
18804        /// This is a **required** field for requests.
18805        pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
18806        where
18807            T: std::convert::Into<crate::model::Asset>,
18808        {
18809            self.0.request.asset = v.map(|x| x.into());
18810            self
18811        }
18812
18813        /// Sets the value of [validate_only][crate::model::CreateAssetRequest::validate_only].
18814        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18815            self.0.request.validate_only = v.into();
18816            self
18817        }
18818    }
18819
18820    #[doc(hidden)]
18821    impl crate::RequestBuilder for CreateAsset {
18822        fn request_options(&mut self) -> &mut crate::RequestOptions {
18823            &mut self.0.options
18824        }
18825    }
18826
18827    /// The request builder for [DataplexService::update_asset][crate::client::DataplexService::update_asset] calls.
18828    ///
18829    /// # Example
18830    /// ```
18831    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateAsset;
18832    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18833    /// use google_cloud_lro::Poller;
18834    ///
18835    /// let builder = prepare_request_builder();
18836    /// let response = builder.poller().until_done().await?;
18837    /// # Ok(()) }
18838    ///
18839    /// fn prepare_request_builder() -> UpdateAsset {
18840    ///   # panic!();
18841    ///   // ... details omitted ...
18842    /// }
18843    /// ```
18844    #[derive(Clone, Debug)]
18845    pub struct UpdateAsset(RequestBuilder<crate::model::UpdateAssetRequest>);
18846
18847    impl UpdateAsset {
18848        pub(crate) fn new(
18849            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18850        ) -> Self {
18851            Self(RequestBuilder::new(stub))
18852        }
18853
18854        /// Sets the full request, replacing any prior values.
18855        pub fn with_request<V: Into<crate::model::UpdateAssetRequest>>(mut self, v: V) -> Self {
18856            self.0.request = v.into();
18857            self
18858        }
18859
18860        /// Sets all the options, replacing any prior values.
18861        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18862            self.0.options = v.into();
18863            self
18864        }
18865
18866        /// Sends the request.
18867        ///
18868        /// # Long running operations
18869        ///
18870        /// This starts, but does not poll, a longrunning operation. More information
18871        /// on [update_asset][crate::client::DataplexService::update_asset].
18872        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18873            (*self.0.stub)
18874                .update_asset(self.0.request, self.0.options)
18875                .await
18876                .map(crate::Response::into_body)
18877        }
18878
18879        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_asset`.
18880        pub fn poller(
18881            self,
18882        ) -> impl google_cloud_lro::Poller<crate::model::Asset, crate::model::OperationMetadata>
18883        {
18884            type Operation = google_cloud_lro::internal::Operation<
18885                crate::model::Asset,
18886                crate::model::OperationMetadata,
18887            >;
18888            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18889            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18890
18891            let stub = self.0.stub.clone();
18892            let mut options = self.0.options.clone();
18893            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18894            let query = move |name| {
18895                let stub = stub.clone();
18896                let options = options.clone();
18897                async {
18898                    let op = GetOperation::new(stub)
18899                        .set_name(name)
18900                        .with_options(options)
18901                        .send()
18902                        .await?;
18903                    Ok(Operation::new(op))
18904                }
18905            };
18906
18907            let start = move || async {
18908                let op = self.send().await?;
18909                Ok(Operation::new(op))
18910            };
18911
18912            google_cloud_lro::internal::new_poller(
18913                polling_error_policy,
18914                polling_backoff_policy,
18915                start,
18916                query,
18917            )
18918        }
18919
18920        /// Sets the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
18921        ///
18922        /// This is a **required** field for requests.
18923        pub fn set_update_mask<T>(mut self, v: T) -> Self
18924        where
18925            T: std::convert::Into<wkt::FieldMask>,
18926        {
18927            self.0.request.update_mask = std::option::Option::Some(v.into());
18928            self
18929        }
18930
18931        /// Sets or clears the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
18932        ///
18933        /// This is a **required** field for requests.
18934        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
18935        where
18936            T: std::convert::Into<wkt::FieldMask>,
18937        {
18938            self.0.request.update_mask = v.map(|x| x.into());
18939            self
18940        }
18941
18942        /// Sets the value of [asset][crate::model::UpdateAssetRequest::asset].
18943        ///
18944        /// This is a **required** field for requests.
18945        pub fn set_asset<T>(mut self, v: T) -> Self
18946        where
18947            T: std::convert::Into<crate::model::Asset>,
18948        {
18949            self.0.request.asset = std::option::Option::Some(v.into());
18950            self
18951        }
18952
18953        /// Sets or clears the value of [asset][crate::model::UpdateAssetRequest::asset].
18954        ///
18955        /// This is a **required** field for requests.
18956        pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
18957        where
18958            T: std::convert::Into<crate::model::Asset>,
18959        {
18960            self.0.request.asset = v.map(|x| x.into());
18961            self
18962        }
18963
18964        /// Sets the value of [validate_only][crate::model::UpdateAssetRequest::validate_only].
18965        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18966            self.0.request.validate_only = v.into();
18967            self
18968        }
18969    }
18970
18971    #[doc(hidden)]
18972    impl crate::RequestBuilder for UpdateAsset {
18973        fn request_options(&mut self) -> &mut crate::RequestOptions {
18974            &mut self.0.options
18975        }
18976    }
18977
18978    /// The request builder for [DataplexService::delete_asset][crate::client::DataplexService::delete_asset] calls.
18979    ///
18980    /// # Example
18981    /// ```
18982    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteAsset;
18983    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18984    /// use google_cloud_lro::Poller;
18985    ///
18986    /// let builder = prepare_request_builder();
18987    /// let response = builder.poller().until_done().await?;
18988    /// # Ok(()) }
18989    ///
18990    /// fn prepare_request_builder() -> DeleteAsset {
18991    ///   # panic!();
18992    ///   // ... details omitted ...
18993    /// }
18994    /// ```
18995    #[derive(Clone, Debug)]
18996    pub struct DeleteAsset(RequestBuilder<crate::model::DeleteAssetRequest>);
18997
18998    impl DeleteAsset {
18999        pub(crate) fn new(
19000            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19001        ) -> Self {
19002            Self(RequestBuilder::new(stub))
19003        }
19004
19005        /// Sets the full request, replacing any prior values.
19006        pub fn with_request<V: Into<crate::model::DeleteAssetRequest>>(mut self, v: V) -> Self {
19007            self.0.request = v.into();
19008            self
19009        }
19010
19011        /// Sets all the options, replacing any prior values.
19012        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19013            self.0.options = v.into();
19014            self
19015        }
19016
19017        /// Sends the request.
19018        ///
19019        /// # Long running operations
19020        ///
19021        /// This starts, but does not poll, a longrunning operation. More information
19022        /// on [delete_asset][crate::client::DataplexService::delete_asset].
19023        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19024            (*self.0.stub)
19025                .delete_asset(self.0.request, self.0.options)
19026                .await
19027                .map(crate::Response::into_body)
19028        }
19029
19030        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_asset`.
19031        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
19032            type Operation =
19033                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
19034            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19035            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19036
19037            let stub = self.0.stub.clone();
19038            let mut options = self.0.options.clone();
19039            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19040            let query = move |name| {
19041                let stub = stub.clone();
19042                let options = options.clone();
19043                async {
19044                    let op = GetOperation::new(stub)
19045                        .set_name(name)
19046                        .with_options(options)
19047                        .send()
19048                        .await?;
19049                    Ok(Operation::new(op))
19050                }
19051            };
19052
19053            let start = move || async {
19054                let op = self.send().await?;
19055                Ok(Operation::new(op))
19056            };
19057
19058            google_cloud_lro::internal::new_unit_response_poller(
19059                polling_error_policy,
19060                polling_backoff_policy,
19061                start,
19062                query,
19063            )
19064        }
19065
19066        /// Sets the value of [name][crate::model::DeleteAssetRequest::name].
19067        ///
19068        /// This is a **required** field for requests.
19069        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19070            self.0.request.name = v.into();
19071            self
19072        }
19073    }
19074
19075    #[doc(hidden)]
19076    impl crate::RequestBuilder for DeleteAsset {
19077        fn request_options(&mut self) -> &mut crate::RequestOptions {
19078            &mut self.0.options
19079        }
19080    }
19081
19082    /// The request builder for [DataplexService::list_assets][crate::client::DataplexService::list_assets] calls.
19083    ///
19084    /// # Example
19085    /// ```
19086    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListAssets;
19087    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19088    /// use google_cloud_gax::paginator::ItemPaginator;
19089    ///
19090    /// let builder = prepare_request_builder();
19091    /// let mut items = builder.by_item();
19092    /// while let Some(result) = items.next().await {
19093    ///   let item = result?;
19094    /// }
19095    /// # Ok(()) }
19096    ///
19097    /// fn prepare_request_builder() -> ListAssets {
19098    ///   # panic!();
19099    ///   // ... details omitted ...
19100    /// }
19101    /// ```
19102    #[derive(Clone, Debug)]
19103    pub struct ListAssets(RequestBuilder<crate::model::ListAssetsRequest>);
19104
19105    impl ListAssets {
19106        pub(crate) fn new(
19107            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19108        ) -> Self {
19109            Self(RequestBuilder::new(stub))
19110        }
19111
19112        /// Sets the full request, replacing any prior values.
19113        pub fn with_request<V: Into<crate::model::ListAssetsRequest>>(mut self, v: V) -> Self {
19114            self.0.request = v.into();
19115            self
19116        }
19117
19118        /// Sets all the options, replacing any prior values.
19119        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19120            self.0.options = v.into();
19121            self
19122        }
19123
19124        /// Sends the request.
19125        pub async fn send(self) -> Result<crate::model::ListAssetsResponse> {
19126            (*self.0.stub)
19127                .list_assets(self.0.request, self.0.options)
19128                .await
19129                .map(crate::Response::into_body)
19130        }
19131
19132        /// Streams each page in the collection.
19133        pub fn by_page(
19134            self,
19135        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListAssetsResponse, crate::Error>
19136        {
19137            use std::clone::Clone;
19138            let token = self.0.request.page_token.clone();
19139            let execute = move |token: String| {
19140                let mut builder = self.clone();
19141                builder.0.request = builder.0.request.set_page_token(token);
19142                builder.send()
19143            };
19144            google_cloud_gax::paginator::internal::new_paginator(token, execute)
19145        }
19146
19147        /// Streams each item in the collection.
19148        pub fn by_item(
19149            self,
19150        ) -> impl google_cloud_gax::paginator::ItemPaginator<
19151            crate::model::ListAssetsResponse,
19152            crate::Error,
19153        > {
19154            use google_cloud_gax::paginator::Paginator;
19155            self.by_page().items()
19156        }
19157
19158        /// Sets the value of [parent][crate::model::ListAssetsRequest::parent].
19159        ///
19160        /// This is a **required** field for requests.
19161        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19162            self.0.request.parent = v.into();
19163            self
19164        }
19165
19166        /// Sets the value of [page_size][crate::model::ListAssetsRequest::page_size].
19167        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
19168            self.0.request.page_size = v.into();
19169            self
19170        }
19171
19172        /// Sets the value of [page_token][crate::model::ListAssetsRequest::page_token].
19173        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
19174            self.0.request.page_token = v.into();
19175            self
19176        }
19177
19178        /// Sets the value of [filter][crate::model::ListAssetsRequest::filter].
19179        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
19180            self.0.request.filter = v.into();
19181            self
19182        }
19183
19184        /// Sets the value of [order_by][crate::model::ListAssetsRequest::order_by].
19185        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
19186            self.0.request.order_by = v.into();
19187            self
19188        }
19189    }
19190
19191    #[doc(hidden)]
19192    impl crate::RequestBuilder for ListAssets {
19193        fn request_options(&mut self) -> &mut crate::RequestOptions {
19194            &mut self.0.options
19195        }
19196    }
19197
19198    /// The request builder for [DataplexService::get_asset][crate::client::DataplexService::get_asset] calls.
19199    ///
19200    /// # Example
19201    /// ```
19202    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetAsset;
19203    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19204    ///
19205    /// let builder = prepare_request_builder();
19206    /// let response = builder.send().await?;
19207    /// # Ok(()) }
19208    ///
19209    /// fn prepare_request_builder() -> GetAsset {
19210    ///   # panic!();
19211    ///   // ... details omitted ...
19212    /// }
19213    /// ```
19214    #[derive(Clone, Debug)]
19215    pub struct GetAsset(RequestBuilder<crate::model::GetAssetRequest>);
19216
19217    impl GetAsset {
19218        pub(crate) fn new(
19219            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19220        ) -> Self {
19221            Self(RequestBuilder::new(stub))
19222        }
19223
19224        /// Sets the full request, replacing any prior values.
19225        pub fn with_request<V: Into<crate::model::GetAssetRequest>>(mut self, v: V) -> Self {
19226            self.0.request = v.into();
19227            self
19228        }
19229
19230        /// Sets all the options, replacing any prior values.
19231        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19232            self.0.options = v.into();
19233            self
19234        }
19235
19236        /// Sends the request.
19237        pub async fn send(self) -> Result<crate::model::Asset> {
19238            (*self.0.stub)
19239                .get_asset(self.0.request, self.0.options)
19240                .await
19241                .map(crate::Response::into_body)
19242        }
19243
19244        /// Sets the value of [name][crate::model::GetAssetRequest::name].
19245        ///
19246        /// This is a **required** field for requests.
19247        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19248            self.0.request.name = v.into();
19249            self
19250        }
19251    }
19252
19253    #[doc(hidden)]
19254    impl crate::RequestBuilder for GetAsset {
19255        fn request_options(&mut self) -> &mut crate::RequestOptions {
19256            &mut self.0.options
19257        }
19258    }
19259
19260    /// The request builder for [DataplexService::list_asset_actions][crate::client::DataplexService::list_asset_actions] calls.
19261    ///
19262    /// # Example
19263    /// ```
19264    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListAssetActions;
19265    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19266    /// use google_cloud_gax::paginator::ItemPaginator;
19267    ///
19268    /// let builder = prepare_request_builder();
19269    /// let mut items = builder.by_item();
19270    /// while let Some(result) = items.next().await {
19271    ///   let item = result?;
19272    /// }
19273    /// # Ok(()) }
19274    ///
19275    /// fn prepare_request_builder() -> ListAssetActions {
19276    ///   # panic!();
19277    ///   // ... details omitted ...
19278    /// }
19279    /// ```
19280    #[derive(Clone, Debug)]
19281    pub struct ListAssetActions(RequestBuilder<crate::model::ListAssetActionsRequest>);
19282
19283    impl ListAssetActions {
19284        pub(crate) fn new(
19285            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19286        ) -> Self {
19287            Self(RequestBuilder::new(stub))
19288        }
19289
19290        /// Sets the full request, replacing any prior values.
19291        pub fn with_request<V: Into<crate::model::ListAssetActionsRequest>>(
19292            mut self,
19293            v: V,
19294        ) -> Self {
19295            self.0.request = v.into();
19296            self
19297        }
19298
19299        /// Sets all the options, replacing any prior values.
19300        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19301            self.0.options = v.into();
19302            self
19303        }
19304
19305        /// Sends the request.
19306        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
19307            (*self.0.stub)
19308                .list_asset_actions(self.0.request, self.0.options)
19309                .await
19310                .map(crate::Response::into_body)
19311        }
19312
19313        /// Streams each page in the collection.
19314        pub fn by_page(
19315            self,
19316        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListActionsResponse, crate::Error>
19317        {
19318            use std::clone::Clone;
19319            let token = self.0.request.page_token.clone();
19320            let execute = move |token: String| {
19321                let mut builder = self.clone();
19322                builder.0.request = builder.0.request.set_page_token(token);
19323                builder.send()
19324            };
19325            google_cloud_gax::paginator::internal::new_paginator(token, execute)
19326        }
19327
19328        /// Streams each item in the collection.
19329        pub fn by_item(
19330            self,
19331        ) -> impl google_cloud_gax::paginator::ItemPaginator<
19332            crate::model::ListActionsResponse,
19333            crate::Error,
19334        > {
19335            use google_cloud_gax::paginator::Paginator;
19336            self.by_page().items()
19337        }
19338
19339        /// Sets the value of [parent][crate::model::ListAssetActionsRequest::parent].
19340        ///
19341        /// This is a **required** field for requests.
19342        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19343            self.0.request.parent = v.into();
19344            self
19345        }
19346
19347        /// Sets the value of [page_size][crate::model::ListAssetActionsRequest::page_size].
19348        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
19349            self.0.request.page_size = v.into();
19350            self
19351        }
19352
19353        /// Sets the value of [page_token][crate::model::ListAssetActionsRequest::page_token].
19354        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
19355            self.0.request.page_token = v.into();
19356            self
19357        }
19358    }
19359
19360    #[doc(hidden)]
19361    impl crate::RequestBuilder for ListAssetActions {
19362        fn request_options(&mut self) -> &mut crate::RequestOptions {
19363            &mut self.0.options
19364        }
19365    }
19366
19367    /// The request builder for [DataplexService::create_task][crate::client::DataplexService::create_task] calls.
19368    ///
19369    /// # Example
19370    /// ```
19371    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateTask;
19372    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19373    /// use google_cloud_lro::Poller;
19374    ///
19375    /// let builder = prepare_request_builder();
19376    /// let response = builder.poller().until_done().await?;
19377    /// # Ok(()) }
19378    ///
19379    /// fn prepare_request_builder() -> CreateTask {
19380    ///   # panic!();
19381    ///   // ... details omitted ...
19382    /// }
19383    /// ```
19384    #[derive(Clone, Debug)]
19385    pub struct CreateTask(RequestBuilder<crate::model::CreateTaskRequest>);
19386
19387    impl CreateTask {
19388        pub(crate) fn new(
19389            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19390        ) -> Self {
19391            Self(RequestBuilder::new(stub))
19392        }
19393
19394        /// Sets the full request, replacing any prior values.
19395        pub fn with_request<V: Into<crate::model::CreateTaskRequest>>(mut self, v: V) -> Self {
19396            self.0.request = v.into();
19397            self
19398        }
19399
19400        /// Sets all the options, replacing any prior values.
19401        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19402            self.0.options = v.into();
19403            self
19404        }
19405
19406        /// Sends the request.
19407        ///
19408        /// # Long running operations
19409        ///
19410        /// This starts, but does not poll, a longrunning operation. More information
19411        /// on [create_task][crate::client::DataplexService::create_task].
19412        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19413            (*self.0.stub)
19414                .create_task(self.0.request, self.0.options)
19415                .await
19416                .map(crate::Response::into_body)
19417        }
19418
19419        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_task`.
19420        pub fn poller(
19421            self,
19422        ) -> impl google_cloud_lro::Poller<crate::model::Task, crate::model::OperationMetadata>
19423        {
19424            type Operation = google_cloud_lro::internal::Operation<
19425                crate::model::Task,
19426                crate::model::OperationMetadata,
19427            >;
19428            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19429            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19430
19431            let stub = self.0.stub.clone();
19432            let mut options = self.0.options.clone();
19433            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19434            let query = move |name| {
19435                let stub = stub.clone();
19436                let options = options.clone();
19437                async {
19438                    let op = GetOperation::new(stub)
19439                        .set_name(name)
19440                        .with_options(options)
19441                        .send()
19442                        .await?;
19443                    Ok(Operation::new(op))
19444                }
19445            };
19446
19447            let start = move || async {
19448                let op = self.send().await?;
19449                Ok(Operation::new(op))
19450            };
19451
19452            google_cloud_lro::internal::new_poller(
19453                polling_error_policy,
19454                polling_backoff_policy,
19455                start,
19456                query,
19457            )
19458        }
19459
19460        /// Sets the value of [parent][crate::model::CreateTaskRequest::parent].
19461        ///
19462        /// This is a **required** field for requests.
19463        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19464            self.0.request.parent = v.into();
19465            self
19466        }
19467
19468        /// Sets the value of [task_id][crate::model::CreateTaskRequest::task_id].
19469        ///
19470        /// This is a **required** field for requests.
19471        pub fn set_task_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
19472            self.0.request.task_id = v.into();
19473            self
19474        }
19475
19476        /// Sets the value of [task][crate::model::CreateTaskRequest::task].
19477        ///
19478        /// This is a **required** field for requests.
19479        pub fn set_task<T>(mut self, v: T) -> Self
19480        where
19481            T: std::convert::Into<crate::model::Task>,
19482        {
19483            self.0.request.task = std::option::Option::Some(v.into());
19484            self
19485        }
19486
19487        /// Sets or clears the value of [task][crate::model::CreateTaskRequest::task].
19488        ///
19489        /// This is a **required** field for requests.
19490        pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
19491        where
19492            T: std::convert::Into<crate::model::Task>,
19493        {
19494            self.0.request.task = v.map(|x| x.into());
19495            self
19496        }
19497
19498        /// Sets the value of [validate_only][crate::model::CreateTaskRequest::validate_only].
19499        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
19500            self.0.request.validate_only = v.into();
19501            self
19502        }
19503    }
19504
19505    #[doc(hidden)]
19506    impl crate::RequestBuilder for CreateTask {
19507        fn request_options(&mut self) -> &mut crate::RequestOptions {
19508            &mut self.0.options
19509        }
19510    }
19511
19512    /// The request builder for [DataplexService::update_task][crate::client::DataplexService::update_task] calls.
19513    ///
19514    /// # Example
19515    /// ```
19516    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateTask;
19517    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19518    /// use google_cloud_lro::Poller;
19519    ///
19520    /// let builder = prepare_request_builder();
19521    /// let response = builder.poller().until_done().await?;
19522    /// # Ok(()) }
19523    ///
19524    /// fn prepare_request_builder() -> UpdateTask {
19525    ///   # panic!();
19526    ///   // ... details omitted ...
19527    /// }
19528    /// ```
19529    #[derive(Clone, Debug)]
19530    pub struct UpdateTask(RequestBuilder<crate::model::UpdateTaskRequest>);
19531
19532    impl UpdateTask {
19533        pub(crate) fn new(
19534            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19535        ) -> Self {
19536            Self(RequestBuilder::new(stub))
19537        }
19538
19539        /// Sets the full request, replacing any prior values.
19540        pub fn with_request<V: Into<crate::model::UpdateTaskRequest>>(mut self, v: V) -> Self {
19541            self.0.request = v.into();
19542            self
19543        }
19544
19545        /// Sets all the options, replacing any prior values.
19546        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19547            self.0.options = v.into();
19548            self
19549        }
19550
19551        /// Sends the request.
19552        ///
19553        /// # Long running operations
19554        ///
19555        /// This starts, but does not poll, a longrunning operation. More information
19556        /// on [update_task][crate::client::DataplexService::update_task].
19557        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19558            (*self.0.stub)
19559                .update_task(self.0.request, self.0.options)
19560                .await
19561                .map(crate::Response::into_body)
19562        }
19563
19564        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_task`.
19565        pub fn poller(
19566            self,
19567        ) -> impl google_cloud_lro::Poller<crate::model::Task, crate::model::OperationMetadata>
19568        {
19569            type Operation = google_cloud_lro::internal::Operation<
19570                crate::model::Task,
19571                crate::model::OperationMetadata,
19572            >;
19573            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19574            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19575
19576            let stub = self.0.stub.clone();
19577            let mut options = self.0.options.clone();
19578            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19579            let query = move |name| {
19580                let stub = stub.clone();
19581                let options = options.clone();
19582                async {
19583                    let op = GetOperation::new(stub)
19584                        .set_name(name)
19585                        .with_options(options)
19586                        .send()
19587                        .await?;
19588                    Ok(Operation::new(op))
19589                }
19590            };
19591
19592            let start = move || async {
19593                let op = self.send().await?;
19594                Ok(Operation::new(op))
19595            };
19596
19597            google_cloud_lro::internal::new_poller(
19598                polling_error_policy,
19599                polling_backoff_policy,
19600                start,
19601                query,
19602            )
19603        }
19604
19605        /// Sets the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
19606        ///
19607        /// This is a **required** field for requests.
19608        pub fn set_update_mask<T>(mut self, v: T) -> Self
19609        where
19610            T: std::convert::Into<wkt::FieldMask>,
19611        {
19612            self.0.request.update_mask = std::option::Option::Some(v.into());
19613            self
19614        }
19615
19616        /// Sets or clears the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
19617        ///
19618        /// This is a **required** field for requests.
19619        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
19620        where
19621            T: std::convert::Into<wkt::FieldMask>,
19622        {
19623            self.0.request.update_mask = v.map(|x| x.into());
19624            self
19625        }
19626
19627        /// Sets the value of [task][crate::model::UpdateTaskRequest::task].
19628        ///
19629        /// This is a **required** field for requests.
19630        pub fn set_task<T>(mut self, v: T) -> Self
19631        where
19632            T: std::convert::Into<crate::model::Task>,
19633        {
19634            self.0.request.task = std::option::Option::Some(v.into());
19635            self
19636        }
19637
19638        /// Sets or clears the value of [task][crate::model::UpdateTaskRequest::task].
19639        ///
19640        /// This is a **required** field for requests.
19641        pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
19642        where
19643            T: std::convert::Into<crate::model::Task>,
19644        {
19645            self.0.request.task = v.map(|x| x.into());
19646            self
19647        }
19648
19649        /// Sets the value of [validate_only][crate::model::UpdateTaskRequest::validate_only].
19650        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
19651            self.0.request.validate_only = v.into();
19652            self
19653        }
19654    }
19655
19656    #[doc(hidden)]
19657    impl crate::RequestBuilder for UpdateTask {
19658        fn request_options(&mut self) -> &mut crate::RequestOptions {
19659            &mut self.0.options
19660        }
19661    }
19662
19663    /// The request builder for [DataplexService::delete_task][crate::client::DataplexService::delete_task] calls.
19664    ///
19665    /// # Example
19666    /// ```
19667    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteTask;
19668    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19669    /// use google_cloud_lro::Poller;
19670    ///
19671    /// let builder = prepare_request_builder();
19672    /// let response = builder.poller().until_done().await?;
19673    /// # Ok(()) }
19674    ///
19675    /// fn prepare_request_builder() -> DeleteTask {
19676    ///   # panic!();
19677    ///   // ... details omitted ...
19678    /// }
19679    /// ```
19680    #[derive(Clone, Debug)]
19681    pub struct DeleteTask(RequestBuilder<crate::model::DeleteTaskRequest>);
19682
19683    impl DeleteTask {
19684        pub(crate) fn new(
19685            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19686        ) -> Self {
19687            Self(RequestBuilder::new(stub))
19688        }
19689
19690        /// Sets the full request, replacing any prior values.
19691        pub fn with_request<V: Into<crate::model::DeleteTaskRequest>>(mut self, v: V) -> Self {
19692            self.0.request = v.into();
19693            self
19694        }
19695
19696        /// Sets all the options, replacing any prior values.
19697        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19698            self.0.options = v.into();
19699            self
19700        }
19701
19702        /// Sends the request.
19703        ///
19704        /// # Long running operations
19705        ///
19706        /// This starts, but does not poll, a longrunning operation. More information
19707        /// on [delete_task][crate::client::DataplexService::delete_task].
19708        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19709            (*self.0.stub)
19710                .delete_task(self.0.request, self.0.options)
19711                .await
19712                .map(crate::Response::into_body)
19713        }
19714
19715        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_task`.
19716        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
19717            type Operation =
19718                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
19719            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19720            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19721
19722            let stub = self.0.stub.clone();
19723            let mut options = self.0.options.clone();
19724            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19725            let query = move |name| {
19726                let stub = stub.clone();
19727                let options = options.clone();
19728                async {
19729                    let op = GetOperation::new(stub)
19730                        .set_name(name)
19731                        .with_options(options)
19732                        .send()
19733                        .await?;
19734                    Ok(Operation::new(op))
19735                }
19736            };
19737
19738            let start = move || async {
19739                let op = self.send().await?;
19740                Ok(Operation::new(op))
19741            };
19742
19743            google_cloud_lro::internal::new_unit_response_poller(
19744                polling_error_policy,
19745                polling_backoff_policy,
19746                start,
19747                query,
19748            )
19749        }
19750
19751        /// Sets the value of [name][crate::model::DeleteTaskRequest::name].
19752        ///
19753        /// This is a **required** field for requests.
19754        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19755            self.0.request.name = v.into();
19756            self
19757        }
19758    }
19759
19760    #[doc(hidden)]
19761    impl crate::RequestBuilder for DeleteTask {
19762        fn request_options(&mut self) -> &mut crate::RequestOptions {
19763            &mut self.0.options
19764        }
19765    }
19766
19767    /// The request builder for [DataplexService::list_tasks][crate::client::DataplexService::list_tasks] calls.
19768    ///
19769    /// # Example
19770    /// ```
19771    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListTasks;
19772    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19773    /// use google_cloud_gax::paginator::ItemPaginator;
19774    ///
19775    /// let builder = prepare_request_builder();
19776    /// let mut items = builder.by_item();
19777    /// while let Some(result) = items.next().await {
19778    ///   let item = result?;
19779    /// }
19780    /// # Ok(()) }
19781    ///
19782    /// fn prepare_request_builder() -> ListTasks {
19783    ///   # panic!();
19784    ///   // ... details omitted ...
19785    /// }
19786    /// ```
19787    #[derive(Clone, Debug)]
19788    pub struct ListTasks(RequestBuilder<crate::model::ListTasksRequest>);
19789
19790    impl ListTasks {
19791        pub(crate) fn new(
19792            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19793        ) -> Self {
19794            Self(RequestBuilder::new(stub))
19795        }
19796
19797        /// Sets the full request, replacing any prior values.
19798        pub fn with_request<V: Into<crate::model::ListTasksRequest>>(mut self, v: V) -> Self {
19799            self.0.request = v.into();
19800            self
19801        }
19802
19803        /// Sets all the options, replacing any prior values.
19804        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19805            self.0.options = v.into();
19806            self
19807        }
19808
19809        /// Sends the request.
19810        pub async fn send(self) -> Result<crate::model::ListTasksResponse> {
19811            (*self.0.stub)
19812                .list_tasks(self.0.request, self.0.options)
19813                .await
19814                .map(crate::Response::into_body)
19815        }
19816
19817        /// Streams each page in the collection.
19818        pub fn by_page(
19819            self,
19820        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListTasksResponse, crate::Error>
19821        {
19822            use std::clone::Clone;
19823            let token = self.0.request.page_token.clone();
19824            let execute = move |token: String| {
19825                let mut builder = self.clone();
19826                builder.0.request = builder.0.request.set_page_token(token);
19827                builder.send()
19828            };
19829            google_cloud_gax::paginator::internal::new_paginator(token, execute)
19830        }
19831
19832        /// Streams each item in the collection.
19833        pub fn by_item(
19834            self,
19835        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListTasksResponse, crate::Error>
19836        {
19837            use google_cloud_gax::paginator::Paginator;
19838            self.by_page().items()
19839        }
19840
19841        /// Sets the value of [parent][crate::model::ListTasksRequest::parent].
19842        ///
19843        /// This is a **required** field for requests.
19844        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19845            self.0.request.parent = v.into();
19846            self
19847        }
19848
19849        /// Sets the value of [page_size][crate::model::ListTasksRequest::page_size].
19850        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
19851            self.0.request.page_size = v.into();
19852            self
19853        }
19854
19855        /// Sets the value of [page_token][crate::model::ListTasksRequest::page_token].
19856        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
19857            self.0.request.page_token = v.into();
19858            self
19859        }
19860
19861        /// Sets the value of [filter][crate::model::ListTasksRequest::filter].
19862        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
19863            self.0.request.filter = v.into();
19864            self
19865        }
19866
19867        /// Sets the value of [order_by][crate::model::ListTasksRequest::order_by].
19868        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
19869            self.0.request.order_by = v.into();
19870            self
19871        }
19872    }
19873
19874    #[doc(hidden)]
19875    impl crate::RequestBuilder for ListTasks {
19876        fn request_options(&mut self) -> &mut crate::RequestOptions {
19877            &mut self.0.options
19878        }
19879    }
19880
19881    /// The request builder for [DataplexService::get_task][crate::client::DataplexService::get_task] calls.
19882    ///
19883    /// # Example
19884    /// ```
19885    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetTask;
19886    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19887    ///
19888    /// let builder = prepare_request_builder();
19889    /// let response = builder.send().await?;
19890    /// # Ok(()) }
19891    ///
19892    /// fn prepare_request_builder() -> GetTask {
19893    ///   # panic!();
19894    ///   // ... details omitted ...
19895    /// }
19896    /// ```
19897    #[derive(Clone, Debug)]
19898    pub struct GetTask(RequestBuilder<crate::model::GetTaskRequest>);
19899
19900    impl GetTask {
19901        pub(crate) fn new(
19902            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19903        ) -> Self {
19904            Self(RequestBuilder::new(stub))
19905        }
19906
19907        /// Sets the full request, replacing any prior values.
19908        pub fn with_request<V: Into<crate::model::GetTaskRequest>>(mut self, v: V) -> Self {
19909            self.0.request = v.into();
19910            self
19911        }
19912
19913        /// Sets all the options, replacing any prior values.
19914        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19915            self.0.options = v.into();
19916            self
19917        }
19918
19919        /// Sends the request.
19920        pub async fn send(self) -> Result<crate::model::Task> {
19921            (*self.0.stub)
19922                .get_task(self.0.request, self.0.options)
19923                .await
19924                .map(crate::Response::into_body)
19925        }
19926
19927        /// Sets the value of [name][crate::model::GetTaskRequest::name].
19928        ///
19929        /// This is a **required** field for requests.
19930        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19931            self.0.request.name = v.into();
19932            self
19933        }
19934    }
19935
19936    #[doc(hidden)]
19937    impl crate::RequestBuilder for GetTask {
19938        fn request_options(&mut self) -> &mut crate::RequestOptions {
19939            &mut self.0.options
19940        }
19941    }
19942
19943    /// The request builder for [DataplexService::list_jobs][crate::client::DataplexService::list_jobs] calls.
19944    ///
19945    /// # Example
19946    /// ```
19947    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListJobs;
19948    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19949    /// use google_cloud_gax::paginator::ItemPaginator;
19950    ///
19951    /// let builder = prepare_request_builder();
19952    /// let mut items = builder.by_item();
19953    /// while let Some(result) = items.next().await {
19954    ///   let item = result?;
19955    /// }
19956    /// # Ok(()) }
19957    ///
19958    /// fn prepare_request_builder() -> ListJobs {
19959    ///   # panic!();
19960    ///   // ... details omitted ...
19961    /// }
19962    /// ```
19963    #[derive(Clone, Debug)]
19964    pub struct ListJobs(RequestBuilder<crate::model::ListJobsRequest>);
19965
19966    impl ListJobs {
19967        pub(crate) fn new(
19968            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19969        ) -> Self {
19970            Self(RequestBuilder::new(stub))
19971        }
19972
19973        /// Sets the full request, replacing any prior values.
19974        pub fn with_request<V: Into<crate::model::ListJobsRequest>>(mut self, v: V) -> Self {
19975            self.0.request = v.into();
19976            self
19977        }
19978
19979        /// Sets all the options, replacing any prior values.
19980        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19981            self.0.options = v.into();
19982            self
19983        }
19984
19985        /// Sends the request.
19986        pub async fn send(self) -> Result<crate::model::ListJobsResponse> {
19987            (*self.0.stub)
19988                .list_jobs(self.0.request, self.0.options)
19989                .await
19990                .map(crate::Response::into_body)
19991        }
19992
19993        /// Streams each page in the collection.
19994        pub fn by_page(
19995            self,
19996        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListJobsResponse, crate::Error>
19997        {
19998            use std::clone::Clone;
19999            let token = self.0.request.page_token.clone();
20000            let execute = move |token: String| {
20001                let mut builder = self.clone();
20002                builder.0.request = builder.0.request.set_page_token(token);
20003                builder.send()
20004            };
20005            google_cloud_gax::paginator::internal::new_paginator(token, execute)
20006        }
20007
20008        /// Streams each item in the collection.
20009        pub fn by_item(
20010            self,
20011        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListJobsResponse, crate::Error>
20012        {
20013            use google_cloud_gax::paginator::Paginator;
20014            self.by_page().items()
20015        }
20016
20017        /// Sets the value of [parent][crate::model::ListJobsRequest::parent].
20018        ///
20019        /// This is a **required** field for requests.
20020        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
20021            self.0.request.parent = v.into();
20022            self
20023        }
20024
20025        /// Sets the value of [page_size][crate::model::ListJobsRequest::page_size].
20026        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
20027            self.0.request.page_size = v.into();
20028            self
20029        }
20030
20031        /// Sets the value of [page_token][crate::model::ListJobsRequest::page_token].
20032        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
20033            self.0.request.page_token = v.into();
20034            self
20035        }
20036    }
20037
20038    #[doc(hidden)]
20039    impl crate::RequestBuilder for ListJobs {
20040        fn request_options(&mut self) -> &mut crate::RequestOptions {
20041            &mut self.0.options
20042        }
20043    }
20044
20045    /// The request builder for [DataplexService::run_task][crate::client::DataplexService::run_task] calls.
20046    ///
20047    /// # Example
20048    /// ```
20049    /// # use google_cloud_dataplex_v1::builder::dataplex_service::RunTask;
20050    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20051    ///
20052    /// let builder = prepare_request_builder();
20053    /// let response = builder.send().await?;
20054    /// # Ok(()) }
20055    ///
20056    /// fn prepare_request_builder() -> RunTask {
20057    ///   # panic!();
20058    ///   // ... details omitted ...
20059    /// }
20060    /// ```
20061    #[derive(Clone, Debug)]
20062    pub struct RunTask(RequestBuilder<crate::model::RunTaskRequest>);
20063
20064    impl RunTask {
20065        pub(crate) fn new(
20066            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20067        ) -> Self {
20068            Self(RequestBuilder::new(stub))
20069        }
20070
20071        /// Sets the full request, replacing any prior values.
20072        pub fn with_request<V: Into<crate::model::RunTaskRequest>>(mut self, v: V) -> Self {
20073            self.0.request = v.into();
20074            self
20075        }
20076
20077        /// Sets all the options, replacing any prior values.
20078        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20079            self.0.options = v.into();
20080            self
20081        }
20082
20083        /// Sends the request.
20084        pub async fn send(self) -> Result<crate::model::RunTaskResponse> {
20085            (*self.0.stub)
20086                .run_task(self.0.request, self.0.options)
20087                .await
20088                .map(crate::Response::into_body)
20089        }
20090
20091        /// Sets the value of [name][crate::model::RunTaskRequest::name].
20092        ///
20093        /// This is a **required** field for requests.
20094        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20095            self.0.request.name = v.into();
20096            self
20097        }
20098
20099        /// Sets the value of [labels][crate::model::RunTaskRequest::labels].
20100        pub fn set_labels<T, K, V>(mut self, v: T) -> Self
20101        where
20102            T: std::iter::IntoIterator<Item = (K, V)>,
20103            K: std::convert::Into<std::string::String>,
20104            V: std::convert::Into<std::string::String>,
20105        {
20106            self.0.request.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
20107            self
20108        }
20109
20110        /// Sets the value of [args][crate::model::RunTaskRequest::args].
20111        pub fn set_args<T, K, V>(mut self, v: T) -> Self
20112        where
20113            T: std::iter::IntoIterator<Item = (K, V)>,
20114            K: std::convert::Into<std::string::String>,
20115            V: std::convert::Into<std::string::String>,
20116        {
20117            self.0.request.args = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
20118            self
20119        }
20120    }
20121
20122    #[doc(hidden)]
20123    impl crate::RequestBuilder for RunTask {
20124        fn request_options(&mut self) -> &mut crate::RequestOptions {
20125            &mut self.0.options
20126        }
20127    }
20128
20129    /// The request builder for [DataplexService::get_job][crate::client::DataplexService::get_job] calls.
20130    ///
20131    /// # Example
20132    /// ```
20133    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetJob;
20134    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20135    ///
20136    /// let builder = prepare_request_builder();
20137    /// let response = builder.send().await?;
20138    /// # Ok(()) }
20139    ///
20140    /// fn prepare_request_builder() -> GetJob {
20141    ///   # panic!();
20142    ///   // ... details omitted ...
20143    /// }
20144    /// ```
20145    #[derive(Clone, Debug)]
20146    pub struct GetJob(RequestBuilder<crate::model::GetJobRequest>);
20147
20148    impl GetJob {
20149        pub(crate) fn new(
20150            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20151        ) -> Self {
20152            Self(RequestBuilder::new(stub))
20153        }
20154
20155        /// Sets the full request, replacing any prior values.
20156        pub fn with_request<V: Into<crate::model::GetJobRequest>>(mut self, v: V) -> Self {
20157            self.0.request = v.into();
20158            self
20159        }
20160
20161        /// Sets all the options, replacing any prior values.
20162        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20163            self.0.options = v.into();
20164            self
20165        }
20166
20167        /// Sends the request.
20168        pub async fn send(self) -> Result<crate::model::Job> {
20169            (*self.0.stub)
20170                .get_job(self.0.request, self.0.options)
20171                .await
20172                .map(crate::Response::into_body)
20173        }
20174
20175        /// Sets the value of [name][crate::model::GetJobRequest::name].
20176        ///
20177        /// This is a **required** field for requests.
20178        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20179            self.0.request.name = v.into();
20180            self
20181        }
20182    }
20183
20184    #[doc(hidden)]
20185    impl crate::RequestBuilder for GetJob {
20186        fn request_options(&mut self) -> &mut crate::RequestOptions {
20187            &mut self.0.options
20188        }
20189    }
20190
20191    /// The request builder for [DataplexService::cancel_job][crate::client::DataplexService::cancel_job] calls.
20192    ///
20193    /// # Example
20194    /// ```
20195    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CancelJob;
20196    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20197    ///
20198    /// let builder = prepare_request_builder();
20199    /// let response = builder.send().await?;
20200    /// # Ok(()) }
20201    ///
20202    /// fn prepare_request_builder() -> CancelJob {
20203    ///   # panic!();
20204    ///   // ... details omitted ...
20205    /// }
20206    /// ```
20207    #[derive(Clone, Debug)]
20208    pub struct CancelJob(RequestBuilder<crate::model::CancelJobRequest>);
20209
20210    impl CancelJob {
20211        pub(crate) fn new(
20212            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20213        ) -> Self {
20214            Self(RequestBuilder::new(stub))
20215        }
20216
20217        /// Sets the full request, replacing any prior values.
20218        pub fn with_request<V: Into<crate::model::CancelJobRequest>>(mut self, v: V) -> Self {
20219            self.0.request = v.into();
20220            self
20221        }
20222
20223        /// Sets all the options, replacing any prior values.
20224        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20225            self.0.options = v.into();
20226            self
20227        }
20228
20229        /// Sends the request.
20230        pub async fn send(self) -> Result<()> {
20231            (*self.0.stub)
20232                .cancel_job(self.0.request, self.0.options)
20233                .await
20234                .map(crate::Response::into_body)
20235        }
20236
20237        /// Sets the value of [name][crate::model::CancelJobRequest::name].
20238        ///
20239        /// This is a **required** field for requests.
20240        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20241            self.0.request.name = v.into();
20242            self
20243        }
20244    }
20245
20246    #[doc(hidden)]
20247    impl crate::RequestBuilder for CancelJob {
20248        fn request_options(&mut self) -> &mut crate::RequestOptions {
20249            &mut self.0.options
20250        }
20251    }
20252
20253    /// The request builder for [DataplexService::list_locations][crate::client::DataplexService::list_locations] calls.
20254    ///
20255    /// # Example
20256    /// ```
20257    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListLocations;
20258    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20259    /// use google_cloud_gax::paginator::ItemPaginator;
20260    ///
20261    /// let builder = prepare_request_builder();
20262    /// let mut items = builder.by_item();
20263    /// while let Some(result) = items.next().await {
20264    ///   let item = result?;
20265    /// }
20266    /// # Ok(()) }
20267    ///
20268    /// fn prepare_request_builder() -> ListLocations {
20269    ///   # panic!();
20270    ///   // ... details omitted ...
20271    /// }
20272    /// ```
20273    #[derive(Clone, Debug)]
20274    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
20275
20276    impl ListLocations {
20277        pub(crate) fn new(
20278            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20279        ) -> Self {
20280            Self(RequestBuilder::new(stub))
20281        }
20282
20283        /// Sets the full request, replacing any prior values.
20284        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
20285            mut self,
20286            v: V,
20287        ) -> Self {
20288            self.0.request = v.into();
20289            self
20290        }
20291
20292        /// Sets all the options, replacing any prior values.
20293        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20294            self.0.options = v.into();
20295            self
20296        }
20297
20298        /// Sends the request.
20299        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
20300            (*self.0.stub)
20301                .list_locations(self.0.request, self.0.options)
20302                .await
20303                .map(crate::Response::into_body)
20304        }
20305
20306        /// Streams each page in the collection.
20307        pub fn by_page(
20308            self,
20309        ) -> impl google_cloud_gax::paginator::Paginator<
20310            google_cloud_location::model::ListLocationsResponse,
20311            crate::Error,
20312        > {
20313            use std::clone::Clone;
20314            let token = self.0.request.page_token.clone();
20315            let execute = move |token: String| {
20316                let mut builder = self.clone();
20317                builder.0.request = builder.0.request.set_page_token(token);
20318                builder.send()
20319            };
20320            google_cloud_gax::paginator::internal::new_paginator(token, execute)
20321        }
20322
20323        /// Streams each item in the collection.
20324        pub fn by_item(
20325            self,
20326        ) -> impl google_cloud_gax::paginator::ItemPaginator<
20327            google_cloud_location::model::ListLocationsResponse,
20328            crate::Error,
20329        > {
20330            use google_cloud_gax::paginator::Paginator;
20331            self.by_page().items()
20332        }
20333
20334        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
20335        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20336            self.0.request.name = v.into();
20337            self
20338        }
20339
20340        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
20341        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
20342            self.0.request.filter = v.into();
20343            self
20344        }
20345
20346        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
20347        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
20348            self.0.request.page_size = v.into();
20349            self
20350        }
20351
20352        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
20353        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
20354            self.0.request.page_token = v.into();
20355            self
20356        }
20357    }
20358
20359    #[doc(hidden)]
20360    impl crate::RequestBuilder for ListLocations {
20361        fn request_options(&mut self) -> &mut crate::RequestOptions {
20362            &mut self.0.options
20363        }
20364    }
20365
20366    /// The request builder for [DataplexService::get_location][crate::client::DataplexService::get_location] calls.
20367    ///
20368    /// # Example
20369    /// ```
20370    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetLocation;
20371    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20372    ///
20373    /// let builder = prepare_request_builder();
20374    /// let response = builder.send().await?;
20375    /// # Ok(()) }
20376    ///
20377    /// fn prepare_request_builder() -> GetLocation {
20378    ///   # panic!();
20379    ///   // ... details omitted ...
20380    /// }
20381    /// ```
20382    #[derive(Clone, Debug)]
20383    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
20384
20385    impl GetLocation {
20386        pub(crate) fn new(
20387            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20388        ) -> Self {
20389            Self(RequestBuilder::new(stub))
20390        }
20391
20392        /// Sets the full request, replacing any prior values.
20393        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
20394            mut self,
20395            v: V,
20396        ) -> Self {
20397            self.0.request = v.into();
20398            self
20399        }
20400
20401        /// Sets all the options, replacing any prior values.
20402        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20403            self.0.options = v.into();
20404            self
20405        }
20406
20407        /// Sends the request.
20408        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
20409            (*self.0.stub)
20410                .get_location(self.0.request, self.0.options)
20411                .await
20412                .map(crate::Response::into_body)
20413        }
20414
20415        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
20416        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20417            self.0.request.name = v.into();
20418            self
20419        }
20420    }
20421
20422    #[doc(hidden)]
20423    impl crate::RequestBuilder for GetLocation {
20424        fn request_options(&mut self) -> &mut crate::RequestOptions {
20425            &mut self.0.options
20426        }
20427    }
20428
20429    /// The request builder for [DataplexService::set_iam_policy][crate::client::DataplexService::set_iam_policy] calls.
20430    ///
20431    /// # Example
20432    /// ```
20433    /// # use google_cloud_dataplex_v1::builder::dataplex_service::SetIamPolicy;
20434    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20435    ///
20436    /// let builder = prepare_request_builder();
20437    /// let response = builder.send().await?;
20438    /// # Ok(()) }
20439    ///
20440    /// fn prepare_request_builder() -> SetIamPolicy {
20441    ///   # panic!();
20442    ///   // ... details omitted ...
20443    /// }
20444    /// ```
20445    #[derive(Clone, Debug)]
20446    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
20447
20448    impl SetIamPolicy {
20449        pub(crate) fn new(
20450            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20451        ) -> Self {
20452            Self(RequestBuilder::new(stub))
20453        }
20454
20455        /// Sets the full request, replacing any prior values.
20456        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
20457            mut self,
20458            v: V,
20459        ) -> Self {
20460            self.0.request = v.into();
20461            self
20462        }
20463
20464        /// Sets all the options, replacing any prior values.
20465        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20466            self.0.options = v.into();
20467            self
20468        }
20469
20470        /// Sends the request.
20471        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
20472            (*self.0.stub)
20473                .set_iam_policy(self.0.request, self.0.options)
20474                .await
20475                .map(crate::Response::into_body)
20476        }
20477
20478        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
20479        ///
20480        /// This is a **required** field for requests.
20481        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
20482            self.0.request.resource = v.into();
20483            self
20484        }
20485
20486        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
20487        ///
20488        /// This is a **required** field for requests.
20489        pub fn set_policy<T>(mut self, v: T) -> Self
20490        where
20491            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
20492        {
20493            self.0.request.policy = std::option::Option::Some(v.into());
20494            self
20495        }
20496
20497        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
20498        ///
20499        /// This is a **required** field for requests.
20500        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
20501        where
20502            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
20503        {
20504            self.0.request.policy = v.map(|x| x.into());
20505            self
20506        }
20507
20508        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
20509        pub fn set_update_mask<T>(mut self, v: T) -> Self
20510        where
20511            T: std::convert::Into<wkt::FieldMask>,
20512        {
20513            self.0.request.update_mask = std::option::Option::Some(v.into());
20514            self
20515        }
20516
20517        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
20518        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
20519        where
20520            T: std::convert::Into<wkt::FieldMask>,
20521        {
20522            self.0.request.update_mask = v.map(|x| x.into());
20523            self
20524        }
20525    }
20526
20527    #[doc(hidden)]
20528    impl crate::RequestBuilder for SetIamPolicy {
20529        fn request_options(&mut self) -> &mut crate::RequestOptions {
20530            &mut self.0.options
20531        }
20532    }
20533
20534    /// The request builder for [DataplexService::get_iam_policy][crate::client::DataplexService::get_iam_policy] calls.
20535    ///
20536    /// # Example
20537    /// ```
20538    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetIamPolicy;
20539    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20540    ///
20541    /// let builder = prepare_request_builder();
20542    /// let response = builder.send().await?;
20543    /// # Ok(()) }
20544    ///
20545    /// fn prepare_request_builder() -> GetIamPolicy {
20546    ///   # panic!();
20547    ///   // ... details omitted ...
20548    /// }
20549    /// ```
20550    #[derive(Clone, Debug)]
20551    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
20552
20553    impl GetIamPolicy {
20554        pub(crate) fn new(
20555            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20556        ) -> Self {
20557            Self(RequestBuilder::new(stub))
20558        }
20559
20560        /// Sets the full request, replacing any prior values.
20561        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
20562            mut self,
20563            v: V,
20564        ) -> Self {
20565            self.0.request = v.into();
20566            self
20567        }
20568
20569        /// Sets all the options, replacing any prior values.
20570        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20571            self.0.options = v.into();
20572            self
20573        }
20574
20575        /// Sends the request.
20576        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
20577            (*self.0.stub)
20578                .get_iam_policy(self.0.request, self.0.options)
20579                .await
20580                .map(crate::Response::into_body)
20581        }
20582
20583        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
20584        ///
20585        /// This is a **required** field for requests.
20586        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
20587            self.0.request.resource = v.into();
20588            self
20589        }
20590
20591        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
20592        pub fn set_options<T>(mut self, v: T) -> Self
20593        where
20594            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
20595        {
20596            self.0.request.options = std::option::Option::Some(v.into());
20597            self
20598        }
20599
20600        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
20601        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
20602        where
20603            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
20604        {
20605            self.0.request.options = v.map(|x| x.into());
20606            self
20607        }
20608    }
20609
20610    #[doc(hidden)]
20611    impl crate::RequestBuilder for GetIamPolicy {
20612        fn request_options(&mut self) -> &mut crate::RequestOptions {
20613            &mut self.0.options
20614        }
20615    }
20616
20617    /// The request builder for [DataplexService::test_iam_permissions][crate::client::DataplexService::test_iam_permissions] calls.
20618    ///
20619    /// # Example
20620    /// ```
20621    /// # use google_cloud_dataplex_v1::builder::dataplex_service::TestIamPermissions;
20622    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20623    ///
20624    /// let builder = prepare_request_builder();
20625    /// let response = builder.send().await?;
20626    /// # Ok(()) }
20627    ///
20628    /// fn prepare_request_builder() -> TestIamPermissions {
20629    ///   # panic!();
20630    ///   // ... details omitted ...
20631    /// }
20632    /// ```
20633    #[derive(Clone, Debug)]
20634    pub struct TestIamPermissions(
20635        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
20636    );
20637
20638    impl TestIamPermissions {
20639        pub(crate) fn new(
20640            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20641        ) -> Self {
20642            Self(RequestBuilder::new(stub))
20643        }
20644
20645        /// Sets the full request, replacing any prior values.
20646        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
20647            mut self,
20648            v: V,
20649        ) -> Self {
20650            self.0.request = v.into();
20651            self
20652        }
20653
20654        /// Sets all the options, replacing any prior values.
20655        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20656            self.0.options = v.into();
20657            self
20658        }
20659
20660        /// Sends the request.
20661        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
20662            (*self.0.stub)
20663                .test_iam_permissions(self.0.request, self.0.options)
20664                .await
20665                .map(crate::Response::into_body)
20666        }
20667
20668        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
20669        ///
20670        /// This is a **required** field for requests.
20671        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
20672            self.0.request.resource = v.into();
20673            self
20674        }
20675
20676        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
20677        ///
20678        /// This is a **required** field for requests.
20679        pub fn set_permissions<T, V>(mut self, v: T) -> Self
20680        where
20681            T: std::iter::IntoIterator<Item = V>,
20682            V: std::convert::Into<std::string::String>,
20683        {
20684            use std::iter::Iterator;
20685            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
20686            self
20687        }
20688    }
20689
20690    #[doc(hidden)]
20691    impl crate::RequestBuilder for TestIamPermissions {
20692        fn request_options(&mut self) -> &mut crate::RequestOptions {
20693            &mut self.0.options
20694        }
20695    }
20696
20697    /// The request builder for [DataplexService::list_operations][crate::client::DataplexService::list_operations] calls.
20698    ///
20699    /// # Example
20700    /// ```
20701    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListOperations;
20702    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20703    /// use google_cloud_gax::paginator::ItemPaginator;
20704    ///
20705    /// let builder = prepare_request_builder();
20706    /// let mut items = builder.by_item();
20707    /// while let Some(result) = items.next().await {
20708    ///   let item = result?;
20709    /// }
20710    /// # Ok(()) }
20711    ///
20712    /// fn prepare_request_builder() -> ListOperations {
20713    ///   # panic!();
20714    ///   // ... details omitted ...
20715    /// }
20716    /// ```
20717    #[derive(Clone, Debug)]
20718    pub struct ListOperations(
20719        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
20720    );
20721
20722    impl ListOperations {
20723        pub(crate) fn new(
20724            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20725        ) -> Self {
20726            Self(RequestBuilder::new(stub))
20727        }
20728
20729        /// Sets the full request, replacing any prior values.
20730        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
20731            mut self,
20732            v: V,
20733        ) -> Self {
20734            self.0.request = v.into();
20735            self
20736        }
20737
20738        /// Sets all the options, replacing any prior values.
20739        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20740            self.0.options = v.into();
20741            self
20742        }
20743
20744        /// Sends the request.
20745        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
20746            (*self.0.stub)
20747                .list_operations(self.0.request, self.0.options)
20748                .await
20749                .map(crate::Response::into_body)
20750        }
20751
20752        /// Streams each page in the collection.
20753        pub fn by_page(
20754            self,
20755        ) -> impl google_cloud_gax::paginator::Paginator<
20756            google_cloud_longrunning::model::ListOperationsResponse,
20757            crate::Error,
20758        > {
20759            use std::clone::Clone;
20760            let token = self.0.request.page_token.clone();
20761            let execute = move |token: String| {
20762                let mut builder = self.clone();
20763                builder.0.request = builder.0.request.set_page_token(token);
20764                builder.send()
20765            };
20766            google_cloud_gax::paginator::internal::new_paginator(token, execute)
20767        }
20768
20769        /// Streams each item in the collection.
20770        pub fn by_item(
20771            self,
20772        ) -> impl google_cloud_gax::paginator::ItemPaginator<
20773            google_cloud_longrunning::model::ListOperationsResponse,
20774            crate::Error,
20775        > {
20776            use google_cloud_gax::paginator::Paginator;
20777            self.by_page().items()
20778        }
20779
20780        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
20781        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20782            self.0.request.name = v.into();
20783            self
20784        }
20785
20786        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
20787        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
20788            self.0.request.filter = v.into();
20789            self
20790        }
20791
20792        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
20793        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
20794            self.0.request.page_size = v.into();
20795            self
20796        }
20797
20798        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
20799        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
20800            self.0.request.page_token = v.into();
20801            self
20802        }
20803
20804        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
20805        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
20806            self.0.request.return_partial_success = v.into();
20807            self
20808        }
20809    }
20810
20811    #[doc(hidden)]
20812    impl crate::RequestBuilder for ListOperations {
20813        fn request_options(&mut self) -> &mut crate::RequestOptions {
20814            &mut self.0.options
20815        }
20816    }
20817
20818    /// The request builder for [DataplexService::get_operation][crate::client::DataplexService::get_operation] calls.
20819    ///
20820    /// # Example
20821    /// ```
20822    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetOperation;
20823    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20824    ///
20825    /// let builder = prepare_request_builder();
20826    /// let response = builder.send().await?;
20827    /// # Ok(()) }
20828    ///
20829    /// fn prepare_request_builder() -> GetOperation {
20830    ///   # panic!();
20831    ///   // ... details omitted ...
20832    /// }
20833    /// ```
20834    #[derive(Clone, Debug)]
20835    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
20836
20837    impl GetOperation {
20838        pub(crate) fn new(
20839            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20840        ) -> Self {
20841            Self(RequestBuilder::new(stub))
20842        }
20843
20844        /// Sets the full request, replacing any prior values.
20845        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
20846            mut self,
20847            v: V,
20848        ) -> Self {
20849            self.0.request = v.into();
20850            self
20851        }
20852
20853        /// Sets all the options, replacing any prior values.
20854        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20855            self.0.options = v.into();
20856            self
20857        }
20858
20859        /// Sends the request.
20860        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
20861            (*self.0.stub)
20862                .get_operation(self.0.request, self.0.options)
20863                .await
20864                .map(crate::Response::into_body)
20865        }
20866
20867        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
20868        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20869            self.0.request.name = v.into();
20870            self
20871        }
20872    }
20873
20874    #[doc(hidden)]
20875    impl crate::RequestBuilder for GetOperation {
20876        fn request_options(&mut self) -> &mut crate::RequestOptions {
20877            &mut self.0.options
20878        }
20879    }
20880
20881    /// The request builder for [DataplexService::delete_operation][crate::client::DataplexService::delete_operation] calls.
20882    ///
20883    /// # Example
20884    /// ```
20885    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteOperation;
20886    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20887    ///
20888    /// let builder = prepare_request_builder();
20889    /// let response = builder.send().await?;
20890    /// # Ok(()) }
20891    ///
20892    /// fn prepare_request_builder() -> DeleteOperation {
20893    ///   # panic!();
20894    ///   // ... details omitted ...
20895    /// }
20896    /// ```
20897    #[derive(Clone, Debug)]
20898    pub struct DeleteOperation(
20899        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
20900    );
20901
20902    impl DeleteOperation {
20903        pub(crate) fn new(
20904            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20905        ) -> Self {
20906            Self(RequestBuilder::new(stub))
20907        }
20908
20909        /// Sets the full request, replacing any prior values.
20910        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
20911            mut self,
20912            v: V,
20913        ) -> Self {
20914            self.0.request = v.into();
20915            self
20916        }
20917
20918        /// Sets all the options, replacing any prior values.
20919        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20920            self.0.options = v.into();
20921            self
20922        }
20923
20924        /// Sends the request.
20925        pub async fn send(self) -> Result<()> {
20926            (*self.0.stub)
20927                .delete_operation(self.0.request, self.0.options)
20928                .await
20929                .map(crate::Response::into_body)
20930        }
20931
20932        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
20933        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20934            self.0.request.name = v.into();
20935            self
20936        }
20937    }
20938
20939    #[doc(hidden)]
20940    impl crate::RequestBuilder for DeleteOperation {
20941        fn request_options(&mut self) -> &mut crate::RequestOptions {
20942            &mut self.0.options
20943        }
20944    }
20945
20946    /// The request builder for [DataplexService::cancel_operation][crate::client::DataplexService::cancel_operation] calls.
20947    ///
20948    /// # Example
20949    /// ```
20950    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CancelOperation;
20951    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20952    ///
20953    /// let builder = prepare_request_builder();
20954    /// let response = builder.send().await?;
20955    /// # Ok(()) }
20956    ///
20957    /// fn prepare_request_builder() -> CancelOperation {
20958    ///   # panic!();
20959    ///   // ... details omitted ...
20960    /// }
20961    /// ```
20962    #[derive(Clone, Debug)]
20963    pub struct CancelOperation(
20964        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
20965    );
20966
20967    impl CancelOperation {
20968        pub(crate) fn new(
20969            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20970        ) -> Self {
20971            Self(RequestBuilder::new(stub))
20972        }
20973
20974        /// Sets the full request, replacing any prior values.
20975        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
20976            mut self,
20977            v: V,
20978        ) -> Self {
20979            self.0.request = v.into();
20980            self
20981        }
20982
20983        /// Sets all the options, replacing any prior values.
20984        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20985            self.0.options = v.into();
20986            self
20987        }
20988
20989        /// Sends the request.
20990        pub async fn send(self) -> Result<()> {
20991            (*self.0.stub)
20992                .cancel_operation(self.0.request, self.0.options)
20993                .await
20994                .map(crate::Response::into_body)
20995        }
20996
20997        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
20998        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20999            self.0.request.name = v.into();
21000            self
21001        }
21002    }
21003
21004    #[doc(hidden)]
21005    impl crate::RequestBuilder for CancelOperation {
21006        fn request_options(&mut self) -> &mut crate::RequestOptions {
21007            &mut self.0.options
21008        }
21009    }
21010}