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::modify_entry][crate::client::CatalogService::modify_entry] calls.
4713    ///
4714    /// # Example
4715    /// ```
4716    /// # use google_cloud_dataplex_v1::builder::catalog_service::ModifyEntry;
4717    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4718    ///
4719    /// let builder = prepare_request_builder();
4720    /// let response = builder.send().await?;
4721    /// # Ok(()) }
4722    ///
4723    /// fn prepare_request_builder() -> ModifyEntry {
4724    ///   # panic!();
4725    ///   // ... details omitted ...
4726    /// }
4727    /// ```
4728    #[derive(Clone, Debug)]
4729    pub struct ModifyEntry(RequestBuilder<crate::model::ModifyEntryRequest>);
4730
4731    impl ModifyEntry {
4732        pub(crate) fn new(
4733            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4734        ) -> Self {
4735            Self(RequestBuilder::new(stub))
4736        }
4737
4738        /// Sets the full request, replacing any prior values.
4739        pub fn with_request<V: Into<crate::model::ModifyEntryRequest>>(mut self, v: V) -> Self {
4740            self.0.request = v.into();
4741            self
4742        }
4743
4744        /// Sets all the options, replacing any prior values.
4745        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4746            self.0.options = v.into();
4747            self
4748        }
4749
4750        /// Sends the request.
4751        pub async fn send(self) -> Result<crate::model::Entry> {
4752            (*self.0.stub)
4753                .modify_entry(self.0.request, self.0.options)
4754                .await
4755                .map(crate::Response::into_body)
4756        }
4757
4758        /// Sets the value of [name][crate::model::ModifyEntryRequest::name].
4759        ///
4760        /// This is a **required** field for requests.
4761        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4762            self.0.request.name = v.into();
4763            self
4764        }
4765
4766        /// Sets the value of [entry][crate::model::ModifyEntryRequest::entry].
4767        ///
4768        /// This is a **required** field for requests.
4769        pub fn set_entry<T>(mut self, v: T) -> Self
4770        where
4771            T: std::convert::Into<crate::model::Entry>,
4772        {
4773            self.0.request.entry = std::option::Option::Some(v.into());
4774            self
4775        }
4776
4777        /// Sets or clears the value of [entry][crate::model::ModifyEntryRequest::entry].
4778        ///
4779        /// This is a **required** field for requests.
4780        pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
4781        where
4782            T: std::convert::Into<crate::model::Entry>,
4783        {
4784            self.0.request.entry = v.map(|x| x.into());
4785            self
4786        }
4787
4788        /// Sets the value of [update_mask][crate::model::ModifyEntryRequest::update_mask].
4789        pub fn set_update_mask<T>(mut self, v: T) -> Self
4790        where
4791            T: std::convert::Into<wkt::FieldMask>,
4792        {
4793            self.0.request.update_mask = std::option::Option::Some(v.into());
4794            self
4795        }
4796
4797        /// Sets or clears the value of [update_mask][crate::model::ModifyEntryRequest::update_mask].
4798        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4799        where
4800            T: std::convert::Into<wkt::FieldMask>,
4801        {
4802            self.0.request.update_mask = v.map(|x| x.into());
4803            self
4804        }
4805
4806        /// Sets the value of [delete_missing_aspects][crate::model::ModifyEntryRequest::delete_missing_aspects].
4807        pub fn set_delete_missing_aspects<T: Into<bool>>(mut self, v: T) -> Self {
4808            self.0.request.delete_missing_aspects = v.into();
4809            self
4810        }
4811
4812        /// Sets the value of [aspect_keys][crate::model::ModifyEntryRequest::aspect_keys].
4813        pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
4814        where
4815            T: std::iter::IntoIterator<Item = V>,
4816            V: std::convert::Into<std::string::String>,
4817        {
4818            use std::iter::Iterator;
4819            self.0.request.aspect_keys = v.into_iter().map(|i| i.into()).collect();
4820            self
4821        }
4822    }
4823
4824    #[doc(hidden)]
4825    impl crate::RequestBuilder for ModifyEntry {
4826        fn request_options(&mut self) -> &mut crate::RequestOptions {
4827            &mut self.0.options
4828        }
4829    }
4830
4831    /// The request builder for [CatalogService::search_entries][crate::client::CatalogService::search_entries] calls.
4832    ///
4833    /// # Example
4834    /// ```
4835    /// # use google_cloud_dataplex_v1::builder::catalog_service::SearchEntries;
4836    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4837    /// use google_cloud_gax::paginator::ItemPaginator;
4838    ///
4839    /// let builder = prepare_request_builder();
4840    /// let mut items = builder.by_item();
4841    /// while let Some(result) = items.next().await {
4842    ///   let item = result?;
4843    /// }
4844    /// # Ok(()) }
4845    ///
4846    /// fn prepare_request_builder() -> SearchEntries {
4847    ///   # panic!();
4848    ///   // ... details omitted ...
4849    /// }
4850    /// ```
4851    #[derive(Clone, Debug)]
4852    pub struct SearchEntries(RequestBuilder<crate::model::SearchEntriesRequest>);
4853
4854    impl SearchEntries {
4855        pub(crate) fn new(
4856            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4857        ) -> Self {
4858            Self(RequestBuilder::new(stub))
4859        }
4860
4861        /// Sets the full request, replacing any prior values.
4862        pub fn with_request<V: Into<crate::model::SearchEntriesRequest>>(mut self, v: V) -> Self {
4863            self.0.request = v.into();
4864            self
4865        }
4866
4867        /// Sets all the options, replacing any prior values.
4868        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4869            self.0.options = v.into();
4870            self
4871        }
4872
4873        /// Sends the request.
4874        pub async fn send(self) -> Result<crate::model::SearchEntriesResponse> {
4875            (*self.0.stub)
4876                .search_entries(self.0.request, self.0.options)
4877                .await
4878                .map(crate::Response::into_body)
4879        }
4880
4881        /// Streams each page in the collection.
4882        pub fn by_page(
4883            self,
4884        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::SearchEntriesResponse, crate::Error>
4885        {
4886            use std::clone::Clone;
4887            let token = self.0.request.page_token.clone();
4888            let execute = move |token: String| {
4889                let mut builder = self.clone();
4890                builder.0.request = builder.0.request.set_page_token(token);
4891                builder.send()
4892            };
4893            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4894        }
4895
4896        /// Streams each item in the collection.
4897        pub fn by_item(
4898            self,
4899        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4900            crate::model::SearchEntriesResponse,
4901            crate::Error,
4902        > {
4903            use google_cloud_gax::paginator::Paginator;
4904            self.by_page().items()
4905        }
4906
4907        /// Sets the value of [name][crate::model::SearchEntriesRequest::name].
4908        ///
4909        /// This is a **required** field for requests.
4910        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4911            self.0.request.name = v.into();
4912            self
4913        }
4914
4915        /// Sets the value of [query][crate::model::SearchEntriesRequest::query].
4916        ///
4917        /// This is a **required** field for requests.
4918        pub fn set_query<T: Into<std::string::String>>(mut self, v: T) -> Self {
4919            self.0.request.query = v.into();
4920            self
4921        }
4922
4923        /// Sets the value of [page_size][crate::model::SearchEntriesRequest::page_size].
4924        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4925            self.0.request.page_size = v.into();
4926            self
4927        }
4928
4929        /// Sets the value of [page_token][crate::model::SearchEntriesRequest::page_token].
4930        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4931            self.0.request.page_token = v.into();
4932            self
4933        }
4934
4935        /// Sets the value of [order_by][crate::model::SearchEntriesRequest::order_by].
4936        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4937            self.0.request.order_by = v.into();
4938            self
4939        }
4940
4941        /// Sets the value of [scope][crate::model::SearchEntriesRequest::scope].
4942        pub fn set_scope<T: Into<std::string::String>>(mut self, v: T) -> Self {
4943            self.0.request.scope = v.into();
4944            self
4945        }
4946
4947        /// Sets the value of [semantic_search][crate::model::SearchEntriesRequest::semantic_search].
4948        pub fn set_semantic_search<T: Into<bool>>(mut self, v: T) -> Self {
4949            self.0.request.semantic_search = v.into();
4950            self
4951        }
4952    }
4953
4954    #[doc(hidden)]
4955    impl crate::RequestBuilder for SearchEntries {
4956        fn request_options(&mut self) -> &mut crate::RequestOptions {
4957            &mut self.0.options
4958        }
4959    }
4960
4961    /// The request builder for [CatalogService::create_metadata_job][crate::client::CatalogService::create_metadata_job] calls.
4962    ///
4963    /// # Example
4964    /// ```
4965    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateMetadataJob;
4966    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4967    /// use google_cloud_lro::Poller;
4968    ///
4969    /// let builder = prepare_request_builder();
4970    /// let response = builder.poller().until_done().await?;
4971    /// # Ok(()) }
4972    ///
4973    /// fn prepare_request_builder() -> CreateMetadataJob {
4974    ///   # panic!();
4975    ///   // ... details omitted ...
4976    /// }
4977    /// ```
4978    #[derive(Clone, Debug)]
4979    pub struct CreateMetadataJob(RequestBuilder<crate::model::CreateMetadataJobRequest>);
4980
4981    impl CreateMetadataJob {
4982        pub(crate) fn new(
4983            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4984        ) -> Self {
4985            Self(RequestBuilder::new(stub))
4986        }
4987
4988        /// Sets the full request, replacing any prior values.
4989        pub fn with_request<V: Into<crate::model::CreateMetadataJobRequest>>(
4990            mut self,
4991            v: V,
4992        ) -> Self {
4993            self.0.request = v.into();
4994            self
4995        }
4996
4997        /// Sets all the options, replacing any prior values.
4998        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4999            self.0.options = v.into();
5000            self
5001        }
5002
5003        /// Sends the request.
5004        ///
5005        /// # Long running operations
5006        ///
5007        /// This starts, but does not poll, a longrunning operation. More information
5008        /// on [create_metadata_job][crate::client::CatalogService::create_metadata_job].
5009        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5010            (*self.0.stub)
5011                .create_metadata_job(self.0.request, self.0.options)
5012                .await
5013                .map(crate::Response::into_body)
5014        }
5015
5016        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_metadata_job`.
5017        pub fn poller(
5018            self,
5019        ) -> impl google_cloud_lro::Poller<crate::model::MetadataJob, crate::model::OperationMetadata>
5020        {
5021            type Operation = google_cloud_lro::internal::Operation<
5022                crate::model::MetadataJob,
5023                crate::model::OperationMetadata,
5024            >;
5025            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5026            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5027
5028            let stub = self.0.stub.clone();
5029            let mut options = self.0.options.clone();
5030            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5031            let query = move |name| {
5032                let stub = stub.clone();
5033                let options = options.clone();
5034                async {
5035                    let op = GetOperation::new(stub)
5036                        .set_name(name)
5037                        .with_options(options)
5038                        .send()
5039                        .await?;
5040                    Ok(Operation::new(op))
5041                }
5042            };
5043
5044            let start = move || async {
5045                let op = self.send().await?;
5046                Ok(Operation::new(op))
5047            };
5048
5049            google_cloud_lro::internal::new_poller(
5050                polling_error_policy,
5051                polling_backoff_policy,
5052                start,
5053                query,
5054            )
5055        }
5056
5057        /// Sets the value of [parent][crate::model::CreateMetadataJobRequest::parent].
5058        ///
5059        /// This is a **required** field for requests.
5060        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5061            self.0.request.parent = v.into();
5062            self
5063        }
5064
5065        /// Sets the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
5066        ///
5067        /// This is a **required** field for requests.
5068        pub fn set_metadata_job<T>(mut self, v: T) -> Self
5069        where
5070            T: std::convert::Into<crate::model::MetadataJob>,
5071        {
5072            self.0.request.metadata_job = std::option::Option::Some(v.into());
5073            self
5074        }
5075
5076        /// Sets or clears the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
5077        ///
5078        /// This is a **required** field for requests.
5079        pub fn set_or_clear_metadata_job<T>(mut self, v: std::option::Option<T>) -> Self
5080        where
5081            T: std::convert::Into<crate::model::MetadataJob>,
5082        {
5083            self.0.request.metadata_job = v.map(|x| x.into());
5084            self
5085        }
5086
5087        /// Sets the value of [metadata_job_id][crate::model::CreateMetadataJobRequest::metadata_job_id].
5088        pub fn set_metadata_job_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5089            self.0.request.metadata_job_id = v.into();
5090            self
5091        }
5092
5093        /// Sets the value of [validate_only][crate::model::CreateMetadataJobRequest::validate_only].
5094        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
5095            self.0.request.validate_only = v.into();
5096            self
5097        }
5098    }
5099
5100    #[doc(hidden)]
5101    impl crate::RequestBuilder for CreateMetadataJob {
5102        fn request_options(&mut self) -> &mut crate::RequestOptions {
5103            &mut self.0.options
5104        }
5105    }
5106
5107    /// The request builder for [CatalogService::get_metadata_job][crate::client::CatalogService::get_metadata_job] calls.
5108    ///
5109    /// # Example
5110    /// ```
5111    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetMetadataJob;
5112    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5113    ///
5114    /// let builder = prepare_request_builder();
5115    /// let response = builder.send().await?;
5116    /// # Ok(()) }
5117    ///
5118    /// fn prepare_request_builder() -> GetMetadataJob {
5119    ///   # panic!();
5120    ///   // ... details omitted ...
5121    /// }
5122    /// ```
5123    #[derive(Clone, Debug)]
5124    pub struct GetMetadataJob(RequestBuilder<crate::model::GetMetadataJobRequest>);
5125
5126    impl GetMetadataJob {
5127        pub(crate) fn new(
5128            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5129        ) -> Self {
5130            Self(RequestBuilder::new(stub))
5131        }
5132
5133        /// Sets the full request, replacing any prior values.
5134        pub fn with_request<V: Into<crate::model::GetMetadataJobRequest>>(mut self, v: V) -> Self {
5135            self.0.request = v.into();
5136            self
5137        }
5138
5139        /// Sets all the options, replacing any prior values.
5140        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5141            self.0.options = v.into();
5142            self
5143        }
5144
5145        /// Sends the request.
5146        pub async fn send(self) -> Result<crate::model::MetadataJob> {
5147            (*self.0.stub)
5148                .get_metadata_job(self.0.request, self.0.options)
5149                .await
5150                .map(crate::Response::into_body)
5151        }
5152
5153        /// Sets the value of [name][crate::model::GetMetadataJobRequest::name].
5154        ///
5155        /// This is a **required** field for requests.
5156        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5157            self.0.request.name = v.into();
5158            self
5159        }
5160    }
5161
5162    #[doc(hidden)]
5163    impl crate::RequestBuilder for GetMetadataJob {
5164        fn request_options(&mut self) -> &mut crate::RequestOptions {
5165            &mut self.0.options
5166        }
5167    }
5168
5169    /// The request builder for [CatalogService::list_metadata_jobs][crate::client::CatalogService::list_metadata_jobs] calls.
5170    ///
5171    /// # Example
5172    /// ```
5173    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListMetadataJobs;
5174    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5175    /// use google_cloud_gax::paginator::ItemPaginator;
5176    ///
5177    /// let builder = prepare_request_builder();
5178    /// let mut items = builder.by_item();
5179    /// while let Some(result) = items.next().await {
5180    ///   let item = result?;
5181    /// }
5182    /// # Ok(()) }
5183    ///
5184    /// fn prepare_request_builder() -> ListMetadataJobs {
5185    ///   # panic!();
5186    ///   // ... details omitted ...
5187    /// }
5188    /// ```
5189    #[derive(Clone, Debug)]
5190    pub struct ListMetadataJobs(RequestBuilder<crate::model::ListMetadataJobsRequest>);
5191
5192    impl ListMetadataJobs {
5193        pub(crate) fn new(
5194            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5195        ) -> Self {
5196            Self(RequestBuilder::new(stub))
5197        }
5198
5199        /// Sets the full request, replacing any prior values.
5200        pub fn with_request<V: Into<crate::model::ListMetadataJobsRequest>>(
5201            mut self,
5202            v: V,
5203        ) -> Self {
5204            self.0.request = v.into();
5205            self
5206        }
5207
5208        /// Sets all the options, replacing any prior values.
5209        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5210            self.0.options = v.into();
5211            self
5212        }
5213
5214        /// Sends the request.
5215        pub async fn send(self) -> Result<crate::model::ListMetadataJobsResponse> {
5216            (*self.0.stub)
5217                .list_metadata_jobs(self.0.request, self.0.options)
5218                .await
5219                .map(crate::Response::into_body)
5220        }
5221
5222        /// Streams each page in the collection.
5223        pub fn by_page(
5224            self,
5225        ) -> impl google_cloud_gax::paginator::Paginator<
5226            crate::model::ListMetadataJobsResponse,
5227            crate::Error,
5228        > {
5229            use std::clone::Clone;
5230            let token = self.0.request.page_token.clone();
5231            let execute = move |token: String| {
5232                let mut builder = self.clone();
5233                builder.0.request = builder.0.request.set_page_token(token);
5234                builder.send()
5235            };
5236            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5237        }
5238
5239        /// Streams each item in the collection.
5240        pub fn by_item(
5241            self,
5242        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5243            crate::model::ListMetadataJobsResponse,
5244            crate::Error,
5245        > {
5246            use google_cloud_gax::paginator::Paginator;
5247            self.by_page().items()
5248        }
5249
5250        /// Sets the value of [parent][crate::model::ListMetadataJobsRequest::parent].
5251        ///
5252        /// This is a **required** field for requests.
5253        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5254            self.0.request.parent = v.into();
5255            self
5256        }
5257
5258        /// Sets the value of [page_size][crate::model::ListMetadataJobsRequest::page_size].
5259        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5260            self.0.request.page_size = v.into();
5261            self
5262        }
5263
5264        /// Sets the value of [page_token][crate::model::ListMetadataJobsRequest::page_token].
5265        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5266            self.0.request.page_token = v.into();
5267            self
5268        }
5269
5270        /// Sets the value of [filter][crate::model::ListMetadataJobsRequest::filter].
5271        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5272            self.0.request.filter = v.into();
5273            self
5274        }
5275
5276        /// Sets the value of [order_by][crate::model::ListMetadataJobsRequest::order_by].
5277        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5278            self.0.request.order_by = v.into();
5279            self
5280        }
5281    }
5282
5283    #[doc(hidden)]
5284    impl crate::RequestBuilder for ListMetadataJobs {
5285        fn request_options(&mut self) -> &mut crate::RequestOptions {
5286            &mut self.0.options
5287        }
5288    }
5289
5290    /// The request builder for [CatalogService::cancel_metadata_job][crate::client::CatalogService::cancel_metadata_job] calls.
5291    ///
5292    /// # Example
5293    /// ```
5294    /// # use google_cloud_dataplex_v1::builder::catalog_service::CancelMetadataJob;
5295    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5296    ///
5297    /// let builder = prepare_request_builder();
5298    /// let response = builder.send().await?;
5299    /// # Ok(()) }
5300    ///
5301    /// fn prepare_request_builder() -> CancelMetadataJob {
5302    ///   # panic!();
5303    ///   // ... details omitted ...
5304    /// }
5305    /// ```
5306    #[derive(Clone, Debug)]
5307    pub struct CancelMetadataJob(RequestBuilder<crate::model::CancelMetadataJobRequest>);
5308
5309    impl CancelMetadataJob {
5310        pub(crate) fn new(
5311            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5312        ) -> Self {
5313            Self(RequestBuilder::new(stub))
5314        }
5315
5316        /// Sets the full request, replacing any prior values.
5317        pub fn with_request<V: Into<crate::model::CancelMetadataJobRequest>>(
5318            mut self,
5319            v: V,
5320        ) -> Self {
5321            self.0.request = v.into();
5322            self
5323        }
5324
5325        /// Sets all the options, replacing any prior values.
5326        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5327            self.0.options = v.into();
5328            self
5329        }
5330
5331        /// Sends the request.
5332        pub async fn send(self) -> Result<()> {
5333            (*self.0.stub)
5334                .cancel_metadata_job(self.0.request, self.0.options)
5335                .await
5336                .map(crate::Response::into_body)
5337        }
5338
5339        /// Sets the value of [name][crate::model::CancelMetadataJobRequest::name].
5340        ///
5341        /// This is a **required** field for requests.
5342        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5343            self.0.request.name = v.into();
5344            self
5345        }
5346    }
5347
5348    #[doc(hidden)]
5349    impl crate::RequestBuilder for CancelMetadataJob {
5350        fn request_options(&mut self) -> &mut crate::RequestOptions {
5351            &mut self.0.options
5352        }
5353    }
5354
5355    /// The request builder for [CatalogService::create_entry_link][crate::client::CatalogService::create_entry_link] calls.
5356    ///
5357    /// # Example
5358    /// ```
5359    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntryLink;
5360    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5361    ///
5362    /// let builder = prepare_request_builder();
5363    /// let response = builder.send().await?;
5364    /// # Ok(()) }
5365    ///
5366    /// fn prepare_request_builder() -> CreateEntryLink {
5367    ///   # panic!();
5368    ///   // ... details omitted ...
5369    /// }
5370    /// ```
5371    #[derive(Clone, Debug)]
5372    pub struct CreateEntryLink(RequestBuilder<crate::model::CreateEntryLinkRequest>);
5373
5374    impl CreateEntryLink {
5375        pub(crate) fn new(
5376            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5377        ) -> Self {
5378            Self(RequestBuilder::new(stub))
5379        }
5380
5381        /// Sets the full request, replacing any prior values.
5382        pub fn with_request<V: Into<crate::model::CreateEntryLinkRequest>>(mut self, v: V) -> Self {
5383            self.0.request = v.into();
5384            self
5385        }
5386
5387        /// Sets all the options, replacing any prior values.
5388        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5389            self.0.options = v.into();
5390            self
5391        }
5392
5393        /// Sends the request.
5394        pub async fn send(self) -> Result<crate::model::EntryLink> {
5395            (*self.0.stub)
5396                .create_entry_link(self.0.request, self.0.options)
5397                .await
5398                .map(crate::Response::into_body)
5399        }
5400
5401        /// Sets the value of [parent][crate::model::CreateEntryLinkRequest::parent].
5402        ///
5403        /// This is a **required** field for requests.
5404        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5405            self.0.request.parent = v.into();
5406            self
5407        }
5408
5409        /// Sets the value of [entry_link_id][crate::model::CreateEntryLinkRequest::entry_link_id].
5410        ///
5411        /// This is a **required** field for requests.
5412        pub fn set_entry_link_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5413            self.0.request.entry_link_id = v.into();
5414            self
5415        }
5416
5417        /// Sets the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
5418        ///
5419        /// This is a **required** field for requests.
5420        pub fn set_entry_link<T>(mut self, v: T) -> Self
5421        where
5422            T: std::convert::Into<crate::model::EntryLink>,
5423        {
5424            self.0.request.entry_link = std::option::Option::Some(v.into());
5425            self
5426        }
5427
5428        /// Sets or clears the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
5429        ///
5430        /// This is a **required** field for requests.
5431        pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
5432        where
5433            T: std::convert::Into<crate::model::EntryLink>,
5434        {
5435            self.0.request.entry_link = v.map(|x| x.into());
5436            self
5437        }
5438    }
5439
5440    #[doc(hidden)]
5441    impl crate::RequestBuilder for CreateEntryLink {
5442        fn request_options(&mut self) -> &mut crate::RequestOptions {
5443            &mut self.0.options
5444        }
5445    }
5446
5447    /// The request builder for [CatalogService::update_entry_link][crate::client::CatalogService::update_entry_link] calls.
5448    ///
5449    /// # Example
5450    /// ```
5451    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntryLink;
5452    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5453    ///
5454    /// let builder = prepare_request_builder();
5455    /// let response = builder.send().await?;
5456    /// # Ok(()) }
5457    ///
5458    /// fn prepare_request_builder() -> UpdateEntryLink {
5459    ///   # panic!();
5460    ///   // ... details omitted ...
5461    /// }
5462    /// ```
5463    #[derive(Clone, Debug)]
5464    pub struct UpdateEntryLink(RequestBuilder<crate::model::UpdateEntryLinkRequest>);
5465
5466    impl UpdateEntryLink {
5467        pub(crate) fn new(
5468            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5469        ) -> Self {
5470            Self(RequestBuilder::new(stub))
5471        }
5472
5473        /// Sets the full request, replacing any prior values.
5474        pub fn with_request<V: Into<crate::model::UpdateEntryLinkRequest>>(mut self, v: V) -> Self {
5475            self.0.request = v.into();
5476            self
5477        }
5478
5479        /// Sets all the options, replacing any prior values.
5480        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5481            self.0.options = v.into();
5482            self
5483        }
5484
5485        /// Sends the request.
5486        pub async fn send(self) -> Result<crate::model::EntryLink> {
5487            (*self.0.stub)
5488                .update_entry_link(self.0.request, self.0.options)
5489                .await
5490                .map(crate::Response::into_body)
5491        }
5492
5493        /// Sets the value of [entry_link][crate::model::UpdateEntryLinkRequest::entry_link].
5494        ///
5495        /// This is a **required** field for requests.
5496        pub fn set_entry_link<T>(mut self, v: T) -> Self
5497        where
5498            T: std::convert::Into<crate::model::EntryLink>,
5499        {
5500            self.0.request.entry_link = std::option::Option::Some(v.into());
5501            self
5502        }
5503
5504        /// Sets or clears the value of [entry_link][crate::model::UpdateEntryLinkRequest::entry_link].
5505        ///
5506        /// This is a **required** field for requests.
5507        pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
5508        where
5509            T: std::convert::Into<crate::model::EntryLink>,
5510        {
5511            self.0.request.entry_link = v.map(|x| x.into());
5512            self
5513        }
5514
5515        /// Sets the value of [allow_missing][crate::model::UpdateEntryLinkRequest::allow_missing].
5516        pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
5517            self.0.request.allow_missing = v.into();
5518            self
5519        }
5520
5521        /// Sets the value of [aspect_keys][crate::model::UpdateEntryLinkRequest::aspect_keys].
5522        pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
5523        where
5524            T: std::iter::IntoIterator<Item = V>,
5525            V: std::convert::Into<std::string::String>,
5526        {
5527            use std::iter::Iterator;
5528            self.0.request.aspect_keys = v.into_iter().map(|i| i.into()).collect();
5529            self
5530        }
5531    }
5532
5533    #[doc(hidden)]
5534    impl crate::RequestBuilder for UpdateEntryLink {
5535        fn request_options(&mut self) -> &mut crate::RequestOptions {
5536            &mut self.0.options
5537        }
5538    }
5539
5540    /// The request builder for [CatalogService::delete_entry_link][crate::client::CatalogService::delete_entry_link] calls.
5541    ///
5542    /// # Example
5543    /// ```
5544    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntryLink;
5545    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5546    ///
5547    /// let builder = prepare_request_builder();
5548    /// let response = builder.send().await?;
5549    /// # Ok(()) }
5550    ///
5551    /// fn prepare_request_builder() -> DeleteEntryLink {
5552    ///   # panic!();
5553    ///   // ... details omitted ...
5554    /// }
5555    /// ```
5556    #[derive(Clone, Debug)]
5557    pub struct DeleteEntryLink(RequestBuilder<crate::model::DeleteEntryLinkRequest>);
5558
5559    impl DeleteEntryLink {
5560        pub(crate) fn new(
5561            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5562        ) -> Self {
5563            Self(RequestBuilder::new(stub))
5564        }
5565
5566        /// Sets the full request, replacing any prior values.
5567        pub fn with_request<V: Into<crate::model::DeleteEntryLinkRequest>>(mut self, v: V) -> Self {
5568            self.0.request = v.into();
5569            self
5570        }
5571
5572        /// Sets all the options, replacing any prior values.
5573        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5574            self.0.options = v.into();
5575            self
5576        }
5577
5578        /// Sends the request.
5579        pub async fn send(self) -> Result<crate::model::EntryLink> {
5580            (*self.0.stub)
5581                .delete_entry_link(self.0.request, self.0.options)
5582                .await
5583                .map(crate::Response::into_body)
5584        }
5585
5586        /// Sets the value of [name][crate::model::DeleteEntryLinkRequest::name].
5587        ///
5588        /// This is a **required** field for requests.
5589        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5590            self.0.request.name = v.into();
5591            self
5592        }
5593    }
5594
5595    #[doc(hidden)]
5596    impl crate::RequestBuilder for DeleteEntryLink {
5597        fn request_options(&mut self) -> &mut crate::RequestOptions {
5598            &mut self.0.options
5599        }
5600    }
5601
5602    /// The request builder for [CatalogService::lookup_entry_links][crate::client::CatalogService::lookup_entry_links] calls.
5603    ///
5604    /// # Example
5605    /// ```
5606    /// # use google_cloud_dataplex_v1::builder::catalog_service::LookupEntryLinks;
5607    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5608    /// use google_cloud_gax::paginator::ItemPaginator;
5609    ///
5610    /// let builder = prepare_request_builder();
5611    /// let mut items = builder.by_item();
5612    /// while let Some(result) = items.next().await {
5613    ///   let item = result?;
5614    /// }
5615    /// # Ok(()) }
5616    ///
5617    /// fn prepare_request_builder() -> LookupEntryLinks {
5618    ///   # panic!();
5619    ///   // ... details omitted ...
5620    /// }
5621    /// ```
5622    #[derive(Clone, Debug)]
5623    pub struct LookupEntryLinks(RequestBuilder<crate::model::LookupEntryLinksRequest>);
5624
5625    impl LookupEntryLinks {
5626        pub(crate) fn new(
5627            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5628        ) -> Self {
5629            Self(RequestBuilder::new(stub))
5630        }
5631
5632        /// Sets the full request, replacing any prior values.
5633        pub fn with_request<V: Into<crate::model::LookupEntryLinksRequest>>(
5634            mut self,
5635            v: V,
5636        ) -> Self {
5637            self.0.request = v.into();
5638            self
5639        }
5640
5641        /// Sets all the options, replacing any prior values.
5642        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5643            self.0.options = v.into();
5644            self
5645        }
5646
5647        /// Sends the request.
5648        pub async fn send(self) -> Result<crate::model::LookupEntryLinksResponse> {
5649            (*self.0.stub)
5650                .lookup_entry_links(self.0.request, self.0.options)
5651                .await
5652                .map(crate::Response::into_body)
5653        }
5654
5655        /// Streams each page in the collection.
5656        pub fn by_page(
5657            self,
5658        ) -> impl google_cloud_gax::paginator::Paginator<
5659            crate::model::LookupEntryLinksResponse,
5660            crate::Error,
5661        > {
5662            use std::clone::Clone;
5663            let token = self.0.request.page_token.clone();
5664            let execute = move |token: String| {
5665                let mut builder = self.clone();
5666                builder.0.request = builder.0.request.set_page_token(token);
5667                builder.send()
5668            };
5669            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5670        }
5671
5672        /// Streams each item in the collection.
5673        pub fn by_item(
5674            self,
5675        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5676            crate::model::LookupEntryLinksResponse,
5677            crate::Error,
5678        > {
5679            use google_cloud_gax::paginator::Paginator;
5680            self.by_page().items()
5681        }
5682
5683        /// Sets the value of [name][crate::model::LookupEntryLinksRequest::name].
5684        ///
5685        /// This is a **required** field for requests.
5686        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5687            self.0.request.name = v.into();
5688            self
5689        }
5690
5691        /// Sets the value of [entry][crate::model::LookupEntryLinksRequest::entry].
5692        ///
5693        /// This is a **required** field for requests.
5694        pub fn set_entry<T: Into<std::string::String>>(mut self, v: T) -> Self {
5695            self.0.request.entry = v.into();
5696            self
5697        }
5698
5699        /// Sets the value of [entry_mode][crate::model::LookupEntryLinksRequest::entry_mode].
5700        pub fn set_entry_mode<T: Into<crate::model::lookup_entry_links_request::EntryMode>>(
5701            mut self,
5702            v: T,
5703        ) -> Self {
5704            self.0.request.entry_mode = v.into();
5705            self
5706        }
5707
5708        /// Sets the value of [entry_link_types][crate::model::LookupEntryLinksRequest::entry_link_types].
5709        pub fn set_entry_link_types<T, V>(mut self, v: T) -> Self
5710        where
5711            T: std::iter::IntoIterator<Item = V>,
5712            V: std::convert::Into<std::string::String>,
5713        {
5714            use std::iter::Iterator;
5715            self.0.request.entry_link_types = v.into_iter().map(|i| i.into()).collect();
5716            self
5717        }
5718
5719        /// Sets the value of [page_size][crate::model::LookupEntryLinksRequest::page_size].
5720        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5721            self.0.request.page_size = v.into();
5722            self
5723        }
5724
5725        /// Sets the value of [page_token][crate::model::LookupEntryLinksRequest::page_token].
5726        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5727            self.0.request.page_token = v.into();
5728            self
5729        }
5730    }
5731
5732    #[doc(hidden)]
5733    impl crate::RequestBuilder for LookupEntryLinks {
5734        fn request_options(&mut self) -> &mut crate::RequestOptions {
5735            &mut self.0.options
5736        }
5737    }
5738
5739    /// The request builder for [CatalogService::lookup_context][crate::client::CatalogService::lookup_context] calls.
5740    ///
5741    /// # Example
5742    /// ```
5743    /// # use google_cloud_dataplex_v1::builder::catalog_service::LookupContext;
5744    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5745    ///
5746    /// let builder = prepare_request_builder();
5747    /// let response = builder.send().await?;
5748    /// # Ok(()) }
5749    ///
5750    /// fn prepare_request_builder() -> LookupContext {
5751    ///   # panic!();
5752    ///   // ... details omitted ...
5753    /// }
5754    /// ```
5755    #[derive(Clone, Debug)]
5756    pub struct LookupContext(RequestBuilder<crate::model::LookupContextRequest>);
5757
5758    impl LookupContext {
5759        pub(crate) fn new(
5760            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5761        ) -> Self {
5762            Self(RequestBuilder::new(stub))
5763        }
5764
5765        /// Sets the full request, replacing any prior values.
5766        pub fn with_request<V: Into<crate::model::LookupContextRequest>>(mut self, v: V) -> Self {
5767            self.0.request = v.into();
5768            self
5769        }
5770
5771        /// Sets all the options, replacing any prior values.
5772        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5773            self.0.options = v.into();
5774            self
5775        }
5776
5777        /// Sends the request.
5778        pub async fn send(self) -> Result<crate::model::LookupContextResponse> {
5779            (*self.0.stub)
5780                .lookup_context(self.0.request, self.0.options)
5781                .await
5782                .map(crate::Response::into_body)
5783        }
5784
5785        /// Sets the value of [name][crate::model::LookupContextRequest::name].
5786        ///
5787        /// This is a **required** field for requests.
5788        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5789            self.0.request.name = v.into();
5790            self
5791        }
5792
5793        /// Sets the value of [resources][crate::model::LookupContextRequest::resources].
5794        ///
5795        /// This is a **required** field for requests.
5796        pub fn set_resources<T, V>(mut self, v: T) -> Self
5797        where
5798            T: std::iter::IntoIterator<Item = V>,
5799            V: std::convert::Into<std::string::String>,
5800        {
5801            use std::iter::Iterator;
5802            self.0.request.resources = v.into_iter().map(|i| i.into()).collect();
5803            self
5804        }
5805
5806        /// Sets the value of [context][crate::model::LookupContextRequest::context].
5807        pub fn set_context<T: Into<std::string::String>>(mut self, v: T) -> Self {
5808            self.0.request.context = v.into();
5809            self
5810        }
5811
5812        /// Sets the value of [options][crate::model::LookupContextRequest::options].
5813        pub fn set_options<T, K, V>(mut self, v: T) -> Self
5814        where
5815            T: std::iter::IntoIterator<Item = (K, V)>,
5816            K: std::convert::Into<std::string::String>,
5817            V: std::convert::Into<std::string::String>,
5818        {
5819            self.0.request.options = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5820            self
5821        }
5822    }
5823
5824    #[doc(hidden)]
5825    impl crate::RequestBuilder for LookupContext {
5826        fn request_options(&mut self) -> &mut crate::RequestOptions {
5827            &mut self.0.options
5828        }
5829    }
5830
5831    /// The request builder for [CatalogService::get_entry_link][crate::client::CatalogService::get_entry_link] calls.
5832    ///
5833    /// # Example
5834    /// ```
5835    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntryLink;
5836    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5837    ///
5838    /// let builder = prepare_request_builder();
5839    /// let response = builder.send().await?;
5840    /// # Ok(()) }
5841    ///
5842    /// fn prepare_request_builder() -> GetEntryLink {
5843    ///   # panic!();
5844    ///   // ... details omitted ...
5845    /// }
5846    /// ```
5847    #[derive(Clone, Debug)]
5848    pub struct GetEntryLink(RequestBuilder<crate::model::GetEntryLinkRequest>);
5849
5850    impl GetEntryLink {
5851        pub(crate) fn new(
5852            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5853        ) -> Self {
5854            Self(RequestBuilder::new(stub))
5855        }
5856
5857        /// Sets the full request, replacing any prior values.
5858        pub fn with_request<V: Into<crate::model::GetEntryLinkRequest>>(mut self, v: V) -> Self {
5859            self.0.request = v.into();
5860            self
5861        }
5862
5863        /// Sets all the options, replacing any prior values.
5864        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5865            self.0.options = v.into();
5866            self
5867        }
5868
5869        /// Sends the request.
5870        pub async fn send(self) -> Result<crate::model::EntryLink> {
5871            (*self.0.stub)
5872                .get_entry_link(self.0.request, self.0.options)
5873                .await
5874                .map(crate::Response::into_body)
5875        }
5876
5877        /// Sets the value of [name][crate::model::GetEntryLinkRequest::name].
5878        ///
5879        /// This is a **required** field for requests.
5880        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5881            self.0.request.name = v.into();
5882            self
5883        }
5884    }
5885
5886    #[doc(hidden)]
5887    impl crate::RequestBuilder for GetEntryLink {
5888        fn request_options(&mut self) -> &mut crate::RequestOptions {
5889            &mut self.0.options
5890        }
5891    }
5892
5893    /// The request builder for [CatalogService::create_metadata_feed][crate::client::CatalogService::create_metadata_feed] calls.
5894    ///
5895    /// # Example
5896    /// ```
5897    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateMetadataFeed;
5898    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5899    /// use google_cloud_lro::Poller;
5900    ///
5901    /// let builder = prepare_request_builder();
5902    /// let response = builder.poller().until_done().await?;
5903    /// # Ok(()) }
5904    ///
5905    /// fn prepare_request_builder() -> CreateMetadataFeed {
5906    ///   # panic!();
5907    ///   // ... details omitted ...
5908    /// }
5909    /// ```
5910    #[derive(Clone, Debug)]
5911    pub struct CreateMetadataFeed(RequestBuilder<crate::model::CreateMetadataFeedRequest>);
5912
5913    impl CreateMetadataFeed {
5914        pub(crate) fn new(
5915            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5916        ) -> Self {
5917            Self(RequestBuilder::new(stub))
5918        }
5919
5920        /// Sets the full request, replacing any prior values.
5921        pub fn with_request<V: Into<crate::model::CreateMetadataFeedRequest>>(
5922            mut self,
5923            v: V,
5924        ) -> Self {
5925            self.0.request = v.into();
5926            self
5927        }
5928
5929        /// Sets all the options, replacing any prior values.
5930        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5931            self.0.options = v.into();
5932            self
5933        }
5934
5935        /// Sends the request.
5936        ///
5937        /// # Long running operations
5938        ///
5939        /// This starts, but does not poll, a longrunning operation. More information
5940        /// on [create_metadata_feed][crate::client::CatalogService::create_metadata_feed].
5941        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5942            (*self.0.stub)
5943                .create_metadata_feed(self.0.request, self.0.options)
5944                .await
5945                .map(crate::Response::into_body)
5946        }
5947
5948        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_metadata_feed`.
5949        pub fn poller(
5950            self,
5951        ) -> impl google_cloud_lro::Poller<crate::model::MetadataFeed, crate::model::OperationMetadata>
5952        {
5953            type Operation = google_cloud_lro::internal::Operation<
5954                crate::model::MetadataFeed,
5955                crate::model::OperationMetadata,
5956            >;
5957            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5958            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5959
5960            let stub = self.0.stub.clone();
5961            let mut options = self.0.options.clone();
5962            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5963            let query = move |name| {
5964                let stub = stub.clone();
5965                let options = options.clone();
5966                async {
5967                    let op = GetOperation::new(stub)
5968                        .set_name(name)
5969                        .with_options(options)
5970                        .send()
5971                        .await?;
5972                    Ok(Operation::new(op))
5973                }
5974            };
5975
5976            let start = move || async {
5977                let op = self.send().await?;
5978                Ok(Operation::new(op))
5979            };
5980
5981            google_cloud_lro::internal::new_poller(
5982                polling_error_policy,
5983                polling_backoff_policy,
5984                start,
5985                query,
5986            )
5987        }
5988
5989        /// Sets the value of [parent][crate::model::CreateMetadataFeedRequest::parent].
5990        ///
5991        /// This is a **required** field for requests.
5992        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5993            self.0.request.parent = v.into();
5994            self
5995        }
5996
5997        /// Sets the value of [metadata_feed][crate::model::CreateMetadataFeedRequest::metadata_feed].
5998        ///
5999        /// This is a **required** field for requests.
6000        pub fn set_metadata_feed<T>(mut self, v: T) -> Self
6001        where
6002            T: std::convert::Into<crate::model::MetadataFeed>,
6003        {
6004            self.0.request.metadata_feed = std::option::Option::Some(v.into());
6005            self
6006        }
6007
6008        /// Sets or clears the value of [metadata_feed][crate::model::CreateMetadataFeedRequest::metadata_feed].
6009        ///
6010        /// This is a **required** field for requests.
6011        pub fn set_or_clear_metadata_feed<T>(mut self, v: std::option::Option<T>) -> Self
6012        where
6013            T: std::convert::Into<crate::model::MetadataFeed>,
6014        {
6015            self.0.request.metadata_feed = v.map(|x| x.into());
6016            self
6017        }
6018
6019        /// Sets the value of [metadata_feed_id][crate::model::CreateMetadataFeedRequest::metadata_feed_id].
6020        pub fn set_metadata_feed_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6021            self.0.request.metadata_feed_id = v.into();
6022            self
6023        }
6024
6025        /// Sets the value of [validate_only][crate::model::CreateMetadataFeedRequest::validate_only].
6026        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
6027            self.0.request.validate_only = v.into();
6028            self
6029        }
6030    }
6031
6032    #[doc(hidden)]
6033    impl crate::RequestBuilder for CreateMetadataFeed {
6034        fn request_options(&mut self) -> &mut crate::RequestOptions {
6035            &mut self.0.options
6036        }
6037    }
6038
6039    /// The request builder for [CatalogService::get_metadata_feed][crate::client::CatalogService::get_metadata_feed] calls.
6040    ///
6041    /// # Example
6042    /// ```
6043    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetMetadataFeed;
6044    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6045    ///
6046    /// let builder = prepare_request_builder();
6047    /// let response = builder.send().await?;
6048    /// # Ok(()) }
6049    ///
6050    /// fn prepare_request_builder() -> GetMetadataFeed {
6051    ///   # panic!();
6052    ///   // ... details omitted ...
6053    /// }
6054    /// ```
6055    #[derive(Clone, Debug)]
6056    pub struct GetMetadataFeed(RequestBuilder<crate::model::GetMetadataFeedRequest>);
6057
6058    impl GetMetadataFeed {
6059        pub(crate) fn new(
6060            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6061        ) -> Self {
6062            Self(RequestBuilder::new(stub))
6063        }
6064
6065        /// Sets the full request, replacing any prior values.
6066        pub fn with_request<V: Into<crate::model::GetMetadataFeedRequest>>(mut self, v: V) -> Self {
6067            self.0.request = v.into();
6068            self
6069        }
6070
6071        /// Sets all the options, replacing any prior values.
6072        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6073            self.0.options = v.into();
6074            self
6075        }
6076
6077        /// Sends the request.
6078        pub async fn send(self) -> Result<crate::model::MetadataFeed> {
6079            (*self.0.stub)
6080                .get_metadata_feed(self.0.request, self.0.options)
6081                .await
6082                .map(crate::Response::into_body)
6083        }
6084
6085        /// Sets the value of [name][crate::model::GetMetadataFeedRequest::name].
6086        ///
6087        /// This is a **required** field for requests.
6088        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6089            self.0.request.name = v.into();
6090            self
6091        }
6092    }
6093
6094    #[doc(hidden)]
6095    impl crate::RequestBuilder for GetMetadataFeed {
6096        fn request_options(&mut self) -> &mut crate::RequestOptions {
6097            &mut self.0.options
6098        }
6099    }
6100
6101    /// The request builder for [CatalogService::list_metadata_feeds][crate::client::CatalogService::list_metadata_feeds] calls.
6102    ///
6103    /// # Example
6104    /// ```
6105    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListMetadataFeeds;
6106    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6107    /// use google_cloud_gax::paginator::ItemPaginator;
6108    ///
6109    /// let builder = prepare_request_builder();
6110    /// let mut items = builder.by_item();
6111    /// while let Some(result) = items.next().await {
6112    ///   let item = result?;
6113    /// }
6114    /// # Ok(()) }
6115    ///
6116    /// fn prepare_request_builder() -> ListMetadataFeeds {
6117    ///   # panic!();
6118    ///   // ... details omitted ...
6119    /// }
6120    /// ```
6121    #[derive(Clone, Debug)]
6122    pub struct ListMetadataFeeds(RequestBuilder<crate::model::ListMetadataFeedsRequest>);
6123
6124    impl ListMetadataFeeds {
6125        pub(crate) fn new(
6126            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6127        ) -> Self {
6128            Self(RequestBuilder::new(stub))
6129        }
6130
6131        /// Sets the full request, replacing any prior values.
6132        pub fn with_request<V: Into<crate::model::ListMetadataFeedsRequest>>(
6133            mut self,
6134            v: V,
6135        ) -> Self {
6136            self.0.request = v.into();
6137            self
6138        }
6139
6140        /// Sets all the options, replacing any prior values.
6141        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6142            self.0.options = v.into();
6143            self
6144        }
6145
6146        /// Sends the request.
6147        pub async fn send(self) -> Result<crate::model::ListMetadataFeedsResponse> {
6148            (*self.0.stub)
6149                .list_metadata_feeds(self.0.request, self.0.options)
6150                .await
6151                .map(crate::Response::into_body)
6152        }
6153
6154        /// Streams each page in the collection.
6155        pub fn by_page(
6156            self,
6157        ) -> impl google_cloud_gax::paginator::Paginator<
6158            crate::model::ListMetadataFeedsResponse,
6159            crate::Error,
6160        > {
6161            use std::clone::Clone;
6162            let token = self.0.request.page_token.clone();
6163            let execute = move |token: String| {
6164                let mut builder = self.clone();
6165                builder.0.request = builder.0.request.set_page_token(token);
6166                builder.send()
6167            };
6168            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6169        }
6170
6171        /// Streams each item in the collection.
6172        pub fn by_item(
6173            self,
6174        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6175            crate::model::ListMetadataFeedsResponse,
6176            crate::Error,
6177        > {
6178            use google_cloud_gax::paginator::Paginator;
6179            self.by_page().items()
6180        }
6181
6182        /// Sets the value of [parent][crate::model::ListMetadataFeedsRequest::parent].
6183        ///
6184        /// This is a **required** field for requests.
6185        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6186            self.0.request.parent = v.into();
6187            self
6188        }
6189
6190        /// Sets the value of [page_size][crate::model::ListMetadataFeedsRequest::page_size].
6191        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6192            self.0.request.page_size = v.into();
6193            self
6194        }
6195
6196        /// Sets the value of [page_token][crate::model::ListMetadataFeedsRequest::page_token].
6197        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6198            self.0.request.page_token = v.into();
6199            self
6200        }
6201
6202        /// Sets the value of [filter][crate::model::ListMetadataFeedsRequest::filter].
6203        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6204            self.0.request.filter = v.into();
6205            self
6206        }
6207
6208        /// Sets the value of [order_by][crate::model::ListMetadataFeedsRequest::order_by].
6209        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6210            self.0.request.order_by = v.into();
6211            self
6212        }
6213    }
6214
6215    #[doc(hidden)]
6216    impl crate::RequestBuilder for ListMetadataFeeds {
6217        fn request_options(&mut self) -> &mut crate::RequestOptions {
6218            &mut self.0.options
6219        }
6220    }
6221
6222    /// The request builder for [CatalogService::delete_metadata_feed][crate::client::CatalogService::delete_metadata_feed] calls.
6223    ///
6224    /// # Example
6225    /// ```
6226    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteMetadataFeed;
6227    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6228    /// use google_cloud_lro::Poller;
6229    ///
6230    /// let builder = prepare_request_builder();
6231    /// let response = builder.poller().until_done().await?;
6232    /// # Ok(()) }
6233    ///
6234    /// fn prepare_request_builder() -> DeleteMetadataFeed {
6235    ///   # panic!();
6236    ///   // ... details omitted ...
6237    /// }
6238    /// ```
6239    #[derive(Clone, Debug)]
6240    pub struct DeleteMetadataFeed(RequestBuilder<crate::model::DeleteMetadataFeedRequest>);
6241
6242    impl DeleteMetadataFeed {
6243        pub(crate) fn new(
6244            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6245        ) -> Self {
6246            Self(RequestBuilder::new(stub))
6247        }
6248
6249        /// Sets the full request, replacing any prior values.
6250        pub fn with_request<V: Into<crate::model::DeleteMetadataFeedRequest>>(
6251            mut self,
6252            v: V,
6253        ) -> Self {
6254            self.0.request = v.into();
6255            self
6256        }
6257
6258        /// Sets all the options, replacing any prior values.
6259        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6260            self.0.options = v.into();
6261            self
6262        }
6263
6264        /// Sends the request.
6265        ///
6266        /// # Long running operations
6267        ///
6268        /// This starts, but does not poll, a longrunning operation. More information
6269        /// on [delete_metadata_feed][crate::client::CatalogService::delete_metadata_feed].
6270        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6271            (*self.0.stub)
6272                .delete_metadata_feed(self.0.request, self.0.options)
6273                .await
6274                .map(crate::Response::into_body)
6275        }
6276
6277        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_metadata_feed`.
6278        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6279            type Operation =
6280                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6281            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6282            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6283
6284            let stub = self.0.stub.clone();
6285            let mut options = self.0.options.clone();
6286            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6287            let query = move |name| {
6288                let stub = stub.clone();
6289                let options = options.clone();
6290                async {
6291                    let op = GetOperation::new(stub)
6292                        .set_name(name)
6293                        .with_options(options)
6294                        .send()
6295                        .await?;
6296                    Ok(Operation::new(op))
6297                }
6298            };
6299
6300            let start = move || async {
6301                let op = self.send().await?;
6302                Ok(Operation::new(op))
6303            };
6304
6305            google_cloud_lro::internal::new_unit_response_poller(
6306                polling_error_policy,
6307                polling_backoff_policy,
6308                start,
6309                query,
6310            )
6311        }
6312
6313        /// Sets the value of [name][crate::model::DeleteMetadataFeedRequest::name].
6314        ///
6315        /// This is a **required** field for requests.
6316        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6317            self.0.request.name = v.into();
6318            self
6319        }
6320    }
6321
6322    #[doc(hidden)]
6323    impl crate::RequestBuilder for DeleteMetadataFeed {
6324        fn request_options(&mut self) -> &mut crate::RequestOptions {
6325            &mut self.0.options
6326        }
6327    }
6328
6329    /// The request builder for [CatalogService::update_metadata_feed][crate::client::CatalogService::update_metadata_feed] calls.
6330    ///
6331    /// # Example
6332    /// ```
6333    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateMetadataFeed;
6334    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6335    /// use google_cloud_lro::Poller;
6336    ///
6337    /// let builder = prepare_request_builder();
6338    /// let response = builder.poller().until_done().await?;
6339    /// # Ok(()) }
6340    ///
6341    /// fn prepare_request_builder() -> UpdateMetadataFeed {
6342    ///   # panic!();
6343    ///   // ... details omitted ...
6344    /// }
6345    /// ```
6346    #[derive(Clone, Debug)]
6347    pub struct UpdateMetadataFeed(RequestBuilder<crate::model::UpdateMetadataFeedRequest>);
6348
6349    impl UpdateMetadataFeed {
6350        pub(crate) fn new(
6351            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6352        ) -> Self {
6353            Self(RequestBuilder::new(stub))
6354        }
6355
6356        /// Sets the full request, replacing any prior values.
6357        pub fn with_request<V: Into<crate::model::UpdateMetadataFeedRequest>>(
6358            mut self,
6359            v: V,
6360        ) -> Self {
6361            self.0.request = v.into();
6362            self
6363        }
6364
6365        /// Sets all the options, replacing any prior values.
6366        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6367            self.0.options = v.into();
6368            self
6369        }
6370
6371        /// Sends the request.
6372        ///
6373        /// # Long running operations
6374        ///
6375        /// This starts, but does not poll, a longrunning operation. More information
6376        /// on [update_metadata_feed][crate::client::CatalogService::update_metadata_feed].
6377        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6378            (*self.0.stub)
6379                .update_metadata_feed(self.0.request, self.0.options)
6380                .await
6381                .map(crate::Response::into_body)
6382        }
6383
6384        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_metadata_feed`.
6385        pub fn poller(
6386            self,
6387        ) -> impl google_cloud_lro::Poller<crate::model::MetadataFeed, crate::model::OperationMetadata>
6388        {
6389            type Operation = google_cloud_lro::internal::Operation<
6390                crate::model::MetadataFeed,
6391                crate::model::OperationMetadata,
6392            >;
6393            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6394            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6395
6396            let stub = self.0.stub.clone();
6397            let mut options = self.0.options.clone();
6398            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6399            let query = move |name| {
6400                let stub = stub.clone();
6401                let options = options.clone();
6402                async {
6403                    let op = GetOperation::new(stub)
6404                        .set_name(name)
6405                        .with_options(options)
6406                        .send()
6407                        .await?;
6408                    Ok(Operation::new(op))
6409                }
6410            };
6411
6412            let start = move || async {
6413                let op = self.send().await?;
6414                Ok(Operation::new(op))
6415            };
6416
6417            google_cloud_lro::internal::new_poller(
6418                polling_error_policy,
6419                polling_backoff_policy,
6420                start,
6421                query,
6422            )
6423        }
6424
6425        /// Sets the value of [metadata_feed][crate::model::UpdateMetadataFeedRequest::metadata_feed].
6426        ///
6427        /// This is a **required** field for requests.
6428        pub fn set_metadata_feed<T>(mut self, v: T) -> Self
6429        where
6430            T: std::convert::Into<crate::model::MetadataFeed>,
6431        {
6432            self.0.request.metadata_feed = std::option::Option::Some(v.into());
6433            self
6434        }
6435
6436        /// Sets or clears the value of [metadata_feed][crate::model::UpdateMetadataFeedRequest::metadata_feed].
6437        ///
6438        /// This is a **required** field for requests.
6439        pub fn set_or_clear_metadata_feed<T>(mut self, v: std::option::Option<T>) -> Self
6440        where
6441            T: std::convert::Into<crate::model::MetadataFeed>,
6442        {
6443            self.0.request.metadata_feed = v.map(|x| x.into());
6444            self
6445        }
6446
6447        /// Sets the value of [update_mask][crate::model::UpdateMetadataFeedRequest::update_mask].
6448        pub fn set_update_mask<T>(mut self, v: T) -> Self
6449        where
6450            T: std::convert::Into<wkt::FieldMask>,
6451        {
6452            self.0.request.update_mask = std::option::Option::Some(v.into());
6453            self
6454        }
6455
6456        /// Sets or clears the value of [update_mask][crate::model::UpdateMetadataFeedRequest::update_mask].
6457        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6458        where
6459            T: std::convert::Into<wkt::FieldMask>,
6460        {
6461            self.0.request.update_mask = v.map(|x| x.into());
6462            self
6463        }
6464
6465        /// Sets the value of [validate_only][crate::model::UpdateMetadataFeedRequest::validate_only].
6466        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
6467            self.0.request.validate_only = v.into();
6468            self
6469        }
6470    }
6471
6472    #[doc(hidden)]
6473    impl crate::RequestBuilder for UpdateMetadataFeed {
6474        fn request_options(&mut self) -> &mut crate::RequestOptions {
6475            &mut self.0.options
6476        }
6477    }
6478
6479    /// The request builder for [CatalogService::list_locations][crate::client::CatalogService::list_locations] calls.
6480    ///
6481    /// # Example
6482    /// ```
6483    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListLocations;
6484    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6485    /// use google_cloud_gax::paginator::ItemPaginator;
6486    ///
6487    /// let builder = prepare_request_builder();
6488    /// let mut items = builder.by_item();
6489    /// while let Some(result) = items.next().await {
6490    ///   let item = result?;
6491    /// }
6492    /// # Ok(()) }
6493    ///
6494    /// fn prepare_request_builder() -> ListLocations {
6495    ///   # panic!();
6496    ///   // ... details omitted ...
6497    /// }
6498    /// ```
6499    #[derive(Clone, Debug)]
6500    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
6501
6502    impl ListLocations {
6503        pub(crate) fn new(
6504            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6505        ) -> Self {
6506            Self(RequestBuilder::new(stub))
6507        }
6508
6509        /// Sets the full request, replacing any prior values.
6510        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
6511            mut self,
6512            v: V,
6513        ) -> Self {
6514            self.0.request = v.into();
6515            self
6516        }
6517
6518        /// Sets all the options, replacing any prior values.
6519        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6520            self.0.options = v.into();
6521            self
6522        }
6523
6524        /// Sends the request.
6525        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
6526            (*self.0.stub)
6527                .list_locations(self.0.request, self.0.options)
6528                .await
6529                .map(crate::Response::into_body)
6530        }
6531
6532        /// Streams each page in the collection.
6533        pub fn by_page(
6534            self,
6535        ) -> impl google_cloud_gax::paginator::Paginator<
6536            google_cloud_location::model::ListLocationsResponse,
6537            crate::Error,
6538        > {
6539            use std::clone::Clone;
6540            let token = self.0.request.page_token.clone();
6541            let execute = move |token: String| {
6542                let mut builder = self.clone();
6543                builder.0.request = builder.0.request.set_page_token(token);
6544                builder.send()
6545            };
6546            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6547        }
6548
6549        /// Streams each item in the collection.
6550        pub fn by_item(
6551            self,
6552        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6553            google_cloud_location::model::ListLocationsResponse,
6554            crate::Error,
6555        > {
6556            use google_cloud_gax::paginator::Paginator;
6557            self.by_page().items()
6558        }
6559
6560        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
6561        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6562            self.0.request.name = v.into();
6563            self
6564        }
6565
6566        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
6567        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6568            self.0.request.filter = v.into();
6569            self
6570        }
6571
6572        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
6573        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6574            self.0.request.page_size = v.into();
6575            self
6576        }
6577
6578        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
6579        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6580            self.0.request.page_token = v.into();
6581            self
6582        }
6583    }
6584
6585    #[doc(hidden)]
6586    impl crate::RequestBuilder for ListLocations {
6587        fn request_options(&mut self) -> &mut crate::RequestOptions {
6588            &mut self.0.options
6589        }
6590    }
6591
6592    /// The request builder for [CatalogService::get_location][crate::client::CatalogService::get_location] calls.
6593    ///
6594    /// # Example
6595    /// ```
6596    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetLocation;
6597    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6598    ///
6599    /// let builder = prepare_request_builder();
6600    /// let response = builder.send().await?;
6601    /// # Ok(()) }
6602    ///
6603    /// fn prepare_request_builder() -> GetLocation {
6604    ///   # panic!();
6605    ///   // ... details omitted ...
6606    /// }
6607    /// ```
6608    #[derive(Clone, Debug)]
6609    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
6610
6611    impl GetLocation {
6612        pub(crate) fn new(
6613            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6614        ) -> Self {
6615            Self(RequestBuilder::new(stub))
6616        }
6617
6618        /// Sets the full request, replacing any prior values.
6619        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
6620            mut self,
6621            v: V,
6622        ) -> Self {
6623            self.0.request = v.into();
6624            self
6625        }
6626
6627        /// Sets all the options, replacing any prior values.
6628        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6629            self.0.options = v.into();
6630            self
6631        }
6632
6633        /// Sends the request.
6634        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
6635            (*self.0.stub)
6636                .get_location(self.0.request, self.0.options)
6637                .await
6638                .map(crate::Response::into_body)
6639        }
6640
6641        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
6642        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6643            self.0.request.name = v.into();
6644            self
6645        }
6646    }
6647
6648    #[doc(hidden)]
6649    impl crate::RequestBuilder for GetLocation {
6650        fn request_options(&mut self) -> &mut crate::RequestOptions {
6651            &mut self.0.options
6652        }
6653    }
6654
6655    /// The request builder for [CatalogService::set_iam_policy][crate::client::CatalogService::set_iam_policy] calls.
6656    ///
6657    /// # Example
6658    /// ```
6659    /// # use google_cloud_dataplex_v1::builder::catalog_service::SetIamPolicy;
6660    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6661    ///
6662    /// let builder = prepare_request_builder();
6663    /// let response = builder.send().await?;
6664    /// # Ok(()) }
6665    ///
6666    /// fn prepare_request_builder() -> SetIamPolicy {
6667    ///   # panic!();
6668    ///   // ... details omitted ...
6669    /// }
6670    /// ```
6671    #[derive(Clone, Debug)]
6672    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
6673
6674    impl SetIamPolicy {
6675        pub(crate) fn new(
6676            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6677        ) -> Self {
6678            Self(RequestBuilder::new(stub))
6679        }
6680
6681        /// Sets the full request, replacing any prior values.
6682        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
6683            mut self,
6684            v: V,
6685        ) -> Self {
6686            self.0.request = v.into();
6687            self
6688        }
6689
6690        /// Sets all the options, replacing any prior values.
6691        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6692            self.0.options = v.into();
6693            self
6694        }
6695
6696        /// Sends the request.
6697        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
6698            (*self.0.stub)
6699                .set_iam_policy(self.0.request, self.0.options)
6700                .await
6701                .map(crate::Response::into_body)
6702        }
6703
6704        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
6705        ///
6706        /// This is a **required** field for requests.
6707        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6708            self.0.request.resource = v.into();
6709            self
6710        }
6711
6712        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
6713        ///
6714        /// This is a **required** field for requests.
6715        pub fn set_policy<T>(mut self, v: T) -> Self
6716        where
6717            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
6718        {
6719            self.0.request.policy = std::option::Option::Some(v.into());
6720            self
6721        }
6722
6723        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
6724        ///
6725        /// This is a **required** field for requests.
6726        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
6727        where
6728            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
6729        {
6730            self.0.request.policy = v.map(|x| x.into());
6731            self
6732        }
6733
6734        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
6735        pub fn set_update_mask<T>(mut self, v: T) -> Self
6736        where
6737            T: std::convert::Into<wkt::FieldMask>,
6738        {
6739            self.0.request.update_mask = std::option::Option::Some(v.into());
6740            self
6741        }
6742
6743        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
6744        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6745        where
6746            T: std::convert::Into<wkt::FieldMask>,
6747        {
6748            self.0.request.update_mask = v.map(|x| x.into());
6749            self
6750        }
6751    }
6752
6753    #[doc(hidden)]
6754    impl crate::RequestBuilder for SetIamPolicy {
6755        fn request_options(&mut self) -> &mut crate::RequestOptions {
6756            &mut self.0.options
6757        }
6758    }
6759
6760    /// The request builder for [CatalogService::get_iam_policy][crate::client::CatalogService::get_iam_policy] calls.
6761    ///
6762    /// # Example
6763    /// ```
6764    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetIamPolicy;
6765    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6766    ///
6767    /// let builder = prepare_request_builder();
6768    /// let response = builder.send().await?;
6769    /// # Ok(()) }
6770    ///
6771    /// fn prepare_request_builder() -> GetIamPolicy {
6772    ///   # panic!();
6773    ///   // ... details omitted ...
6774    /// }
6775    /// ```
6776    #[derive(Clone, Debug)]
6777    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
6778
6779    impl GetIamPolicy {
6780        pub(crate) fn new(
6781            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6782        ) -> Self {
6783            Self(RequestBuilder::new(stub))
6784        }
6785
6786        /// Sets the full request, replacing any prior values.
6787        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
6788            mut self,
6789            v: V,
6790        ) -> Self {
6791            self.0.request = v.into();
6792            self
6793        }
6794
6795        /// Sets all the options, replacing any prior values.
6796        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6797            self.0.options = v.into();
6798            self
6799        }
6800
6801        /// Sends the request.
6802        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
6803            (*self.0.stub)
6804                .get_iam_policy(self.0.request, self.0.options)
6805                .await
6806                .map(crate::Response::into_body)
6807        }
6808
6809        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
6810        ///
6811        /// This is a **required** field for requests.
6812        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6813            self.0.request.resource = v.into();
6814            self
6815        }
6816
6817        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
6818        pub fn set_options<T>(mut self, v: T) -> Self
6819        where
6820            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
6821        {
6822            self.0.request.options = std::option::Option::Some(v.into());
6823            self
6824        }
6825
6826        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
6827        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
6828        where
6829            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
6830        {
6831            self.0.request.options = v.map(|x| x.into());
6832            self
6833        }
6834    }
6835
6836    #[doc(hidden)]
6837    impl crate::RequestBuilder for GetIamPolicy {
6838        fn request_options(&mut self) -> &mut crate::RequestOptions {
6839            &mut self.0.options
6840        }
6841    }
6842
6843    /// The request builder for [CatalogService::test_iam_permissions][crate::client::CatalogService::test_iam_permissions] calls.
6844    ///
6845    /// # Example
6846    /// ```
6847    /// # use google_cloud_dataplex_v1::builder::catalog_service::TestIamPermissions;
6848    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6849    ///
6850    /// let builder = prepare_request_builder();
6851    /// let response = builder.send().await?;
6852    /// # Ok(()) }
6853    ///
6854    /// fn prepare_request_builder() -> TestIamPermissions {
6855    ///   # panic!();
6856    ///   // ... details omitted ...
6857    /// }
6858    /// ```
6859    #[derive(Clone, Debug)]
6860    pub struct TestIamPermissions(
6861        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
6862    );
6863
6864    impl TestIamPermissions {
6865        pub(crate) fn new(
6866            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6867        ) -> Self {
6868            Self(RequestBuilder::new(stub))
6869        }
6870
6871        /// Sets the full request, replacing any prior values.
6872        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
6873            mut self,
6874            v: V,
6875        ) -> Self {
6876            self.0.request = v.into();
6877            self
6878        }
6879
6880        /// Sets all the options, replacing any prior values.
6881        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6882            self.0.options = v.into();
6883            self
6884        }
6885
6886        /// Sends the request.
6887        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
6888            (*self.0.stub)
6889                .test_iam_permissions(self.0.request, self.0.options)
6890                .await
6891                .map(crate::Response::into_body)
6892        }
6893
6894        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
6895        ///
6896        /// This is a **required** field for requests.
6897        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6898            self.0.request.resource = v.into();
6899            self
6900        }
6901
6902        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
6903        ///
6904        /// This is a **required** field for requests.
6905        pub fn set_permissions<T, V>(mut self, v: T) -> Self
6906        where
6907            T: std::iter::IntoIterator<Item = V>,
6908            V: std::convert::Into<std::string::String>,
6909        {
6910            use std::iter::Iterator;
6911            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
6912            self
6913        }
6914    }
6915
6916    #[doc(hidden)]
6917    impl crate::RequestBuilder for TestIamPermissions {
6918        fn request_options(&mut self) -> &mut crate::RequestOptions {
6919            &mut self.0.options
6920        }
6921    }
6922
6923    /// The request builder for [CatalogService::list_operations][crate::client::CatalogService::list_operations] calls.
6924    ///
6925    /// # Example
6926    /// ```
6927    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListOperations;
6928    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6929    /// use google_cloud_gax::paginator::ItemPaginator;
6930    ///
6931    /// let builder = prepare_request_builder();
6932    /// let mut items = builder.by_item();
6933    /// while let Some(result) = items.next().await {
6934    ///   let item = result?;
6935    /// }
6936    /// # Ok(()) }
6937    ///
6938    /// fn prepare_request_builder() -> ListOperations {
6939    ///   # panic!();
6940    ///   // ... details omitted ...
6941    /// }
6942    /// ```
6943    #[derive(Clone, Debug)]
6944    pub struct ListOperations(
6945        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
6946    );
6947
6948    impl ListOperations {
6949        pub(crate) fn new(
6950            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6951        ) -> Self {
6952            Self(RequestBuilder::new(stub))
6953        }
6954
6955        /// Sets the full request, replacing any prior values.
6956        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
6957            mut self,
6958            v: V,
6959        ) -> Self {
6960            self.0.request = v.into();
6961            self
6962        }
6963
6964        /// Sets all the options, replacing any prior values.
6965        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6966            self.0.options = v.into();
6967            self
6968        }
6969
6970        /// Sends the request.
6971        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
6972            (*self.0.stub)
6973                .list_operations(self.0.request, self.0.options)
6974                .await
6975                .map(crate::Response::into_body)
6976        }
6977
6978        /// Streams each page in the collection.
6979        pub fn by_page(
6980            self,
6981        ) -> impl google_cloud_gax::paginator::Paginator<
6982            google_cloud_longrunning::model::ListOperationsResponse,
6983            crate::Error,
6984        > {
6985            use std::clone::Clone;
6986            let token = self.0.request.page_token.clone();
6987            let execute = move |token: String| {
6988                let mut builder = self.clone();
6989                builder.0.request = builder.0.request.set_page_token(token);
6990                builder.send()
6991            };
6992            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6993        }
6994
6995        /// Streams each item in the collection.
6996        pub fn by_item(
6997            self,
6998        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6999            google_cloud_longrunning::model::ListOperationsResponse,
7000            crate::Error,
7001        > {
7002            use google_cloud_gax::paginator::Paginator;
7003            self.by_page().items()
7004        }
7005
7006        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
7007        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7008            self.0.request.name = v.into();
7009            self
7010        }
7011
7012        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
7013        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7014            self.0.request.filter = v.into();
7015            self
7016        }
7017
7018        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
7019        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7020            self.0.request.page_size = v.into();
7021            self
7022        }
7023
7024        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
7025        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7026            self.0.request.page_token = v.into();
7027            self
7028        }
7029
7030        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
7031        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
7032            self.0.request.return_partial_success = v.into();
7033            self
7034        }
7035    }
7036
7037    #[doc(hidden)]
7038    impl crate::RequestBuilder for ListOperations {
7039        fn request_options(&mut self) -> &mut crate::RequestOptions {
7040            &mut self.0.options
7041        }
7042    }
7043
7044    /// The request builder for [CatalogService::get_operation][crate::client::CatalogService::get_operation] calls.
7045    ///
7046    /// # Example
7047    /// ```
7048    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetOperation;
7049    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7050    ///
7051    /// let builder = prepare_request_builder();
7052    /// let response = builder.send().await?;
7053    /// # Ok(()) }
7054    ///
7055    /// fn prepare_request_builder() -> GetOperation {
7056    ///   # panic!();
7057    ///   // ... details omitted ...
7058    /// }
7059    /// ```
7060    #[derive(Clone, Debug)]
7061    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
7062
7063    impl GetOperation {
7064        pub(crate) fn new(
7065            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
7066        ) -> Self {
7067            Self(RequestBuilder::new(stub))
7068        }
7069
7070        /// Sets the full request, replacing any prior values.
7071        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
7072            mut self,
7073            v: V,
7074        ) -> Self {
7075            self.0.request = v.into();
7076            self
7077        }
7078
7079        /// Sets all the options, replacing any prior values.
7080        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7081            self.0.options = v.into();
7082            self
7083        }
7084
7085        /// Sends the request.
7086        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7087            (*self.0.stub)
7088                .get_operation(self.0.request, self.0.options)
7089                .await
7090                .map(crate::Response::into_body)
7091        }
7092
7093        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
7094        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7095            self.0.request.name = v.into();
7096            self
7097        }
7098    }
7099
7100    #[doc(hidden)]
7101    impl crate::RequestBuilder for GetOperation {
7102        fn request_options(&mut self) -> &mut crate::RequestOptions {
7103            &mut self.0.options
7104        }
7105    }
7106
7107    /// The request builder for [CatalogService::delete_operation][crate::client::CatalogService::delete_operation] calls.
7108    ///
7109    /// # Example
7110    /// ```
7111    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteOperation;
7112    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7113    ///
7114    /// let builder = prepare_request_builder();
7115    /// let response = builder.send().await?;
7116    /// # Ok(()) }
7117    ///
7118    /// fn prepare_request_builder() -> DeleteOperation {
7119    ///   # panic!();
7120    ///   // ... details omitted ...
7121    /// }
7122    /// ```
7123    #[derive(Clone, Debug)]
7124    pub struct DeleteOperation(
7125        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
7126    );
7127
7128    impl DeleteOperation {
7129        pub(crate) fn new(
7130            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
7131        ) -> Self {
7132            Self(RequestBuilder::new(stub))
7133        }
7134
7135        /// Sets the full request, replacing any prior values.
7136        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
7137            mut self,
7138            v: V,
7139        ) -> Self {
7140            self.0.request = v.into();
7141            self
7142        }
7143
7144        /// Sets all the options, replacing any prior values.
7145        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7146            self.0.options = v.into();
7147            self
7148        }
7149
7150        /// Sends the request.
7151        pub async fn send(self) -> Result<()> {
7152            (*self.0.stub)
7153                .delete_operation(self.0.request, self.0.options)
7154                .await
7155                .map(crate::Response::into_body)
7156        }
7157
7158        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
7159        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7160            self.0.request.name = v.into();
7161            self
7162        }
7163    }
7164
7165    #[doc(hidden)]
7166    impl crate::RequestBuilder for DeleteOperation {
7167        fn request_options(&mut self) -> &mut crate::RequestOptions {
7168            &mut self.0.options
7169        }
7170    }
7171
7172    /// The request builder for [CatalogService::cancel_operation][crate::client::CatalogService::cancel_operation] calls.
7173    ///
7174    /// # Example
7175    /// ```
7176    /// # use google_cloud_dataplex_v1::builder::catalog_service::CancelOperation;
7177    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7178    ///
7179    /// let builder = prepare_request_builder();
7180    /// let response = builder.send().await?;
7181    /// # Ok(()) }
7182    ///
7183    /// fn prepare_request_builder() -> CancelOperation {
7184    ///   # panic!();
7185    ///   // ... details omitted ...
7186    /// }
7187    /// ```
7188    #[derive(Clone, Debug)]
7189    pub struct CancelOperation(
7190        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
7191    );
7192
7193    impl CancelOperation {
7194        pub(crate) fn new(
7195            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
7196        ) -> Self {
7197            Self(RequestBuilder::new(stub))
7198        }
7199
7200        /// Sets the full request, replacing any prior values.
7201        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
7202            mut self,
7203            v: V,
7204        ) -> Self {
7205            self.0.request = v.into();
7206            self
7207        }
7208
7209        /// Sets all the options, replacing any prior values.
7210        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7211            self.0.options = v.into();
7212            self
7213        }
7214
7215        /// Sends the request.
7216        pub async fn send(self) -> Result<()> {
7217            (*self.0.stub)
7218                .cancel_operation(self.0.request, self.0.options)
7219                .await
7220                .map(crate::Response::into_body)
7221        }
7222
7223        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
7224        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7225            self.0.request.name = v.into();
7226            self
7227        }
7228    }
7229
7230    #[doc(hidden)]
7231    impl crate::RequestBuilder for CancelOperation {
7232        fn request_options(&mut self) -> &mut crate::RequestOptions {
7233            &mut self.0.options
7234        }
7235    }
7236}
7237
7238/// Request and client builders for [CmekService][crate::client::CmekService].
7239pub mod cmek_service {
7240    use crate::Result;
7241
7242    /// A builder for [CmekService][crate::client::CmekService].
7243    ///
7244    /// ```
7245    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
7246    /// # use google_cloud_dataplex_v1::*;
7247    /// # use builder::cmek_service::ClientBuilder;
7248    /// # use client::CmekService;
7249    /// let builder : ClientBuilder = CmekService::builder();
7250    /// let client = builder
7251    ///     .with_endpoint("https://dataplex.googleapis.com")
7252    ///     .build().await?;
7253    /// # Ok(()) }
7254    /// ```
7255    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
7256
7257    pub(crate) mod client {
7258        use super::super::super::client::CmekService;
7259        pub struct Factory;
7260        impl crate::ClientFactory for Factory {
7261            type Client = CmekService;
7262            type Credentials = gaxi::options::Credentials;
7263            async fn build(
7264                self,
7265                config: gaxi::options::ClientConfig,
7266            ) -> crate::ClientBuilderResult<Self::Client> {
7267                Self::Client::new(config).await
7268            }
7269        }
7270    }
7271
7272    /// Common implementation for [crate::client::CmekService] request builders.
7273    #[derive(Clone, Debug)]
7274    pub(crate) struct RequestBuilder<R: std::default::Default> {
7275        stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7276        request: R,
7277        options: crate::RequestOptions,
7278    }
7279
7280    impl<R> RequestBuilder<R>
7281    where
7282        R: std::default::Default,
7283    {
7284        pub(crate) fn new(
7285            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7286        ) -> Self {
7287            Self {
7288                stub,
7289                request: R::default(),
7290                options: crate::RequestOptions::default(),
7291            }
7292        }
7293    }
7294
7295    /// The request builder for [CmekService::create_encryption_config][crate::client::CmekService::create_encryption_config] calls.
7296    ///
7297    /// # Example
7298    /// ```
7299    /// # use google_cloud_dataplex_v1::builder::cmek_service::CreateEncryptionConfig;
7300    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7301    /// use google_cloud_lro::Poller;
7302    ///
7303    /// let builder = prepare_request_builder();
7304    /// let response = builder.poller().until_done().await?;
7305    /// # Ok(()) }
7306    ///
7307    /// fn prepare_request_builder() -> CreateEncryptionConfig {
7308    ///   # panic!();
7309    ///   // ... details omitted ...
7310    /// }
7311    /// ```
7312    #[derive(Clone, Debug)]
7313    pub struct CreateEncryptionConfig(RequestBuilder<crate::model::CreateEncryptionConfigRequest>);
7314
7315    impl CreateEncryptionConfig {
7316        pub(crate) fn new(
7317            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7318        ) -> Self {
7319            Self(RequestBuilder::new(stub))
7320        }
7321
7322        /// Sets the full request, replacing any prior values.
7323        pub fn with_request<V: Into<crate::model::CreateEncryptionConfigRequest>>(
7324            mut self,
7325            v: V,
7326        ) -> Self {
7327            self.0.request = v.into();
7328            self
7329        }
7330
7331        /// Sets all the options, replacing any prior values.
7332        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7333            self.0.options = v.into();
7334            self
7335        }
7336
7337        /// Sends the request.
7338        ///
7339        /// # Long running operations
7340        ///
7341        /// This starts, but does not poll, a longrunning operation. More information
7342        /// on [create_encryption_config][crate::client::CmekService::create_encryption_config].
7343        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7344            (*self.0.stub)
7345                .create_encryption_config(self.0.request, self.0.options)
7346                .await
7347                .map(crate::Response::into_body)
7348        }
7349
7350        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_encryption_config`.
7351        pub fn poller(
7352            self,
7353        ) -> impl google_cloud_lro::Poller<crate::model::EncryptionConfig, crate::model::OperationMetadata>
7354        {
7355            type Operation = google_cloud_lro::internal::Operation<
7356                crate::model::EncryptionConfig,
7357                crate::model::OperationMetadata,
7358            >;
7359            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7360            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7361
7362            let stub = self.0.stub.clone();
7363            let mut options = self.0.options.clone();
7364            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7365            let query = move |name| {
7366                let stub = stub.clone();
7367                let options = options.clone();
7368                async {
7369                    let op = GetOperation::new(stub)
7370                        .set_name(name)
7371                        .with_options(options)
7372                        .send()
7373                        .await?;
7374                    Ok(Operation::new(op))
7375                }
7376            };
7377
7378            let start = move || async {
7379                let op = self.send().await?;
7380                Ok(Operation::new(op))
7381            };
7382
7383            google_cloud_lro::internal::new_poller(
7384                polling_error_policy,
7385                polling_backoff_policy,
7386                start,
7387                query,
7388            )
7389        }
7390
7391        /// Sets the value of [parent][crate::model::CreateEncryptionConfigRequest::parent].
7392        ///
7393        /// This is a **required** field for requests.
7394        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7395            self.0.request.parent = v.into();
7396            self
7397        }
7398
7399        /// Sets the value of [encryption_config_id][crate::model::CreateEncryptionConfigRequest::encryption_config_id].
7400        ///
7401        /// This is a **required** field for requests.
7402        pub fn set_encryption_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7403            self.0.request.encryption_config_id = v.into();
7404            self
7405        }
7406
7407        /// Sets the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
7408        ///
7409        /// This is a **required** field for requests.
7410        pub fn set_encryption_config<T>(mut self, v: T) -> Self
7411        where
7412            T: std::convert::Into<crate::model::EncryptionConfig>,
7413        {
7414            self.0.request.encryption_config = std::option::Option::Some(v.into());
7415            self
7416        }
7417
7418        /// Sets or clears the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
7419        ///
7420        /// This is a **required** field for requests.
7421        pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
7422        where
7423            T: std::convert::Into<crate::model::EncryptionConfig>,
7424        {
7425            self.0.request.encryption_config = v.map(|x| x.into());
7426            self
7427        }
7428    }
7429
7430    #[doc(hidden)]
7431    impl crate::RequestBuilder for CreateEncryptionConfig {
7432        fn request_options(&mut self) -> &mut crate::RequestOptions {
7433            &mut self.0.options
7434        }
7435    }
7436
7437    /// The request builder for [CmekService::update_encryption_config][crate::client::CmekService::update_encryption_config] calls.
7438    ///
7439    /// # Example
7440    /// ```
7441    /// # use google_cloud_dataplex_v1::builder::cmek_service::UpdateEncryptionConfig;
7442    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7443    /// use google_cloud_lro::Poller;
7444    ///
7445    /// let builder = prepare_request_builder();
7446    /// let response = builder.poller().until_done().await?;
7447    /// # Ok(()) }
7448    ///
7449    /// fn prepare_request_builder() -> UpdateEncryptionConfig {
7450    ///   # panic!();
7451    ///   // ... details omitted ...
7452    /// }
7453    /// ```
7454    #[derive(Clone, Debug)]
7455    pub struct UpdateEncryptionConfig(RequestBuilder<crate::model::UpdateEncryptionConfigRequest>);
7456
7457    impl UpdateEncryptionConfig {
7458        pub(crate) fn new(
7459            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7460        ) -> Self {
7461            Self(RequestBuilder::new(stub))
7462        }
7463
7464        /// Sets the full request, replacing any prior values.
7465        pub fn with_request<V: Into<crate::model::UpdateEncryptionConfigRequest>>(
7466            mut self,
7467            v: V,
7468        ) -> Self {
7469            self.0.request = v.into();
7470            self
7471        }
7472
7473        /// Sets all the options, replacing any prior values.
7474        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7475            self.0.options = v.into();
7476            self
7477        }
7478
7479        /// Sends the request.
7480        ///
7481        /// # Long running operations
7482        ///
7483        /// This starts, but does not poll, a longrunning operation. More information
7484        /// on [update_encryption_config][crate::client::CmekService::update_encryption_config].
7485        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7486            (*self.0.stub)
7487                .update_encryption_config(self.0.request, self.0.options)
7488                .await
7489                .map(crate::Response::into_body)
7490        }
7491
7492        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_encryption_config`.
7493        pub fn poller(
7494            self,
7495        ) -> impl google_cloud_lro::Poller<crate::model::EncryptionConfig, crate::model::OperationMetadata>
7496        {
7497            type Operation = google_cloud_lro::internal::Operation<
7498                crate::model::EncryptionConfig,
7499                crate::model::OperationMetadata,
7500            >;
7501            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7502            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7503
7504            let stub = self.0.stub.clone();
7505            let mut options = self.0.options.clone();
7506            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7507            let query = move |name| {
7508                let stub = stub.clone();
7509                let options = options.clone();
7510                async {
7511                    let op = GetOperation::new(stub)
7512                        .set_name(name)
7513                        .with_options(options)
7514                        .send()
7515                        .await?;
7516                    Ok(Operation::new(op))
7517                }
7518            };
7519
7520            let start = move || async {
7521                let op = self.send().await?;
7522                Ok(Operation::new(op))
7523            };
7524
7525            google_cloud_lro::internal::new_poller(
7526                polling_error_policy,
7527                polling_backoff_policy,
7528                start,
7529                query,
7530            )
7531        }
7532
7533        /// Sets the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
7534        ///
7535        /// This is a **required** field for requests.
7536        pub fn set_encryption_config<T>(mut self, v: T) -> Self
7537        where
7538            T: std::convert::Into<crate::model::EncryptionConfig>,
7539        {
7540            self.0.request.encryption_config = std::option::Option::Some(v.into());
7541            self
7542        }
7543
7544        /// Sets or clears the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
7545        ///
7546        /// This is a **required** field for requests.
7547        pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
7548        where
7549            T: std::convert::Into<crate::model::EncryptionConfig>,
7550        {
7551            self.0.request.encryption_config = v.map(|x| x.into());
7552            self
7553        }
7554
7555        /// Sets the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
7556        pub fn set_update_mask<T>(mut self, v: T) -> Self
7557        where
7558            T: std::convert::Into<wkt::FieldMask>,
7559        {
7560            self.0.request.update_mask = std::option::Option::Some(v.into());
7561            self
7562        }
7563
7564        /// Sets or clears the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
7565        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7566        where
7567            T: std::convert::Into<wkt::FieldMask>,
7568        {
7569            self.0.request.update_mask = v.map(|x| x.into());
7570            self
7571        }
7572    }
7573
7574    #[doc(hidden)]
7575    impl crate::RequestBuilder for UpdateEncryptionConfig {
7576        fn request_options(&mut self) -> &mut crate::RequestOptions {
7577            &mut self.0.options
7578        }
7579    }
7580
7581    /// The request builder for [CmekService::delete_encryption_config][crate::client::CmekService::delete_encryption_config] calls.
7582    ///
7583    /// # Example
7584    /// ```
7585    /// # use google_cloud_dataplex_v1::builder::cmek_service::DeleteEncryptionConfig;
7586    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7587    /// use google_cloud_lro::Poller;
7588    ///
7589    /// let builder = prepare_request_builder();
7590    /// let response = builder.poller().until_done().await?;
7591    /// # Ok(()) }
7592    ///
7593    /// fn prepare_request_builder() -> DeleteEncryptionConfig {
7594    ///   # panic!();
7595    ///   // ... details omitted ...
7596    /// }
7597    /// ```
7598    #[derive(Clone, Debug)]
7599    pub struct DeleteEncryptionConfig(RequestBuilder<crate::model::DeleteEncryptionConfigRequest>);
7600
7601    impl DeleteEncryptionConfig {
7602        pub(crate) fn new(
7603            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7604        ) -> Self {
7605            Self(RequestBuilder::new(stub))
7606        }
7607
7608        /// Sets the full request, replacing any prior values.
7609        pub fn with_request<V: Into<crate::model::DeleteEncryptionConfigRequest>>(
7610            mut self,
7611            v: V,
7612        ) -> Self {
7613            self.0.request = v.into();
7614            self
7615        }
7616
7617        /// Sets all the options, replacing any prior values.
7618        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7619            self.0.options = v.into();
7620            self
7621        }
7622
7623        /// Sends the request.
7624        ///
7625        /// # Long running operations
7626        ///
7627        /// This starts, but does not poll, a longrunning operation. More information
7628        /// on [delete_encryption_config][crate::client::CmekService::delete_encryption_config].
7629        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7630            (*self.0.stub)
7631                .delete_encryption_config(self.0.request, self.0.options)
7632                .await
7633                .map(crate::Response::into_body)
7634        }
7635
7636        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_encryption_config`.
7637        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
7638            type Operation =
7639                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7640            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7641            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7642
7643            let stub = self.0.stub.clone();
7644            let mut options = self.0.options.clone();
7645            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7646            let query = move |name| {
7647                let stub = stub.clone();
7648                let options = options.clone();
7649                async {
7650                    let op = GetOperation::new(stub)
7651                        .set_name(name)
7652                        .with_options(options)
7653                        .send()
7654                        .await?;
7655                    Ok(Operation::new(op))
7656                }
7657            };
7658
7659            let start = move || async {
7660                let op = self.send().await?;
7661                Ok(Operation::new(op))
7662            };
7663
7664            google_cloud_lro::internal::new_unit_response_poller(
7665                polling_error_policy,
7666                polling_backoff_policy,
7667                start,
7668                query,
7669            )
7670        }
7671
7672        /// Sets the value of [name][crate::model::DeleteEncryptionConfigRequest::name].
7673        ///
7674        /// This is a **required** field for requests.
7675        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7676            self.0.request.name = v.into();
7677            self
7678        }
7679
7680        /// Sets the value of [etag][crate::model::DeleteEncryptionConfigRequest::etag].
7681        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
7682            self.0.request.etag = v.into();
7683            self
7684        }
7685    }
7686
7687    #[doc(hidden)]
7688    impl crate::RequestBuilder for DeleteEncryptionConfig {
7689        fn request_options(&mut self) -> &mut crate::RequestOptions {
7690            &mut self.0.options
7691        }
7692    }
7693
7694    /// The request builder for [CmekService::list_encryption_configs][crate::client::CmekService::list_encryption_configs] calls.
7695    ///
7696    /// # Example
7697    /// ```
7698    /// # use google_cloud_dataplex_v1::builder::cmek_service::ListEncryptionConfigs;
7699    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7700    /// use google_cloud_gax::paginator::ItemPaginator;
7701    ///
7702    /// let builder = prepare_request_builder();
7703    /// let mut items = builder.by_item();
7704    /// while let Some(result) = items.next().await {
7705    ///   let item = result?;
7706    /// }
7707    /// # Ok(()) }
7708    ///
7709    /// fn prepare_request_builder() -> ListEncryptionConfigs {
7710    ///   # panic!();
7711    ///   // ... details omitted ...
7712    /// }
7713    /// ```
7714    #[derive(Clone, Debug)]
7715    pub struct ListEncryptionConfigs(RequestBuilder<crate::model::ListEncryptionConfigsRequest>);
7716
7717    impl ListEncryptionConfigs {
7718        pub(crate) fn new(
7719            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7720        ) -> Self {
7721            Self(RequestBuilder::new(stub))
7722        }
7723
7724        /// Sets the full request, replacing any prior values.
7725        pub fn with_request<V: Into<crate::model::ListEncryptionConfigsRequest>>(
7726            mut self,
7727            v: V,
7728        ) -> Self {
7729            self.0.request = v.into();
7730            self
7731        }
7732
7733        /// Sets all the options, replacing any prior values.
7734        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7735            self.0.options = v.into();
7736            self
7737        }
7738
7739        /// Sends the request.
7740        pub async fn send(self) -> Result<crate::model::ListEncryptionConfigsResponse> {
7741            (*self.0.stub)
7742                .list_encryption_configs(self.0.request, self.0.options)
7743                .await
7744                .map(crate::Response::into_body)
7745        }
7746
7747        /// Streams each page in the collection.
7748        pub fn by_page(
7749            self,
7750        ) -> impl google_cloud_gax::paginator::Paginator<
7751            crate::model::ListEncryptionConfigsResponse,
7752            crate::Error,
7753        > {
7754            use std::clone::Clone;
7755            let token = self.0.request.page_token.clone();
7756            let execute = move |token: String| {
7757                let mut builder = self.clone();
7758                builder.0.request = builder.0.request.set_page_token(token);
7759                builder.send()
7760            };
7761            google_cloud_gax::paginator::internal::new_paginator(token, execute)
7762        }
7763
7764        /// Streams each item in the collection.
7765        pub fn by_item(
7766            self,
7767        ) -> impl google_cloud_gax::paginator::ItemPaginator<
7768            crate::model::ListEncryptionConfigsResponse,
7769            crate::Error,
7770        > {
7771            use google_cloud_gax::paginator::Paginator;
7772            self.by_page().items()
7773        }
7774
7775        /// Sets the value of [parent][crate::model::ListEncryptionConfigsRequest::parent].
7776        ///
7777        /// This is a **required** field for requests.
7778        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7779            self.0.request.parent = v.into();
7780            self
7781        }
7782
7783        /// Sets the value of [page_size][crate::model::ListEncryptionConfigsRequest::page_size].
7784        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7785            self.0.request.page_size = v.into();
7786            self
7787        }
7788
7789        /// Sets the value of [page_token][crate::model::ListEncryptionConfigsRequest::page_token].
7790        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7791            self.0.request.page_token = v.into();
7792            self
7793        }
7794
7795        /// Sets the value of [filter][crate::model::ListEncryptionConfigsRequest::filter].
7796        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7797            self.0.request.filter = v.into();
7798            self
7799        }
7800
7801        /// Sets the value of [order_by][crate::model::ListEncryptionConfigsRequest::order_by].
7802        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7803            self.0.request.order_by = v.into();
7804            self
7805        }
7806    }
7807
7808    #[doc(hidden)]
7809    impl crate::RequestBuilder for ListEncryptionConfigs {
7810        fn request_options(&mut self) -> &mut crate::RequestOptions {
7811            &mut self.0.options
7812        }
7813    }
7814
7815    /// The request builder for [CmekService::get_encryption_config][crate::client::CmekService::get_encryption_config] calls.
7816    ///
7817    /// # Example
7818    /// ```
7819    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetEncryptionConfig;
7820    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7821    ///
7822    /// let builder = prepare_request_builder();
7823    /// let response = builder.send().await?;
7824    /// # Ok(()) }
7825    ///
7826    /// fn prepare_request_builder() -> GetEncryptionConfig {
7827    ///   # panic!();
7828    ///   // ... details omitted ...
7829    /// }
7830    /// ```
7831    #[derive(Clone, Debug)]
7832    pub struct GetEncryptionConfig(RequestBuilder<crate::model::GetEncryptionConfigRequest>);
7833
7834    impl GetEncryptionConfig {
7835        pub(crate) fn new(
7836            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7837        ) -> Self {
7838            Self(RequestBuilder::new(stub))
7839        }
7840
7841        /// Sets the full request, replacing any prior values.
7842        pub fn with_request<V: Into<crate::model::GetEncryptionConfigRequest>>(
7843            mut self,
7844            v: V,
7845        ) -> Self {
7846            self.0.request = v.into();
7847            self
7848        }
7849
7850        /// Sets all the options, replacing any prior values.
7851        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7852            self.0.options = v.into();
7853            self
7854        }
7855
7856        /// Sends the request.
7857        pub async fn send(self) -> Result<crate::model::EncryptionConfig> {
7858            (*self.0.stub)
7859                .get_encryption_config(self.0.request, self.0.options)
7860                .await
7861                .map(crate::Response::into_body)
7862        }
7863
7864        /// Sets the value of [name][crate::model::GetEncryptionConfigRequest::name].
7865        ///
7866        /// This is a **required** field for requests.
7867        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7868            self.0.request.name = v.into();
7869            self
7870        }
7871    }
7872
7873    #[doc(hidden)]
7874    impl crate::RequestBuilder for GetEncryptionConfig {
7875        fn request_options(&mut self) -> &mut crate::RequestOptions {
7876            &mut self.0.options
7877        }
7878    }
7879
7880    /// The request builder for [CmekService::list_locations][crate::client::CmekService::list_locations] calls.
7881    ///
7882    /// # Example
7883    /// ```
7884    /// # use google_cloud_dataplex_v1::builder::cmek_service::ListLocations;
7885    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7886    /// use google_cloud_gax::paginator::ItemPaginator;
7887    ///
7888    /// let builder = prepare_request_builder();
7889    /// let mut items = builder.by_item();
7890    /// while let Some(result) = items.next().await {
7891    ///   let item = result?;
7892    /// }
7893    /// # Ok(()) }
7894    ///
7895    /// fn prepare_request_builder() -> ListLocations {
7896    ///   # panic!();
7897    ///   // ... details omitted ...
7898    /// }
7899    /// ```
7900    #[derive(Clone, Debug)]
7901    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
7902
7903    impl ListLocations {
7904        pub(crate) fn new(
7905            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7906        ) -> Self {
7907            Self(RequestBuilder::new(stub))
7908        }
7909
7910        /// Sets the full request, replacing any prior values.
7911        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
7912            mut self,
7913            v: V,
7914        ) -> Self {
7915            self.0.request = v.into();
7916            self
7917        }
7918
7919        /// Sets all the options, replacing any prior values.
7920        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7921            self.0.options = v.into();
7922            self
7923        }
7924
7925        /// Sends the request.
7926        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
7927            (*self.0.stub)
7928                .list_locations(self.0.request, self.0.options)
7929                .await
7930                .map(crate::Response::into_body)
7931        }
7932
7933        /// Streams each page in the collection.
7934        pub fn by_page(
7935            self,
7936        ) -> impl google_cloud_gax::paginator::Paginator<
7937            google_cloud_location::model::ListLocationsResponse,
7938            crate::Error,
7939        > {
7940            use std::clone::Clone;
7941            let token = self.0.request.page_token.clone();
7942            let execute = move |token: String| {
7943                let mut builder = self.clone();
7944                builder.0.request = builder.0.request.set_page_token(token);
7945                builder.send()
7946            };
7947            google_cloud_gax::paginator::internal::new_paginator(token, execute)
7948        }
7949
7950        /// Streams each item in the collection.
7951        pub fn by_item(
7952            self,
7953        ) -> impl google_cloud_gax::paginator::ItemPaginator<
7954            google_cloud_location::model::ListLocationsResponse,
7955            crate::Error,
7956        > {
7957            use google_cloud_gax::paginator::Paginator;
7958            self.by_page().items()
7959        }
7960
7961        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
7962        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7963            self.0.request.name = v.into();
7964            self
7965        }
7966
7967        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
7968        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7969            self.0.request.filter = v.into();
7970            self
7971        }
7972
7973        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
7974        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7975            self.0.request.page_size = v.into();
7976            self
7977        }
7978
7979        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
7980        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7981            self.0.request.page_token = v.into();
7982            self
7983        }
7984    }
7985
7986    #[doc(hidden)]
7987    impl crate::RequestBuilder for ListLocations {
7988        fn request_options(&mut self) -> &mut crate::RequestOptions {
7989            &mut self.0.options
7990        }
7991    }
7992
7993    /// The request builder for [CmekService::get_location][crate::client::CmekService::get_location] calls.
7994    ///
7995    /// # Example
7996    /// ```
7997    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetLocation;
7998    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7999    ///
8000    /// let builder = prepare_request_builder();
8001    /// let response = builder.send().await?;
8002    /// # Ok(()) }
8003    ///
8004    /// fn prepare_request_builder() -> GetLocation {
8005    ///   # panic!();
8006    ///   // ... details omitted ...
8007    /// }
8008    /// ```
8009    #[derive(Clone, Debug)]
8010    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
8011
8012    impl GetLocation {
8013        pub(crate) fn new(
8014            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8015        ) -> Self {
8016            Self(RequestBuilder::new(stub))
8017        }
8018
8019        /// Sets the full request, replacing any prior values.
8020        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
8021            mut self,
8022            v: V,
8023        ) -> Self {
8024            self.0.request = v.into();
8025            self
8026        }
8027
8028        /// Sets all the options, replacing any prior values.
8029        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8030            self.0.options = v.into();
8031            self
8032        }
8033
8034        /// Sends the request.
8035        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
8036            (*self.0.stub)
8037                .get_location(self.0.request, self.0.options)
8038                .await
8039                .map(crate::Response::into_body)
8040        }
8041
8042        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
8043        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8044            self.0.request.name = v.into();
8045            self
8046        }
8047    }
8048
8049    #[doc(hidden)]
8050    impl crate::RequestBuilder for GetLocation {
8051        fn request_options(&mut self) -> &mut crate::RequestOptions {
8052            &mut self.0.options
8053        }
8054    }
8055
8056    /// The request builder for [CmekService::set_iam_policy][crate::client::CmekService::set_iam_policy] calls.
8057    ///
8058    /// # Example
8059    /// ```
8060    /// # use google_cloud_dataplex_v1::builder::cmek_service::SetIamPolicy;
8061    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8062    ///
8063    /// let builder = prepare_request_builder();
8064    /// let response = builder.send().await?;
8065    /// # Ok(()) }
8066    ///
8067    /// fn prepare_request_builder() -> SetIamPolicy {
8068    ///   # panic!();
8069    ///   // ... details omitted ...
8070    /// }
8071    /// ```
8072    #[derive(Clone, Debug)]
8073    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
8074
8075    impl SetIamPolicy {
8076        pub(crate) fn new(
8077            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8078        ) -> Self {
8079            Self(RequestBuilder::new(stub))
8080        }
8081
8082        /// Sets the full request, replacing any prior values.
8083        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
8084            mut self,
8085            v: V,
8086        ) -> Self {
8087            self.0.request = v.into();
8088            self
8089        }
8090
8091        /// Sets all the options, replacing any prior values.
8092        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8093            self.0.options = v.into();
8094            self
8095        }
8096
8097        /// Sends the request.
8098        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8099            (*self.0.stub)
8100                .set_iam_policy(self.0.request, self.0.options)
8101                .await
8102                .map(crate::Response::into_body)
8103        }
8104
8105        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
8106        ///
8107        /// This is a **required** field for requests.
8108        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8109            self.0.request.resource = v.into();
8110            self
8111        }
8112
8113        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
8114        ///
8115        /// This is a **required** field for requests.
8116        pub fn set_policy<T>(mut self, v: T) -> Self
8117        where
8118            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8119        {
8120            self.0.request.policy = std::option::Option::Some(v.into());
8121            self
8122        }
8123
8124        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
8125        ///
8126        /// This is a **required** field for requests.
8127        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
8128        where
8129            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8130        {
8131            self.0.request.policy = v.map(|x| x.into());
8132            self
8133        }
8134
8135        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
8136        pub fn set_update_mask<T>(mut self, v: T) -> Self
8137        where
8138            T: std::convert::Into<wkt::FieldMask>,
8139        {
8140            self.0.request.update_mask = std::option::Option::Some(v.into());
8141            self
8142        }
8143
8144        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
8145        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8146        where
8147            T: std::convert::Into<wkt::FieldMask>,
8148        {
8149            self.0.request.update_mask = v.map(|x| x.into());
8150            self
8151        }
8152    }
8153
8154    #[doc(hidden)]
8155    impl crate::RequestBuilder for SetIamPolicy {
8156        fn request_options(&mut self) -> &mut crate::RequestOptions {
8157            &mut self.0.options
8158        }
8159    }
8160
8161    /// The request builder for [CmekService::get_iam_policy][crate::client::CmekService::get_iam_policy] calls.
8162    ///
8163    /// # Example
8164    /// ```
8165    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetIamPolicy;
8166    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8167    ///
8168    /// let builder = prepare_request_builder();
8169    /// let response = builder.send().await?;
8170    /// # Ok(()) }
8171    ///
8172    /// fn prepare_request_builder() -> GetIamPolicy {
8173    ///   # panic!();
8174    ///   // ... details omitted ...
8175    /// }
8176    /// ```
8177    #[derive(Clone, Debug)]
8178    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
8179
8180    impl GetIamPolicy {
8181        pub(crate) fn new(
8182            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8183        ) -> Self {
8184            Self(RequestBuilder::new(stub))
8185        }
8186
8187        /// Sets the full request, replacing any prior values.
8188        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
8189            mut self,
8190            v: V,
8191        ) -> Self {
8192            self.0.request = v.into();
8193            self
8194        }
8195
8196        /// Sets all the options, replacing any prior values.
8197        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8198            self.0.options = v.into();
8199            self
8200        }
8201
8202        /// Sends the request.
8203        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8204            (*self.0.stub)
8205                .get_iam_policy(self.0.request, self.0.options)
8206                .await
8207                .map(crate::Response::into_body)
8208        }
8209
8210        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
8211        ///
8212        /// This is a **required** field for requests.
8213        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8214            self.0.request.resource = v.into();
8215            self
8216        }
8217
8218        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
8219        pub fn set_options<T>(mut self, v: T) -> Self
8220        where
8221            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
8222        {
8223            self.0.request.options = std::option::Option::Some(v.into());
8224            self
8225        }
8226
8227        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
8228        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
8229        where
8230            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
8231        {
8232            self.0.request.options = v.map(|x| x.into());
8233            self
8234        }
8235    }
8236
8237    #[doc(hidden)]
8238    impl crate::RequestBuilder for GetIamPolicy {
8239        fn request_options(&mut self) -> &mut crate::RequestOptions {
8240            &mut self.0.options
8241        }
8242    }
8243
8244    /// The request builder for [CmekService::test_iam_permissions][crate::client::CmekService::test_iam_permissions] calls.
8245    ///
8246    /// # Example
8247    /// ```
8248    /// # use google_cloud_dataplex_v1::builder::cmek_service::TestIamPermissions;
8249    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8250    ///
8251    /// let builder = prepare_request_builder();
8252    /// let response = builder.send().await?;
8253    /// # Ok(()) }
8254    ///
8255    /// fn prepare_request_builder() -> TestIamPermissions {
8256    ///   # panic!();
8257    ///   // ... details omitted ...
8258    /// }
8259    /// ```
8260    #[derive(Clone, Debug)]
8261    pub struct TestIamPermissions(
8262        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
8263    );
8264
8265    impl TestIamPermissions {
8266        pub(crate) fn new(
8267            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8268        ) -> Self {
8269            Self(RequestBuilder::new(stub))
8270        }
8271
8272        /// Sets the full request, replacing any prior values.
8273        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
8274            mut self,
8275            v: V,
8276        ) -> Self {
8277            self.0.request = v.into();
8278            self
8279        }
8280
8281        /// Sets all the options, replacing any prior values.
8282        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8283            self.0.options = v.into();
8284            self
8285        }
8286
8287        /// Sends the request.
8288        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
8289            (*self.0.stub)
8290                .test_iam_permissions(self.0.request, self.0.options)
8291                .await
8292                .map(crate::Response::into_body)
8293        }
8294
8295        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
8296        ///
8297        /// This is a **required** field for requests.
8298        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8299            self.0.request.resource = v.into();
8300            self
8301        }
8302
8303        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
8304        ///
8305        /// This is a **required** field for requests.
8306        pub fn set_permissions<T, V>(mut self, v: T) -> Self
8307        where
8308            T: std::iter::IntoIterator<Item = V>,
8309            V: std::convert::Into<std::string::String>,
8310        {
8311            use std::iter::Iterator;
8312            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
8313            self
8314        }
8315    }
8316
8317    #[doc(hidden)]
8318    impl crate::RequestBuilder for TestIamPermissions {
8319        fn request_options(&mut self) -> &mut crate::RequestOptions {
8320            &mut self.0.options
8321        }
8322    }
8323
8324    /// The request builder for [CmekService::list_operations][crate::client::CmekService::list_operations] calls.
8325    ///
8326    /// # Example
8327    /// ```
8328    /// # use google_cloud_dataplex_v1::builder::cmek_service::ListOperations;
8329    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8330    /// use google_cloud_gax::paginator::ItemPaginator;
8331    ///
8332    /// let builder = prepare_request_builder();
8333    /// let mut items = builder.by_item();
8334    /// while let Some(result) = items.next().await {
8335    ///   let item = result?;
8336    /// }
8337    /// # Ok(()) }
8338    ///
8339    /// fn prepare_request_builder() -> ListOperations {
8340    ///   # panic!();
8341    ///   // ... details omitted ...
8342    /// }
8343    /// ```
8344    #[derive(Clone, Debug)]
8345    pub struct ListOperations(
8346        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
8347    );
8348
8349    impl ListOperations {
8350        pub(crate) fn new(
8351            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8352        ) -> Self {
8353            Self(RequestBuilder::new(stub))
8354        }
8355
8356        /// Sets the full request, replacing any prior values.
8357        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
8358            mut self,
8359            v: V,
8360        ) -> Self {
8361            self.0.request = v.into();
8362            self
8363        }
8364
8365        /// Sets all the options, replacing any prior values.
8366        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8367            self.0.options = v.into();
8368            self
8369        }
8370
8371        /// Sends the request.
8372        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
8373            (*self.0.stub)
8374                .list_operations(self.0.request, self.0.options)
8375                .await
8376                .map(crate::Response::into_body)
8377        }
8378
8379        /// Streams each page in the collection.
8380        pub fn by_page(
8381            self,
8382        ) -> impl google_cloud_gax::paginator::Paginator<
8383            google_cloud_longrunning::model::ListOperationsResponse,
8384            crate::Error,
8385        > {
8386            use std::clone::Clone;
8387            let token = self.0.request.page_token.clone();
8388            let execute = move |token: String| {
8389                let mut builder = self.clone();
8390                builder.0.request = builder.0.request.set_page_token(token);
8391                builder.send()
8392            };
8393            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8394        }
8395
8396        /// Streams each item in the collection.
8397        pub fn by_item(
8398            self,
8399        ) -> impl google_cloud_gax::paginator::ItemPaginator<
8400            google_cloud_longrunning::model::ListOperationsResponse,
8401            crate::Error,
8402        > {
8403            use google_cloud_gax::paginator::Paginator;
8404            self.by_page().items()
8405        }
8406
8407        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
8408        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8409            self.0.request.name = v.into();
8410            self
8411        }
8412
8413        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
8414        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8415            self.0.request.filter = v.into();
8416            self
8417        }
8418
8419        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
8420        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8421            self.0.request.page_size = v.into();
8422            self
8423        }
8424
8425        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
8426        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8427            self.0.request.page_token = v.into();
8428            self
8429        }
8430
8431        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
8432        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
8433            self.0.request.return_partial_success = v.into();
8434            self
8435        }
8436    }
8437
8438    #[doc(hidden)]
8439    impl crate::RequestBuilder for ListOperations {
8440        fn request_options(&mut self) -> &mut crate::RequestOptions {
8441            &mut self.0.options
8442        }
8443    }
8444
8445    /// The request builder for [CmekService::get_operation][crate::client::CmekService::get_operation] calls.
8446    ///
8447    /// # Example
8448    /// ```
8449    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetOperation;
8450    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8451    ///
8452    /// let builder = prepare_request_builder();
8453    /// let response = builder.send().await?;
8454    /// # Ok(()) }
8455    ///
8456    /// fn prepare_request_builder() -> GetOperation {
8457    ///   # panic!();
8458    ///   // ... details omitted ...
8459    /// }
8460    /// ```
8461    #[derive(Clone, Debug)]
8462    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
8463
8464    impl GetOperation {
8465        pub(crate) fn new(
8466            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8467        ) -> Self {
8468            Self(RequestBuilder::new(stub))
8469        }
8470
8471        /// Sets the full request, replacing any prior values.
8472        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
8473            mut self,
8474            v: V,
8475        ) -> Self {
8476            self.0.request = v.into();
8477            self
8478        }
8479
8480        /// Sets all the options, replacing any prior values.
8481        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8482            self.0.options = v.into();
8483            self
8484        }
8485
8486        /// Sends the request.
8487        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8488            (*self.0.stub)
8489                .get_operation(self.0.request, self.0.options)
8490                .await
8491                .map(crate::Response::into_body)
8492        }
8493
8494        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
8495        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8496            self.0.request.name = v.into();
8497            self
8498        }
8499    }
8500
8501    #[doc(hidden)]
8502    impl crate::RequestBuilder for GetOperation {
8503        fn request_options(&mut self) -> &mut crate::RequestOptions {
8504            &mut self.0.options
8505        }
8506    }
8507
8508    /// The request builder for [CmekService::delete_operation][crate::client::CmekService::delete_operation] calls.
8509    ///
8510    /// # Example
8511    /// ```
8512    /// # use google_cloud_dataplex_v1::builder::cmek_service::DeleteOperation;
8513    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8514    ///
8515    /// let builder = prepare_request_builder();
8516    /// let response = builder.send().await?;
8517    /// # Ok(()) }
8518    ///
8519    /// fn prepare_request_builder() -> DeleteOperation {
8520    ///   # panic!();
8521    ///   // ... details omitted ...
8522    /// }
8523    /// ```
8524    #[derive(Clone, Debug)]
8525    pub struct DeleteOperation(
8526        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
8527    );
8528
8529    impl DeleteOperation {
8530        pub(crate) fn new(
8531            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8532        ) -> Self {
8533            Self(RequestBuilder::new(stub))
8534        }
8535
8536        /// Sets the full request, replacing any prior values.
8537        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
8538            mut self,
8539            v: V,
8540        ) -> Self {
8541            self.0.request = v.into();
8542            self
8543        }
8544
8545        /// Sets all the options, replacing any prior values.
8546        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8547            self.0.options = v.into();
8548            self
8549        }
8550
8551        /// Sends the request.
8552        pub async fn send(self) -> Result<()> {
8553            (*self.0.stub)
8554                .delete_operation(self.0.request, self.0.options)
8555                .await
8556                .map(crate::Response::into_body)
8557        }
8558
8559        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
8560        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8561            self.0.request.name = v.into();
8562            self
8563        }
8564    }
8565
8566    #[doc(hidden)]
8567    impl crate::RequestBuilder for DeleteOperation {
8568        fn request_options(&mut self) -> &mut crate::RequestOptions {
8569            &mut self.0.options
8570        }
8571    }
8572
8573    /// The request builder for [CmekService::cancel_operation][crate::client::CmekService::cancel_operation] calls.
8574    ///
8575    /// # Example
8576    /// ```
8577    /// # use google_cloud_dataplex_v1::builder::cmek_service::CancelOperation;
8578    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8579    ///
8580    /// let builder = prepare_request_builder();
8581    /// let response = builder.send().await?;
8582    /// # Ok(()) }
8583    ///
8584    /// fn prepare_request_builder() -> CancelOperation {
8585    ///   # panic!();
8586    ///   // ... details omitted ...
8587    /// }
8588    /// ```
8589    #[derive(Clone, Debug)]
8590    pub struct CancelOperation(
8591        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
8592    );
8593
8594    impl CancelOperation {
8595        pub(crate) fn new(
8596            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
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_longrunning::model::CancelOperationRequest>>(
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<()> {
8618            (*self.0.stub)
8619                .cancel_operation(self.0.request, self.0.options)
8620                .await
8621                .map(crate::Response::into_body)
8622        }
8623
8624        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
8625        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8626            self.0.request.name = v.into();
8627            self
8628        }
8629    }
8630
8631    #[doc(hidden)]
8632    impl crate::RequestBuilder for CancelOperation {
8633        fn request_options(&mut self) -> &mut crate::RequestOptions {
8634            &mut self.0.options
8635        }
8636    }
8637}
8638
8639/// Request and client builders for [ContentService][crate::client::ContentService].
8640pub mod content_service {
8641    use crate::Result;
8642
8643    /// A builder for [ContentService][crate::client::ContentService].
8644    ///
8645    /// ```
8646    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
8647    /// # use google_cloud_dataplex_v1::*;
8648    /// # use builder::content_service::ClientBuilder;
8649    /// # use client::ContentService;
8650    /// let builder : ClientBuilder = ContentService::builder();
8651    /// let client = builder
8652    ///     .with_endpoint("https://dataplex.googleapis.com")
8653    ///     .build().await?;
8654    /// # Ok(()) }
8655    /// ```
8656    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
8657
8658    pub(crate) mod client {
8659        use super::super::super::client::ContentService;
8660        pub struct Factory;
8661        impl crate::ClientFactory for Factory {
8662            type Client = ContentService;
8663            type Credentials = gaxi::options::Credentials;
8664            async fn build(
8665                self,
8666                config: gaxi::options::ClientConfig,
8667            ) -> crate::ClientBuilderResult<Self::Client> {
8668                Self::Client::new(config).await
8669            }
8670        }
8671    }
8672
8673    /// Common implementation for [crate::client::ContentService] request builders.
8674    #[derive(Clone, Debug)]
8675    pub(crate) struct RequestBuilder<R: std::default::Default> {
8676        stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8677        request: R,
8678        options: crate::RequestOptions,
8679    }
8680
8681    impl<R> RequestBuilder<R>
8682    where
8683        R: std::default::Default,
8684    {
8685        pub(crate) fn new(
8686            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8687        ) -> Self {
8688            Self {
8689                stub,
8690                request: R::default(),
8691                options: crate::RequestOptions::default(),
8692            }
8693        }
8694    }
8695
8696    /// The request builder for [ContentService::list_locations][crate::client::ContentService::list_locations] calls.
8697    ///
8698    /// # Example
8699    /// ```
8700    /// # use google_cloud_dataplex_v1::builder::content_service::ListLocations;
8701    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8702    /// use google_cloud_gax::paginator::ItemPaginator;
8703    ///
8704    /// let builder = prepare_request_builder();
8705    /// let mut items = builder.by_item();
8706    /// while let Some(result) = items.next().await {
8707    ///   let item = result?;
8708    /// }
8709    /// # Ok(()) }
8710    ///
8711    /// fn prepare_request_builder() -> ListLocations {
8712    ///   # panic!();
8713    ///   // ... details omitted ...
8714    /// }
8715    /// ```
8716    #[derive(Clone, Debug)]
8717    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
8718
8719    impl ListLocations {
8720        pub(crate) fn new(
8721            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8722        ) -> Self {
8723            Self(RequestBuilder::new(stub))
8724        }
8725
8726        /// Sets the full request, replacing any prior values.
8727        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
8728            mut self,
8729            v: V,
8730        ) -> Self {
8731            self.0.request = v.into();
8732            self
8733        }
8734
8735        /// Sets all the options, replacing any prior values.
8736        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8737            self.0.options = v.into();
8738            self
8739        }
8740
8741        /// Sends the request.
8742        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
8743            (*self.0.stub)
8744                .list_locations(self.0.request, self.0.options)
8745                .await
8746                .map(crate::Response::into_body)
8747        }
8748
8749        /// Streams each page in the collection.
8750        pub fn by_page(
8751            self,
8752        ) -> impl google_cloud_gax::paginator::Paginator<
8753            google_cloud_location::model::ListLocationsResponse,
8754            crate::Error,
8755        > {
8756            use std::clone::Clone;
8757            let token = self.0.request.page_token.clone();
8758            let execute = move |token: String| {
8759                let mut builder = self.clone();
8760                builder.0.request = builder.0.request.set_page_token(token);
8761                builder.send()
8762            };
8763            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8764        }
8765
8766        /// Streams each item in the collection.
8767        pub fn by_item(
8768            self,
8769        ) -> impl google_cloud_gax::paginator::ItemPaginator<
8770            google_cloud_location::model::ListLocationsResponse,
8771            crate::Error,
8772        > {
8773            use google_cloud_gax::paginator::Paginator;
8774            self.by_page().items()
8775        }
8776
8777        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
8778        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8779            self.0.request.name = v.into();
8780            self
8781        }
8782
8783        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
8784        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8785            self.0.request.filter = v.into();
8786            self
8787        }
8788
8789        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
8790        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8791            self.0.request.page_size = v.into();
8792            self
8793        }
8794
8795        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
8796        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8797            self.0.request.page_token = v.into();
8798            self
8799        }
8800    }
8801
8802    #[doc(hidden)]
8803    impl crate::RequestBuilder for ListLocations {
8804        fn request_options(&mut self) -> &mut crate::RequestOptions {
8805            &mut self.0.options
8806        }
8807    }
8808
8809    /// The request builder for [ContentService::get_location][crate::client::ContentService::get_location] calls.
8810    ///
8811    /// # Example
8812    /// ```
8813    /// # use google_cloud_dataplex_v1::builder::content_service::GetLocation;
8814    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8815    ///
8816    /// let builder = prepare_request_builder();
8817    /// let response = builder.send().await?;
8818    /// # Ok(()) }
8819    ///
8820    /// fn prepare_request_builder() -> GetLocation {
8821    ///   # panic!();
8822    ///   // ... details omitted ...
8823    /// }
8824    /// ```
8825    #[derive(Clone, Debug)]
8826    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
8827
8828    impl GetLocation {
8829        pub(crate) fn new(
8830            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8831        ) -> Self {
8832            Self(RequestBuilder::new(stub))
8833        }
8834
8835        /// Sets the full request, replacing any prior values.
8836        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
8837            mut self,
8838            v: V,
8839        ) -> Self {
8840            self.0.request = v.into();
8841            self
8842        }
8843
8844        /// Sets all the options, replacing any prior values.
8845        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8846            self.0.options = v.into();
8847            self
8848        }
8849
8850        /// Sends the request.
8851        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
8852            (*self.0.stub)
8853                .get_location(self.0.request, self.0.options)
8854                .await
8855                .map(crate::Response::into_body)
8856        }
8857
8858        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
8859        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8860            self.0.request.name = v.into();
8861            self
8862        }
8863    }
8864
8865    #[doc(hidden)]
8866    impl crate::RequestBuilder for GetLocation {
8867        fn request_options(&mut self) -> &mut crate::RequestOptions {
8868            &mut self.0.options
8869        }
8870    }
8871
8872    /// The request builder for [ContentService::set_iam_policy][crate::client::ContentService::set_iam_policy] calls.
8873    ///
8874    /// # Example
8875    /// ```
8876    /// # use google_cloud_dataplex_v1::builder::content_service::SetIamPolicy;
8877    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8878    ///
8879    /// let builder = prepare_request_builder();
8880    /// let response = builder.send().await?;
8881    /// # Ok(()) }
8882    ///
8883    /// fn prepare_request_builder() -> SetIamPolicy {
8884    ///   # panic!();
8885    ///   // ... details omitted ...
8886    /// }
8887    /// ```
8888    #[derive(Clone, Debug)]
8889    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
8890
8891    impl SetIamPolicy {
8892        pub(crate) fn new(
8893            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8894        ) -> Self {
8895            Self(RequestBuilder::new(stub))
8896        }
8897
8898        /// Sets the full request, replacing any prior values.
8899        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
8900            mut self,
8901            v: V,
8902        ) -> Self {
8903            self.0.request = v.into();
8904            self
8905        }
8906
8907        /// Sets all the options, replacing any prior values.
8908        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8909            self.0.options = v.into();
8910            self
8911        }
8912
8913        /// Sends the request.
8914        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8915            (*self.0.stub)
8916                .set_iam_policy(self.0.request, self.0.options)
8917                .await
8918                .map(crate::Response::into_body)
8919        }
8920
8921        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
8922        ///
8923        /// This is a **required** field for requests.
8924        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8925            self.0.request.resource = v.into();
8926            self
8927        }
8928
8929        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
8930        ///
8931        /// This is a **required** field for requests.
8932        pub fn set_policy<T>(mut self, v: T) -> Self
8933        where
8934            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8935        {
8936            self.0.request.policy = std::option::Option::Some(v.into());
8937            self
8938        }
8939
8940        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
8941        ///
8942        /// This is a **required** field for requests.
8943        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
8944        where
8945            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8946        {
8947            self.0.request.policy = v.map(|x| x.into());
8948            self
8949        }
8950
8951        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
8952        pub fn set_update_mask<T>(mut self, v: T) -> Self
8953        where
8954            T: std::convert::Into<wkt::FieldMask>,
8955        {
8956            self.0.request.update_mask = std::option::Option::Some(v.into());
8957            self
8958        }
8959
8960        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
8961        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8962        where
8963            T: std::convert::Into<wkt::FieldMask>,
8964        {
8965            self.0.request.update_mask = v.map(|x| x.into());
8966            self
8967        }
8968    }
8969
8970    #[doc(hidden)]
8971    impl crate::RequestBuilder for SetIamPolicy {
8972        fn request_options(&mut self) -> &mut crate::RequestOptions {
8973            &mut self.0.options
8974        }
8975    }
8976
8977    /// The request builder for [ContentService::get_iam_policy][crate::client::ContentService::get_iam_policy] calls.
8978    ///
8979    /// # Example
8980    /// ```
8981    /// # use google_cloud_dataplex_v1::builder::content_service::GetIamPolicy;
8982    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8983    ///
8984    /// let builder = prepare_request_builder();
8985    /// let response = builder.send().await?;
8986    /// # Ok(()) }
8987    ///
8988    /// fn prepare_request_builder() -> GetIamPolicy {
8989    ///   # panic!();
8990    ///   // ... details omitted ...
8991    /// }
8992    /// ```
8993    #[derive(Clone, Debug)]
8994    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
8995
8996    impl GetIamPolicy {
8997        pub(crate) fn new(
8998            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8999        ) -> Self {
9000            Self(RequestBuilder::new(stub))
9001        }
9002
9003        /// Sets the full request, replacing any prior values.
9004        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
9005            mut self,
9006            v: V,
9007        ) -> Self {
9008            self.0.request = v.into();
9009            self
9010        }
9011
9012        /// Sets all the options, replacing any prior values.
9013        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9014            self.0.options = v.into();
9015            self
9016        }
9017
9018        /// Sends the request.
9019        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
9020            (*self.0.stub)
9021                .get_iam_policy(self.0.request, self.0.options)
9022                .await
9023                .map(crate::Response::into_body)
9024        }
9025
9026        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
9027        ///
9028        /// This is a **required** field for requests.
9029        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
9030            self.0.request.resource = v.into();
9031            self
9032        }
9033
9034        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
9035        pub fn set_options<T>(mut self, v: T) -> Self
9036        where
9037            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
9038        {
9039            self.0.request.options = std::option::Option::Some(v.into());
9040            self
9041        }
9042
9043        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
9044        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
9045        where
9046            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
9047        {
9048            self.0.request.options = v.map(|x| x.into());
9049            self
9050        }
9051    }
9052
9053    #[doc(hidden)]
9054    impl crate::RequestBuilder for GetIamPolicy {
9055        fn request_options(&mut self) -> &mut crate::RequestOptions {
9056            &mut self.0.options
9057        }
9058    }
9059
9060    /// The request builder for [ContentService::test_iam_permissions][crate::client::ContentService::test_iam_permissions] calls.
9061    ///
9062    /// # Example
9063    /// ```
9064    /// # use google_cloud_dataplex_v1::builder::content_service::TestIamPermissions;
9065    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9066    ///
9067    /// let builder = prepare_request_builder();
9068    /// let response = builder.send().await?;
9069    /// # Ok(()) }
9070    ///
9071    /// fn prepare_request_builder() -> TestIamPermissions {
9072    ///   # panic!();
9073    ///   // ... details omitted ...
9074    /// }
9075    /// ```
9076    #[derive(Clone, Debug)]
9077    pub struct TestIamPermissions(
9078        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
9079    );
9080
9081    impl TestIamPermissions {
9082        pub(crate) fn new(
9083            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9084        ) -> Self {
9085            Self(RequestBuilder::new(stub))
9086        }
9087
9088        /// Sets the full request, replacing any prior values.
9089        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
9090            mut self,
9091            v: V,
9092        ) -> Self {
9093            self.0.request = v.into();
9094            self
9095        }
9096
9097        /// Sets all the options, replacing any prior values.
9098        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9099            self.0.options = v.into();
9100            self
9101        }
9102
9103        /// Sends the request.
9104        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
9105            (*self.0.stub)
9106                .test_iam_permissions(self.0.request, self.0.options)
9107                .await
9108                .map(crate::Response::into_body)
9109        }
9110
9111        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
9112        ///
9113        /// This is a **required** field for requests.
9114        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
9115            self.0.request.resource = v.into();
9116            self
9117        }
9118
9119        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
9120        ///
9121        /// This is a **required** field for requests.
9122        pub fn set_permissions<T, V>(mut self, v: T) -> Self
9123        where
9124            T: std::iter::IntoIterator<Item = V>,
9125            V: std::convert::Into<std::string::String>,
9126        {
9127            use std::iter::Iterator;
9128            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
9129            self
9130        }
9131    }
9132
9133    #[doc(hidden)]
9134    impl crate::RequestBuilder for TestIamPermissions {
9135        fn request_options(&mut self) -> &mut crate::RequestOptions {
9136            &mut self.0.options
9137        }
9138    }
9139
9140    /// The request builder for [ContentService::list_operations][crate::client::ContentService::list_operations] calls.
9141    ///
9142    /// # Example
9143    /// ```
9144    /// # use google_cloud_dataplex_v1::builder::content_service::ListOperations;
9145    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9146    /// use google_cloud_gax::paginator::ItemPaginator;
9147    ///
9148    /// let builder = prepare_request_builder();
9149    /// let mut items = builder.by_item();
9150    /// while let Some(result) = items.next().await {
9151    ///   let item = result?;
9152    /// }
9153    /// # Ok(()) }
9154    ///
9155    /// fn prepare_request_builder() -> ListOperations {
9156    ///   # panic!();
9157    ///   // ... details omitted ...
9158    /// }
9159    /// ```
9160    #[derive(Clone, Debug)]
9161    pub struct ListOperations(
9162        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
9163    );
9164
9165    impl ListOperations {
9166        pub(crate) fn new(
9167            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9168        ) -> Self {
9169            Self(RequestBuilder::new(stub))
9170        }
9171
9172        /// Sets the full request, replacing any prior values.
9173        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
9174            mut self,
9175            v: V,
9176        ) -> Self {
9177            self.0.request = v.into();
9178            self
9179        }
9180
9181        /// Sets all the options, replacing any prior values.
9182        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9183            self.0.options = v.into();
9184            self
9185        }
9186
9187        /// Sends the request.
9188        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
9189            (*self.0.stub)
9190                .list_operations(self.0.request, self.0.options)
9191                .await
9192                .map(crate::Response::into_body)
9193        }
9194
9195        /// Streams each page in the collection.
9196        pub fn by_page(
9197            self,
9198        ) -> impl google_cloud_gax::paginator::Paginator<
9199            google_cloud_longrunning::model::ListOperationsResponse,
9200            crate::Error,
9201        > {
9202            use std::clone::Clone;
9203            let token = self.0.request.page_token.clone();
9204            let execute = move |token: String| {
9205                let mut builder = self.clone();
9206                builder.0.request = builder.0.request.set_page_token(token);
9207                builder.send()
9208            };
9209            google_cloud_gax::paginator::internal::new_paginator(token, execute)
9210        }
9211
9212        /// Streams each item in the collection.
9213        pub fn by_item(
9214            self,
9215        ) -> impl google_cloud_gax::paginator::ItemPaginator<
9216            google_cloud_longrunning::model::ListOperationsResponse,
9217            crate::Error,
9218        > {
9219            use google_cloud_gax::paginator::Paginator;
9220            self.by_page().items()
9221        }
9222
9223        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
9224        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9225            self.0.request.name = v.into();
9226            self
9227        }
9228
9229        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
9230        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9231            self.0.request.filter = v.into();
9232            self
9233        }
9234
9235        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
9236        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9237            self.0.request.page_size = v.into();
9238            self
9239        }
9240
9241        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
9242        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9243            self.0.request.page_token = v.into();
9244            self
9245        }
9246
9247        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
9248        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
9249            self.0.request.return_partial_success = v.into();
9250            self
9251        }
9252    }
9253
9254    #[doc(hidden)]
9255    impl crate::RequestBuilder for ListOperations {
9256        fn request_options(&mut self) -> &mut crate::RequestOptions {
9257            &mut self.0.options
9258        }
9259    }
9260
9261    /// The request builder for [ContentService::get_operation][crate::client::ContentService::get_operation] calls.
9262    ///
9263    /// # Example
9264    /// ```
9265    /// # use google_cloud_dataplex_v1::builder::content_service::GetOperation;
9266    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9267    ///
9268    /// let builder = prepare_request_builder();
9269    /// let response = builder.send().await?;
9270    /// # Ok(()) }
9271    ///
9272    /// fn prepare_request_builder() -> GetOperation {
9273    ///   # panic!();
9274    ///   // ... details omitted ...
9275    /// }
9276    /// ```
9277    #[derive(Clone, Debug)]
9278    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
9279
9280    impl GetOperation {
9281        pub(crate) fn new(
9282            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9283        ) -> Self {
9284            Self(RequestBuilder::new(stub))
9285        }
9286
9287        /// Sets the full request, replacing any prior values.
9288        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
9289            mut self,
9290            v: V,
9291        ) -> Self {
9292            self.0.request = v.into();
9293            self
9294        }
9295
9296        /// Sets all the options, replacing any prior values.
9297        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9298            self.0.options = v.into();
9299            self
9300        }
9301
9302        /// Sends the request.
9303        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9304            (*self.0.stub)
9305                .get_operation(self.0.request, self.0.options)
9306                .await
9307                .map(crate::Response::into_body)
9308        }
9309
9310        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
9311        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9312            self.0.request.name = v.into();
9313            self
9314        }
9315    }
9316
9317    #[doc(hidden)]
9318    impl crate::RequestBuilder for GetOperation {
9319        fn request_options(&mut self) -> &mut crate::RequestOptions {
9320            &mut self.0.options
9321        }
9322    }
9323
9324    /// The request builder for [ContentService::delete_operation][crate::client::ContentService::delete_operation] calls.
9325    ///
9326    /// # Example
9327    /// ```
9328    /// # use google_cloud_dataplex_v1::builder::content_service::DeleteOperation;
9329    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9330    ///
9331    /// let builder = prepare_request_builder();
9332    /// let response = builder.send().await?;
9333    /// # Ok(()) }
9334    ///
9335    /// fn prepare_request_builder() -> DeleteOperation {
9336    ///   # panic!();
9337    ///   // ... details omitted ...
9338    /// }
9339    /// ```
9340    #[derive(Clone, Debug)]
9341    pub struct DeleteOperation(
9342        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
9343    );
9344
9345    impl DeleteOperation {
9346        pub(crate) fn new(
9347            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9348        ) -> Self {
9349            Self(RequestBuilder::new(stub))
9350        }
9351
9352        /// Sets the full request, replacing any prior values.
9353        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
9354            mut self,
9355            v: V,
9356        ) -> Self {
9357            self.0.request = v.into();
9358            self
9359        }
9360
9361        /// Sets all the options, replacing any prior values.
9362        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9363            self.0.options = v.into();
9364            self
9365        }
9366
9367        /// Sends the request.
9368        pub async fn send(self) -> Result<()> {
9369            (*self.0.stub)
9370                .delete_operation(self.0.request, self.0.options)
9371                .await
9372                .map(crate::Response::into_body)
9373        }
9374
9375        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
9376        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9377            self.0.request.name = v.into();
9378            self
9379        }
9380    }
9381
9382    #[doc(hidden)]
9383    impl crate::RequestBuilder for DeleteOperation {
9384        fn request_options(&mut self) -> &mut crate::RequestOptions {
9385            &mut self.0.options
9386        }
9387    }
9388
9389    /// The request builder for [ContentService::cancel_operation][crate::client::ContentService::cancel_operation] calls.
9390    ///
9391    /// # Example
9392    /// ```
9393    /// # use google_cloud_dataplex_v1::builder::content_service::CancelOperation;
9394    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9395    ///
9396    /// let builder = prepare_request_builder();
9397    /// let response = builder.send().await?;
9398    /// # Ok(()) }
9399    ///
9400    /// fn prepare_request_builder() -> CancelOperation {
9401    ///   # panic!();
9402    ///   // ... details omitted ...
9403    /// }
9404    /// ```
9405    #[derive(Clone, Debug)]
9406    pub struct CancelOperation(
9407        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
9408    );
9409
9410    impl CancelOperation {
9411        pub(crate) fn new(
9412            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9413        ) -> Self {
9414            Self(RequestBuilder::new(stub))
9415        }
9416
9417        /// Sets the full request, replacing any prior values.
9418        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
9419            mut self,
9420            v: V,
9421        ) -> Self {
9422            self.0.request = v.into();
9423            self
9424        }
9425
9426        /// Sets all the options, replacing any prior values.
9427        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9428            self.0.options = v.into();
9429            self
9430        }
9431
9432        /// Sends the request.
9433        pub async fn send(self) -> Result<()> {
9434            (*self.0.stub)
9435                .cancel_operation(self.0.request, self.0.options)
9436                .await
9437                .map(crate::Response::into_body)
9438        }
9439
9440        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
9441        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9442            self.0.request.name = v.into();
9443            self
9444        }
9445    }
9446
9447    #[doc(hidden)]
9448    impl crate::RequestBuilder for CancelOperation {
9449        fn request_options(&mut self) -> &mut crate::RequestOptions {
9450            &mut self.0.options
9451        }
9452    }
9453}
9454
9455/// Request and client builders for [DataProductService][crate::client::DataProductService].
9456pub mod data_product_service {
9457    use crate::Result;
9458
9459    /// A builder for [DataProductService][crate::client::DataProductService].
9460    ///
9461    /// ```
9462    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
9463    /// # use google_cloud_dataplex_v1::*;
9464    /// # use builder::data_product_service::ClientBuilder;
9465    /// # use client::DataProductService;
9466    /// let builder : ClientBuilder = DataProductService::builder();
9467    /// let client = builder
9468    ///     .with_endpoint("https://dataplex.googleapis.com")
9469    ///     .build().await?;
9470    /// # Ok(()) }
9471    /// ```
9472    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
9473
9474    pub(crate) mod client {
9475        use super::super::super::client::DataProductService;
9476        pub struct Factory;
9477        impl crate::ClientFactory for Factory {
9478            type Client = DataProductService;
9479            type Credentials = gaxi::options::Credentials;
9480            async fn build(
9481                self,
9482                config: gaxi::options::ClientConfig,
9483            ) -> crate::ClientBuilderResult<Self::Client> {
9484                Self::Client::new(config).await
9485            }
9486        }
9487    }
9488
9489    /// Common implementation for [crate::client::DataProductService] request builders.
9490    #[derive(Clone, Debug)]
9491    pub(crate) struct RequestBuilder<R: std::default::Default> {
9492        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9493        request: R,
9494        options: crate::RequestOptions,
9495    }
9496
9497    impl<R> RequestBuilder<R>
9498    where
9499        R: std::default::Default,
9500    {
9501        pub(crate) fn new(
9502            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9503        ) -> Self {
9504            Self {
9505                stub,
9506                request: R::default(),
9507                options: crate::RequestOptions::default(),
9508            }
9509        }
9510    }
9511
9512    /// The request builder for [DataProductService::create_data_product][crate::client::DataProductService::create_data_product] calls.
9513    ///
9514    /// # Example
9515    /// ```
9516    /// # use google_cloud_dataplex_v1::builder::data_product_service::CreateDataProduct;
9517    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9518    /// use google_cloud_lro::Poller;
9519    ///
9520    /// let builder = prepare_request_builder();
9521    /// let response = builder.poller().until_done().await?;
9522    /// # Ok(()) }
9523    ///
9524    /// fn prepare_request_builder() -> CreateDataProduct {
9525    ///   # panic!();
9526    ///   // ... details omitted ...
9527    /// }
9528    /// ```
9529    #[derive(Clone, Debug)]
9530    pub struct CreateDataProduct(RequestBuilder<crate::model::CreateDataProductRequest>);
9531
9532    impl CreateDataProduct {
9533        pub(crate) fn new(
9534            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9535        ) -> Self {
9536            Self(RequestBuilder::new(stub))
9537        }
9538
9539        /// Sets the full request, replacing any prior values.
9540        pub fn with_request<V: Into<crate::model::CreateDataProductRequest>>(
9541            mut self,
9542            v: V,
9543        ) -> Self {
9544            self.0.request = v.into();
9545            self
9546        }
9547
9548        /// Sets all the options, replacing any prior values.
9549        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9550            self.0.options = v.into();
9551            self
9552        }
9553
9554        /// Sends the request.
9555        ///
9556        /// # Long running operations
9557        ///
9558        /// This starts, but does not poll, a longrunning operation. More information
9559        /// on [create_data_product][crate::client::DataProductService::create_data_product].
9560        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9561            (*self.0.stub)
9562                .create_data_product(self.0.request, self.0.options)
9563                .await
9564                .map(crate::Response::into_body)
9565        }
9566
9567        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_product`.
9568        pub fn poller(
9569            self,
9570        ) -> impl google_cloud_lro::Poller<crate::model::DataProduct, crate::model::OperationMetadata>
9571        {
9572            type Operation = google_cloud_lro::internal::Operation<
9573                crate::model::DataProduct,
9574                crate::model::OperationMetadata,
9575            >;
9576            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9577            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9578
9579            let stub = self.0.stub.clone();
9580            let mut options = self.0.options.clone();
9581            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
9582            let query = move |name| {
9583                let stub = stub.clone();
9584                let options = options.clone();
9585                async {
9586                    let op = GetOperation::new(stub)
9587                        .set_name(name)
9588                        .with_options(options)
9589                        .send()
9590                        .await?;
9591                    Ok(Operation::new(op))
9592                }
9593            };
9594
9595            let start = move || async {
9596                let op = self.send().await?;
9597                Ok(Operation::new(op))
9598            };
9599
9600            google_cloud_lro::internal::new_poller(
9601                polling_error_policy,
9602                polling_backoff_policy,
9603                start,
9604                query,
9605            )
9606        }
9607
9608        /// Sets the value of [parent][crate::model::CreateDataProductRequest::parent].
9609        ///
9610        /// This is a **required** field for requests.
9611        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9612            self.0.request.parent = v.into();
9613            self
9614        }
9615
9616        /// Sets the value of [data_product_id][crate::model::CreateDataProductRequest::data_product_id].
9617        pub fn set_data_product_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
9618            self.0.request.data_product_id = v.into();
9619            self
9620        }
9621
9622        /// Sets the value of [data_product][crate::model::CreateDataProductRequest::data_product].
9623        ///
9624        /// This is a **required** field for requests.
9625        pub fn set_data_product<T>(mut self, v: T) -> Self
9626        where
9627            T: std::convert::Into<crate::model::DataProduct>,
9628        {
9629            self.0.request.data_product = std::option::Option::Some(v.into());
9630            self
9631        }
9632
9633        /// Sets or clears the value of [data_product][crate::model::CreateDataProductRequest::data_product].
9634        ///
9635        /// This is a **required** field for requests.
9636        pub fn set_or_clear_data_product<T>(mut self, v: std::option::Option<T>) -> Self
9637        where
9638            T: std::convert::Into<crate::model::DataProduct>,
9639        {
9640            self.0.request.data_product = v.map(|x| x.into());
9641            self
9642        }
9643
9644        /// Sets the value of [validate_only][crate::model::CreateDataProductRequest::validate_only].
9645        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9646            self.0.request.validate_only = v.into();
9647            self
9648        }
9649    }
9650
9651    #[doc(hidden)]
9652    impl crate::RequestBuilder for CreateDataProduct {
9653        fn request_options(&mut self) -> &mut crate::RequestOptions {
9654            &mut self.0.options
9655        }
9656    }
9657
9658    /// The request builder for [DataProductService::delete_data_product][crate::client::DataProductService::delete_data_product] calls.
9659    ///
9660    /// # Example
9661    /// ```
9662    /// # use google_cloud_dataplex_v1::builder::data_product_service::DeleteDataProduct;
9663    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9664    /// use google_cloud_lro::Poller;
9665    ///
9666    /// let builder = prepare_request_builder();
9667    /// let response = builder.poller().until_done().await?;
9668    /// # Ok(()) }
9669    ///
9670    /// fn prepare_request_builder() -> DeleteDataProduct {
9671    ///   # panic!();
9672    ///   // ... details omitted ...
9673    /// }
9674    /// ```
9675    #[derive(Clone, Debug)]
9676    pub struct DeleteDataProduct(RequestBuilder<crate::model::DeleteDataProductRequest>);
9677
9678    impl DeleteDataProduct {
9679        pub(crate) fn new(
9680            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9681        ) -> Self {
9682            Self(RequestBuilder::new(stub))
9683        }
9684
9685        /// Sets the full request, replacing any prior values.
9686        pub fn with_request<V: Into<crate::model::DeleteDataProductRequest>>(
9687            mut self,
9688            v: V,
9689        ) -> Self {
9690            self.0.request = v.into();
9691            self
9692        }
9693
9694        /// Sets all the options, replacing any prior values.
9695        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9696            self.0.options = v.into();
9697            self
9698        }
9699
9700        /// Sends the request.
9701        ///
9702        /// # Long running operations
9703        ///
9704        /// This starts, but does not poll, a longrunning operation. More information
9705        /// on [delete_data_product][crate::client::DataProductService::delete_data_product].
9706        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9707            (*self.0.stub)
9708                .delete_data_product(self.0.request, self.0.options)
9709                .await
9710                .map(crate::Response::into_body)
9711        }
9712
9713        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_product`.
9714        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
9715            type Operation =
9716                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
9717            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9718            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9719
9720            let stub = self.0.stub.clone();
9721            let mut options = self.0.options.clone();
9722            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
9723            let query = move |name| {
9724                let stub = stub.clone();
9725                let options = options.clone();
9726                async {
9727                    let op = GetOperation::new(stub)
9728                        .set_name(name)
9729                        .with_options(options)
9730                        .send()
9731                        .await?;
9732                    Ok(Operation::new(op))
9733                }
9734            };
9735
9736            let start = move || async {
9737                let op = self.send().await?;
9738                Ok(Operation::new(op))
9739            };
9740
9741            google_cloud_lro::internal::new_unit_response_poller(
9742                polling_error_policy,
9743                polling_backoff_policy,
9744                start,
9745                query,
9746            )
9747        }
9748
9749        /// Sets the value of [name][crate::model::DeleteDataProductRequest::name].
9750        ///
9751        /// This is a **required** field for requests.
9752        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9753            self.0.request.name = v.into();
9754            self
9755        }
9756
9757        /// Sets the value of [etag][crate::model::DeleteDataProductRequest::etag].
9758        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
9759            self.0.request.etag = v.into();
9760            self
9761        }
9762
9763        /// Sets the value of [validate_only][crate::model::DeleteDataProductRequest::validate_only].
9764        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9765            self.0.request.validate_only = v.into();
9766            self
9767        }
9768    }
9769
9770    #[doc(hidden)]
9771    impl crate::RequestBuilder for DeleteDataProduct {
9772        fn request_options(&mut self) -> &mut crate::RequestOptions {
9773            &mut self.0.options
9774        }
9775    }
9776
9777    /// The request builder for [DataProductService::get_data_product][crate::client::DataProductService::get_data_product] calls.
9778    ///
9779    /// # Example
9780    /// ```
9781    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetDataProduct;
9782    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9783    ///
9784    /// let builder = prepare_request_builder();
9785    /// let response = builder.send().await?;
9786    /// # Ok(()) }
9787    ///
9788    /// fn prepare_request_builder() -> GetDataProduct {
9789    ///   # panic!();
9790    ///   // ... details omitted ...
9791    /// }
9792    /// ```
9793    #[derive(Clone, Debug)]
9794    pub struct GetDataProduct(RequestBuilder<crate::model::GetDataProductRequest>);
9795
9796    impl GetDataProduct {
9797        pub(crate) fn new(
9798            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9799        ) -> Self {
9800            Self(RequestBuilder::new(stub))
9801        }
9802
9803        /// Sets the full request, replacing any prior values.
9804        pub fn with_request<V: Into<crate::model::GetDataProductRequest>>(mut self, v: V) -> Self {
9805            self.0.request = v.into();
9806            self
9807        }
9808
9809        /// Sets all the options, replacing any prior values.
9810        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9811            self.0.options = v.into();
9812            self
9813        }
9814
9815        /// Sends the request.
9816        pub async fn send(self) -> Result<crate::model::DataProduct> {
9817            (*self.0.stub)
9818                .get_data_product(self.0.request, self.0.options)
9819                .await
9820                .map(crate::Response::into_body)
9821        }
9822
9823        /// Sets the value of [name][crate::model::GetDataProductRequest::name].
9824        ///
9825        /// This is a **required** field for requests.
9826        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9827            self.0.request.name = v.into();
9828            self
9829        }
9830    }
9831
9832    #[doc(hidden)]
9833    impl crate::RequestBuilder for GetDataProduct {
9834        fn request_options(&mut self) -> &mut crate::RequestOptions {
9835            &mut self.0.options
9836        }
9837    }
9838
9839    /// The request builder for [DataProductService::list_data_products][crate::client::DataProductService::list_data_products] calls.
9840    ///
9841    /// # Example
9842    /// ```
9843    /// # use google_cloud_dataplex_v1::builder::data_product_service::ListDataProducts;
9844    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9845    /// use google_cloud_gax::paginator::ItemPaginator;
9846    ///
9847    /// let builder = prepare_request_builder();
9848    /// let mut items = builder.by_item();
9849    /// while let Some(result) = items.next().await {
9850    ///   let item = result?;
9851    /// }
9852    /// # Ok(()) }
9853    ///
9854    /// fn prepare_request_builder() -> ListDataProducts {
9855    ///   # panic!();
9856    ///   // ... details omitted ...
9857    /// }
9858    /// ```
9859    #[derive(Clone, Debug)]
9860    pub struct ListDataProducts(RequestBuilder<crate::model::ListDataProductsRequest>);
9861
9862    impl ListDataProducts {
9863        pub(crate) fn new(
9864            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9865        ) -> Self {
9866            Self(RequestBuilder::new(stub))
9867        }
9868
9869        /// Sets the full request, replacing any prior values.
9870        pub fn with_request<V: Into<crate::model::ListDataProductsRequest>>(
9871            mut self,
9872            v: V,
9873        ) -> Self {
9874            self.0.request = v.into();
9875            self
9876        }
9877
9878        /// Sets all the options, replacing any prior values.
9879        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9880            self.0.options = v.into();
9881            self
9882        }
9883
9884        /// Sends the request.
9885        pub async fn send(self) -> Result<crate::model::ListDataProductsResponse> {
9886            (*self.0.stub)
9887                .list_data_products(self.0.request, self.0.options)
9888                .await
9889                .map(crate::Response::into_body)
9890        }
9891
9892        /// Streams each page in the collection.
9893        pub fn by_page(
9894            self,
9895        ) -> impl google_cloud_gax::paginator::Paginator<
9896            crate::model::ListDataProductsResponse,
9897            crate::Error,
9898        > {
9899            use std::clone::Clone;
9900            let token = self.0.request.page_token.clone();
9901            let execute = move |token: String| {
9902                let mut builder = self.clone();
9903                builder.0.request = builder.0.request.set_page_token(token);
9904                builder.send()
9905            };
9906            google_cloud_gax::paginator::internal::new_paginator(token, execute)
9907        }
9908
9909        /// Streams each item in the collection.
9910        pub fn by_item(
9911            self,
9912        ) -> impl google_cloud_gax::paginator::ItemPaginator<
9913            crate::model::ListDataProductsResponse,
9914            crate::Error,
9915        > {
9916            use google_cloud_gax::paginator::Paginator;
9917            self.by_page().items()
9918        }
9919
9920        /// Sets the value of [parent][crate::model::ListDataProductsRequest::parent].
9921        ///
9922        /// This is a **required** field for requests.
9923        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9924            self.0.request.parent = v.into();
9925            self
9926        }
9927
9928        /// Sets the value of [filter][crate::model::ListDataProductsRequest::filter].
9929        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9930            self.0.request.filter = v.into();
9931            self
9932        }
9933
9934        /// Sets the value of [page_size][crate::model::ListDataProductsRequest::page_size].
9935        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9936            self.0.request.page_size = v.into();
9937            self
9938        }
9939
9940        /// Sets the value of [page_token][crate::model::ListDataProductsRequest::page_token].
9941        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9942            self.0.request.page_token = v.into();
9943            self
9944        }
9945
9946        /// Sets the value of [order_by][crate::model::ListDataProductsRequest::order_by].
9947        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
9948            self.0.request.order_by = v.into();
9949            self
9950        }
9951    }
9952
9953    #[doc(hidden)]
9954    impl crate::RequestBuilder for ListDataProducts {
9955        fn request_options(&mut self) -> &mut crate::RequestOptions {
9956            &mut self.0.options
9957        }
9958    }
9959
9960    /// The request builder for [DataProductService::update_data_product][crate::client::DataProductService::update_data_product] calls.
9961    ///
9962    /// # Example
9963    /// ```
9964    /// # use google_cloud_dataplex_v1::builder::data_product_service::UpdateDataProduct;
9965    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9966    /// use google_cloud_lro::Poller;
9967    ///
9968    /// let builder = prepare_request_builder();
9969    /// let response = builder.poller().until_done().await?;
9970    /// # Ok(()) }
9971    ///
9972    /// fn prepare_request_builder() -> UpdateDataProduct {
9973    ///   # panic!();
9974    ///   // ... details omitted ...
9975    /// }
9976    /// ```
9977    #[derive(Clone, Debug)]
9978    pub struct UpdateDataProduct(RequestBuilder<crate::model::UpdateDataProductRequest>);
9979
9980    impl UpdateDataProduct {
9981        pub(crate) fn new(
9982            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9983        ) -> Self {
9984            Self(RequestBuilder::new(stub))
9985        }
9986
9987        /// Sets the full request, replacing any prior values.
9988        pub fn with_request<V: Into<crate::model::UpdateDataProductRequest>>(
9989            mut self,
9990            v: V,
9991        ) -> Self {
9992            self.0.request = v.into();
9993            self
9994        }
9995
9996        /// Sets all the options, replacing any prior values.
9997        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9998            self.0.options = v.into();
9999            self
10000        }
10001
10002        /// Sends the request.
10003        ///
10004        /// # Long running operations
10005        ///
10006        /// This starts, but does not poll, a longrunning operation. More information
10007        /// on [update_data_product][crate::client::DataProductService::update_data_product].
10008        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10009            (*self.0.stub)
10010                .update_data_product(self.0.request, self.0.options)
10011                .await
10012                .map(crate::Response::into_body)
10013        }
10014
10015        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_product`.
10016        pub fn poller(
10017            self,
10018        ) -> impl google_cloud_lro::Poller<crate::model::DataProduct, crate::model::OperationMetadata>
10019        {
10020            type Operation = google_cloud_lro::internal::Operation<
10021                crate::model::DataProduct,
10022                crate::model::OperationMetadata,
10023            >;
10024            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10025            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10026
10027            let stub = self.0.stub.clone();
10028            let mut options = self.0.options.clone();
10029            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10030            let query = move |name| {
10031                let stub = stub.clone();
10032                let options = options.clone();
10033                async {
10034                    let op = GetOperation::new(stub)
10035                        .set_name(name)
10036                        .with_options(options)
10037                        .send()
10038                        .await?;
10039                    Ok(Operation::new(op))
10040                }
10041            };
10042
10043            let start = move || async {
10044                let op = self.send().await?;
10045                Ok(Operation::new(op))
10046            };
10047
10048            google_cloud_lro::internal::new_poller(
10049                polling_error_policy,
10050                polling_backoff_policy,
10051                start,
10052                query,
10053            )
10054        }
10055
10056        /// Sets the value of [data_product][crate::model::UpdateDataProductRequest::data_product].
10057        ///
10058        /// This is a **required** field for requests.
10059        pub fn set_data_product<T>(mut self, v: T) -> Self
10060        where
10061            T: std::convert::Into<crate::model::DataProduct>,
10062        {
10063            self.0.request.data_product = std::option::Option::Some(v.into());
10064            self
10065        }
10066
10067        /// Sets or clears the value of [data_product][crate::model::UpdateDataProductRequest::data_product].
10068        ///
10069        /// This is a **required** field for requests.
10070        pub fn set_or_clear_data_product<T>(mut self, v: std::option::Option<T>) -> Self
10071        where
10072            T: std::convert::Into<crate::model::DataProduct>,
10073        {
10074            self.0.request.data_product = v.map(|x| x.into());
10075            self
10076        }
10077
10078        /// Sets the value of [update_mask][crate::model::UpdateDataProductRequest::update_mask].
10079        pub fn set_update_mask<T>(mut self, v: T) -> Self
10080        where
10081            T: std::convert::Into<wkt::FieldMask>,
10082        {
10083            self.0.request.update_mask = std::option::Option::Some(v.into());
10084            self
10085        }
10086
10087        /// Sets or clears the value of [update_mask][crate::model::UpdateDataProductRequest::update_mask].
10088        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10089        where
10090            T: std::convert::Into<wkt::FieldMask>,
10091        {
10092            self.0.request.update_mask = v.map(|x| x.into());
10093            self
10094        }
10095
10096        /// Sets the value of [validate_only][crate::model::UpdateDataProductRequest::validate_only].
10097        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10098            self.0.request.validate_only = v.into();
10099            self
10100        }
10101    }
10102
10103    #[doc(hidden)]
10104    impl crate::RequestBuilder for UpdateDataProduct {
10105        fn request_options(&mut self) -> &mut crate::RequestOptions {
10106            &mut self.0.options
10107        }
10108    }
10109
10110    /// The request builder for [DataProductService::request_data_product_access][crate::client::DataProductService::request_data_product_access] calls.
10111    ///
10112    /// # Example
10113    /// ```
10114    /// # use google_cloud_dataplex_v1::builder::data_product_service::RequestDataProductAccess;
10115    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10116    ///
10117    /// let builder = prepare_request_builder();
10118    /// let response = builder.send().await?;
10119    /// # Ok(()) }
10120    ///
10121    /// fn prepare_request_builder() -> RequestDataProductAccess {
10122    ///   # panic!();
10123    ///   // ... details omitted ...
10124    /// }
10125    /// ```
10126    #[derive(Clone, Debug)]
10127    pub struct RequestDataProductAccess(
10128        RequestBuilder<crate::model::RequestDataProductAccessRequest>,
10129    );
10130
10131    impl RequestDataProductAccess {
10132        pub(crate) fn new(
10133            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10134        ) -> Self {
10135            Self(RequestBuilder::new(stub))
10136        }
10137
10138        /// Sets the full request, replacing any prior values.
10139        pub fn with_request<V: Into<crate::model::RequestDataProductAccessRequest>>(
10140            mut self,
10141            v: V,
10142        ) -> Self {
10143            self.0.request = v.into();
10144            self
10145        }
10146
10147        /// Sets all the options, replacing any prior values.
10148        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10149            self.0.options = v.into();
10150            self
10151        }
10152
10153        /// Sends the request.
10154        pub async fn send(self) -> Result<crate::model::RequestDataProductAccessResponse> {
10155            (*self.0.stub)
10156                .request_data_product_access(self.0.request, self.0.options)
10157                .await
10158                .map(crate::Response::into_body)
10159        }
10160
10161        /// Sets the value of [parent][crate::model::RequestDataProductAccessRequest::parent].
10162        ///
10163        /// This is a **required** field for requests.
10164        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10165            self.0.request.parent = v.into();
10166            self
10167        }
10168
10169        /// Sets the value of [change_request][crate::model::RequestDataProductAccessRequest::change_request].
10170        ///
10171        /// This is a **required** field for requests.
10172        pub fn set_change_request<T>(mut self, v: T) -> Self
10173        where
10174            T: std::convert::Into<crate::model::ChangeRequest>,
10175        {
10176            self.0.request.change_request = std::option::Option::Some(v.into());
10177            self
10178        }
10179
10180        /// Sets or clears the value of [change_request][crate::model::RequestDataProductAccessRequest::change_request].
10181        ///
10182        /// This is a **required** field for requests.
10183        pub fn set_or_clear_change_request<T>(mut self, v: std::option::Option<T>) -> Self
10184        where
10185            T: std::convert::Into<crate::model::ChangeRequest>,
10186        {
10187            self.0.request.change_request = v.map(|x| x.into());
10188            self
10189        }
10190
10191        /// Sets the value of [validate_only][crate::model::RequestDataProductAccessRequest::validate_only].
10192        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10193            self.0.request.validate_only = v.into();
10194            self
10195        }
10196    }
10197
10198    #[doc(hidden)]
10199    impl crate::RequestBuilder for RequestDataProductAccess {
10200        fn request_options(&mut self) -> &mut crate::RequestOptions {
10201            &mut self.0.options
10202        }
10203    }
10204
10205    /// The request builder for [DataProductService::create_data_asset][crate::client::DataProductService::create_data_asset] calls.
10206    ///
10207    /// # Example
10208    /// ```
10209    /// # use google_cloud_dataplex_v1::builder::data_product_service::CreateDataAsset;
10210    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10211    /// use google_cloud_lro::Poller;
10212    ///
10213    /// let builder = prepare_request_builder();
10214    /// let response = builder.poller().until_done().await?;
10215    /// # Ok(()) }
10216    ///
10217    /// fn prepare_request_builder() -> CreateDataAsset {
10218    ///   # panic!();
10219    ///   // ... details omitted ...
10220    /// }
10221    /// ```
10222    #[derive(Clone, Debug)]
10223    pub struct CreateDataAsset(RequestBuilder<crate::model::CreateDataAssetRequest>);
10224
10225    impl CreateDataAsset {
10226        pub(crate) fn new(
10227            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10228        ) -> Self {
10229            Self(RequestBuilder::new(stub))
10230        }
10231
10232        /// Sets the full request, replacing any prior values.
10233        pub fn with_request<V: Into<crate::model::CreateDataAssetRequest>>(mut self, v: V) -> Self {
10234            self.0.request = v.into();
10235            self
10236        }
10237
10238        /// Sets all the options, replacing any prior values.
10239        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10240            self.0.options = v.into();
10241            self
10242        }
10243
10244        /// Sends the request.
10245        ///
10246        /// # Long running operations
10247        ///
10248        /// This starts, but does not poll, a longrunning operation. More information
10249        /// on [create_data_asset][crate::client::DataProductService::create_data_asset].
10250        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10251            (*self.0.stub)
10252                .create_data_asset(self.0.request, self.0.options)
10253                .await
10254                .map(crate::Response::into_body)
10255        }
10256
10257        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_asset`.
10258        pub fn poller(
10259            self,
10260        ) -> impl google_cloud_lro::Poller<crate::model::DataAsset, crate::model::OperationMetadata>
10261        {
10262            type Operation = google_cloud_lro::internal::Operation<
10263                crate::model::DataAsset,
10264                crate::model::OperationMetadata,
10265            >;
10266            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10267            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10268
10269            let stub = self.0.stub.clone();
10270            let mut options = self.0.options.clone();
10271            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10272            let query = move |name| {
10273                let stub = stub.clone();
10274                let options = options.clone();
10275                async {
10276                    let op = GetOperation::new(stub)
10277                        .set_name(name)
10278                        .with_options(options)
10279                        .send()
10280                        .await?;
10281                    Ok(Operation::new(op))
10282                }
10283            };
10284
10285            let start = move || async {
10286                let op = self.send().await?;
10287                Ok(Operation::new(op))
10288            };
10289
10290            google_cloud_lro::internal::new_poller(
10291                polling_error_policy,
10292                polling_backoff_policy,
10293                start,
10294                query,
10295            )
10296        }
10297
10298        /// Sets the value of [parent][crate::model::CreateDataAssetRequest::parent].
10299        ///
10300        /// This is a **required** field for requests.
10301        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10302            self.0.request.parent = v.into();
10303            self
10304        }
10305
10306        /// Sets the value of [data_asset_id][crate::model::CreateDataAssetRequest::data_asset_id].
10307        pub fn set_data_asset_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
10308            self.0.request.data_asset_id = v.into();
10309            self
10310        }
10311
10312        /// Sets the value of [data_asset][crate::model::CreateDataAssetRequest::data_asset].
10313        ///
10314        /// This is a **required** field for requests.
10315        pub fn set_data_asset<T>(mut self, v: T) -> Self
10316        where
10317            T: std::convert::Into<crate::model::DataAsset>,
10318        {
10319            self.0.request.data_asset = std::option::Option::Some(v.into());
10320            self
10321        }
10322
10323        /// Sets or clears the value of [data_asset][crate::model::CreateDataAssetRequest::data_asset].
10324        ///
10325        /// This is a **required** field for requests.
10326        pub fn set_or_clear_data_asset<T>(mut self, v: std::option::Option<T>) -> Self
10327        where
10328            T: std::convert::Into<crate::model::DataAsset>,
10329        {
10330            self.0.request.data_asset = v.map(|x| x.into());
10331            self
10332        }
10333
10334        /// Sets the value of [validate_only][crate::model::CreateDataAssetRequest::validate_only].
10335        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10336            self.0.request.validate_only = v.into();
10337            self
10338        }
10339    }
10340
10341    #[doc(hidden)]
10342    impl crate::RequestBuilder for CreateDataAsset {
10343        fn request_options(&mut self) -> &mut crate::RequestOptions {
10344            &mut self.0.options
10345        }
10346    }
10347
10348    /// The request builder for [DataProductService::update_data_asset][crate::client::DataProductService::update_data_asset] calls.
10349    ///
10350    /// # Example
10351    /// ```
10352    /// # use google_cloud_dataplex_v1::builder::data_product_service::UpdateDataAsset;
10353    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10354    /// use google_cloud_lro::Poller;
10355    ///
10356    /// let builder = prepare_request_builder();
10357    /// let response = builder.poller().until_done().await?;
10358    /// # Ok(()) }
10359    ///
10360    /// fn prepare_request_builder() -> UpdateDataAsset {
10361    ///   # panic!();
10362    ///   // ... details omitted ...
10363    /// }
10364    /// ```
10365    #[derive(Clone, Debug)]
10366    pub struct UpdateDataAsset(RequestBuilder<crate::model::UpdateDataAssetRequest>);
10367
10368    impl UpdateDataAsset {
10369        pub(crate) fn new(
10370            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10371        ) -> Self {
10372            Self(RequestBuilder::new(stub))
10373        }
10374
10375        /// Sets the full request, replacing any prior values.
10376        pub fn with_request<V: Into<crate::model::UpdateDataAssetRequest>>(mut self, v: V) -> Self {
10377            self.0.request = v.into();
10378            self
10379        }
10380
10381        /// Sets all the options, replacing any prior values.
10382        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10383            self.0.options = v.into();
10384            self
10385        }
10386
10387        /// Sends the request.
10388        ///
10389        /// # Long running operations
10390        ///
10391        /// This starts, but does not poll, a longrunning operation. More information
10392        /// on [update_data_asset][crate::client::DataProductService::update_data_asset].
10393        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10394            (*self.0.stub)
10395                .update_data_asset(self.0.request, self.0.options)
10396                .await
10397                .map(crate::Response::into_body)
10398        }
10399
10400        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_asset`.
10401        pub fn poller(
10402            self,
10403        ) -> impl google_cloud_lro::Poller<crate::model::DataAsset, crate::model::OperationMetadata>
10404        {
10405            type Operation = google_cloud_lro::internal::Operation<
10406                crate::model::DataAsset,
10407                crate::model::OperationMetadata,
10408            >;
10409            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10410            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10411
10412            let stub = self.0.stub.clone();
10413            let mut options = self.0.options.clone();
10414            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10415            let query = move |name| {
10416                let stub = stub.clone();
10417                let options = options.clone();
10418                async {
10419                    let op = GetOperation::new(stub)
10420                        .set_name(name)
10421                        .with_options(options)
10422                        .send()
10423                        .await?;
10424                    Ok(Operation::new(op))
10425                }
10426            };
10427
10428            let start = move || async {
10429                let op = self.send().await?;
10430                Ok(Operation::new(op))
10431            };
10432
10433            google_cloud_lro::internal::new_poller(
10434                polling_error_policy,
10435                polling_backoff_policy,
10436                start,
10437                query,
10438            )
10439        }
10440
10441        /// Sets the value of [data_asset][crate::model::UpdateDataAssetRequest::data_asset].
10442        ///
10443        /// This is a **required** field for requests.
10444        pub fn set_data_asset<T>(mut self, v: T) -> Self
10445        where
10446            T: std::convert::Into<crate::model::DataAsset>,
10447        {
10448            self.0.request.data_asset = std::option::Option::Some(v.into());
10449            self
10450        }
10451
10452        /// Sets or clears the value of [data_asset][crate::model::UpdateDataAssetRequest::data_asset].
10453        ///
10454        /// This is a **required** field for requests.
10455        pub fn set_or_clear_data_asset<T>(mut self, v: std::option::Option<T>) -> Self
10456        where
10457            T: std::convert::Into<crate::model::DataAsset>,
10458        {
10459            self.0.request.data_asset = v.map(|x| x.into());
10460            self
10461        }
10462
10463        /// Sets the value of [update_mask][crate::model::UpdateDataAssetRequest::update_mask].
10464        pub fn set_update_mask<T>(mut self, v: T) -> Self
10465        where
10466            T: std::convert::Into<wkt::FieldMask>,
10467        {
10468            self.0.request.update_mask = std::option::Option::Some(v.into());
10469            self
10470        }
10471
10472        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAssetRequest::update_mask].
10473        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10474        where
10475            T: std::convert::Into<wkt::FieldMask>,
10476        {
10477            self.0.request.update_mask = v.map(|x| x.into());
10478            self
10479        }
10480
10481        /// Sets the value of [validate_only][crate::model::UpdateDataAssetRequest::validate_only].
10482        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10483            self.0.request.validate_only = v.into();
10484            self
10485        }
10486    }
10487
10488    #[doc(hidden)]
10489    impl crate::RequestBuilder for UpdateDataAsset {
10490        fn request_options(&mut self) -> &mut crate::RequestOptions {
10491            &mut self.0.options
10492        }
10493    }
10494
10495    /// The request builder for [DataProductService::delete_data_asset][crate::client::DataProductService::delete_data_asset] calls.
10496    ///
10497    /// # Example
10498    /// ```
10499    /// # use google_cloud_dataplex_v1::builder::data_product_service::DeleteDataAsset;
10500    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10501    /// use google_cloud_lro::Poller;
10502    ///
10503    /// let builder = prepare_request_builder();
10504    /// let response = builder.poller().until_done().await?;
10505    /// # Ok(()) }
10506    ///
10507    /// fn prepare_request_builder() -> DeleteDataAsset {
10508    ///   # panic!();
10509    ///   // ... details omitted ...
10510    /// }
10511    /// ```
10512    #[derive(Clone, Debug)]
10513    pub struct DeleteDataAsset(RequestBuilder<crate::model::DeleteDataAssetRequest>);
10514
10515    impl DeleteDataAsset {
10516        pub(crate) fn new(
10517            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10518        ) -> Self {
10519            Self(RequestBuilder::new(stub))
10520        }
10521
10522        /// Sets the full request, replacing any prior values.
10523        pub fn with_request<V: Into<crate::model::DeleteDataAssetRequest>>(mut self, v: V) -> Self {
10524            self.0.request = v.into();
10525            self
10526        }
10527
10528        /// Sets all the options, replacing any prior values.
10529        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10530            self.0.options = v.into();
10531            self
10532        }
10533
10534        /// Sends the request.
10535        ///
10536        /// # Long running operations
10537        ///
10538        /// This starts, but does not poll, a longrunning operation. More information
10539        /// on [delete_data_asset][crate::client::DataProductService::delete_data_asset].
10540        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10541            (*self.0.stub)
10542                .delete_data_asset(self.0.request, self.0.options)
10543                .await
10544                .map(crate::Response::into_body)
10545        }
10546
10547        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_asset`.
10548        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
10549            type Operation =
10550                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
10551            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10552            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10553
10554            let stub = self.0.stub.clone();
10555            let mut options = self.0.options.clone();
10556            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10557            let query = move |name| {
10558                let stub = stub.clone();
10559                let options = options.clone();
10560                async {
10561                    let op = GetOperation::new(stub)
10562                        .set_name(name)
10563                        .with_options(options)
10564                        .send()
10565                        .await?;
10566                    Ok(Operation::new(op))
10567                }
10568            };
10569
10570            let start = move || async {
10571                let op = self.send().await?;
10572                Ok(Operation::new(op))
10573            };
10574
10575            google_cloud_lro::internal::new_unit_response_poller(
10576                polling_error_policy,
10577                polling_backoff_policy,
10578                start,
10579                query,
10580            )
10581        }
10582
10583        /// Sets the value of [name][crate::model::DeleteDataAssetRequest::name].
10584        ///
10585        /// This is a **required** field for requests.
10586        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10587            self.0.request.name = v.into();
10588            self
10589        }
10590
10591        /// Sets the value of [etag][crate::model::DeleteDataAssetRequest::etag].
10592        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
10593            self.0.request.etag = v.into();
10594            self
10595        }
10596
10597        /// Sets the value of [validate_only][crate::model::DeleteDataAssetRequest::validate_only].
10598        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10599            self.0.request.validate_only = v.into();
10600            self
10601        }
10602    }
10603
10604    #[doc(hidden)]
10605    impl crate::RequestBuilder for DeleteDataAsset {
10606        fn request_options(&mut self) -> &mut crate::RequestOptions {
10607            &mut self.0.options
10608        }
10609    }
10610
10611    /// The request builder for [DataProductService::get_data_asset][crate::client::DataProductService::get_data_asset] calls.
10612    ///
10613    /// # Example
10614    /// ```
10615    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetDataAsset;
10616    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10617    ///
10618    /// let builder = prepare_request_builder();
10619    /// let response = builder.send().await?;
10620    /// # Ok(()) }
10621    ///
10622    /// fn prepare_request_builder() -> GetDataAsset {
10623    ///   # panic!();
10624    ///   // ... details omitted ...
10625    /// }
10626    /// ```
10627    #[derive(Clone, Debug)]
10628    pub struct GetDataAsset(RequestBuilder<crate::model::GetDataAssetRequest>);
10629
10630    impl GetDataAsset {
10631        pub(crate) fn new(
10632            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10633        ) -> Self {
10634            Self(RequestBuilder::new(stub))
10635        }
10636
10637        /// Sets the full request, replacing any prior values.
10638        pub fn with_request<V: Into<crate::model::GetDataAssetRequest>>(mut self, v: V) -> Self {
10639            self.0.request = v.into();
10640            self
10641        }
10642
10643        /// Sets all the options, replacing any prior values.
10644        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10645            self.0.options = v.into();
10646            self
10647        }
10648
10649        /// Sends the request.
10650        pub async fn send(self) -> Result<crate::model::DataAsset> {
10651            (*self.0.stub)
10652                .get_data_asset(self.0.request, self.0.options)
10653                .await
10654                .map(crate::Response::into_body)
10655        }
10656
10657        /// Sets the value of [name][crate::model::GetDataAssetRequest::name].
10658        ///
10659        /// This is a **required** field for requests.
10660        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10661            self.0.request.name = v.into();
10662            self
10663        }
10664    }
10665
10666    #[doc(hidden)]
10667    impl crate::RequestBuilder for GetDataAsset {
10668        fn request_options(&mut self) -> &mut crate::RequestOptions {
10669            &mut self.0.options
10670        }
10671    }
10672
10673    /// The request builder for [DataProductService::list_data_assets][crate::client::DataProductService::list_data_assets] calls.
10674    ///
10675    /// # Example
10676    /// ```
10677    /// # use google_cloud_dataplex_v1::builder::data_product_service::ListDataAssets;
10678    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10679    /// use google_cloud_gax::paginator::ItemPaginator;
10680    ///
10681    /// let builder = prepare_request_builder();
10682    /// let mut items = builder.by_item();
10683    /// while let Some(result) = items.next().await {
10684    ///   let item = result?;
10685    /// }
10686    /// # Ok(()) }
10687    ///
10688    /// fn prepare_request_builder() -> ListDataAssets {
10689    ///   # panic!();
10690    ///   // ... details omitted ...
10691    /// }
10692    /// ```
10693    #[derive(Clone, Debug)]
10694    pub struct ListDataAssets(RequestBuilder<crate::model::ListDataAssetsRequest>);
10695
10696    impl ListDataAssets {
10697        pub(crate) fn new(
10698            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10699        ) -> Self {
10700            Self(RequestBuilder::new(stub))
10701        }
10702
10703        /// Sets the full request, replacing any prior values.
10704        pub fn with_request<V: Into<crate::model::ListDataAssetsRequest>>(mut self, v: V) -> Self {
10705            self.0.request = v.into();
10706            self
10707        }
10708
10709        /// Sets all the options, replacing any prior values.
10710        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10711            self.0.options = v.into();
10712            self
10713        }
10714
10715        /// Sends the request.
10716        pub async fn send(self) -> Result<crate::model::ListDataAssetsResponse> {
10717            (*self.0.stub)
10718                .list_data_assets(self.0.request, self.0.options)
10719                .await
10720                .map(crate::Response::into_body)
10721        }
10722
10723        /// Streams each page in the collection.
10724        pub fn by_page(
10725            self,
10726        ) -> impl google_cloud_gax::paginator::Paginator<
10727            crate::model::ListDataAssetsResponse,
10728            crate::Error,
10729        > {
10730            use std::clone::Clone;
10731            let token = self.0.request.page_token.clone();
10732            let execute = move |token: String| {
10733                let mut builder = self.clone();
10734                builder.0.request = builder.0.request.set_page_token(token);
10735                builder.send()
10736            };
10737            google_cloud_gax::paginator::internal::new_paginator(token, execute)
10738        }
10739
10740        /// Streams each item in the collection.
10741        pub fn by_item(
10742            self,
10743        ) -> impl google_cloud_gax::paginator::ItemPaginator<
10744            crate::model::ListDataAssetsResponse,
10745            crate::Error,
10746        > {
10747            use google_cloud_gax::paginator::Paginator;
10748            self.by_page().items()
10749        }
10750
10751        /// Sets the value of [parent][crate::model::ListDataAssetsRequest::parent].
10752        ///
10753        /// This is a **required** field for requests.
10754        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10755            self.0.request.parent = v.into();
10756            self
10757        }
10758
10759        /// Sets the value of [filter][crate::model::ListDataAssetsRequest::filter].
10760        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10761            self.0.request.filter = v.into();
10762            self
10763        }
10764
10765        /// Sets the value of [order_by][crate::model::ListDataAssetsRequest::order_by].
10766        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
10767            self.0.request.order_by = v.into();
10768            self
10769        }
10770
10771        /// Sets the value of [page_size][crate::model::ListDataAssetsRequest::page_size].
10772        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10773            self.0.request.page_size = v.into();
10774            self
10775        }
10776
10777        /// Sets the value of [page_token][crate::model::ListDataAssetsRequest::page_token].
10778        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10779            self.0.request.page_token = v.into();
10780            self
10781        }
10782    }
10783
10784    #[doc(hidden)]
10785    impl crate::RequestBuilder for ListDataAssets {
10786        fn request_options(&mut self) -> &mut crate::RequestOptions {
10787            &mut self.0.options
10788        }
10789    }
10790
10791    /// The request builder for [DataProductService::list_locations][crate::client::DataProductService::list_locations] calls.
10792    ///
10793    /// # Example
10794    /// ```
10795    /// # use google_cloud_dataplex_v1::builder::data_product_service::ListLocations;
10796    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10797    /// use google_cloud_gax::paginator::ItemPaginator;
10798    ///
10799    /// let builder = prepare_request_builder();
10800    /// let mut items = builder.by_item();
10801    /// while let Some(result) = items.next().await {
10802    ///   let item = result?;
10803    /// }
10804    /// # Ok(()) }
10805    ///
10806    /// fn prepare_request_builder() -> ListLocations {
10807    ///   # panic!();
10808    ///   // ... details omitted ...
10809    /// }
10810    /// ```
10811    #[derive(Clone, Debug)]
10812    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
10813
10814    impl ListLocations {
10815        pub(crate) fn new(
10816            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10817        ) -> Self {
10818            Self(RequestBuilder::new(stub))
10819        }
10820
10821        /// Sets the full request, replacing any prior values.
10822        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
10823            mut self,
10824            v: V,
10825        ) -> Self {
10826            self.0.request = v.into();
10827            self
10828        }
10829
10830        /// Sets all the options, replacing any prior values.
10831        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10832            self.0.options = v.into();
10833            self
10834        }
10835
10836        /// Sends the request.
10837        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
10838            (*self.0.stub)
10839                .list_locations(self.0.request, self.0.options)
10840                .await
10841                .map(crate::Response::into_body)
10842        }
10843
10844        /// Streams each page in the collection.
10845        pub fn by_page(
10846            self,
10847        ) -> impl google_cloud_gax::paginator::Paginator<
10848            google_cloud_location::model::ListLocationsResponse,
10849            crate::Error,
10850        > {
10851            use std::clone::Clone;
10852            let token = self.0.request.page_token.clone();
10853            let execute = move |token: String| {
10854                let mut builder = self.clone();
10855                builder.0.request = builder.0.request.set_page_token(token);
10856                builder.send()
10857            };
10858            google_cloud_gax::paginator::internal::new_paginator(token, execute)
10859        }
10860
10861        /// Streams each item in the collection.
10862        pub fn by_item(
10863            self,
10864        ) -> impl google_cloud_gax::paginator::ItemPaginator<
10865            google_cloud_location::model::ListLocationsResponse,
10866            crate::Error,
10867        > {
10868            use google_cloud_gax::paginator::Paginator;
10869            self.by_page().items()
10870        }
10871
10872        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
10873        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10874            self.0.request.name = v.into();
10875            self
10876        }
10877
10878        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
10879        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10880            self.0.request.filter = v.into();
10881            self
10882        }
10883
10884        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
10885        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10886            self.0.request.page_size = v.into();
10887            self
10888        }
10889
10890        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
10891        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10892            self.0.request.page_token = v.into();
10893            self
10894        }
10895    }
10896
10897    #[doc(hidden)]
10898    impl crate::RequestBuilder for ListLocations {
10899        fn request_options(&mut self) -> &mut crate::RequestOptions {
10900            &mut self.0.options
10901        }
10902    }
10903
10904    /// The request builder for [DataProductService::get_location][crate::client::DataProductService::get_location] calls.
10905    ///
10906    /// # Example
10907    /// ```
10908    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetLocation;
10909    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10910    ///
10911    /// let builder = prepare_request_builder();
10912    /// let response = builder.send().await?;
10913    /// # Ok(()) }
10914    ///
10915    /// fn prepare_request_builder() -> GetLocation {
10916    ///   # panic!();
10917    ///   // ... details omitted ...
10918    /// }
10919    /// ```
10920    #[derive(Clone, Debug)]
10921    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
10922
10923    impl GetLocation {
10924        pub(crate) fn new(
10925            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10926        ) -> Self {
10927            Self(RequestBuilder::new(stub))
10928        }
10929
10930        /// Sets the full request, replacing any prior values.
10931        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
10932            mut self,
10933            v: V,
10934        ) -> Self {
10935            self.0.request = v.into();
10936            self
10937        }
10938
10939        /// Sets all the options, replacing any prior values.
10940        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10941            self.0.options = v.into();
10942            self
10943        }
10944
10945        /// Sends the request.
10946        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
10947            (*self.0.stub)
10948                .get_location(self.0.request, self.0.options)
10949                .await
10950                .map(crate::Response::into_body)
10951        }
10952
10953        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
10954        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10955            self.0.request.name = v.into();
10956            self
10957        }
10958    }
10959
10960    #[doc(hidden)]
10961    impl crate::RequestBuilder for GetLocation {
10962        fn request_options(&mut self) -> &mut crate::RequestOptions {
10963            &mut self.0.options
10964        }
10965    }
10966
10967    /// The request builder for [DataProductService::set_iam_policy][crate::client::DataProductService::set_iam_policy] calls.
10968    ///
10969    /// # Example
10970    /// ```
10971    /// # use google_cloud_dataplex_v1::builder::data_product_service::SetIamPolicy;
10972    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10973    ///
10974    /// let builder = prepare_request_builder();
10975    /// let response = builder.send().await?;
10976    /// # Ok(()) }
10977    ///
10978    /// fn prepare_request_builder() -> SetIamPolicy {
10979    ///   # panic!();
10980    ///   // ... details omitted ...
10981    /// }
10982    /// ```
10983    #[derive(Clone, Debug)]
10984    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
10985
10986    impl SetIamPolicy {
10987        pub(crate) fn new(
10988            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10989        ) -> Self {
10990            Self(RequestBuilder::new(stub))
10991        }
10992
10993        /// Sets the full request, replacing any prior values.
10994        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
10995            mut self,
10996            v: V,
10997        ) -> Self {
10998            self.0.request = v.into();
10999            self
11000        }
11001
11002        /// Sets all the options, replacing any prior values.
11003        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11004            self.0.options = v.into();
11005            self
11006        }
11007
11008        /// Sends the request.
11009        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
11010            (*self.0.stub)
11011                .set_iam_policy(self.0.request, self.0.options)
11012                .await
11013                .map(crate::Response::into_body)
11014        }
11015
11016        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
11017        ///
11018        /// This is a **required** field for requests.
11019        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
11020            self.0.request.resource = v.into();
11021            self
11022        }
11023
11024        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
11025        ///
11026        /// This is a **required** field for requests.
11027        pub fn set_policy<T>(mut self, v: T) -> Self
11028        where
11029            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
11030        {
11031            self.0.request.policy = std::option::Option::Some(v.into());
11032            self
11033        }
11034
11035        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
11036        ///
11037        /// This is a **required** field for requests.
11038        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
11039        where
11040            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
11041        {
11042            self.0.request.policy = v.map(|x| x.into());
11043            self
11044        }
11045
11046        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
11047        pub fn set_update_mask<T>(mut self, v: T) -> Self
11048        where
11049            T: std::convert::Into<wkt::FieldMask>,
11050        {
11051            self.0.request.update_mask = std::option::Option::Some(v.into());
11052            self
11053        }
11054
11055        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
11056        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
11057        where
11058            T: std::convert::Into<wkt::FieldMask>,
11059        {
11060            self.0.request.update_mask = v.map(|x| x.into());
11061            self
11062        }
11063    }
11064
11065    #[doc(hidden)]
11066    impl crate::RequestBuilder for SetIamPolicy {
11067        fn request_options(&mut self) -> &mut crate::RequestOptions {
11068            &mut self.0.options
11069        }
11070    }
11071
11072    /// The request builder for [DataProductService::get_iam_policy][crate::client::DataProductService::get_iam_policy] calls.
11073    ///
11074    /// # Example
11075    /// ```
11076    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetIamPolicy;
11077    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11078    ///
11079    /// let builder = prepare_request_builder();
11080    /// let response = builder.send().await?;
11081    /// # Ok(()) }
11082    ///
11083    /// fn prepare_request_builder() -> GetIamPolicy {
11084    ///   # panic!();
11085    ///   // ... details omitted ...
11086    /// }
11087    /// ```
11088    #[derive(Clone, Debug)]
11089    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
11090
11091    impl GetIamPolicy {
11092        pub(crate) fn new(
11093            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11094        ) -> Self {
11095            Self(RequestBuilder::new(stub))
11096        }
11097
11098        /// Sets the full request, replacing any prior values.
11099        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
11100            mut self,
11101            v: V,
11102        ) -> Self {
11103            self.0.request = v.into();
11104            self
11105        }
11106
11107        /// Sets all the options, replacing any prior values.
11108        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11109            self.0.options = v.into();
11110            self
11111        }
11112
11113        /// Sends the request.
11114        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
11115            (*self.0.stub)
11116                .get_iam_policy(self.0.request, self.0.options)
11117                .await
11118                .map(crate::Response::into_body)
11119        }
11120
11121        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
11122        ///
11123        /// This is a **required** field for requests.
11124        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
11125            self.0.request.resource = v.into();
11126            self
11127        }
11128
11129        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
11130        pub fn set_options<T>(mut self, v: T) -> Self
11131        where
11132            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
11133        {
11134            self.0.request.options = std::option::Option::Some(v.into());
11135            self
11136        }
11137
11138        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
11139        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
11140        where
11141            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
11142        {
11143            self.0.request.options = v.map(|x| x.into());
11144            self
11145        }
11146    }
11147
11148    #[doc(hidden)]
11149    impl crate::RequestBuilder for GetIamPolicy {
11150        fn request_options(&mut self) -> &mut crate::RequestOptions {
11151            &mut self.0.options
11152        }
11153    }
11154
11155    /// The request builder for [DataProductService::test_iam_permissions][crate::client::DataProductService::test_iam_permissions] calls.
11156    ///
11157    /// # Example
11158    /// ```
11159    /// # use google_cloud_dataplex_v1::builder::data_product_service::TestIamPermissions;
11160    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11161    ///
11162    /// let builder = prepare_request_builder();
11163    /// let response = builder.send().await?;
11164    /// # Ok(()) }
11165    ///
11166    /// fn prepare_request_builder() -> TestIamPermissions {
11167    ///   # panic!();
11168    ///   // ... details omitted ...
11169    /// }
11170    /// ```
11171    #[derive(Clone, Debug)]
11172    pub struct TestIamPermissions(
11173        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
11174    );
11175
11176    impl TestIamPermissions {
11177        pub(crate) fn new(
11178            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11179        ) -> Self {
11180            Self(RequestBuilder::new(stub))
11181        }
11182
11183        /// Sets the full request, replacing any prior values.
11184        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
11185            mut self,
11186            v: V,
11187        ) -> Self {
11188            self.0.request = v.into();
11189            self
11190        }
11191
11192        /// Sets all the options, replacing any prior values.
11193        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11194            self.0.options = v.into();
11195            self
11196        }
11197
11198        /// Sends the request.
11199        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
11200            (*self.0.stub)
11201                .test_iam_permissions(self.0.request, self.0.options)
11202                .await
11203                .map(crate::Response::into_body)
11204        }
11205
11206        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
11207        ///
11208        /// This is a **required** field for requests.
11209        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
11210            self.0.request.resource = v.into();
11211            self
11212        }
11213
11214        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
11215        ///
11216        /// This is a **required** field for requests.
11217        pub fn set_permissions<T, V>(mut self, v: T) -> Self
11218        where
11219            T: std::iter::IntoIterator<Item = V>,
11220            V: std::convert::Into<std::string::String>,
11221        {
11222            use std::iter::Iterator;
11223            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
11224            self
11225        }
11226    }
11227
11228    #[doc(hidden)]
11229    impl crate::RequestBuilder for TestIamPermissions {
11230        fn request_options(&mut self) -> &mut crate::RequestOptions {
11231            &mut self.0.options
11232        }
11233    }
11234
11235    /// The request builder for [DataProductService::list_operations][crate::client::DataProductService::list_operations] calls.
11236    ///
11237    /// # Example
11238    /// ```
11239    /// # use google_cloud_dataplex_v1::builder::data_product_service::ListOperations;
11240    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11241    /// use google_cloud_gax::paginator::ItemPaginator;
11242    ///
11243    /// let builder = prepare_request_builder();
11244    /// let mut items = builder.by_item();
11245    /// while let Some(result) = items.next().await {
11246    ///   let item = result?;
11247    /// }
11248    /// # Ok(()) }
11249    ///
11250    /// fn prepare_request_builder() -> ListOperations {
11251    ///   # panic!();
11252    ///   // ... details omitted ...
11253    /// }
11254    /// ```
11255    #[derive(Clone, Debug)]
11256    pub struct ListOperations(
11257        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
11258    );
11259
11260    impl ListOperations {
11261        pub(crate) fn new(
11262            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11263        ) -> Self {
11264            Self(RequestBuilder::new(stub))
11265        }
11266
11267        /// Sets the full request, replacing any prior values.
11268        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
11269            mut self,
11270            v: V,
11271        ) -> Self {
11272            self.0.request = v.into();
11273            self
11274        }
11275
11276        /// Sets all the options, replacing any prior values.
11277        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11278            self.0.options = v.into();
11279            self
11280        }
11281
11282        /// Sends the request.
11283        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
11284            (*self.0.stub)
11285                .list_operations(self.0.request, self.0.options)
11286                .await
11287                .map(crate::Response::into_body)
11288        }
11289
11290        /// Streams each page in the collection.
11291        pub fn by_page(
11292            self,
11293        ) -> impl google_cloud_gax::paginator::Paginator<
11294            google_cloud_longrunning::model::ListOperationsResponse,
11295            crate::Error,
11296        > {
11297            use std::clone::Clone;
11298            let token = self.0.request.page_token.clone();
11299            let execute = move |token: String| {
11300                let mut builder = self.clone();
11301                builder.0.request = builder.0.request.set_page_token(token);
11302                builder.send()
11303            };
11304            google_cloud_gax::paginator::internal::new_paginator(token, execute)
11305        }
11306
11307        /// Streams each item in the collection.
11308        pub fn by_item(
11309            self,
11310        ) -> impl google_cloud_gax::paginator::ItemPaginator<
11311            google_cloud_longrunning::model::ListOperationsResponse,
11312            crate::Error,
11313        > {
11314            use google_cloud_gax::paginator::Paginator;
11315            self.by_page().items()
11316        }
11317
11318        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
11319        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11320            self.0.request.name = v.into();
11321            self
11322        }
11323
11324        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
11325        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
11326            self.0.request.filter = v.into();
11327            self
11328        }
11329
11330        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
11331        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
11332            self.0.request.page_size = v.into();
11333            self
11334        }
11335
11336        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
11337        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
11338            self.0.request.page_token = v.into();
11339            self
11340        }
11341
11342        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
11343        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
11344            self.0.request.return_partial_success = v.into();
11345            self
11346        }
11347    }
11348
11349    #[doc(hidden)]
11350    impl crate::RequestBuilder for ListOperations {
11351        fn request_options(&mut self) -> &mut crate::RequestOptions {
11352            &mut self.0.options
11353        }
11354    }
11355
11356    /// The request builder for [DataProductService::get_operation][crate::client::DataProductService::get_operation] calls.
11357    ///
11358    /// # Example
11359    /// ```
11360    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetOperation;
11361    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11362    ///
11363    /// let builder = prepare_request_builder();
11364    /// let response = builder.send().await?;
11365    /// # Ok(()) }
11366    ///
11367    /// fn prepare_request_builder() -> GetOperation {
11368    ///   # panic!();
11369    ///   // ... details omitted ...
11370    /// }
11371    /// ```
11372    #[derive(Clone, Debug)]
11373    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
11374
11375    impl GetOperation {
11376        pub(crate) fn new(
11377            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11378        ) -> Self {
11379            Self(RequestBuilder::new(stub))
11380        }
11381
11382        /// Sets the full request, replacing any prior values.
11383        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
11384            mut self,
11385            v: V,
11386        ) -> Self {
11387            self.0.request = v.into();
11388            self
11389        }
11390
11391        /// Sets all the options, replacing any prior values.
11392        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11393            self.0.options = v.into();
11394            self
11395        }
11396
11397        /// Sends the request.
11398        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11399            (*self.0.stub)
11400                .get_operation(self.0.request, self.0.options)
11401                .await
11402                .map(crate::Response::into_body)
11403        }
11404
11405        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
11406        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11407            self.0.request.name = v.into();
11408            self
11409        }
11410    }
11411
11412    #[doc(hidden)]
11413    impl crate::RequestBuilder for GetOperation {
11414        fn request_options(&mut self) -> &mut crate::RequestOptions {
11415            &mut self.0.options
11416        }
11417    }
11418
11419    /// The request builder for [DataProductService::delete_operation][crate::client::DataProductService::delete_operation] calls.
11420    ///
11421    /// # Example
11422    /// ```
11423    /// # use google_cloud_dataplex_v1::builder::data_product_service::DeleteOperation;
11424    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11425    ///
11426    /// let builder = prepare_request_builder();
11427    /// let response = builder.send().await?;
11428    /// # Ok(()) }
11429    ///
11430    /// fn prepare_request_builder() -> DeleteOperation {
11431    ///   # panic!();
11432    ///   // ... details omitted ...
11433    /// }
11434    /// ```
11435    #[derive(Clone, Debug)]
11436    pub struct DeleteOperation(
11437        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
11438    );
11439
11440    impl DeleteOperation {
11441        pub(crate) fn new(
11442            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11443        ) -> Self {
11444            Self(RequestBuilder::new(stub))
11445        }
11446
11447        /// Sets the full request, replacing any prior values.
11448        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
11449            mut self,
11450            v: V,
11451        ) -> Self {
11452            self.0.request = v.into();
11453            self
11454        }
11455
11456        /// Sets all the options, replacing any prior values.
11457        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11458            self.0.options = v.into();
11459            self
11460        }
11461
11462        /// Sends the request.
11463        pub async fn send(self) -> Result<()> {
11464            (*self.0.stub)
11465                .delete_operation(self.0.request, self.0.options)
11466                .await
11467                .map(crate::Response::into_body)
11468        }
11469
11470        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
11471        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11472            self.0.request.name = v.into();
11473            self
11474        }
11475    }
11476
11477    #[doc(hidden)]
11478    impl crate::RequestBuilder for DeleteOperation {
11479        fn request_options(&mut self) -> &mut crate::RequestOptions {
11480            &mut self.0.options
11481        }
11482    }
11483
11484    /// The request builder for [DataProductService::cancel_operation][crate::client::DataProductService::cancel_operation] calls.
11485    ///
11486    /// # Example
11487    /// ```
11488    /// # use google_cloud_dataplex_v1::builder::data_product_service::CancelOperation;
11489    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11490    ///
11491    /// let builder = prepare_request_builder();
11492    /// let response = builder.send().await?;
11493    /// # Ok(()) }
11494    ///
11495    /// fn prepare_request_builder() -> CancelOperation {
11496    ///   # panic!();
11497    ///   // ... details omitted ...
11498    /// }
11499    /// ```
11500    #[derive(Clone, Debug)]
11501    pub struct CancelOperation(
11502        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
11503    );
11504
11505    impl CancelOperation {
11506        pub(crate) fn new(
11507            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11508        ) -> Self {
11509            Self(RequestBuilder::new(stub))
11510        }
11511
11512        /// Sets the full request, replacing any prior values.
11513        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
11514            mut self,
11515            v: V,
11516        ) -> Self {
11517            self.0.request = v.into();
11518            self
11519        }
11520
11521        /// Sets all the options, replacing any prior values.
11522        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11523            self.0.options = v.into();
11524            self
11525        }
11526
11527        /// Sends the request.
11528        pub async fn send(self) -> Result<()> {
11529            (*self.0.stub)
11530                .cancel_operation(self.0.request, self.0.options)
11531                .await
11532                .map(crate::Response::into_body)
11533        }
11534
11535        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
11536        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11537            self.0.request.name = v.into();
11538            self
11539        }
11540    }
11541
11542    #[doc(hidden)]
11543    impl crate::RequestBuilder for CancelOperation {
11544        fn request_options(&mut self) -> &mut crate::RequestOptions {
11545            &mut self.0.options
11546        }
11547    }
11548}
11549
11550/// Request and client builders for [DataTaxonomyService][crate::client::DataTaxonomyService].
11551pub mod data_taxonomy_service {
11552    use crate::Result;
11553
11554    /// A builder for [DataTaxonomyService][crate::client::DataTaxonomyService].
11555    ///
11556    /// ```
11557    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
11558    /// # use google_cloud_dataplex_v1::*;
11559    /// # use builder::data_taxonomy_service::ClientBuilder;
11560    /// # use client::DataTaxonomyService;
11561    /// let builder : ClientBuilder = DataTaxonomyService::builder();
11562    /// let client = builder
11563    ///     .with_endpoint("https://dataplex.googleapis.com")
11564    ///     .build().await?;
11565    /// # Ok(()) }
11566    /// ```
11567    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
11568
11569    pub(crate) mod client {
11570        use super::super::super::client::DataTaxonomyService;
11571        pub struct Factory;
11572        impl crate::ClientFactory for Factory {
11573            type Client = DataTaxonomyService;
11574            type Credentials = gaxi::options::Credentials;
11575            async fn build(
11576                self,
11577                config: gaxi::options::ClientConfig,
11578            ) -> crate::ClientBuilderResult<Self::Client> {
11579                Self::Client::new(config).await
11580            }
11581        }
11582    }
11583
11584    /// Common implementation for [crate::client::DataTaxonomyService] request builders.
11585    #[derive(Clone, Debug)]
11586    pub(crate) struct RequestBuilder<R: std::default::Default> {
11587        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11588        request: R,
11589        options: crate::RequestOptions,
11590    }
11591
11592    impl<R> RequestBuilder<R>
11593    where
11594        R: std::default::Default,
11595    {
11596        pub(crate) fn new(
11597            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11598        ) -> Self {
11599            Self {
11600                stub,
11601                request: R::default(),
11602                options: crate::RequestOptions::default(),
11603            }
11604        }
11605    }
11606
11607    /// The request builder for [DataTaxonomyService::create_data_taxonomy][crate::client::DataTaxonomyService::create_data_taxonomy] calls.
11608    ///
11609    /// # Example
11610    /// ```
11611    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CreateDataTaxonomy;
11612    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11613    /// use google_cloud_lro::Poller;
11614    ///
11615    /// let builder = prepare_request_builder();
11616    /// let response = builder.poller().until_done().await?;
11617    /// # Ok(()) }
11618    ///
11619    /// fn prepare_request_builder() -> CreateDataTaxonomy {
11620    ///   # panic!();
11621    ///   // ... details omitted ...
11622    /// }
11623    /// ```
11624    #[derive(Clone, Debug)]
11625    pub struct CreateDataTaxonomy(RequestBuilder<crate::model::CreateDataTaxonomyRequest>);
11626
11627    impl CreateDataTaxonomy {
11628        pub(crate) fn new(
11629            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11630        ) -> Self {
11631            Self(RequestBuilder::new(stub))
11632        }
11633
11634        /// Sets the full request, replacing any prior values.
11635        pub fn with_request<V: Into<crate::model::CreateDataTaxonomyRequest>>(
11636            mut self,
11637            v: V,
11638        ) -> Self {
11639            self.0.request = v.into();
11640            self
11641        }
11642
11643        /// Sets all the options, replacing any prior values.
11644        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11645            self.0.options = v.into();
11646            self
11647        }
11648
11649        /// Sends the request.
11650        ///
11651        /// # Long running operations
11652        ///
11653        /// This starts, but does not poll, a longrunning operation. More information
11654        /// on [create_data_taxonomy][crate::client::DataTaxonomyService::create_data_taxonomy].
11655        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11656            (*self.0.stub)
11657                .create_data_taxonomy(self.0.request, self.0.options)
11658                .await
11659                .map(crate::Response::into_body)
11660        }
11661
11662        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_taxonomy`.
11663        pub fn poller(
11664            self,
11665        ) -> impl google_cloud_lro::Poller<crate::model::DataTaxonomy, crate::model::OperationMetadata>
11666        {
11667            type Operation = google_cloud_lro::internal::Operation<
11668                crate::model::DataTaxonomy,
11669                crate::model::OperationMetadata,
11670            >;
11671            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11672            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11673
11674            let stub = self.0.stub.clone();
11675            let mut options = self.0.options.clone();
11676            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
11677            let query = move |name| {
11678                let stub = stub.clone();
11679                let options = options.clone();
11680                async {
11681                    let op = GetOperation::new(stub)
11682                        .set_name(name)
11683                        .with_options(options)
11684                        .send()
11685                        .await?;
11686                    Ok(Operation::new(op))
11687                }
11688            };
11689
11690            let start = move || async {
11691                let op = self.send().await?;
11692                Ok(Operation::new(op))
11693            };
11694
11695            google_cloud_lro::internal::new_poller(
11696                polling_error_policy,
11697                polling_backoff_policy,
11698                start,
11699                query,
11700            )
11701        }
11702
11703        /// Sets the value of [parent][crate::model::CreateDataTaxonomyRequest::parent].
11704        ///
11705        /// This is a **required** field for requests.
11706        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
11707            self.0.request.parent = v.into();
11708            self
11709        }
11710
11711        /// Sets the value of [data_taxonomy_id][crate::model::CreateDataTaxonomyRequest::data_taxonomy_id].
11712        ///
11713        /// This is a **required** field for requests.
11714        pub fn set_data_taxonomy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
11715            self.0.request.data_taxonomy_id = v.into();
11716            self
11717        }
11718
11719        /// Sets the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
11720        ///
11721        /// This is a **required** field for requests.
11722        pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
11723        where
11724            T: std::convert::Into<crate::model::DataTaxonomy>,
11725        {
11726            self.0.request.data_taxonomy = std::option::Option::Some(v.into());
11727            self
11728        }
11729
11730        /// Sets or clears the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
11731        ///
11732        /// This is a **required** field for requests.
11733        pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
11734        where
11735            T: std::convert::Into<crate::model::DataTaxonomy>,
11736        {
11737            self.0.request.data_taxonomy = v.map(|x| x.into());
11738            self
11739        }
11740
11741        /// Sets the value of [validate_only][crate::model::CreateDataTaxonomyRequest::validate_only].
11742        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
11743            self.0.request.validate_only = v.into();
11744            self
11745        }
11746    }
11747
11748    #[doc(hidden)]
11749    impl crate::RequestBuilder for CreateDataTaxonomy {
11750        fn request_options(&mut self) -> &mut crate::RequestOptions {
11751            &mut self.0.options
11752        }
11753    }
11754
11755    /// The request builder for [DataTaxonomyService::update_data_taxonomy][crate::client::DataTaxonomyService::update_data_taxonomy] calls.
11756    ///
11757    /// # Example
11758    /// ```
11759    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::UpdateDataTaxonomy;
11760    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11761    /// use google_cloud_lro::Poller;
11762    ///
11763    /// let builder = prepare_request_builder();
11764    /// let response = builder.poller().until_done().await?;
11765    /// # Ok(()) }
11766    ///
11767    /// fn prepare_request_builder() -> UpdateDataTaxonomy {
11768    ///   # panic!();
11769    ///   // ... details omitted ...
11770    /// }
11771    /// ```
11772    #[derive(Clone, Debug)]
11773    pub struct UpdateDataTaxonomy(RequestBuilder<crate::model::UpdateDataTaxonomyRequest>);
11774
11775    impl UpdateDataTaxonomy {
11776        pub(crate) fn new(
11777            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11778        ) -> Self {
11779            Self(RequestBuilder::new(stub))
11780        }
11781
11782        /// Sets the full request, replacing any prior values.
11783        pub fn with_request<V: Into<crate::model::UpdateDataTaxonomyRequest>>(
11784            mut self,
11785            v: V,
11786        ) -> Self {
11787            self.0.request = v.into();
11788            self
11789        }
11790
11791        /// Sets all the options, replacing any prior values.
11792        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11793            self.0.options = v.into();
11794            self
11795        }
11796
11797        /// Sends the request.
11798        ///
11799        /// # Long running operations
11800        ///
11801        /// This starts, but does not poll, a longrunning operation. More information
11802        /// on [update_data_taxonomy][crate::client::DataTaxonomyService::update_data_taxonomy].
11803        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11804            (*self.0.stub)
11805                .update_data_taxonomy(self.0.request, self.0.options)
11806                .await
11807                .map(crate::Response::into_body)
11808        }
11809
11810        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_taxonomy`.
11811        pub fn poller(
11812            self,
11813        ) -> impl google_cloud_lro::Poller<crate::model::DataTaxonomy, crate::model::OperationMetadata>
11814        {
11815            type Operation = google_cloud_lro::internal::Operation<
11816                crate::model::DataTaxonomy,
11817                crate::model::OperationMetadata,
11818            >;
11819            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11820            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11821
11822            let stub = self.0.stub.clone();
11823            let mut options = self.0.options.clone();
11824            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
11825            let query = move |name| {
11826                let stub = stub.clone();
11827                let options = options.clone();
11828                async {
11829                    let op = GetOperation::new(stub)
11830                        .set_name(name)
11831                        .with_options(options)
11832                        .send()
11833                        .await?;
11834                    Ok(Operation::new(op))
11835                }
11836            };
11837
11838            let start = move || async {
11839                let op = self.send().await?;
11840                Ok(Operation::new(op))
11841            };
11842
11843            google_cloud_lro::internal::new_poller(
11844                polling_error_policy,
11845                polling_backoff_policy,
11846                start,
11847                query,
11848            )
11849        }
11850
11851        /// Sets the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
11852        ///
11853        /// This is a **required** field for requests.
11854        pub fn set_update_mask<T>(mut self, v: T) -> Self
11855        where
11856            T: std::convert::Into<wkt::FieldMask>,
11857        {
11858            self.0.request.update_mask = std::option::Option::Some(v.into());
11859            self
11860        }
11861
11862        /// Sets or clears the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
11863        ///
11864        /// This is a **required** field for requests.
11865        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
11866        where
11867            T: std::convert::Into<wkt::FieldMask>,
11868        {
11869            self.0.request.update_mask = v.map(|x| x.into());
11870            self
11871        }
11872
11873        /// Sets the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
11874        ///
11875        /// This is a **required** field for requests.
11876        pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
11877        where
11878            T: std::convert::Into<crate::model::DataTaxonomy>,
11879        {
11880            self.0.request.data_taxonomy = std::option::Option::Some(v.into());
11881            self
11882        }
11883
11884        /// Sets or clears the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
11885        ///
11886        /// This is a **required** field for requests.
11887        pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
11888        where
11889            T: std::convert::Into<crate::model::DataTaxonomy>,
11890        {
11891            self.0.request.data_taxonomy = v.map(|x| x.into());
11892            self
11893        }
11894
11895        /// Sets the value of [validate_only][crate::model::UpdateDataTaxonomyRequest::validate_only].
11896        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
11897            self.0.request.validate_only = v.into();
11898            self
11899        }
11900    }
11901
11902    #[doc(hidden)]
11903    impl crate::RequestBuilder for UpdateDataTaxonomy {
11904        fn request_options(&mut self) -> &mut crate::RequestOptions {
11905            &mut self.0.options
11906        }
11907    }
11908
11909    /// The request builder for [DataTaxonomyService::delete_data_taxonomy][crate::client::DataTaxonomyService::delete_data_taxonomy] calls.
11910    ///
11911    /// # Example
11912    /// ```
11913    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteDataTaxonomy;
11914    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11915    /// use google_cloud_lro::Poller;
11916    ///
11917    /// let builder = prepare_request_builder();
11918    /// let response = builder.poller().until_done().await?;
11919    /// # Ok(()) }
11920    ///
11921    /// fn prepare_request_builder() -> DeleteDataTaxonomy {
11922    ///   # panic!();
11923    ///   // ... details omitted ...
11924    /// }
11925    /// ```
11926    #[derive(Clone, Debug)]
11927    pub struct DeleteDataTaxonomy(RequestBuilder<crate::model::DeleteDataTaxonomyRequest>);
11928
11929    impl DeleteDataTaxonomy {
11930        pub(crate) fn new(
11931            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11932        ) -> Self {
11933            Self(RequestBuilder::new(stub))
11934        }
11935
11936        /// Sets the full request, replacing any prior values.
11937        pub fn with_request<V: Into<crate::model::DeleteDataTaxonomyRequest>>(
11938            mut self,
11939            v: V,
11940        ) -> Self {
11941            self.0.request = v.into();
11942            self
11943        }
11944
11945        /// Sets all the options, replacing any prior values.
11946        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11947            self.0.options = v.into();
11948            self
11949        }
11950
11951        /// Sends the request.
11952        ///
11953        /// # Long running operations
11954        ///
11955        /// This starts, but does not poll, a longrunning operation. More information
11956        /// on [delete_data_taxonomy][crate::client::DataTaxonomyService::delete_data_taxonomy].
11957        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11958            (*self.0.stub)
11959                .delete_data_taxonomy(self.0.request, self.0.options)
11960                .await
11961                .map(crate::Response::into_body)
11962        }
11963
11964        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_taxonomy`.
11965        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
11966            type Operation =
11967                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
11968            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11969            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11970
11971            let stub = self.0.stub.clone();
11972            let mut options = self.0.options.clone();
11973            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
11974            let query = move |name| {
11975                let stub = stub.clone();
11976                let options = options.clone();
11977                async {
11978                    let op = GetOperation::new(stub)
11979                        .set_name(name)
11980                        .with_options(options)
11981                        .send()
11982                        .await?;
11983                    Ok(Operation::new(op))
11984                }
11985            };
11986
11987            let start = move || async {
11988                let op = self.send().await?;
11989                Ok(Operation::new(op))
11990            };
11991
11992            google_cloud_lro::internal::new_unit_response_poller(
11993                polling_error_policy,
11994                polling_backoff_policy,
11995                start,
11996                query,
11997            )
11998        }
11999
12000        /// Sets the value of [name][crate::model::DeleteDataTaxonomyRequest::name].
12001        ///
12002        /// This is a **required** field for requests.
12003        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12004            self.0.request.name = v.into();
12005            self
12006        }
12007
12008        /// Sets the value of [etag][crate::model::DeleteDataTaxonomyRequest::etag].
12009        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
12010            self.0.request.etag = v.into();
12011            self
12012        }
12013    }
12014
12015    #[doc(hidden)]
12016    impl crate::RequestBuilder for DeleteDataTaxonomy {
12017        fn request_options(&mut self) -> &mut crate::RequestOptions {
12018            &mut self.0.options
12019        }
12020    }
12021
12022    /// The request builder for [DataTaxonomyService::list_data_taxonomies][crate::client::DataTaxonomyService::list_data_taxonomies] calls.
12023    ///
12024    /// # Example
12025    /// ```
12026    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListDataTaxonomies;
12027    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12028    /// use google_cloud_gax::paginator::ItemPaginator;
12029    ///
12030    /// let builder = prepare_request_builder();
12031    /// let mut items = builder.by_item();
12032    /// while let Some(result) = items.next().await {
12033    ///   let item = result?;
12034    /// }
12035    /// # Ok(()) }
12036    ///
12037    /// fn prepare_request_builder() -> ListDataTaxonomies {
12038    ///   # panic!();
12039    ///   // ... details omitted ...
12040    /// }
12041    /// ```
12042    #[derive(Clone, Debug)]
12043    pub struct ListDataTaxonomies(RequestBuilder<crate::model::ListDataTaxonomiesRequest>);
12044
12045    impl ListDataTaxonomies {
12046        pub(crate) fn new(
12047            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12048        ) -> Self {
12049            Self(RequestBuilder::new(stub))
12050        }
12051
12052        /// Sets the full request, replacing any prior values.
12053        pub fn with_request<V: Into<crate::model::ListDataTaxonomiesRequest>>(
12054            mut self,
12055            v: V,
12056        ) -> Self {
12057            self.0.request = v.into();
12058            self
12059        }
12060
12061        /// Sets all the options, replacing any prior values.
12062        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12063            self.0.options = v.into();
12064            self
12065        }
12066
12067        /// Sends the request.
12068        pub async fn send(self) -> Result<crate::model::ListDataTaxonomiesResponse> {
12069            (*self.0.stub)
12070                .list_data_taxonomies(self.0.request, self.0.options)
12071                .await
12072                .map(crate::Response::into_body)
12073        }
12074
12075        /// Streams each page in the collection.
12076        pub fn by_page(
12077            self,
12078        ) -> impl google_cloud_gax::paginator::Paginator<
12079            crate::model::ListDataTaxonomiesResponse,
12080            crate::Error,
12081        > {
12082            use std::clone::Clone;
12083            let token = self.0.request.page_token.clone();
12084            let execute = move |token: String| {
12085                let mut builder = self.clone();
12086                builder.0.request = builder.0.request.set_page_token(token);
12087                builder.send()
12088            };
12089            google_cloud_gax::paginator::internal::new_paginator(token, execute)
12090        }
12091
12092        /// Streams each item in the collection.
12093        pub fn by_item(
12094            self,
12095        ) -> impl google_cloud_gax::paginator::ItemPaginator<
12096            crate::model::ListDataTaxonomiesResponse,
12097            crate::Error,
12098        > {
12099            use google_cloud_gax::paginator::Paginator;
12100            self.by_page().items()
12101        }
12102
12103        /// Sets the value of [parent][crate::model::ListDataTaxonomiesRequest::parent].
12104        ///
12105        /// This is a **required** field for requests.
12106        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12107            self.0.request.parent = v.into();
12108            self
12109        }
12110
12111        /// Sets the value of [page_size][crate::model::ListDataTaxonomiesRequest::page_size].
12112        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12113            self.0.request.page_size = v.into();
12114            self
12115        }
12116
12117        /// Sets the value of [page_token][crate::model::ListDataTaxonomiesRequest::page_token].
12118        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12119            self.0.request.page_token = v.into();
12120            self
12121        }
12122
12123        /// Sets the value of [filter][crate::model::ListDataTaxonomiesRequest::filter].
12124        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12125            self.0.request.filter = v.into();
12126            self
12127        }
12128
12129        /// Sets the value of [order_by][crate::model::ListDataTaxonomiesRequest::order_by].
12130        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
12131            self.0.request.order_by = v.into();
12132            self
12133        }
12134    }
12135
12136    #[doc(hidden)]
12137    impl crate::RequestBuilder for ListDataTaxonomies {
12138        fn request_options(&mut self) -> &mut crate::RequestOptions {
12139            &mut self.0.options
12140        }
12141    }
12142
12143    /// The request builder for [DataTaxonomyService::get_data_taxonomy][crate::client::DataTaxonomyService::get_data_taxonomy] calls.
12144    ///
12145    /// # Example
12146    /// ```
12147    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetDataTaxonomy;
12148    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12149    ///
12150    /// let builder = prepare_request_builder();
12151    /// let response = builder.send().await?;
12152    /// # Ok(()) }
12153    ///
12154    /// fn prepare_request_builder() -> GetDataTaxonomy {
12155    ///   # panic!();
12156    ///   // ... details omitted ...
12157    /// }
12158    /// ```
12159    #[derive(Clone, Debug)]
12160    pub struct GetDataTaxonomy(RequestBuilder<crate::model::GetDataTaxonomyRequest>);
12161
12162    impl GetDataTaxonomy {
12163        pub(crate) fn new(
12164            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12165        ) -> Self {
12166            Self(RequestBuilder::new(stub))
12167        }
12168
12169        /// Sets the full request, replacing any prior values.
12170        pub fn with_request<V: Into<crate::model::GetDataTaxonomyRequest>>(mut self, v: V) -> 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        pub async fn send(self) -> Result<crate::model::DataTaxonomy> {
12183            (*self.0.stub)
12184                .get_data_taxonomy(self.0.request, self.0.options)
12185                .await
12186                .map(crate::Response::into_body)
12187        }
12188
12189        /// Sets the value of [name][crate::model::GetDataTaxonomyRequest::name].
12190        ///
12191        /// This is a **required** field for requests.
12192        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12193            self.0.request.name = v.into();
12194            self
12195        }
12196    }
12197
12198    #[doc(hidden)]
12199    impl crate::RequestBuilder for GetDataTaxonomy {
12200        fn request_options(&mut self) -> &mut crate::RequestOptions {
12201            &mut self.0.options
12202        }
12203    }
12204
12205    /// The request builder for [DataTaxonomyService::create_data_attribute_binding][crate::client::DataTaxonomyService::create_data_attribute_binding] calls.
12206    ///
12207    /// # Example
12208    /// ```
12209    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CreateDataAttributeBinding;
12210    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12211    /// use google_cloud_lro::Poller;
12212    ///
12213    /// let builder = prepare_request_builder();
12214    /// let response = builder.poller().until_done().await?;
12215    /// # Ok(()) }
12216    ///
12217    /// fn prepare_request_builder() -> CreateDataAttributeBinding {
12218    ///   # panic!();
12219    ///   // ... details omitted ...
12220    /// }
12221    /// ```
12222    #[derive(Clone, Debug)]
12223    pub struct CreateDataAttributeBinding(
12224        RequestBuilder<crate::model::CreateDataAttributeBindingRequest>,
12225    );
12226
12227    impl CreateDataAttributeBinding {
12228        pub(crate) fn new(
12229            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12230        ) -> Self {
12231            Self(RequestBuilder::new(stub))
12232        }
12233
12234        /// Sets the full request, replacing any prior values.
12235        pub fn with_request<V: Into<crate::model::CreateDataAttributeBindingRequest>>(
12236            mut self,
12237            v: V,
12238        ) -> Self {
12239            self.0.request = v.into();
12240            self
12241        }
12242
12243        /// Sets all the options, replacing any prior values.
12244        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12245            self.0.options = v.into();
12246            self
12247        }
12248
12249        /// Sends the request.
12250        ///
12251        /// # Long running operations
12252        ///
12253        /// This starts, but does not poll, a longrunning operation. More information
12254        /// on [create_data_attribute_binding][crate::client::DataTaxonomyService::create_data_attribute_binding].
12255        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12256            (*self.0.stub)
12257                .create_data_attribute_binding(self.0.request, self.0.options)
12258                .await
12259                .map(crate::Response::into_body)
12260        }
12261
12262        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_attribute_binding`.
12263        pub fn poller(
12264            self,
12265        ) -> impl google_cloud_lro::Poller<
12266            crate::model::DataAttributeBinding,
12267            crate::model::OperationMetadata,
12268        > {
12269            type Operation = google_cloud_lro::internal::Operation<
12270                crate::model::DataAttributeBinding,
12271                crate::model::OperationMetadata,
12272            >;
12273            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12274            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12275
12276            let stub = self.0.stub.clone();
12277            let mut options = self.0.options.clone();
12278            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12279            let query = move |name| {
12280                let stub = stub.clone();
12281                let options = options.clone();
12282                async {
12283                    let op = GetOperation::new(stub)
12284                        .set_name(name)
12285                        .with_options(options)
12286                        .send()
12287                        .await?;
12288                    Ok(Operation::new(op))
12289                }
12290            };
12291
12292            let start = move || async {
12293                let op = self.send().await?;
12294                Ok(Operation::new(op))
12295            };
12296
12297            google_cloud_lro::internal::new_poller(
12298                polling_error_policy,
12299                polling_backoff_policy,
12300                start,
12301                query,
12302            )
12303        }
12304
12305        /// Sets the value of [parent][crate::model::CreateDataAttributeBindingRequest::parent].
12306        ///
12307        /// This is a **required** field for requests.
12308        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12309            self.0.request.parent = v.into();
12310            self
12311        }
12312
12313        /// Sets the value of [data_attribute_binding_id][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding_id].
12314        ///
12315        /// This is a **required** field for requests.
12316        pub fn set_data_attribute_binding_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
12317            self.0.request.data_attribute_binding_id = v.into();
12318            self
12319        }
12320
12321        /// Sets the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
12322        ///
12323        /// This is a **required** field for requests.
12324        pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
12325        where
12326            T: std::convert::Into<crate::model::DataAttributeBinding>,
12327        {
12328            self.0.request.data_attribute_binding = std::option::Option::Some(v.into());
12329            self
12330        }
12331
12332        /// Sets or clears the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
12333        ///
12334        /// This is a **required** field for requests.
12335        pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
12336        where
12337            T: std::convert::Into<crate::model::DataAttributeBinding>,
12338        {
12339            self.0.request.data_attribute_binding = v.map(|x| x.into());
12340            self
12341        }
12342
12343        /// Sets the value of [validate_only][crate::model::CreateDataAttributeBindingRequest::validate_only].
12344        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12345            self.0.request.validate_only = v.into();
12346            self
12347        }
12348    }
12349
12350    #[doc(hidden)]
12351    impl crate::RequestBuilder for CreateDataAttributeBinding {
12352        fn request_options(&mut self) -> &mut crate::RequestOptions {
12353            &mut self.0.options
12354        }
12355    }
12356
12357    /// The request builder for [DataTaxonomyService::update_data_attribute_binding][crate::client::DataTaxonomyService::update_data_attribute_binding] calls.
12358    ///
12359    /// # Example
12360    /// ```
12361    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::UpdateDataAttributeBinding;
12362    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12363    /// use google_cloud_lro::Poller;
12364    ///
12365    /// let builder = prepare_request_builder();
12366    /// let response = builder.poller().until_done().await?;
12367    /// # Ok(()) }
12368    ///
12369    /// fn prepare_request_builder() -> UpdateDataAttributeBinding {
12370    ///   # panic!();
12371    ///   // ... details omitted ...
12372    /// }
12373    /// ```
12374    #[derive(Clone, Debug)]
12375    pub struct UpdateDataAttributeBinding(
12376        RequestBuilder<crate::model::UpdateDataAttributeBindingRequest>,
12377    );
12378
12379    impl UpdateDataAttributeBinding {
12380        pub(crate) fn new(
12381            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12382        ) -> Self {
12383            Self(RequestBuilder::new(stub))
12384        }
12385
12386        /// Sets the full request, replacing any prior values.
12387        pub fn with_request<V: Into<crate::model::UpdateDataAttributeBindingRequest>>(
12388            mut self,
12389            v: V,
12390        ) -> Self {
12391            self.0.request = v.into();
12392            self
12393        }
12394
12395        /// Sets all the options, replacing any prior values.
12396        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12397            self.0.options = v.into();
12398            self
12399        }
12400
12401        /// Sends the request.
12402        ///
12403        /// # Long running operations
12404        ///
12405        /// This starts, but does not poll, a longrunning operation. More information
12406        /// on [update_data_attribute_binding][crate::client::DataTaxonomyService::update_data_attribute_binding].
12407        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12408            (*self.0.stub)
12409                .update_data_attribute_binding(self.0.request, self.0.options)
12410                .await
12411                .map(crate::Response::into_body)
12412        }
12413
12414        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_attribute_binding`.
12415        pub fn poller(
12416            self,
12417        ) -> impl google_cloud_lro::Poller<
12418            crate::model::DataAttributeBinding,
12419            crate::model::OperationMetadata,
12420        > {
12421            type Operation = google_cloud_lro::internal::Operation<
12422                crate::model::DataAttributeBinding,
12423                crate::model::OperationMetadata,
12424            >;
12425            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12426            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12427
12428            let stub = self.0.stub.clone();
12429            let mut options = self.0.options.clone();
12430            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12431            let query = move |name| {
12432                let stub = stub.clone();
12433                let options = options.clone();
12434                async {
12435                    let op = GetOperation::new(stub)
12436                        .set_name(name)
12437                        .with_options(options)
12438                        .send()
12439                        .await?;
12440                    Ok(Operation::new(op))
12441                }
12442            };
12443
12444            let start = move || async {
12445                let op = self.send().await?;
12446                Ok(Operation::new(op))
12447            };
12448
12449            google_cloud_lro::internal::new_poller(
12450                polling_error_policy,
12451                polling_backoff_policy,
12452                start,
12453                query,
12454            )
12455        }
12456
12457        /// Sets the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
12458        ///
12459        /// This is a **required** field for requests.
12460        pub fn set_update_mask<T>(mut self, v: T) -> Self
12461        where
12462            T: std::convert::Into<wkt::FieldMask>,
12463        {
12464            self.0.request.update_mask = std::option::Option::Some(v.into());
12465            self
12466        }
12467
12468        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
12469        ///
12470        /// This is a **required** field for requests.
12471        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
12472        where
12473            T: std::convert::Into<wkt::FieldMask>,
12474        {
12475            self.0.request.update_mask = v.map(|x| x.into());
12476            self
12477        }
12478
12479        /// Sets the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
12480        ///
12481        /// This is a **required** field for requests.
12482        pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
12483        where
12484            T: std::convert::Into<crate::model::DataAttributeBinding>,
12485        {
12486            self.0.request.data_attribute_binding = std::option::Option::Some(v.into());
12487            self
12488        }
12489
12490        /// Sets or clears the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
12491        ///
12492        /// This is a **required** field for requests.
12493        pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
12494        where
12495            T: std::convert::Into<crate::model::DataAttributeBinding>,
12496        {
12497            self.0.request.data_attribute_binding = v.map(|x| x.into());
12498            self
12499        }
12500
12501        /// Sets the value of [validate_only][crate::model::UpdateDataAttributeBindingRequest::validate_only].
12502        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12503            self.0.request.validate_only = v.into();
12504            self
12505        }
12506    }
12507
12508    #[doc(hidden)]
12509    impl crate::RequestBuilder for UpdateDataAttributeBinding {
12510        fn request_options(&mut self) -> &mut crate::RequestOptions {
12511            &mut self.0.options
12512        }
12513    }
12514
12515    /// The request builder for [DataTaxonomyService::delete_data_attribute_binding][crate::client::DataTaxonomyService::delete_data_attribute_binding] calls.
12516    ///
12517    /// # Example
12518    /// ```
12519    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteDataAttributeBinding;
12520    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12521    /// use google_cloud_lro::Poller;
12522    ///
12523    /// let builder = prepare_request_builder();
12524    /// let response = builder.poller().until_done().await?;
12525    /// # Ok(()) }
12526    ///
12527    /// fn prepare_request_builder() -> DeleteDataAttributeBinding {
12528    ///   # panic!();
12529    ///   // ... details omitted ...
12530    /// }
12531    /// ```
12532    #[derive(Clone, Debug)]
12533    pub struct DeleteDataAttributeBinding(
12534        RequestBuilder<crate::model::DeleteDataAttributeBindingRequest>,
12535    );
12536
12537    impl DeleteDataAttributeBinding {
12538        pub(crate) fn new(
12539            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12540        ) -> Self {
12541            Self(RequestBuilder::new(stub))
12542        }
12543
12544        /// Sets the full request, replacing any prior values.
12545        pub fn with_request<V: Into<crate::model::DeleteDataAttributeBindingRequest>>(
12546            mut self,
12547            v: V,
12548        ) -> Self {
12549            self.0.request = v.into();
12550            self
12551        }
12552
12553        /// Sets all the options, replacing any prior values.
12554        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12555            self.0.options = v.into();
12556            self
12557        }
12558
12559        /// Sends the request.
12560        ///
12561        /// # Long running operations
12562        ///
12563        /// This starts, but does not poll, a longrunning operation. More information
12564        /// on [delete_data_attribute_binding][crate::client::DataTaxonomyService::delete_data_attribute_binding].
12565        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12566            (*self.0.stub)
12567                .delete_data_attribute_binding(self.0.request, self.0.options)
12568                .await
12569                .map(crate::Response::into_body)
12570        }
12571
12572        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_attribute_binding`.
12573        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
12574            type Operation =
12575                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
12576            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12577            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12578
12579            let stub = self.0.stub.clone();
12580            let mut options = self.0.options.clone();
12581            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12582            let query = move |name| {
12583                let stub = stub.clone();
12584                let options = options.clone();
12585                async {
12586                    let op = GetOperation::new(stub)
12587                        .set_name(name)
12588                        .with_options(options)
12589                        .send()
12590                        .await?;
12591                    Ok(Operation::new(op))
12592                }
12593            };
12594
12595            let start = move || async {
12596                let op = self.send().await?;
12597                Ok(Operation::new(op))
12598            };
12599
12600            google_cloud_lro::internal::new_unit_response_poller(
12601                polling_error_policy,
12602                polling_backoff_policy,
12603                start,
12604                query,
12605            )
12606        }
12607
12608        /// Sets the value of [name][crate::model::DeleteDataAttributeBindingRequest::name].
12609        ///
12610        /// This is a **required** field for requests.
12611        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12612            self.0.request.name = v.into();
12613            self
12614        }
12615
12616        /// Sets the value of [etag][crate::model::DeleteDataAttributeBindingRequest::etag].
12617        ///
12618        /// This is a **required** field for requests.
12619        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
12620            self.0.request.etag = v.into();
12621            self
12622        }
12623    }
12624
12625    #[doc(hidden)]
12626    impl crate::RequestBuilder for DeleteDataAttributeBinding {
12627        fn request_options(&mut self) -> &mut crate::RequestOptions {
12628            &mut self.0.options
12629        }
12630    }
12631
12632    /// The request builder for [DataTaxonomyService::list_data_attribute_bindings][crate::client::DataTaxonomyService::list_data_attribute_bindings] calls.
12633    ///
12634    /// # Example
12635    /// ```
12636    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListDataAttributeBindings;
12637    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12638    /// use google_cloud_gax::paginator::ItemPaginator;
12639    ///
12640    /// let builder = prepare_request_builder();
12641    /// let mut items = builder.by_item();
12642    /// while let Some(result) = items.next().await {
12643    ///   let item = result?;
12644    /// }
12645    /// # Ok(()) }
12646    ///
12647    /// fn prepare_request_builder() -> ListDataAttributeBindings {
12648    ///   # panic!();
12649    ///   // ... details omitted ...
12650    /// }
12651    /// ```
12652    #[derive(Clone, Debug)]
12653    pub struct ListDataAttributeBindings(
12654        RequestBuilder<crate::model::ListDataAttributeBindingsRequest>,
12655    );
12656
12657    impl ListDataAttributeBindings {
12658        pub(crate) fn new(
12659            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12660        ) -> Self {
12661            Self(RequestBuilder::new(stub))
12662        }
12663
12664        /// Sets the full request, replacing any prior values.
12665        pub fn with_request<V: Into<crate::model::ListDataAttributeBindingsRequest>>(
12666            mut self,
12667            v: V,
12668        ) -> Self {
12669            self.0.request = v.into();
12670            self
12671        }
12672
12673        /// Sets all the options, replacing any prior values.
12674        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12675            self.0.options = v.into();
12676            self
12677        }
12678
12679        /// Sends the request.
12680        pub async fn send(self) -> Result<crate::model::ListDataAttributeBindingsResponse> {
12681            (*self.0.stub)
12682                .list_data_attribute_bindings(self.0.request, self.0.options)
12683                .await
12684                .map(crate::Response::into_body)
12685        }
12686
12687        /// Streams each page in the collection.
12688        pub fn by_page(
12689            self,
12690        ) -> impl google_cloud_gax::paginator::Paginator<
12691            crate::model::ListDataAttributeBindingsResponse,
12692            crate::Error,
12693        > {
12694            use std::clone::Clone;
12695            let token = self.0.request.page_token.clone();
12696            let execute = move |token: String| {
12697                let mut builder = self.clone();
12698                builder.0.request = builder.0.request.set_page_token(token);
12699                builder.send()
12700            };
12701            google_cloud_gax::paginator::internal::new_paginator(token, execute)
12702        }
12703
12704        /// Streams each item in the collection.
12705        pub fn by_item(
12706            self,
12707        ) -> impl google_cloud_gax::paginator::ItemPaginator<
12708            crate::model::ListDataAttributeBindingsResponse,
12709            crate::Error,
12710        > {
12711            use google_cloud_gax::paginator::Paginator;
12712            self.by_page().items()
12713        }
12714
12715        /// Sets the value of [parent][crate::model::ListDataAttributeBindingsRequest::parent].
12716        ///
12717        /// This is a **required** field for requests.
12718        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12719            self.0.request.parent = v.into();
12720            self
12721        }
12722
12723        /// Sets the value of [page_size][crate::model::ListDataAttributeBindingsRequest::page_size].
12724        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12725            self.0.request.page_size = v.into();
12726            self
12727        }
12728
12729        /// Sets the value of [page_token][crate::model::ListDataAttributeBindingsRequest::page_token].
12730        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12731            self.0.request.page_token = v.into();
12732            self
12733        }
12734
12735        /// Sets the value of [filter][crate::model::ListDataAttributeBindingsRequest::filter].
12736        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12737            self.0.request.filter = v.into();
12738            self
12739        }
12740
12741        /// Sets the value of [order_by][crate::model::ListDataAttributeBindingsRequest::order_by].
12742        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
12743            self.0.request.order_by = v.into();
12744            self
12745        }
12746    }
12747
12748    #[doc(hidden)]
12749    impl crate::RequestBuilder for ListDataAttributeBindings {
12750        fn request_options(&mut self) -> &mut crate::RequestOptions {
12751            &mut self.0.options
12752        }
12753    }
12754
12755    /// The request builder for [DataTaxonomyService::get_data_attribute_binding][crate::client::DataTaxonomyService::get_data_attribute_binding] calls.
12756    ///
12757    /// # Example
12758    /// ```
12759    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetDataAttributeBinding;
12760    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12761    ///
12762    /// let builder = prepare_request_builder();
12763    /// let response = builder.send().await?;
12764    /// # Ok(()) }
12765    ///
12766    /// fn prepare_request_builder() -> GetDataAttributeBinding {
12767    ///   # panic!();
12768    ///   // ... details omitted ...
12769    /// }
12770    /// ```
12771    #[derive(Clone, Debug)]
12772    pub struct GetDataAttributeBinding(
12773        RequestBuilder<crate::model::GetDataAttributeBindingRequest>,
12774    );
12775
12776    impl GetDataAttributeBinding {
12777        pub(crate) fn new(
12778            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12779        ) -> Self {
12780            Self(RequestBuilder::new(stub))
12781        }
12782
12783        /// Sets the full request, replacing any prior values.
12784        pub fn with_request<V: Into<crate::model::GetDataAttributeBindingRequest>>(
12785            mut self,
12786            v: V,
12787        ) -> Self {
12788            self.0.request = v.into();
12789            self
12790        }
12791
12792        /// Sets all the options, replacing any prior values.
12793        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12794            self.0.options = v.into();
12795            self
12796        }
12797
12798        /// Sends the request.
12799        pub async fn send(self) -> Result<crate::model::DataAttributeBinding> {
12800            (*self.0.stub)
12801                .get_data_attribute_binding(self.0.request, self.0.options)
12802                .await
12803                .map(crate::Response::into_body)
12804        }
12805
12806        /// Sets the value of [name][crate::model::GetDataAttributeBindingRequest::name].
12807        ///
12808        /// This is a **required** field for requests.
12809        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12810            self.0.request.name = v.into();
12811            self
12812        }
12813    }
12814
12815    #[doc(hidden)]
12816    impl crate::RequestBuilder for GetDataAttributeBinding {
12817        fn request_options(&mut self) -> &mut crate::RequestOptions {
12818            &mut self.0.options
12819        }
12820    }
12821
12822    /// The request builder for [DataTaxonomyService::create_data_attribute][crate::client::DataTaxonomyService::create_data_attribute] calls.
12823    ///
12824    /// # Example
12825    /// ```
12826    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CreateDataAttribute;
12827    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12828    /// use google_cloud_lro::Poller;
12829    ///
12830    /// let builder = prepare_request_builder();
12831    /// let response = builder.poller().until_done().await?;
12832    /// # Ok(()) }
12833    ///
12834    /// fn prepare_request_builder() -> CreateDataAttribute {
12835    ///   # panic!();
12836    ///   // ... details omitted ...
12837    /// }
12838    /// ```
12839    #[derive(Clone, Debug)]
12840    pub struct CreateDataAttribute(RequestBuilder<crate::model::CreateDataAttributeRequest>);
12841
12842    impl CreateDataAttribute {
12843        pub(crate) fn new(
12844            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12845        ) -> Self {
12846            Self(RequestBuilder::new(stub))
12847        }
12848
12849        /// Sets the full request, replacing any prior values.
12850        pub fn with_request<V: Into<crate::model::CreateDataAttributeRequest>>(
12851            mut self,
12852            v: V,
12853        ) -> Self {
12854            self.0.request = v.into();
12855            self
12856        }
12857
12858        /// Sets all the options, replacing any prior values.
12859        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12860            self.0.options = v.into();
12861            self
12862        }
12863
12864        /// Sends the request.
12865        ///
12866        /// # Long running operations
12867        ///
12868        /// This starts, but does not poll, a longrunning operation. More information
12869        /// on [create_data_attribute][crate::client::DataTaxonomyService::create_data_attribute].
12870        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12871            (*self.0.stub)
12872                .create_data_attribute(self.0.request, self.0.options)
12873                .await
12874                .map(crate::Response::into_body)
12875        }
12876
12877        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_attribute`.
12878        pub fn poller(
12879            self,
12880        ) -> impl google_cloud_lro::Poller<crate::model::DataAttribute, crate::model::OperationMetadata>
12881        {
12882            type Operation = google_cloud_lro::internal::Operation<
12883                crate::model::DataAttribute,
12884                crate::model::OperationMetadata,
12885            >;
12886            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12887            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12888
12889            let stub = self.0.stub.clone();
12890            let mut options = self.0.options.clone();
12891            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12892            let query = move |name| {
12893                let stub = stub.clone();
12894                let options = options.clone();
12895                async {
12896                    let op = GetOperation::new(stub)
12897                        .set_name(name)
12898                        .with_options(options)
12899                        .send()
12900                        .await?;
12901                    Ok(Operation::new(op))
12902                }
12903            };
12904
12905            let start = move || async {
12906                let op = self.send().await?;
12907                Ok(Operation::new(op))
12908            };
12909
12910            google_cloud_lro::internal::new_poller(
12911                polling_error_policy,
12912                polling_backoff_policy,
12913                start,
12914                query,
12915            )
12916        }
12917
12918        /// Sets the value of [parent][crate::model::CreateDataAttributeRequest::parent].
12919        ///
12920        /// This is a **required** field for requests.
12921        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12922            self.0.request.parent = v.into();
12923            self
12924        }
12925
12926        /// Sets the value of [data_attribute_id][crate::model::CreateDataAttributeRequest::data_attribute_id].
12927        ///
12928        /// This is a **required** field for requests.
12929        pub fn set_data_attribute_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
12930            self.0.request.data_attribute_id = v.into();
12931            self
12932        }
12933
12934        /// Sets the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
12935        ///
12936        /// This is a **required** field for requests.
12937        pub fn set_data_attribute<T>(mut self, v: T) -> Self
12938        where
12939            T: std::convert::Into<crate::model::DataAttribute>,
12940        {
12941            self.0.request.data_attribute = std::option::Option::Some(v.into());
12942            self
12943        }
12944
12945        /// Sets or clears the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
12946        ///
12947        /// This is a **required** field for requests.
12948        pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
12949        where
12950            T: std::convert::Into<crate::model::DataAttribute>,
12951        {
12952            self.0.request.data_attribute = v.map(|x| x.into());
12953            self
12954        }
12955
12956        /// Sets the value of [validate_only][crate::model::CreateDataAttributeRequest::validate_only].
12957        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12958            self.0.request.validate_only = v.into();
12959            self
12960        }
12961    }
12962
12963    #[doc(hidden)]
12964    impl crate::RequestBuilder for CreateDataAttribute {
12965        fn request_options(&mut self) -> &mut crate::RequestOptions {
12966            &mut self.0.options
12967        }
12968    }
12969
12970    /// The request builder for [DataTaxonomyService::update_data_attribute][crate::client::DataTaxonomyService::update_data_attribute] calls.
12971    ///
12972    /// # Example
12973    /// ```
12974    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::UpdateDataAttribute;
12975    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12976    /// use google_cloud_lro::Poller;
12977    ///
12978    /// let builder = prepare_request_builder();
12979    /// let response = builder.poller().until_done().await?;
12980    /// # Ok(()) }
12981    ///
12982    /// fn prepare_request_builder() -> UpdateDataAttribute {
12983    ///   # panic!();
12984    ///   // ... details omitted ...
12985    /// }
12986    /// ```
12987    #[derive(Clone, Debug)]
12988    pub struct UpdateDataAttribute(RequestBuilder<crate::model::UpdateDataAttributeRequest>);
12989
12990    impl UpdateDataAttribute {
12991        pub(crate) fn new(
12992            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12993        ) -> Self {
12994            Self(RequestBuilder::new(stub))
12995        }
12996
12997        /// Sets the full request, replacing any prior values.
12998        pub fn with_request<V: Into<crate::model::UpdateDataAttributeRequest>>(
12999            mut self,
13000            v: V,
13001        ) -> Self {
13002            self.0.request = v.into();
13003            self
13004        }
13005
13006        /// Sets all the options, replacing any prior values.
13007        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13008            self.0.options = v.into();
13009            self
13010        }
13011
13012        /// Sends the request.
13013        ///
13014        /// # Long running operations
13015        ///
13016        /// This starts, but does not poll, a longrunning operation. More information
13017        /// on [update_data_attribute][crate::client::DataTaxonomyService::update_data_attribute].
13018        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
13019            (*self.0.stub)
13020                .update_data_attribute(self.0.request, self.0.options)
13021                .await
13022                .map(crate::Response::into_body)
13023        }
13024
13025        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_attribute`.
13026        pub fn poller(
13027            self,
13028        ) -> impl google_cloud_lro::Poller<crate::model::DataAttribute, crate::model::OperationMetadata>
13029        {
13030            type Operation = google_cloud_lro::internal::Operation<
13031                crate::model::DataAttribute,
13032                crate::model::OperationMetadata,
13033            >;
13034            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
13035            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
13036
13037            let stub = self.0.stub.clone();
13038            let mut options = self.0.options.clone();
13039            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
13040            let query = move |name| {
13041                let stub = stub.clone();
13042                let options = options.clone();
13043                async {
13044                    let op = GetOperation::new(stub)
13045                        .set_name(name)
13046                        .with_options(options)
13047                        .send()
13048                        .await?;
13049                    Ok(Operation::new(op))
13050                }
13051            };
13052
13053            let start = move || async {
13054                let op = self.send().await?;
13055                Ok(Operation::new(op))
13056            };
13057
13058            google_cloud_lro::internal::new_poller(
13059                polling_error_policy,
13060                polling_backoff_policy,
13061                start,
13062                query,
13063            )
13064        }
13065
13066        /// Sets the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
13067        ///
13068        /// This is a **required** field for requests.
13069        pub fn set_update_mask<T>(mut self, v: T) -> Self
13070        where
13071            T: std::convert::Into<wkt::FieldMask>,
13072        {
13073            self.0.request.update_mask = std::option::Option::Some(v.into());
13074            self
13075        }
13076
13077        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
13078        ///
13079        /// This is a **required** field for requests.
13080        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
13081        where
13082            T: std::convert::Into<wkt::FieldMask>,
13083        {
13084            self.0.request.update_mask = v.map(|x| x.into());
13085            self
13086        }
13087
13088        /// Sets the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
13089        ///
13090        /// This is a **required** field for requests.
13091        pub fn set_data_attribute<T>(mut self, v: T) -> Self
13092        where
13093            T: std::convert::Into<crate::model::DataAttribute>,
13094        {
13095            self.0.request.data_attribute = std::option::Option::Some(v.into());
13096            self
13097        }
13098
13099        /// Sets or clears the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
13100        ///
13101        /// This is a **required** field for requests.
13102        pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
13103        where
13104            T: std::convert::Into<crate::model::DataAttribute>,
13105        {
13106            self.0.request.data_attribute = v.map(|x| x.into());
13107            self
13108        }
13109
13110        /// Sets the value of [validate_only][crate::model::UpdateDataAttributeRequest::validate_only].
13111        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
13112            self.0.request.validate_only = v.into();
13113            self
13114        }
13115    }
13116
13117    #[doc(hidden)]
13118    impl crate::RequestBuilder for UpdateDataAttribute {
13119        fn request_options(&mut self) -> &mut crate::RequestOptions {
13120            &mut self.0.options
13121        }
13122    }
13123
13124    /// The request builder for [DataTaxonomyService::delete_data_attribute][crate::client::DataTaxonomyService::delete_data_attribute] calls.
13125    ///
13126    /// # Example
13127    /// ```
13128    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteDataAttribute;
13129    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13130    /// use google_cloud_lro::Poller;
13131    ///
13132    /// let builder = prepare_request_builder();
13133    /// let response = builder.poller().until_done().await?;
13134    /// # Ok(()) }
13135    ///
13136    /// fn prepare_request_builder() -> DeleteDataAttribute {
13137    ///   # panic!();
13138    ///   // ... details omitted ...
13139    /// }
13140    /// ```
13141    #[derive(Clone, Debug)]
13142    pub struct DeleteDataAttribute(RequestBuilder<crate::model::DeleteDataAttributeRequest>);
13143
13144    impl DeleteDataAttribute {
13145        pub(crate) fn new(
13146            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13147        ) -> Self {
13148            Self(RequestBuilder::new(stub))
13149        }
13150
13151        /// Sets the full request, replacing any prior values.
13152        pub fn with_request<V: Into<crate::model::DeleteDataAttributeRequest>>(
13153            mut self,
13154            v: V,
13155        ) -> Self {
13156            self.0.request = v.into();
13157            self
13158        }
13159
13160        /// Sets all the options, replacing any prior values.
13161        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13162            self.0.options = v.into();
13163            self
13164        }
13165
13166        /// Sends the request.
13167        ///
13168        /// # Long running operations
13169        ///
13170        /// This starts, but does not poll, a longrunning operation. More information
13171        /// on [delete_data_attribute][crate::client::DataTaxonomyService::delete_data_attribute].
13172        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
13173            (*self.0.stub)
13174                .delete_data_attribute(self.0.request, self.0.options)
13175                .await
13176                .map(crate::Response::into_body)
13177        }
13178
13179        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_attribute`.
13180        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
13181            type Operation =
13182                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
13183            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
13184            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
13185
13186            let stub = self.0.stub.clone();
13187            let mut options = self.0.options.clone();
13188            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
13189            let query = move |name| {
13190                let stub = stub.clone();
13191                let options = options.clone();
13192                async {
13193                    let op = GetOperation::new(stub)
13194                        .set_name(name)
13195                        .with_options(options)
13196                        .send()
13197                        .await?;
13198                    Ok(Operation::new(op))
13199                }
13200            };
13201
13202            let start = move || async {
13203                let op = self.send().await?;
13204                Ok(Operation::new(op))
13205            };
13206
13207            google_cloud_lro::internal::new_unit_response_poller(
13208                polling_error_policy,
13209                polling_backoff_policy,
13210                start,
13211                query,
13212            )
13213        }
13214
13215        /// Sets the value of [name][crate::model::DeleteDataAttributeRequest::name].
13216        ///
13217        /// This is a **required** field for requests.
13218        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13219            self.0.request.name = v.into();
13220            self
13221        }
13222
13223        /// Sets the value of [etag][crate::model::DeleteDataAttributeRequest::etag].
13224        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
13225            self.0.request.etag = v.into();
13226            self
13227        }
13228    }
13229
13230    #[doc(hidden)]
13231    impl crate::RequestBuilder for DeleteDataAttribute {
13232        fn request_options(&mut self) -> &mut crate::RequestOptions {
13233            &mut self.0.options
13234        }
13235    }
13236
13237    /// The request builder for [DataTaxonomyService::list_data_attributes][crate::client::DataTaxonomyService::list_data_attributes] calls.
13238    ///
13239    /// # Example
13240    /// ```
13241    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListDataAttributes;
13242    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13243    /// use google_cloud_gax::paginator::ItemPaginator;
13244    ///
13245    /// let builder = prepare_request_builder();
13246    /// let mut items = builder.by_item();
13247    /// while let Some(result) = items.next().await {
13248    ///   let item = result?;
13249    /// }
13250    /// # Ok(()) }
13251    ///
13252    /// fn prepare_request_builder() -> ListDataAttributes {
13253    ///   # panic!();
13254    ///   // ... details omitted ...
13255    /// }
13256    /// ```
13257    #[derive(Clone, Debug)]
13258    pub struct ListDataAttributes(RequestBuilder<crate::model::ListDataAttributesRequest>);
13259
13260    impl ListDataAttributes {
13261        pub(crate) fn new(
13262            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13263        ) -> Self {
13264            Self(RequestBuilder::new(stub))
13265        }
13266
13267        /// Sets the full request, replacing any prior values.
13268        pub fn with_request<V: Into<crate::model::ListDataAttributesRequest>>(
13269            mut self,
13270            v: V,
13271        ) -> Self {
13272            self.0.request = v.into();
13273            self
13274        }
13275
13276        /// Sets all the options, replacing any prior values.
13277        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13278            self.0.options = v.into();
13279            self
13280        }
13281
13282        /// Sends the request.
13283        pub async fn send(self) -> Result<crate::model::ListDataAttributesResponse> {
13284            (*self.0.stub)
13285                .list_data_attributes(self.0.request, self.0.options)
13286                .await
13287                .map(crate::Response::into_body)
13288        }
13289
13290        /// Streams each page in the collection.
13291        pub fn by_page(
13292            self,
13293        ) -> impl google_cloud_gax::paginator::Paginator<
13294            crate::model::ListDataAttributesResponse,
13295            crate::Error,
13296        > {
13297            use std::clone::Clone;
13298            let token = self.0.request.page_token.clone();
13299            let execute = move |token: String| {
13300                let mut builder = self.clone();
13301                builder.0.request = builder.0.request.set_page_token(token);
13302                builder.send()
13303            };
13304            google_cloud_gax::paginator::internal::new_paginator(token, execute)
13305        }
13306
13307        /// Streams each item in the collection.
13308        pub fn by_item(
13309            self,
13310        ) -> impl google_cloud_gax::paginator::ItemPaginator<
13311            crate::model::ListDataAttributesResponse,
13312            crate::Error,
13313        > {
13314            use google_cloud_gax::paginator::Paginator;
13315            self.by_page().items()
13316        }
13317
13318        /// Sets the value of [parent][crate::model::ListDataAttributesRequest::parent].
13319        ///
13320        /// This is a **required** field for requests.
13321        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13322            self.0.request.parent = v.into();
13323            self
13324        }
13325
13326        /// Sets the value of [page_size][crate::model::ListDataAttributesRequest::page_size].
13327        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13328            self.0.request.page_size = v.into();
13329            self
13330        }
13331
13332        /// Sets the value of [page_token][crate::model::ListDataAttributesRequest::page_token].
13333        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13334            self.0.request.page_token = v.into();
13335            self
13336        }
13337
13338        /// Sets the value of [filter][crate::model::ListDataAttributesRequest::filter].
13339        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13340            self.0.request.filter = v.into();
13341            self
13342        }
13343
13344        /// Sets the value of [order_by][crate::model::ListDataAttributesRequest::order_by].
13345        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
13346            self.0.request.order_by = v.into();
13347            self
13348        }
13349    }
13350
13351    #[doc(hidden)]
13352    impl crate::RequestBuilder for ListDataAttributes {
13353        fn request_options(&mut self) -> &mut crate::RequestOptions {
13354            &mut self.0.options
13355        }
13356    }
13357
13358    /// The request builder for [DataTaxonomyService::get_data_attribute][crate::client::DataTaxonomyService::get_data_attribute] calls.
13359    ///
13360    /// # Example
13361    /// ```
13362    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetDataAttribute;
13363    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13364    ///
13365    /// let builder = prepare_request_builder();
13366    /// let response = builder.send().await?;
13367    /// # Ok(()) }
13368    ///
13369    /// fn prepare_request_builder() -> GetDataAttribute {
13370    ///   # panic!();
13371    ///   // ... details omitted ...
13372    /// }
13373    /// ```
13374    #[derive(Clone, Debug)]
13375    pub struct GetDataAttribute(RequestBuilder<crate::model::GetDataAttributeRequest>);
13376
13377    impl GetDataAttribute {
13378        pub(crate) fn new(
13379            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13380        ) -> Self {
13381            Self(RequestBuilder::new(stub))
13382        }
13383
13384        /// Sets the full request, replacing any prior values.
13385        pub fn with_request<V: Into<crate::model::GetDataAttributeRequest>>(
13386            mut self,
13387            v: V,
13388        ) -> Self {
13389            self.0.request = v.into();
13390            self
13391        }
13392
13393        /// Sets all the options, replacing any prior values.
13394        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13395            self.0.options = v.into();
13396            self
13397        }
13398
13399        /// Sends the request.
13400        pub async fn send(self) -> Result<crate::model::DataAttribute> {
13401            (*self.0.stub)
13402                .get_data_attribute(self.0.request, self.0.options)
13403                .await
13404                .map(crate::Response::into_body)
13405        }
13406
13407        /// Sets the value of [name][crate::model::GetDataAttributeRequest::name].
13408        ///
13409        /// This is a **required** field for requests.
13410        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13411            self.0.request.name = v.into();
13412            self
13413        }
13414    }
13415
13416    #[doc(hidden)]
13417    impl crate::RequestBuilder for GetDataAttribute {
13418        fn request_options(&mut self) -> &mut crate::RequestOptions {
13419            &mut self.0.options
13420        }
13421    }
13422
13423    /// The request builder for [DataTaxonomyService::list_locations][crate::client::DataTaxonomyService::list_locations] calls.
13424    ///
13425    /// # Example
13426    /// ```
13427    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListLocations;
13428    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13429    /// use google_cloud_gax::paginator::ItemPaginator;
13430    ///
13431    /// let builder = prepare_request_builder();
13432    /// let mut items = builder.by_item();
13433    /// while let Some(result) = items.next().await {
13434    ///   let item = result?;
13435    /// }
13436    /// # Ok(()) }
13437    ///
13438    /// fn prepare_request_builder() -> ListLocations {
13439    ///   # panic!();
13440    ///   // ... details omitted ...
13441    /// }
13442    /// ```
13443    #[derive(Clone, Debug)]
13444    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
13445
13446    impl ListLocations {
13447        pub(crate) fn new(
13448            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13449        ) -> Self {
13450            Self(RequestBuilder::new(stub))
13451        }
13452
13453        /// Sets the full request, replacing any prior values.
13454        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
13455            mut self,
13456            v: V,
13457        ) -> Self {
13458            self.0.request = v.into();
13459            self
13460        }
13461
13462        /// Sets all the options, replacing any prior values.
13463        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13464            self.0.options = v.into();
13465            self
13466        }
13467
13468        /// Sends the request.
13469        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
13470            (*self.0.stub)
13471                .list_locations(self.0.request, self.0.options)
13472                .await
13473                .map(crate::Response::into_body)
13474        }
13475
13476        /// Streams each page in the collection.
13477        pub fn by_page(
13478            self,
13479        ) -> impl google_cloud_gax::paginator::Paginator<
13480            google_cloud_location::model::ListLocationsResponse,
13481            crate::Error,
13482        > {
13483            use std::clone::Clone;
13484            let token = self.0.request.page_token.clone();
13485            let execute = move |token: String| {
13486                let mut builder = self.clone();
13487                builder.0.request = builder.0.request.set_page_token(token);
13488                builder.send()
13489            };
13490            google_cloud_gax::paginator::internal::new_paginator(token, execute)
13491        }
13492
13493        /// Streams each item in the collection.
13494        pub fn by_item(
13495            self,
13496        ) -> impl google_cloud_gax::paginator::ItemPaginator<
13497            google_cloud_location::model::ListLocationsResponse,
13498            crate::Error,
13499        > {
13500            use google_cloud_gax::paginator::Paginator;
13501            self.by_page().items()
13502        }
13503
13504        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
13505        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13506            self.0.request.name = v.into();
13507            self
13508        }
13509
13510        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
13511        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13512            self.0.request.filter = v.into();
13513            self
13514        }
13515
13516        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
13517        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13518            self.0.request.page_size = v.into();
13519            self
13520        }
13521
13522        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
13523        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13524            self.0.request.page_token = v.into();
13525            self
13526        }
13527    }
13528
13529    #[doc(hidden)]
13530    impl crate::RequestBuilder for ListLocations {
13531        fn request_options(&mut self) -> &mut crate::RequestOptions {
13532            &mut self.0.options
13533        }
13534    }
13535
13536    /// The request builder for [DataTaxonomyService::get_location][crate::client::DataTaxonomyService::get_location] calls.
13537    ///
13538    /// # Example
13539    /// ```
13540    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetLocation;
13541    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13542    ///
13543    /// let builder = prepare_request_builder();
13544    /// let response = builder.send().await?;
13545    /// # Ok(()) }
13546    ///
13547    /// fn prepare_request_builder() -> GetLocation {
13548    ///   # panic!();
13549    ///   // ... details omitted ...
13550    /// }
13551    /// ```
13552    #[derive(Clone, Debug)]
13553    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
13554
13555    impl GetLocation {
13556        pub(crate) fn new(
13557            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13558        ) -> Self {
13559            Self(RequestBuilder::new(stub))
13560        }
13561
13562        /// Sets the full request, replacing any prior values.
13563        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
13564            mut self,
13565            v: V,
13566        ) -> Self {
13567            self.0.request = v.into();
13568            self
13569        }
13570
13571        /// Sets all the options, replacing any prior values.
13572        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13573            self.0.options = v.into();
13574            self
13575        }
13576
13577        /// Sends the request.
13578        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
13579            (*self.0.stub)
13580                .get_location(self.0.request, self.0.options)
13581                .await
13582                .map(crate::Response::into_body)
13583        }
13584
13585        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
13586        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13587            self.0.request.name = v.into();
13588            self
13589        }
13590    }
13591
13592    #[doc(hidden)]
13593    impl crate::RequestBuilder for GetLocation {
13594        fn request_options(&mut self) -> &mut crate::RequestOptions {
13595            &mut self.0.options
13596        }
13597    }
13598
13599    /// The request builder for [DataTaxonomyService::set_iam_policy][crate::client::DataTaxonomyService::set_iam_policy] calls.
13600    ///
13601    /// # Example
13602    /// ```
13603    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::SetIamPolicy;
13604    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13605    ///
13606    /// let builder = prepare_request_builder();
13607    /// let response = builder.send().await?;
13608    /// # Ok(()) }
13609    ///
13610    /// fn prepare_request_builder() -> SetIamPolicy {
13611    ///   # panic!();
13612    ///   // ... details omitted ...
13613    /// }
13614    /// ```
13615    #[derive(Clone, Debug)]
13616    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
13617
13618    impl SetIamPolicy {
13619        pub(crate) fn new(
13620            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13621        ) -> Self {
13622            Self(RequestBuilder::new(stub))
13623        }
13624
13625        /// Sets the full request, replacing any prior values.
13626        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
13627            mut self,
13628            v: V,
13629        ) -> Self {
13630            self.0.request = v.into();
13631            self
13632        }
13633
13634        /// Sets all the options, replacing any prior values.
13635        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13636            self.0.options = v.into();
13637            self
13638        }
13639
13640        /// Sends the request.
13641        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
13642            (*self.0.stub)
13643                .set_iam_policy(self.0.request, self.0.options)
13644                .await
13645                .map(crate::Response::into_body)
13646        }
13647
13648        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
13649        ///
13650        /// This is a **required** field for requests.
13651        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
13652            self.0.request.resource = v.into();
13653            self
13654        }
13655
13656        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
13657        ///
13658        /// This is a **required** field for requests.
13659        pub fn set_policy<T>(mut self, v: T) -> Self
13660        where
13661            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
13662        {
13663            self.0.request.policy = std::option::Option::Some(v.into());
13664            self
13665        }
13666
13667        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
13668        ///
13669        /// This is a **required** field for requests.
13670        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
13671        where
13672            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
13673        {
13674            self.0.request.policy = v.map(|x| x.into());
13675            self
13676        }
13677
13678        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
13679        pub fn set_update_mask<T>(mut self, v: T) -> Self
13680        where
13681            T: std::convert::Into<wkt::FieldMask>,
13682        {
13683            self.0.request.update_mask = std::option::Option::Some(v.into());
13684            self
13685        }
13686
13687        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
13688        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
13689        where
13690            T: std::convert::Into<wkt::FieldMask>,
13691        {
13692            self.0.request.update_mask = v.map(|x| x.into());
13693            self
13694        }
13695    }
13696
13697    #[doc(hidden)]
13698    impl crate::RequestBuilder for SetIamPolicy {
13699        fn request_options(&mut self) -> &mut crate::RequestOptions {
13700            &mut self.0.options
13701        }
13702    }
13703
13704    /// The request builder for [DataTaxonomyService::get_iam_policy][crate::client::DataTaxonomyService::get_iam_policy] calls.
13705    ///
13706    /// # Example
13707    /// ```
13708    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetIamPolicy;
13709    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13710    ///
13711    /// let builder = prepare_request_builder();
13712    /// let response = builder.send().await?;
13713    /// # Ok(()) }
13714    ///
13715    /// fn prepare_request_builder() -> GetIamPolicy {
13716    ///   # panic!();
13717    ///   // ... details omitted ...
13718    /// }
13719    /// ```
13720    #[derive(Clone, Debug)]
13721    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
13722
13723    impl GetIamPolicy {
13724        pub(crate) fn new(
13725            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13726        ) -> Self {
13727            Self(RequestBuilder::new(stub))
13728        }
13729
13730        /// Sets the full request, replacing any prior values.
13731        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
13732            mut self,
13733            v: V,
13734        ) -> Self {
13735            self.0.request = v.into();
13736            self
13737        }
13738
13739        /// Sets all the options, replacing any prior values.
13740        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13741            self.0.options = v.into();
13742            self
13743        }
13744
13745        /// Sends the request.
13746        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
13747            (*self.0.stub)
13748                .get_iam_policy(self.0.request, self.0.options)
13749                .await
13750                .map(crate::Response::into_body)
13751        }
13752
13753        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
13754        ///
13755        /// This is a **required** field for requests.
13756        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
13757            self.0.request.resource = v.into();
13758            self
13759        }
13760
13761        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
13762        pub fn set_options<T>(mut self, v: T) -> Self
13763        where
13764            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
13765        {
13766            self.0.request.options = std::option::Option::Some(v.into());
13767            self
13768        }
13769
13770        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
13771        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
13772        where
13773            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
13774        {
13775            self.0.request.options = v.map(|x| x.into());
13776            self
13777        }
13778    }
13779
13780    #[doc(hidden)]
13781    impl crate::RequestBuilder for GetIamPolicy {
13782        fn request_options(&mut self) -> &mut crate::RequestOptions {
13783            &mut self.0.options
13784        }
13785    }
13786
13787    /// The request builder for [DataTaxonomyService::test_iam_permissions][crate::client::DataTaxonomyService::test_iam_permissions] calls.
13788    ///
13789    /// # Example
13790    /// ```
13791    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::TestIamPermissions;
13792    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13793    ///
13794    /// let builder = prepare_request_builder();
13795    /// let response = builder.send().await?;
13796    /// # Ok(()) }
13797    ///
13798    /// fn prepare_request_builder() -> TestIamPermissions {
13799    ///   # panic!();
13800    ///   // ... details omitted ...
13801    /// }
13802    /// ```
13803    #[derive(Clone, Debug)]
13804    pub struct TestIamPermissions(
13805        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
13806    );
13807
13808    impl TestIamPermissions {
13809        pub(crate) fn new(
13810            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13811        ) -> Self {
13812            Self(RequestBuilder::new(stub))
13813        }
13814
13815        /// Sets the full request, replacing any prior values.
13816        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
13817            mut self,
13818            v: V,
13819        ) -> Self {
13820            self.0.request = v.into();
13821            self
13822        }
13823
13824        /// Sets all the options, replacing any prior values.
13825        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13826            self.0.options = v.into();
13827            self
13828        }
13829
13830        /// Sends the request.
13831        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
13832            (*self.0.stub)
13833                .test_iam_permissions(self.0.request, self.0.options)
13834                .await
13835                .map(crate::Response::into_body)
13836        }
13837
13838        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
13839        ///
13840        /// This is a **required** field for requests.
13841        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
13842            self.0.request.resource = v.into();
13843            self
13844        }
13845
13846        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
13847        ///
13848        /// This is a **required** field for requests.
13849        pub fn set_permissions<T, V>(mut self, v: T) -> Self
13850        where
13851            T: std::iter::IntoIterator<Item = V>,
13852            V: std::convert::Into<std::string::String>,
13853        {
13854            use std::iter::Iterator;
13855            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
13856            self
13857        }
13858    }
13859
13860    #[doc(hidden)]
13861    impl crate::RequestBuilder for TestIamPermissions {
13862        fn request_options(&mut self) -> &mut crate::RequestOptions {
13863            &mut self.0.options
13864        }
13865    }
13866
13867    /// The request builder for [DataTaxonomyService::list_operations][crate::client::DataTaxonomyService::list_operations] calls.
13868    ///
13869    /// # Example
13870    /// ```
13871    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListOperations;
13872    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13873    /// use google_cloud_gax::paginator::ItemPaginator;
13874    ///
13875    /// let builder = prepare_request_builder();
13876    /// let mut items = builder.by_item();
13877    /// while let Some(result) = items.next().await {
13878    ///   let item = result?;
13879    /// }
13880    /// # Ok(()) }
13881    ///
13882    /// fn prepare_request_builder() -> ListOperations {
13883    ///   # panic!();
13884    ///   // ... details omitted ...
13885    /// }
13886    /// ```
13887    #[derive(Clone, Debug)]
13888    pub struct ListOperations(
13889        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
13890    );
13891
13892    impl ListOperations {
13893        pub(crate) fn new(
13894            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13895        ) -> Self {
13896            Self(RequestBuilder::new(stub))
13897        }
13898
13899        /// Sets the full request, replacing any prior values.
13900        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
13901            mut self,
13902            v: V,
13903        ) -> Self {
13904            self.0.request = v.into();
13905            self
13906        }
13907
13908        /// Sets all the options, replacing any prior values.
13909        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13910            self.0.options = v.into();
13911            self
13912        }
13913
13914        /// Sends the request.
13915        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
13916            (*self.0.stub)
13917                .list_operations(self.0.request, self.0.options)
13918                .await
13919                .map(crate::Response::into_body)
13920        }
13921
13922        /// Streams each page in the collection.
13923        pub fn by_page(
13924            self,
13925        ) -> impl google_cloud_gax::paginator::Paginator<
13926            google_cloud_longrunning::model::ListOperationsResponse,
13927            crate::Error,
13928        > {
13929            use std::clone::Clone;
13930            let token = self.0.request.page_token.clone();
13931            let execute = move |token: String| {
13932                let mut builder = self.clone();
13933                builder.0.request = builder.0.request.set_page_token(token);
13934                builder.send()
13935            };
13936            google_cloud_gax::paginator::internal::new_paginator(token, execute)
13937        }
13938
13939        /// Streams each item in the collection.
13940        pub fn by_item(
13941            self,
13942        ) -> impl google_cloud_gax::paginator::ItemPaginator<
13943            google_cloud_longrunning::model::ListOperationsResponse,
13944            crate::Error,
13945        > {
13946            use google_cloud_gax::paginator::Paginator;
13947            self.by_page().items()
13948        }
13949
13950        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
13951        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13952            self.0.request.name = v.into();
13953            self
13954        }
13955
13956        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
13957        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13958            self.0.request.filter = v.into();
13959            self
13960        }
13961
13962        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
13963        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13964            self.0.request.page_size = v.into();
13965            self
13966        }
13967
13968        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
13969        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13970            self.0.request.page_token = v.into();
13971            self
13972        }
13973
13974        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
13975        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
13976            self.0.request.return_partial_success = v.into();
13977            self
13978        }
13979    }
13980
13981    #[doc(hidden)]
13982    impl crate::RequestBuilder for ListOperations {
13983        fn request_options(&mut self) -> &mut crate::RequestOptions {
13984            &mut self.0.options
13985        }
13986    }
13987
13988    /// The request builder for [DataTaxonomyService::get_operation][crate::client::DataTaxonomyService::get_operation] calls.
13989    ///
13990    /// # Example
13991    /// ```
13992    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetOperation;
13993    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13994    ///
13995    /// let builder = prepare_request_builder();
13996    /// let response = builder.send().await?;
13997    /// # Ok(()) }
13998    ///
13999    /// fn prepare_request_builder() -> GetOperation {
14000    ///   # panic!();
14001    ///   // ... details omitted ...
14002    /// }
14003    /// ```
14004    #[derive(Clone, Debug)]
14005    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
14006
14007    impl GetOperation {
14008        pub(crate) fn new(
14009            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
14010        ) -> Self {
14011            Self(RequestBuilder::new(stub))
14012        }
14013
14014        /// Sets the full request, replacing any prior values.
14015        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
14016            mut self,
14017            v: V,
14018        ) -> Self {
14019            self.0.request = v.into();
14020            self
14021        }
14022
14023        /// Sets all the options, replacing any prior values.
14024        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14025            self.0.options = v.into();
14026            self
14027        }
14028
14029        /// Sends the request.
14030        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14031            (*self.0.stub)
14032                .get_operation(self.0.request, self.0.options)
14033                .await
14034                .map(crate::Response::into_body)
14035        }
14036
14037        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
14038        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14039            self.0.request.name = v.into();
14040            self
14041        }
14042    }
14043
14044    #[doc(hidden)]
14045    impl crate::RequestBuilder for GetOperation {
14046        fn request_options(&mut self) -> &mut crate::RequestOptions {
14047            &mut self.0.options
14048        }
14049    }
14050
14051    /// The request builder for [DataTaxonomyService::delete_operation][crate::client::DataTaxonomyService::delete_operation] calls.
14052    ///
14053    /// # Example
14054    /// ```
14055    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteOperation;
14056    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14057    ///
14058    /// let builder = prepare_request_builder();
14059    /// let response = builder.send().await?;
14060    /// # Ok(()) }
14061    ///
14062    /// fn prepare_request_builder() -> DeleteOperation {
14063    ///   # panic!();
14064    ///   // ... details omitted ...
14065    /// }
14066    /// ```
14067    #[derive(Clone, Debug)]
14068    pub struct DeleteOperation(
14069        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
14070    );
14071
14072    impl DeleteOperation {
14073        pub(crate) fn new(
14074            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
14075        ) -> Self {
14076            Self(RequestBuilder::new(stub))
14077        }
14078
14079        /// Sets the full request, replacing any prior values.
14080        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
14081            mut self,
14082            v: V,
14083        ) -> Self {
14084            self.0.request = v.into();
14085            self
14086        }
14087
14088        /// Sets all the options, replacing any prior values.
14089        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14090            self.0.options = v.into();
14091            self
14092        }
14093
14094        /// Sends the request.
14095        pub async fn send(self) -> Result<()> {
14096            (*self.0.stub)
14097                .delete_operation(self.0.request, self.0.options)
14098                .await
14099                .map(crate::Response::into_body)
14100        }
14101
14102        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
14103        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14104            self.0.request.name = v.into();
14105            self
14106        }
14107    }
14108
14109    #[doc(hidden)]
14110    impl crate::RequestBuilder for DeleteOperation {
14111        fn request_options(&mut self) -> &mut crate::RequestOptions {
14112            &mut self.0.options
14113        }
14114    }
14115
14116    /// The request builder for [DataTaxonomyService::cancel_operation][crate::client::DataTaxonomyService::cancel_operation] calls.
14117    ///
14118    /// # Example
14119    /// ```
14120    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CancelOperation;
14121    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14122    ///
14123    /// let builder = prepare_request_builder();
14124    /// let response = builder.send().await?;
14125    /// # Ok(()) }
14126    ///
14127    /// fn prepare_request_builder() -> CancelOperation {
14128    ///   # panic!();
14129    ///   // ... details omitted ...
14130    /// }
14131    /// ```
14132    #[derive(Clone, Debug)]
14133    pub struct CancelOperation(
14134        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
14135    );
14136
14137    impl CancelOperation {
14138        pub(crate) fn new(
14139            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
14140        ) -> Self {
14141            Self(RequestBuilder::new(stub))
14142        }
14143
14144        /// Sets the full request, replacing any prior values.
14145        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
14146            mut self,
14147            v: V,
14148        ) -> Self {
14149            self.0.request = v.into();
14150            self
14151        }
14152
14153        /// Sets all the options, replacing any prior values.
14154        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14155            self.0.options = v.into();
14156            self
14157        }
14158
14159        /// Sends the request.
14160        pub async fn send(self) -> Result<()> {
14161            (*self.0.stub)
14162                .cancel_operation(self.0.request, self.0.options)
14163                .await
14164                .map(crate::Response::into_body)
14165        }
14166
14167        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
14168        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14169            self.0.request.name = v.into();
14170            self
14171        }
14172    }
14173
14174    #[doc(hidden)]
14175    impl crate::RequestBuilder for CancelOperation {
14176        fn request_options(&mut self) -> &mut crate::RequestOptions {
14177            &mut self.0.options
14178        }
14179    }
14180}
14181
14182/// Request and client builders for [DataScanService][crate::client::DataScanService].
14183pub mod data_scan_service {
14184    use crate::Result;
14185
14186    /// A builder for [DataScanService][crate::client::DataScanService].
14187    ///
14188    /// ```
14189    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
14190    /// # use google_cloud_dataplex_v1::*;
14191    /// # use builder::data_scan_service::ClientBuilder;
14192    /// # use client::DataScanService;
14193    /// let builder : ClientBuilder = DataScanService::builder();
14194    /// let client = builder
14195    ///     .with_endpoint("https://dataplex.googleapis.com")
14196    ///     .build().await?;
14197    /// # Ok(()) }
14198    /// ```
14199    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
14200
14201    pub(crate) mod client {
14202        use super::super::super::client::DataScanService;
14203        pub struct Factory;
14204        impl crate::ClientFactory for Factory {
14205            type Client = DataScanService;
14206            type Credentials = gaxi::options::Credentials;
14207            async fn build(
14208                self,
14209                config: gaxi::options::ClientConfig,
14210            ) -> crate::ClientBuilderResult<Self::Client> {
14211                Self::Client::new(config).await
14212            }
14213        }
14214    }
14215
14216    /// Common implementation for [crate::client::DataScanService] request builders.
14217    #[derive(Clone, Debug)]
14218    pub(crate) struct RequestBuilder<R: std::default::Default> {
14219        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14220        request: R,
14221        options: crate::RequestOptions,
14222    }
14223
14224    impl<R> RequestBuilder<R>
14225    where
14226        R: std::default::Default,
14227    {
14228        pub(crate) fn new(
14229            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14230        ) -> Self {
14231            Self {
14232                stub,
14233                request: R::default(),
14234                options: crate::RequestOptions::default(),
14235            }
14236        }
14237    }
14238
14239    /// The request builder for [DataScanService::create_data_scan][crate::client::DataScanService::create_data_scan] calls.
14240    ///
14241    /// # Example
14242    /// ```
14243    /// # use google_cloud_dataplex_v1::builder::data_scan_service::CreateDataScan;
14244    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14245    /// use google_cloud_lro::Poller;
14246    ///
14247    /// let builder = prepare_request_builder();
14248    /// let response = builder.poller().until_done().await?;
14249    /// # Ok(()) }
14250    ///
14251    /// fn prepare_request_builder() -> CreateDataScan {
14252    ///   # panic!();
14253    ///   // ... details omitted ...
14254    /// }
14255    /// ```
14256    #[derive(Clone, Debug)]
14257    pub struct CreateDataScan(RequestBuilder<crate::model::CreateDataScanRequest>);
14258
14259    impl CreateDataScan {
14260        pub(crate) fn new(
14261            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14262        ) -> Self {
14263            Self(RequestBuilder::new(stub))
14264        }
14265
14266        /// Sets the full request, replacing any prior values.
14267        pub fn with_request<V: Into<crate::model::CreateDataScanRequest>>(mut self, v: V) -> Self {
14268            self.0.request = v.into();
14269            self
14270        }
14271
14272        /// Sets all the options, replacing any prior values.
14273        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14274            self.0.options = v.into();
14275            self
14276        }
14277
14278        /// Sends the request.
14279        ///
14280        /// # Long running operations
14281        ///
14282        /// This starts, but does not poll, a longrunning operation. More information
14283        /// on [create_data_scan][crate::client::DataScanService::create_data_scan].
14284        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14285            (*self.0.stub)
14286                .create_data_scan(self.0.request, self.0.options)
14287                .await
14288                .map(crate::Response::into_body)
14289        }
14290
14291        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_scan`.
14292        pub fn poller(
14293            self,
14294        ) -> impl google_cloud_lro::Poller<crate::model::DataScan, crate::model::OperationMetadata>
14295        {
14296            type Operation = google_cloud_lro::internal::Operation<
14297                crate::model::DataScan,
14298                crate::model::OperationMetadata,
14299            >;
14300            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14301            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14302
14303            let stub = self.0.stub.clone();
14304            let mut options = self.0.options.clone();
14305            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
14306            let query = move |name| {
14307                let stub = stub.clone();
14308                let options = options.clone();
14309                async {
14310                    let op = GetOperation::new(stub)
14311                        .set_name(name)
14312                        .with_options(options)
14313                        .send()
14314                        .await?;
14315                    Ok(Operation::new(op))
14316                }
14317            };
14318
14319            let start = move || async {
14320                let op = self.send().await?;
14321                Ok(Operation::new(op))
14322            };
14323
14324            google_cloud_lro::internal::new_poller(
14325                polling_error_policy,
14326                polling_backoff_policy,
14327                start,
14328                query,
14329            )
14330        }
14331
14332        /// Sets the value of [parent][crate::model::CreateDataScanRequest::parent].
14333        ///
14334        /// This is a **required** field for requests.
14335        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14336            self.0.request.parent = v.into();
14337            self
14338        }
14339
14340        /// Sets the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
14341        ///
14342        /// This is a **required** field for requests.
14343        pub fn set_data_scan<T>(mut self, v: T) -> Self
14344        where
14345            T: std::convert::Into<crate::model::DataScan>,
14346        {
14347            self.0.request.data_scan = std::option::Option::Some(v.into());
14348            self
14349        }
14350
14351        /// Sets or clears the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
14352        ///
14353        /// This is a **required** field for requests.
14354        pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
14355        where
14356            T: std::convert::Into<crate::model::DataScan>,
14357        {
14358            self.0.request.data_scan = v.map(|x| x.into());
14359            self
14360        }
14361
14362        /// Sets the value of [data_scan_id][crate::model::CreateDataScanRequest::data_scan_id].
14363        pub fn set_data_scan_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
14364            self.0.request.data_scan_id = v.into();
14365            self
14366        }
14367
14368        /// Sets the value of [validate_only][crate::model::CreateDataScanRequest::validate_only].
14369        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
14370            self.0.request.validate_only = v.into();
14371            self
14372        }
14373    }
14374
14375    #[doc(hidden)]
14376    impl crate::RequestBuilder for CreateDataScan {
14377        fn request_options(&mut self) -> &mut crate::RequestOptions {
14378            &mut self.0.options
14379        }
14380    }
14381
14382    /// The request builder for [DataScanService::update_data_scan][crate::client::DataScanService::update_data_scan] calls.
14383    ///
14384    /// # Example
14385    /// ```
14386    /// # use google_cloud_dataplex_v1::builder::data_scan_service::UpdateDataScan;
14387    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14388    /// use google_cloud_lro::Poller;
14389    ///
14390    /// let builder = prepare_request_builder();
14391    /// let response = builder.poller().until_done().await?;
14392    /// # Ok(()) }
14393    ///
14394    /// fn prepare_request_builder() -> UpdateDataScan {
14395    ///   # panic!();
14396    ///   // ... details omitted ...
14397    /// }
14398    /// ```
14399    #[derive(Clone, Debug)]
14400    pub struct UpdateDataScan(RequestBuilder<crate::model::UpdateDataScanRequest>);
14401
14402    impl UpdateDataScan {
14403        pub(crate) fn new(
14404            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14405        ) -> Self {
14406            Self(RequestBuilder::new(stub))
14407        }
14408
14409        /// Sets the full request, replacing any prior values.
14410        pub fn with_request<V: Into<crate::model::UpdateDataScanRequest>>(mut self, v: V) -> Self {
14411            self.0.request = v.into();
14412            self
14413        }
14414
14415        /// Sets all the options, replacing any prior values.
14416        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14417            self.0.options = v.into();
14418            self
14419        }
14420
14421        /// Sends the request.
14422        ///
14423        /// # Long running operations
14424        ///
14425        /// This starts, but does not poll, a longrunning operation. More information
14426        /// on [update_data_scan][crate::client::DataScanService::update_data_scan].
14427        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14428            (*self.0.stub)
14429                .update_data_scan(self.0.request, self.0.options)
14430                .await
14431                .map(crate::Response::into_body)
14432        }
14433
14434        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_scan`.
14435        pub fn poller(
14436            self,
14437        ) -> impl google_cloud_lro::Poller<crate::model::DataScan, crate::model::OperationMetadata>
14438        {
14439            type Operation = google_cloud_lro::internal::Operation<
14440                crate::model::DataScan,
14441                crate::model::OperationMetadata,
14442            >;
14443            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14444            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14445
14446            let stub = self.0.stub.clone();
14447            let mut options = self.0.options.clone();
14448            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
14449            let query = move |name| {
14450                let stub = stub.clone();
14451                let options = options.clone();
14452                async {
14453                    let op = GetOperation::new(stub)
14454                        .set_name(name)
14455                        .with_options(options)
14456                        .send()
14457                        .await?;
14458                    Ok(Operation::new(op))
14459                }
14460            };
14461
14462            let start = move || async {
14463                let op = self.send().await?;
14464                Ok(Operation::new(op))
14465            };
14466
14467            google_cloud_lro::internal::new_poller(
14468                polling_error_policy,
14469                polling_backoff_policy,
14470                start,
14471                query,
14472            )
14473        }
14474
14475        /// Sets the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
14476        ///
14477        /// This is a **required** field for requests.
14478        pub fn set_data_scan<T>(mut self, v: T) -> Self
14479        where
14480            T: std::convert::Into<crate::model::DataScan>,
14481        {
14482            self.0.request.data_scan = std::option::Option::Some(v.into());
14483            self
14484        }
14485
14486        /// Sets or clears the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
14487        ///
14488        /// This is a **required** field for requests.
14489        pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
14490        where
14491            T: std::convert::Into<crate::model::DataScan>,
14492        {
14493            self.0.request.data_scan = v.map(|x| x.into());
14494            self
14495        }
14496
14497        /// Sets the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
14498        pub fn set_update_mask<T>(mut self, v: T) -> Self
14499        where
14500            T: std::convert::Into<wkt::FieldMask>,
14501        {
14502            self.0.request.update_mask = std::option::Option::Some(v.into());
14503            self
14504        }
14505
14506        /// Sets or clears the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
14507        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
14508        where
14509            T: std::convert::Into<wkt::FieldMask>,
14510        {
14511            self.0.request.update_mask = v.map(|x| x.into());
14512            self
14513        }
14514
14515        /// Sets the value of [validate_only][crate::model::UpdateDataScanRequest::validate_only].
14516        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
14517            self.0.request.validate_only = v.into();
14518            self
14519        }
14520    }
14521
14522    #[doc(hidden)]
14523    impl crate::RequestBuilder for UpdateDataScan {
14524        fn request_options(&mut self) -> &mut crate::RequestOptions {
14525            &mut self.0.options
14526        }
14527    }
14528
14529    /// The request builder for [DataScanService::delete_data_scan][crate::client::DataScanService::delete_data_scan] calls.
14530    ///
14531    /// # Example
14532    /// ```
14533    /// # use google_cloud_dataplex_v1::builder::data_scan_service::DeleteDataScan;
14534    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14535    /// use google_cloud_lro::Poller;
14536    ///
14537    /// let builder = prepare_request_builder();
14538    /// let response = builder.poller().until_done().await?;
14539    /// # Ok(()) }
14540    ///
14541    /// fn prepare_request_builder() -> DeleteDataScan {
14542    ///   # panic!();
14543    ///   // ... details omitted ...
14544    /// }
14545    /// ```
14546    #[derive(Clone, Debug)]
14547    pub struct DeleteDataScan(RequestBuilder<crate::model::DeleteDataScanRequest>);
14548
14549    impl DeleteDataScan {
14550        pub(crate) fn new(
14551            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14552        ) -> Self {
14553            Self(RequestBuilder::new(stub))
14554        }
14555
14556        /// Sets the full request, replacing any prior values.
14557        pub fn with_request<V: Into<crate::model::DeleteDataScanRequest>>(mut self, v: V) -> Self {
14558            self.0.request = v.into();
14559            self
14560        }
14561
14562        /// Sets all the options, replacing any prior values.
14563        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14564            self.0.options = v.into();
14565            self
14566        }
14567
14568        /// Sends the request.
14569        ///
14570        /// # Long running operations
14571        ///
14572        /// This starts, but does not poll, a longrunning operation. More information
14573        /// on [delete_data_scan][crate::client::DataScanService::delete_data_scan].
14574        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14575            (*self.0.stub)
14576                .delete_data_scan(self.0.request, self.0.options)
14577                .await
14578                .map(crate::Response::into_body)
14579        }
14580
14581        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_scan`.
14582        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
14583            type Operation =
14584                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
14585            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14586            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14587
14588            let stub = self.0.stub.clone();
14589            let mut options = self.0.options.clone();
14590            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
14591            let query = move |name| {
14592                let stub = stub.clone();
14593                let options = options.clone();
14594                async {
14595                    let op = GetOperation::new(stub)
14596                        .set_name(name)
14597                        .with_options(options)
14598                        .send()
14599                        .await?;
14600                    Ok(Operation::new(op))
14601                }
14602            };
14603
14604            let start = move || async {
14605                let op = self.send().await?;
14606                Ok(Operation::new(op))
14607            };
14608
14609            google_cloud_lro::internal::new_unit_response_poller(
14610                polling_error_policy,
14611                polling_backoff_policy,
14612                start,
14613                query,
14614            )
14615        }
14616
14617        /// Sets the value of [name][crate::model::DeleteDataScanRequest::name].
14618        ///
14619        /// This is a **required** field for requests.
14620        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14621            self.0.request.name = v.into();
14622            self
14623        }
14624
14625        /// Sets the value of [force][crate::model::DeleteDataScanRequest::force].
14626        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
14627            self.0.request.force = v.into();
14628            self
14629        }
14630    }
14631
14632    #[doc(hidden)]
14633    impl crate::RequestBuilder for DeleteDataScan {
14634        fn request_options(&mut self) -> &mut crate::RequestOptions {
14635            &mut self.0.options
14636        }
14637    }
14638
14639    /// The request builder for [DataScanService::get_data_scan][crate::client::DataScanService::get_data_scan] calls.
14640    ///
14641    /// # Example
14642    /// ```
14643    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetDataScan;
14644    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14645    ///
14646    /// let builder = prepare_request_builder();
14647    /// let response = builder.send().await?;
14648    /// # Ok(()) }
14649    ///
14650    /// fn prepare_request_builder() -> GetDataScan {
14651    ///   # panic!();
14652    ///   // ... details omitted ...
14653    /// }
14654    /// ```
14655    #[derive(Clone, Debug)]
14656    pub struct GetDataScan(RequestBuilder<crate::model::GetDataScanRequest>);
14657
14658    impl GetDataScan {
14659        pub(crate) fn new(
14660            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14661        ) -> Self {
14662            Self(RequestBuilder::new(stub))
14663        }
14664
14665        /// Sets the full request, replacing any prior values.
14666        pub fn with_request<V: Into<crate::model::GetDataScanRequest>>(mut self, v: V) -> Self {
14667            self.0.request = v.into();
14668            self
14669        }
14670
14671        /// Sets all the options, replacing any prior values.
14672        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14673            self.0.options = v.into();
14674            self
14675        }
14676
14677        /// Sends the request.
14678        pub async fn send(self) -> Result<crate::model::DataScan> {
14679            (*self.0.stub)
14680                .get_data_scan(self.0.request, self.0.options)
14681                .await
14682                .map(crate::Response::into_body)
14683        }
14684
14685        /// Sets the value of [name][crate::model::GetDataScanRequest::name].
14686        ///
14687        /// This is a **required** field for requests.
14688        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14689            self.0.request.name = v.into();
14690            self
14691        }
14692
14693        /// Sets the value of [view][crate::model::GetDataScanRequest::view].
14694        pub fn set_view<T: Into<crate::model::get_data_scan_request::DataScanView>>(
14695            mut self,
14696            v: T,
14697        ) -> Self {
14698            self.0.request.view = v.into();
14699            self
14700        }
14701    }
14702
14703    #[doc(hidden)]
14704    impl crate::RequestBuilder for GetDataScan {
14705        fn request_options(&mut self) -> &mut crate::RequestOptions {
14706            &mut self.0.options
14707        }
14708    }
14709
14710    /// The request builder for [DataScanService::list_data_scans][crate::client::DataScanService::list_data_scans] calls.
14711    ///
14712    /// # Example
14713    /// ```
14714    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListDataScans;
14715    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14716    /// use google_cloud_gax::paginator::ItemPaginator;
14717    ///
14718    /// let builder = prepare_request_builder();
14719    /// let mut items = builder.by_item();
14720    /// while let Some(result) = items.next().await {
14721    ///   let item = result?;
14722    /// }
14723    /// # Ok(()) }
14724    ///
14725    /// fn prepare_request_builder() -> ListDataScans {
14726    ///   # panic!();
14727    ///   // ... details omitted ...
14728    /// }
14729    /// ```
14730    #[derive(Clone, Debug)]
14731    pub struct ListDataScans(RequestBuilder<crate::model::ListDataScansRequest>);
14732
14733    impl ListDataScans {
14734        pub(crate) fn new(
14735            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14736        ) -> Self {
14737            Self(RequestBuilder::new(stub))
14738        }
14739
14740        /// Sets the full request, replacing any prior values.
14741        pub fn with_request<V: Into<crate::model::ListDataScansRequest>>(mut self, v: V) -> Self {
14742            self.0.request = v.into();
14743            self
14744        }
14745
14746        /// Sets all the options, replacing any prior values.
14747        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14748            self.0.options = v.into();
14749            self
14750        }
14751
14752        /// Sends the request.
14753        pub async fn send(self) -> Result<crate::model::ListDataScansResponse> {
14754            (*self.0.stub)
14755                .list_data_scans(self.0.request, self.0.options)
14756                .await
14757                .map(crate::Response::into_body)
14758        }
14759
14760        /// Streams each page in the collection.
14761        pub fn by_page(
14762            self,
14763        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListDataScansResponse, crate::Error>
14764        {
14765            use std::clone::Clone;
14766            let token = self.0.request.page_token.clone();
14767            let execute = move |token: String| {
14768                let mut builder = self.clone();
14769                builder.0.request = builder.0.request.set_page_token(token);
14770                builder.send()
14771            };
14772            google_cloud_gax::paginator::internal::new_paginator(token, execute)
14773        }
14774
14775        /// Streams each item in the collection.
14776        pub fn by_item(
14777            self,
14778        ) -> impl google_cloud_gax::paginator::ItemPaginator<
14779            crate::model::ListDataScansResponse,
14780            crate::Error,
14781        > {
14782            use google_cloud_gax::paginator::Paginator;
14783            self.by_page().items()
14784        }
14785
14786        /// Sets the value of [parent][crate::model::ListDataScansRequest::parent].
14787        ///
14788        /// This is a **required** field for requests.
14789        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14790            self.0.request.parent = v.into();
14791            self
14792        }
14793
14794        /// Sets the value of [page_size][crate::model::ListDataScansRequest::page_size].
14795        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
14796            self.0.request.page_size = v.into();
14797            self
14798        }
14799
14800        /// Sets the value of [page_token][crate::model::ListDataScansRequest::page_token].
14801        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
14802            self.0.request.page_token = v.into();
14803            self
14804        }
14805
14806        /// Sets the value of [filter][crate::model::ListDataScansRequest::filter].
14807        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
14808            self.0.request.filter = v.into();
14809            self
14810        }
14811
14812        /// Sets the value of [order_by][crate::model::ListDataScansRequest::order_by].
14813        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
14814            self.0.request.order_by = v.into();
14815            self
14816        }
14817    }
14818
14819    #[doc(hidden)]
14820    impl crate::RequestBuilder for ListDataScans {
14821        fn request_options(&mut self) -> &mut crate::RequestOptions {
14822            &mut self.0.options
14823        }
14824    }
14825
14826    /// The request builder for [DataScanService::run_data_scan][crate::client::DataScanService::run_data_scan] calls.
14827    ///
14828    /// # Example
14829    /// ```
14830    /// # use google_cloud_dataplex_v1::builder::data_scan_service::RunDataScan;
14831    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14832    ///
14833    /// let builder = prepare_request_builder();
14834    /// let response = builder.send().await?;
14835    /// # Ok(()) }
14836    ///
14837    /// fn prepare_request_builder() -> RunDataScan {
14838    ///   # panic!();
14839    ///   // ... details omitted ...
14840    /// }
14841    /// ```
14842    #[derive(Clone, Debug)]
14843    pub struct RunDataScan(RequestBuilder<crate::model::RunDataScanRequest>);
14844
14845    impl RunDataScan {
14846        pub(crate) fn new(
14847            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14848        ) -> Self {
14849            Self(RequestBuilder::new(stub))
14850        }
14851
14852        /// Sets the full request, replacing any prior values.
14853        pub fn with_request<V: Into<crate::model::RunDataScanRequest>>(mut self, v: V) -> Self {
14854            self.0.request = v.into();
14855            self
14856        }
14857
14858        /// Sets all the options, replacing any prior values.
14859        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14860            self.0.options = v.into();
14861            self
14862        }
14863
14864        /// Sends the request.
14865        pub async fn send(self) -> Result<crate::model::RunDataScanResponse> {
14866            (*self.0.stub)
14867                .run_data_scan(self.0.request, self.0.options)
14868                .await
14869                .map(crate::Response::into_body)
14870        }
14871
14872        /// Sets the value of [name][crate::model::RunDataScanRequest::name].
14873        ///
14874        /// This is a **required** field for requests.
14875        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14876            self.0.request.name = v.into();
14877            self
14878        }
14879    }
14880
14881    #[doc(hidden)]
14882    impl crate::RequestBuilder for RunDataScan {
14883        fn request_options(&mut self) -> &mut crate::RequestOptions {
14884            &mut self.0.options
14885        }
14886    }
14887
14888    /// The request builder for [DataScanService::get_data_scan_job][crate::client::DataScanService::get_data_scan_job] calls.
14889    ///
14890    /// # Example
14891    /// ```
14892    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetDataScanJob;
14893    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14894    ///
14895    /// let builder = prepare_request_builder();
14896    /// let response = builder.send().await?;
14897    /// # Ok(()) }
14898    ///
14899    /// fn prepare_request_builder() -> GetDataScanJob {
14900    ///   # panic!();
14901    ///   // ... details omitted ...
14902    /// }
14903    /// ```
14904    #[derive(Clone, Debug)]
14905    pub struct GetDataScanJob(RequestBuilder<crate::model::GetDataScanJobRequest>);
14906
14907    impl GetDataScanJob {
14908        pub(crate) fn new(
14909            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14910        ) -> Self {
14911            Self(RequestBuilder::new(stub))
14912        }
14913
14914        /// Sets the full request, replacing any prior values.
14915        pub fn with_request<V: Into<crate::model::GetDataScanJobRequest>>(mut self, v: V) -> Self {
14916            self.0.request = v.into();
14917            self
14918        }
14919
14920        /// Sets all the options, replacing any prior values.
14921        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14922            self.0.options = v.into();
14923            self
14924        }
14925
14926        /// Sends the request.
14927        pub async fn send(self) -> Result<crate::model::DataScanJob> {
14928            (*self.0.stub)
14929                .get_data_scan_job(self.0.request, self.0.options)
14930                .await
14931                .map(crate::Response::into_body)
14932        }
14933
14934        /// Sets the value of [name][crate::model::GetDataScanJobRequest::name].
14935        ///
14936        /// This is a **required** field for requests.
14937        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14938            self.0.request.name = v.into();
14939            self
14940        }
14941
14942        /// Sets the value of [view][crate::model::GetDataScanJobRequest::view].
14943        pub fn set_view<T: Into<crate::model::get_data_scan_job_request::DataScanJobView>>(
14944            mut self,
14945            v: T,
14946        ) -> Self {
14947            self.0.request.view = v.into();
14948            self
14949        }
14950    }
14951
14952    #[doc(hidden)]
14953    impl crate::RequestBuilder for GetDataScanJob {
14954        fn request_options(&mut self) -> &mut crate::RequestOptions {
14955            &mut self.0.options
14956        }
14957    }
14958
14959    /// The request builder for [DataScanService::list_data_scan_jobs][crate::client::DataScanService::list_data_scan_jobs] calls.
14960    ///
14961    /// # Example
14962    /// ```
14963    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListDataScanJobs;
14964    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14965    /// use google_cloud_gax::paginator::ItemPaginator;
14966    ///
14967    /// let builder = prepare_request_builder();
14968    /// let mut items = builder.by_item();
14969    /// while let Some(result) = items.next().await {
14970    ///   let item = result?;
14971    /// }
14972    /// # Ok(()) }
14973    ///
14974    /// fn prepare_request_builder() -> ListDataScanJobs {
14975    ///   # panic!();
14976    ///   // ... details omitted ...
14977    /// }
14978    /// ```
14979    #[derive(Clone, Debug)]
14980    pub struct ListDataScanJobs(RequestBuilder<crate::model::ListDataScanJobsRequest>);
14981
14982    impl ListDataScanJobs {
14983        pub(crate) fn new(
14984            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14985        ) -> Self {
14986            Self(RequestBuilder::new(stub))
14987        }
14988
14989        /// Sets the full request, replacing any prior values.
14990        pub fn with_request<V: Into<crate::model::ListDataScanJobsRequest>>(
14991            mut self,
14992            v: V,
14993        ) -> Self {
14994            self.0.request = v.into();
14995            self
14996        }
14997
14998        /// Sets all the options, replacing any prior values.
14999        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15000            self.0.options = v.into();
15001            self
15002        }
15003
15004        /// Sends the request.
15005        pub async fn send(self) -> Result<crate::model::ListDataScanJobsResponse> {
15006            (*self.0.stub)
15007                .list_data_scan_jobs(self.0.request, self.0.options)
15008                .await
15009                .map(crate::Response::into_body)
15010        }
15011
15012        /// Streams each page in the collection.
15013        pub fn by_page(
15014            self,
15015        ) -> impl google_cloud_gax::paginator::Paginator<
15016            crate::model::ListDataScanJobsResponse,
15017            crate::Error,
15018        > {
15019            use std::clone::Clone;
15020            let token = self.0.request.page_token.clone();
15021            let execute = move |token: String| {
15022                let mut builder = self.clone();
15023                builder.0.request = builder.0.request.set_page_token(token);
15024                builder.send()
15025            };
15026            google_cloud_gax::paginator::internal::new_paginator(token, execute)
15027        }
15028
15029        /// Streams each item in the collection.
15030        pub fn by_item(
15031            self,
15032        ) -> impl google_cloud_gax::paginator::ItemPaginator<
15033            crate::model::ListDataScanJobsResponse,
15034            crate::Error,
15035        > {
15036            use google_cloud_gax::paginator::Paginator;
15037            self.by_page().items()
15038        }
15039
15040        /// Sets the value of [parent][crate::model::ListDataScanJobsRequest::parent].
15041        ///
15042        /// This is a **required** field for requests.
15043        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15044            self.0.request.parent = v.into();
15045            self
15046        }
15047
15048        /// Sets the value of [page_size][crate::model::ListDataScanJobsRequest::page_size].
15049        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15050            self.0.request.page_size = v.into();
15051            self
15052        }
15053
15054        /// Sets the value of [page_token][crate::model::ListDataScanJobsRequest::page_token].
15055        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15056            self.0.request.page_token = v.into();
15057            self
15058        }
15059
15060        /// Sets the value of [filter][crate::model::ListDataScanJobsRequest::filter].
15061        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15062            self.0.request.filter = v.into();
15063            self
15064        }
15065    }
15066
15067    #[doc(hidden)]
15068    impl crate::RequestBuilder for ListDataScanJobs {
15069        fn request_options(&mut self) -> &mut crate::RequestOptions {
15070            &mut self.0.options
15071        }
15072    }
15073
15074    /// The request builder for [DataScanService::cancel_data_scan_job][crate::client::DataScanService::cancel_data_scan_job] calls.
15075    ///
15076    /// # Example
15077    /// ```
15078    /// # use google_cloud_dataplex_v1::builder::data_scan_service::CancelDataScanJob;
15079    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15080    ///
15081    /// let builder = prepare_request_builder();
15082    /// let response = builder.send().await?;
15083    /// # Ok(()) }
15084    ///
15085    /// fn prepare_request_builder() -> CancelDataScanJob {
15086    ///   # panic!();
15087    ///   // ... details omitted ...
15088    /// }
15089    /// ```
15090    #[derive(Clone, Debug)]
15091    pub struct CancelDataScanJob(RequestBuilder<crate::model::CancelDataScanJobRequest>);
15092
15093    impl CancelDataScanJob {
15094        pub(crate) fn new(
15095            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15096        ) -> Self {
15097            Self(RequestBuilder::new(stub))
15098        }
15099
15100        /// Sets the full request, replacing any prior values.
15101        pub fn with_request<V: Into<crate::model::CancelDataScanJobRequest>>(
15102            mut self,
15103            v: V,
15104        ) -> Self {
15105            self.0.request = v.into();
15106            self
15107        }
15108
15109        /// Sets all the options, replacing any prior values.
15110        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15111            self.0.options = v.into();
15112            self
15113        }
15114
15115        /// Sends the request.
15116        pub async fn send(self) -> Result<crate::model::CancelDataScanJobResponse> {
15117            (*self.0.stub)
15118                .cancel_data_scan_job(self.0.request, self.0.options)
15119                .await
15120                .map(crate::Response::into_body)
15121        }
15122
15123        /// Sets the value of [name][crate::model::CancelDataScanJobRequest::name].
15124        ///
15125        /// This is a **required** field for requests.
15126        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15127            self.0.request.name = v.into();
15128            self
15129        }
15130    }
15131
15132    #[doc(hidden)]
15133    impl crate::RequestBuilder for CancelDataScanJob {
15134        fn request_options(&mut self) -> &mut crate::RequestOptions {
15135            &mut self.0.options
15136        }
15137    }
15138
15139    /// The request builder for [DataScanService::generate_data_quality_rules][crate::client::DataScanService::generate_data_quality_rules] calls.
15140    ///
15141    /// # Example
15142    /// ```
15143    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GenerateDataQualityRules;
15144    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15145    ///
15146    /// let builder = prepare_request_builder();
15147    /// let response = builder.send().await?;
15148    /// # Ok(()) }
15149    ///
15150    /// fn prepare_request_builder() -> GenerateDataQualityRules {
15151    ///   # panic!();
15152    ///   // ... details omitted ...
15153    /// }
15154    /// ```
15155    #[derive(Clone, Debug)]
15156    pub struct GenerateDataQualityRules(
15157        RequestBuilder<crate::model::GenerateDataQualityRulesRequest>,
15158    );
15159
15160    impl GenerateDataQualityRules {
15161        pub(crate) fn new(
15162            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15163        ) -> Self {
15164            Self(RequestBuilder::new(stub))
15165        }
15166
15167        /// Sets the full request, replacing any prior values.
15168        pub fn with_request<V: Into<crate::model::GenerateDataQualityRulesRequest>>(
15169            mut self,
15170            v: V,
15171        ) -> Self {
15172            self.0.request = v.into();
15173            self
15174        }
15175
15176        /// Sets all the options, replacing any prior values.
15177        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15178            self.0.options = v.into();
15179            self
15180        }
15181
15182        /// Sends the request.
15183        pub async fn send(self) -> Result<crate::model::GenerateDataQualityRulesResponse> {
15184            (*self.0.stub)
15185                .generate_data_quality_rules(self.0.request, self.0.options)
15186                .await
15187                .map(crate::Response::into_body)
15188        }
15189
15190        /// Sets the value of [name][crate::model::GenerateDataQualityRulesRequest::name].
15191        ///
15192        /// This is a **required** field for requests.
15193        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15194            self.0.request.name = v.into();
15195            self
15196        }
15197    }
15198
15199    #[doc(hidden)]
15200    impl crate::RequestBuilder for GenerateDataQualityRules {
15201        fn request_options(&mut self) -> &mut crate::RequestOptions {
15202            &mut self.0.options
15203        }
15204    }
15205
15206    /// The request builder for [DataScanService::list_locations][crate::client::DataScanService::list_locations] calls.
15207    ///
15208    /// # Example
15209    /// ```
15210    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListLocations;
15211    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15212    /// use google_cloud_gax::paginator::ItemPaginator;
15213    ///
15214    /// let builder = prepare_request_builder();
15215    /// let mut items = builder.by_item();
15216    /// while let Some(result) = items.next().await {
15217    ///   let item = result?;
15218    /// }
15219    /// # Ok(()) }
15220    ///
15221    /// fn prepare_request_builder() -> ListLocations {
15222    ///   # panic!();
15223    ///   // ... details omitted ...
15224    /// }
15225    /// ```
15226    #[derive(Clone, Debug)]
15227    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
15228
15229    impl ListLocations {
15230        pub(crate) fn new(
15231            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15232        ) -> Self {
15233            Self(RequestBuilder::new(stub))
15234        }
15235
15236        /// Sets the full request, replacing any prior values.
15237        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
15238            mut self,
15239            v: V,
15240        ) -> Self {
15241            self.0.request = v.into();
15242            self
15243        }
15244
15245        /// Sets all the options, replacing any prior values.
15246        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15247            self.0.options = v.into();
15248            self
15249        }
15250
15251        /// Sends the request.
15252        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
15253            (*self.0.stub)
15254                .list_locations(self.0.request, self.0.options)
15255                .await
15256                .map(crate::Response::into_body)
15257        }
15258
15259        /// Streams each page in the collection.
15260        pub fn by_page(
15261            self,
15262        ) -> impl google_cloud_gax::paginator::Paginator<
15263            google_cloud_location::model::ListLocationsResponse,
15264            crate::Error,
15265        > {
15266            use std::clone::Clone;
15267            let token = self.0.request.page_token.clone();
15268            let execute = move |token: String| {
15269                let mut builder = self.clone();
15270                builder.0.request = builder.0.request.set_page_token(token);
15271                builder.send()
15272            };
15273            google_cloud_gax::paginator::internal::new_paginator(token, execute)
15274        }
15275
15276        /// Streams each item in the collection.
15277        pub fn by_item(
15278            self,
15279        ) -> impl google_cloud_gax::paginator::ItemPaginator<
15280            google_cloud_location::model::ListLocationsResponse,
15281            crate::Error,
15282        > {
15283            use google_cloud_gax::paginator::Paginator;
15284            self.by_page().items()
15285        }
15286
15287        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
15288        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15289            self.0.request.name = v.into();
15290            self
15291        }
15292
15293        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
15294        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15295            self.0.request.filter = v.into();
15296            self
15297        }
15298
15299        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
15300        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15301            self.0.request.page_size = v.into();
15302            self
15303        }
15304
15305        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
15306        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15307            self.0.request.page_token = v.into();
15308            self
15309        }
15310    }
15311
15312    #[doc(hidden)]
15313    impl crate::RequestBuilder for ListLocations {
15314        fn request_options(&mut self) -> &mut crate::RequestOptions {
15315            &mut self.0.options
15316        }
15317    }
15318
15319    /// The request builder for [DataScanService::get_location][crate::client::DataScanService::get_location] calls.
15320    ///
15321    /// # Example
15322    /// ```
15323    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetLocation;
15324    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15325    ///
15326    /// let builder = prepare_request_builder();
15327    /// let response = builder.send().await?;
15328    /// # Ok(()) }
15329    ///
15330    /// fn prepare_request_builder() -> GetLocation {
15331    ///   # panic!();
15332    ///   // ... details omitted ...
15333    /// }
15334    /// ```
15335    #[derive(Clone, Debug)]
15336    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
15337
15338    impl GetLocation {
15339        pub(crate) fn new(
15340            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15341        ) -> Self {
15342            Self(RequestBuilder::new(stub))
15343        }
15344
15345        /// Sets the full request, replacing any prior values.
15346        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
15347            mut self,
15348            v: V,
15349        ) -> Self {
15350            self.0.request = v.into();
15351            self
15352        }
15353
15354        /// Sets all the options, replacing any prior values.
15355        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15356            self.0.options = v.into();
15357            self
15358        }
15359
15360        /// Sends the request.
15361        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
15362            (*self.0.stub)
15363                .get_location(self.0.request, self.0.options)
15364                .await
15365                .map(crate::Response::into_body)
15366        }
15367
15368        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
15369        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15370            self.0.request.name = v.into();
15371            self
15372        }
15373    }
15374
15375    #[doc(hidden)]
15376    impl crate::RequestBuilder for GetLocation {
15377        fn request_options(&mut self) -> &mut crate::RequestOptions {
15378            &mut self.0.options
15379        }
15380    }
15381
15382    /// The request builder for [DataScanService::set_iam_policy][crate::client::DataScanService::set_iam_policy] calls.
15383    ///
15384    /// # Example
15385    /// ```
15386    /// # use google_cloud_dataplex_v1::builder::data_scan_service::SetIamPolicy;
15387    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15388    ///
15389    /// let builder = prepare_request_builder();
15390    /// let response = builder.send().await?;
15391    /// # Ok(()) }
15392    ///
15393    /// fn prepare_request_builder() -> SetIamPolicy {
15394    ///   # panic!();
15395    ///   // ... details omitted ...
15396    /// }
15397    /// ```
15398    #[derive(Clone, Debug)]
15399    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
15400
15401    impl SetIamPolicy {
15402        pub(crate) fn new(
15403            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15404        ) -> Self {
15405            Self(RequestBuilder::new(stub))
15406        }
15407
15408        /// Sets the full request, replacing any prior values.
15409        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
15410            mut self,
15411            v: V,
15412        ) -> Self {
15413            self.0.request = v.into();
15414            self
15415        }
15416
15417        /// Sets all the options, replacing any prior values.
15418        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15419            self.0.options = v.into();
15420            self
15421        }
15422
15423        /// Sends the request.
15424        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
15425            (*self.0.stub)
15426                .set_iam_policy(self.0.request, self.0.options)
15427                .await
15428                .map(crate::Response::into_body)
15429        }
15430
15431        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
15432        ///
15433        /// This is a **required** field for requests.
15434        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
15435            self.0.request.resource = v.into();
15436            self
15437        }
15438
15439        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
15440        ///
15441        /// This is a **required** field for requests.
15442        pub fn set_policy<T>(mut self, v: T) -> Self
15443        where
15444            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
15445        {
15446            self.0.request.policy = std::option::Option::Some(v.into());
15447            self
15448        }
15449
15450        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
15451        ///
15452        /// This is a **required** field for requests.
15453        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
15454        where
15455            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
15456        {
15457            self.0.request.policy = v.map(|x| x.into());
15458            self
15459        }
15460
15461        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
15462        pub fn set_update_mask<T>(mut self, v: T) -> Self
15463        where
15464            T: std::convert::Into<wkt::FieldMask>,
15465        {
15466            self.0.request.update_mask = std::option::Option::Some(v.into());
15467            self
15468        }
15469
15470        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
15471        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15472        where
15473            T: std::convert::Into<wkt::FieldMask>,
15474        {
15475            self.0.request.update_mask = v.map(|x| x.into());
15476            self
15477        }
15478    }
15479
15480    #[doc(hidden)]
15481    impl crate::RequestBuilder for SetIamPolicy {
15482        fn request_options(&mut self) -> &mut crate::RequestOptions {
15483            &mut self.0.options
15484        }
15485    }
15486
15487    /// The request builder for [DataScanService::get_iam_policy][crate::client::DataScanService::get_iam_policy] calls.
15488    ///
15489    /// # Example
15490    /// ```
15491    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetIamPolicy;
15492    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15493    ///
15494    /// let builder = prepare_request_builder();
15495    /// let response = builder.send().await?;
15496    /// # Ok(()) }
15497    ///
15498    /// fn prepare_request_builder() -> GetIamPolicy {
15499    ///   # panic!();
15500    ///   // ... details omitted ...
15501    /// }
15502    /// ```
15503    #[derive(Clone, Debug)]
15504    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
15505
15506    impl GetIamPolicy {
15507        pub(crate) fn new(
15508            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15509        ) -> Self {
15510            Self(RequestBuilder::new(stub))
15511        }
15512
15513        /// Sets the full request, replacing any prior values.
15514        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
15515            mut self,
15516            v: V,
15517        ) -> Self {
15518            self.0.request = v.into();
15519            self
15520        }
15521
15522        /// Sets all the options, replacing any prior values.
15523        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15524            self.0.options = v.into();
15525            self
15526        }
15527
15528        /// Sends the request.
15529        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
15530            (*self.0.stub)
15531                .get_iam_policy(self.0.request, self.0.options)
15532                .await
15533                .map(crate::Response::into_body)
15534        }
15535
15536        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
15537        ///
15538        /// This is a **required** field for requests.
15539        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
15540            self.0.request.resource = v.into();
15541            self
15542        }
15543
15544        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
15545        pub fn set_options<T>(mut self, v: T) -> Self
15546        where
15547            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
15548        {
15549            self.0.request.options = std::option::Option::Some(v.into());
15550            self
15551        }
15552
15553        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
15554        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
15555        where
15556            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
15557        {
15558            self.0.request.options = v.map(|x| x.into());
15559            self
15560        }
15561    }
15562
15563    #[doc(hidden)]
15564    impl crate::RequestBuilder for GetIamPolicy {
15565        fn request_options(&mut self) -> &mut crate::RequestOptions {
15566            &mut self.0.options
15567        }
15568    }
15569
15570    /// The request builder for [DataScanService::test_iam_permissions][crate::client::DataScanService::test_iam_permissions] calls.
15571    ///
15572    /// # Example
15573    /// ```
15574    /// # use google_cloud_dataplex_v1::builder::data_scan_service::TestIamPermissions;
15575    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15576    ///
15577    /// let builder = prepare_request_builder();
15578    /// let response = builder.send().await?;
15579    /// # Ok(()) }
15580    ///
15581    /// fn prepare_request_builder() -> TestIamPermissions {
15582    ///   # panic!();
15583    ///   // ... details omitted ...
15584    /// }
15585    /// ```
15586    #[derive(Clone, Debug)]
15587    pub struct TestIamPermissions(
15588        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
15589    );
15590
15591    impl TestIamPermissions {
15592        pub(crate) fn new(
15593            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15594        ) -> Self {
15595            Self(RequestBuilder::new(stub))
15596        }
15597
15598        /// Sets the full request, replacing any prior values.
15599        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
15600            mut self,
15601            v: V,
15602        ) -> Self {
15603            self.0.request = v.into();
15604            self
15605        }
15606
15607        /// Sets all the options, replacing any prior values.
15608        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15609            self.0.options = v.into();
15610            self
15611        }
15612
15613        /// Sends the request.
15614        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
15615            (*self.0.stub)
15616                .test_iam_permissions(self.0.request, self.0.options)
15617                .await
15618                .map(crate::Response::into_body)
15619        }
15620
15621        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
15622        ///
15623        /// This is a **required** field for requests.
15624        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
15625            self.0.request.resource = v.into();
15626            self
15627        }
15628
15629        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
15630        ///
15631        /// This is a **required** field for requests.
15632        pub fn set_permissions<T, V>(mut self, v: T) -> Self
15633        where
15634            T: std::iter::IntoIterator<Item = V>,
15635            V: std::convert::Into<std::string::String>,
15636        {
15637            use std::iter::Iterator;
15638            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
15639            self
15640        }
15641    }
15642
15643    #[doc(hidden)]
15644    impl crate::RequestBuilder for TestIamPermissions {
15645        fn request_options(&mut self) -> &mut crate::RequestOptions {
15646            &mut self.0.options
15647        }
15648    }
15649
15650    /// The request builder for [DataScanService::list_operations][crate::client::DataScanService::list_operations] calls.
15651    ///
15652    /// # Example
15653    /// ```
15654    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListOperations;
15655    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15656    /// use google_cloud_gax::paginator::ItemPaginator;
15657    ///
15658    /// let builder = prepare_request_builder();
15659    /// let mut items = builder.by_item();
15660    /// while let Some(result) = items.next().await {
15661    ///   let item = result?;
15662    /// }
15663    /// # Ok(()) }
15664    ///
15665    /// fn prepare_request_builder() -> ListOperations {
15666    ///   # panic!();
15667    ///   // ... details omitted ...
15668    /// }
15669    /// ```
15670    #[derive(Clone, Debug)]
15671    pub struct ListOperations(
15672        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
15673    );
15674
15675    impl ListOperations {
15676        pub(crate) fn new(
15677            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15678        ) -> Self {
15679            Self(RequestBuilder::new(stub))
15680        }
15681
15682        /// Sets the full request, replacing any prior values.
15683        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
15684            mut self,
15685            v: V,
15686        ) -> Self {
15687            self.0.request = v.into();
15688            self
15689        }
15690
15691        /// Sets all the options, replacing any prior values.
15692        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15693            self.0.options = v.into();
15694            self
15695        }
15696
15697        /// Sends the request.
15698        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
15699            (*self.0.stub)
15700                .list_operations(self.0.request, self.0.options)
15701                .await
15702                .map(crate::Response::into_body)
15703        }
15704
15705        /// Streams each page in the collection.
15706        pub fn by_page(
15707            self,
15708        ) -> impl google_cloud_gax::paginator::Paginator<
15709            google_cloud_longrunning::model::ListOperationsResponse,
15710            crate::Error,
15711        > {
15712            use std::clone::Clone;
15713            let token = self.0.request.page_token.clone();
15714            let execute = move |token: String| {
15715                let mut builder = self.clone();
15716                builder.0.request = builder.0.request.set_page_token(token);
15717                builder.send()
15718            };
15719            google_cloud_gax::paginator::internal::new_paginator(token, execute)
15720        }
15721
15722        /// Streams each item in the collection.
15723        pub fn by_item(
15724            self,
15725        ) -> impl google_cloud_gax::paginator::ItemPaginator<
15726            google_cloud_longrunning::model::ListOperationsResponse,
15727            crate::Error,
15728        > {
15729            use google_cloud_gax::paginator::Paginator;
15730            self.by_page().items()
15731        }
15732
15733        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
15734        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15735            self.0.request.name = v.into();
15736            self
15737        }
15738
15739        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
15740        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15741            self.0.request.filter = v.into();
15742            self
15743        }
15744
15745        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
15746        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15747            self.0.request.page_size = v.into();
15748            self
15749        }
15750
15751        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
15752        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15753            self.0.request.page_token = v.into();
15754            self
15755        }
15756
15757        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
15758        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
15759            self.0.request.return_partial_success = v.into();
15760            self
15761        }
15762    }
15763
15764    #[doc(hidden)]
15765    impl crate::RequestBuilder for ListOperations {
15766        fn request_options(&mut self) -> &mut crate::RequestOptions {
15767            &mut self.0.options
15768        }
15769    }
15770
15771    /// The request builder for [DataScanService::get_operation][crate::client::DataScanService::get_operation] calls.
15772    ///
15773    /// # Example
15774    /// ```
15775    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetOperation;
15776    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15777    ///
15778    /// let builder = prepare_request_builder();
15779    /// let response = builder.send().await?;
15780    /// # Ok(()) }
15781    ///
15782    /// fn prepare_request_builder() -> GetOperation {
15783    ///   # panic!();
15784    ///   // ... details omitted ...
15785    /// }
15786    /// ```
15787    #[derive(Clone, Debug)]
15788    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
15789
15790    impl GetOperation {
15791        pub(crate) fn new(
15792            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15793        ) -> Self {
15794            Self(RequestBuilder::new(stub))
15795        }
15796
15797        /// Sets the full request, replacing any prior values.
15798        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
15799            mut self,
15800            v: V,
15801        ) -> Self {
15802            self.0.request = v.into();
15803            self
15804        }
15805
15806        /// Sets all the options, replacing any prior values.
15807        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15808            self.0.options = v.into();
15809            self
15810        }
15811
15812        /// Sends the request.
15813        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
15814            (*self.0.stub)
15815                .get_operation(self.0.request, self.0.options)
15816                .await
15817                .map(crate::Response::into_body)
15818        }
15819
15820        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
15821        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15822            self.0.request.name = v.into();
15823            self
15824        }
15825    }
15826
15827    #[doc(hidden)]
15828    impl crate::RequestBuilder for GetOperation {
15829        fn request_options(&mut self) -> &mut crate::RequestOptions {
15830            &mut self.0.options
15831        }
15832    }
15833
15834    /// The request builder for [DataScanService::delete_operation][crate::client::DataScanService::delete_operation] calls.
15835    ///
15836    /// # Example
15837    /// ```
15838    /// # use google_cloud_dataplex_v1::builder::data_scan_service::DeleteOperation;
15839    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15840    ///
15841    /// let builder = prepare_request_builder();
15842    /// let response = builder.send().await?;
15843    /// # Ok(()) }
15844    ///
15845    /// fn prepare_request_builder() -> DeleteOperation {
15846    ///   # panic!();
15847    ///   // ... details omitted ...
15848    /// }
15849    /// ```
15850    #[derive(Clone, Debug)]
15851    pub struct DeleteOperation(
15852        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
15853    );
15854
15855    impl DeleteOperation {
15856        pub(crate) fn new(
15857            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15858        ) -> Self {
15859            Self(RequestBuilder::new(stub))
15860        }
15861
15862        /// Sets the full request, replacing any prior values.
15863        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
15864            mut self,
15865            v: V,
15866        ) -> Self {
15867            self.0.request = v.into();
15868            self
15869        }
15870
15871        /// Sets all the options, replacing any prior values.
15872        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15873            self.0.options = v.into();
15874            self
15875        }
15876
15877        /// Sends the request.
15878        pub async fn send(self) -> Result<()> {
15879            (*self.0.stub)
15880                .delete_operation(self.0.request, self.0.options)
15881                .await
15882                .map(crate::Response::into_body)
15883        }
15884
15885        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
15886        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15887            self.0.request.name = v.into();
15888            self
15889        }
15890    }
15891
15892    #[doc(hidden)]
15893    impl crate::RequestBuilder for DeleteOperation {
15894        fn request_options(&mut self) -> &mut crate::RequestOptions {
15895            &mut self.0.options
15896        }
15897    }
15898
15899    /// The request builder for [DataScanService::cancel_operation][crate::client::DataScanService::cancel_operation] calls.
15900    ///
15901    /// # Example
15902    /// ```
15903    /// # use google_cloud_dataplex_v1::builder::data_scan_service::CancelOperation;
15904    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15905    ///
15906    /// let builder = prepare_request_builder();
15907    /// let response = builder.send().await?;
15908    /// # Ok(()) }
15909    ///
15910    /// fn prepare_request_builder() -> CancelOperation {
15911    ///   # panic!();
15912    ///   // ... details omitted ...
15913    /// }
15914    /// ```
15915    #[derive(Clone, Debug)]
15916    pub struct CancelOperation(
15917        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
15918    );
15919
15920    impl CancelOperation {
15921        pub(crate) fn new(
15922            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15923        ) -> Self {
15924            Self(RequestBuilder::new(stub))
15925        }
15926
15927        /// Sets the full request, replacing any prior values.
15928        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
15929            mut self,
15930            v: V,
15931        ) -> Self {
15932            self.0.request = v.into();
15933            self
15934        }
15935
15936        /// Sets all the options, replacing any prior values.
15937        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15938            self.0.options = v.into();
15939            self
15940        }
15941
15942        /// Sends the request.
15943        pub async fn send(self) -> Result<()> {
15944            (*self.0.stub)
15945                .cancel_operation(self.0.request, self.0.options)
15946                .await
15947                .map(crate::Response::into_body)
15948        }
15949
15950        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
15951        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15952            self.0.request.name = v.into();
15953            self
15954        }
15955    }
15956
15957    #[doc(hidden)]
15958    impl crate::RequestBuilder for CancelOperation {
15959        fn request_options(&mut self) -> &mut crate::RequestOptions {
15960            &mut self.0.options
15961        }
15962    }
15963}
15964
15965/// Request and client builders for [MetadataService][crate::client::MetadataService].
15966pub mod metadata_service {
15967    use crate::Result;
15968
15969    /// A builder for [MetadataService][crate::client::MetadataService].
15970    ///
15971    /// ```
15972    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
15973    /// # use google_cloud_dataplex_v1::*;
15974    /// # use builder::metadata_service::ClientBuilder;
15975    /// # use client::MetadataService;
15976    /// let builder : ClientBuilder = MetadataService::builder();
15977    /// let client = builder
15978    ///     .with_endpoint("https://dataplex.googleapis.com")
15979    ///     .build().await?;
15980    /// # Ok(()) }
15981    /// ```
15982    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
15983
15984    pub(crate) mod client {
15985        use super::super::super::client::MetadataService;
15986        pub struct Factory;
15987        impl crate::ClientFactory for Factory {
15988            type Client = MetadataService;
15989            type Credentials = gaxi::options::Credentials;
15990            async fn build(
15991                self,
15992                config: gaxi::options::ClientConfig,
15993            ) -> crate::ClientBuilderResult<Self::Client> {
15994                Self::Client::new(config).await
15995            }
15996        }
15997    }
15998
15999    /// Common implementation for [crate::client::MetadataService] request builders.
16000    #[derive(Clone, Debug)]
16001    pub(crate) struct RequestBuilder<R: std::default::Default> {
16002        stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16003        request: R,
16004        options: crate::RequestOptions,
16005    }
16006
16007    impl<R> RequestBuilder<R>
16008    where
16009        R: std::default::Default,
16010    {
16011        pub(crate) fn new(
16012            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16013        ) -> Self {
16014            Self {
16015                stub,
16016                request: R::default(),
16017                options: crate::RequestOptions::default(),
16018            }
16019        }
16020    }
16021
16022    /// The request builder for [MetadataService::create_entity][crate::client::MetadataService::create_entity] calls.
16023    ///
16024    /// # Example
16025    /// ```
16026    /// # use google_cloud_dataplex_v1::builder::metadata_service::CreateEntity;
16027    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16028    ///
16029    /// let builder = prepare_request_builder();
16030    /// let response = builder.send().await?;
16031    /// # Ok(()) }
16032    ///
16033    /// fn prepare_request_builder() -> CreateEntity {
16034    ///   # panic!();
16035    ///   // ... details omitted ...
16036    /// }
16037    /// ```
16038    #[derive(Clone, Debug)]
16039    pub struct CreateEntity(RequestBuilder<crate::model::CreateEntityRequest>);
16040
16041    impl CreateEntity {
16042        pub(crate) fn new(
16043            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16044        ) -> Self {
16045            Self(RequestBuilder::new(stub))
16046        }
16047
16048        /// Sets the full request, replacing any prior values.
16049        pub fn with_request<V: Into<crate::model::CreateEntityRequest>>(mut self, v: V) -> Self {
16050            self.0.request = v.into();
16051            self
16052        }
16053
16054        /// Sets all the options, replacing any prior values.
16055        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16056            self.0.options = v.into();
16057            self
16058        }
16059
16060        /// Sends the request.
16061        pub async fn send(self) -> Result<crate::model::Entity> {
16062            (*self.0.stub)
16063                .create_entity(self.0.request, self.0.options)
16064                .await
16065                .map(crate::Response::into_body)
16066        }
16067
16068        /// Sets the value of [parent][crate::model::CreateEntityRequest::parent].
16069        ///
16070        /// This is a **required** field for requests.
16071        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16072            self.0.request.parent = v.into();
16073            self
16074        }
16075
16076        /// Sets the value of [entity][crate::model::CreateEntityRequest::entity].
16077        ///
16078        /// This is a **required** field for requests.
16079        pub fn set_entity<T>(mut self, v: T) -> Self
16080        where
16081            T: std::convert::Into<crate::model::Entity>,
16082        {
16083            self.0.request.entity = std::option::Option::Some(v.into());
16084            self
16085        }
16086
16087        /// Sets or clears the value of [entity][crate::model::CreateEntityRequest::entity].
16088        ///
16089        /// This is a **required** field for requests.
16090        pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
16091        where
16092            T: std::convert::Into<crate::model::Entity>,
16093        {
16094            self.0.request.entity = v.map(|x| x.into());
16095            self
16096        }
16097
16098        /// Sets the value of [validate_only][crate::model::CreateEntityRequest::validate_only].
16099        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16100            self.0.request.validate_only = v.into();
16101            self
16102        }
16103    }
16104
16105    #[doc(hidden)]
16106    impl crate::RequestBuilder for CreateEntity {
16107        fn request_options(&mut self) -> &mut crate::RequestOptions {
16108            &mut self.0.options
16109        }
16110    }
16111
16112    /// The request builder for [MetadataService::update_entity][crate::client::MetadataService::update_entity] calls.
16113    ///
16114    /// # Example
16115    /// ```
16116    /// # use google_cloud_dataplex_v1::builder::metadata_service::UpdateEntity;
16117    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16118    ///
16119    /// let builder = prepare_request_builder();
16120    /// let response = builder.send().await?;
16121    /// # Ok(()) }
16122    ///
16123    /// fn prepare_request_builder() -> UpdateEntity {
16124    ///   # panic!();
16125    ///   // ... details omitted ...
16126    /// }
16127    /// ```
16128    #[derive(Clone, Debug)]
16129    pub struct UpdateEntity(RequestBuilder<crate::model::UpdateEntityRequest>);
16130
16131    impl UpdateEntity {
16132        pub(crate) fn new(
16133            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16134        ) -> Self {
16135            Self(RequestBuilder::new(stub))
16136        }
16137
16138        /// Sets the full request, replacing any prior values.
16139        pub fn with_request<V: Into<crate::model::UpdateEntityRequest>>(mut self, v: V) -> Self {
16140            self.0.request = v.into();
16141            self
16142        }
16143
16144        /// Sets all the options, replacing any prior values.
16145        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16146            self.0.options = v.into();
16147            self
16148        }
16149
16150        /// Sends the request.
16151        pub async fn send(self) -> Result<crate::model::Entity> {
16152            (*self.0.stub)
16153                .update_entity(self.0.request, self.0.options)
16154                .await
16155                .map(crate::Response::into_body)
16156        }
16157
16158        /// Sets the value of [entity][crate::model::UpdateEntityRequest::entity].
16159        ///
16160        /// This is a **required** field for requests.
16161        pub fn set_entity<T>(mut self, v: T) -> Self
16162        where
16163            T: std::convert::Into<crate::model::Entity>,
16164        {
16165            self.0.request.entity = std::option::Option::Some(v.into());
16166            self
16167        }
16168
16169        /// Sets or clears the value of [entity][crate::model::UpdateEntityRequest::entity].
16170        ///
16171        /// This is a **required** field for requests.
16172        pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
16173        where
16174            T: std::convert::Into<crate::model::Entity>,
16175        {
16176            self.0.request.entity = v.map(|x| x.into());
16177            self
16178        }
16179
16180        /// Sets the value of [validate_only][crate::model::UpdateEntityRequest::validate_only].
16181        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16182            self.0.request.validate_only = v.into();
16183            self
16184        }
16185    }
16186
16187    #[doc(hidden)]
16188    impl crate::RequestBuilder for UpdateEntity {
16189        fn request_options(&mut self) -> &mut crate::RequestOptions {
16190            &mut self.0.options
16191        }
16192    }
16193
16194    /// The request builder for [MetadataService::delete_entity][crate::client::MetadataService::delete_entity] calls.
16195    ///
16196    /// # Example
16197    /// ```
16198    /// # use google_cloud_dataplex_v1::builder::metadata_service::DeleteEntity;
16199    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16200    ///
16201    /// let builder = prepare_request_builder();
16202    /// let response = builder.send().await?;
16203    /// # Ok(()) }
16204    ///
16205    /// fn prepare_request_builder() -> DeleteEntity {
16206    ///   # panic!();
16207    ///   // ... details omitted ...
16208    /// }
16209    /// ```
16210    #[derive(Clone, Debug)]
16211    pub struct DeleteEntity(RequestBuilder<crate::model::DeleteEntityRequest>);
16212
16213    impl DeleteEntity {
16214        pub(crate) fn new(
16215            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16216        ) -> Self {
16217            Self(RequestBuilder::new(stub))
16218        }
16219
16220        /// Sets the full request, replacing any prior values.
16221        pub fn with_request<V: Into<crate::model::DeleteEntityRequest>>(mut self, v: V) -> Self {
16222            self.0.request = v.into();
16223            self
16224        }
16225
16226        /// Sets all the options, replacing any prior values.
16227        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16228            self.0.options = v.into();
16229            self
16230        }
16231
16232        /// Sends the request.
16233        pub async fn send(self) -> Result<()> {
16234            (*self.0.stub)
16235                .delete_entity(self.0.request, self.0.options)
16236                .await
16237                .map(crate::Response::into_body)
16238        }
16239
16240        /// Sets the value of [name][crate::model::DeleteEntityRequest::name].
16241        ///
16242        /// This is a **required** field for requests.
16243        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16244            self.0.request.name = v.into();
16245            self
16246        }
16247
16248        /// Sets the value of [etag][crate::model::DeleteEntityRequest::etag].
16249        ///
16250        /// This is a **required** field for requests.
16251        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
16252            self.0.request.etag = v.into();
16253            self
16254        }
16255    }
16256
16257    #[doc(hidden)]
16258    impl crate::RequestBuilder for DeleteEntity {
16259        fn request_options(&mut self) -> &mut crate::RequestOptions {
16260            &mut self.0.options
16261        }
16262    }
16263
16264    /// The request builder for [MetadataService::get_entity][crate::client::MetadataService::get_entity] calls.
16265    ///
16266    /// # Example
16267    /// ```
16268    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetEntity;
16269    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16270    ///
16271    /// let builder = prepare_request_builder();
16272    /// let response = builder.send().await?;
16273    /// # Ok(()) }
16274    ///
16275    /// fn prepare_request_builder() -> GetEntity {
16276    ///   # panic!();
16277    ///   // ... details omitted ...
16278    /// }
16279    /// ```
16280    #[derive(Clone, Debug)]
16281    pub struct GetEntity(RequestBuilder<crate::model::GetEntityRequest>);
16282
16283    impl GetEntity {
16284        pub(crate) fn new(
16285            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16286        ) -> Self {
16287            Self(RequestBuilder::new(stub))
16288        }
16289
16290        /// Sets the full request, replacing any prior values.
16291        pub fn with_request<V: Into<crate::model::GetEntityRequest>>(mut self, v: V) -> Self {
16292            self.0.request = v.into();
16293            self
16294        }
16295
16296        /// Sets all the options, replacing any prior values.
16297        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16298            self.0.options = v.into();
16299            self
16300        }
16301
16302        /// Sends the request.
16303        pub async fn send(self) -> Result<crate::model::Entity> {
16304            (*self.0.stub)
16305                .get_entity(self.0.request, self.0.options)
16306                .await
16307                .map(crate::Response::into_body)
16308        }
16309
16310        /// Sets the value of [name][crate::model::GetEntityRequest::name].
16311        ///
16312        /// This is a **required** field for requests.
16313        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16314            self.0.request.name = v.into();
16315            self
16316        }
16317
16318        /// Sets the value of [view][crate::model::GetEntityRequest::view].
16319        pub fn set_view<T: Into<crate::model::get_entity_request::EntityView>>(
16320            mut self,
16321            v: T,
16322        ) -> Self {
16323            self.0.request.view = v.into();
16324            self
16325        }
16326    }
16327
16328    #[doc(hidden)]
16329    impl crate::RequestBuilder for GetEntity {
16330        fn request_options(&mut self) -> &mut crate::RequestOptions {
16331            &mut self.0.options
16332        }
16333    }
16334
16335    /// The request builder for [MetadataService::list_entities][crate::client::MetadataService::list_entities] calls.
16336    ///
16337    /// # Example
16338    /// ```
16339    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListEntities;
16340    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16341    /// use google_cloud_gax::paginator::ItemPaginator;
16342    ///
16343    /// let builder = prepare_request_builder();
16344    /// let mut items = builder.by_item();
16345    /// while let Some(result) = items.next().await {
16346    ///   let item = result?;
16347    /// }
16348    /// # Ok(()) }
16349    ///
16350    /// fn prepare_request_builder() -> ListEntities {
16351    ///   # panic!();
16352    ///   // ... details omitted ...
16353    /// }
16354    /// ```
16355    #[derive(Clone, Debug)]
16356    pub struct ListEntities(RequestBuilder<crate::model::ListEntitiesRequest>);
16357
16358    impl ListEntities {
16359        pub(crate) fn new(
16360            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16361        ) -> Self {
16362            Self(RequestBuilder::new(stub))
16363        }
16364
16365        /// Sets the full request, replacing any prior values.
16366        pub fn with_request<V: Into<crate::model::ListEntitiesRequest>>(mut self, v: V) -> Self {
16367            self.0.request = v.into();
16368            self
16369        }
16370
16371        /// Sets all the options, replacing any prior values.
16372        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16373            self.0.options = v.into();
16374            self
16375        }
16376
16377        /// Sends the request.
16378        pub async fn send(self) -> Result<crate::model::ListEntitiesResponse> {
16379            (*self.0.stub)
16380                .list_entities(self.0.request, self.0.options)
16381                .await
16382                .map(crate::Response::into_body)
16383        }
16384
16385        /// Streams each page in the collection.
16386        pub fn by_page(
16387            self,
16388        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListEntitiesResponse, crate::Error>
16389        {
16390            use std::clone::Clone;
16391            let token = self.0.request.page_token.clone();
16392            let execute = move |token: String| {
16393                let mut builder = self.clone();
16394                builder.0.request = builder.0.request.set_page_token(token);
16395                builder.send()
16396            };
16397            google_cloud_gax::paginator::internal::new_paginator(token, execute)
16398        }
16399
16400        /// Streams each item in the collection.
16401        pub fn by_item(
16402            self,
16403        ) -> impl google_cloud_gax::paginator::ItemPaginator<
16404            crate::model::ListEntitiesResponse,
16405            crate::Error,
16406        > {
16407            use google_cloud_gax::paginator::Paginator;
16408            self.by_page().items()
16409        }
16410
16411        /// Sets the value of [parent][crate::model::ListEntitiesRequest::parent].
16412        ///
16413        /// This is a **required** field for requests.
16414        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16415            self.0.request.parent = v.into();
16416            self
16417        }
16418
16419        /// Sets the value of [view][crate::model::ListEntitiesRequest::view].
16420        ///
16421        /// This is a **required** field for requests.
16422        pub fn set_view<T: Into<crate::model::list_entities_request::EntityView>>(
16423            mut self,
16424            v: T,
16425        ) -> Self {
16426            self.0.request.view = v.into();
16427            self
16428        }
16429
16430        /// Sets the value of [page_size][crate::model::ListEntitiesRequest::page_size].
16431        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16432            self.0.request.page_size = v.into();
16433            self
16434        }
16435
16436        /// Sets the value of [page_token][crate::model::ListEntitiesRequest::page_token].
16437        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16438            self.0.request.page_token = v.into();
16439            self
16440        }
16441
16442        /// Sets the value of [filter][crate::model::ListEntitiesRequest::filter].
16443        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16444            self.0.request.filter = v.into();
16445            self
16446        }
16447    }
16448
16449    #[doc(hidden)]
16450    impl crate::RequestBuilder for ListEntities {
16451        fn request_options(&mut self) -> &mut crate::RequestOptions {
16452            &mut self.0.options
16453        }
16454    }
16455
16456    /// The request builder for [MetadataService::create_partition][crate::client::MetadataService::create_partition] calls.
16457    ///
16458    /// # Example
16459    /// ```
16460    /// # use google_cloud_dataplex_v1::builder::metadata_service::CreatePartition;
16461    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16462    ///
16463    /// let builder = prepare_request_builder();
16464    /// let response = builder.send().await?;
16465    /// # Ok(()) }
16466    ///
16467    /// fn prepare_request_builder() -> CreatePartition {
16468    ///   # panic!();
16469    ///   // ... details omitted ...
16470    /// }
16471    /// ```
16472    #[derive(Clone, Debug)]
16473    pub struct CreatePartition(RequestBuilder<crate::model::CreatePartitionRequest>);
16474
16475    impl CreatePartition {
16476        pub(crate) fn new(
16477            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16478        ) -> Self {
16479            Self(RequestBuilder::new(stub))
16480        }
16481
16482        /// Sets the full request, replacing any prior values.
16483        pub fn with_request<V: Into<crate::model::CreatePartitionRequest>>(mut self, v: V) -> Self {
16484            self.0.request = v.into();
16485            self
16486        }
16487
16488        /// Sets all the options, replacing any prior values.
16489        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16490            self.0.options = v.into();
16491            self
16492        }
16493
16494        /// Sends the request.
16495        pub async fn send(self) -> Result<crate::model::Partition> {
16496            (*self.0.stub)
16497                .create_partition(self.0.request, self.0.options)
16498                .await
16499                .map(crate::Response::into_body)
16500        }
16501
16502        /// Sets the value of [parent][crate::model::CreatePartitionRequest::parent].
16503        ///
16504        /// This is a **required** field for requests.
16505        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16506            self.0.request.parent = v.into();
16507            self
16508        }
16509
16510        /// Sets the value of [partition][crate::model::CreatePartitionRequest::partition].
16511        ///
16512        /// This is a **required** field for requests.
16513        pub fn set_partition<T>(mut self, v: T) -> Self
16514        where
16515            T: std::convert::Into<crate::model::Partition>,
16516        {
16517            self.0.request.partition = std::option::Option::Some(v.into());
16518            self
16519        }
16520
16521        /// Sets or clears the value of [partition][crate::model::CreatePartitionRequest::partition].
16522        ///
16523        /// This is a **required** field for requests.
16524        pub fn set_or_clear_partition<T>(mut self, v: std::option::Option<T>) -> Self
16525        where
16526            T: std::convert::Into<crate::model::Partition>,
16527        {
16528            self.0.request.partition = v.map(|x| x.into());
16529            self
16530        }
16531
16532        /// Sets the value of [validate_only][crate::model::CreatePartitionRequest::validate_only].
16533        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16534            self.0.request.validate_only = v.into();
16535            self
16536        }
16537    }
16538
16539    #[doc(hidden)]
16540    impl crate::RequestBuilder for CreatePartition {
16541        fn request_options(&mut self) -> &mut crate::RequestOptions {
16542            &mut self.0.options
16543        }
16544    }
16545
16546    /// The request builder for [MetadataService::delete_partition][crate::client::MetadataService::delete_partition] calls.
16547    ///
16548    /// # Example
16549    /// ```
16550    /// # use google_cloud_dataplex_v1::builder::metadata_service::DeletePartition;
16551    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16552    ///
16553    /// let builder = prepare_request_builder();
16554    /// let response = builder.send().await?;
16555    /// # Ok(()) }
16556    ///
16557    /// fn prepare_request_builder() -> DeletePartition {
16558    ///   # panic!();
16559    ///   // ... details omitted ...
16560    /// }
16561    /// ```
16562    #[derive(Clone, Debug)]
16563    pub struct DeletePartition(RequestBuilder<crate::model::DeletePartitionRequest>);
16564
16565    impl DeletePartition {
16566        pub(crate) fn new(
16567            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16568        ) -> Self {
16569            Self(RequestBuilder::new(stub))
16570        }
16571
16572        /// Sets the full request, replacing any prior values.
16573        pub fn with_request<V: Into<crate::model::DeletePartitionRequest>>(mut self, v: V) -> Self {
16574            self.0.request = v.into();
16575            self
16576        }
16577
16578        /// Sets all the options, replacing any prior values.
16579        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16580            self.0.options = v.into();
16581            self
16582        }
16583
16584        /// Sends the request.
16585        pub async fn send(self) -> Result<()> {
16586            (*self.0.stub)
16587                .delete_partition(self.0.request, self.0.options)
16588                .await
16589                .map(crate::Response::into_body)
16590        }
16591
16592        /// Sets the value of [name][crate::model::DeletePartitionRequest::name].
16593        ///
16594        /// This is a **required** field for requests.
16595        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16596            self.0.request.name = v.into();
16597            self
16598        }
16599
16600        /// Sets the value of [etag][crate::model::DeletePartitionRequest::etag].
16601        #[deprecated]
16602        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
16603            self.0.request.etag = v.into();
16604            self
16605        }
16606    }
16607
16608    #[doc(hidden)]
16609    impl crate::RequestBuilder for DeletePartition {
16610        fn request_options(&mut self) -> &mut crate::RequestOptions {
16611            &mut self.0.options
16612        }
16613    }
16614
16615    /// The request builder for [MetadataService::get_partition][crate::client::MetadataService::get_partition] calls.
16616    ///
16617    /// # Example
16618    /// ```
16619    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetPartition;
16620    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16621    ///
16622    /// let builder = prepare_request_builder();
16623    /// let response = builder.send().await?;
16624    /// # Ok(()) }
16625    ///
16626    /// fn prepare_request_builder() -> GetPartition {
16627    ///   # panic!();
16628    ///   // ... details omitted ...
16629    /// }
16630    /// ```
16631    #[derive(Clone, Debug)]
16632    pub struct GetPartition(RequestBuilder<crate::model::GetPartitionRequest>);
16633
16634    impl GetPartition {
16635        pub(crate) fn new(
16636            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16637        ) -> Self {
16638            Self(RequestBuilder::new(stub))
16639        }
16640
16641        /// Sets the full request, replacing any prior values.
16642        pub fn with_request<V: Into<crate::model::GetPartitionRequest>>(mut self, v: V) -> Self {
16643            self.0.request = v.into();
16644            self
16645        }
16646
16647        /// Sets all the options, replacing any prior values.
16648        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16649            self.0.options = v.into();
16650            self
16651        }
16652
16653        /// Sends the request.
16654        pub async fn send(self) -> Result<crate::model::Partition> {
16655            (*self.0.stub)
16656                .get_partition(self.0.request, self.0.options)
16657                .await
16658                .map(crate::Response::into_body)
16659        }
16660
16661        /// Sets the value of [name][crate::model::GetPartitionRequest::name].
16662        ///
16663        /// This is a **required** field for requests.
16664        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16665            self.0.request.name = v.into();
16666            self
16667        }
16668    }
16669
16670    #[doc(hidden)]
16671    impl crate::RequestBuilder for GetPartition {
16672        fn request_options(&mut self) -> &mut crate::RequestOptions {
16673            &mut self.0.options
16674        }
16675    }
16676
16677    /// The request builder for [MetadataService::list_partitions][crate::client::MetadataService::list_partitions] calls.
16678    ///
16679    /// # Example
16680    /// ```
16681    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListPartitions;
16682    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16683    /// use google_cloud_gax::paginator::ItemPaginator;
16684    ///
16685    /// let builder = prepare_request_builder();
16686    /// let mut items = builder.by_item();
16687    /// while let Some(result) = items.next().await {
16688    ///   let item = result?;
16689    /// }
16690    /// # Ok(()) }
16691    ///
16692    /// fn prepare_request_builder() -> ListPartitions {
16693    ///   # panic!();
16694    ///   // ... details omitted ...
16695    /// }
16696    /// ```
16697    #[derive(Clone, Debug)]
16698    pub struct ListPartitions(RequestBuilder<crate::model::ListPartitionsRequest>);
16699
16700    impl ListPartitions {
16701        pub(crate) fn new(
16702            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16703        ) -> Self {
16704            Self(RequestBuilder::new(stub))
16705        }
16706
16707        /// Sets the full request, replacing any prior values.
16708        pub fn with_request<V: Into<crate::model::ListPartitionsRequest>>(mut self, v: V) -> Self {
16709            self.0.request = v.into();
16710            self
16711        }
16712
16713        /// Sets all the options, replacing any prior values.
16714        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16715            self.0.options = v.into();
16716            self
16717        }
16718
16719        /// Sends the request.
16720        pub async fn send(self) -> Result<crate::model::ListPartitionsResponse> {
16721            (*self.0.stub)
16722                .list_partitions(self.0.request, self.0.options)
16723                .await
16724                .map(crate::Response::into_body)
16725        }
16726
16727        /// Streams each page in the collection.
16728        pub fn by_page(
16729            self,
16730        ) -> impl google_cloud_gax::paginator::Paginator<
16731            crate::model::ListPartitionsResponse,
16732            crate::Error,
16733        > {
16734            use std::clone::Clone;
16735            let token = self.0.request.page_token.clone();
16736            let execute = move |token: String| {
16737                let mut builder = self.clone();
16738                builder.0.request = builder.0.request.set_page_token(token);
16739                builder.send()
16740            };
16741            google_cloud_gax::paginator::internal::new_paginator(token, execute)
16742        }
16743
16744        /// Streams each item in the collection.
16745        pub fn by_item(
16746            self,
16747        ) -> impl google_cloud_gax::paginator::ItemPaginator<
16748            crate::model::ListPartitionsResponse,
16749            crate::Error,
16750        > {
16751            use google_cloud_gax::paginator::Paginator;
16752            self.by_page().items()
16753        }
16754
16755        /// Sets the value of [parent][crate::model::ListPartitionsRequest::parent].
16756        ///
16757        /// This is a **required** field for requests.
16758        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16759            self.0.request.parent = v.into();
16760            self
16761        }
16762
16763        /// Sets the value of [page_size][crate::model::ListPartitionsRequest::page_size].
16764        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16765            self.0.request.page_size = v.into();
16766            self
16767        }
16768
16769        /// Sets the value of [page_token][crate::model::ListPartitionsRequest::page_token].
16770        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16771            self.0.request.page_token = v.into();
16772            self
16773        }
16774
16775        /// Sets the value of [filter][crate::model::ListPartitionsRequest::filter].
16776        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16777            self.0.request.filter = v.into();
16778            self
16779        }
16780    }
16781
16782    #[doc(hidden)]
16783    impl crate::RequestBuilder for ListPartitions {
16784        fn request_options(&mut self) -> &mut crate::RequestOptions {
16785            &mut self.0.options
16786        }
16787    }
16788
16789    /// The request builder for [MetadataService::list_locations][crate::client::MetadataService::list_locations] calls.
16790    ///
16791    /// # Example
16792    /// ```
16793    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListLocations;
16794    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16795    /// use google_cloud_gax::paginator::ItemPaginator;
16796    ///
16797    /// let builder = prepare_request_builder();
16798    /// let mut items = builder.by_item();
16799    /// while let Some(result) = items.next().await {
16800    ///   let item = result?;
16801    /// }
16802    /// # Ok(()) }
16803    ///
16804    /// fn prepare_request_builder() -> ListLocations {
16805    ///   # panic!();
16806    ///   // ... details omitted ...
16807    /// }
16808    /// ```
16809    #[derive(Clone, Debug)]
16810    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
16811
16812    impl ListLocations {
16813        pub(crate) fn new(
16814            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16815        ) -> Self {
16816            Self(RequestBuilder::new(stub))
16817        }
16818
16819        /// Sets the full request, replacing any prior values.
16820        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
16821            mut self,
16822            v: V,
16823        ) -> Self {
16824            self.0.request = v.into();
16825            self
16826        }
16827
16828        /// Sets all the options, replacing any prior values.
16829        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16830            self.0.options = v.into();
16831            self
16832        }
16833
16834        /// Sends the request.
16835        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
16836            (*self.0.stub)
16837                .list_locations(self.0.request, self.0.options)
16838                .await
16839                .map(crate::Response::into_body)
16840        }
16841
16842        /// Streams each page in the collection.
16843        pub fn by_page(
16844            self,
16845        ) -> impl google_cloud_gax::paginator::Paginator<
16846            google_cloud_location::model::ListLocationsResponse,
16847            crate::Error,
16848        > {
16849            use std::clone::Clone;
16850            let token = self.0.request.page_token.clone();
16851            let execute = move |token: String| {
16852                let mut builder = self.clone();
16853                builder.0.request = builder.0.request.set_page_token(token);
16854                builder.send()
16855            };
16856            google_cloud_gax::paginator::internal::new_paginator(token, execute)
16857        }
16858
16859        /// Streams each item in the collection.
16860        pub fn by_item(
16861            self,
16862        ) -> impl google_cloud_gax::paginator::ItemPaginator<
16863            google_cloud_location::model::ListLocationsResponse,
16864            crate::Error,
16865        > {
16866            use google_cloud_gax::paginator::Paginator;
16867            self.by_page().items()
16868        }
16869
16870        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
16871        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16872            self.0.request.name = v.into();
16873            self
16874        }
16875
16876        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
16877        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16878            self.0.request.filter = v.into();
16879            self
16880        }
16881
16882        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
16883        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16884            self.0.request.page_size = v.into();
16885            self
16886        }
16887
16888        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
16889        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16890            self.0.request.page_token = v.into();
16891            self
16892        }
16893    }
16894
16895    #[doc(hidden)]
16896    impl crate::RequestBuilder for ListLocations {
16897        fn request_options(&mut self) -> &mut crate::RequestOptions {
16898            &mut self.0.options
16899        }
16900    }
16901
16902    /// The request builder for [MetadataService::get_location][crate::client::MetadataService::get_location] calls.
16903    ///
16904    /// # Example
16905    /// ```
16906    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetLocation;
16907    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16908    ///
16909    /// let builder = prepare_request_builder();
16910    /// let response = builder.send().await?;
16911    /// # Ok(()) }
16912    ///
16913    /// fn prepare_request_builder() -> GetLocation {
16914    ///   # panic!();
16915    ///   // ... details omitted ...
16916    /// }
16917    /// ```
16918    #[derive(Clone, Debug)]
16919    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
16920
16921    impl GetLocation {
16922        pub(crate) fn new(
16923            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16924        ) -> Self {
16925            Self(RequestBuilder::new(stub))
16926        }
16927
16928        /// Sets the full request, replacing any prior values.
16929        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
16930            mut self,
16931            v: V,
16932        ) -> Self {
16933            self.0.request = v.into();
16934            self
16935        }
16936
16937        /// Sets all the options, replacing any prior values.
16938        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16939            self.0.options = v.into();
16940            self
16941        }
16942
16943        /// Sends the request.
16944        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
16945            (*self.0.stub)
16946                .get_location(self.0.request, self.0.options)
16947                .await
16948                .map(crate::Response::into_body)
16949        }
16950
16951        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
16952        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16953            self.0.request.name = v.into();
16954            self
16955        }
16956    }
16957
16958    #[doc(hidden)]
16959    impl crate::RequestBuilder for GetLocation {
16960        fn request_options(&mut self) -> &mut crate::RequestOptions {
16961            &mut self.0.options
16962        }
16963    }
16964
16965    /// The request builder for [MetadataService::set_iam_policy][crate::client::MetadataService::set_iam_policy] calls.
16966    ///
16967    /// # Example
16968    /// ```
16969    /// # use google_cloud_dataplex_v1::builder::metadata_service::SetIamPolicy;
16970    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16971    ///
16972    /// let builder = prepare_request_builder();
16973    /// let response = builder.send().await?;
16974    /// # Ok(()) }
16975    ///
16976    /// fn prepare_request_builder() -> SetIamPolicy {
16977    ///   # panic!();
16978    ///   // ... details omitted ...
16979    /// }
16980    /// ```
16981    #[derive(Clone, Debug)]
16982    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
16983
16984    impl SetIamPolicy {
16985        pub(crate) fn new(
16986            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16987        ) -> Self {
16988            Self(RequestBuilder::new(stub))
16989        }
16990
16991        /// Sets the full request, replacing any prior values.
16992        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
16993            mut self,
16994            v: V,
16995        ) -> Self {
16996            self.0.request = v.into();
16997            self
16998        }
16999
17000        /// Sets all the options, replacing any prior values.
17001        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17002            self.0.options = v.into();
17003            self
17004        }
17005
17006        /// Sends the request.
17007        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
17008            (*self.0.stub)
17009                .set_iam_policy(self.0.request, self.0.options)
17010                .await
17011                .map(crate::Response::into_body)
17012        }
17013
17014        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
17015        ///
17016        /// This is a **required** field for requests.
17017        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
17018            self.0.request.resource = v.into();
17019            self
17020        }
17021
17022        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
17023        ///
17024        /// This is a **required** field for requests.
17025        pub fn set_policy<T>(mut self, v: T) -> Self
17026        where
17027            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
17028        {
17029            self.0.request.policy = std::option::Option::Some(v.into());
17030            self
17031        }
17032
17033        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
17034        ///
17035        /// This is a **required** field for requests.
17036        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
17037        where
17038            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
17039        {
17040            self.0.request.policy = v.map(|x| x.into());
17041            self
17042        }
17043
17044        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
17045        pub fn set_update_mask<T>(mut self, v: T) -> Self
17046        where
17047            T: std::convert::Into<wkt::FieldMask>,
17048        {
17049            self.0.request.update_mask = std::option::Option::Some(v.into());
17050            self
17051        }
17052
17053        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
17054        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
17055        where
17056            T: std::convert::Into<wkt::FieldMask>,
17057        {
17058            self.0.request.update_mask = v.map(|x| x.into());
17059            self
17060        }
17061    }
17062
17063    #[doc(hidden)]
17064    impl crate::RequestBuilder for SetIamPolicy {
17065        fn request_options(&mut self) -> &mut crate::RequestOptions {
17066            &mut self.0.options
17067        }
17068    }
17069
17070    /// The request builder for [MetadataService::get_iam_policy][crate::client::MetadataService::get_iam_policy] calls.
17071    ///
17072    /// # Example
17073    /// ```
17074    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetIamPolicy;
17075    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17076    ///
17077    /// let builder = prepare_request_builder();
17078    /// let response = builder.send().await?;
17079    /// # Ok(()) }
17080    ///
17081    /// fn prepare_request_builder() -> GetIamPolicy {
17082    ///   # panic!();
17083    ///   // ... details omitted ...
17084    /// }
17085    /// ```
17086    #[derive(Clone, Debug)]
17087    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
17088
17089    impl GetIamPolicy {
17090        pub(crate) fn new(
17091            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17092        ) -> Self {
17093            Self(RequestBuilder::new(stub))
17094        }
17095
17096        /// Sets the full request, replacing any prior values.
17097        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
17098            mut self,
17099            v: V,
17100        ) -> Self {
17101            self.0.request = v.into();
17102            self
17103        }
17104
17105        /// Sets all the options, replacing any prior values.
17106        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17107            self.0.options = v.into();
17108            self
17109        }
17110
17111        /// Sends the request.
17112        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
17113            (*self.0.stub)
17114                .get_iam_policy(self.0.request, self.0.options)
17115                .await
17116                .map(crate::Response::into_body)
17117        }
17118
17119        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
17120        ///
17121        /// This is a **required** field for requests.
17122        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
17123            self.0.request.resource = v.into();
17124            self
17125        }
17126
17127        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
17128        pub fn set_options<T>(mut self, v: T) -> Self
17129        where
17130            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
17131        {
17132            self.0.request.options = std::option::Option::Some(v.into());
17133            self
17134        }
17135
17136        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
17137        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
17138        where
17139            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
17140        {
17141            self.0.request.options = v.map(|x| x.into());
17142            self
17143        }
17144    }
17145
17146    #[doc(hidden)]
17147    impl crate::RequestBuilder for GetIamPolicy {
17148        fn request_options(&mut self) -> &mut crate::RequestOptions {
17149            &mut self.0.options
17150        }
17151    }
17152
17153    /// The request builder for [MetadataService::test_iam_permissions][crate::client::MetadataService::test_iam_permissions] calls.
17154    ///
17155    /// # Example
17156    /// ```
17157    /// # use google_cloud_dataplex_v1::builder::metadata_service::TestIamPermissions;
17158    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17159    ///
17160    /// let builder = prepare_request_builder();
17161    /// let response = builder.send().await?;
17162    /// # Ok(()) }
17163    ///
17164    /// fn prepare_request_builder() -> TestIamPermissions {
17165    ///   # panic!();
17166    ///   // ... details omitted ...
17167    /// }
17168    /// ```
17169    #[derive(Clone, Debug)]
17170    pub struct TestIamPermissions(
17171        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
17172    );
17173
17174    impl TestIamPermissions {
17175        pub(crate) fn new(
17176            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17177        ) -> Self {
17178            Self(RequestBuilder::new(stub))
17179        }
17180
17181        /// Sets the full request, replacing any prior values.
17182        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
17183            mut self,
17184            v: V,
17185        ) -> Self {
17186            self.0.request = v.into();
17187            self
17188        }
17189
17190        /// Sets all the options, replacing any prior values.
17191        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17192            self.0.options = v.into();
17193            self
17194        }
17195
17196        /// Sends the request.
17197        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
17198            (*self.0.stub)
17199                .test_iam_permissions(self.0.request, self.0.options)
17200                .await
17201                .map(crate::Response::into_body)
17202        }
17203
17204        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
17205        ///
17206        /// This is a **required** field for requests.
17207        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
17208            self.0.request.resource = v.into();
17209            self
17210        }
17211
17212        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
17213        ///
17214        /// This is a **required** field for requests.
17215        pub fn set_permissions<T, V>(mut self, v: T) -> Self
17216        where
17217            T: std::iter::IntoIterator<Item = V>,
17218            V: std::convert::Into<std::string::String>,
17219        {
17220            use std::iter::Iterator;
17221            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
17222            self
17223        }
17224    }
17225
17226    #[doc(hidden)]
17227    impl crate::RequestBuilder for TestIamPermissions {
17228        fn request_options(&mut self) -> &mut crate::RequestOptions {
17229            &mut self.0.options
17230        }
17231    }
17232
17233    /// The request builder for [MetadataService::list_operations][crate::client::MetadataService::list_operations] calls.
17234    ///
17235    /// # Example
17236    /// ```
17237    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListOperations;
17238    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17239    /// use google_cloud_gax::paginator::ItemPaginator;
17240    ///
17241    /// let builder = prepare_request_builder();
17242    /// let mut items = builder.by_item();
17243    /// while let Some(result) = items.next().await {
17244    ///   let item = result?;
17245    /// }
17246    /// # Ok(()) }
17247    ///
17248    /// fn prepare_request_builder() -> ListOperations {
17249    ///   # panic!();
17250    ///   // ... details omitted ...
17251    /// }
17252    /// ```
17253    #[derive(Clone, Debug)]
17254    pub struct ListOperations(
17255        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
17256    );
17257
17258    impl ListOperations {
17259        pub(crate) fn new(
17260            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17261        ) -> Self {
17262            Self(RequestBuilder::new(stub))
17263        }
17264
17265        /// Sets the full request, replacing any prior values.
17266        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
17267            mut self,
17268            v: V,
17269        ) -> Self {
17270            self.0.request = v.into();
17271            self
17272        }
17273
17274        /// Sets all the options, replacing any prior values.
17275        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17276            self.0.options = v.into();
17277            self
17278        }
17279
17280        /// Sends the request.
17281        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
17282            (*self.0.stub)
17283                .list_operations(self.0.request, self.0.options)
17284                .await
17285                .map(crate::Response::into_body)
17286        }
17287
17288        /// Streams each page in the collection.
17289        pub fn by_page(
17290            self,
17291        ) -> impl google_cloud_gax::paginator::Paginator<
17292            google_cloud_longrunning::model::ListOperationsResponse,
17293            crate::Error,
17294        > {
17295            use std::clone::Clone;
17296            let token = self.0.request.page_token.clone();
17297            let execute = move |token: String| {
17298                let mut builder = self.clone();
17299                builder.0.request = builder.0.request.set_page_token(token);
17300                builder.send()
17301            };
17302            google_cloud_gax::paginator::internal::new_paginator(token, execute)
17303        }
17304
17305        /// Streams each item in the collection.
17306        pub fn by_item(
17307            self,
17308        ) -> impl google_cloud_gax::paginator::ItemPaginator<
17309            google_cloud_longrunning::model::ListOperationsResponse,
17310            crate::Error,
17311        > {
17312            use google_cloud_gax::paginator::Paginator;
17313            self.by_page().items()
17314        }
17315
17316        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
17317        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17318            self.0.request.name = v.into();
17319            self
17320        }
17321
17322        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
17323        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
17324            self.0.request.filter = v.into();
17325            self
17326        }
17327
17328        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
17329        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17330            self.0.request.page_size = v.into();
17331            self
17332        }
17333
17334        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
17335        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17336            self.0.request.page_token = v.into();
17337            self
17338        }
17339
17340        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
17341        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
17342            self.0.request.return_partial_success = v.into();
17343            self
17344        }
17345    }
17346
17347    #[doc(hidden)]
17348    impl crate::RequestBuilder for ListOperations {
17349        fn request_options(&mut self) -> &mut crate::RequestOptions {
17350            &mut self.0.options
17351        }
17352    }
17353
17354    /// The request builder for [MetadataService::get_operation][crate::client::MetadataService::get_operation] calls.
17355    ///
17356    /// # Example
17357    /// ```
17358    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetOperation;
17359    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17360    ///
17361    /// let builder = prepare_request_builder();
17362    /// let response = builder.send().await?;
17363    /// # Ok(()) }
17364    ///
17365    /// fn prepare_request_builder() -> GetOperation {
17366    ///   # panic!();
17367    ///   // ... details omitted ...
17368    /// }
17369    /// ```
17370    #[derive(Clone, Debug)]
17371    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
17372
17373    impl GetOperation {
17374        pub(crate) fn new(
17375            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17376        ) -> Self {
17377            Self(RequestBuilder::new(stub))
17378        }
17379
17380        /// Sets the full request, replacing any prior values.
17381        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
17382            mut self,
17383            v: V,
17384        ) -> Self {
17385            self.0.request = v.into();
17386            self
17387        }
17388
17389        /// Sets all the options, replacing any prior values.
17390        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17391            self.0.options = v.into();
17392            self
17393        }
17394
17395        /// Sends the request.
17396        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17397            (*self.0.stub)
17398                .get_operation(self.0.request, self.0.options)
17399                .await
17400                .map(crate::Response::into_body)
17401        }
17402
17403        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
17404        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17405            self.0.request.name = v.into();
17406            self
17407        }
17408    }
17409
17410    #[doc(hidden)]
17411    impl crate::RequestBuilder for GetOperation {
17412        fn request_options(&mut self) -> &mut crate::RequestOptions {
17413            &mut self.0.options
17414        }
17415    }
17416
17417    /// The request builder for [MetadataService::delete_operation][crate::client::MetadataService::delete_operation] calls.
17418    ///
17419    /// # Example
17420    /// ```
17421    /// # use google_cloud_dataplex_v1::builder::metadata_service::DeleteOperation;
17422    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17423    ///
17424    /// let builder = prepare_request_builder();
17425    /// let response = builder.send().await?;
17426    /// # Ok(()) }
17427    ///
17428    /// fn prepare_request_builder() -> DeleteOperation {
17429    ///   # panic!();
17430    ///   // ... details omitted ...
17431    /// }
17432    /// ```
17433    #[derive(Clone, Debug)]
17434    pub struct DeleteOperation(
17435        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
17436    );
17437
17438    impl DeleteOperation {
17439        pub(crate) fn new(
17440            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17441        ) -> Self {
17442            Self(RequestBuilder::new(stub))
17443        }
17444
17445        /// Sets the full request, replacing any prior values.
17446        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
17447            mut self,
17448            v: V,
17449        ) -> Self {
17450            self.0.request = v.into();
17451            self
17452        }
17453
17454        /// Sets all the options, replacing any prior values.
17455        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17456            self.0.options = v.into();
17457            self
17458        }
17459
17460        /// Sends the request.
17461        pub async fn send(self) -> Result<()> {
17462            (*self.0.stub)
17463                .delete_operation(self.0.request, self.0.options)
17464                .await
17465                .map(crate::Response::into_body)
17466        }
17467
17468        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
17469        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17470            self.0.request.name = v.into();
17471            self
17472        }
17473    }
17474
17475    #[doc(hidden)]
17476    impl crate::RequestBuilder for DeleteOperation {
17477        fn request_options(&mut self) -> &mut crate::RequestOptions {
17478            &mut self.0.options
17479        }
17480    }
17481
17482    /// The request builder for [MetadataService::cancel_operation][crate::client::MetadataService::cancel_operation] calls.
17483    ///
17484    /// # Example
17485    /// ```
17486    /// # use google_cloud_dataplex_v1::builder::metadata_service::CancelOperation;
17487    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17488    ///
17489    /// let builder = prepare_request_builder();
17490    /// let response = builder.send().await?;
17491    /// # Ok(()) }
17492    ///
17493    /// fn prepare_request_builder() -> CancelOperation {
17494    ///   # panic!();
17495    ///   // ... details omitted ...
17496    /// }
17497    /// ```
17498    #[derive(Clone, Debug)]
17499    pub struct CancelOperation(
17500        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
17501    );
17502
17503    impl CancelOperation {
17504        pub(crate) fn new(
17505            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17506        ) -> Self {
17507            Self(RequestBuilder::new(stub))
17508        }
17509
17510        /// Sets the full request, replacing any prior values.
17511        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
17512            mut self,
17513            v: V,
17514        ) -> Self {
17515            self.0.request = v.into();
17516            self
17517        }
17518
17519        /// Sets all the options, replacing any prior values.
17520        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17521            self.0.options = v.into();
17522            self
17523        }
17524
17525        /// Sends the request.
17526        pub async fn send(self) -> Result<()> {
17527            (*self.0.stub)
17528                .cancel_operation(self.0.request, self.0.options)
17529                .await
17530                .map(crate::Response::into_body)
17531        }
17532
17533        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
17534        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17535            self.0.request.name = v.into();
17536            self
17537        }
17538    }
17539
17540    #[doc(hidden)]
17541    impl crate::RequestBuilder for CancelOperation {
17542        fn request_options(&mut self) -> &mut crate::RequestOptions {
17543            &mut self.0.options
17544        }
17545    }
17546}
17547
17548/// Request and client builders for [DataplexService][crate::client::DataplexService].
17549pub mod dataplex_service {
17550    use crate::Result;
17551
17552    /// A builder for [DataplexService][crate::client::DataplexService].
17553    ///
17554    /// ```
17555    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
17556    /// # use google_cloud_dataplex_v1::*;
17557    /// # use builder::dataplex_service::ClientBuilder;
17558    /// # use client::DataplexService;
17559    /// let builder : ClientBuilder = DataplexService::builder();
17560    /// let client = builder
17561    ///     .with_endpoint("https://dataplex.googleapis.com")
17562    ///     .build().await?;
17563    /// # Ok(()) }
17564    /// ```
17565    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
17566
17567    pub(crate) mod client {
17568        use super::super::super::client::DataplexService;
17569        pub struct Factory;
17570        impl crate::ClientFactory for Factory {
17571            type Client = DataplexService;
17572            type Credentials = gaxi::options::Credentials;
17573            async fn build(
17574                self,
17575                config: gaxi::options::ClientConfig,
17576            ) -> crate::ClientBuilderResult<Self::Client> {
17577                Self::Client::new(config).await
17578            }
17579        }
17580    }
17581
17582    /// Common implementation for [crate::client::DataplexService] request builders.
17583    #[derive(Clone, Debug)]
17584    pub(crate) struct RequestBuilder<R: std::default::Default> {
17585        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17586        request: R,
17587        options: crate::RequestOptions,
17588    }
17589
17590    impl<R> RequestBuilder<R>
17591    where
17592        R: std::default::Default,
17593    {
17594        pub(crate) fn new(
17595            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17596        ) -> Self {
17597            Self {
17598                stub,
17599                request: R::default(),
17600                options: crate::RequestOptions::default(),
17601            }
17602        }
17603    }
17604
17605    /// The request builder for [DataplexService::create_lake][crate::client::DataplexService::create_lake] calls.
17606    ///
17607    /// # Example
17608    /// ```
17609    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateLake;
17610    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17611    /// use google_cloud_lro::Poller;
17612    ///
17613    /// let builder = prepare_request_builder();
17614    /// let response = builder.poller().until_done().await?;
17615    /// # Ok(()) }
17616    ///
17617    /// fn prepare_request_builder() -> CreateLake {
17618    ///   # panic!();
17619    ///   // ... details omitted ...
17620    /// }
17621    /// ```
17622    #[derive(Clone, Debug)]
17623    pub struct CreateLake(RequestBuilder<crate::model::CreateLakeRequest>);
17624
17625    impl CreateLake {
17626        pub(crate) fn new(
17627            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17628        ) -> Self {
17629            Self(RequestBuilder::new(stub))
17630        }
17631
17632        /// Sets the full request, replacing any prior values.
17633        pub fn with_request<V: Into<crate::model::CreateLakeRequest>>(mut self, v: V) -> Self {
17634            self.0.request = v.into();
17635            self
17636        }
17637
17638        /// Sets all the options, replacing any prior values.
17639        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17640            self.0.options = v.into();
17641            self
17642        }
17643
17644        /// Sends the request.
17645        ///
17646        /// # Long running operations
17647        ///
17648        /// This starts, but does not poll, a longrunning operation. More information
17649        /// on [create_lake][crate::client::DataplexService::create_lake].
17650        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17651            (*self.0.stub)
17652                .create_lake(self.0.request, self.0.options)
17653                .await
17654                .map(crate::Response::into_body)
17655        }
17656
17657        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_lake`.
17658        pub fn poller(
17659            self,
17660        ) -> impl google_cloud_lro::Poller<crate::model::Lake, crate::model::OperationMetadata>
17661        {
17662            type Operation = google_cloud_lro::internal::Operation<
17663                crate::model::Lake,
17664                crate::model::OperationMetadata,
17665            >;
17666            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17667            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17668
17669            let stub = self.0.stub.clone();
17670            let mut options = self.0.options.clone();
17671            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
17672            let query = move |name| {
17673                let stub = stub.clone();
17674                let options = options.clone();
17675                async {
17676                    let op = GetOperation::new(stub)
17677                        .set_name(name)
17678                        .with_options(options)
17679                        .send()
17680                        .await?;
17681                    Ok(Operation::new(op))
17682                }
17683            };
17684
17685            let start = move || async {
17686                let op = self.send().await?;
17687                Ok(Operation::new(op))
17688            };
17689
17690            google_cloud_lro::internal::new_poller(
17691                polling_error_policy,
17692                polling_backoff_policy,
17693                start,
17694                query,
17695            )
17696        }
17697
17698        /// Sets the value of [parent][crate::model::CreateLakeRequest::parent].
17699        ///
17700        /// This is a **required** field for requests.
17701        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
17702            self.0.request.parent = v.into();
17703            self
17704        }
17705
17706        /// Sets the value of [lake_id][crate::model::CreateLakeRequest::lake_id].
17707        ///
17708        /// This is a **required** field for requests.
17709        pub fn set_lake_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
17710            self.0.request.lake_id = v.into();
17711            self
17712        }
17713
17714        /// Sets the value of [lake][crate::model::CreateLakeRequest::lake].
17715        ///
17716        /// This is a **required** field for requests.
17717        pub fn set_lake<T>(mut self, v: T) -> Self
17718        where
17719            T: std::convert::Into<crate::model::Lake>,
17720        {
17721            self.0.request.lake = std::option::Option::Some(v.into());
17722            self
17723        }
17724
17725        /// Sets or clears the value of [lake][crate::model::CreateLakeRequest::lake].
17726        ///
17727        /// This is a **required** field for requests.
17728        pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
17729        where
17730            T: std::convert::Into<crate::model::Lake>,
17731        {
17732            self.0.request.lake = v.map(|x| x.into());
17733            self
17734        }
17735
17736        /// Sets the value of [validate_only][crate::model::CreateLakeRequest::validate_only].
17737        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
17738            self.0.request.validate_only = v.into();
17739            self
17740        }
17741    }
17742
17743    #[doc(hidden)]
17744    impl crate::RequestBuilder for CreateLake {
17745        fn request_options(&mut self) -> &mut crate::RequestOptions {
17746            &mut self.0.options
17747        }
17748    }
17749
17750    /// The request builder for [DataplexService::update_lake][crate::client::DataplexService::update_lake] calls.
17751    ///
17752    /// # Example
17753    /// ```
17754    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateLake;
17755    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17756    /// use google_cloud_lro::Poller;
17757    ///
17758    /// let builder = prepare_request_builder();
17759    /// let response = builder.poller().until_done().await?;
17760    /// # Ok(()) }
17761    ///
17762    /// fn prepare_request_builder() -> UpdateLake {
17763    ///   # panic!();
17764    ///   // ... details omitted ...
17765    /// }
17766    /// ```
17767    #[derive(Clone, Debug)]
17768    pub struct UpdateLake(RequestBuilder<crate::model::UpdateLakeRequest>);
17769
17770    impl UpdateLake {
17771        pub(crate) fn new(
17772            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17773        ) -> Self {
17774            Self(RequestBuilder::new(stub))
17775        }
17776
17777        /// Sets the full request, replacing any prior values.
17778        pub fn with_request<V: Into<crate::model::UpdateLakeRequest>>(mut self, v: V) -> Self {
17779            self.0.request = v.into();
17780            self
17781        }
17782
17783        /// Sets all the options, replacing any prior values.
17784        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17785            self.0.options = v.into();
17786            self
17787        }
17788
17789        /// Sends the request.
17790        ///
17791        /// # Long running operations
17792        ///
17793        /// This starts, but does not poll, a longrunning operation. More information
17794        /// on [update_lake][crate::client::DataplexService::update_lake].
17795        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17796            (*self.0.stub)
17797                .update_lake(self.0.request, self.0.options)
17798                .await
17799                .map(crate::Response::into_body)
17800        }
17801
17802        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_lake`.
17803        pub fn poller(
17804            self,
17805        ) -> impl google_cloud_lro::Poller<crate::model::Lake, crate::model::OperationMetadata>
17806        {
17807            type Operation = google_cloud_lro::internal::Operation<
17808                crate::model::Lake,
17809                crate::model::OperationMetadata,
17810            >;
17811            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17812            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17813
17814            let stub = self.0.stub.clone();
17815            let mut options = self.0.options.clone();
17816            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
17817            let query = move |name| {
17818                let stub = stub.clone();
17819                let options = options.clone();
17820                async {
17821                    let op = GetOperation::new(stub)
17822                        .set_name(name)
17823                        .with_options(options)
17824                        .send()
17825                        .await?;
17826                    Ok(Operation::new(op))
17827                }
17828            };
17829
17830            let start = move || async {
17831                let op = self.send().await?;
17832                Ok(Operation::new(op))
17833            };
17834
17835            google_cloud_lro::internal::new_poller(
17836                polling_error_policy,
17837                polling_backoff_policy,
17838                start,
17839                query,
17840            )
17841        }
17842
17843        /// Sets the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
17844        ///
17845        /// This is a **required** field for requests.
17846        pub fn set_update_mask<T>(mut self, v: T) -> Self
17847        where
17848            T: std::convert::Into<wkt::FieldMask>,
17849        {
17850            self.0.request.update_mask = std::option::Option::Some(v.into());
17851            self
17852        }
17853
17854        /// Sets or clears the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
17855        ///
17856        /// This is a **required** field for requests.
17857        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
17858        where
17859            T: std::convert::Into<wkt::FieldMask>,
17860        {
17861            self.0.request.update_mask = v.map(|x| x.into());
17862            self
17863        }
17864
17865        /// Sets the value of [lake][crate::model::UpdateLakeRequest::lake].
17866        ///
17867        /// This is a **required** field for requests.
17868        pub fn set_lake<T>(mut self, v: T) -> Self
17869        where
17870            T: std::convert::Into<crate::model::Lake>,
17871        {
17872            self.0.request.lake = std::option::Option::Some(v.into());
17873            self
17874        }
17875
17876        /// Sets or clears the value of [lake][crate::model::UpdateLakeRequest::lake].
17877        ///
17878        /// This is a **required** field for requests.
17879        pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
17880        where
17881            T: std::convert::Into<crate::model::Lake>,
17882        {
17883            self.0.request.lake = v.map(|x| x.into());
17884            self
17885        }
17886
17887        /// Sets the value of [validate_only][crate::model::UpdateLakeRequest::validate_only].
17888        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
17889            self.0.request.validate_only = v.into();
17890            self
17891        }
17892    }
17893
17894    #[doc(hidden)]
17895    impl crate::RequestBuilder for UpdateLake {
17896        fn request_options(&mut self) -> &mut crate::RequestOptions {
17897            &mut self.0.options
17898        }
17899    }
17900
17901    /// The request builder for [DataplexService::delete_lake][crate::client::DataplexService::delete_lake] calls.
17902    ///
17903    /// # Example
17904    /// ```
17905    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteLake;
17906    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17907    /// use google_cloud_lro::Poller;
17908    ///
17909    /// let builder = prepare_request_builder();
17910    /// let response = builder.poller().until_done().await?;
17911    /// # Ok(()) }
17912    ///
17913    /// fn prepare_request_builder() -> DeleteLake {
17914    ///   # panic!();
17915    ///   // ... details omitted ...
17916    /// }
17917    /// ```
17918    #[derive(Clone, Debug)]
17919    pub struct DeleteLake(RequestBuilder<crate::model::DeleteLakeRequest>);
17920
17921    impl DeleteLake {
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::DeleteLakeRequest>>(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        ///
17942        /// # Long running operations
17943        ///
17944        /// This starts, but does not poll, a longrunning operation. More information
17945        /// on [delete_lake][crate::client::DataplexService::delete_lake].
17946        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17947            (*self.0.stub)
17948                .delete_lake(self.0.request, self.0.options)
17949                .await
17950                .map(crate::Response::into_body)
17951        }
17952
17953        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_lake`.
17954        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
17955            type Operation =
17956                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
17957            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17958            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17959
17960            let stub = self.0.stub.clone();
17961            let mut options = self.0.options.clone();
17962            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
17963            let query = move |name| {
17964                let stub = stub.clone();
17965                let options = options.clone();
17966                async {
17967                    let op = GetOperation::new(stub)
17968                        .set_name(name)
17969                        .with_options(options)
17970                        .send()
17971                        .await?;
17972                    Ok(Operation::new(op))
17973                }
17974            };
17975
17976            let start = move || async {
17977                let op = self.send().await?;
17978                Ok(Operation::new(op))
17979            };
17980
17981            google_cloud_lro::internal::new_unit_response_poller(
17982                polling_error_policy,
17983                polling_backoff_policy,
17984                start,
17985                query,
17986            )
17987        }
17988
17989        /// Sets the value of [name][crate::model::DeleteLakeRequest::name].
17990        ///
17991        /// This is a **required** field for requests.
17992        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17993            self.0.request.name = v.into();
17994            self
17995        }
17996    }
17997
17998    #[doc(hidden)]
17999    impl crate::RequestBuilder for DeleteLake {
18000        fn request_options(&mut self) -> &mut crate::RequestOptions {
18001            &mut self.0.options
18002        }
18003    }
18004
18005    /// The request builder for [DataplexService::list_lakes][crate::client::DataplexService::list_lakes] calls.
18006    ///
18007    /// # Example
18008    /// ```
18009    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListLakes;
18010    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18011    /// use google_cloud_gax::paginator::ItemPaginator;
18012    ///
18013    /// let builder = prepare_request_builder();
18014    /// let mut items = builder.by_item();
18015    /// while let Some(result) = items.next().await {
18016    ///   let item = result?;
18017    /// }
18018    /// # Ok(()) }
18019    ///
18020    /// fn prepare_request_builder() -> ListLakes {
18021    ///   # panic!();
18022    ///   // ... details omitted ...
18023    /// }
18024    /// ```
18025    #[derive(Clone, Debug)]
18026    pub struct ListLakes(RequestBuilder<crate::model::ListLakesRequest>);
18027
18028    impl ListLakes {
18029        pub(crate) fn new(
18030            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18031        ) -> Self {
18032            Self(RequestBuilder::new(stub))
18033        }
18034
18035        /// Sets the full request, replacing any prior values.
18036        pub fn with_request<V: Into<crate::model::ListLakesRequest>>(mut self, v: V) -> Self {
18037            self.0.request = v.into();
18038            self
18039        }
18040
18041        /// Sets all the options, replacing any prior values.
18042        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18043            self.0.options = v.into();
18044            self
18045        }
18046
18047        /// Sends the request.
18048        pub async fn send(self) -> Result<crate::model::ListLakesResponse> {
18049            (*self.0.stub)
18050                .list_lakes(self.0.request, self.0.options)
18051                .await
18052                .map(crate::Response::into_body)
18053        }
18054
18055        /// Streams each page in the collection.
18056        pub fn by_page(
18057            self,
18058        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListLakesResponse, crate::Error>
18059        {
18060            use std::clone::Clone;
18061            let token = self.0.request.page_token.clone();
18062            let execute = move |token: String| {
18063                let mut builder = self.clone();
18064                builder.0.request = builder.0.request.set_page_token(token);
18065                builder.send()
18066            };
18067            google_cloud_gax::paginator::internal::new_paginator(token, execute)
18068        }
18069
18070        /// Streams each item in the collection.
18071        pub fn by_item(
18072            self,
18073        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListLakesResponse, crate::Error>
18074        {
18075            use google_cloud_gax::paginator::Paginator;
18076            self.by_page().items()
18077        }
18078
18079        /// Sets the value of [parent][crate::model::ListLakesRequest::parent].
18080        ///
18081        /// This is a **required** field for requests.
18082        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18083            self.0.request.parent = v.into();
18084            self
18085        }
18086
18087        /// Sets the value of [page_size][crate::model::ListLakesRequest::page_size].
18088        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18089            self.0.request.page_size = v.into();
18090            self
18091        }
18092
18093        /// Sets the value of [page_token][crate::model::ListLakesRequest::page_token].
18094        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18095            self.0.request.page_token = v.into();
18096            self
18097        }
18098
18099        /// Sets the value of [filter][crate::model::ListLakesRequest::filter].
18100        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
18101            self.0.request.filter = v.into();
18102            self
18103        }
18104
18105        /// Sets the value of [order_by][crate::model::ListLakesRequest::order_by].
18106        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
18107            self.0.request.order_by = v.into();
18108            self
18109        }
18110    }
18111
18112    #[doc(hidden)]
18113    impl crate::RequestBuilder for ListLakes {
18114        fn request_options(&mut self) -> &mut crate::RequestOptions {
18115            &mut self.0.options
18116        }
18117    }
18118
18119    /// The request builder for [DataplexService::get_lake][crate::client::DataplexService::get_lake] calls.
18120    ///
18121    /// # Example
18122    /// ```
18123    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetLake;
18124    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18125    ///
18126    /// let builder = prepare_request_builder();
18127    /// let response = builder.send().await?;
18128    /// # Ok(()) }
18129    ///
18130    /// fn prepare_request_builder() -> GetLake {
18131    ///   # panic!();
18132    ///   // ... details omitted ...
18133    /// }
18134    /// ```
18135    #[derive(Clone, Debug)]
18136    pub struct GetLake(RequestBuilder<crate::model::GetLakeRequest>);
18137
18138    impl GetLake {
18139        pub(crate) fn new(
18140            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18141        ) -> Self {
18142            Self(RequestBuilder::new(stub))
18143        }
18144
18145        /// Sets the full request, replacing any prior values.
18146        pub fn with_request<V: Into<crate::model::GetLakeRequest>>(mut self, v: V) -> Self {
18147            self.0.request = v.into();
18148            self
18149        }
18150
18151        /// Sets all the options, replacing any prior values.
18152        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18153            self.0.options = v.into();
18154            self
18155        }
18156
18157        /// Sends the request.
18158        pub async fn send(self) -> Result<crate::model::Lake> {
18159            (*self.0.stub)
18160                .get_lake(self.0.request, self.0.options)
18161                .await
18162                .map(crate::Response::into_body)
18163        }
18164
18165        /// Sets the value of [name][crate::model::GetLakeRequest::name].
18166        ///
18167        /// This is a **required** field for requests.
18168        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18169            self.0.request.name = v.into();
18170            self
18171        }
18172    }
18173
18174    #[doc(hidden)]
18175    impl crate::RequestBuilder for GetLake {
18176        fn request_options(&mut self) -> &mut crate::RequestOptions {
18177            &mut self.0.options
18178        }
18179    }
18180
18181    /// The request builder for [DataplexService::list_lake_actions][crate::client::DataplexService::list_lake_actions] calls.
18182    ///
18183    /// # Example
18184    /// ```
18185    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListLakeActions;
18186    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18187    /// use google_cloud_gax::paginator::ItemPaginator;
18188    ///
18189    /// let builder = prepare_request_builder();
18190    /// let mut items = builder.by_item();
18191    /// while let Some(result) = items.next().await {
18192    ///   let item = result?;
18193    /// }
18194    /// # Ok(()) }
18195    ///
18196    /// fn prepare_request_builder() -> ListLakeActions {
18197    ///   # panic!();
18198    ///   // ... details omitted ...
18199    /// }
18200    /// ```
18201    #[derive(Clone, Debug)]
18202    pub struct ListLakeActions(RequestBuilder<crate::model::ListLakeActionsRequest>);
18203
18204    impl ListLakeActions {
18205        pub(crate) fn new(
18206            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18207        ) -> Self {
18208            Self(RequestBuilder::new(stub))
18209        }
18210
18211        /// Sets the full request, replacing any prior values.
18212        pub fn with_request<V: Into<crate::model::ListLakeActionsRequest>>(mut self, v: V) -> Self {
18213            self.0.request = v.into();
18214            self
18215        }
18216
18217        /// Sets all the options, replacing any prior values.
18218        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18219            self.0.options = v.into();
18220            self
18221        }
18222
18223        /// Sends the request.
18224        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
18225            (*self.0.stub)
18226                .list_lake_actions(self.0.request, self.0.options)
18227                .await
18228                .map(crate::Response::into_body)
18229        }
18230
18231        /// Streams each page in the collection.
18232        pub fn by_page(
18233            self,
18234        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListActionsResponse, crate::Error>
18235        {
18236            use std::clone::Clone;
18237            let token = self.0.request.page_token.clone();
18238            let execute = move |token: String| {
18239                let mut builder = self.clone();
18240                builder.0.request = builder.0.request.set_page_token(token);
18241                builder.send()
18242            };
18243            google_cloud_gax::paginator::internal::new_paginator(token, execute)
18244        }
18245
18246        /// Streams each item in the collection.
18247        pub fn by_item(
18248            self,
18249        ) -> impl google_cloud_gax::paginator::ItemPaginator<
18250            crate::model::ListActionsResponse,
18251            crate::Error,
18252        > {
18253            use google_cloud_gax::paginator::Paginator;
18254            self.by_page().items()
18255        }
18256
18257        /// Sets the value of [parent][crate::model::ListLakeActionsRequest::parent].
18258        ///
18259        /// This is a **required** field for requests.
18260        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18261            self.0.request.parent = v.into();
18262            self
18263        }
18264
18265        /// Sets the value of [page_size][crate::model::ListLakeActionsRequest::page_size].
18266        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18267            self.0.request.page_size = v.into();
18268            self
18269        }
18270
18271        /// Sets the value of [page_token][crate::model::ListLakeActionsRequest::page_token].
18272        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18273            self.0.request.page_token = v.into();
18274            self
18275        }
18276    }
18277
18278    #[doc(hidden)]
18279    impl crate::RequestBuilder for ListLakeActions {
18280        fn request_options(&mut self) -> &mut crate::RequestOptions {
18281            &mut self.0.options
18282        }
18283    }
18284
18285    /// The request builder for [DataplexService::create_zone][crate::client::DataplexService::create_zone] calls.
18286    ///
18287    /// # Example
18288    /// ```
18289    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateZone;
18290    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18291    /// use google_cloud_lro::Poller;
18292    ///
18293    /// let builder = prepare_request_builder();
18294    /// let response = builder.poller().until_done().await?;
18295    /// # Ok(()) }
18296    ///
18297    /// fn prepare_request_builder() -> CreateZone {
18298    ///   # panic!();
18299    ///   // ... details omitted ...
18300    /// }
18301    /// ```
18302    #[derive(Clone, Debug)]
18303    pub struct CreateZone(RequestBuilder<crate::model::CreateZoneRequest>);
18304
18305    impl CreateZone {
18306        pub(crate) fn new(
18307            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18308        ) -> Self {
18309            Self(RequestBuilder::new(stub))
18310        }
18311
18312        /// Sets the full request, replacing any prior values.
18313        pub fn with_request<V: Into<crate::model::CreateZoneRequest>>(mut self, v: V) -> Self {
18314            self.0.request = v.into();
18315            self
18316        }
18317
18318        /// Sets all the options, replacing any prior values.
18319        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18320            self.0.options = v.into();
18321            self
18322        }
18323
18324        /// Sends the request.
18325        ///
18326        /// # Long running operations
18327        ///
18328        /// This starts, but does not poll, a longrunning operation. More information
18329        /// on [create_zone][crate::client::DataplexService::create_zone].
18330        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18331            (*self.0.stub)
18332                .create_zone(self.0.request, self.0.options)
18333                .await
18334                .map(crate::Response::into_body)
18335        }
18336
18337        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_zone`.
18338        pub fn poller(
18339            self,
18340        ) -> impl google_cloud_lro::Poller<crate::model::Zone, crate::model::OperationMetadata>
18341        {
18342            type Operation = google_cloud_lro::internal::Operation<
18343                crate::model::Zone,
18344                crate::model::OperationMetadata,
18345            >;
18346            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18347            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18348
18349            let stub = self.0.stub.clone();
18350            let mut options = self.0.options.clone();
18351            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18352            let query = move |name| {
18353                let stub = stub.clone();
18354                let options = options.clone();
18355                async {
18356                    let op = GetOperation::new(stub)
18357                        .set_name(name)
18358                        .with_options(options)
18359                        .send()
18360                        .await?;
18361                    Ok(Operation::new(op))
18362                }
18363            };
18364
18365            let start = move || async {
18366                let op = self.send().await?;
18367                Ok(Operation::new(op))
18368            };
18369
18370            google_cloud_lro::internal::new_poller(
18371                polling_error_policy,
18372                polling_backoff_policy,
18373                start,
18374                query,
18375            )
18376        }
18377
18378        /// Sets the value of [parent][crate::model::CreateZoneRequest::parent].
18379        ///
18380        /// This is a **required** field for requests.
18381        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18382            self.0.request.parent = v.into();
18383            self
18384        }
18385
18386        /// Sets the value of [zone_id][crate::model::CreateZoneRequest::zone_id].
18387        ///
18388        /// This is a **required** field for requests.
18389        pub fn set_zone_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
18390            self.0.request.zone_id = v.into();
18391            self
18392        }
18393
18394        /// Sets the value of [zone][crate::model::CreateZoneRequest::zone].
18395        ///
18396        /// This is a **required** field for requests.
18397        pub fn set_zone<T>(mut self, v: T) -> Self
18398        where
18399            T: std::convert::Into<crate::model::Zone>,
18400        {
18401            self.0.request.zone = std::option::Option::Some(v.into());
18402            self
18403        }
18404
18405        /// Sets or clears the value of [zone][crate::model::CreateZoneRequest::zone].
18406        ///
18407        /// This is a **required** field for requests.
18408        pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
18409        where
18410            T: std::convert::Into<crate::model::Zone>,
18411        {
18412            self.0.request.zone = v.map(|x| x.into());
18413            self
18414        }
18415
18416        /// Sets the value of [validate_only][crate::model::CreateZoneRequest::validate_only].
18417        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18418            self.0.request.validate_only = v.into();
18419            self
18420        }
18421    }
18422
18423    #[doc(hidden)]
18424    impl crate::RequestBuilder for CreateZone {
18425        fn request_options(&mut self) -> &mut crate::RequestOptions {
18426            &mut self.0.options
18427        }
18428    }
18429
18430    /// The request builder for [DataplexService::update_zone][crate::client::DataplexService::update_zone] calls.
18431    ///
18432    /// # Example
18433    /// ```
18434    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateZone;
18435    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18436    /// use google_cloud_lro::Poller;
18437    ///
18438    /// let builder = prepare_request_builder();
18439    /// let response = builder.poller().until_done().await?;
18440    /// # Ok(()) }
18441    ///
18442    /// fn prepare_request_builder() -> UpdateZone {
18443    ///   # panic!();
18444    ///   // ... details omitted ...
18445    /// }
18446    /// ```
18447    #[derive(Clone, Debug)]
18448    pub struct UpdateZone(RequestBuilder<crate::model::UpdateZoneRequest>);
18449
18450    impl UpdateZone {
18451        pub(crate) fn new(
18452            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18453        ) -> Self {
18454            Self(RequestBuilder::new(stub))
18455        }
18456
18457        /// Sets the full request, replacing any prior values.
18458        pub fn with_request<V: Into<crate::model::UpdateZoneRequest>>(mut self, v: V) -> Self {
18459            self.0.request = v.into();
18460            self
18461        }
18462
18463        /// Sets all the options, replacing any prior values.
18464        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18465            self.0.options = v.into();
18466            self
18467        }
18468
18469        /// Sends the request.
18470        ///
18471        /// # Long running operations
18472        ///
18473        /// This starts, but does not poll, a longrunning operation. More information
18474        /// on [update_zone][crate::client::DataplexService::update_zone].
18475        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18476            (*self.0.stub)
18477                .update_zone(self.0.request, self.0.options)
18478                .await
18479                .map(crate::Response::into_body)
18480        }
18481
18482        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_zone`.
18483        pub fn poller(
18484            self,
18485        ) -> impl google_cloud_lro::Poller<crate::model::Zone, crate::model::OperationMetadata>
18486        {
18487            type Operation = google_cloud_lro::internal::Operation<
18488                crate::model::Zone,
18489                crate::model::OperationMetadata,
18490            >;
18491            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18492            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18493
18494            let stub = self.0.stub.clone();
18495            let mut options = self.0.options.clone();
18496            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18497            let query = move |name| {
18498                let stub = stub.clone();
18499                let options = options.clone();
18500                async {
18501                    let op = GetOperation::new(stub)
18502                        .set_name(name)
18503                        .with_options(options)
18504                        .send()
18505                        .await?;
18506                    Ok(Operation::new(op))
18507                }
18508            };
18509
18510            let start = move || async {
18511                let op = self.send().await?;
18512                Ok(Operation::new(op))
18513            };
18514
18515            google_cloud_lro::internal::new_poller(
18516                polling_error_policy,
18517                polling_backoff_policy,
18518                start,
18519                query,
18520            )
18521        }
18522
18523        /// Sets the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
18524        ///
18525        /// This is a **required** field for requests.
18526        pub fn set_update_mask<T>(mut self, v: T) -> Self
18527        where
18528            T: std::convert::Into<wkt::FieldMask>,
18529        {
18530            self.0.request.update_mask = std::option::Option::Some(v.into());
18531            self
18532        }
18533
18534        /// Sets or clears the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
18535        ///
18536        /// This is a **required** field for requests.
18537        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
18538        where
18539            T: std::convert::Into<wkt::FieldMask>,
18540        {
18541            self.0.request.update_mask = v.map(|x| x.into());
18542            self
18543        }
18544
18545        /// Sets the value of [zone][crate::model::UpdateZoneRequest::zone].
18546        ///
18547        /// This is a **required** field for requests.
18548        pub fn set_zone<T>(mut self, v: T) -> Self
18549        where
18550            T: std::convert::Into<crate::model::Zone>,
18551        {
18552            self.0.request.zone = std::option::Option::Some(v.into());
18553            self
18554        }
18555
18556        /// Sets or clears the value of [zone][crate::model::UpdateZoneRequest::zone].
18557        ///
18558        /// This is a **required** field for requests.
18559        pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
18560        where
18561            T: std::convert::Into<crate::model::Zone>,
18562        {
18563            self.0.request.zone = v.map(|x| x.into());
18564            self
18565        }
18566
18567        /// Sets the value of [validate_only][crate::model::UpdateZoneRequest::validate_only].
18568        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18569            self.0.request.validate_only = v.into();
18570            self
18571        }
18572    }
18573
18574    #[doc(hidden)]
18575    impl crate::RequestBuilder for UpdateZone {
18576        fn request_options(&mut self) -> &mut crate::RequestOptions {
18577            &mut self.0.options
18578        }
18579    }
18580
18581    /// The request builder for [DataplexService::delete_zone][crate::client::DataplexService::delete_zone] calls.
18582    ///
18583    /// # Example
18584    /// ```
18585    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteZone;
18586    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18587    /// use google_cloud_lro::Poller;
18588    ///
18589    /// let builder = prepare_request_builder();
18590    /// let response = builder.poller().until_done().await?;
18591    /// # Ok(()) }
18592    ///
18593    /// fn prepare_request_builder() -> DeleteZone {
18594    ///   # panic!();
18595    ///   // ... details omitted ...
18596    /// }
18597    /// ```
18598    #[derive(Clone, Debug)]
18599    pub struct DeleteZone(RequestBuilder<crate::model::DeleteZoneRequest>);
18600
18601    impl DeleteZone {
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::DeleteZoneRequest>>(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        ///
18622        /// # Long running operations
18623        ///
18624        /// This starts, but does not poll, a longrunning operation. More information
18625        /// on [delete_zone][crate::client::DataplexService::delete_zone].
18626        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18627            (*self.0.stub)
18628                .delete_zone(self.0.request, self.0.options)
18629                .await
18630                .map(crate::Response::into_body)
18631        }
18632
18633        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_zone`.
18634        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
18635            type Operation =
18636                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
18637            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18638            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18639
18640            let stub = self.0.stub.clone();
18641            let mut options = self.0.options.clone();
18642            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18643            let query = move |name| {
18644                let stub = stub.clone();
18645                let options = options.clone();
18646                async {
18647                    let op = GetOperation::new(stub)
18648                        .set_name(name)
18649                        .with_options(options)
18650                        .send()
18651                        .await?;
18652                    Ok(Operation::new(op))
18653                }
18654            };
18655
18656            let start = move || async {
18657                let op = self.send().await?;
18658                Ok(Operation::new(op))
18659            };
18660
18661            google_cloud_lro::internal::new_unit_response_poller(
18662                polling_error_policy,
18663                polling_backoff_policy,
18664                start,
18665                query,
18666            )
18667        }
18668
18669        /// Sets the value of [name][crate::model::DeleteZoneRequest::name].
18670        ///
18671        /// This is a **required** field for requests.
18672        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18673            self.0.request.name = v.into();
18674            self
18675        }
18676    }
18677
18678    #[doc(hidden)]
18679    impl crate::RequestBuilder for DeleteZone {
18680        fn request_options(&mut self) -> &mut crate::RequestOptions {
18681            &mut self.0.options
18682        }
18683    }
18684
18685    /// The request builder for [DataplexService::list_zones][crate::client::DataplexService::list_zones] calls.
18686    ///
18687    /// # Example
18688    /// ```
18689    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListZones;
18690    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18691    /// use google_cloud_gax::paginator::ItemPaginator;
18692    ///
18693    /// let builder = prepare_request_builder();
18694    /// let mut items = builder.by_item();
18695    /// while let Some(result) = items.next().await {
18696    ///   let item = result?;
18697    /// }
18698    /// # Ok(()) }
18699    ///
18700    /// fn prepare_request_builder() -> ListZones {
18701    ///   # panic!();
18702    ///   // ... details omitted ...
18703    /// }
18704    /// ```
18705    #[derive(Clone, Debug)]
18706    pub struct ListZones(RequestBuilder<crate::model::ListZonesRequest>);
18707
18708    impl ListZones {
18709        pub(crate) fn new(
18710            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18711        ) -> Self {
18712            Self(RequestBuilder::new(stub))
18713        }
18714
18715        /// Sets the full request, replacing any prior values.
18716        pub fn with_request<V: Into<crate::model::ListZonesRequest>>(mut self, v: V) -> Self {
18717            self.0.request = v.into();
18718            self
18719        }
18720
18721        /// Sets all the options, replacing any prior values.
18722        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18723            self.0.options = v.into();
18724            self
18725        }
18726
18727        /// Sends the request.
18728        pub async fn send(self) -> Result<crate::model::ListZonesResponse> {
18729            (*self.0.stub)
18730                .list_zones(self.0.request, self.0.options)
18731                .await
18732                .map(crate::Response::into_body)
18733        }
18734
18735        /// Streams each page in the collection.
18736        pub fn by_page(
18737            self,
18738        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListZonesResponse, crate::Error>
18739        {
18740            use std::clone::Clone;
18741            let token = self.0.request.page_token.clone();
18742            let execute = move |token: String| {
18743                let mut builder = self.clone();
18744                builder.0.request = builder.0.request.set_page_token(token);
18745                builder.send()
18746            };
18747            google_cloud_gax::paginator::internal::new_paginator(token, execute)
18748        }
18749
18750        /// Streams each item in the collection.
18751        pub fn by_item(
18752            self,
18753        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListZonesResponse, crate::Error>
18754        {
18755            use google_cloud_gax::paginator::Paginator;
18756            self.by_page().items()
18757        }
18758
18759        /// Sets the value of [parent][crate::model::ListZonesRequest::parent].
18760        ///
18761        /// This is a **required** field for requests.
18762        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18763            self.0.request.parent = v.into();
18764            self
18765        }
18766
18767        /// Sets the value of [page_size][crate::model::ListZonesRequest::page_size].
18768        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18769            self.0.request.page_size = v.into();
18770            self
18771        }
18772
18773        /// Sets the value of [page_token][crate::model::ListZonesRequest::page_token].
18774        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18775            self.0.request.page_token = v.into();
18776            self
18777        }
18778
18779        /// Sets the value of [filter][crate::model::ListZonesRequest::filter].
18780        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
18781            self.0.request.filter = v.into();
18782            self
18783        }
18784
18785        /// Sets the value of [order_by][crate::model::ListZonesRequest::order_by].
18786        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
18787            self.0.request.order_by = v.into();
18788            self
18789        }
18790    }
18791
18792    #[doc(hidden)]
18793    impl crate::RequestBuilder for ListZones {
18794        fn request_options(&mut self) -> &mut crate::RequestOptions {
18795            &mut self.0.options
18796        }
18797    }
18798
18799    /// The request builder for [DataplexService::get_zone][crate::client::DataplexService::get_zone] calls.
18800    ///
18801    /// # Example
18802    /// ```
18803    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetZone;
18804    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18805    ///
18806    /// let builder = prepare_request_builder();
18807    /// let response = builder.send().await?;
18808    /// # Ok(()) }
18809    ///
18810    /// fn prepare_request_builder() -> GetZone {
18811    ///   # panic!();
18812    ///   // ... details omitted ...
18813    /// }
18814    /// ```
18815    #[derive(Clone, Debug)]
18816    pub struct GetZone(RequestBuilder<crate::model::GetZoneRequest>);
18817
18818    impl GetZone {
18819        pub(crate) fn new(
18820            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18821        ) -> Self {
18822            Self(RequestBuilder::new(stub))
18823        }
18824
18825        /// Sets the full request, replacing any prior values.
18826        pub fn with_request<V: Into<crate::model::GetZoneRequest>>(mut self, v: V) -> Self {
18827            self.0.request = v.into();
18828            self
18829        }
18830
18831        /// Sets all the options, replacing any prior values.
18832        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18833            self.0.options = v.into();
18834            self
18835        }
18836
18837        /// Sends the request.
18838        pub async fn send(self) -> Result<crate::model::Zone> {
18839            (*self.0.stub)
18840                .get_zone(self.0.request, self.0.options)
18841                .await
18842                .map(crate::Response::into_body)
18843        }
18844
18845        /// Sets the value of [name][crate::model::GetZoneRequest::name].
18846        ///
18847        /// This is a **required** field for requests.
18848        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18849            self.0.request.name = v.into();
18850            self
18851        }
18852    }
18853
18854    #[doc(hidden)]
18855    impl crate::RequestBuilder for GetZone {
18856        fn request_options(&mut self) -> &mut crate::RequestOptions {
18857            &mut self.0.options
18858        }
18859    }
18860
18861    /// The request builder for [DataplexService::list_zone_actions][crate::client::DataplexService::list_zone_actions] calls.
18862    ///
18863    /// # Example
18864    /// ```
18865    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListZoneActions;
18866    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18867    /// use google_cloud_gax::paginator::ItemPaginator;
18868    ///
18869    /// let builder = prepare_request_builder();
18870    /// let mut items = builder.by_item();
18871    /// while let Some(result) = items.next().await {
18872    ///   let item = result?;
18873    /// }
18874    /// # Ok(()) }
18875    ///
18876    /// fn prepare_request_builder() -> ListZoneActions {
18877    ///   # panic!();
18878    ///   // ... details omitted ...
18879    /// }
18880    /// ```
18881    #[derive(Clone, Debug)]
18882    pub struct ListZoneActions(RequestBuilder<crate::model::ListZoneActionsRequest>);
18883
18884    impl ListZoneActions {
18885        pub(crate) fn new(
18886            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18887        ) -> Self {
18888            Self(RequestBuilder::new(stub))
18889        }
18890
18891        /// Sets the full request, replacing any prior values.
18892        pub fn with_request<V: Into<crate::model::ListZoneActionsRequest>>(mut self, v: V) -> Self {
18893            self.0.request = v.into();
18894            self
18895        }
18896
18897        /// Sets all the options, replacing any prior values.
18898        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18899            self.0.options = v.into();
18900            self
18901        }
18902
18903        /// Sends the request.
18904        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
18905            (*self.0.stub)
18906                .list_zone_actions(self.0.request, self.0.options)
18907                .await
18908                .map(crate::Response::into_body)
18909        }
18910
18911        /// Streams each page in the collection.
18912        pub fn by_page(
18913            self,
18914        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListActionsResponse, crate::Error>
18915        {
18916            use std::clone::Clone;
18917            let token = self.0.request.page_token.clone();
18918            let execute = move |token: String| {
18919                let mut builder = self.clone();
18920                builder.0.request = builder.0.request.set_page_token(token);
18921                builder.send()
18922            };
18923            google_cloud_gax::paginator::internal::new_paginator(token, execute)
18924        }
18925
18926        /// Streams each item in the collection.
18927        pub fn by_item(
18928            self,
18929        ) -> impl google_cloud_gax::paginator::ItemPaginator<
18930            crate::model::ListActionsResponse,
18931            crate::Error,
18932        > {
18933            use google_cloud_gax::paginator::Paginator;
18934            self.by_page().items()
18935        }
18936
18937        /// Sets the value of [parent][crate::model::ListZoneActionsRequest::parent].
18938        ///
18939        /// This is a **required** field for requests.
18940        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18941            self.0.request.parent = v.into();
18942            self
18943        }
18944
18945        /// Sets the value of [page_size][crate::model::ListZoneActionsRequest::page_size].
18946        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18947            self.0.request.page_size = v.into();
18948            self
18949        }
18950
18951        /// Sets the value of [page_token][crate::model::ListZoneActionsRequest::page_token].
18952        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18953            self.0.request.page_token = v.into();
18954            self
18955        }
18956    }
18957
18958    #[doc(hidden)]
18959    impl crate::RequestBuilder for ListZoneActions {
18960        fn request_options(&mut self) -> &mut crate::RequestOptions {
18961            &mut self.0.options
18962        }
18963    }
18964
18965    /// The request builder for [DataplexService::create_asset][crate::client::DataplexService::create_asset] calls.
18966    ///
18967    /// # Example
18968    /// ```
18969    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateAsset;
18970    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18971    /// use google_cloud_lro::Poller;
18972    ///
18973    /// let builder = prepare_request_builder();
18974    /// let response = builder.poller().until_done().await?;
18975    /// # Ok(()) }
18976    ///
18977    /// fn prepare_request_builder() -> CreateAsset {
18978    ///   # panic!();
18979    ///   // ... details omitted ...
18980    /// }
18981    /// ```
18982    #[derive(Clone, Debug)]
18983    pub struct CreateAsset(RequestBuilder<crate::model::CreateAssetRequest>);
18984
18985    impl CreateAsset {
18986        pub(crate) fn new(
18987            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18988        ) -> Self {
18989            Self(RequestBuilder::new(stub))
18990        }
18991
18992        /// Sets the full request, replacing any prior values.
18993        pub fn with_request<V: Into<crate::model::CreateAssetRequest>>(mut self, v: V) -> Self {
18994            self.0.request = v.into();
18995            self
18996        }
18997
18998        /// Sets all the options, replacing any prior values.
18999        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19000            self.0.options = v.into();
19001            self
19002        }
19003
19004        /// Sends the request.
19005        ///
19006        /// # Long running operations
19007        ///
19008        /// This starts, but does not poll, a longrunning operation. More information
19009        /// on [create_asset][crate::client::DataplexService::create_asset].
19010        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19011            (*self.0.stub)
19012                .create_asset(self.0.request, self.0.options)
19013                .await
19014                .map(crate::Response::into_body)
19015        }
19016
19017        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_asset`.
19018        pub fn poller(
19019            self,
19020        ) -> impl google_cloud_lro::Poller<crate::model::Asset, crate::model::OperationMetadata>
19021        {
19022            type Operation = google_cloud_lro::internal::Operation<
19023                crate::model::Asset,
19024                crate::model::OperationMetadata,
19025            >;
19026            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19027            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19028
19029            let stub = self.0.stub.clone();
19030            let mut options = self.0.options.clone();
19031            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19032            let query = move |name| {
19033                let stub = stub.clone();
19034                let options = options.clone();
19035                async {
19036                    let op = GetOperation::new(stub)
19037                        .set_name(name)
19038                        .with_options(options)
19039                        .send()
19040                        .await?;
19041                    Ok(Operation::new(op))
19042                }
19043            };
19044
19045            let start = move || async {
19046                let op = self.send().await?;
19047                Ok(Operation::new(op))
19048            };
19049
19050            google_cloud_lro::internal::new_poller(
19051                polling_error_policy,
19052                polling_backoff_policy,
19053                start,
19054                query,
19055            )
19056        }
19057
19058        /// Sets the value of [parent][crate::model::CreateAssetRequest::parent].
19059        ///
19060        /// This is a **required** field for requests.
19061        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19062            self.0.request.parent = v.into();
19063            self
19064        }
19065
19066        /// Sets the value of [asset_id][crate::model::CreateAssetRequest::asset_id].
19067        ///
19068        /// This is a **required** field for requests.
19069        pub fn set_asset_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
19070            self.0.request.asset_id = v.into();
19071            self
19072        }
19073
19074        /// Sets the value of [asset][crate::model::CreateAssetRequest::asset].
19075        ///
19076        /// This is a **required** field for requests.
19077        pub fn set_asset<T>(mut self, v: T) -> Self
19078        where
19079            T: std::convert::Into<crate::model::Asset>,
19080        {
19081            self.0.request.asset = std::option::Option::Some(v.into());
19082            self
19083        }
19084
19085        /// Sets or clears the value of [asset][crate::model::CreateAssetRequest::asset].
19086        ///
19087        /// This is a **required** field for requests.
19088        pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
19089        where
19090            T: std::convert::Into<crate::model::Asset>,
19091        {
19092            self.0.request.asset = v.map(|x| x.into());
19093            self
19094        }
19095
19096        /// Sets the value of [validate_only][crate::model::CreateAssetRequest::validate_only].
19097        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
19098            self.0.request.validate_only = v.into();
19099            self
19100        }
19101    }
19102
19103    #[doc(hidden)]
19104    impl crate::RequestBuilder for CreateAsset {
19105        fn request_options(&mut self) -> &mut crate::RequestOptions {
19106            &mut self.0.options
19107        }
19108    }
19109
19110    /// The request builder for [DataplexService::update_asset][crate::client::DataplexService::update_asset] calls.
19111    ///
19112    /// # Example
19113    /// ```
19114    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateAsset;
19115    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19116    /// use google_cloud_lro::Poller;
19117    ///
19118    /// let builder = prepare_request_builder();
19119    /// let response = builder.poller().until_done().await?;
19120    /// # Ok(()) }
19121    ///
19122    /// fn prepare_request_builder() -> UpdateAsset {
19123    ///   # panic!();
19124    ///   // ... details omitted ...
19125    /// }
19126    /// ```
19127    #[derive(Clone, Debug)]
19128    pub struct UpdateAsset(RequestBuilder<crate::model::UpdateAssetRequest>);
19129
19130    impl UpdateAsset {
19131        pub(crate) fn new(
19132            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19133        ) -> Self {
19134            Self(RequestBuilder::new(stub))
19135        }
19136
19137        /// Sets the full request, replacing any prior values.
19138        pub fn with_request<V: Into<crate::model::UpdateAssetRequest>>(mut self, v: V) -> Self {
19139            self.0.request = v.into();
19140            self
19141        }
19142
19143        /// Sets all the options, replacing any prior values.
19144        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19145            self.0.options = v.into();
19146            self
19147        }
19148
19149        /// Sends the request.
19150        ///
19151        /// # Long running operations
19152        ///
19153        /// This starts, but does not poll, a longrunning operation. More information
19154        /// on [update_asset][crate::client::DataplexService::update_asset].
19155        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19156            (*self.0.stub)
19157                .update_asset(self.0.request, self.0.options)
19158                .await
19159                .map(crate::Response::into_body)
19160        }
19161
19162        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_asset`.
19163        pub fn poller(
19164            self,
19165        ) -> impl google_cloud_lro::Poller<crate::model::Asset, crate::model::OperationMetadata>
19166        {
19167            type Operation = google_cloud_lro::internal::Operation<
19168                crate::model::Asset,
19169                crate::model::OperationMetadata,
19170            >;
19171            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19172            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19173
19174            let stub = self.0.stub.clone();
19175            let mut options = self.0.options.clone();
19176            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19177            let query = move |name| {
19178                let stub = stub.clone();
19179                let options = options.clone();
19180                async {
19181                    let op = GetOperation::new(stub)
19182                        .set_name(name)
19183                        .with_options(options)
19184                        .send()
19185                        .await?;
19186                    Ok(Operation::new(op))
19187                }
19188            };
19189
19190            let start = move || async {
19191                let op = self.send().await?;
19192                Ok(Operation::new(op))
19193            };
19194
19195            google_cloud_lro::internal::new_poller(
19196                polling_error_policy,
19197                polling_backoff_policy,
19198                start,
19199                query,
19200            )
19201        }
19202
19203        /// Sets the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
19204        ///
19205        /// This is a **required** field for requests.
19206        pub fn set_update_mask<T>(mut self, v: T) -> Self
19207        where
19208            T: std::convert::Into<wkt::FieldMask>,
19209        {
19210            self.0.request.update_mask = std::option::Option::Some(v.into());
19211            self
19212        }
19213
19214        /// Sets or clears the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
19215        ///
19216        /// This is a **required** field for requests.
19217        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
19218        where
19219            T: std::convert::Into<wkt::FieldMask>,
19220        {
19221            self.0.request.update_mask = v.map(|x| x.into());
19222            self
19223        }
19224
19225        /// Sets the value of [asset][crate::model::UpdateAssetRequest::asset].
19226        ///
19227        /// This is a **required** field for requests.
19228        pub fn set_asset<T>(mut self, v: T) -> Self
19229        where
19230            T: std::convert::Into<crate::model::Asset>,
19231        {
19232            self.0.request.asset = std::option::Option::Some(v.into());
19233            self
19234        }
19235
19236        /// Sets or clears the value of [asset][crate::model::UpdateAssetRequest::asset].
19237        ///
19238        /// This is a **required** field for requests.
19239        pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
19240        where
19241            T: std::convert::Into<crate::model::Asset>,
19242        {
19243            self.0.request.asset = v.map(|x| x.into());
19244            self
19245        }
19246
19247        /// Sets the value of [validate_only][crate::model::UpdateAssetRequest::validate_only].
19248        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
19249            self.0.request.validate_only = v.into();
19250            self
19251        }
19252    }
19253
19254    #[doc(hidden)]
19255    impl crate::RequestBuilder for UpdateAsset {
19256        fn request_options(&mut self) -> &mut crate::RequestOptions {
19257            &mut self.0.options
19258        }
19259    }
19260
19261    /// The request builder for [DataplexService::delete_asset][crate::client::DataplexService::delete_asset] calls.
19262    ///
19263    /// # Example
19264    /// ```
19265    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteAsset;
19266    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19267    /// use google_cloud_lro::Poller;
19268    ///
19269    /// let builder = prepare_request_builder();
19270    /// let response = builder.poller().until_done().await?;
19271    /// # Ok(()) }
19272    ///
19273    /// fn prepare_request_builder() -> DeleteAsset {
19274    ///   # panic!();
19275    ///   // ... details omitted ...
19276    /// }
19277    /// ```
19278    #[derive(Clone, Debug)]
19279    pub struct DeleteAsset(RequestBuilder<crate::model::DeleteAssetRequest>);
19280
19281    impl DeleteAsset {
19282        pub(crate) fn new(
19283            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19284        ) -> Self {
19285            Self(RequestBuilder::new(stub))
19286        }
19287
19288        /// Sets the full request, replacing any prior values.
19289        pub fn with_request<V: Into<crate::model::DeleteAssetRequest>>(mut self, v: V) -> Self {
19290            self.0.request = v.into();
19291            self
19292        }
19293
19294        /// Sets all the options, replacing any prior values.
19295        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19296            self.0.options = v.into();
19297            self
19298        }
19299
19300        /// Sends the request.
19301        ///
19302        /// # Long running operations
19303        ///
19304        /// This starts, but does not poll, a longrunning operation. More information
19305        /// on [delete_asset][crate::client::DataplexService::delete_asset].
19306        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19307            (*self.0.stub)
19308                .delete_asset(self.0.request, self.0.options)
19309                .await
19310                .map(crate::Response::into_body)
19311        }
19312
19313        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_asset`.
19314        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
19315            type Operation =
19316                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
19317            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19318            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19319
19320            let stub = self.0.stub.clone();
19321            let mut options = self.0.options.clone();
19322            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19323            let query = move |name| {
19324                let stub = stub.clone();
19325                let options = options.clone();
19326                async {
19327                    let op = GetOperation::new(stub)
19328                        .set_name(name)
19329                        .with_options(options)
19330                        .send()
19331                        .await?;
19332                    Ok(Operation::new(op))
19333                }
19334            };
19335
19336            let start = move || async {
19337                let op = self.send().await?;
19338                Ok(Operation::new(op))
19339            };
19340
19341            google_cloud_lro::internal::new_unit_response_poller(
19342                polling_error_policy,
19343                polling_backoff_policy,
19344                start,
19345                query,
19346            )
19347        }
19348
19349        /// Sets the value of [name][crate::model::DeleteAssetRequest::name].
19350        ///
19351        /// This is a **required** field for requests.
19352        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19353            self.0.request.name = v.into();
19354            self
19355        }
19356    }
19357
19358    #[doc(hidden)]
19359    impl crate::RequestBuilder for DeleteAsset {
19360        fn request_options(&mut self) -> &mut crate::RequestOptions {
19361            &mut self.0.options
19362        }
19363    }
19364
19365    /// The request builder for [DataplexService::list_assets][crate::client::DataplexService::list_assets] calls.
19366    ///
19367    /// # Example
19368    /// ```
19369    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListAssets;
19370    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19371    /// use google_cloud_gax::paginator::ItemPaginator;
19372    ///
19373    /// let builder = prepare_request_builder();
19374    /// let mut items = builder.by_item();
19375    /// while let Some(result) = items.next().await {
19376    ///   let item = result?;
19377    /// }
19378    /// # Ok(()) }
19379    ///
19380    /// fn prepare_request_builder() -> ListAssets {
19381    ///   # panic!();
19382    ///   // ... details omitted ...
19383    /// }
19384    /// ```
19385    #[derive(Clone, Debug)]
19386    pub struct ListAssets(RequestBuilder<crate::model::ListAssetsRequest>);
19387
19388    impl ListAssets {
19389        pub(crate) fn new(
19390            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19391        ) -> Self {
19392            Self(RequestBuilder::new(stub))
19393        }
19394
19395        /// Sets the full request, replacing any prior values.
19396        pub fn with_request<V: Into<crate::model::ListAssetsRequest>>(mut self, v: V) -> Self {
19397            self.0.request = v.into();
19398            self
19399        }
19400
19401        /// Sets all the options, replacing any prior values.
19402        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19403            self.0.options = v.into();
19404            self
19405        }
19406
19407        /// Sends the request.
19408        pub async fn send(self) -> Result<crate::model::ListAssetsResponse> {
19409            (*self.0.stub)
19410                .list_assets(self.0.request, self.0.options)
19411                .await
19412                .map(crate::Response::into_body)
19413        }
19414
19415        /// Streams each page in the collection.
19416        pub fn by_page(
19417            self,
19418        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListAssetsResponse, crate::Error>
19419        {
19420            use std::clone::Clone;
19421            let token = self.0.request.page_token.clone();
19422            let execute = move |token: String| {
19423                let mut builder = self.clone();
19424                builder.0.request = builder.0.request.set_page_token(token);
19425                builder.send()
19426            };
19427            google_cloud_gax::paginator::internal::new_paginator(token, execute)
19428        }
19429
19430        /// Streams each item in the collection.
19431        pub fn by_item(
19432            self,
19433        ) -> impl google_cloud_gax::paginator::ItemPaginator<
19434            crate::model::ListAssetsResponse,
19435            crate::Error,
19436        > {
19437            use google_cloud_gax::paginator::Paginator;
19438            self.by_page().items()
19439        }
19440
19441        /// Sets the value of [parent][crate::model::ListAssetsRequest::parent].
19442        ///
19443        /// This is a **required** field for requests.
19444        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19445            self.0.request.parent = v.into();
19446            self
19447        }
19448
19449        /// Sets the value of [page_size][crate::model::ListAssetsRequest::page_size].
19450        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
19451            self.0.request.page_size = v.into();
19452            self
19453        }
19454
19455        /// Sets the value of [page_token][crate::model::ListAssetsRequest::page_token].
19456        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
19457            self.0.request.page_token = v.into();
19458            self
19459        }
19460
19461        /// Sets the value of [filter][crate::model::ListAssetsRequest::filter].
19462        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
19463            self.0.request.filter = v.into();
19464            self
19465        }
19466
19467        /// Sets the value of [order_by][crate::model::ListAssetsRequest::order_by].
19468        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
19469            self.0.request.order_by = v.into();
19470            self
19471        }
19472    }
19473
19474    #[doc(hidden)]
19475    impl crate::RequestBuilder for ListAssets {
19476        fn request_options(&mut self) -> &mut crate::RequestOptions {
19477            &mut self.0.options
19478        }
19479    }
19480
19481    /// The request builder for [DataplexService::get_asset][crate::client::DataplexService::get_asset] calls.
19482    ///
19483    /// # Example
19484    /// ```
19485    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetAsset;
19486    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19487    ///
19488    /// let builder = prepare_request_builder();
19489    /// let response = builder.send().await?;
19490    /// # Ok(()) }
19491    ///
19492    /// fn prepare_request_builder() -> GetAsset {
19493    ///   # panic!();
19494    ///   // ... details omitted ...
19495    /// }
19496    /// ```
19497    #[derive(Clone, Debug)]
19498    pub struct GetAsset(RequestBuilder<crate::model::GetAssetRequest>);
19499
19500    impl GetAsset {
19501        pub(crate) fn new(
19502            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19503        ) -> Self {
19504            Self(RequestBuilder::new(stub))
19505        }
19506
19507        /// Sets the full request, replacing any prior values.
19508        pub fn with_request<V: Into<crate::model::GetAssetRequest>>(mut self, v: V) -> Self {
19509            self.0.request = v.into();
19510            self
19511        }
19512
19513        /// Sets all the options, replacing any prior values.
19514        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19515            self.0.options = v.into();
19516            self
19517        }
19518
19519        /// Sends the request.
19520        pub async fn send(self) -> Result<crate::model::Asset> {
19521            (*self.0.stub)
19522                .get_asset(self.0.request, self.0.options)
19523                .await
19524                .map(crate::Response::into_body)
19525        }
19526
19527        /// Sets the value of [name][crate::model::GetAssetRequest::name].
19528        ///
19529        /// This is a **required** field for requests.
19530        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19531            self.0.request.name = v.into();
19532            self
19533        }
19534    }
19535
19536    #[doc(hidden)]
19537    impl crate::RequestBuilder for GetAsset {
19538        fn request_options(&mut self) -> &mut crate::RequestOptions {
19539            &mut self.0.options
19540        }
19541    }
19542
19543    /// The request builder for [DataplexService::list_asset_actions][crate::client::DataplexService::list_asset_actions] calls.
19544    ///
19545    /// # Example
19546    /// ```
19547    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListAssetActions;
19548    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19549    /// use google_cloud_gax::paginator::ItemPaginator;
19550    ///
19551    /// let builder = prepare_request_builder();
19552    /// let mut items = builder.by_item();
19553    /// while let Some(result) = items.next().await {
19554    ///   let item = result?;
19555    /// }
19556    /// # Ok(()) }
19557    ///
19558    /// fn prepare_request_builder() -> ListAssetActions {
19559    ///   # panic!();
19560    ///   // ... details omitted ...
19561    /// }
19562    /// ```
19563    #[derive(Clone, Debug)]
19564    pub struct ListAssetActions(RequestBuilder<crate::model::ListAssetActionsRequest>);
19565
19566    impl ListAssetActions {
19567        pub(crate) fn new(
19568            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19569        ) -> Self {
19570            Self(RequestBuilder::new(stub))
19571        }
19572
19573        /// Sets the full request, replacing any prior values.
19574        pub fn with_request<V: Into<crate::model::ListAssetActionsRequest>>(
19575            mut self,
19576            v: V,
19577        ) -> Self {
19578            self.0.request = v.into();
19579            self
19580        }
19581
19582        /// Sets all the options, replacing any prior values.
19583        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19584            self.0.options = v.into();
19585            self
19586        }
19587
19588        /// Sends the request.
19589        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
19590            (*self.0.stub)
19591                .list_asset_actions(self.0.request, self.0.options)
19592                .await
19593                .map(crate::Response::into_body)
19594        }
19595
19596        /// Streams each page in the collection.
19597        pub fn by_page(
19598            self,
19599        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListActionsResponse, crate::Error>
19600        {
19601            use std::clone::Clone;
19602            let token = self.0.request.page_token.clone();
19603            let execute = move |token: String| {
19604                let mut builder = self.clone();
19605                builder.0.request = builder.0.request.set_page_token(token);
19606                builder.send()
19607            };
19608            google_cloud_gax::paginator::internal::new_paginator(token, execute)
19609        }
19610
19611        /// Streams each item in the collection.
19612        pub fn by_item(
19613            self,
19614        ) -> impl google_cloud_gax::paginator::ItemPaginator<
19615            crate::model::ListActionsResponse,
19616            crate::Error,
19617        > {
19618            use google_cloud_gax::paginator::Paginator;
19619            self.by_page().items()
19620        }
19621
19622        /// Sets the value of [parent][crate::model::ListAssetActionsRequest::parent].
19623        ///
19624        /// This is a **required** field for requests.
19625        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19626            self.0.request.parent = v.into();
19627            self
19628        }
19629
19630        /// Sets the value of [page_size][crate::model::ListAssetActionsRequest::page_size].
19631        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
19632            self.0.request.page_size = v.into();
19633            self
19634        }
19635
19636        /// Sets the value of [page_token][crate::model::ListAssetActionsRequest::page_token].
19637        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
19638            self.0.request.page_token = v.into();
19639            self
19640        }
19641    }
19642
19643    #[doc(hidden)]
19644    impl crate::RequestBuilder for ListAssetActions {
19645        fn request_options(&mut self) -> &mut crate::RequestOptions {
19646            &mut self.0.options
19647        }
19648    }
19649
19650    /// The request builder for [DataplexService::create_task][crate::client::DataplexService::create_task] calls.
19651    ///
19652    /// # Example
19653    /// ```
19654    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateTask;
19655    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19656    /// use google_cloud_lro::Poller;
19657    ///
19658    /// let builder = prepare_request_builder();
19659    /// let response = builder.poller().until_done().await?;
19660    /// # Ok(()) }
19661    ///
19662    /// fn prepare_request_builder() -> CreateTask {
19663    ///   # panic!();
19664    ///   // ... details omitted ...
19665    /// }
19666    /// ```
19667    #[derive(Clone, Debug)]
19668    pub struct CreateTask(RequestBuilder<crate::model::CreateTaskRequest>);
19669
19670    impl CreateTask {
19671        pub(crate) fn new(
19672            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19673        ) -> Self {
19674            Self(RequestBuilder::new(stub))
19675        }
19676
19677        /// Sets the full request, replacing any prior values.
19678        pub fn with_request<V: Into<crate::model::CreateTaskRequest>>(mut self, v: V) -> Self {
19679            self.0.request = v.into();
19680            self
19681        }
19682
19683        /// Sets all the options, replacing any prior values.
19684        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19685            self.0.options = v.into();
19686            self
19687        }
19688
19689        /// Sends the request.
19690        ///
19691        /// # Long running operations
19692        ///
19693        /// This starts, but does not poll, a longrunning operation. More information
19694        /// on [create_task][crate::client::DataplexService::create_task].
19695        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19696            (*self.0.stub)
19697                .create_task(self.0.request, self.0.options)
19698                .await
19699                .map(crate::Response::into_body)
19700        }
19701
19702        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_task`.
19703        pub fn poller(
19704            self,
19705        ) -> impl google_cloud_lro::Poller<crate::model::Task, crate::model::OperationMetadata>
19706        {
19707            type Operation = google_cloud_lro::internal::Operation<
19708                crate::model::Task,
19709                crate::model::OperationMetadata,
19710            >;
19711            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19712            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19713
19714            let stub = self.0.stub.clone();
19715            let mut options = self.0.options.clone();
19716            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19717            let query = move |name| {
19718                let stub = stub.clone();
19719                let options = options.clone();
19720                async {
19721                    let op = GetOperation::new(stub)
19722                        .set_name(name)
19723                        .with_options(options)
19724                        .send()
19725                        .await?;
19726                    Ok(Operation::new(op))
19727                }
19728            };
19729
19730            let start = move || async {
19731                let op = self.send().await?;
19732                Ok(Operation::new(op))
19733            };
19734
19735            google_cloud_lro::internal::new_poller(
19736                polling_error_policy,
19737                polling_backoff_policy,
19738                start,
19739                query,
19740            )
19741        }
19742
19743        /// Sets the value of [parent][crate::model::CreateTaskRequest::parent].
19744        ///
19745        /// This is a **required** field for requests.
19746        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19747            self.0.request.parent = v.into();
19748            self
19749        }
19750
19751        /// Sets the value of [task_id][crate::model::CreateTaskRequest::task_id].
19752        ///
19753        /// This is a **required** field for requests.
19754        pub fn set_task_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
19755            self.0.request.task_id = v.into();
19756            self
19757        }
19758
19759        /// Sets the value of [task][crate::model::CreateTaskRequest::task].
19760        ///
19761        /// This is a **required** field for requests.
19762        pub fn set_task<T>(mut self, v: T) -> Self
19763        where
19764            T: std::convert::Into<crate::model::Task>,
19765        {
19766            self.0.request.task = std::option::Option::Some(v.into());
19767            self
19768        }
19769
19770        /// Sets or clears the value of [task][crate::model::CreateTaskRequest::task].
19771        ///
19772        /// This is a **required** field for requests.
19773        pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
19774        where
19775            T: std::convert::Into<crate::model::Task>,
19776        {
19777            self.0.request.task = v.map(|x| x.into());
19778            self
19779        }
19780
19781        /// Sets the value of [validate_only][crate::model::CreateTaskRequest::validate_only].
19782        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
19783            self.0.request.validate_only = v.into();
19784            self
19785        }
19786    }
19787
19788    #[doc(hidden)]
19789    impl crate::RequestBuilder for CreateTask {
19790        fn request_options(&mut self) -> &mut crate::RequestOptions {
19791            &mut self.0.options
19792        }
19793    }
19794
19795    /// The request builder for [DataplexService::update_task][crate::client::DataplexService::update_task] calls.
19796    ///
19797    /// # Example
19798    /// ```
19799    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateTask;
19800    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19801    /// use google_cloud_lro::Poller;
19802    ///
19803    /// let builder = prepare_request_builder();
19804    /// let response = builder.poller().until_done().await?;
19805    /// # Ok(()) }
19806    ///
19807    /// fn prepare_request_builder() -> UpdateTask {
19808    ///   # panic!();
19809    ///   // ... details omitted ...
19810    /// }
19811    /// ```
19812    #[derive(Clone, Debug)]
19813    pub struct UpdateTask(RequestBuilder<crate::model::UpdateTaskRequest>);
19814
19815    impl UpdateTask {
19816        pub(crate) fn new(
19817            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19818        ) -> Self {
19819            Self(RequestBuilder::new(stub))
19820        }
19821
19822        /// Sets the full request, replacing any prior values.
19823        pub fn with_request<V: Into<crate::model::UpdateTaskRequest>>(mut self, v: V) -> Self {
19824            self.0.request = v.into();
19825            self
19826        }
19827
19828        /// Sets all the options, replacing any prior values.
19829        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19830            self.0.options = v.into();
19831            self
19832        }
19833
19834        /// Sends the request.
19835        ///
19836        /// # Long running operations
19837        ///
19838        /// This starts, but does not poll, a longrunning operation. More information
19839        /// on [update_task][crate::client::DataplexService::update_task].
19840        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19841            (*self.0.stub)
19842                .update_task(self.0.request, self.0.options)
19843                .await
19844                .map(crate::Response::into_body)
19845        }
19846
19847        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_task`.
19848        pub fn poller(
19849            self,
19850        ) -> impl google_cloud_lro::Poller<crate::model::Task, crate::model::OperationMetadata>
19851        {
19852            type Operation = google_cloud_lro::internal::Operation<
19853                crate::model::Task,
19854                crate::model::OperationMetadata,
19855            >;
19856            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19857            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19858
19859            let stub = self.0.stub.clone();
19860            let mut options = self.0.options.clone();
19861            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19862            let query = move |name| {
19863                let stub = stub.clone();
19864                let options = options.clone();
19865                async {
19866                    let op = GetOperation::new(stub)
19867                        .set_name(name)
19868                        .with_options(options)
19869                        .send()
19870                        .await?;
19871                    Ok(Operation::new(op))
19872                }
19873            };
19874
19875            let start = move || async {
19876                let op = self.send().await?;
19877                Ok(Operation::new(op))
19878            };
19879
19880            google_cloud_lro::internal::new_poller(
19881                polling_error_policy,
19882                polling_backoff_policy,
19883                start,
19884                query,
19885            )
19886        }
19887
19888        /// Sets the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
19889        ///
19890        /// This is a **required** field for requests.
19891        pub fn set_update_mask<T>(mut self, v: T) -> Self
19892        where
19893            T: std::convert::Into<wkt::FieldMask>,
19894        {
19895            self.0.request.update_mask = std::option::Option::Some(v.into());
19896            self
19897        }
19898
19899        /// Sets or clears the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
19900        ///
19901        /// This is a **required** field for requests.
19902        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
19903        where
19904            T: std::convert::Into<wkt::FieldMask>,
19905        {
19906            self.0.request.update_mask = v.map(|x| x.into());
19907            self
19908        }
19909
19910        /// Sets the value of [task][crate::model::UpdateTaskRequest::task].
19911        ///
19912        /// This is a **required** field for requests.
19913        pub fn set_task<T>(mut self, v: T) -> Self
19914        where
19915            T: std::convert::Into<crate::model::Task>,
19916        {
19917            self.0.request.task = std::option::Option::Some(v.into());
19918            self
19919        }
19920
19921        /// Sets or clears the value of [task][crate::model::UpdateTaskRequest::task].
19922        ///
19923        /// This is a **required** field for requests.
19924        pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
19925        where
19926            T: std::convert::Into<crate::model::Task>,
19927        {
19928            self.0.request.task = v.map(|x| x.into());
19929            self
19930        }
19931
19932        /// Sets the value of [validate_only][crate::model::UpdateTaskRequest::validate_only].
19933        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
19934            self.0.request.validate_only = v.into();
19935            self
19936        }
19937    }
19938
19939    #[doc(hidden)]
19940    impl crate::RequestBuilder for UpdateTask {
19941        fn request_options(&mut self) -> &mut crate::RequestOptions {
19942            &mut self.0.options
19943        }
19944    }
19945
19946    /// The request builder for [DataplexService::delete_task][crate::client::DataplexService::delete_task] calls.
19947    ///
19948    /// # Example
19949    /// ```
19950    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteTask;
19951    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19952    /// use google_cloud_lro::Poller;
19953    ///
19954    /// let builder = prepare_request_builder();
19955    /// let response = builder.poller().until_done().await?;
19956    /// # Ok(()) }
19957    ///
19958    /// fn prepare_request_builder() -> DeleteTask {
19959    ///   # panic!();
19960    ///   // ... details omitted ...
19961    /// }
19962    /// ```
19963    #[derive(Clone, Debug)]
19964    pub struct DeleteTask(RequestBuilder<crate::model::DeleteTaskRequest>);
19965
19966    impl DeleteTask {
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::DeleteTaskRequest>>(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        ///
19987        /// # Long running operations
19988        ///
19989        /// This starts, but does not poll, a longrunning operation. More information
19990        /// on [delete_task][crate::client::DataplexService::delete_task].
19991        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19992            (*self.0.stub)
19993                .delete_task(self.0.request, self.0.options)
19994                .await
19995                .map(crate::Response::into_body)
19996        }
19997
19998        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_task`.
19999        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
20000            type Operation =
20001                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
20002            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
20003            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
20004
20005            let stub = self.0.stub.clone();
20006            let mut options = self.0.options.clone();
20007            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
20008            let query = move |name| {
20009                let stub = stub.clone();
20010                let options = options.clone();
20011                async {
20012                    let op = GetOperation::new(stub)
20013                        .set_name(name)
20014                        .with_options(options)
20015                        .send()
20016                        .await?;
20017                    Ok(Operation::new(op))
20018                }
20019            };
20020
20021            let start = move || async {
20022                let op = self.send().await?;
20023                Ok(Operation::new(op))
20024            };
20025
20026            google_cloud_lro::internal::new_unit_response_poller(
20027                polling_error_policy,
20028                polling_backoff_policy,
20029                start,
20030                query,
20031            )
20032        }
20033
20034        /// Sets the value of [name][crate::model::DeleteTaskRequest::name].
20035        ///
20036        /// This is a **required** field for requests.
20037        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20038            self.0.request.name = v.into();
20039            self
20040        }
20041    }
20042
20043    #[doc(hidden)]
20044    impl crate::RequestBuilder for DeleteTask {
20045        fn request_options(&mut self) -> &mut crate::RequestOptions {
20046            &mut self.0.options
20047        }
20048    }
20049
20050    /// The request builder for [DataplexService::list_tasks][crate::client::DataplexService::list_tasks] calls.
20051    ///
20052    /// # Example
20053    /// ```
20054    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListTasks;
20055    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20056    /// use google_cloud_gax::paginator::ItemPaginator;
20057    ///
20058    /// let builder = prepare_request_builder();
20059    /// let mut items = builder.by_item();
20060    /// while let Some(result) = items.next().await {
20061    ///   let item = result?;
20062    /// }
20063    /// # Ok(()) }
20064    ///
20065    /// fn prepare_request_builder() -> ListTasks {
20066    ///   # panic!();
20067    ///   // ... details omitted ...
20068    /// }
20069    /// ```
20070    #[derive(Clone, Debug)]
20071    pub struct ListTasks(RequestBuilder<crate::model::ListTasksRequest>);
20072
20073    impl ListTasks {
20074        pub(crate) fn new(
20075            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20076        ) -> Self {
20077            Self(RequestBuilder::new(stub))
20078        }
20079
20080        /// Sets the full request, replacing any prior values.
20081        pub fn with_request<V: Into<crate::model::ListTasksRequest>>(mut self, v: V) -> Self {
20082            self.0.request = v.into();
20083            self
20084        }
20085
20086        /// Sets all the options, replacing any prior values.
20087        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20088            self.0.options = v.into();
20089            self
20090        }
20091
20092        /// Sends the request.
20093        pub async fn send(self) -> Result<crate::model::ListTasksResponse> {
20094            (*self.0.stub)
20095                .list_tasks(self.0.request, self.0.options)
20096                .await
20097                .map(crate::Response::into_body)
20098        }
20099
20100        /// Streams each page in the collection.
20101        pub fn by_page(
20102            self,
20103        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListTasksResponse, crate::Error>
20104        {
20105            use std::clone::Clone;
20106            let token = self.0.request.page_token.clone();
20107            let execute = move |token: String| {
20108                let mut builder = self.clone();
20109                builder.0.request = builder.0.request.set_page_token(token);
20110                builder.send()
20111            };
20112            google_cloud_gax::paginator::internal::new_paginator(token, execute)
20113        }
20114
20115        /// Streams each item in the collection.
20116        pub fn by_item(
20117            self,
20118        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListTasksResponse, crate::Error>
20119        {
20120            use google_cloud_gax::paginator::Paginator;
20121            self.by_page().items()
20122        }
20123
20124        /// Sets the value of [parent][crate::model::ListTasksRequest::parent].
20125        ///
20126        /// This is a **required** field for requests.
20127        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
20128            self.0.request.parent = v.into();
20129            self
20130        }
20131
20132        /// Sets the value of [page_size][crate::model::ListTasksRequest::page_size].
20133        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
20134            self.0.request.page_size = v.into();
20135            self
20136        }
20137
20138        /// Sets the value of [page_token][crate::model::ListTasksRequest::page_token].
20139        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
20140            self.0.request.page_token = v.into();
20141            self
20142        }
20143
20144        /// Sets the value of [filter][crate::model::ListTasksRequest::filter].
20145        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
20146            self.0.request.filter = v.into();
20147            self
20148        }
20149
20150        /// Sets the value of [order_by][crate::model::ListTasksRequest::order_by].
20151        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
20152            self.0.request.order_by = v.into();
20153            self
20154        }
20155    }
20156
20157    #[doc(hidden)]
20158    impl crate::RequestBuilder for ListTasks {
20159        fn request_options(&mut self) -> &mut crate::RequestOptions {
20160            &mut self.0.options
20161        }
20162    }
20163
20164    /// The request builder for [DataplexService::get_task][crate::client::DataplexService::get_task] calls.
20165    ///
20166    /// # Example
20167    /// ```
20168    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetTask;
20169    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20170    ///
20171    /// let builder = prepare_request_builder();
20172    /// let response = builder.send().await?;
20173    /// # Ok(()) }
20174    ///
20175    /// fn prepare_request_builder() -> GetTask {
20176    ///   # panic!();
20177    ///   // ... details omitted ...
20178    /// }
20179    /// ```
20180    #[derive(Clone, Debug)]
20181    pub struct GetTask(RequestBuilder<crate::model::GetTaskRequest>);
20182
20183    impl GetTask {
20184        pub(crate) fn new(
20185            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20186        ) -> Self {
20187            Self(RequestBuilder::new(stub))
20188        }
20189
20190        /// Sets the full request, replacing any prior values.
20191        pub fn with_request<V: Into<crate::model::GetTaskRequest>>(mut self, v: V) -> Self {
20192            self.0.request = v.into();
20193            self
20194        }
20195
20196        /// Sets all the options, replacing any prior values.
20197        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20198            self.0.options = v.into();
20199            self
20200        }
20201
20202        /// Sends the request.
20203        pub async fn send(self) -> Result<crate::model::Task> {
20204            (*self.0.stub)
20205                .get_task(self.0.request, self.0.options)
20206                .await
20207                .map(crate::Response::into_body)
20208        }
20209
20210        /// Sets the value of [name][crate::model::GetTaskRequest::name].
20211        ///
20212        /// This is a **required** field for requests.
20213        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20214            self.0.request.name = v.into();
20215            self
20216        }
20217    }
20218
20219    #[doc(hidden)]
20220    impl crate::RequestBuilder for GetTask {
20221        fn request_options(&mut self) -> &mut crate::RequestOptions {
20222            &mut self.0.options
20223        }
20224    }
20225
20226    /// The request builder for [DataplexService::list_jobs][crate::client::DataplexService::list_jobs] calls.
20227    ///
20228    /// # Example
20229    /// ```
20230    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListJobs;
20231    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20232    /// use google_cloud_gax::paginator::ItemPaginator;
20233    ///
20234    /// let builder = prepare_request_builder();
20235    /// let mut items = builder.by_item();
20236    /// while let Some(result) = items.next().await {
20237    ///   let item = result?;
20238    /// }
20239    /// # Ok(()) }
20240    ///
20241    /// fn prepare_request_builder() -> ListJobs {
20242    ///   # panic!();
20243    ///   // ... details omitted ...
20244    /// }
20245    /// ```
20246    #[derive(Clone, Debug)]
20247    pub struct ListJobs(RequestBuilder<crate::model::ListJobsRequest>);
20248
20249    impl ListJobs {
20250        pub(crate) fn new(
20251            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20252        ) -> Self {
20253            Self(RequestBuilder::new(stub))
20254        }
20255
20256        /// Sets the full request, replacing any prior values.
20257        pub fn with_request<V: Into<crate::model::ListJobsRequest>>(mut self, v: V) -> Self {
20258            self.0.request = v.into();
20259            self
20260        }
20261
20262        /// Sets all the options, replacing any prior values.
20263        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20264            self.0.options = v.into();
20265            self
20266        }
20267
20268        /// Sends the request.
20269        pub async fn send(self) -> Result<crate::model::ListJobsResponse> {
20270            (*self.0.stub)
20271                .list_jobs(self.0.request, self.0.options)
20272                .await
20273                .map(crate::Response::into_body)
20274        }
20275
20276        /// Streams each page in the collection.
20277        pub fn by_page(
20278            self,
20279        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListJobsResponse, crate::Error>
20280        {
20281            use std::clone::Clone;
20282            let token = self.0.request.page_token.clone();
20283            let execute = move |token: String| {
20284                let mut builder = self.clone();
20285                builder.0.request = builder.0.request.set_page_token(token);
20286                builder.send()
20287            };
20288            google_cloud_gax::paginator::internal::new_paginator(token, execute)
20289        }
20290
20291        /// Streams each item in the collection.
20292        pub fn by_item(
20293            self,
20294        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListJobsResponse, crate::Error>
20295        {
20296            use google_cloud_gax::paginator::Paginator;
20297            self.by_page().items()
20298        }
20299
20300        /// Sets the value of [parent][crate::model::ListJobsRequest::parent].
20301        ///
20302        /// This is a **required** field for requests.
20303        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
20304            self.0.request.parent = v.into();
20305            self
20306        }
20307
20308        /// Sets the value of [page_size][crate::model::ListJobsRequest::page_size].
20309        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
20310            self.0.request.page_size = v.into();
20311            self
20312        }
20313
20314        /// Sets the value of [page_token][crate::model::ListJobsRequest::page_token].
20315        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
20316            self.0.request.page_token = v.into();
20317            self
20318        }
20319    }
20320
20321    #[doc(hidden)]
20322    impl crate::RequestBuilder for ListJobs {
20323        fn request_options(&mut self) -> &mut crate::RequestOptions {
20324            &mut self.0.options
20325        }
20326    }
20327
20328    /// The request builder for [DataplexService::run_task][crate::client::DataplexService::run_task] calls.
20329    ///
20330    /// # Example
20331    /// ```
20332    /// # use google_cloud_dataplex_v1::builder::dataplex_service::RunTask;
20333    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20334    ///
20335    /// let builder = prepare_request_builder();
20336    /// let response = builder.send().await?;
20337    /// # Ok(()) }
20338    ///
20339    /// fn prepare_request_builder() -> RunTask {
20340    ///   # panic!();
20341    ///   // ... details omitted ...
20342    /// }
20343    /// ```
20344    #[derive(Clone, Debug)]
20345    pub struct RunTask(RequestBuilder<crate::model::RunTaskRequest>);
20346
20347    impl RunTask {
20348        pub(crate) fn new(
20349            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20350        ) -> Self {
20351            Self(RequestBuilder::new(stub))
20352        }
20353
20354        /// Sets the full request, replacing any prior values.
20355        pub fn with_request<V: Into<crate::model::RunTaskRequest>>(mut self, v: V) -> Self {
20356            self.0.request = v.into();
20357            self
20358        }
20359
20360        /// Sets all the options, replacing any prior values.
20361        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20362            self.0.options = v.into();
20363            self
20364        }
20365
20366        /// Sends the request.
20367        pub async fn send(self) -> Result<crate::model::RunTaskResponse> {
20368            (*self.0.stub)
20369                .run_task(self.0.request, self.0.options)
20370                .await
20371                .map(crate::Response::into_body)
20372        }
20373
20374        /// Sets the value of [name][crate::model::RunTaskRequest::name].
20375        ///
20376        /// This is a **required** field for requests.
20377        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20378            self.0.request.name = v.into();
20379            self
20380        }
20381
20382        /// Sets the value of [labels][crate::model::RunTaskRequest::labels].
20383        pub fn set_labels<T, K, V>(mut self, v: T) -> Self
20384        where
20385            T: std::iter::IntoIterator<Item = (K, V)>,
20386            K: std::convert::Into<std::string::String>,
20387            V: std::convert::Into<std::string::String>,
20388        {
20389            self.0.request.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
20390            self
20391        }
20392
20393        /// Sets the value of [args][crate::model::RunTaskRequest::args].
20394        pub fn set_args<T, K, V>(mut self, v: T) -> Self
20395        where
20396            T: std::iter::IntoIterator<Item = (K, V)>,
20397            K: std::convert::Into<std::string::String>,
20398            V: std::convert::Into<std::string::String>,
20399        {
20400            self.0.request.args = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
20401            self
20402        }
20403    }
20404
20405    #[doc(hidden)]
20406    impl crate::RequestBuilder for RunTask {
20407        fn request_options(&mut self) -> &mut crate::RequestOptions {
20408            &mut self.0.options
20409        }
20410    }
20411
20412    /// The request builder for [DataplexService::get_job][crate::client::DataplexService::get_job] calls.
20413    ///
20414    /// # Example
20415    /// ```
20416    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetJob;
20417    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20418    ///
20419    /// let builder = prepare_request_builder();
20420    /// let response = builder.send().await?;
20421    /// # Ok(()) }
20422    ///
20423    /// fn prepare_request_builder() -> GetJob {
20424    ///   # panic!();
20425    ///   // ... details omitted ...
20426    /// }
20427    /// ```
20428    #[derive(Clone, Debug)]
20429    pub struct GetJob(RequestBuilder<crate::model::GetJobRequest>);
20430
20431    impl GetJob {
20432        pub(crate) fn new(
20433            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20434        ) -> Self {
20435            Self(RequestBuilder::new(stub))
20436        }
20437
20438        /// Sets the full request, replacing any prior values.
20439        pub fn with_request<V: Into<crate::model::GetJobRequest>>(mut self, v: V) -> Self {
20440            self.0.request = v.into();
20441            self
20442        }
20443
20444        /// Sets all the options, replacing any prior values.
20445        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20446            self.0.options = v.into();
20447            self
20448        }
20449
20450        /// Sends the request.
20451        pub async fn send(self) -> Result<crate::model::Job> {
20452            (*self.0.stub)
20453                .get_job(self.0.request, self.0.options)
20454                .await
20455                .map(crate::Response::into_body)
20456        }
20457
20458        /// Sets the value of [name][crate::model::GetJobRequest::name].
20459        ///
20460        /// This is a **required** field for requests.
20461        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20462            self.0.request.name = v.into();
20463            self
20464        }
20465    }
20466
20467    #[doc(hidden)]
20468    impl crate::RequestBuilder for GetJob {
20469        fn request_options(&mut self) -> &mut crate::RequestOptions {
20470            &mut self.0.options
20471        }
20472    }
20473
20474    /// The request builder for [DataplexService::cancel_job][crate::client::DataplexService::cancel_job] calls.
20475    ///
20476    /// # Example
20477    /// ```
20478    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CancelJob;
20479    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20480    ///
20481    /// let builder = prepare_request_builder();
20482    /// let response = builder.send().await?;
20483    /// # Ok(()) }
20484    ///
20485    /// fn prepare_request_builder() -> CancelJob {
20486    ///   # panic!();
20487    ///   // ... details omitted ...
20488    /// }
20489    /// ```
20490    #[derive(Clone, Debug)]
20491    pub struct CancelJob(RequestBuilder<crate::model::CancelJobRequest>);
20492
20493    impl CancelJob {
20494        pub(crate) fn new(
20495            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20496        ) -> Self {
20497            Self(RequestBuilder::new(stub))
20498        }
20499
20500        /// Sets the full request, replacing any prior values.
20501        pub fn with_request<V: Into<crate::model::CancelJobRequest>>(mut self, v: V) -> Self {
20502            self.0.request = v.into();
20503            self
20504        }
20505
20506        /// Sets all the options, replacing any prior values.
20507        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20508            self.0.options = v.into();
20509            self
20510        }
20511
20512        /// Sends the request.
20513        pub async fn send(self) -> Result<()> {
20514            (*self.0.stub)
20515                .cancel_job(self.0.request, self.0.options)
20516                .await
20517                .map(crate::Response::into_body)
20518        }
20519
20520        /// Sets the value of [name][crate::model::CancelJobRequest::name].
20521        ///
20522        /// This is a **required** field for requests.
20523        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20524            self.0.request.name = v.into();
20525            self
20526        }
20527    }
20528
20529    #[doc(hidden)]
20530    impl crate::RequestBuilder for CancelJob {
20531        fn request_options(&mut self) -> &mut crate::RequestOptions {
20532            &mut self.0.options
20533        }
20534    }
20535
20536    /// The request builder for [DataplexService::list_locations][crate::client::DataplexService::list_locations] calls.
20537    ///
20538    /// # Example
20539    /// ```
20540    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListLocations;
20541    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20542    /// use google_cloud_gax::paginator::ItemPaginator;
20543    ///
20544    /// let builder = prepare_request_builder();
20545    /// let mut items = builder.by_item();
20546    /// while let Some(result) = items.next().await {
20547    ///   let item = result?;
20548    /// }
20549    /// # Ok(()) }
20550    ///
20551    /// fn prepare_request_builder() -> ListLocations {
20552    ///   # panic!();
20553    ///   // ... details omitted ...
20554    /// }
20555    /// ```
20556    #[derive(Clone, Debug)]
20557    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
20558
20559    impl ListLocations {
20560        pub(crate) fn new(
20561            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20562        ) -> Self {
20563            Self(RequestBuilder::new(stub))
20564        }
20565
20566        /// Sets the full request, replacing any prior values.
20567        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
20568            mut self,
20569            v: V,
20570        ) -> Self {
20571            self.0.request = v.into();
20572            self
20573        }
20574
20575        /// Sets all the options, replacing any prior values.
20576        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20577            self.0.options = v.into();
20578            self
20579        }
20580
20581        /// Sends the request.
20582        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
20583            (*self.0.stub)
20584                .list_locations(self.0.request, self.0.options)
20585                .await
20586                .map(crate::Response::into_body)
20587        }
20588
20589        /// Streams each page in the collection.
20590        pub fn by_page(
20591            self,
20592        ) -> impl google_cloud_gax::paginator::Paginator<
20593            google_cloud_location::model::ListLocationsResponse,
20594            crate::Error,
20595        > {
20596            use std::clone::Clone;
20597            let token = self.0.request.page_token.clone();
20598            let execute = move |token: String| {
20599                let mut builder = self.clone();
20600                builder.0.request = builder.0.request.set_page_token(token);
20601                builder.send()
20602            };
20603            google_cloud_gax::paginator::internal::new_paginator(token, execute)
20604        }
20605
20606        /// Streams each item in the collection.
20607        pub fn by_item(
20608            self,
20609        ) -> impl google_cloud_gax::paginator::ItemPaginator<
20610            google_cloud_location::model::ListLocationsResponse,
20611            crate::Error,
20612        > {
20613            use google_cloud_gax::paginator::Paginator;
20614            self.by_page().items()
20615        }
20616
20617        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
20618        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20619            self.0.request.name = v.into();
20620            self
20621        }
20622
20623        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
20624        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
20625            self.0.request.filter = v.into();
20626            self
20627        }
20628
20629        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
20630        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
20631            self.0.request.page_size = v.into();
20632            self
20633        }
20634
20635        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
20636        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
20637            self.0.request.page_token = v.into();
20638            self
20639        }
20640    }
20641
20642    #[doc(hidden)]
20643    impl crate::RequestBuilder for ListLocations {
20644        fn request_options(&mut self) -> &mut crate::RequestOptions {
20645            &mut self.0.options
20646        }
20647    }
20648
20649    /// The request builder for [DataplexService::get_location][crate::client::DataplexService::get_location] calls.
20650    ///
20651    /// # Example
20652    /// ```
20653    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetLocation;
20654    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20655    ///
20656    /// let builder = prepare_request_builder();
20657    /// let response = builder.send().await?;
20658    /// # Ok(()) }
20659    ///
20660    /// fn prepare_request_builder() -> GetLocation {
20661    ///   # panic!();
20662    ///   // ... details omitted ...
20663    /// }
20664    /// ```
20665    #[derive(Clone, Debug)]
20666    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
20667
20668    impl GetLocation {
20669        pub(crate) fn new(
20670            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20671        ) -> Self {
20672            Self(RequestBuilder::new(stub))
20673        }
20674
20675        /// Sets the full request, replacing any prior values.
20676        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
20677            mut self,
20678            v: V,
20679        ) -> Self {
20680            self.0.request = v.into();
20681            self
20682        }
20683
20684        /// Sets all the options, replacing any prior values.
20685        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20686            self.0.options = v.into();
20687            self
20688        }
20689
20690        /// Sends the request.
20691        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
20692            (*self.0.stub)
20693                .get_location(self.0.request, self.0.options)
20694                .await
20695                .map(crate::Response::into_body)
20696        }
20697
20698        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
20699        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20700            self.0.request.name = v.into();
20701            self
20702        }
20703    }
20704
20705    #[doc(hidden)]
20706    impl crate::RequestBuilder for GetLocation {
20707        fn request_options(&mut self) -> &mut crate::RequestOptions {
20708            &mut self.0.options
20709        }
20710    }
20711
20712    /// The request builder for [DataplexService::set_iam_policy][crate::client::DataplexService::set_iam_policy] calls.
20713    ///
20714    /// # Example
20715    /// ```
20716    /// # use google_cloud_dataplex_v1::builder::dataplex_service::SetIamPolicy;
20717    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20718    ///
20719    /// let builder = prepare_request_builder();
20720    /// let response = builder.send().await?;
20721    /// # Ok(()) }
20722    ///
20723    /// fn prepare_request_builder() -> SetIamPolicy {
20724    ///   # panic!();
20725    ///   // ... details omitted ...
20726    /// }
20727    /// ```
20728    #[derive(Clone, Debug)]
20729    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
20730
20731    impl SetIamPolicy {
20732        pub(crate) fn new(
20733            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20734        ) -> Self {
20735            Self(RequestBuilder::new(stub))
20736        }
20737
20738        /// Sets the full request, replacing any prior values.
20739        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
20740            mut self,
20741            v: V,
20742        ) -> Self {
20743            self.0.request = v.into();
20744            self
20745        }
20746
20747        /// Sets all the options, replacing any prior values.
20748        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20749            self.0.options = v.into();
20750            self
20751        }
20752
20753        /// Sends the request.
20754        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
20755            (*self.0.stub)
20756                .set_iam_policy(self.0.request, self.0.options)
20757                .await
20758                .map(crate::Response::into_body)
20759        }
20760
20761        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
20762        ///
20763        /// This is a **required** field for requests.
20764        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
20765            self.0.request.resource = v.into();
20766            self
20767        }
20768
20769        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
20770        ///
20771        /// This is a **required** field for requests.
20772        pub fn set_policy<T>(mut self, v: T) -> Self
20773        where
20774            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
20775        {
20776            self.0.request.policy = std::option::Option::Some(v.into());
20777            self
20778        }
20779
20780        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
20781        ///
20782        /// This is a **required** field for requests.
20783        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
20784        where
20785            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
20786        {
20787            self.0.request.policy = v.map(|x| x.into());
20788            self
20789        }
20790
20791        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
20792        pub fn set_update_mask<T>(mut self, v: T) -> Self
20793        where
20794            T: std::convert::Into<wkt::FieldMask>,
20795        {
20796            self.0.request.update_mask = std::option::Option::Some(v.into());
20797            self
20798        }
20799
20800        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
20801        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
20802        where
20803            T: std::convert::Into<wkt::FieldMask>,
20804        {
20805            self.0.request.update_mask = v.map(|x| x.into());
20806            self
20807        }
20808    }
20809
20810    #[doc(hidden)]
20811    impl crate::RequestBuilder for SetIamPolicy {
20812        fn request_options(&mut self) -> &mut crate::RequestOptions {
20813            &mut self.0.options
20814        }
20815    }
20816
20817    /// The request builder for [DataplexService::get_iam_policy][crate::client::DataplexService::get_iam_policy] calls.
20818    ///
20819    /// # Example
20820    /// ```
20821    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetIamPolicy;
20822    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20823    ///
20824    /// let builder = prepare_request_builder();
20825    /// let response = builder.send().await?;
20826    /// # Ok(()) }
20827    ///
20828    /// fn prepare_request_builder() -> GetIamPolicy {
20829    ///   # panic!();
20830    ///   // ... details omitted ...
20831    /// }
20832    /// ```
20833    #[derive(Clone, Debug)]
20834    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
20835
20836    impl GetIamPolicy {
20837        pub(crate) fn new(
20838            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20839        ) -> Self {
20840            Self(RequestBuilder::new(stub))
20841        }
20842
20843        /// Sets the full request, replacing any prior values.
20844        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
20845            mut self,
20846            v: V,
20847        ) -> Self {
20848            self.0.request = v.into();
20849            self
20850        }
20851
20852        /// Sets all the options, replacing any prior values.
20853        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20854            self.0.options = v.into();
20855            self
20856        }
20857
20858        /// Sends the request.
20859        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
20860            (*self.0.stub)
20861                .get_iam_policy(self.0.request, self.0.options)
20862                .await
20863                .map(crate::Response::into_body)
20864        }
20865
20866        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
20867        ///
20868        /// This is a **required** field for requests.
20869        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
20870            self.0.request.resource = v.into();
20871            self
20872        }
20873
20874        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
20875        pub fn set_options<T>(mut self, v: T) -> Self
20876        where
20877            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
20878        {
20879            self.0.request.options = std::option::Option::Some(v.into());
20880            self
20881        }
20882
20883        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
20884        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
20885        where
20886            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
20887        {
20888            self.0.request.options = v.map(|x| x.into());
20889            self
20890        }
20891    }
20892
20893    #[doc(hidden)]
20894    impl crate::RequestBuilder for GetIamPolicy {
20895        fn request_options(&mut self) -> &mut crate::RequestOptions {
20896            &mut self.0.options
20897        }
20898    }
20899
20900    /// The request builder for [DataplexService::test_iam_permissions][crate::client::DataplexService::test_iam_permissions] calls.
20901    ///
20902    /// # Example
20903    /// ```
20904    /// # use google_cloud_dataplex_v1::builder::dataplex_service::TestIamPermissions;
20905    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20906    ///
20907    /// let builder = prepare_request_builder();
20908    /// let response = builder.send().await?;
20909    /// # Ok(()) }
20910    ///
20911    /// fn prepare_request_builder() -> TestIamPermissions {
20912    ///   # panic!();
20913    ///   // ... details omitted ...
20914    /// }
20915    /// ```
20916    #[derive(Clone, Debug)]
20917    pub struct TestIamPermissions(
20918        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
20919    );
20920
20921    impl TestIamPermissions {
20922        pub(crate) fn new(
20923            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20924        ) -> Self {
20925            Self(RequestBuilder::new(stub))
20926        }
20927
20928        /// Sets the full request, replacing any prior values.
20929        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
20930            mut self,
20931            v: V,
20932        ) -> Self {
20933            self.0.request = v.into();
20934            self
20935        }
20936
20937        /// Sets all the options, replacing any prior values.
20938        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20939            self.0.options = v.into();
20940            self
20941        }
20942
20943        /// Sends the request.
20944        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
20945            (*self.0.stub)
20946                .test_iam_permissions(self.0.request, self.0.options)
20947                .await
20948                .map(crate::Response::into_body)
20949        }
20950
20951        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
20952        ///
20953        /// This is a **required** field for requests.
20954        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
20955            self.0.request.resource = v.into();
20956            self
20957        }
20958
20959        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
20960        ///
20961        /// This is a **required** field for requests.
20962        pub fn set_permissions<T, V>(mut self, v: T) -> Self
20963        where
20964            T: std::iter::IntoIterator<Item = V>,
20965            V: std::convert::Into<std::string::String>,
20966        {
20967            use std::iter::Iterator;
20968            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
20969            self
20970        }
20971    }
20972
20973    #[doc(hidden)]
20974    impl crate::RequestBuilder for TestIamPermissions {
20975        fn request_options(&mut self) -> &mut crate::RequestOptions {
20976            &mut self.0.options
20977        }
20978    }
20979
20980    /// The request builder for [DataplexService::list_operations][crate::client::DataplexService::list_operations] calls.
20981    ///
20982    /// # Example
20983    /// ```
20984    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListOperations;
20985    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20986    /// use google_cloud_gax::paginator::ItemPaginator;
20987    ///
20988    /// let builder = prepare_request_builder();
20989    /// let mut items = builder.by_item();
20990    /// while let Some(result) = items.next().await {
20991    ///   let item = result?;
20992    /// }
20993    /// # Ok(()) }
20994    ///
20995    /// fn prepare_request_builder() -> ListOperations {
20996    ///   # panic!();
20997    ///   // ... details omitted ...
20998    /// }
20999    /// ```
21000    #[derive(Clone, Debug)]
21001    pub struct ListOperations(
21002        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
21003    );
21004
21005    impl ListOperations {
21006        pub(crate) fn new(
21007            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21008        ) -> Self {
21009            Self(RequestBuilder::new(stub))
21010        }
21011
21012        /// Sets the full request, replacing any prior values.
21013        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
21014            mut self,
21015            v: V,
21016        ) -> Self {
21017            self.0.request = v.into();
21018            self
21019        }
21020
21021        /// Sets all the options, replacing any prior values.
21022        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21023            self.0.options = v.into();
21024            self
21025        }
21026
21027        /// Sends the request.
21028        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
21029            (*self.0.stub)
21030                .list_operations(self.0.request, self.0.options)
21031                .await
21032                .map(crate::Response::into_body)
21033        }
21034
21035        /// Streams each page in the collection.
21036        pub fn by_page(
21037            self,
21038        ) -> impl google_cloud_gax::paginator::Paginator<
21039            google_cloud_longrunning::model::ListOperationsResponse,
21040            crate::Error,
21041        > {
21042            use std::clone::Clone;
21043            let token = self.0.request.page_token.clone();
21044            let execute = move |token: String| {
21045                let mut builder = self.clone();
21046                builder.0.request = builder.0.request.set_page_token(token);
21047                builder.send()
21048            };
21049            google_cloud_gax::paginator::internal::new_paginator(token, execute)
21050        }
21051
21052        /// Streams each item in the collection.
21053        pub fn by_item(
21054            self,
21055        ) -> impl google_cloud_gax::paginator::ItemPaginator<
21056            google_cloud_longrunning::model::ListOperationsResponse,
21057            crate::Error,
21058        > {
21059            use google_cloud_gax::paginator::Paginator;
21060            self.by_page().items()
21061        }
21062
21063        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
21064        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
21065            self.0.request.name = v.into();
21066            self
21067        }
21068
21069        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
21070        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
21071            self.0.request.filter = v.into();
21072            self
21073        }
21074
21075        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
21076        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
21077            self.0.request.page_size = v.into();
21078            self
21079        }
21080
21081        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
21082        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
21083            self.0.request.page_token = v.into();
21084            self
21085        }
21086
21087        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
21088        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
21089            self.0.request.return_partial_success = v.into();
21090            self
21091        }
21092    }
21093
21094    #[doc(hidden)]
21095    impl crate::RequestBuilder for ListOperations {
21096        fn request_options(&mut self) -> &mut crate::RequestOptions {
21097            &mut self.0.options
21098        }
21099    }
21100
21101    /// The request builder for [DataplexService::get_operation][crate::client::DataplexService::get_operation] calls.
21102    ///
21103    /// # Example
21104    /// ```
21105    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetOperation;
21106    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
21107    ///
21108    /// let builder = prepare_request_builder();
21109    /// let response = builder.send().await?;
21110    /// # Ok(()) }
21111    ///
21112    /// fn prepare_request_builder() -> GetOperation {
21113    ///   # panic!();
21114    ///   // ... details omitted ...
21115    /// }
21116    /// ```
21117    #[derive(Clone, Debug)]
21118    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
21119
21120    impl GetOperation {
21121        pub(crate) fn new(
21122            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21123        ) -> Self {
21124            Self(RequestBuilder::new(stub))
21125        }
21126
21127        /// Sets the full request, replacing any prior values.
21128        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
21129            mut self,
21130            v: V,
21131        ) -> Self {
21132            self.0.request = v.into();
21133            self
21134        }
21135
21136        /// Sets all the options, replacing any prior values.
21137        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21138            self.0.options = v.into();
21139            self
21140        }
21141
21142        /// Sends the request.
21143        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
21144            (*self.0.stub)
21145                .get_operation(self.0.request, self.0.options)
21146                .await
21147                .map(crate::Response::into_body)
21148        }
21149
21150        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
21151        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
21152            self.0.request.name = v.into();
21153            self
21154        }
21155    }
21156
21157    #[doc(hidden)]
21158    impl crate::RequestBuilder for GetOperation {
21159        fn request_options(&mut self) -> &mut crate::RequestOptions {
21160            &mut self.0.options
21161        }
21162    }
21163
21164    /// The request builder for [DataplexService::delete_operation][crate::client::DataplexService::delete_operation] calls.
21165    ///
21166    /// # Example
21167    /// ```
21168    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteOperation;
21169    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
21170    ///
21171    /// let builder = prepare_request_builder();
21172    /// let response = builder.send().await?;
21173    /// # Ok(()) }
21174    ///
21175    /// fn prepare_request_builder() -> DeleteOperation {
21176    ///   # panic!();
21177    ///   // ... details omitted ...
21178    /// }
21179    /// ```
21180    #[derive(Clone, Debug)]
21181    pub struct DeleteOperation(
21182        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
21183    );
21184
21185    impl DeleteOperation {
21186        pub(crate) fn new(
21187            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21188        ) -> Self {
21189            Self(RequestBuilder::new(stub))
21190        }
21191
21192        /// Sets the full request, replacing any prior values.
21193        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
21194            mut self,
21195            v: V,
21196        ) -> Self {
21197            self.0.request = v.into();
21198            self
21199        }
21200
21201        /// Sets all the options, replacing any prior values.
21202        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21203            self.0.options = v.into();
21204            self
21205        }
21206
21207        /// Sends the request.
21208        pub async fn send(self) -> Result<()> {
21209            (*self.0.stub)
21210                .delete_operation(self.0.request, self.0.options)
21211                .await
21212                .map(crate::Response::into_body)
21213        }
21214
21215        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
21216        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
21217            self.0.request.name = v.into();
21218            self
21219        }
21220    }
21221
21222    #[doc(hidden)]
21223    impl crate::RequestBuilder for DeleteOperation {
21224        fn request_options(&mut self) -> &mut crate::RequestOptions {
21225            &mut self.0.options
21226        }
21227    }
21228
21229    /// The request builder for [DataplexService::cancel_operation][crate::client::DataplexService::cancel_operation] calls.
21230    ///
21231    /// # Example
21232    /// ```
21233    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CancelOperation;
21234    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
21235    ///
21236    /// let builder = prepare_request_builder();
21237    /// let response = builder.send().await?;
21238    /// # Ok(()) }
21239    ///
21240    /// fn prepare_request_builder() -> CancelOperation {
21241    ///   # panic!();
21242    ///   // ... details omitted ...
21243    /// }
21244    /// ```
21245    #[derive(Clone, Debug)]
21246    pub struct CancelOperation(
21247        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
21248    );
21249
21250    impl CancelOperation {
21251        pub(crate) fn new(
21252            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21253        ) -> Self {
21254            Self(RequestBuilder::new(stub))
21255        }
21256
21257        /// Sets the full request, replacing any prior values.
21258        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
21259            mut self,
21260            v: V,
21261        ) -> Self {
21262            self.0.request = v.into();
21263            self
21264        }
21265
21266        /// Sets all the options, replacing any prior values.
21267        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21268            self.0.options = v.into();
21269            self
21270        }
21271
21272        /// Sends the request.
21273        pub async fn send(self) -> Result<()> {
21274            (*self.0.stub)
21275                .cancel_operation(self.0.request, self.0.options)
21276                .await
21277                .map(crate::Response::into_body)
21278        }
21279
21280        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
21281        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
21282            self.0.request.name = v.into();
21283            self
21284        }
21285    }
21286
21287    #[doc(hidden)]
21288    impl crate::RequestBuilder for CancelOperation {
21289        fn request_options(&mut self) -> &mut crate::RequestOptions {
21290            &mut self.0.options
21291        }
21292    }
21293}