Skip to main content

google_cloud_dataplex_v1/
builder.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17pub mod business_glossary_service {
18    use crate::Result;
19
20    /// A builder for [BusinessGlossaryService][crate::client::BusinessGlossaryService].
21    ///
22    /// ```
23    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
24    /// # use google_cloud_dataplex_v1::*;
25    /// # use builder::business_glossary_service::ClientBuilder;
26    /// # use client::BusinessGlossaryService;
27    /// let builder : ClientBuilder = BusinessGlossaryService::builder();
28    /// let client = builder
29    ///     .with_endpoint("https://dataplex.googleapis.com")
30    ///     .build().await?;
31    /// # Ok(()) }
32    /// ```
33    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
34
35    pub(crate) mod client {
36        use super::super::super::client::BusinessGlossaryService;
37        pub struct Factory;
38        impl crate::ClientFactory for Factory {
39            type Client = BusinessGlossaryService;
40            type Credentials = gaxi::options::Credentials;
41            async fn build(
42                self,
43                config: gaxi::options::ClientConfig,
44            ) -> crate::ClientBuilderResult<Self::Client> {
45                Self::Client::new(config).await
46            }
47        }
48    }
49
50    /// Common implementation for [crate::client::BusinessGlossaryService] request builders.
51    #[derive(Clone, Debug)]
52    pub(crate) struct RequestBuilder<R: std::default::Default> {
53        stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
54        request: R,
55        options: crate::RequestOptions,
56    }
57
58    impl<R> RequestBuilder<R>
59    where
60        R: std::default::Default,
61    {
62        pub(crate) fn new(
63            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
64        ) -> Self {
65            Self {
66                stub,
67                request: R::default(),
68                options: crate::RequestOptions::default(),
69            }
70        }
71    }
72
73    /// The request builder for [BusinessGlossaryService::create_glossary][crate::client::BusinessGlossaryService::create_glossary] calls.
74    ///
75    /// # Example
76    /// ```
77    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CreateGlossary;
78    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
79    /// use google_cloud_lro::Poller;
80    ///
81    /// let builder = prepare_request_builder();
82    /// let response = builder.poller().until_done().await?;
83    /// # Ok(()) }
84    ///
85    /// fn prepare_request_builder() -> CreateGlossary {
86    ///   # panic!();
87    ///   // ... details omitted ...
88    /// }
89    /// ```
90    #[derive(Clone, Debug)]
91    pub struct CreateGlossary(RequestBuilder<crate::model::CreateGlossaryRequest>);
92
93    impl CreateGlossary {
94        pub(crate) fn new(
95            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
96        ) -> Self {
97            Self(RequestBuilder::new(stub))
98        }
99
100        /// Sets the full request, replacing any prior values.
101        pub fn with_request<V: Into<crate::model::CreateGlossaryRequest>>(mut self, v: V) -> Self {
102            self.0.request = v.into();
103            self
104        }
105
106        /// Sets all the options, replacing any prior values.
107        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
108            self.0.options = v.into();
109            self
110        }
111
112        /// Sends the request.
113        ///
114        /// # Long running operations
115        ///
116        /// This starts, but does not poll, a longrunning operation. More information
117        /// on [create_glossary][crate::client::BusinessGlossaryService::create_glossary].
118        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
119            (*self.0.stub)
120                .create_glossary(self.0.request, self.0.options)
121                .await
122                .map(crate::Response::into_body)
123        }
124
125        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_glossary`.
126        pub fn poller(
127            self,
128        ) -> impl google_cloud_lro::Poller<crate::model::Glossary, crate::model::OperationMetadata>
129        {
130            type Operation = google_cloud_lro::internal::Operation<
131                crate::model::Glossary,
132                crate::model::OperationMetadata,
133            >;
134            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
135            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
136
137            let stub = self.0.stub.clone();
138            let mut options = self.0.options.clone();
139            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
140            let query = move |name| {
141                let stub = stub.clone();
142                let options = options.clone();
143                async {
144                    let op = GetOperation::new(stub)
145                        .set_name(name)
146                        .with_options(options)
147                        .send()
148                        .await?;
149                    Ok(Operation::new(op))
150                }
151            };
152
153            let start = move || async {
154                let op = self.send().await?;
155                Ok(Operation::new(op))
156            };
157
158            google_cloud_lro::internal::new_poller(
159                polling_error_policy,
160                polling_backoff_policy,
161                start,
162                query,
163            )
164        }
165
166        /// Sets the value of [parent][crate::model::CreateGlossaryRequest::parent].
167        ///
168        /// This is a **required** field for requests.
169        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
170            self.0.request.parent = v.into();
171            self
172        }
173
174        /// Sets the value of [glossary_id][crate::model::CreateGlossaryRequest::glossary_id].
175        ///
176        /// This is a **required** field for requests.
177        pub fn set_glossary_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
178            self.0.request.glossary_id = v.into();
179            self
180        }
181
182        /// Sets the value of [glossary][crate::model::CreateGlossaryRequest::glossary].
183        ///
184        /// This is a **required** field for requests.
185        pub fn set_glossary<T>(mut self, v: T) -> Self
186        where
187            T: std::convert::Into<crate::model::Glossary>,
188        {
189            self.0.request.glossary = std::option::Option::Some(v.into());
190            self
191        }
192
193        /// Sets or clears the value of [glossary][crate::model::CreateGlossaryRequest::glossary].
194        ///
195        /// This is a **required** field for requests.
196        pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
197        where
198            T: std::convert::Into<crate::model::Glossary>,
199        {
200            self.0.request.glossary = v.map(|x| x.into());
201            self
202        }
203
204        /// Sets the value of [validate_only][crate::model::CreateGlossaryRequest::validate_only].
205        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
206            self.0.request.validate_only = v.into();
207            self
208        }
209    }
210
211    #[doc(hidden)]
212    impl crate::RequestBuilder for CreateGlossary {
213        fn request_options(&mut self) -> &mut crate::RequestOptions {
214            &mut self.0.options
215        }
216    }
217
218    /// The request builder for [BusinessGlossaryService::update_glossary][crate::client::BusinessGlossaryService::update_glossary] calls.
219    ///
220    /// # Example
221    /// ```
222    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::UpdateGlossary;
223    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
224    /// use google_cloud_lro::Poller;
225    ///
226    /// let builder = prepare_request_builder();
227    /// let response = builder.poller().until_done().await?;
228    /// # Ok(()) }
229    ///
230    /// fn prepare_request_builder() -> UpdateGlossary {
231    ///   # panic!();
232    ///   // ... details omitted ...
233    /// }
234    /// ```
235    #[derive(Clone, Debug)]
236    pub struct UpdateGlossary(RequestBuilder<crate::model::UpdateGlossaryRequest>);
237
238    impl UpdateGlossary {
239        pub(crate) fn new(
240            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
241        ) -> Self {
242            Self(RequestBuilder::new(stub))
243        }
244
245        /// Sets the full request, replacing any prior values.
246        pub fn with_request<V: Into<crate::model::UpdateGlossaryRequest>>(mut self, v: V) -> Self {
247            self.0.request = v.into();
248            self
249        }
250
251        /// Sets all the options, replacing any prior values.
252        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
253            self.0.options = v.into();
254            self
255        }
256
257        /// Sends the request.
258        ///
259        /// # Long running operations
260        ///
261        /// This starts, but does not poll, a longrunning operation. More information
262        /// on [update_glossary][crate::client::BusinessGlossaryService::update_glossary].
263        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
264            (*self.0.stub)
265                .update_glossary(self.0.request, self.0.options)
266                .await
267                .map(crate::Response::into_body)
268        }
269
270        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_glossary`.
271        pub fn poller(
272            self,
273        ) -> impl google_cloud_lro::Poller<crate::model::Glossary, crate::model::OperationMetadata>
274        {
275            type Operation = google_cloud_lro::internal::Operation<
276                crate::model::Glossary,
277                crate::model::OperationMetadata,
278            >;
279            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
280            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
281
282            let stub = self.0.stub.clone();
283            let mut options = self.0.options.clone();
284            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
285            let query = move |name| {
286                let stub = stub.clone();
287                let options = options.clone();
288                async {
289                    let op = GetOperation::new(stub)
290                        .set_name(name)
291                        .with_options(options)
292                        .send()
293                        .await?;
294                    Ok(Operation::new(op))
295                }
296            };
297
298            let start = move || async {
299                let op = self.send().await?;
300                Ok(Operation::new(op))
301            };
302
303            google_cloud_lro::internal::new_poller(
304                polling_error_policy,
305                polling_backoff_policy,
306                start,
307                query,
308            )
309        }
310
311        /// Sets the value of [glossary][crate::model::UpdateGlossaryRequest::glossary].
312        ///
313        /// This is a **required** field for requests.
314        pub fn set_glossary<T>(mut self, v: T) -> Self
315        where
316            T: std::convert::Into<crate::model::Glossary>,
317        {
318            self.0.request.glossary = std::option::Option::Some(v.into());
319            self
320        }
321
322        /// Sets or clears the value of [glossary][crate::model::UpdateGlossaryRequest::glossary].
323        ///
324        /// This is a **required** field for requests.
325        pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
326        where
327            T: std::convert::Into<crate::model::Glossary>,
328        {
329            self.0.request.glossary = v.map(|x| x.into());
330            self
331        }
332
333        /// Sets the value of [update_mask][crate::model::UpdateGlossaryRequest::update_mask].
334        ///
335        /// This is a **required** field for requests.
336        pub fn set_update_mask<T>(mut self, v: T) -> Self
337        where
338            T: std::convert::Into<wkt::FieldMask>,
339        {
340            self.0.request.update_mask = std::option::Option::Some(v.into());
341            self
342        }
343
344        /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryRequest::update_mask].
345        ///
346        /// This is a **required** field for requests.
347        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
348        where
349            T: std::convert::Into<wkt::FieldMask>,
350        {
351            self.0.request.update_mask = v.map(|x| x.into());
352            self
353        }
354
355        /// Sets the value of [validate_only][crate::model::UpdateGlossaryRequest::validate_only].
356        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
357            self.0.request.validate_only = v.into();
358            self
359        }
360    }
361
362    #[doc(hidden)]
363    impl crate::RequestBuilder for UpdateGlossary {
364        fn request_options(&mut self) -> &mut crate::RequestOptions {
365            &mut self.0.options
366        }
367    }
368
369    /// The request builder for [BusinessGlossaryService::delete_glossary][crate::client::BusinessGlossaryService::delete_glossary] calls.
370    ///
371    /// # Example
372    /// ```
373    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteGlossary;
374    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
375    /// use google_cloud_lro::Poller;
376    ///
377    /// let builder = prepare_request_builder();
378    /// let response = builder.poller().until_done().await?;
379    /// # Ok(()) }
380    ///
381    /// fn prepare_request_builder() -> DeleteGlossary {
382    ///   # panic!();
383    ///   // ... details omitted ...
384    /// }
385    /// ```
386    #[derive(Clone, Debug)]
387    pub struct DeleteGlossary(RequestBuilder<crate::model::DeleteGlossaryRequest>);
388
389    impl DeleteGlossary {
390        pub(crate) fn new(
391            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
392        ) -> Self {
393            Self(RequestBuilder::new(stub))
394        }
395
396        /// Sets the full request, replacing any prior values.
397        pub fn with_request<V: Into<crate::model::DeleteGlossaryRequest>>(mut self, v: V) -> Self {
398            self.0.request = v.into();
399            self
400        }
401
402        /// Sets all the options, replacing any prior values.
403        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
404            self.0.options = v.into();
405            self
406        }
407
408        /// Sends the request.
409        ///
410        /// # Long running operations
411        ///
412        /// This starts, but does not poll, a longrunning operation. More information
413        /// on [delete_glossary][crate::client::BusinessGlossaryService::delete_glossary].
414        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
415            (*self.0.stub)
416                .delete_glossary(self.0.request, self.0.options)
417                .await
418                .map(crate::Response::into_body)
419        }
420
421        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_glossary`.
422        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
423            type Operation =
424                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
425            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
426            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
427
428            let stub = self.0.stub.clone();
429            let mut options = self.0.options.clone();
430            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
431            let query = move |name| {
432                let stub = stub.clone();
433                let options = options.clone();
434                async {
435                    let op = GetOperation::new(stub)
436                        .set_name(name)
437                        .with_options(options)
438                        .send()
439                        .await?;
440                    Ok(Operation::new(op))
441                }
442            };
443
444            let start = move || async {
445                let op = self.send().await?;
446                Ok(Operation::new(op))
447            };
448
449            google_cloud_lro::internal::new_unit_response_poller(
450                polling_error_policy,
451                polling_backoff_policy,
452                start,
453                query,
454            )
455        }
456
457        /// Sets the value of [name][crate::model::DeleteGlossaryRequest::name].
458        ///
459        /// This is a **required** field for requests.
460        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
461            self.0.request.name = v.into();
462            self
463        }
464
465        /// Sets the value of [etag][crate::model::DeleteGlossaryRequest::etag].
466        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
467            self.0.request.etag = v.into();
468            self
469        }
470    }
471
472    #[doc(hidden)]
473    impl crate::RequestBuilder for DeleteGlossary {
474        fn request_options(&mut self) -> &mut crate::RequestOptions {
475            &mut self.0.options
476        }
477    }
478
479    /// The request builder for [BusinessGlossaryService::get_glossary][crate::client::BusinessGlossaryService::get_glossary] calls.
480    ///
481    /// # Example
482    /// ```
483    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetGlossary;
484    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
485    ///
486    /// let builder = prepare_request_builder();
487    /// let response = builder.send().await?;
488    /// # Ok(()) }
489    ///
490    /// fn prepare_request_builder() -> GetGlossary {
491    ///   # panic!();
492    ///   // ... details omitted ...
493    /// }
494    /// ```
495    #[derive(Clone, Debug)]
496    pub struct GetGlossary(RequestBuilder<crate::model::GetGlossaryRequest>);
497
498    impl GetGlossary {
499        pub(crate) fn new(
500            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
501        ) -> Self {
502            Self(RequestBuilder::new(stub))
503        }
504
505        /// Sets the full request, replacing any prior values.
506        pub fn with_request<V: Into<crate::model::GetGlossaryRequest>>(mut self, v: V) -> Self {
507            self.0.request = v.into();
508            self
509        }
510
511        /// Sets all the options, replacing any prior values.
512        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
513            self.0.options = v.into();
514            self
515        }
516
517        /// Sends the request.
518        pub async fn send(self) -> Result<crate::model::Glossary> {
519            (*self.0.stub)
520                .get_glossary(self.0.request, self.0.options)
521                .await
522                .map(crate::Response::into_body)
523        }
524
525        /// Sets the value of [name][crate::model::GetGlossaryRequest::name].
526        ///
527        /// This is a **required** field for requests.
528        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
529            self.0.request.name = v.into();
530            self
531        }
532    }
533
534    #[doc(hidden)]
535    impl crate::RequestBuilder for GetGlossary {
536        fn request_options(&mut self) -> &mut crate::RequestOptions {
537            &mut self.0.options
538        }
539    }
540
541    /// The request builder for [BusinessGlossaryService::list_glossaries][crate::client::BusinessGlossaryService::list_glossaries] calls.
542    ///
543    /// # Example
544    /// ```
545    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListGlossaries;
546    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
547    /// use google_cloud_gax::paginator::ItemPaginator;
548    ///
549    /// let builder = prepare_request_builder();
550    /// let mut items = builder.by_item();
551    /// while let Some(result) = items.next().await {
552    ///   let item = result?;
553    /// }
554    /// # Ok(()) }
555    ///
556    /// fn prepare_request_builder() -> ListGlossaries {
557    ///   # panic!();
558    ///   // ... details omitted ...
559    /// }
560    /// ```
561    #[derive(Clone, Debug)]
562    pub struct ListGlossaries(RequestBuilder<crate::model::ListGlossariesRequest>);
563
564    impl ListGlossaries {
565        pub(crate) fn new(
566            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
567        ) -> Self {
568            Self(RequestBuilder::new(stub))
569        }
570
571        /// Sets the full request, replacing any prior values.
572        pub fn with_request<V: Into<crate::model::ListGlossariesRequest>>(mut self, v: V) -> Self {
573            self.0.request = v.into();
574            self
575        }
576
577        /// Sets all the options, replacing any prior values.
578        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
579            self.0.options = v.into();
580            self
581        }
582
583        /// Sends the request.
584        pub async fn send(self) -> Result<crate::model::ListGlossariesResponse> {
585            (*self.0.stub)
586                .list_glossaries(self.0.request, self.0.options)
587                .await
588                .map(crate::Response::into_body)
589        }
590
591        /// Streams each page in the collection.
592        pub fn by_page(
593            self,
594        ) -> impl google_cloud_gax::paginator::Paginator<
595            crate::model::ListGlossariesResponse,
596            crate::Error,
597        > {
598            use std::clone::Clone;
599            let token = self.0.request.page_token.clone();
600            let execute = move |token: String| {
601                let mut builder = self.clone();
602                builder.0.request = builder.0.request.set_page_token(token);
603                builder.send()
604            };
605            google_cloud_gax::paginator::internal::new_paginator(token, execute)
606        }
607
608        /// Streams each item in the collection.
609        pub fn by_item(
610            self,
611        ) -> impl google_cloud_gax::paginator::ItemPaginator<
612            crate::model::ListGlossariesResponse,
613            crate::Error,
614        > {
615            use google_cloud_gax::paginator::Paginator;
616            self.by_page().items()
617        }
618
619        /// Sets the value of [parent][crate::model::ListGlossariesRequest::parent].
620        ///
621        /// This is a **required** field for requests.
622        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
623            self.0.request.parent = v.into();
624            self
625        }
626
627        /// Sets the value of [page_size][crate::model::ListGlossariesRequest::page_size].
628        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
629            self.0.request.page_size = v.into();
630            self
631        }
632
633        /// Sets the value of [page_token][crate::model::ListGlossariesRequest::page_token].
634        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
635            self.0.request.page_token = v.into();
636            self
637        }
638
639        /// Sets the value of [filter][crate::model::ListGlossariesRequest::filter].
640        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
641            self.0.request.filter = v.into();
642            self
643        }
644
645        /// Sets the value of [order_by][crate::model::ListGlossariesRequest::order_by].
646        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
647            self.0.request.order_by = v.into();
648            self
649        }
650    }
651
652    #[doc(hidden)]
653    impl crate::RequestBuilder for ListGlossaries {
654        fn request_options(&mut self) -> &mut crate::RequestOptions {
655            &mut self.0.options
656        }
657    }
658
659    /// The request builder for [BusinessGlossaryService::create_glossary_category][crate::client::BusinessGlossaryService::create_glossary_category] calls.
660    ///
661    /// # Example
662    /// ```
663    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CreateGlossaryCategory;
664    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
665    ///
666    /// let builder = prepare_request_builder();
667    /// let response = builder.send().await?;
668    /// # Ok(()) }
669    ///
670    /// fn prepare_request_builder() -> CreateGlossaryCategory {
671    ///   # panic!();
672    ///   // ... details omitted ...
673    /// }
674    /// ```
675    #[derive(Clone, Debug)]
676    pub struct CreateGlossaryCategory(RequestBuilder<crate::model::CreateGlossaryCategoryRequest>);
677
678    impl CreateGlossaryCategory {
679        pub(crate) fn new(
680            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
681        ) -> Self {
682            Self(RequestBuilder::new(stub))
683        }
684
685        /// Sets the full request, replacing any prior values.
686        pub fn with_request<V: Into<crate::model::CreateGlossaryCategoryRequest>>(
687            mut self,
688            v: V,
689        ) -> Self {
690            self.0.request = v.into();
691            self
692        }
693
694        /// Sets all the options, replacing any prior values.
695        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
696            self.0.options = v.into();
697            self
698        }
699
700        /// Sends the request.
701        pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
702            (*self.0.stub)
703                .create_glossary_category(self.0.request, self.0.options)
704                .await
705                .map(crate::Response::into_body)
706        }
707
708        /// Sets the value of [parent][crate::model::CreateGlossaryCategoryRequest::parent].
709        ///
710        /// This is a **required** field for requests.
711        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
712            self.0.request.parent = v.into();
713            self
714        }
715
716        /// Sets the value of [category_id][crate::model::CreateGlossaryCategoryRequest::category_id].
717        ///
718        /// This is a **required** field for requests.
719        pub fn set_category_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
720            self.0.request.category_id = v.into();
721            self
722        }
723
724        /// Sets the value of [category][crate::model::CreateGlossaryCategoryRequest::category].
725        ///
726        /// This is a **required** field for requests.
727        pub fn set_category<T>(mut self, v: T) -> Self
728        where
729            T: std::convert::Into<crate::model::GlossaryCategory>,
730        {
731            self.0.request.category = std::option::Option::Some(v.into());
732            self
733        }
734
735        /// Sets or clears the value of [category][crate::model::CreateGlossaryCategoryRequest::category].
736        ///
737        /// This is a **required** field for requests.
738        pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
739        where
740            T: std::convert::Into<crate::model::GlossaryCategory>,
741        {
742            self.0.request.category = v.map(|x| x.into());
743            self
744        }
745    }
746
747    #[doc(hidden)]
748    impl crate::RequestBuilder for CreateGlossaryCategory {
749        fn request_options(&mut self) -> &mut crate::RequestOptions {
750            &mut self.0.options
751        }
752    }
753
754    /// The request builder for [BusinessGlossaryService::update_glossary_category][crate::client::BusinessGlossaryService::update_glossary_category] calls.
755    ///
756    /// # Example
757    /// ```
758    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::UpdateGlossaryCategory;
759    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
760    ///
761    /// let builder = prepare_request_builder();
762    /// let response = builder.send().await?;
763    /// # Ok(()) }
764    ///
765    /// fn prepare_request_builder() -> UpdateGlossaryCategory {
766    ///   # panic!();
767    ///   // ... details omitted ...
768    /// }
769    /// ```
770    #[derive(Clone, Debug)]
771    pub struct UpdateGlossaryCategory(RequestBuilder<crate::model::UpdateGlossaryCategoryRequest>);
772
773    impl UpdateGlossaryCategory {
774        pub(crate) fn new(
775            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
776        ) -> Self {
777            Self(RequestBuilder::new(stub))
778        }
779
780        /// Sets the full request, replacing any prior values.
781        pub fn with_request<V: Into<crate::model::UpdateGlossaryCategoryRequest>>(
782            mut self,
783            v: V,
784        ) -> Self {
785            self.0.request = v.into();
786            self
787        }
788
789        /// Sets all the options, replacing any prior values.
790        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
791            self.0.options = v.into();
792            self
793        }
794
795        /// Sends the request.
796        pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
797            (*self.0.stub)
798                .update_glossary_category(self.0.request, self.0.options)
799                .await
800                .map(crate::Response::into_body)
801        }
802
803        /// Sets the value of [category][crate::model::UpdateGlossaryCategoryRequest::category].
804        ///
805        /// This is a **required** field for requests.
806        pub fn set_category<T>(mut self, v: T) -> Self
807        where
808            T: std::convert::Into<crate::model::GlossaryCategory>,
809        {
810            self.0.request.category = std::option::Option::Some(v.into());
811            self
812        }
813
814        /// Sets or clears the value of [category][crate::model::UpdateGlossaryCategoryRequest::category].
815        ///
816        /// This is a **required** field for requests.
817        pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
818        where
819            T: std::convert::Into<crate::model::GlossaryCategory>,
820        {
821            self.0.request.category = v.map(|x| x.into());
822            self
823        }
824
825        /// Sets the value of [update_mask][crate::model::UpdateGlossaryCategoryRequest::update_mask].
826        ///
827        /// This is a **required** field for requests.
828        pub fn set_update_mask<T>(mut self, v: T) -> Self
829        where
830            T: std::convert::Into<wkt::FieldMask>,
831        {
832            self.0.request.update_mask = std::option::Option::Some(v.into());
833            self
834        }
835
836        /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryCategoryRequest::update_mask].
837        ///
838        /// This is a **required** field for requests.
839        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
840        where
841            T: std::convert::Into<wkt::FieldMask>,
842        {
843            self.0.request.update_mask = v.map(|x| x.into());
844            self
845        }
846    }
847
848    #[doc(hidden)]
849    impl crate::RequestBuilder for UpdateGlossaryCategory {
850        fn request_options(&mut self) -> &mut crate::RequestOptions {
851            &mut self.0.options
852        }
853    }
854
855    /// The request builder for [BusinessGlossaryService::delete_glossary_category][crate::client::BusinessGlossaryService::delete_glossary_category] calls.
856    ///
857    /// # Example
858    /// ```
859    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteGlossaryCategory;
860    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
861    ///
862    /// let builder = prepare_request_builder();
863    /// let response = builder.send().await?;
864    /// # Ok(()) }
865    ///
866    /// fn prepare_request_builder() -> DeleteGlossaryCategory {
867    ///   # panic!();
868    ///   // ... details omitted ...
869    /// }
870    /// ```
871    #[derive(Clone, Debug)]
872    pub struct DeleteGlossaryCategory(RequestBuilder<crate::model::DeleteGlossaryCategoryRequest>);
873
874    impl DeleteGlossaryCategory {
875        pub(crate) fn new(
876            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
877        ) -> Self {
878            Self(RequestBuilder::new(stub))
879        }
880
881        /// Sets the full request, replacing any prior values.
882        pub fn with_request<V: Into<crate::model::DeleteGlossaryCategoryRequest>>(
883            mut self,
884            v: V,
885        ) -> Self {
886            self.0.request = v.into();
887            self
888        }
889
890        /// Sets all the options, replacing any prior values.
891        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
892            self.0.options = v.into();
893            self
894        }
895
896        /// Sends the request.
897        pub async fn send(self) -> Result<()> {
898            (*self.0.stub)
899                .delete_glossary_category(self.0.request, self.0.options)
900                .await
901                .map(crate::Response::into_body)
902        }
903
904        /// Sets the value of [name][crate::model::DeleteGlossaryCategoryRequest::name].
905        ///
906        /// This is a **required** field for requests.
907        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
908            self.0.request.name = v.into();
909            self
910        }
911    }
912
913    #[doc(hidden)]
914    impl crate::RequestBuilder for DeleteGlossaryCategory {
915        fn request_options(&mut self) -> &mut crate::RequestOptions {
916            &mut self.0.options
917        }
918    }
919
920    /// The request builder for [BusinessGlossaryService::get_glossary_category][crate::client::BusinessGlossaryService::get_glossary_category] calls.
921    ///
922    /// # Example
923    /// ```
924    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetGlossaryCategory;
925    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
926    ///
927    /// let builder = prepare_request_builder();
928    /// let response = builder.send().await?;
929    /// # Ok(()) }
930    ///
931    /// fn prepare_request_builder() -> GetGlossaryCategory {
932    ///   # panic!();
933    ///   // ... details omitted ...
934    /// }
935    /// ```
936    #[derive(Clone, Debug)]
937    pub struct GetGlossaryCategory(RequestBuilder<crate::model::GetGlossaryCategoryRequest>);
938
939    impl GetGlossaryCategory {
940        pub(crate) fn new(
941            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
942        ) -> Self {
943            Self(RequestBuilder::new(stub))
944        }
945
946        /// Sets the full request, replacing any prior values.
947        pub fn with_request<V: Into<crate::model::GetGlossaryCategoryRequest>>(
948            mut self,
949            v: V,
950        ) -> Self {
951            self.0.request = v.into();
952            self
953        }
954
955        /// Sets all the options, replacing any prior values.
956        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
957            self.0.options = v.into();
958            self
959        }
960
961        /// Sends the request.
962        pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
963            (*self.0.stub)
964                .get_glossary_category(self.0.request, self.0.options)
965                .await
966                .map(crate::Response::into_body)
967        }
968
969        /// Sets the value of [name][crate::model::GetGlossaryCategoryRequest::name].
970        ///
971        /// This is a **required** field for requests.
972        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
973            self.0.request.name = v.into();
974            self
975        }
976    }
977
978    #[doc(hidden)]
979    impl crate::RequestBuilder for GetGlossaryCategory {
980        fn request_options(&mut self) -> &mut crate::RequestOptions {
981            &mut self.0.options
982        }
983    }
984
985    /// The request builder for [BusinessGlossaryService::list_glossary_categories][crate::client::BusinessGlossaryService::list_glossary_categories] calls.
986    ///
987    /// # Example
988    /// ```
989    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListGlossaryCategories;
990    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
991    /// use google_cloud_gax::paginator::ItemPaginator;
992    ///
993    /// let builder = prepare_request_builder();
994    /// let mut items = builder.by_item();
995    /// while let Some(result) = items.next().await {
996    ///   let item = result?;
997    /// }
998    /// # Ok(()) }
999    ///
1000    /// fn prepare_request_builder() -> ListGlossaryCategories {
1001    ///   # panic!();
1002    ///   // ... details omitted ...
1003    /// }
1004    /// ```
1005    #[derive(Clone, Debug)]
1006    pub struct ListGlossaryCategories(RequestBuilder<crate::model::ListGlossaryCategoriesRequest>);
1007
1008    impl ListGlossaryCategories {
1009        pub(crate) fn new(
1010            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1011        ) -> Self {
1012            Self(RequestBuilder::new(stub))
1013        }
1014
1015        /// Sets the full request, replacing any prior values.
1016        pub fn with_request<V: Into<crate::model::ListGlossaryCategoriesRequest>>(
1017            mut self,
1018            v: V,
1019        ) -> Self {
1020            self.0.request = v.into();
1021            self
1022        }
1023
1024        /// Sets all the options, replacing any prior values.
1025        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1026            self.0.options = v.into();
1027            self
1028        }
1029
1030        /// Sends the request.
1031        pub async fn send(self) -> Result<crate::model::ListGlossaryCategoriesResponse> {
1032            (*self.0.stub)
1033                .list_glossary_categories(self.0.request, self.0.options)
1034                .await
1035                .map(crate::Response::into_body)
1036        }
1037
1038        /// Streams each page in the collection.
1039        pub fn by_page(
1040            self,
1041        ) -> impl google_cloud_gax::paginator::Paginator<
1042            crate::model::ListGlossaryCategoriesResponse,
1043            crate::Error,
1044        > {
1045            use std::clone::Clone;
1046            let token = self.0.request.page_token.clone();
1047            let execute = move |token: String| {
1048                let mut builder = self.clone();
1049                builder.0.request = builder.0.request.set_page_token(token);
1050                builder.send()
1051            };
1052            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1053        }
1054
1055        /// Streams each item in the collection.
1056        pub fn by_item(
1057            self,
1058        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1059            crate::model::ListGlossaryCategoriesResponse,
1060            crate::Error,
1061        > {
1062            use google_cloud_gax::paginator::Paginator;
1063            self.by_page().items()
1064        }
1065
1066        /// Sets the value of [parent][crate::model::ListGlossaryCategoriesRequest::parent].
1067        ///
1068        /// This is a **required** field for requests.
1069        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1070            self.0.request.parent = v.into();
1071            self
1072        }
1073
1074        /// Sets the value of [page_size][crate::model::ListGlossaryCategoriesRequest::page_size].
1075        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1076            self.0.request.page_size = v.into();
1077            self
1078        }
1079
1080        /// Sets the value of [page_token][crate::model::ListGlossaryCategoriesRequest::page_token].
1081        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1082            self.0.request.page_token = v.into();
1083            self
1084        }
1085
1086        /// Sets the value of [filter][crate::model::ListGlossaryCategoriesRequest::filter].
1087        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1088            self.0.request.filter = v.into();
1089            self
1090        }
1091
1092        /// Sets the value of [order_by][crate::model::ListGlossaryCategoriesRequest::order_by].
1093        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1094            self.0.request.order_by = v.into();
1095            self
1096        }
1097    }
1098
1099    #[doc(hidden)]
1100    impl crate::RequestBuilder for ListGlossaryCategories {
1101        fn request_options(&mut self) -> &mut crate::RequestOptions {
1102            &mut self.0.options
1103        }
1104    }
1105
1106    /// The request builder for [BusinessGlossaryService::create_glossary_term][crate::client::BusinessGlossaryService::create_glossary_term] calls.
1107    ///
1108    /// # Example
1109    /// ```
1110    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CreateGlossaryTerm;
1111    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1112    ///
1113    /// let builder = prepare_request_builder();
1114    /// let response = builder.send().await?;
1115    /// # Ok(()) }
1116    ///
1117    /// fn prepare_request_builder() -> CreateGlossaryTerm {
1118    ///   # panic!();
1119    ///   // ... details omitted ...
1120    /// }
1121    /// ```
1122    #[derive(Clone, Debug)]
1123    pub struct CreateGlossaryTerm(RequestBuilder<crate::model::CreateGlossaryTermRequest>);
1124
1125    impl CreateGlossaryTerm {
1126        pub(crate) fn new(
1127            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1128        ) -> Self {
1129            Self(RequestBuilder::new(stub))
1130        }
1131
1132        /// Sets the full request, replacing any prior values.
1133        pub fn with_request<V: Into<crate::model::CreateGlossaryTermRequest>>(
1134            mut self,
1135            v: V,
1136        ) -> Self {
1137            self.0.request = v.into();
1138            self
1139        }
1140
1141        /// Sets all the options, replacing any prior values.
1142        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1143            self.0.options = v.into();
1144            self
1145        }
1146
1147        /// Sends the request.
1148        pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1149            (*self.0.stub)
1150                .create_glossary_term(self.0.request, self.0.options)
1151                .await
1152                .map(crate::Response::into_body)
1153        }
1154
1155        /// Sets the value of [parent][crate::model::CreateGlossaryTermRequest::parent].
1156        ///
1157        /// This is a **required** field for requests.
1158        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1159            self.0.request.parent = v.into();
1160            self
1161        }
1162
1163        /// Sets the value of [term_id][crate::model::CreateGlossaryTermRequest::term_id].
1164        ///
1165        /// This is a **required** field for requests.
1166        pub fn set_term_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1167            self.0.request.term_id = v.into();
1168            self
1169        }
1170
1171        /// Sets the value of [term][crate::model::CreateGlossaryTermRequest::term].
1172        ///
1173        /// This is a **required** field for requests.
1174        pub fn set_term<T>(mut self, v: T) -> Self
1175        where
1176            T: std::convert::Into<crate::model::GlossaryTerm>,
1177        {
1178            self.0.request.term = std::option::Option::Some(v.into());
1179            self
1180        }
1181
1182        /// Sets or clears the value of [term][crate::model::CreateGlossaryTermRequest::term].
1183        ///
1184        /// This is a **required** field for requests.
1185        pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
1186        where
1187            T: std::convert::Into<crate::model::GlossaryTerm>,
1188        {
1189            self.0.request.term = v.map(|x| x.into());
1190            self
1191        }
1192    }
1193
1194    #[doc(hidden)]
1195    impl crate::RequestBuilder for CreateGlossaryTerm {
1196        fn request_options(&mut self) -> &mut crate::RequestOptions {
1197            &mut self.0.options
1198        }
1199    }
1200
1201    /// The request builder for [BusinessGlossaryService::update_glossary_term][crate::client::BusinessGlossaryService::update_glossary_term] calls.
1202    ///
1203    /// # Example
1204    /// ```
1205    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::UpdateGlossaryTerm;
1206    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1207    ///
1208    /// let builder = prepare_request_builder();
1209    /// let response = builder.send().await?;
1210    /// # Ok(()) }
1211    ///
1212    /// fn prepare_request_builder() -> UpdateGlossaryTerm {
1213    ///   # panic!();
1214    ///   // ... details omitted ...
1215    /// }
1216    /// ```
1217    #[derive(Clone, Debug)]
1218    pub struct UpdateGlossaryTerm(RequestBuilder<crate::model::UpdateGlossaryTermRequest>);
1219
1220    impl UpdateGlossaryTerm {
1221        pub(crate) fn new(
1222            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1223        ) -> Self {
1224            Self(RequestBuilder::new(stub))
1225        }
1226
1227        /// Sets the full request, replacing any prior values.
1228        pub fn with_request<V: Into<crate::model::UpdateGlossaryTermRequest>>(
1229            mut self,
1230            v: V,
1231        ) -> Self {
1232            self.0.request = v.into();
1233            self
1234        }
1235
1236        /// Sets all the options, replacing any prior values.
1237        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1238            self.0.options = v.into();
1239            self
1240        }
1241
1242        /// Sends the request.
1243        pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1244            (*self.0.stub)
1245                .update_glossary_term(self.0.request, self.0.options)
1246                .await
1247                .map(crate::Response::into_body)
1248        }
1249
1250        /// Sets the value of [term][crate::model::UpdateGlossaryTermRequest::term].
1251        ///
1252        /// This is a **required** field for requests.
1253        pub fn set_term<T>(mut self, v: T) -> Self
1254        where
1255            T: std::convert::Into<crate::model::GlossaryTerm>,
1256        {
1257            self.0.request.term = std::option::Option::Some(v.into());
1258            self
1259        }
1260
1261        /// Sets or clears the value of [term][crate::model::UpdateGlossaryTermRequest::term].
1262        ///
1263        /// This is a **required** field for requests.
1264        pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
1265        where
1266            T: std::convert::Into<crate::model::GlossaryTerm>,
1267        {
1268            self.0.request.term = v.map(|x| x.into());
1269            self
1270        }
1271
1272        /// Sets the value of [update_mask][crate::model::UpdateGlossaryTermRequest::update_mask].
1273        ///
1274        /// This is a **required** field for requests.
1275        pub fn set_update_mask<T>(mut self, v: T) -> Self
1276        where
1277            T: std::convert::Into<wkt::FieldMask>,
1278        {
1279            self.0.request.update_mask = std::option::Option::Some(v.into());
1280            self
1281        }
1282
1283        /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryTermRequest::update_mask].
1284        ///
1285        /// This is a **required** field for requests.
1286        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1287        where
1288            T: std::convert::Into<wkt::FieldMask>,
1289        {
1290            self.0.request.update_mask = v.map(|x| x.into());
1291            self
1292        }
1293    }
1294
1295    #[doc(hidden)]
1296    impl crate::RequestBuilder for UpdateGlossaryTerm {
1297        fn request_options(&mut self) -> &mut crate::RequestOptions {
1298            &mut self.0.options
1299        }
1300    }
1301
1302    /// The request builder for [BusinessGlossaryService::delete_glossary_term][crate::client::BusinessGlossaryService::delete_glossary_term] calls.
1303    ///
1304    /// # Example
1305    /// ```
1306    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteGlossaryTerm;
1307    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1308    ///
1309    /// let builder = prepare_request_builder();
1310    /// let response = builder.send().await?;
1311    /// # Ok(()) }
1312    ///
1313    /// fn prepare_request_builder() -> DeleteGlossaryTerm {
1314    ///   # panic!();
1315    ///   // ... details omitted ...
1316    /// }
1317    /// ```
1318    #[derive(Clone, Debug)]
1319    pub struct DeleteGlossaryTerm(RequestBuilder<crate::model::DeleteGlossaryTermRequest>);
1320
1321    impl DeleteGlossaryTerm {
1322        pub(crate) fn new(
1323            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1324        ) -> Self {
1325            Self(RequestBuilder::new(stub))
1326        }
1327
1328        /// Sets the full request, replacing any prior values.
1329        pub fn with_request<V: Into<crate::model::DeleteGlossaryTermRequest>>(
1330            mut self,
1331            v: V,
1332        ) -> Self {
1333            self.0.request = v.into();
1334            self
1335        }
1336
1337        /// Sets all the options, replacing any prior values.
1338        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1339            self.0.options = v.into();
1340            self
1341        }
1342
1343        /// Sends the request.
1344        pub async fn send(self) -> Result<()> {
1345            (*self.0.stub)
1346                .delete_glossary_term(self.0.request, self.0.options)
1347                .await
1348                .map(crate::Response::into_body)
1349        }
1350
1351        /// Sets the value of [name][crate::model::DeleteGlossaryTermRequest::name].
1352        ///
1353        /// This is a **required** field for requests.
1354        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1355            self.0.request.name = v.into();
1356            self
1357        }
1358    }
1359
1360    #[doc(hidden)]
1361    impl crate::RequestBuilder for DeleteGlossaryTerm {
1362        fn request_options(&mut self) -> &mut crate::RequestOptions {
1363            &mut self.0.options
1364        }
1365    }
1366
1367    /// The request builder for [BusinessGlossaryService::get_glossary_term][crate::client::BusinessGlossaryService::get_glossary_term] calls.
1368    ///
1369    /// # Example
1370    /// ```
1371    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetGlossaryTerm;
1372    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1373    ///
1374    /// let builder = prepare_request_builder();
1375    /// let response = builder.send().await?;
1376    /// # Ok(()) }
1377    ///
1378    /// fn prepare_request_builder() -> GetGlossaryTerm {
1379    ///   # panic!();
1380    ///   // ... details omitted ...
1381    /// }
1382    /// ```
1383    #[derive(Clone, Debug)]
1384    pub struct GetGlossaryTerm(RequestBuilder<crate::model::GetGlossaryTermRequest>);
1385
1386    impl GetGlossaryTerm {
1387        pub(crate) fn new(
1388            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1389        ) -> Self {
1390            Self(RequestBuilder::new(stub))
1391        }
1392
1393        /// Sets the full request, replacing any prior values.
1394        pub fn with_request<V: Into<crate::model::GetGlossaryTermRequest>>(mut self, v: V) -> Self {
1395            self.0.request = v.into();
1396            self
1397        }
1398
1399        /// Sets all the options, replacing any prior values.
1400        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1401            self.0.options = v.into();
1402            self
1403        }
1404
1405        /// Sends the request.
1406        pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1407            (*self.0.stub)
1408                .get_glossary_term(self.0.request, self.0.options)
1409                .await
1410                .map(crate::Response::into_body)
1411        }
1412
1413        /// Sets the value of [name][crate::model::GetGlossaryTermRequest::name].
1414        ///
1415        /// This is a **required** field for requests.
1416        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1417            self.0.request.name = v.into();
1418            self
1419        }
1420    }
1421
1422    #[doc(hidden)]
1423    impl crate::RequestBuilder for GetGlossaryTerm {
1424        fn request_options(&mut self) -> &mut crate::RequestOptions {
1425            &mut self.0.options
1426        }
1427    }
1428
1429    /// The request builder for [BusinessGlossaryService::list_glossary_terms][crate::client::BusinessGlossaryService::list_glossary_terms] calls.
1430    ///
1431    /// # Example
1432    /// ```
1433    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListGlossaryTerms;
1434    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1435    /// use google_cloud_gax::paginator::ItemPaginator;
1436    ///
1437    /// let builder = prepare_request_builder();
1438    /// let mut items = builder.by_item();
1439    /// while let Some(result) = items.next().await {
1440    ///   let item = result?;
1441    /// }
1442    /// # Ok(()) }
1443    ///
1444    /// fn prepare_request_builder() -> ListGlossaryTerms {
1445    ///   # panic!();
1446    ///   // ... details omitted ...
1447    /// }
1448    /// ```
1449    #[derive(Clone, Debug)]
1450    pub struct ListGlossaryTerms(RequestBuilder<crate::model::ListGlossaryTermsRequest>);
1451
1452    impl ListGlossaryTerms {
1453        pub(crate) fn new(
1454            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1455        ) -> Self {
1456            Self(RequestBuilder::new(stub))
1457        }
1458
1459        /// Sets the full request, replacing any prior values.
1460        pub fn with_request<V: Into<crate::model::ListGlossaryTermsRequest>>(
1461            mut self,
1462            v: V,
1463        ) -> Self {
1464            self.0.request = v.into();
1465            self
1466        }
1467
1468        /// Sets all the options, replacing any prior values.
1469        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1470            self.0.options = v.into();
1471            self
1472        }
1473
1474        /// Sends the request.
1475        pub async fn send(self) -> Result<crate::model::ListGlossaryTermsResponse> {
1476            (*self.0.stub)
1477                .list_glossary_terms(self.0.request, self.0.options)
1478                .await
1479                .map(crate::Response::into_body)
1480        }
1481
1482        /// Streams each page in the collection.
1483        pub fn by_page(
1484            self,
1485        ) -> impl google_cloud_gax::paginator::Paginator<
1486            crate::model::ListGlossaryTermsResponse,
1487            crate::Error,
1488        > {
1489            use std::clone::Clone;
1490            let token = self.0.request.page_token.clone();
1491            let execute = move |token: String| {
1492                let mut builder = self.clone();
1493                builder.0.request = builder.0.request.set_page_token(token);
1494                builder.send()
1495            };
1496            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1497        }
1498
1499        /// Streams each item in the collection.
1500        pub fn by_item(
1501            self,
1502        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1503            crate::model::ListGlossaryTermsResponse,
1504            crate::Error,
1505        > {
1506            use google_cloud_gax::paginator::Paginator;
1507            self.by_page().items()
1508        }
1509
1510        /// Sets the value of [parent][crate::model::ListGlossaryTermsRequest::parent].
1511        ///
1512        /// This is a **required** field for requests.
1513        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1514            self.0.request.parent = v.into();
1515            self
1516        }
1517
1518        /// Sets the value of [page_size][crate::model::ListGlossaryTermsRequest::page_size].
1519        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1520            self.0.request.page_size = v.into();
1521            self
1522        }
1523
1524        /// Sets the value of [page_token][crate::model::ListGlossaryTermsRequest::page_token].
1525        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1526            self.0.request.page_token = v.into();
1527            self
1528        }
1529
1530        /// Sets the value of [filter][crate::model::ListGlossaryTermsRequest::filter].
1531        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1532            self.0.request.filter = v.into();
1533            self
1534        }
1535
1536        /// Sets the value of [order_by][crate::model::ListGlossaryTermsRequest::order_by].
1537        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1538            self.0.request.order_by = v.into();
1539            self
1540        }
1541    }
1542
1543    #[doc(hidden)]
1544    impl crate::RequestBuilder for ListGlossaryTerms {
1545        fn request_options(&mut self) -> &mut crate::RequestOptions {
1546            &mut self.0.options
1547        }
1548    }
1549
1550    /// The request builder for [BusinessGlossaryService::list_locations][crate::client::BusinessGlossaryService::list_locations] calls.
1551    ///
1552    /// # Example
1553    /// ```
1554    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListLocations;
1555    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1556    /// use google_cloud_gax::paginator::ItemPaginator;
1557    ///
1558    /// let builder = prepare_request_builder();
1559    /// let mut items = builder.by_item();
1560    /// while let Some(result) = items.next().await {
1561    ///   let item = result?;
1562    /// }
1563    /// # Ok(()) }
1564    ///
1565    /// fn prepare_request_builder() -> ListLocations {
1566    ///   # panic!();
1567    ///   // ... details omitted ...
1568    /// }
1569    /// ```
1570    #[derive(Clone, Debug)]
1571    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
1572
1573    impl ListLocations {
1574        pub(crate) fn new(
1575            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1576        ) -> Self {
1577            Self(RequestBuilder::new(stub))
1578        }
1579
1580        /// Sets the full request, replacing any prior values.
1581        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
1582            mut self,
1583            v: V,
1584        ) -> Self {
1585            self.0.request = v.into();
1586            self
1587        }
1588
1589        /// Sets all the options, replacing any prior values.
1590        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1591            self.0.options = v.into();
1592            self
1593        }
1594
1595        /// Sends the request.
1596        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
1597            (*self.0.stub)
1598                .list_locations(self.0.request, self.0.options)
1599                .await
1600                .map(crate::Response::into_body)
1601        }
1602
1603        /// Streams each page in the collection.
1604        pub fn by_page(
1605            self,
1606        ) -> impl google_cloud_gax::paginator::Paginator<
1607            google_cloud_location::model::ListLocationsResponse,
1608            crate::Error,
1609        > {
1610            use std::clone::Clone;
1611            let token = self.0.request.page_token.clone();
1612            let execute = move |token: String| {
1613                let mut builder = self.clone();
1614                builder.0.request = builder.0.request.set_page_token(token);
1615                builder.send()
1616            };
1617            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1618        }
1619
1620        /// Streams each item in the collection.
1621        pub fn by_item(
1622            self,
1623        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1624            google_cloud_location::model::ListLocationsResponse,
1625            crate::Error,
1626        > {
1627            use google_cloud_gax::paginator::Paginator;
1628            self.by_page().items()
1629        }
1630
1631        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
1632        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1633            self.0.request.name = v.into();
1634            self
1635        }
1636
1637        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
1638        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1639            self.0.request.filter = v.into();
1640            self
1641        }
1642
1643        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
1644        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1645            self.0.request.page_size = v.into();
1646            self
1647        }
1648
1649        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
1650        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1651            self.0.request.page_token = v.into();
1652            self
1653        }
1654    }
1655
1656    #[doc(hidden)]
1657    impl crate::RequestBuilder for ListLocations {
1658        fn request_options(&mut self) -> &mut crate::RequestOptions {
1659            &mut self.0.options
1660        }
1661    }
1662
1663    /// The request builder for [BusinessGlossaryService::get_location][crate::client::BusinessGlossaryService::get_location] calls.
1664    ///
1665    /// # Example
1666    /// ```
1667    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetLocation;
1668    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1669    ///
1670    /// let builder = prepare_request_builder();
1671    /// let response = builder.send().await?;
1672    /// # Ok(()) }
1673    ///
1674    /// fn prepare_request_builder() -> GetLocation {
1675    ///   # panic!();
1676    ///   // ... details omitted ...
1677    /// }
1678    /// ```
1679    #[derive(Clone, Debug)]
1680    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
1681
1682    impl GetLocation {
1683        pub(crate) fn new(
1684            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1685        ) -> Self {
1686            Self(RequestBuilder::new(stub))
1687        }
1688
1689        /// Sets the full request, replacing any prior values.
1690        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
1691            mut self,
1692            v: V,
1693        ) -> Self {
1694            self.0.request = v.into();
1695            self
1696        }
1697
1698        /// Sets all the options, replacing any prior values.
1699        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1700            self.0.options = v.into();
1701            self
1702        }
1703
1704        /// Sends the request.
1705        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
1706            (*self.0.stub)
1707                .get_location(self.0.request, self.0.options)
1708                .await
1709                .map(crate::Response::into_body)
1710        }
1711
1712        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
1713        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1714            self.0.request.name = v.into();
1715            self
1716        }
1717    }
1718
1719    #[doc(hidden)]
1720    impl crate::RequestBuilder for GetLocation {
1721        fn request_options(&mut self) -> &mut crate::RequestOptions {
1722            &mut self.0.options
1723        }
1724    }
1725
1726    /// The request builder for [BusinessGlossaryService::set_iam_policy][crate::client::BusinessGlossaryService::set_iam_policy] calls.
1727    ///
1728    /// # Example
1729    /// ```
1730    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::SetIamPolicy;
1731    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1732    ///
1733    /// let builder = prepare_request_builder();
1734    /// let response = builder.send().await?;
1735    /// # Ok(()) }
1736    ///
1737    /// fn prepare_request_builder() -> SetIamPolicy {
1738    ///   # panic!();
1739    ///   // ... details omitted ...
1740    /// }
1741    /// ```
1742    #[derive(Clone, Debug)]
1743    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
1744
1745    impl SetIamPolicy {
1746        pub(crate) fn new(
1747            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1748        ) -> Self {
1749            Self(RequestBuilder::new(stub))
1750        }
1751
1752        /// Sets the full request, replacing any prior values.
1753        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
1754            mut self,
1755            v: V,
1756        ) -> Self {
1757            self.0.request = v.into();
1758            self
1759        }
1760
1761        /// Sets all the options, replacing any prior values.
1762        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1763            self.0.options = v.into();
1764            self
1765        }
1766
1767        /// Sends the request.
1768        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
1769            (*self.0.stub)
1770                .set_iam_policy(self.0.request, self.0.options)
1771                .await
1772                .map(crate::Response::into_body)
1773        }
1774
1775        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
1776        ///
1777        /// This is a **required** field for requests.
1778        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1779            self.0.request.resource = v.into();
1780            self
1781        }
1782
1783        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
1784        ///
1785        /// This is a **required** field for requests.
1786        pub fn set_policy<T>(mut self, v: T) -> Self
1787        where
1788            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
1789        {
1790            self.0.request.policy = std::option::Option::Some(v.into());
1791            self
1792        }
1793
1794        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
1795        ///
1796        /// This is a **required** field for requests.
1797        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
1798        where
1799            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
1800        {
1801            self.0.request.policy = v.map(|x| x.into());
1802            self
1803        }
1804
1805        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
1806        pub fn set_update_mask<T>(mut self, v: T) -> Self
1807        where
1808            T: std::convert::Into<wkt::FieldMask>,
1809        {
1810            self.0.request.update_mask = std::option::Option::Some(v.into());
1811            self
1812        }
1813
1814        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
1815        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1816        where
1817            T: std::convert::Into<wkt::FieldMask>,
1818        {
1819            self.0.request.update_mask = v.map(|x| x.into());
1820            self
1821        }
1822    }
1823
1824    #[doc(hidden)]
1825    impl crate::RequestBuilder for SetIamPolicy {
1826        fn request_options(&mut self) -> &mut crate::RequestOptions {
1827            &mut self.0.options
1828        }
1829    }
1830
1831    /// The request builder for [BusinessGlossaryService::get_iam_policy][crate::client::BusinessGlossaryService::get_iam_policy] calls.
1832    ///
1833    /// # Example
1834    /// ```
1835    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetIamPolicy;
1836    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1837    ///
1838    /// let builder = prepare_request_builder();
1839    /// let response = builder.send().await?;
1840    /// # Ok(()) }
1841    ///
1842    /// fn prepare_request_builder() -> GetIamPolicy {
1843    ///   # panic!();
1844    ///   // ... details omitted ...
1845    /// }
1846    /// ```
1847    #[derive(Clone, Debug)]
1848    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
1849
1850    impl GetIamPolicy {
1851        pub(crate) fn new(
1852            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1853        ) -> Self {
1854            Self(RequestBuilder::new(stub))
1855        }
1856
1857        /// Sets the full request, replacing any prior values.
1858        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
1859            mut self,
1860            v: V,
1861        ) -> Self {
1862            self.0.request = v.into();
1863            self
1864        }
1865
1866        /// Sets all the options, replacing any prior values.
1867        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1868            self.0.options = v.into();
1869            self
1870        }
1871
1872        /// Sends the request.
1873        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
1874            (*self.0.stub)
1875                .get_iam_policy(self.0.request, self.0.options)
1876                .await
1877                .map(crate::Response::into_body)
1878        }
1879
1880        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
1881        ///
1882        /// This is a **required** field for requests.
1883        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1884            self.0.request.resource = v.into();
1885            self
1886        }
1887
1888        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
1889        pub fn set_options<T>(mut self, v: T) -> Self
1890        where
1891            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
1892        {
1893            self.0.request.options = std::option::Option::Some(v.into());
1894            self
1895        }
1896
1897        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
1898        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
1899        where
1900            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
1901        {
1902            self.0.request.options = v.map(|x| x.into());
1903            self
1904        }
1905    }
1906
1907    #[doc(hidden)]
1908    impl crate::RequestBuilder for GetIamPolicy {
1909        fn request_options(&mut self) -> &mut crate::RequestOptions {
1910            &mut self.0.options
1911        }
1912    }
1913
1914    /// The request builder for [BusinessGlossaryService::test_iam_permissions][crate::client::BusinessGlossaryService::test_iam_permissions] calls.
1915    ///
1916    /// # Example
1917    /// ```
1918    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::TestIamPermissions;
1919    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1920    ///
1921    /// let builder = prepare_request_builder();
1922    /// let response = builder.send().await?;
1923    /// # Ok(()) }
1924    ///
1925    /// fn prepare_request_builder() -> TestIamPermissions {
1926    ///   # panic!();
1927    ///   // ... details omitted ...
1928    /// }
1929    /// ```
1930    #[derive(Clone, Debug)]
1931    pub struct TestIamPermissions(
1932        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
1933    );
1934
1935    impl TestIamPermissions {
1936        pub(crate) fn new(
1937            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1938        ) -> Self {
1939            Self(RequestBuilder::new(stub))
1940        }
1941
1942        /// Sets the full request, replacing any prior values.
1943        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
1944            mut self,
1945            v: V,
1946        ) -> Self {
1947            self.0.request = v.into();
1948            self
1949        }
1950
1951        /// Sets all the options, replacing any prior values.
1952        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1953            self.0.options = v.into();
1954            self
1955        }
1956
1957        /// Sends the request.
1958        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
1959            (*self.0.stub)
1960                .test_iam_permissions(self.0.request, self.0.options)
1961                .await
1962                .map(crate::Response::into_body)
1963        }
1964
1965        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
1966        ///
1967        /// This is a **required** field for requests.
1968        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1969            self.0.request.resource = v.into();
1970            self
1971        }
1972
1973        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
1974        ///
1975        /// This is a **required** field for requests.
1976        pub fn set_permissions<T, V>(mut self, v: T) -> Self
1977        where
1978            T: std::iter::IntoIterator<Item = V>,
1979            V: std::convert::Into<std::string::String>,
1980        {
1981            use std::iter::Iterator;
1982            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
1983            self
1984        }
1985    }
1986
1987    #[doc(hidden)]
1988    impl crate::RequestBuilder for TestIamPermissions {
1989        fn request_options(&mut self) -> &mut crate::RequestOptions {
1990            &mut self.0.options
1991        }
1992    }
1993
1994    /// The request builder for [BusinessGlossaryService::list_operations][crate::client::BusinessGlossaryService::list_operations] calls.
1995    ///
1996    /// # Example
1997    /// ```
1998    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListOperations;
1999    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2000    /// use google_cloud_gax::paginator::ItemPaginator;
2001    ///
2002    /// let builder = prepare_request_builder();
2003    /// let mut items = builder.by_item();
2004    /// while let Some(result) = items.next().await {
2005    ///   let item = result?;
2006    /// }
2007    /// # Ok(()) }
2008    ///
2009    /// fn prepare_request_builder() -> ListOperations {
2010    ///   # panic!();
2011    ///   // ... details omitted ...
2012    /// }
2013    /// ```
2014    #[derive(Clone, Debug)]
2015    pub struct ListOperations(
2016        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
2017    );
2018
2019    impl ListOperations {
2020        pub(crate) fn new(
2021            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2022        ) -> Self {
2023            Self(RequestBuilder::new(stub))
2024        }
2025
2026        /// Sets the full request, replacing any prior values.
2027        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
2028            mut self,
2029            v: V,
2030        ) -> Self {
2031            self.0.request = v.into();
2032            self
2033        }
2034
2035        /// Sets all the options, replacing any prior values.
2036        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2037            self.0.options = v.into();
2038            self
2039        }
2040
2041        /// Sends the request.
2042        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
2043            (*self.0.stub)
2044                .list_operations(self.0.request, self.0.options)
2045                .await
2046                .map(crate::Response::into_body)
2047        }
2048
2049        /// Streams each page in the collection.
2050        pub fn by_page(
2051            self,
2052        ) -> impl google_cloud_gax::paginator::Paginator<
2053            google_cloud_longrunning::model::ListOperationsResponse,
2054            crate::Error,
2055        > {
2056            use std::clone::Clone;
2057            let token = self.0.request.page_token.clone();
2058            let execute = move |token: String| {
2059                let mut builder = self.clone();
2060                builder.0.request = builder.0.request.set_page_token(token);
2061                builder.send()
2062            };
2063            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2064        }
2065
2066        /// Streams each item in the collection.
2067        pub fn by_item(
2068            self,
2069        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2070            google_cloud_longrunning::model::ListOperationsResponse,
2071            crate::Error,
2072        > {
2073            use google_cloud_gax::paginator::Paginator;
2074            self.by_page().items()
2075        }
2076
2077        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
2078        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2079            self.0.request.name = v.into();
2080            self
2081        }
2082
2083        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
2084        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2085            self.0.request.filter = v.into();
2086            self
2087        }
2088
2089        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
2090        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2091            self.0.request.page_size = v.into();
2092            self
2093        }
2094
2095        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
2096        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2097            self.0.request.page_token = v.into();
2098            self
2099        }
2100
2101        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
2102        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
2103            self.0.request.return_partial_success = v.into();
2104            self
2105        }
2106    }
2107
2108    #[doc(hidden)]
2109    impl crate::RequestBuilder for ListOperations {
2110        fn request_options(&mut self) -> &mut crate::RequestOptions {
2111            &mut self.0.options
2112        }
2113    }
2114
2115    /// The request builder for [BusinessGlossaryService::get_operation][crate::client::BusinessGlossaryService::get_operation] calls.
2116    ///
2117    /// # Example
2118    /// ```
2119    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetOperation;
2120    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2121    ///
2122    /// let builder = prepare_request_builder();
2123    /// let response = builder.send().await?;
2124    /// # Ok(()) }
2125    ///
2126    /// fn prepare_request_builder() -> GetOperation {
2127    ///   # panic!();
2128    ///   // ... details omitted ...
2129    /// }
2130    /// ```
2131    #[derive(Clone, Debug)]
2132    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
2133
2134    impl GetOperation {
2135        pub(crate) fn new(
2136            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2137        ) -> Self {
2138            Self(RequestBuilder::new(stub))
2139        }
2140
2141        /// Sets the full request, replacing any prior values.
2142        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
2143            mut self,
2144            v: V,
2145        ) -> Self {
2146            self.0.request = v.into();
2147            self
2148        }
2149
2150        /// Sets all the options, replacing any prior values.
2151        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2152            self.0.options = v.into();
2153            self
2154        }
2155
2156        /// Sends the request.
2157        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2158            (*self.0.stub)
2159                .get_operation(self.0.request, self.0.options)
2160                .await
2161                .map(crate::Response::into_body)
2162        }
2163
2164        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
2165        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2166            self.0.request.name = v.into();
2167            self
2168        }
2169    }
2170
2171    #[doc(hidden)]
2172    impl crate::RequestBuilder for GetOperation {
2173        fn request_options(&mut self) -> &mut crate::RequestOptions {
2174            &mut self.0.options
2175        }
2176    }
2177
2178    /// The request builder for [BusinessGlossaryService::delete_operation][crate::client::BusinessGlossaryService::delete_operation] calls.
2179    ///
2180    /// # Example
2181    /// ```
2182    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteOperation;
2183    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2184    ///
2185    /// let builder = prepare_request_builder();
2186    /// let response = builder.send().await?;
2187    /// # Ok(()) }
2188    ///
2189    /// fn prepare_request_builder() -> DeleteOperation {
2190    ///   # panic!();
2191    ///   // ... details omitted ...
2192    /// }
2193    /// ```
2194    #[derive(Clone, Debug)]
2195    pub struct DeleteOperation(
2196        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
2197    );
2198
2199    impl DeleteOperation {
2200        pub(crate) fn new(
2201            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2202        ) -> Self {
2203            Self(RequestBuilder::new(stub))
2204        }
2205
2206        /// Sets the full request, replacing any prior values.
2207        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
2208            mut self,
2209            v: V,
2210        ) -> Self {
2211            self.0.request = v.into();
2212            self
2213        }
2214
2215        /// Sets all the options, replacing any prior values.
2216        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2217            self.0.options = v.into();
2218            self
2219        }
2220
2221        /// Sends the request.
2222        pub async fn send(self) -> Result<()> {
2223            (*self.0.stub)
2224                .delete_operation(self.0.request, self.0.options)
2225                .await
2226                .map(crate::Response::into_body)
2227        }
2228
2229        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
2230        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2231            self.0.request.name = v.into();
2232            self
2233        }
2234    }
2235
2236    #[doc(hidden)]
2237    impl crate::RequestBuilder for DeleteOperation {
2238        fn request_options(&mut self) -> &mut crate::RequestOptions {
2239            &mut self.0.options
2240        }
2241    }
2242
2243    /// The request builder for [BusinessGlossaryService::cancel_operation][crate::client::BusinessGlossaryService::cancel_operation] calls.
2244    ///
2245    /// # Example
2246    /// ```
2247    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CancelOperation;
2248    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2249    ///
2250    /// let builder = prepare_request_builder();
2251    /// let response = builder.send().await?;
2252    /// # Ok(()) }
2253    ///
2254    /// fn prepare_request_builder() -> CancelOperation {
2255    ///   # panic!();
2256    ///   // ... details omitted ...
2257    /// }
2258    /// ```
2259    #[derive(Clone, Debug)]
2260    pub struct CancelOperation(
2261        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
2262    );
2263
2264    impl CancelOperation {
2265        pub(crate) fn new(
2266            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2267        ) -> Self {
2268            Self(RequestBuilder::new(stub))
2269        }
2270
2271        /// Sets the full request, replacing any prior values.
2272        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
2273            mut self,
2274            v: V,
2275        ) -> Self {
2276            self.0.request = v.into();
2277            self
2278        }
2279
2280        /// Sets all the options, replacing any prior values.
2281        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2282            self.0.options = v.into();
2283            self
2284        }
2285
2286        /// Sends the request.
2287        pub async fn send(self) -> Result<()> {
2288            (*self.0.stub)
2289                .cancel_operation(self.0.request, self.0.options)
2290                .await
2291                .map(crate::Response::into_body)
2292        }
2293
2294        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
2295        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2296            self.0.request.name = v.into();
2297            self
2298        }
2299    }
2300
2301    #[doc(hidden)]
2302    impl crate::RequestBuilder for CancelOperation {
2303        fn request_options(&mut self) -> &mut crate::RequestOptions {
2304            &mut self.0.options
2305        }
2306    }
2307}
2308
2309pub mod catalog_service {
2310    use crate::Result;
2311
2312    /// A builder for [CatalogService][crate::client::CatalogService].
2313    ///
2314    /// ```
2315    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
2316    /// # use google_cloud_dataplex_v1::*;
2317    /// # use builder::catalog_service::ClientBuilder;
2318    /// # use client::CatalogService;
2319    /// let builder : ClientBuilder = CatalogService::builder();
2320    /// let client = builder
2321    ///     .with_endpoint("https://dataplex.googleapis.com")
2322    ///     .build().await?;
2323    /// # Ok(()) }
2324    /// ```
2325    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
2326
2327    pub(crate) mod client {
2328        use super::super::super::client::CatalogService;
2329        pub struct Factory;
2330        impl crate::ClientFactory for Factory {
2331            type Client = CatalogService;
2332            type Credentials = gaxi::options::Credentials;
2333            async fn build(
2334                self,
2335                config: gaxi::options::ClientConfig,
2336            ) -> crate::ClientBuilderResult<Self::Client> {
2337                Self::Client::new(config).await
2338            }
2339        }
2340    }
2341
2342    /// Common implementation for [crate::client::CatalogService] request builders.
2343    #[derive(Clone, Debug)]
2344    pub(crate) struct RequestBuilder<R: std::default::Default> {
2345        stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2346        request: R,
2347        options: crate::RequestOptions,
2348    }
2349
2350    impl<R> RequestBuilder<R>
2351    where
2352        R: std::default::Default,
2353    {
2354        pub(crate) fn new(
2355            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2356        ) -> Self {
2357            Self {
2358                stub,
2359                request: R::default(),
2360                options: crate::RequestOptions::default(),
2361            }
2362        }
2363    }
2364
2365    /// The request builder for [CatalogService::create_entry_type][crate::client::CatalogService::create_entry_type] calls.
2366    ///
2367    /// # Example
2368    /// ```
2369    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntryType;
2370    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2371    /// use google_cloud_lro::Poller;
2372    ///
2373    /// let builder = prepare_request_builder();
2374    /// let response = builder.poller().until_done().await?;
2375    /// # Ok(()) }
2376    ///
2377    /// fn prepare_request_builder() -> CreateEntryType {
2378    ///   # panic!();
2379    ///   // ... details omitted ...
2380    /// }
2381    /// ```
2382    #[derive(Clone, Debug)]
2383    pub struct CreateEntryType(RequestBuilder<crate::model::CreateEntryTypeRequest>);
2384
2385    impl CreateEntryType {
2386        pub(crate) fn new(
2387            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2388        ) -> Self {
2389            Self(RequestBuilder::new(stub))
2390        }
2391
2392        /// Sets the full request, replacing any prior values.
2393        pub fn with_request<V: Into<crate::model::CreateEntryTypeRequest>>(mut self, v: V) -> Self {
2394            self.0.request = v.into();
2395            self
2396        }
2397
2398        /// Sets all the options, replacing any prior values.
2399        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2400            self.0.options = v.into();
2401            self
2402        }
2403
2404        /// Sends the request.
2405        ///
2406        /// # Long running operations
2407        ///
2408        /// This starts, but does not poll, a longrunning operation. More information
2409        /// on [create_entry_type][crate::client::CatalogService::create_entry_type].
2410        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2411            (*self.0.stub)
2412                .create_entry_type(self.0.request, self.0.options)
2413                .await
2414                .map(crate::Response::into_body)
2415        }
2416
2417        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_entry_type`.
2418        pub fn poller(
2419            self,
2420        ) -> impl google_cloud_lro::Poller<crate::model::EntryType, crate::model::OperationMetadata>
2421        {
2422            type Operation = google_cloud_lro::internal::Operation<
2423                crate::model::EntryType,
2424                crate::model::OperationMetadata,
2425            >;
2426            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2427            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2428
2429            let stub = self.0.stub.clone();
2430            let mut options = self.0.options.clone();
2431            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2432            let query = move |name| {
2433                let stub = stub.clone();
2434                let options = options.clone();
2435                async {
2436                    let op = GetOperation::new(stub)
2437                        .set_name(name)
2438                        .with_options(options)
2439                        .send()
2440                        .await?;
2441                    Ok(Operation::new(op))
2442                }
2443            };
2444
2445            let start = move || async {
2446                let op = self.send().await?;
2447                Ok(Operation::new(op))
2448            };
2449
2450            google_cloud_lro::internal::new_poller(
2451                polling_error_policy,
2452                polling_backoff_policy,
2453                start,
2454                query,
2455            )
2456        }
2457
2458        /// Sets the value of [parent][crate::model::CreateEntryTypeRequest::parent].
2459        ///
2460        /// This is a **required** field for requests.
2461        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2462            self.0.request.parent = v.into();
2463            self
2464        }
2465
2466        /// Sets the value of [entry_type_id][crate::model::CreateEntryTypeRequest::entry_type_id].
2467        ///
2468        /// This is a **required** field for requests.
2469        pub fn set_entry_type_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2470            self.0.request.entry_type_id = v.into();
2471            self
2472        }
2473
2474        /// Sets the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
2475        ///
2476        /// This is a **required** field for requests.
2477        pub fn set_entry_type<T>(mut self, v: T) -> Self
2478        where
2479            T: std::convert::Into<crate::model::EntryType>,
2480        {
2481            self.0.request.entry_type = std::option::Option::Some(v.into());
2482            self
2483        }
2484
2485        /// Sets or clears the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
2486        ///
2487        /// This is a **required** field for requests.
2488        pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
2489        where
2490            T: std::convert::Into<crate::model::EntryType>,
2491        {
2492            self.0.request.entry_type = v.map(|x| x.into());
2493            self
2494        }
2495
2496        /// Sets the value of [validate_only][crate::model::CreateEntryTypeRequest::validate_only].
2497        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2498            self.0.request.validate_only = v.into();
2499            self
2500        }
2501    }
2502
2503    #[doc(hidden)]
2504    impl crate::RequestBuilder for CreateEntryType {
2505        fn request_options(&mut self) -> &mut crate::RequestOptions {
2506            &mut self.0.options
2507        }
2508    }
2509
2510    /// The request builder for [CatalogService::update_entry_type][crate::client::CatalogService::update_entry_type] calls.
2511    ///
2512    /// # Example
2513    /// ```
2514    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntryType;
2515    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2516    /// use google_cloud_lro::Poller;
2517    ///
2518    /// let builder = prepare_request_builder();
2519    /// let response = builder.poller().until_done().await?;
2520    /// # Ok(()) }
2521    ///
2522    /// fn prepare_request_builder() -> UpdateEntryType {
2523    ///   # panic!();
2524    ///   // ... details omitted ...
2525    /// }
2526    /// ```
2527    #[derive(Clone, Debug)]
2528    pub struct UpdateEntryType(RequestBuilder<crate::model::UpdateEntryTypeRequest>);
2529
2530    impl UpdateEntryType {
2531        pub(crate) fn new(
2532            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2533        ) -> Self {
2534            Self(RequestBuilder::new(stub))
2535        }
2536
2537        /// Sets the full request, replacing any prior values.
2538        pub fn with_request<V: Into<crate::model::UpdateEntryTypeRequest>>(mut self, v: V) -> Self {
2539            self.0.request = v.into();
2540            self
2541        }
2542
2543        /// Sets all the options, replacing any prior values.
2544        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2545            self.0.options = v.into();
2546            self
2547        }
2548
2549        /// Sends the request.
2550        ///
2551        /// # Long running operations
2552        ///
2553        /// This starts, but does not poll, a longrunning operation. More information
2554        /// on [update_entry_type][crate::client::CatalogService::update_entry_type].
2555        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2556            (*self.0.stub)
2557                .update_entry_type(self.0.request, self.0.options)
2558                .await
2559                .map(crate::Response::into_body)
2560        }
2561
2562        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_entry_type`.
2563        pub fn poller(
2564            self,
2565        ) -> impl google_cloud_lro::Poller<crate::model::EntryType, crate::model::OperationMetadata>
2566        {
2567            type Operation = google_cloud_lro::internal::Operation<
2568                crate::model::EntryType,
2569                crate::model::OperationMetadata,
2570            >;
2571            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2572            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2573
2574            let stub = self.0.stub.clone();
2575            let mut options = self.0.options.clone();
2576            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2577            let query = move |name| {
2578                let stub = stub.clone();
2579                let options = options.clone();
2580                async {
2581                    let op = GetOperation::new(stub)
2582                        .set_name(name)
2583                        .with_options(options)
2584                        .send()
2585                        .await?;
2586                    Ok(Operation::new(op))
2587                }
2588            };
2589
2590            let start = move || async {
2591                let op = self.send().await?;
2592                Ok(Operation::new(op))
2593            };
2594
2595            google_cloud_lro::internal::new_poller(
2596                polling_error_policy,
2597                polling_backoff_policy,
2598                start,
2599                query,
2600            )
2601        }
2602
2603        /// Sets the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
2604        ///
2605        /// This is a **required** field for requests.
2606        pub fn set_entry_type<T>(mut self, v: T) -> Self
2607        where
2608            T: std::convert::Into<crate::model::EntryType>,
2609        {
2610            self.0.request.entry_type = std::option::Option::Some(v.into());
2611            self
2612        }
2613
2614        /// Sets or clears the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
2615        ///
2616        /// This is a **required** field for requests.
2617        pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
2618        where
2619            T: std::convert::Into<crate::model::EntryType>,
2620        {
2621            self.0.request.entry_type = v.map(|x| x.into());
2622            self
2623        }
2624
2625        /// Sets the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
2626        ///
2627        /// This is a **required** field for requests.
2628        pub fn set_update_mask<T>(mut self, v: T) -> Self
2629        where
2630            T: std::convert::Into<wkt::FieldMask>,
2631        {
2632            self.0.request.update_mask = std::option::Option::Some(v.into());
2633            self
2634        }
2635
2636        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
2637        ///
2638        /// This is a **required** field for requests.
2639        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2640        where
2641            T: std::convert::Into<wkt::FieldMask>,
2642        {
2643            self.0.request.update_mask = v.map(|x| x.into());
2644            self
2645        }
2646
2647        /// Sets the value of [validate_only][crate::model::UpdateEntryTypeRequest::validate_only].
2648        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2649            self.0.request.validate_only = v.into();
2650            self
2651        }
2652    }
2653
2654    #[doc(hidden)]
2655    impl crate::RequestBuilder for UpdateEntryType {
2656        fn request_options(&mut self) -> &mut crate::RequestOptions {
2657            &mut self.0.options
2658        }
2659    }
2660
2661    /// The request builder for [CatalogService::delete_entry_type][crate::client::CatalogService::delete_entry_type] calls.
2662    ///
2663    /// # Example
2664    /// ```
2665    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntryType;
2666    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2667    /// use google_cloud_lro::Poller;
2668    ///
2669    /// let builder = prepare_request_builder();
2670    /// let response = builder.poller().until_done().await?;
2671    /// # Ok(()) }
2672    ///
2673    /// fn prepare_request_builder() -> DeleteEntryType {
2674    ///   # panic!();
2675    ///   // ... details omitted ...
2676    /// }
2677    /// ```
2678    #[derive(Clone, Debug)]
2679    pub struct DeleteEntryType(RequestBuilder<crate::model::DeleteEntryTypeRequest>);
2680
2681    impl DeleteEntryType {
2682        pub(crate) fn new(
2683            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2684        ) -> Self {
2685            Self(RequestBuilder::new(stub))
2686        }
2687
2688        /// Sets the full request, replacing any prior values.
2689        pub fn with_request<V: Into<crate::model::DeleteEntryTypeRequest>>(mut self, v: V) -> Self {
2690            self.0.request = v.into();
2691            self
2692        }
2693
2694        /// Sets all the options, replacing any prior values.
2695        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2696            self.0.options = v.into();
2697            self
2698        }
2699
2700        /// Sends the request.
2701        ///
2702        /// # Long running operations
2703        ///
2704        /// This starts, but does not poll, a longrunning operation. More information
2705        /// on [delete_entry_type][crate::client::CatalogService::delete_entry_type].
2706        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2707            (*self.0.stub)
2708                .delete_entry_type(self.0.request, self.0.options)
2709                .await
2710                .map(crate::Response::into_body)
2711        }
2712
2713        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_entry_type`.
2714        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2715            type Operation =
2716                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2717            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2718            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2719
2720            let stub = self.0.stub.clone();
2721            let mut options = self.0.options.clone();
2722            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2723            let query = move |name| {
2724                let stub = stub.clone();
2725                let options = options.clone();
2726                async {
2727                    let op = GetOperation::new(stub)
2728                        .set_name(name)
2729                        .with_options(options)
2730                        .send()
2731                        .await?;
2732                    Ok(Operation::new(op))
2733                }
2734            };
2735
2736            let start = move || async {
2737                let op = self.send().await?;
2738                Ok(Operation::new(op))
2739            };
2740
2741            google_cloud_lro::internal::new_unit_response_poller(
2742                polling_error_policy,
2743                polling_backoff_policy,
2744                start,
2745                query,
2746            )
2747        }
2748
2749        /// Sets the value of [name][crate::model::DeleteEntryTypeRequest::name].
2750        ///
2751        /// This is a **required** field for requests.
2752        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2753            self.0.request.name = v.into();
2754            self
2755        }
2756
2757        /// Sets the value of [etag][crate::model::DeleteEntryTypeRequest::etag].
2758        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
2759            self.0.request.etag = v.into();
2760            self
2761        }
2762    }
2763
2764    #[doc(hidden)]
2765    impl crate::RequestBuilder for DeleteEntryType {
2766        fn request_options(&mut self) -> &mut crate::RequestOptions {
2767            &mut self.0.options
2768        }
2769    }
2770
2771    /// The request builder for [CatalogService::list_entry_types][crate::client::CatalogService::list_entry_types] calls.
2772    ///
2773    /// # Example
2774    /// ```
2775    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListEntryTypes;
2776    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2777    /// use google_cloud_gax::paginator::ItemPaginator;
2778    ///
2779    /// let builder = prepare_request_builder();
2780    /// let mut items = builder.by_item();
2781    /// while let Some(result) = items.next().await {
2782    ///   let item = result?;
2783    /// }
2784    /// # Ok(()) }
2785    ///
2786    /// fn prepare_request_builder() -> ListEntryTypes {
2787    ///   # panic!();
2788    ///   // ... details omitted ...
2789    /// }
2790    /// ```
2791    #[derive(Clone, Debug)]
2792    pub struct ListEntryTypes(RequestBuilder<crate::model::ListEntryTypesRequest>);
2793
2794    impl ListEntryTypes {
2795        pub(crate) fn new(
2796            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2797        ) -> Self {
2798            Self(RequestBuilder::new(stub))
2799        }
2800
2801        /// Sets the full request, replacing any prior values.
2802        pub fn with_request<V: Into<crate::model::ListEntryTypesRequest>>(mut self, v: V) -> Self {
2803            self.0.request = v.into();
2804            self
2805        }
2806
2807        /// Sets all the options, replacing any prior values.
2808        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2809            self.0.options = v.into();
2810            self
2811        }
2812
2813        /// Sends the request.
2814        pub async fn send(self) -> Result<crate::model::ListEntryTypesResponse> {
2815            (*self.0.stub)
2816                .list_entry_types(self.0.request, self.0.options)
2817                .await
2818                .map(crate::Response::into_body)
2819        }
2820
2821        /// Streams each page in the collection.
2822        pub fn by_page(
2823            self,
2824        ) -> impl google_cloud_gax::paginator::Paginator<
2825            crate::model::ListEntryTypesResponse,
2826            crate::Error,
2827        > {
2828            use std::clone::Clone;
2829            let token = self.0.request.page_token.clone();
2830            let execute = move |token: String| {
2831                let mut builder = self.clone();
2832                builder.0.request = builder.0.request.set_page_token(token);
2833                builder.send()
2834            };
2835            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2836        }
2837
2838        /// Streams each item in the collection.
2839        pub fn by_item(
2840            self,
2841        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2842            crate::model::ListEntryTypesResponse,
2843            crate::Error,
2844        > {
2845            use google_cloud_gax::paginator::Paginator;
2846            self.by_page().items()
2847        }
2848
2849        /// Sets the value of [parent][crate::model::ListEntryTypesRequest::parent].
2850        ///
2851        /// This is a **required** field for requests.
2852        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2853            self.0.request.parent = v.into();
2854            self
2855        }
2856
2857        /// Sets the value of [page_size][crate::model::ListEntryTypesRequest::page_size].
2858        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2859            self.0.request.page_size = v.into();
2860            self
2861        }
2862
2863        /// Sets the value of [page_token][crate::model::ListEntryTypesRequest::page_token].
2864        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2865            self.0.request.page_token = v.into();
2866            self
2867        }
2868
2869        /// Sets the value of [filter][crate::model::ListEntryTypesRequest::filter].
2870        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2871            self.0.request.filter = v.into();
2872            self
2873        }
2874
2875        /// Sets the value of [order_by][crate::model::ListEntryTypesRequest::order_by].
2876        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2877            self.0.request.order_by = v.into();
2878            self
2879        }
2880    }
2881
2882    #[doc(hidden)]
2883    impl crate::RequestBuilder for ListEntryTypes {
2884        fn request_options(&mut self) -> &mut crate::RequestOptions {
2885            &mut self.0.options
2886        }
2887    }
2888
2889    /// The request builder for [CatalogService::get_entry_type][crate::client::CatalogService::get_entry_type] calls.
2890    ///
2891    /// # Example
2892    /// ```
2893    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntryType;
2894    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2895    ///
2896    /// let builder = prepare_request_builder();
2897    /// let response = builder.send().await?;
2898    /// # Ok(()) }
2899    ///
2900    /// fn prepare_request_builder() -> GetEntryType {
2901    ///   # panic!();
2902    ///   // ... details omitted ...
2903    /// }
2904    /// ```
2905    #[derive(Clone, Debug)]
2906    pub struct GetEntryType(RequestBuilder<crate::model::GetEntryTypeRequest>);
2907
2908    impl GetEntryType {
2909        pub(crate) fn new(
2910            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2911        ) -> Self {
2912            Self(RequestBuilder::new(stub))
2913        }
2914
2915        /// Sets the full request, replacing any prior values.
2916        pub fn with_request<V: Into<crate::model::GetEntryTypeRequest>>(mut self, v: V) -> Self {
2917            self.0.request = v.into();
2918            self
2919        }
2920
2921        /// Sets all the options, replacing any prior values.
2922        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2923            self.0.options = v.into();
2924            self
2925        }
2926
2927        /// Sends the request.
2928        pub async fn send(self) -> Result<crate::model::EntryType> {
2929            (*self.0.stub)
2930                .get_entry_type(self.0.request, self.0.options)
2931                .await
2932                .map(crate::Response::into_body)
2933        }
2934
2935        /// Sets the value of [name][crate::model::GetEntryTypeRequest::name].
2936        ///
2937        /// This is a **required** field for requests.
2938        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2939            self.0.request.name = v.into();
2940            self
2941        }
2942    }
2943
2944    #[doc(hidden)]
2945    impl crate::RequestBuilder for GetEntryType {
2946        fn request_options(&mut self) -> &mut crate::RequestOptions {
2947            &mut self.0.options
2948        }
2949    }
2950
2951    /// The request builder for [CatalogService::create_aspect_type][crate::client::CatalogService::create_aspect_type] calls.
2952    ///
2953    /// # Example
2954    /// ```
2955    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateAspectType;
2956    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2957    /// use google_cloud_lro::Poller;
2958    ///
2959    /// let builder = prepare_request_builder();
2960    /// let response = builder.poller().until_done().await?;
2961    /// # Ok(()) }
2962    ///
2963    /// fn prepare_request_builder() -> CreateAspectType {
2964    ///   # panic!();
2965    ///   // ... details omitted ...
2966    /// }
2967    /// ```
2968    #[derive(Clone, Debug)]
2969    pub struct CreateAspectType(RequestBuilder<crate::model::CreateAspectTypeRequest>);
2970
2971    impl CreateAspectType {
2972        pub(crate) fn new(
2973            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2974        ) -> Self {
2975            Self(RequestBuilder::new(stub))
2976        }
2977
2978        /// Sets the full request, replacing any prior values.
2979        pub fn with_request<V: Into<crate::model::CreateAspectTypeRequest>>(
2980            mut self,
2981            v: V,
2982        ) -> Self {
2983            self.0.request = v.into();
2984            self
2985        }
2986
2987        /// Sets all the options, replacing any prior values.
2988        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2989            self.0.options = v.into();
2990            self
2991        }
2992
2993        /// Sends the request.
2994        ///
2995        /// # Long running operations
2996        ///
2997        /// This starts, but does not poll, a longrunning operation. More information
2998        /// on [create_aspect_type][crate::client::CatalogService::create_aspect_type].
2999        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3000            (*self.0.stub)
3001                .create_aspect_type(self.0.request, self.0.options)
3002                .await
3003                .map(crate::Response::into_body)
3004        }
3005
3006        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_aspect_type`.
3007        pub fn poller(
3008            self,
3009        ) -> impl google_cloud_lro::Poller<crate::model::AspectType, crate::model::OperationMetadata>
3010        {
3011            type Operation = google_cloud_lro::internal::Operation<
3012                crate::model::AspectType,
3013                crate::model::OperationMetadata,
3014            >;
3015            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3016            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3017
3018            let stub = self.0.stub.clone();
3019            let mut options = self.0.options.clone();
3020            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3021            let query = move |name| {
3022                let stub = stub.clone();
3023                let options = options.clone();
3024                async {
3025                    let op = GetOperation::new(stub)
3026                        .set_name(name)
3027                        .with_options(options)
3028                        .send()
3029                        .await?;
3030                    Ok(Operation::new(op))
3031                }
3032            };
3033
3034            let start = move || async {
3035                let op = self.send().await?;
3036                Ok(Operation::new(op))
3037            };
3038
3039            google_cloud_lro::internal::new_poller(
3040                polling_error_policy,
3041                polling_backoff_policy,
3042                start,
3043                query,
3044            )
3045        }
3046
3047        /// Sets the value of [parent][crate::model::CreateAspectTypeRequest::parent].
3048        ///
3049        /// This is a **required** field for requests.
3050        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3051            self.0.request.parent = v.into();
3052            self
3053        }
3054
3055        /// Sets the value of [aspect_type_id][crate::model::CreateAspectTypeRequest::aspect_type_id].
3056        ///
3057        /// This is a **required** field for requests.
3058        pub fn set_aspect_type_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3059            self.0.request.aspect_type_id = v.into();
3060            self
3061        }
3062
3063        /// Sets the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
3064        ///
3065        /// This is a **required** field for requests.
3066        pub fn set_aspect_type<T>(mut self, v: T) -> Self
3067        where
3068            T: std::convert::Into<crate::model::AspectType>,
3069        {
3070            self.0.request.aspect_type = std::option::Option::Some(v.into());
3071            self
3072        }
3073
3074        /// Sets or clears the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
3075        ///
3076        /// This is a **required** field for requests.
3077        pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
3078        where
3079            T: std::convert::Into<crate::model::AspectType>,
3080        {
3081            self.0.request.aspect_type = v.map(|x| x.into());
3082            self
3083        }
3084
3085        /// Sets the value of [validate_only][crate::model::CreateAspectTypeRequest::validate_only].
3086        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3087            self.0.request.validate_only = v.into();
3088            self
3089        }
3090    }
3091
3092    #[doc(hidden)]
3093    impl crate::RequestBuilder for CreateAspectType {
3094        fn request_options(&mut self) -> &mut crate::RequestOptions {
3095            &mut self.0.options
3096        }
3097    }
3098
3099    /// The request builder for [CatalogService::update_aspect_type][crate::client::CatalogService::update_aspect_type] calls.
3100    ///
3101    /// # Example
3102    /// ```
3103    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateAspectType;
3104    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3105    /// use google_cloud_lro::Poller;
3106    ///
3107    /// let builder = prepare_request_builder();
3108    /// let response = builder.poller().until_done().await?;
3109    /// # Ok(()) }
3110    ///
3111    /// fn prepare_request_builder() -> UpdateAspectType {
3112    ///   # panic!();
3113    ///   // ... details omitted ...
3114    /// }
3115    /// ```
3116    #[derive(Clone, Debug)]
3117    pub struct UpdateAspectType(RequestBuilder<crate::model::UpdateAspectTypeRequest>);
3118
3119    impl UpdateAspectType {
3120        pub(crate) fn new(
3121            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3122        ) -> Self {
3123            Self(RequestBuilder::new(stub))
3124        }
3125
3126        /// Sets the full request, replacing any prior values.
3127        pub fn with_request<V: Into<crate::model::UpdateAspectTypeRequest>>(
3128            mut self,
3129            v: V,
3130        ) -> Self {
3131            self.0.request = v.into();
3132            self
3133        }
3134
3135        /// Sets all the options, replacing any prior values.
3136        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3137            self.0.options = v.into();
3138            self
3139        }
3140
3141        /// Sends the request.
3142        ///
3143        /// # Long running operations
3144        ///
3145        /// This starts, but does not poll, a longrunning operation. More information
3146        /// on [update_aspect_type][crate::client::CatalogService::update_aspect_type].
3147        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3148            (*self.0.stub)
3149                .update_aspect_type(self.0.request, self.0.options)
3150                .await
3151                .map(crate::Response::into_body)
3152        }
3153
3154        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_aspect_type`.
3155        pub fn poller(
3156            self,
3157        ) -> impl google_cloud_lro::Poller<crate::model::AspectType, crate::model::OperationMetadata>
3158        {
3159            type Operation = google_cloud_lro::internal::Operation<
3160                crate::model::AspectType,
3161                crate::model::OperationMetadata,
3162            >;
3163            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3164            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3165
3166            let stub = self.0.stub.clone();
3167            let mut options = self.0.options.clone();
3168            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3169            let query = move |name| {
3170                let stub = stub.clone();
3171                let options = options.clone();
3172                async {
3173                    let op = GetOperation::new(stub)
3174                        .set_name(name)
3175                        .with_options(options)
3176                        .send()
3177                        .await?;
3178                    Ok(Operation::new(op))
3179                }
3180            };
3181
3182            let start = move || async {
3183                let op = self.send().await?;
3184                Ok(Operation::new(op))
3185            };
3186
3187            google_cloud_lro::internal::new_poller(
3188                polling_error_policy,
3189                polling_backoff_policy,
3190                start,
3191                query,
3192            )
3193        }
3194
3195        /// Sets the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
3196        ///
3197        /// This is a **required** field for requests.
3198        pub fn set_aspect_type<T>(mut self, v: T) -> Self
3199        where
3200            T: std::convert::Into<crate::model::AspectType>,
3201        {
3202            self.0.request.aspect_type = std::option::Option::Some(v.into());
3203            self
3204        }
3205
3206        /// Sets or clears the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
3207        ///
3208        /// This is a **required** field for requests.
3209        pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
3210        where
3211            T: std::convert::Into<crate::model::AspectType>,
3212        {
3213            self.0.request.aspect_type = v.map(|x| x.into());
3214            self
3215        }
3216
3217        /// Sets the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
3218        ///
3219        /// This is a **required** field for requests.
3220        pub fn set_update_mask<T>(mut self, v: T) -> Self
3221        where
3222            T: std::convert::Into<wkt::FieldMask>,
3223        {
3224            self.0.request.update_mask = std::option::Option::Some(v.into());
3225            self
3226        }
3227
3228        /// Sets or clears the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
3229        ///
3230        /// This is a **required** field for requests.
3231        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3232        where
3233            T: std::convert::Into<wkt::FieldMask>,
3234        {
3235            self.0.request.update_mask = v.map(|x| x.into());
3236            self
3237        }
3238
3239        /// Sets the value of [validate_only][crate::model::UpdateAspectTypeRequest::validate_only].
3240        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3241            self.0.request.validate_only = v.into();
3242            self
3243        }
3244    }
3245
3246    #[doc(hidden)]
3247    impl crate::RequestBuilder for UpdateAspectType {
3248        fn request_options(&mut self) -> &mut crate::RequestOptions {
3249            &mut self.0.options
3250        }
3251    }
3252
3253    /// The request builder for [CatalogService::delete_aspect_type][crate::client::CatalogService::delete_aspect_type] calls.
3254    ///
3255    /// # Example
3256    /// ```
3257    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteAspectType;
3258    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3259    /// use google_cloud_lro::Poller;
3260    ///
3261    /// let builder = prepare_request_builder();
3262    /// let response = builder.poller().until_done().await?;
3263    /// # Ok(()) }
3264    ///
3265    /// fn prepare_request_builder() -> DeleteAspectType {
3266    ///   # panic!();
3267    ///   // ... details omitted ...
3268    /// }
3269    /// ```
3270    #[derive(Clone, Debug)]
3271    pub struct DeleteAspectType(RequestBuilder<crate::model::DeleteAspectTypeRequest>);
3272
3273    impl DeleteAspectType {
3274        pub(crate) fn new(
3275            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3276        ) -> Self {
3277            Self(RequestBuilder::new(stub))
3278        }
3279
3280        /// Sets the full request, replacing any prior values.
3281        pub fn with_request<V: Into<crate::model::DeleteAspectTypeRequest>>(
3282            mut self,
3283            v: V,
3284        ) -> Self {
3285            self.0.request = v.into();
3286            self
3287        }
3288
3289        /// Sets all the options, replacing any prior values.
3290        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3291            self.0.options = v.into();
3292            self
3293        }
3294
3295        /// Sends the request.
3296        ///
3297        /// # Long running operations
3298        ///
3299        /// This starts, but does not poll, a longrunning operation. More information
3300        /// on [delete_aspect_type][crate::client::CatalogService::delete_aspect_type].
3301        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3302            (*self.0.stub)
3303                .delete_aspect_type(self.0.request, self.0.options)
3304                .await
3305                .map(crate::Response::into_body)
3306        }
3307
3308        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_aspect_type`.
3309        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3310            type Operation =
3311                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3312            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3313            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3314
3315            let stub = self.0.stub.clone();
3316            let mut options = self.0.options.clone();
3317            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3318            let query = move |name| {
3319                let stub = stub.clone();
3320                let options = options.clone();
3321                async {
3322                    let op = GetOperation::new(stub)
3323                        .set_name(name)
3324                        .with_options(options)
3325                        .send()
3326                        .await?;
3327                    Ok(Operation::new(op))
3328                }
3329            };
3330
3331            let start = move || async {
3332                let op = self.send().await?;
3333                Ok(Operation::new(op))
3334            };
3335
3336            google_cloud_lro::internal::new_unit_response_poller(
3337                polling_error_policy,
3338                polling_backoff_policy,
3339                start,
3340                query,
3341            )
3342        }
3343
3344        /// Sets the value of [name][crate::model::DeleteAspectTypeRequest::name].
3345        ///
3346        /// This is a **required** field for requests.
3347        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3348            self.0.request.name = v.into();
3349            self
3350        }
3351
3352        /// Sets the value of [etag][crate::model::DeleteAspectTypeRequest::etag].
3353        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3354            self.0.request.etag = v.into();
3355            self
3356        }
3357    }
3358
3359    #[doc(hidden)]
3360    impl crate::RequestBuilder for DeleteAspectType {
3361        fn request_options(&mut self) -> &mut crate::RequestOptions {
3362            &mut self.0.options
3363        }
3364    }
3365
3366    /// The request builder for [CatalogService::list_aspect_types][crate::client::CatalogService::list_aspect_types] calls.
3367    ///
3368    /// # Example
3369    /// ```
3370    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListAspectTypes;
3371    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3372    /// use google_cloud_gax::paginator::ItemPaginator;
3373    ///
3374    /// let builder = prepare_request_builder();
3375    /// let mut items = builder.by_item();
3376    /// while let Some(result) = items.next().await {
3377    ///   let item = result?;
3378    /// }
3379    /// # Ok(()) }
3380    ///
3381    /// fn prepare_request_builder() -> ListAspectTypes {
3382    ///   # panic!();
3383    ///   // ... details omitted ...
3384    /// }
3385    /// ```
3386    #[derive(Clone, Debug)]
3387    pub struct ListAspectTypes(RequestBuilder<crate::model::ListAspectTypesRequest>);
3388
3389    impl ListAspectTypes {
3390        pub(crate) fn new(
3391            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3392        ) -> Self {
3393            Self(RequestBuilder::new(stub))
3394        }
3395
3396        /// Sets the full request, replacing any prior values.
3397        pub fn with_request<V: Into<crate::model::ListAspectTypesRequest>>(mut self, v: V) -> Self {
3398            self.0.request = v.into();
3399            self
3400        }
3401
3402        /// Sets all the options, replacing any prior values.
3403        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3404            self.0.options = v.into();
3405            self
3406        }
3407
3408        /// Sends the request.
3409        pub async fn send(self) -> Result<crate::model::ListAspectTypesResponse> {
3410            (*self.0.stub)
3411                .list_aspect_types(self.0.request, self.0.options)
3412                .await
3413                .map(crate::Response::into_body)
3414        }
3415
3416        /// Streams each page in the collection.
3417        pub fn by_page(
3418            self,
3419        ) -> impl google_cloud_gax::paginator::Paginator<
3420            crate::model::ListAspectTypesResponse,
3421            crate::Error,
3422        > {
3423            use std::clone::Clone;
3424            let token = self.0.request.page_token.clone();
3425            let execute = move |token: String| {
3426                let mut builder = self.clone();
3427                builder.0.request = builder.0.request.set_page_token(token);
3428                builder.send()
3429            };
3430            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3431        }
3432
3433        /// Streams each item in the collection.
3434        pub fn by_item(
3435            self,
3436        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3437            crate::model::ListAspectTypesResponse,
3438            crate::Error,
3439        > {
3440            use google_cloud_gax::paginator::Paginator;
3441            self.by_page().items()
3442        }
3443
3444        /// Sets the value of [parent][crate::model::ListAspectTypesRequest::parent].
3445        ///
3446        /// This is a **required** field for requests.
3447        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3448            self.0.request.parent = v.into();
3449            self
3450        }
3451
3452        /// Sets the value of [page_size][crate::model::ListAspectTypesRequest::page_size].
3453        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3454            self.0.request.page_size = v.into();
3455            self
3456        }
3457
3458        /// Sets the value of [page_token][crate::model::ListAspectTypesRequest::page_token].
3459        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3460            self.0.request.page_token = v.into();
3461            self
3462        }
3463
3464        /// Sets the value of [filter][crate::model::ListAspectTypesRequest::filter].
3465        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3466            self.0.request.filter = v.into();
3467            self
3468        }
3469
3470        /// Sets the value of [order_by][crate::model::ListAspectTypesRequest::order_by].
3471        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3472            self.0.request.order_by = v.into();
3473            self
3474        }
3475    }
3476
3477    #[doc(hidden)]
3478    impl crate::RequestBuilder for ListAspectTypes {
3479        fn request_options(&mut self) -> &mut crate::RequestOptions {
3480            &mut self.0.options
3481        }
3482    }
3483
3484    /// The request builder for [CatalogService::get_aspect_type][crate::client::CatalogService::get_aspect_type] calls.
3485    ///
3486    /// # Example
3487    /// ```
3488    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetAspectType;
3489    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3490    ///
3491    /// let builder = prepare_request_builder();
3492    /// let response = builder.send().await?;
3493    /// # Ok(()) }
3494    ///
3495    /// fn prepare_request_builder() -> GetAspectType {
3496    ///   # panic!();
3497    ///   // ... details omitted ...
3498    /// }
3499    /// ```
3500    #[derive(Clone, Debug)]
3501    pub struct GetAspectType(RequestBuilder<crate::model::GetAspectTypeRequest>);
3502
3503    impl GetAspectType {
3504        pub(crate) fn new(
3505            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3506        ) -> Self {
3507            Self(RequestBuilder::new(stub))
3508        }
3509
3510        /// Sets the full request, replacing any prior values.
3511        pub fn with_request<V: Into<crate::model::GetAspectTypeRequest>>(mut self, v: V) -> Self {
3512            self.0.request = v.into();
3513            self
3514        }
3515
3516        /// Sets all the options, replacing any prior values.
3517        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3518            self.0.options = v.into();
3519            self
3520        }
3521
3522        /// Sends the request.
3523        pub async fn send(self) -> Result<crate::model::AspectType> {
3524            (*self.0.stub)
3525                .get_aspect_type(self.0.request, self.0.options)
3526                .await
3527                .map(crate::Response::into_body)
3528        }
3529
3530        /// Sets the value of [name][crate::model::GetAspectTypeRequest::name].
3531        ///
3532        /// This is a **required** field for requests.
3533        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3534            self.0.request.name = v.into();
3535            self
3536        }
3537    }
3538
3539    #[doc(hidden)]
3540    impl crate::RequestBuilder for GetAspectType {
3541        fn request_options(&mut self) -> &mut crate::RequestOptions {
3542            &mut self.0.options
3543        }
3544    }
3545
3546    /// The request builder for [CatalogService::create_entry_group][crate::client::CatalogService::create_entry_group] calls.
3547    ///
3548    /// # Example
3549    /// ```
3550    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntryGroup;
3551    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3552    /// use google_cloud_lro::Poller;
3553    ///
3554    /// let builder = prepare_request_builder();
3555    /// let response = builder.poller().until_done().await?;
3556    /// # Ok(()) }
3557    ///
3558    /// fn prepare_request_builder() -> CreateEntryGroup {
3559    ///   # panic!();
3560    ///   // ... details omitted ...
3561    /// }
3562    /// ```
3563    #[derive(Clone, Debug)]
3564    pub struct CreateEntryGroup(RequestBuilder<crate::model::CreateEntryGroupRequest>);
3565
3566    impl CreateEntryGroup {
3567        pub(crate) fn new(
3568            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3569        ) -> Self {
3570            Self(RequestBuilder::new(stub))
3571        }
3572
3573        /// Sets the full request, replacing any prior values.
3574        pub fn with_request<V: Into<crate::model::CreateEntryGroupRequest>>(
3575            mut self,
3576            v: V,
3577        ) -> Self {
3578            self.0.request = v.into();
3579            self
3580        }
3581
3582        /// Sets all the options, replacing any prior values.
3583        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3584            self.0.options = v.into();
3585            self
3586        }
3587
3588        /// Sends the request.
3589        ///
3590        /// # Long running operations
3591        ///
3592        /// This starts, but does not poll, a longrunning operation. More information
3593        /// on [create_entry_group][crate::client::CatalogService::create_entry_group].
3594        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3595            (*self.0.stub)
3596                .create_entry_group(self.0.request, self.0.options)
3597                .await
3598                .map(crate::Response::into_body)
3599        }
3600
3601        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_entry_group`.
3602        pub fn poller(
3603            self,
3604        ) -> impl google_cloud_lro::Poller<crate::model::EntryGroup, crate::model::OperationMetadata>
3605        {
3606            type Operation = google_cloud_lro::internal::Operation<
3607                crate::model::EntryGroup,
3608                crate::model::OperationMetadata,
3609            >;
3610            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3611            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3612
3613            let stub = self.0.stub.clone();
3614            let mut options = self.0.options.clone();
3615            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3616            let query = move |name| {
3617                let stub = stub.clone();
3618                let options = options.clone();
3619                async {
3620                    let op = GetOperation::new(stub)
3621                        .set_name(name)
3622                        .with_options(options)
3623                        .send()
3624                        .await?;
3625                    Ok(Operation::new(op))
3626                }
3627            };
3628
3629            let start = move || async {
3630                let op = self.send().await?;
3631                Ok(Operation::new(op))
3632            };
3633
3634            google_cloud_lro::internal::new_poller(
3635                polling_error_policy,
3636                polling_backoff_policy,
3637                start,
3638                query,
3639            )
3640        }
3641
3642        /// Sets the value of [parent][crate::model::CreateEntryGroupRequest::parent].
3643        ///
3644        /// This is a **required** field for requests.
3645        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3646            self.0.request.parent = v.into();
3647            self
3648        }
3649
3650        /// Sets the value of [entry_group_id][crate::model::CreateEntryGroupRequest::entry_group_id].
3651        ///
3652        /// This is a **required** field for requests.
3653        pub fn set_entry_group_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3654            self.0.request.entry_group_id = v.into();
3655            self
3656        }
3657
3658        /// Sets the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
3659        ///
3660        /// This is a **required** field for requests.
3661        pub fn set_entry_group<T>(mut self, v: T) -> Self
3662        where
3663            T: std::convert::Into<crate::model::EntryGroup>,
3664        {
3665            self.0.request.entry_group = std::option::Option::Some(v.into());
3666            self
3667        }
3668
3669        /// Sets or clears the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
3670        ///
3671        /// This is a **required** field for requests.
3672        pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
3673        where
3674            T: std::convert::Into<crate::model::EntryGroup>,
3675        {
3676            self.0.request.entry_group = v.map(|x| x.into());
3677            self
3678        }
3679
3680        /// Sets the value of [validate_only][crate::model::CreateEntryGroupRequest::validate_only].
3681        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3682            self.0.request.validate_only = v.into();
3683            self
3684        }
3685    }
3686
3687    #[doc(hidden)]
3688    impl crate::RequestBuilder for CreateEntryGroup {
3689        fn request_options(&mut self) -> &mut crate::RequestOptions {
3690            &mut self.0.options
3691        }
3692    }
3693
3694    /// The request builder for [CatalogService::update_entry_group][crate::client::CatalogService::update_entry_group] calls.
3695    ///
3696    /// # Example
3697    /// ```
3698    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntryGroup;
3699    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3700    /// use google_cloud_lro::Poller;
3701    ///
3702    /// let builder = prepare_request_builder();
3703    /// let response = builder.poller().until_done().await?;
3704    /// # Ok(()) }
3705    ///
3706    /// fn prepare_request_builder() -> UpdateEntryGroup {
3707    ///   # panic!();
3708    ///   // ... details omitted ...
3709    /// }
3710    /// ```
3711    #[derive(Clone, Debug)]
3712    pub struct UpdateEntryGroup(RequestBuilder<crate::model::UpdateEntryGroupRequest>);
3713
3714    impl UpdateEntryGroup {
3715        pub(crate) fn new(
3716            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3717        ) -> Self {
3718            Self(RequestBuilder::new(stub))
3719        }
3720
3721        /// Sets the full request, replacing any prior values.
3722        pub fn with_request<V: Into<crate::model::UpdateEntryGroupRequest>>(
3723            mut self,
3724            v: V,
3725        ) -> Self {
3726            self.0.request = v.into();
3727            self
3728        }
3729
3730        /// Sets all the options, replacing any prior values.
3731        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3732            self.0.options = v.into();
3733            self
3734        }
3735
3736        /// Sends the request.
3737        ///
3738        /// # Long running operations
3739        ///
3740        /// This starts, but does not poll, a longrunning operation. More information
3741        /// on [update_entry_group][crate::client::CatalogService::update_entry_group].
3742        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3743            (*self.0.stub)
3744                .update_entry_group(self.0.request, self.0.options)
3745                .await
3746                .map(crate::Response::into_body)
3747        }
3748
3749        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_entry_group`.
3750        pub fn poller(
3751            self,
3752        ) -> impl google_cloud_lro::Poller<crate::model::EntryGroup, crate::model::OperationMetadata>
3753        {
3754            type Operation = google_cloud_lro::internal::Operation<
3755                crate::model::EntryGroup,
3756                crate::model::OperationMetadata,
3757            >;
3758            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3759            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3760
3761            let stub = self.0.stub.clone();
3762            let mut options = self.0.options.clone();
3763            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3764            let query = move |name| {
3765                let stub = stub.clone();
3766                let options = options.clone();
3767                async {
3768                    let op = GetOperation::new(stub)
3769                        .set_name(name)
3770                        .with_options(options)
3771                        .send()
3772                        .await?;
3773                    Ok(Operation::new(op))
3774                }
3775            };
3776
3777            let start = move || async {
3778                let op = self.send().await?;
3779                Ok(Operation::new(op))
3780            };
3781
3782            google_cloud_lro::internal::new_poller(
3783                polling_error_policy,
3784                polling_backoff_policy,
3785                start,
3786                query,
3787            )
3788        }
3789
3790        /// Sets the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
3791        ///
3792        /// This is a **required** field for requests.
3793        pub fn set_entry_group<T>(mut self, v: T) -> Self
3794        where
3795            T: std::convert::Into<crate::model::EntryGroup>,
3796        {
3797            self.0.request.entry_group = std::option::Option::Some(v.into());
3798            self
3799        }
3800
3801        /// Sets or clears the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
3802        ///
3803        /// This is a **required** field for requests.
3804        pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
3805        where
3806            T: std::convert::Into<crate::model::EntryGroup>,
3807        {
3808            self.0.request.entry_group = v.map(|x| x.into());
3809            self
3810        }
3811
3812        /// Sets the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
3813        ///
3814        /// This is a **required** field for requests.
3815        pub fn set_update_mask<T>(mut self, v: T) -> Self
3816        where
3817            T: std::convert::Into<wkt::FieldMask>,
3818        {
3819            self.0.request.update_mask = std::option::Option::Some(v.into());
3820            self
3821        }
3822
3823        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
3824        ///
3825        /// This is a **required** field for requests.
3826        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3827        where
3828            T: std::convert::Into<wkt::FieldMask>,
3829        {
3830            self.0.request.update_mask = v.map(|x| x.into());
3831            self
3832        }
3833
3834        /// Sets the value of [validate_only][crate::model::UpdateEntryGroupRequest::validate_only].
3835        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3836            self.0.request.validate_only = v.into();
3837            self
3838        }
3839    }
3840
3841    #[doc(hidden)]
3842    impl crate::RequestBuilder for UpdateEntryGroup {
3843        fn request_options(&mut self) -> &mut crate::RequestOptions {
3844            &mut self.0.options
3845        }
3846    }
3847
3848    /// The request builder for [CatalogService::delete_entry_group][crate::client::CatalogService::delete_entry_group] calls.
3849    ///
3850    /// # Example
3851    /// ```
3852    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntryGroup;
3853    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3854    /// use google_cloud_lro::Poller;
3855    ///
3856    /// let builder = prepare_request_builder();
3857    /// let response = builder.poller().until_done().await?;
3858    /// # Ok(()) }
3859    ///
3860    /// fn prepare_request_builder() -> DeleteEntryGroup {
3861    ///   # panic!();
3862    ///   // ... details omitted ...
3863    /// }
3864    /// ```
3865    #[derive(Clone, Debug)]
3866    pub struct DeleteEntryGroup(RequestBuilder<crate::model::DeleteEntryGroupRequest>);
3867
3868    impl DeleteEntryGroup {
3869        pub(crate) fn new(
3870            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3871        ) -> Self {
3872            Self(RequestBuilder::new(stub))
3873        }
3874
3875        /// Sets the full request, replacing any prior values.
3876        pub fn with_request<V: Into<crate::model::DeleteEntryGroupRequest>>(
3877            mut self,
3878            v: V,
3879        ) -> Self {
3880            self.0.request = v.into();
3881            self
3882        }
3883
3884        /// Sets all the options, replacing any prior values.
3885        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3886            self.0.options = v.into();
3887            self
3888        }
3889
3890        /// Sends the request.
3891        ///
3892        /// # Long running operations
3893        ///
3894        /// This starts, but does not poll, a longrunning operation. More information
3895        /// on [delete_entry_group][crate::client::CatalogService::delete_entry_group].
3896        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3897            (*self.0.stub)
3898                .delete_entry_group(self.0.request, self.0.options)
3899                .await
3900                .map(crate::Response::into_body)
3901        }
3902
3903        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_entry_group`.
3904        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3905            type Operation =
3906                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3907            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3908            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3909
3910            let stub = self.0.stub.clone();
3911            let mut options = self.0.options.clone();
3912            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3913            let query = move |name| {
3914                let stub = stub.clone();
3915                let options = options.clone();
3916                async {
3917                    let op = GetOperation::new(stub)
3918                        .set_name(name)
3919                        .with_options(options)
3920                        .send()
3921                        .await?;
3922                    Ok(Operation::new(op))
3923                }
3924            };
3925
3926            let start = move || async {
3927                let op = self.send().await?;
3928                Ok(Operation::new(op))
3929            };
3930
3931            google_cloud_lro::internal::new_unit_response_poller(
3932                polling_error_policy,
3933                polling_backoff_policy,
3934                start,
3935                query,
3936            )
3937        }
3938
3939        /// Sets the value of [name][crate::model::DeleteEntryGroupRequest::name].
3940        ///
3941        /// This is a **required** field for requests.
3942        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3943            self.0.request.name = v.into();
3944            self
3945        }
3946
3947        /// Sets the value of [etag][crate::model::DeleteEntryGroupRequest::etag].
3948        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3949            self.0.request.etag = v.into();
3950            self
3951        }
3952    }
3953
3954    #[doc(hidden)]
3955    impl crate::RequestBuilder for DeleteEntryGroup {
3956        fn request_options(&mut self) -> &mut crate::RequestOptions {
3957            &mut self.0.options
3958        }
3959    }
3960
3961    /// The request builder for [CatalogService::list_entry_groups][crate::client::CatalogService::list_entry_groups] calls.
3962    ///
3963    /// # Example
3964    /// ```
3965    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListEntryGroups;
3966    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3967    /// use google_cloud_gax::paginator::ItemPaginator;
3968    ///
3969    /// let builder = prepare_request_builder();
3970    /// let mut items = builder.by_item();
3971    /// while let Some(result) = items.next().await {
3972    ///   let item = result?;
3973    /// }
3974    /// # Ok(()) }
3975    ///
3976    /// fn prepare_request_builder() -> ListEntryGroups {
3977    ///   # panic!();
3978    ///   // ... details omitted ...
3979    /// }
3980    /// ```
3981    #[derive(Clone, Debug)]
3982    pub struct ListEntryGroups(RequestBuilder<crate::model::ListEntryGroupsRequest>);
3983
3984    impl ListEntryGroups {
3985        pub(crate) fn new(
3986            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3987        ) -> Self {
3988            Self(RequestBuilder::new(stub))
3989        }
3990
3991        /// Sets the full request, replacing any prior values.
3992        pub fn with_request<V: Into<crate::model::ListEntryGroupsRequest>>(mut self, v: V) -> Self {
3993            self.0.request = v.into();
3994            self
3995        }
3996
3997        /// Sets all the options, replacing any prior values.
3998        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3999            self.0.options = v.into();
4000            self
4001        }
4002
4003        /// Sends the request.
4004        pub async fn send(self) -> Result<crate::model::ListEntryGroupsResponse> {
4005            (*self.0.stub)
4006                .list_entry_groups(self.0.request, self.0.options)
4007                .await
4008                .map(crate::Response::into_body)
4009        }
4010
4011        /// Streams each page in the collection.
4012        pub fn by_page(
4013            self,
4014        ) -> impl google_cloud_gax::paginator::Paginator<
4015            crate::model::ListEntryGroupsResponse,
4016            crate::Error,
4017        > {
4018            use std::clone::Clone;
4019            let token = self.0.request.page_token.clone();
4020            let execute = move |token: String| {
4021                let mut builder = self.clone();
4022                builder.0.request = builder.0.request.set_page_token(token);
4023                builder.send()
4024            };
4025            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4026        }
4027
4028        /// Streams each item in the collection.
4029        pub fn by_item(
4030            self,
4031        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4032            crate::model::ListEntryGroupsResponse,
4033            crate::Error,
4034        > {
4035            use google_cloud_gax::paginator::Paginator;
4036            self.by_page().items()
4037        }
4038
4039        /// Sets the value of [parent][crate::model::ListEntryGroupsRequest::parent].
4040        ///
4041        /// This is a **required** field for requests.
4042        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4043            self.0.request.parent = v.into();
4044            self
4045        }
4046
4047        /// Sets the value of [page_size][crate::model::ListEntryGroupsRequest::page_size].
4048        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4049            self.0.request.page_size = v.into();
4050            self
4051        }
4052
4053        /// Sets the value of [page_token][crate::model::ListEntryGroupsRequest::page_token].
4054        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4055            self.0.request.page_token = v.into();
4056            self
4057        }
4058
4059        /// Sets the value of [filter][crate::model::ListEntryGroupsRequest::filter].
4060        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4061            self.0.request.filter = v.into();
4062            self
4063        }
4064
4065        /// Sets the value of [order_by][crate::model::ListEntryGroupsRequest::order_by].
4066        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4067            self.0.request.order_by = v.into();
4068            self
4069        }
4070    }
4071
4072    #[doc(hidden)]
4073    impl crate::RequestBuilder for ListEntryGroups {
4074        fn request_options(&mut self) -> &mut crate::RequestOptions {
4075            &mut self.0.options
4076        }
4077    }
4078
4079    /// The request builder for [CatalogService::get_entry_group][crate::client::CatalogService::get_entry_group] calls.
4080    ///
4081    /// # Example
4082    /// ```
4083    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntryGroup;
4084    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4085    ///
4086    /// let builder = prepare_request_builder();
4087    /// let response = builder.send().await?;
4088    /// # Ok(()) }
4089    ///
4090    /// fn prepare_request_builder() -> GetEntryGroup {
4091    ///   # panic!();
4092    ///   // ... details omitted ...
4093    /// }
4094    /// ```
4095    #[derive(Clone, Debug)]
4096    pub struct GetEntryGroup(RequestBuilder<crate::model::GetEntryGroupRequest>);
4097
4098    impl GetEntryGroup {
4099        pub(crate) fn new(
4100            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4101        ) -> Self {
4102            Self(RequestBuilder::new(stub))
4103        }
4104
4105        /// Sets the full request, replacing any prior values.
4106        pub fn with_request<V: Into<crate::model::GetEntryGroupRequest>>(mut self, v: V) -> Self {
4107            self.0.request = v.into();
4108            self
4109        }
4110
4111        /// Sets all the options, replacing any prior values.
4112        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4113            self.0.options = v.into();
4114            self
4115        }
4116
4117        /// Sends the request.
4118        pub async fn send(self) -> Result<crate::model::EntryGroup> {
4119            (*self.0.stub)
4120                .get_entry_group(self.0.request, self.0.options)
4121                .await
4122                .map(crate::Response::into_body)
4123        }
4124
4125        /// Sets the value of [name][crate::model::GetEntryGroupRequest::name].
4126        ///
4127        /// This is a **required** field for requests.
4128        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4129            self.0.request.name = v.into();
4130            self
4131        }
4132    }
4133
4134    #[doc(hidden)]
4135    impl crate::RequestBuilder for GetEntryGroup {
4136        fn request_options(&mut self) -> &mut crate::RequestOptions {
4137            &mut self.0.options
4138        }
4139    }
4140
4141    /// The request builder for [CatalogService::create_entry][crate::client::CatalogService::create_entry] calls.
4142    ///
4143    /// # Example
4144    /// ```
4145    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntry;
4146    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4147    ///
4148    /// let builder = prepare_request_builder();
4149    /// let response = builder.send().await?;
4150    /// # Ok(()) }
4151    ///
4152    /// fn prepare_request_builder() -> CreateEntry {
4153    ///   # panic!();
4154    ///   // ... details omitted ...
4155    /// }
4156    /// ```
4157    #[derive(Clone, Debug)]
4158    pub struct CreateEntry(RequestBuilder<crate::model::CreateEntryRequest>);
4159
4160    impl CreateEntry {
4161        pub(crate) fn new(
4162            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4163        ) -> Self {
4164            Self(RequestBuilder::new(stub))
4165        }
4166
4167        /// Sets the full request, replacing any prior values.
4168        pub fn with_request<V: Into<crate::model::CreateEntryRequest>>(mut self, v: V) -> Self {
4169            self.0.request = v.into();
4170            self
4171        }
4172
4173        /// Sets all the options, replacing any prior values.
4174        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4175            self.0.options = v.into();
4176            self
4177        }
4178
4179        /// Sends the request.
4180        pub async fn send(self) -> Result<crate::model::Entry> {
4181            (*self.0.stub)
4182                .create_entry(self.0.request, self.0.options)
4183                .await
4184                .map(crate::Response::into_body)
4185        }
4186
4187        /// Sets the value of [parent][crate::model::CreateEntryRequest::parent].
4188        ///
4189        /// This is a **required** field for requests.
4190        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4191            self.0.request.parent = v.into();
4192            self
4193        }
4194
4195        /// Sets the value of [entry_id][crate::model::CreateEntryRequest::entry_id].
4196        ///
4197        /// This is a **required** field for requests.
4198        pub fn set_entry_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4199            self.0.request.entry_id = v.into();
4200            self
4201        }
4202
4203        /// Sets the value of [entry][crate::model::CreateEntryRequest::entry].
4204        ///
4205        /// This is a **required** field for requests.
4206        pub fn set_entry<T>(mut self, v: T) -> Self
4207        where
4208            T: std::convert::Into<crate::model::Entry>,
4209        {
4210            self.0.request.entry = std::option::Option::Some(v.into());
4211            self
4212        }
4213
4214        /// Sets or clears the value of [entry][crate::model::CreateEntryRequest::entry].
4215        ///
4216        /// This is a **required** field for requests.
4217        pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
4218        where
4219            T: std::convert::Into<crate::model::Entry>,
4220        {
4221            self.0.request.entry = v.map(|x| x.into());
4222            self
4223        }
4224    }
4225
4226    #[doc(hidden)]
4227    impl crate::RequestBuilder for CreateEntry {
4228        fn request_options(&mut self) -> &mut crate::RequestOptions {
4229            &mut self.0.options
4230        }
4231    }
4232
4233    /// The request builder for [CatalogService::update_entry][crate::client::CatalogService::update_entry] calls.
4234    ///
4235    /// # Example
4236    /// ```
4237    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntry;
4238    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4239    ///
4240    /// let builder = prepare_request_builder();
4241    /// let response = builder.send().await?;
4242    /// # Ok(()) }
4243    ///
4244    /// fn prepare_request_builder() -> UpdateEntry {
4245    ///   # panic!();
4246    ///   // ... details omitted ...
4247    /// }
4248    /// ```
4249    #[derive(Clone, Debug)]
4250    pub struct UpdateEntry(RequestBuilder<crate::model::UpdateEntryRequest>);
4251
4252    impl UpdateEntry {
4253        pub(crate) fn new(
4254            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4255        ) -> Self {
4256            Self(RequestBuilder::new(stub))
4257        }
4258
4259        /// Sets the full request, replacing any prior values.
4260        pub fn with_request<V: Into<crate::model::UpdateEntryRequest>>(mut self, v: V) -> Self {
4261            self.0.request = v.into();
4262            self
4263        }
4264
4265        /// Sets all the options, replacing any prior values.
4266        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4267            self.0.options = v.into();
4268            self
4269        }
4270
4271        /// Sends the request.
4272        pub async fn send(self) -> Result<crate::model::Entry> {
4273            (*self.0.stub)
4274                .update_entry(self.0.request, self.0.options)
4275                .await
4276                .map(crate::Response::into_body)
4277        }
4278
4279        /// Sets the value of [entry][crate::model::UpdateEntryRequest::entry].
4280        ///
4281        /// This is a **required** field for requests.
4282        pub fn set_entry<T>(mut self, v: T) -> Self
4283        where
4284            T: std::convert::Into<crate::model::Entry>,
4285        {
4286            self.0.request.entry = std::option::Option::Some(v.into());
4287            self
4288        }
4289
4290        /// Sets or clears the value of [entry][crate::model::UpdateEntryRequest::entry].
4291        ///
4292        /// This is a **required** field for requests.
4293        pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
4294        where
4295            T: std::convert::Into<crate::model::Entry>,
4296        {
4297            self.0.request.entry = v.map(|x| x.into());
4298            self
4299        }
4300
4301        /// Sets the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
4302        pub fn set_update_mask<T>(mut self, v: T) -> Self
4303        where
4304            T: std::convert::Into<wkt::FieldMask>,
4305        {
4306            self.0.request.update_mask = std::option::Option::Some(v.into());
4307            self
4308        }
4309
4310        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
4311        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4312        where
4313            T: std::convert::Into<wkt::FieldMask>,
4314        {
4315            self.0.request.update_mask = v.map(|x| x.into());
4316            self
4317        }
4318
4319        /// Sets the value of [allow_missing][crate::model::UpdateEntryRequest::allow_missing].
4320        pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
4321            self.0.request.allow_missing = v.into();
4322            self
4323        }
4324
4325        /// Sets the value of [delete_missing_aspects][crate::model::UpdateEntryRequest::delete_missing_aspects].
4326        pub fn set_delete_missing_aspects<T: Into<bool>>(mut self, v: T) -> Self {
4327            self.0.request.delete_missing_aspects = v.into();
4328            self
4329        }
4330
4331        /// Sets the value of [aspect_keys][crate::model::UpdateEntryRequest::aspect_keys].
4332        pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
4333        where
4334            T: std::iter::IntoIterator<Item = V>,
4335            V: std::convert::Into<std::string::String>,
4336        {
4337            use std::iter::Iterator;
4338            self.0.request.aspect_keys = v.into_iter().map(|i| i.into()).collect();
4339            self
4340        }
4341    }
4342
4343    #[doc(hidden)]
4344    impl crate::RequestBuilder for UpdateEntry {
4345        fn request_options(&mut self) -> &mut crate::RequestOptions {
4346            &mut self.0.options
4347        }
4348    }
4349
4350    /// The request builder for [CatalogService::delete_entry][crate::client::CatalogService::delete_entry] calls.
4351    ///
4352    /// # Example
4353    /// ```
4354    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntry;
4355    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4356    ///
4357    /// let builder = prepare_request_builder();
4358    /// let response = builder.send().await?;
4359    /// # Ok(()) }
4360    ///
4361    /// fn prepare_request_builder() -> DeleteEntry {
4362    ///   # panic!();
4363    ///   // ... details omitted ...
4364    /// }
4365    /// ```
4366    #[derive(Clone, Debug)]
4367    pub struct DeleteEntry(RequestBuilder<crate::model::DeleteEntryRequest>);
4368
4369    impl DeleteEntry {
4370        pub(crate) fn new(
4371            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4372        ) -> Self {
4373            Self(RequestBuilder::new(stub))
4374        }
4375
4376        /// Sets the full request, replacing any prior values.
4377        pub fn with_request<V: Into<crate::model::DeleteEntryRequest>>(mut self, v: V) -> Self {
4378            self.0.request = v.into();
4379            self
4380        }
4381
4382        /// Sets all the options, replacing any prior values.
4383        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4384            self.0.options = v.into();
4385            self
4386        }
4387
4388        /// Sends the request.
4389        pub async fn send(self) -> Result<crate::model::Entry> {
4390            (*self.0.stub)
4391                .delete_entry(self.0.request, self.0.options)
4392                .await
4393                .map(crate::Response::into_body)
4394        }
4395
4396        /// Sets the value of [name][crate::model::DeleteEntryRequest::name].
4397        ///
4398        /// This is a **required** field for requests.
4399        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4400            self.0.request.name = v.into();
4401            self
4402        }
4403    }
4404
4405    #[doc(hidden)]
4406    impl crate::RequestBuilder for DeleteEntry {
4407        fn request_options(&mut self) -> &mut crate::RequestOptions {
4408            &mut self.0.options
4409        }
4410    }
4411
4412    /// The request builder for [CatalogService::list_entries][crate::client::CatalogService::list_entries] calls.
4413    ///
4414    /// # Example
4415    /// ```
4416    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListEntries;
4417    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4418    /// use google_cloud_gax::paginator::ItemPaginator;
4419    ///
4420    /// let builder = prepare_request_builder();
4421    /// let mut items = builder.by_item();
4422    /// while let Some(result) = items.next().await {
4423    ///   let item = result?;
4424    /// }
4425    /// # Ok(()) }
4426    ///
4427    /// fn prepare_request_builder() -> ListEntries {
4428    ///   # panic!();
4429    ///   // ... details omitted ...
4430    /// }
4431    /// ```
4432    #[derive(Clone, Debug)]
4433    pub struct ListEntries(RequestBuilder<crate::model::ListEntriesRequest>);
4434
4435    impl ListEntries {
4436        pub(crate) fn new(
4437            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4438        ) -> Self {
4439            Self(RequestBuilder::new(stub))
4440        }
4441
4442        /// Sets the full request, replacing any prior values.
4443        pub fn with_request<V: Into<crate::model::ListEntriesRequest>>(mut self, v: V) -> Self {
4444            self.0.request = v.into();
4445            self
4446        }
4447
4448        /// Sets all the options, replacing any prior values.
4449        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4450            self.0.options = v.into();
4451            self
4452        }
4453
4454        /// Sends the request.
4455        pub async fn send(self) -> Result<crate::model::ListEntriesResponse> {
4456            (*self.0.stub)
4457                .list_entries(self.0.request, self.0.options)
4458                .await
4459                .map(crate::Response::into_body)
4460        }
4461
4462        /// Streams each page in the collection.
4463        pub fn by_page(
4464            self,
4465        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListEntriesResponse, crate::Error>
4466        {
4467            use std::clone::Clone;
4468            let token = self.0.request.page_token.clone();
4469            let execute = move |token: String| {
4470                let mut builder = self.clone();
4471                builder.0.request = builder.0.request.set_page_token(token);
4472                builder.send()
4473            };
4474            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4475        }
4476
4477        /// Streams each item in the collection.
4478        pub fn by_item(
4479            self,
4480        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4481            crate::model::ListEntriesResponse,
4482            crate::Error,
4483        > {
4484            use google_cloud_gax::paginator::Paginator;
4485            self.by_page().items()
4486        }
4487
4488        /// Sets the value of [parent][crate::model::ListEntriesRequest::parent].
4489        ///
4490        /// This is a **required** field for requests.
4491        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4492            self.0.request.parent = v.into();
4493            self
4494        }
4495
4496        /// Sets the value of [page_size][crate::model::ListEntriesRequest::page_size].
4497        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4498            self.0.request.page_size = v.into();
4499            self
4500        }
4501
4502        /// Sets the value of [page_token][crate::model::ListEntriesRequest::page_token].
4503        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4504            self.0.request.page_token = v.into();
4505            self
4506        }
4507
4508        /// Sets the value of [filter][crate::model::ListEntriesRequest::filter].
4509        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4510            self.0.request.filter = v.into();
4511            self
4512        }
4513    }
4514
4515    #[doc(hidden)]
4516    impl crate::RequestBuilder for ListEntries {
4517        fn request_options(&mut self) -> &mut crate::RequestOptions {
4518            &mut self.0.options
4519        }
4520    }
4521
4522    /// The request builder for [CatalogService::get_entry][crate::client::CatalogService::get_entry] calls.
4523    ///
4524    /// # Example
4525    /// ```
4526    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntry;
4527    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4528    ///
4529    /// let builder = prepare_request_builder();
4530    /// let response = builder.send().await?;
4531    /// # Ok(()) }
4532    ///
4533    /// fn prepare_request_builder() -> GetEntry {
4534    ///   # panic!();
4535    ///   // ... details omitted ...
4536    /// }
4537    /// ```
4538    #[derive(Clone, Debug)]
4539    pub struct GetEntry(RequestBuilder<crate::model::GetEntryRequest>);
4540
4541    impl GetEntry {
4542        pub(crate) fn new(
4543            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4544        ) -> Self {
4545            Self(RequestBuilder::new(stub))
4546        }
4547
4548        /// Sets the full request, replacing any prior values.
4549        pub fn with_request<V: Into<crate::model::GetEntryRequest>>(mut self, v: V) -> Self {
4550            self.0.request = v.into();
4551            self
4552        }
4553
4554        /// Sets all the options, replacing any prior values.
4555        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4556            self.0.options = v.into();
4557            self
4558        }
4559
4560        /// Sends the request.
4561        pub async fn send(self) -> Result<crate::model::Entry> {
4562            (*self.0.stub)
4563                .get_entry(self.0.request, self.0.options)
4564                .await
4565                .map(crate::Response::into_body)
4566        }
4567
4568        /// Sets the value of [name][crate::model::GetEntryRequest::name].
4569        ///
4570        /// This is a **required** field for requests.
4571        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4572            self.0.request.name = v.into();
4573            self
4574        }
4575
4576        /// Sets the value of [view][crate::model::GetEntryRequest::view].
4577        pub fn set_view<T: Into<crate::model::EntryView>>(mut self, v: T) -> Self {
4578            self.0.request.view = v.into();
4579            self
4580        }
4581
4582        /// Sets the value of [aspect_types][crate::model::GetEntryRequest::aspect_types].
4583        pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
4584        where
4585            T: std::iter::IntoIterator<Item = V>,
4586            V: std::convert::Into<std::string::String>,
4587        {
4588            use std::iter::Iterator;
4589            self.0.request.aspect_types = v.into_iter().map(|i| i.into()).collect();
4590            self
4591        }
4592
4593        /// Sets the value of [paths][crate::model::GetEntryRequest::paths].
4594        pub fn set_paths<T, V>(mut self, v: T) -> Self
4595        where
4596            T: std::iter::IntoIterator<Item = V>,
4597            V: std::convert::Into<std::string::String>,
4598        {
4599            use std::iter::Iterator;
4600            self.0.request.paths = v.into_iter().map(|i| i.into()).collect();
4601            self
4602        }
4603    }
4604
4605    #[doc(hidden)]
4606    impl crate::RequestBuilder for GetEntry {
4607        fn request_options(&mut self) -> &mut crate::RequestOptions {
4608            &mut self.0.options
4609        }
4610    }
4611
4612    /// The request builder for [CatalogService::lookup_entry][crate::client::CatalogService::lookup_entry] calls.
4613    ///
4614    /// # Example
4615    /// ```
4616    /// # use google_cloud_dataplex_v1::builder::catalog_service::LookupEntry;
4617    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4618    ///
4619    /// let builder = prepare_request_builder();
4620    /// let response = builder.send().await?;
4621    /// # Ok(()) }
4622    ///
4623    /// fn prepare_request_builder() -> LookupEntry {
4624    ///   # panic!();
4625    ///   // ... details omitted ...
4626    /// }
4627    /// ```
4628    #[derive(Clone, Debug)]
4629    pub struct LookupEntry(RequestBuilder<crate::model::LookupEntryRequest>);
4630
4631    impl LookupEntry {
4632        pub(crate) fn new(
4633            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4634        ) -> Self {
4635            Self(RequestBuilder::new(stub))
4636        }
4637
4638        /// Sets the full request, replacing any prior values.
4639        pub fn with_request<V: Into<crate::model::LookupEntryRequest>>(mut self, v: V) -> Self {
4640            self.0.request = v.into();
4641            self
4642        }
4643
4644        /// Sets all the options, replacing any prior values.
4645        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4646            self.0.options = v.into();
4647            self
4648        }
4649
4650        /// Sends the request.
4651        pub async fn send(self) -> Result<crate::model::Entry> {
4652            (*self.0.stub)
4653                .lookup_entry(self.0.request, self.0.options)
4654                .await
4655                .map(crate::Response::into_body)
4656        }
4657
4658        /// Sets the value of [name][crate::model::LookupEntryRequest::name].
4659        ///
4660        /// This is a **required** field for requests.
4661        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4662            self.0.request.name = v.into();
4663            self
4664        }
4665
4666        /// Sets the value of [view][crate::model::LookupEntryRequest::view].
4667        pub fn set_view<T: Into<crate::model::EntryView>>(mut self, v: T) -> Self {
4668            self.0.request.view = v.into();
4669            self
4670        }
4671
4672        /// Sets the value of [aspect_types][crate::model::LookupEntryRequest::aspect_types].
4673        pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
4674        where
4675            T: std::iter::IntoIterator<Item = V>,
4676            V: std::convert::Into<std::string::String>,
4677        {
4678            use std::iter::Iterator;
4679            self.0.request.aspect_types = v.into_iter().map(|i| i.into()).collect();
4680            self
4681        }
4682
4683        /// Sets the value of [paths][crate::model::LookupEntryRequest::paths].
4684        pub fn set_paths<T, V>(mut self, v: T) -> Self
4685        where
4686            T: std::iter::IntoIterator<Item = V>,
4687            V: std::convert::Into<std::string::String>,
4688        {
4689            use std::iter::Iterator;
4690            self.0.request.paths = v.into_iter().map(|i| i.into()).collect();
4691            self
4692        }
4693
4694        /// Sets the value of [entry][crate::model::LookupEntryRequest::entry].
4695        ///
4696        /// This is a **required** field for requests.
4697        pub fn set_entry<T: Into<std::string::String>>(mut self, v: T) -> Self {
4698            self.0.request.entry = v.into();
4699            self
4700        }
4701    }
4702
4703    #[doc(hidden)]
4704    impl crate::RequestBuilder for LookupEntry {
4705        fn request_options(&mut self) -> &mut crate::RequestOptions {
4706            &mut self.0.options
4707        }
4708    }
4709
4710    /// The request builder for [CatalogService::search_entries][crate::client::CatalogService::search_entries] calls.
4711    ///
4712    /// # Example
4713    /// ```
4714    /// # use google_cloud_dataplex_v1::builder::catalog_service::SearchEntries;
4715    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4716    /// use google_cloud_gax::paginator::ItemPaginator;
4717    ///
4718    /// let builder = prepare_request_builder();
4719    /// let mut items = builder.by_item();
4720    /// while let Some(result) = items.next().await {
4721    ///   let item = result?;
4722    /// }
4723    /// # Ok(()) }
4724    ///
4725    /// fn prepare_request_builder() -> SearchEntries {
4726    ///   # panic!();
4727    ///   // ... details omitted ...
4728    /// }
4729    /// ```
4730    #[derive(Clone, Debug)]
4731    pub struct SearchEntries(RequestBuilder<crate::model::SearchEntriesRequest>);
4732
4733    impl SearchEntries {
4734        pub(crate) fn new(
4735            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4736        ) -> Self {
4737            Self(RequestBuilder::new(stub))
4738        }
4739
4740        /// Sets the full request, replacing any prior values.
4741        pub fn with_request<V: Into<crate::model::SearchEntriesRequest>>(mut self, v: V) -> Self {
4742            self.0.request = v.into();
4743            self
4744        }
4745
4746        /// Sets all the options, replacing any prior values.
4747        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4748            self.0.options = v.into();
4749            self
4750        }
4751
4752        /// Sends the request.
4753        pub async fn send(self) -> Result<crate::model::SearchEntriesResponse> {
4754            (*self.0.stub)
4755                .search_entries(self.0.request, self.0.options)
4756                .await
4757                .map(crate::Response::into_body)
4758        }
4759
4760        /// Streams each page in the collection.
4761        pub fn by_page(
4762            self,
4763        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::SearchEntriesResponse, crate::Error>
4764        {
4765            use std::clone::Clone;
4766            let token = self.0.request.page_token.clone();
4767            let execute = move |token: String| {
4768                let mut builder = self.clone();
4769                builder.0.request = builder.0.request.set_page_token(token);
4770                builder.send()
4771            };
4772            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4773        }
4774
4775        /// Streams each item in the collection.
4776        pub fn by_item(
4777            self,
4778        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4779            crate::model::SearchEntriesResponse,
4780            crate::Error,
4781        > {
4782            use google_cloud_gax::paginator::Paginator;
4783            self.by_page().items()
4784        }
4785
4786        /// Sets the value of [name][crate::model::SearchEntriesRequest::name].
4787        ///
4788        /// This is a **required** field for requests.
4789        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4790            self.0.request.name = v.into();
4791            self
4792        }
4793
4794        /// Sets the value of [query][crate::model::SearchEntriesRequest::query].
4795        ///
4796        /// This is a **required** field for requests.
4797        pub fn set_query<T: Into<std::string::String>>(mut self, v: T) -> Self {
4798            self.0.request.query = v.into();
4799            self
4800        }
4801
4802        /// Sets the value of [page_size][crate::model::SearchEntriesRequest::page_size].
4803        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4804            self.0.request.page_size = v.into();
4805            self
4806        }
4807
4808        /// Sets the value of [page_token][crate::model::SearchEntriesRequest::page_token].
4809        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4810            self.0.request.page_token = v.into();
4811            self
4812        }
4813
4814        /// Sets the value of [order_by][crate::model::SearchEntriesRequest::order_by].
4815        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4816            self.0.request.order_by = v.into();
4817            self
4818        }
4819
4820        /// Sets the value of [scope][crate::model::SearchEntriesRequest::scope].
4821        pub fn set_scope<T: Into<std::string::String>>(mut self, v: T) -> Self {
4822            self.0.request.scope = v.into();
4823            self
4824        }
4825
4826        /// Sets the value of [semantic_search][crate::model::SearchEntriesRequest::semantic_search].
4827        pub fn set_semantic_search<T: Into<bool>>(mut self, v: T) -> Self {
4828            self.0.request.semantic_search = v.into();
4829            self
4830        }
4831    }
4832
4833    #[doc(hidden)]
4834    impl crate::RequestBuilder for SearchEntries {
4835        fn request_options(&mut self) -> &mut crate::RequestOptions {
4836            &mut self.0.options
4837        }
4838    }
4839
4840    /// The request builder for [CatalogService::create_metadata_job][crate::client::CatalogService::create_metadata_job] calls.
4841    ///
4842    /// # Example
4843    /// ```
4844    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateMetadataJob;
4845    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4846    /// use google_cloud_lro::Poller;
4847    ///
4848    /// let builder = prepare_request_builder();
4849    /// let response = builder.poller().until_done().await?;
4850    /// # Ok(()) }
4851    ///
4852    /// fn prepare_request_builder() -> CreateMetadataJob {
4853    ///   # panic!();
4854    ///   // ... details omitted ...
4855    /// }
4856    /// ```
4857    #[derive(Clone, Debug)]
4858    pub struct CreateMetadataJob(RequestBuilder<crate::model::CreateMetadataJobRequest>);
4859
4860    impl CreateMetadataJob {
4861        pub(crate) fn new(
4862            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4863        ) -> Self {
4864            Self(RequestBuilder::new(stub))
4865        }
4866
4867        /// Sets the full request, replacing any prior values.
4868        pub fn with_request<V: Into<crate::model::CreateMetadataJobRequest>>(
4869            mut self,
4870            v: V,
4871        ) -> Self {
4872            self.0.request = v.into();
4873            self
4874        }
4875
4876        /// Sets all the options, replacing any prior values.
4877        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4878            self.0.options = v.into();
4879            self
4880        }
4881
4882        /// Sends the request.
4883        ///
4884        /// # Long running operations
4885        ///
4886        /// This starts, but does not poll, a longrunning operation. More information
4887        /// on [create_metadata_job][crate::client::CatalogService::create_metadata_job].
4888        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4889            (*self.0.stub)
4890                .create_metadata_job(self.0.request, self.0.options)
4891                .await
4892                .map(crate::Response::into_body)
4893        }
4894
4895        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_metadata_job`.
4896        pub fn poller(
4897            self,
4898        ) -> impl google_cloud_lro::Poller<crate::model::MetadataJob, crate::model::OperationMetadata>
4899        {
4900            type Operation = google_cloud_lro::internal::Operation<
4901                crate::model::MetadataJob,
4902                crate::model::OperationMetadata,
4903            >;
4904            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4905            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4906
4907            let stub = self.0.stub.clone();
4908            let mut options = self.0.options.clone();
4909            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4910            let query = move |name| {
4911                let stub = stub.clone();
4912                let options = options.clone();
4913                async {
4914                    let op = GetOperation::new(stub)
4915                        .set_name(name)
4916                        .with_options(options)
4917                        .send()
4918                        .await?;
4919                    Ok(Operation::new(op))
4920                }
4921            };
4922
4923            let start = move || async {
4924                let op = self.send().await?;
4925                Ok(Operation::new(op))
4926            };
4927
4928            google_cloud_lro::internal::new_poller(
4929                polling_error_policy,
4930                polling_backoff_policy,
4931                start,
4932                query,
4933            )
4934        }
4935
4936        /// Sets the value of [parent][crate::model::CreateMetadataJobRequest::parent].
4937        ///
4938        /// This is a **required** field for requests.
4939        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4940            self.0.request.parent = v.into();
4941            self
4942        }
4943
4944        /// Sets the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
4945        ///
4946        /// This is a **required** field for requests.
4947        pub fn set_metadata_job<T>(mut self, v: T) -> Self
4948        where
4949            T: std::convert::Into<crate::model::MetadataJob>,
4950        {
4951            self.0.request.metadata_job = std::option::Option::Some(v.into());
4952            self
4953        }
4954
4955        /// Sets or clears the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
4956        ///
4957        /// This is a **required** field for requests.
4958        pub fn set_or_clear_metadata_job<T>(mut self, v: std::option::Option<T>) -> Self
4959        where
4960            T: std::convert::Into<crate::model::MetadataJob>,
4961        {
4962            self.0.request.metadata_job = v.map(|x| x.into());
4963            self
4964        }
4965
4966        /// Sets the value of [metadata_job_id][crate::model::CreateMetadataJobRequest::metadata_job_id].
4967        pub fn set_metadata_job_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4968            self.0.request.metadata_job_id = v.into();
4969            self
4970        }
4971
4972        /// Sets the value of [validate_only][crate::model::CreateMetadataJobRequest::validate_only].
4973        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
4974            self.0.request.validate_only = v.into();
4975            self
4976        }
4977    }
4978
4979    #[doc(hidden)]
4980    impl crate::RequestBuilder for CreateMetadataJob {
4981        fn request_options(&mut self) -> &mut crate::RequestOptions {
4982            &mut self.0.options
4983        }
4984    }
4985
4986    /// The request builder for [CatalogService::get_metadata_job][crate::client::CatalogService::get_metadata_job] calls.
4987    ///
4988    /// # Example
4989    /// ```
4990    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetMetadataJob;
4991    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4992    ///
4993    /// let builder = prepare_request_builder();
4994    /// let response = builder.send().await?;
4995    /// # Ok(()) }
4996    ///
4997    /// fn prepare_request_builder() -> GetMetadataJob {
4998    ///   # panic!();
4999    ///   // ... details omitted ...
5000    /// }
5001    /// ```
5002    #[derive(Clone, Debug)]
5003    pub struct GetMetadataJob(RequestBuilder<crate::model::GetMetadataJobRequest>);
5004
5005    impl GetMetadataJob {
5006        pub(crate) fn new(
5007            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5008        ) -> Self {
5009            Self(RequestBuilder::new(stub))
5010        }
5011
5012        /// Sets the full request, replacing any prior values.
5013        pub fn with_request<V: Into<crate::model::GetMetadataJobRequest>>(mut self, v: V) -> Self {
5014            self.0.request = v.into();
5015            self
5016        }
5017
5018        /// Sets all the options, replacing any prior values.
5019        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5020            self.0.options = v.into();
5021            self
5022        }
5023
5024        /// Sends the request.
5025        pub async fn send(self) -> Result<crate::model::MetadataJob> {
5026            (*self.0.stub)
5027                .get_metadata_job(self.0.request, self.0.options)
5028                .await
5029                .map(crate::Response::into_body)
5030        }
5031
5032        /// Sets the value of [name][crate::model::GetMetadataJobRequest::name].
5033        ///
5034        /// This is a **required** field for requests.
5035        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5036            self.0.request.name = v.into();
5037            self
5038        }
5039    }
5040
5041    #[doc(hidden)]
5042    impl crate::RequestBuilder for GetMetadataJob {
5043        fn request_options(&mut self) -> &mut crate::RequestOptions {
5044            &mut self.0.options
5045        }
5046    }
5047
5048    /// The request builder for [CatalogService::list_metadata_jobs][crate::client::CatalogService::list_metadata_jobs] calls.
5049    ///
5050    /// # Example
5051    /// ```
5052    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListMetadataJobs;
5053    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5054    /// use google_cloud_gax::paginator::ItemPaginator;
5055    ///
5056    /// let builder = prepare_request_builder();
5057    /// let mut items = builder.by_item();
5058    /// while let Some(result) = items.next().await {
5059    ///   let item = result?;
5060    /// }
5061    /// # Ok(()) }
5062    ///
5063    /// fn prepare_request_builder() -> ListMetadataJobs {
5064    ///   # panic!();
5065    ///   // ... details omitted ...
5066    /// }
5067    /// ```
5068    #[derive(Clone, Debug)]
5069    pub struct ListMetadataJobs(RequestBuilder<crate::model::ListMetadataJobsRequest>);
5070
5071    impl ListMetadataJobs {
5072        pub(crate) fn new(
5073            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5074        ) -> Self {
5075            Self(RequestBuilder::new(stub))
5076        }
5077
5078        /// Sets the full request, replacing any prior values.
5079        pub fn with_request<V: Into<crate::model::ListMetadataJobsRequest>>(
5080            mut self,
5081            v: V,
5082        ) -> Self {
5083            self.0.request = v.into();
5084            self
5085        }
5086
5087        /// Sets all the options, replacing any prior values.
5088        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5089            self.0.options = v.into();
5090            self
5091        }
5092
5093        /// Sends the request.
5094        pub async fn send(self) -> Result<crate::model::ListMetadataJobsResponse> {
5095            (*self.0.stub)
5096                .list_metadata_jobs(self.0.request, self.0.options)
5097                .await
5098                .map(crate::Response::into_body)
5099        }
5100
5101        /// Streams each page in the collection.
5102        pub fn by_page(
5103            self,
5104        ) -> impl google_cloud_gax::paginator::Paginator<
5105            crate::model::ListMetadataJobsResponse,
5106            crate::Error,
5107        > {
5108            use std::clone::Clone;
5109            let token = self.0.request.page_token.clone();
5110            let execute = move |token: String| {
5111                let mut builder = self.clone();
5112                builder.0.request = builder.0.request.set_page_token(token);
5113                builder.send()
5114            };
5115            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5116        }
5117
5118        /// Streams each item in the collection.
5119        pub fn by_item(
5120            self,
5121        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5122            crate::model::ListMetadataJobsResponse,
5123            crate::Error,
5124        > {
5125            use google_cloud_gax::paginator::Paginator;
5126            self.by_page().items()
5127        }
5128
5129        /// Sets the value of [parent][crate::model::ListMetadataJobsRequest::parent].
5130        ///
5131        /// This is a **required** field for requests.
5132        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5133            self.0.request.parent = v.into();
5134            self
5135        }
5136
5137        /// Sets the value of [page_size][crate::model::ListMetadataJobsRequest::page_size].
5138        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5139            self.0.request.page_size = v.into();
5140            self
5141        }
5142
5143        /// Sets the value of [page_token][crate::model::ListMetadataJobsRequest::page_token].
5144        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5145            self.0.request.page_token = v.into();
5146            self
5147        }
5148
5149        /// Sets the value of [filter][crate::model::ListMetadataJobsRequest::filter].
5150        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5151            self.0.request.filter = v.into();
5152            self
5153        }
5154
5155        /// Sets the value of [order_by][crate::model::ListMetadataJobsRequest::order_by].
5156        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5157            self.0.request.order_by = v.into();
5158            self
5159        }
5160    }
5161
5162    #[doc(hidden)]
5163    impl crate::RequestBuilder for ListMetadataJobs {
5164        fn request_options(&mut self) -> &mut crate::RequestOptions {
5165            &mut self.0.options
5166        }
5167    }
5168
5169    /// The request builder for [CatalogService::cancel_metadata_job][crate::client::CatalogService::cancel_metadata_job] calls.
5170    ///
5171    /// # Example
5172    /// ```
5173    /// # use google_cloud_dataplex_v1::builder::catalog_service::CancelMetadataJob;
5174    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5175    ///
5176    /// let builder = prepare_request_builder();
5177    /// let response = builder.send().await?;
5178    /// # Ok(()) }
5179    ///
5180    /// fn prepare_request_builder() -> CancelMetadataJob {
5181    ///   # panic!();
5182    ///   // ... details omitted ...
5183    /// }
5184    /// ```
5185    #[derive(Clone, Debug)]
5186    pub struct CancelMetadataJob(RequestBuilder<crate::model::CancelMetadataJobRequest>);
5187
5188    impl CancelMetadataJob {
5189        pub(crate) fn new(
5190            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5191        ) -> Self {
5192            Self(RequestBuilder::new(stub))
5193        }
5194
5195        /// Sets the full request, replacing any prior values.
5196        pub fn with_request<V: Into<crate::model::CancelMetadataJobRequest>>(
5197            mut self,
5198            v: V,
5199        ) -> Self {
5200            self.0.request = v.into();
5201            self
5202        }
5203
5204        /// Sets all the options, replacing any prior values.
5205        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5206            self.0.options = v.into();
5207            self
5208        }
5209
5210        /// Sends the request.
5211        pub async fn send(self) -> Result<()> {
5212            (*self.0.stub)
5213                .cancel_metadata_job(self.0.request, self.0.options)
5214                .await
5215                .map(crate::Response::into_body)
5216        }
5217
5218        /// Sets the value of [name][crate::model::CancelMetadataJobRequest::name].
5219        ///
5220        /// This is a **required** field for requests.
5221        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5222            self.0.request.name = v.into();
5223            self
5224        }
5225    }
5226
5227    #[doc(hidden)]
5228    impl crate::RequestBuilder for CancelMetadataJob {
5229        fn request_options(&mut self) -> &mut crate::RequestOptions {
5230            &mut self.0.options
5231        }
5232    }
5233
5234    /// The request builder for [CatalogService::create_entry_link][crate::client::CatalogService::create_entry_link] calls.
5235    ///
5236    /// # Example
5237    /// ```
5238    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntryLink;
5239    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5240    ///
5241    /// let builder = prepare_request_builder();
5242    /// let response = builder.send().await?;
5243    /// # Ok(()) }
5244    ///
5245    /// fn prepare_request_builder() -> CreateEntryLink {
5246    ///   # panic!();
5247    ///   // ... details omitted ...
5248    /// }
5249    /// ```
5250    #[derive(Clone, Debug)]
5251    pub struct CreateEntryLink(RequestBuilder<crate::model::CreateEntryLinkRequest>);
5252
5253    impl CreateEntryLink {
5254        pub(crate) fn new(
5255            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5256        ) -> Self {
5257            Self(RequestBuilder::new(stub))
5258        }
5259
5260        /// Sets the full request, replacing any prior values.
5261        pub fn with_request<V: Into<crate::model::CreateEntryLinkRequest>>(mut self, v: V) -> Self {
5262            self.0.request = v.into();
5263            self
5264        }
5265
5266        /// Sets all the options, replacing any prior values.
5267        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5268            self.0.options = v.into();
5269            self
5270        }
5271
5272        /// Sends the request.
5273        pub async fn send(self) -> Result<crate::model::EntryLink> {
5274            (*self.0.stub)
5275                .create_entry_link(self.0.request, self.0.options)
5276                .await
5277                .map(crate::Response::into_body)
5278        }
5279
5280        /// Sets the value of [parent][crate::model::CreateEntryLinkRequest::parent].
5281        ///
5282        /// This is a **required** field for requests.
5283        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5284            self.0.request.parent = v.into();
5285            self
5286        }
5287
5288        /// Sets the value of [entry_link_id][crate::model::CreateEntryLinkRequest::entry_link_id].
5289        ///
5290        /// This is a **required** field for requests.
5291        pub fn set_entry_link_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5292            self.0.request.entry_link_id = v.into();
5293            self
5294        }
5295
5296        /// Sets the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
5297        ///
5298        /// This is a **required** field for requests.
5299        pub fn set_entry_link<T>(mut self, v: T) -> Self
5300        where
5301            T: std::convert::Into<crate::model::EntryLink>,
5302        {
5303            self.0.request.entry_link = std::option::Option::Some(v.into());
5304            self
5305        }
5306
5307        /// Sets or clears the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
5308        ///
5309        /// This is a **required** field for requests.
5310        pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
5311        where
5312            T: std::convert::Into<crate::model::EntryLink>,
5313        {
5314            self.0.request.entry_link = v.map(|x| x.into());
5315            self
5316        }
5317    }
5318
5319    #[doc(hidden)]
5320    impl crate::RequestBuilder for CreateEntryLink {
5321        fn request_options(&mut self) -> &mut crate::RequestOptions {
5322            &mut self.0.options
5323        }
5324    }
5325
5326    /// The request builder for [CatalogService::update_entry_link][crate::client::CatalogService::update_entry_link] calls.
5327    ///
5328    /// # Example
5329    /// ```
5330    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntryLink;
5331    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5332    ///
5333    /// let builder = prepare_request_builder();
5334    /// let response = builder.send().await?;
5335    /// # Ok(()) }
5336    ///
5337    /// fn prepare_request_builder() -> UpdateEntryLink {
5338    ///   # panic!();
5339    ///   // ... details omitted ...
5340    /// }
5341    /// ```
5342    #[derive(Clone, Debug)]
5343    pub struct UpdateEntryLink(RequestBuilder<crate::model::UpdateEntryLinkRequest>);
5344
5345    impl UpdateEntryLink {
5346        pub(crate) fn new(
5347            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5348        ) -> Self {
5349            Self(RequestBuilder::new(stub))
5350        }
5351
5352        /// Sets the full request, replacing any prior values.
5353        pub fn with_request<V: Into<crate::model::UpdateEntryLinkRequest>>(mut self, v: V) -> Self {
5354            self.0.request = v.into();
5355            self
5356        }
5357
5358        /// Sets all the options, replacing any prior values.
5359        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5360            self.0.options = v.into();
5361            self
5362        }
5363
5364        /// Sends the request.
5365        pub async fn send(self) -> Result<crate::model::EntryLink> {
5366            (*self.0.stub)
5367                .update_entry_link(self.0.request, self.0.options)
5368                .await
5369                .map(crate::Response::into_body)
5370        }
5371
5372        /// Sets the value of [entry_link][crate::model::UpdateEntryLinkRequest::entry_link].
5373        ///
5374        /// This is a **required** field for requests.
5375        pub fn set_entry_link<T>(mut self, v: T) -> Self
5376        where
5377            T: std::convert::Into<crate::model::EntryLink>,
5378        {
5379            self.0.request.entry_link = std::option::Option::Some(v.into());
5380            self
5381        }
5382
5383        /// Sets or clears the value of [entry_link][crate::model::UpdateEntryLinkRequest::entry_link].
5384        ///
5385        /// This is a **required** field for requests.
5386        pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
5387        where
5388            T: std::convert::Into<crate::model::EntryLink>,
5389        {
5390            self.0.request.entry_link = v.map(|x| x.into());
5391            self
5392        }
5393
5394        /// Sets the value of [allow_missing][crate::model::UpdateEntryLinkRequest::allow_missing].
5395        pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
5396            self.0.request.allow_missing = v.into();
5397            self
5398        }
5399
5400        /// Sets the value of [aspect_keys][crate::model::UpdateEntryLinkRequest::aspect_keys].
5401        pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
5402        where
5403            T: std::iter::IntoIterator<Item = V>,
5404            V: std::convert::Into<std::string::String>,
5405        {
5406            use std::iter::Iterator;
5407            self.0.request.aspect_keys = v.into_iter().map(|i| i.into()).collect();
5408            self
5409        }
5410    }
5411
5412    #[doc(hidden)]
5413    impl crate::RequestBuilder for UpdateEntryLink {
5414        fn request_options(&mut self) -> &mut crate::RequestOptions {
5415            &mut self.0.options
5416        }
5417    }
5418
5419    /// The request builder for [CatalogService::delete_entry_link][crate::client::CatalogService::delete_entry_link] calls.
5420    ///
5421    /// # Example
5422    /// ```
5423    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntryLink;
5424    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5425    ///
5426    /// let builder = prepare_request_builder();
5427    /// let response = builder.send().await?;
5428    /// # Ok(()) }
5429    ///
5430    /// fn prepare_request_builder() -> DeleteEntryLink {
5431    ///   # panic!();
5432    ///   // ... details omitted ...
5433    /// }
5434    /// ```
5435    #[derive(Clone, Debug)]
5436    pub struct DeleteEntryLink(RequestBuilder<crate::model::DeleteEntryLinkRequest>);
5437
5438    impl DeleteEntryLink {
5439        pub(crate) fn new(
5440            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5441        ) -> Self {
5442            Self(RequestBuilder::new(stub))
5443        }
5444
5445        /// Sets the full request, replacing any prior values.
5446        pub fn with_request<V: Into<crate::model::DeleteEntryLinkRequest>>(mut self, v: V) -> Self {
5447            self.0.request = v.into();
5448            self
5449        }
5450
5451        /// Sets all the options, replacing any prior values.
5452        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5453            self.0.options = v.into();
5454            self
5455        }
5456
5457        /// Sends the request.
5458        pub async fn send(self) -> Result<crate::model::EntryLink> {
5459            (*self.0.stub)
5460                .delete_entry_link(self.0.request, self.0.options)
5461                .await
5462                .map(crate::Response::into_body)
5463        }
5464
5465        /// Sets the value of [name][crate::model::DeleteEntryLinkRequest::name].
5466        ///
5467        /// This is a **required** field for requests.
5468        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5469            self.0.request.name = v.into();
5470            self
5471        }
5472    }
5473
5474    #[doc(hidden)]
5475    impl crate::RequestBuilder for DeleteEntryLink {
5476        fn request_options(&mut self) -> &mut crate::RequestOptions {
5477            &mut self.0.options
5478        }
5479    }
5480
5481    /// The request builder for [CatalogService::lookup_entry_links][crate::client::CatalogService::lookup_entry_links] calls.
5482    ///
5483    /// # Example
5484    /// ```
5485    /// # use google_cloud_dataplex_v1::builder::catalog_service::LookupEntryLinks;
5486    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5487    /// use google_cloud_gax::paginator::ItemPaginator;
5488    ///
5489    /// let builder = prepare_request_builder();
5490    /// let mut items = builder.by_item();
5491    /// while let Some(result) = items.next().await {
5492    ///   let item = result?;
5493    /// }
5494    /// # Ok(()) }
5495    ///
5496    /// fn prepare_request_builder() -> LookupEntryLinks {
5497    ///   # panic!();
5498    ///   // ... details omitted ...
5499    /// }
5500    /// ```
5501    #[derive(Clone, Debug)]
5502    pub struct LookupEntryLinks(RequestBuilder<crate::model::LookupEntryLinksRequest>);
5503
5504    impl LookupEntryLinks {
5505        pub(crate) fn new(
5506            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5507        ) -> Self {
5508            Self(RequestBuilder::new(stub))
5509        }
5510
5511        /// Sets the full request, replacing any prior values.
5512        pub fn with_request<V: Into<crate::model::LookupEntryLinksRequest>>(
5513            mut self,
5514            v: V,
5515        ) -> Self {
5516            self.0.request = v.into();
5517            self
5518        }
5519
5520        /// Sets all the options, replacing any prior values.
5521        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5522            self.0.options = v.into();
5523            self
5524        }
5525
5526        /// Sends the request.
5527        pub async fn send(self) -> Result<crate::model::LookupEntryLinksResponse> {
5528            (*self.0.stub)
5529                .lookup_entry_links(self.0.request, self.0.options)
5530                .await
5531                .map(crate::Response::into_body)
5532        }
5533
5534        /// Streams each page in the collection.
5535        pub fn by_page(
5536            self,
5537        ) -> impl google_cloud_gax::paginator::Paginator<
5538            crate::model::LookupEntryLinksResponse,
5539            crate::Error,
5540        > {
5541            use std::clone::Clone;
5542            let token = self.0.request.page_token.clone();
5543            let execute = move |token: String| {
5544                let mut builder = self.clone();
5545                builder.0.request = builder.0.request.set_page_token(token);
5546                builder.send()
5547            };
5548            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5549        }
5550
5551        /// Streams each item in the collection.
5552        pub fn by_item(
5553            self,
5554        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5555            crate::model::LookupEntryLinksResponse,
5556            crate::Error,
5557        > {
5558            use google_cloud_gax::paginator::Paginator;
5559            self.by_page().items()
5560        }
5561
5562        /// Sets the value of [name][crate::model::LookupEntryLinksRequest::name].
5563        ///
5564        /// This is a **required** field for requests.
5565        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5566            self.0.request.name = v.into();
5567            self
5568        }
5569
5570        /// Sets the value of [entry][crate::model::LookupEntryLinksRequest::entry].
5571        ///
5572        /// This is a **required** field for requests.
5573        pub fn set_entry<T: Into<std::string::String>>(mut self, v: T) -> Self {
5574            self.0.request.entry = v.into();
5575            self
5576        }
5577
5578        /// Sets the value of [entry_mode][crate::model::LookupEntryLinksRequest::entry_mode].
5579        pub fn set_entry_mode<T: Into<crate::model::lookup_entry_links_request::EntryMode>>(
5580            mut self,
5581            v: T,
5582        ) -> Self {
5583            self.0.request.entry_mode = v.into();
5584            self
5585        }
5586
5587        /// Sets the value of [entry_link_types][crate::model::LookupEntryLinksRequest::entry_link_types].
5588        pub fn set_entry_link_types<T, V>(mut self, v: T) -> Self
5589        where
5590            T: std::iter::IntoIterator<Item = V>,
5591            V: std::convert::Into<std::string::String>,
5592        {
5593            use std::iter::Iterator;
5594            self.0.request.entry_link_types = v.into_iter().map(|i| i.into()).collect();
5595            self
5596        }
5597
5598        /// Sets the value of [page_size][crate::model::LookupEntryLinksRequest::page_size].
5599        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5600            self.0.request.page_size = v.into();
5601            self
5602        }
5603
5604        /// Sets the value of [page_token][crate::model::LookupEntryLinksRequest::page_token].
5605        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5606            self.0.request.page_token = v.into();
5607            self
5608        }
5609    }
5610
5611    #[doc(hidden)]
5612    impl crate::RequestBuilder for LookupEntryLinks {
5613        fn request_options(&mut self) -> &mut crate::RequestOptions {
5614            &mut self.0.options
5615        }
5616    }
5617
5618    /// The request builder for [CatalogService::lookup_context][crate::client::CatalogService::lookup_context] calls.
5619    ///
5620    /// # Example
5621    /// ```
5622    /// # use google_cloud_dataplex_v1::builder::catalog_service::LookupContext;
5623    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5624    ///
5625    /// let builder = prepare_request_builder();
5626    /// let response = builder.send().await?;
5627    /// # Ok(()) }
5628    ///
5629    /// fn prepare_request_builder() -> LookupContext {
5630    ///   # panic!();
5631    ///   // ... details omitted ...
5632    /// }
5633    /// ```
5634    #[derive(Clone, Debug)]
5635    pub struct LookupContext(RequestBuilder<crate::model::LookupContextRequest>);
5636
5637    impl LookupContext {
5638        pub(crate) fn new(
5639            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5640        ) -> Self {
5641            Self(RequestBuilder::new(stub))
5642        }
5643
5644        /// Sets the full request, replacing any prior values.
5645        pub fn with_request<V: Into<crate::model::LookupContextRequest>>(mut self, v: V) -> Self {
5646            self.0.request = v.into();
5647            self
5648        }
5649
5650        /// Sets all the options, replacing any prior values.
5651        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5652            self.0.options = v.into();
5653            self
5654        }
5655
5656        /// Sends the request.
5657        pub async fn send(self) -> Result<crate::model::LookupContextResponse> {
5658            (*self.0.stub)
5659                .lookup_context(self.0.request, self.0.options)
5660                .await
5661                .map(crate::Response::into_body)
5662        }
5663
5664        /// Sets the value of [name][crate::model::LookupContextRequest::name].
5665        ///
5666        /// This is a **required** field for requests.
5667        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5668            self.0.request.name = v.into();
5669            self
5670        }
5671
5672        /// Sets the value of [resources][crate::model::LookupContextRequest::resources].
5673        ///
5674        /// This is a **required** field for requests.
5675        pub fn set_resources<T, V>(mut self, v: T) -> Self
5676        where
5677            T: std::iter::IntoIterator<Item = V>,
5678            V: std::convert::Into<std::string::String>,
5679        {
5680            use std::iter::Iterator;
5681            self.0.request.resources = v.into_iter().map(|i| i.into()).collect();
5682            self
5683        }
5684
5685        /// Sets the value of [options][crate::model::LookupContextRequest::options].
5686        pub fn set_options<T, K, V>(mut self, v: T) -> Self
5687        where
5688            T: std::iter::IntoIterator<Item = (K, V)>,
5689            K: std::convert::Into<std::string::String>,
5690            V: std::convert::Into<std::string::String>,
5691        {
5692            self.0.request.options = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5693            self
5694        }
5695    }
5696
5697    #[doc(hidden)]
5698    impl crate::RequestBuilder for LookupContext {
5699        fn request_options(&mut self) -> &mut crate::RequestOptions {
5700            &mut self.0.options
5701        }
5702    }
5703
5704    /// The request builder for [CatalogService::get_entry_link][crate::client::CatalogService::get_entry_link] calls.
5705    ///
5706    /// # Example
5707    /// ```
5708    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntryLink;
5709    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5710    ///
5711    /// let builder = prepare_request_builder();
5712    /// let response = builder.send().await?;
5713    /// # Ok(()) }
5714    ///
5715    /// fn prepare_request_builder() -> GetEntryLink {
5716    ///   # panic!();
5717    ///   // ... details omitted ...
5718    /// }
5719    /// ```
5720    #[derive(Clone, Debug)]
5721    pub struct GetEntryLink(RequestBuilder<crate::model::GetEntryLinkRequest>);
5722
5723    impl GetEntryLink {
5724        pub(crate) fn new(
5725            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5726        ) -> Self {
5727            Self(RequestBuilder::new(stub))
5728        }
5729
5730        /// Sets the full request, replacing any prior values.
5731        pub fn with_request<V: Into<crate::model::GetEntryLinkRequest>>(mut self, v: V) -> Self {
5732            self.0.request = v.into();
5733            self
5734        }
5735
5736        /// Sets all the options, replacing any prior values.
5737        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5738            self.0.options = v.into();
5739            self
5740        }
5741
5742        /// Sends the request.
5743        pub async fn send(self) -> Result<crate::model::EntryLink> {
5744            (*self.0.stub)
5745                .get_entry_link(self.0.request, self.0.options)
5746                .await
5747                .map(crate::Response::into_body)
5748        }
5749
5750        /// Sets the value of [name][crate::model::GetEntryLinkRequest::name].
5751        ///
5752        /// This is a **required** field for requests.
5753        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5754            self.0.request.name = v.into();
5755            self
5756        }
5757    }
5758
5759    #[doc(hidden)]
5760    impl crate::RequestBuilder for GetEntryLink {
5761        fn request_options(&mut self) -> &mut crate::RequestOptions {
5762            &mut self.0.options
5763        }
5764    }
5765
5766    /// The request builder for [CatalogService::create_metadata_feed][crate::client::CatalogService::create_metadata_feed] calls.
5767    ///
5768    /// # Example
5769    /// ```
5770    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateMetadataFeed;
5771    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5772    /// use google_cloud_lro::Poller;
5773    ///
5774    /// let builder = prepare_request_builder();
5775    /// let response = builder.poller().until_done().await?;
5776    /// # Ok(()) }
5777    ///
5778    /// fn prepare_request_builder() -> CreateMetadataFeed {
5779    ///   # panic!();
5780    ///   // ... details omitted ...
5781    /// }
5782    /// ```
5783    #[derive(Clone, Debug)]
5784    pub struct CreateMetadataFeed(RequestBuilder<crate::model::CreateMetadataFeedRequest>);
5785
5786    impl CreateMetadataFeed {
5787        pub(crate) fn new(
5788            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5789        ) -> Self {
5790            Self(RequestBuilder::new(stub))
5791        }
5792
5793        /// Sets the full request, replacing any prior values.
5794        pub fn with_request<V: Into<crate::model::CreateMetadataFeedRequest>>(
5795            mut self,
5796            v: V,
5797        ) -> Self {
5798            self.0.request = v.into();
5799            self
5800        }
5801
5802        /// Sets all the options, replacing any prior values.
5803        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5804            self.0.options = v.into();
5805            self
5806        }
5807
5808        /// Sends the request.
5809        ///
5810        /// # Long running operations
5811        ///
5812        /// This starts, but does not poll, a longrunning operation. More information
5813        /// on [create_metadata_feed][crate::client::CatalogService::create_metadata_feed].
5814        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5815            (*self.0.stub)
5816                .create_metadata_feed(self.0.request, self.0.options)
5817                .await
5818                .map(crate::Response::into_body)
5819        }
5820
5821        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_metadata_feed`.
5822        pub fn poller(
5823            self,
5824        ) -> impl google_cloud_lro::Poller<crate::model::MetadataFeed, crate::model::OperationMetadata>
5825        {
5826            type Operation = google_cloud_lro::internal::Operation<
5827                crate::model::MetadataFeed,
5828                crate::model::OperationMetadata,
5829            >;
5830            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5831            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5832
5833            let stub = self.0.stub.clone();
5834            let mut options = self.0.options.clone();
5835            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5836            let query = move |name| {
5837                let stub = stub.clone();
5838                let options = options.clone();
5839                async {
5840                    let op = GetOperation::new(stub)
5841                        .set_name(name)
5842                        .with_options(options)
5843                        .send()
5844                        .await?;
5845                    Ok(Operation::new(op))
5846                }
5847            };
5848
5849            let start = move || async {
5850                let op = self.send().await?;
5851                Ok(Operation::new(op))
5852            };
5853
5854            google_cloud_lro::internal::new_poller(
5855                polling_error_policy,
5856                polling_backoff_policy,
5857                start,
5858                query,
5859            )
5860        }
5861
5862        /// Sets the value of [parent][crate::model::CreateMetadataFeedRequest::parent].
5863        ///
5864        /// This is a **required** field for requests.
5865        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5866            self.0.request.parent = v.into();
5867            self
5868        }
5869
5870        /// Sets the value of [metadata_feed][crate::model::CreateMetadataFeedRequest::metadata_feed].
5871        ///
5872        /// This is a **required** field for requests.
5873        pub fn set_metadata_feed<T>(mut self, v: T) -> Self
5874        where
5875            T: std::convert::Into<crate::model::MetadataFeed>,
5876        {
5877            self.0.request.metadata_feed = std::option::Option::Some(v.into());
5878            self
5879        }
5880
5881        /// Sets or clears the value of [metadata_feed][crate::model::CreateMetadataFeedRequest::metadata_feed].
5882        ///
5883        /// This is a **required** field for requests.
5884        pub fn set_or_clear_metadata_feed<T>(mut self, v: std::option::Option<T>) -> Self
5885        where
5886            T: std::convert::Into<crate::model::MetadataFeed>,
5887        {
5888            self.0.request.metadata_feed = v.map(|x| x.into());
5889            self
5890        }
5891
5892        /// Sets the value of [metadata_feed_id][crate::model::CreateMetadataFeedRequest::metadata_feed_id].
5893        pub fn set_metadata_feed_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5894            self.0.request.metadata_feed_id = v.into();
5895            self
5896        }
5897
5898        /// Sets the value of [validate_only][crate::model::CreateMetadataFeedRequest::validate_only].
5899        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
5900            self.0.request.validate_only = v.into();
5901            self
5902        }
5903    }
5904
5905    #[doc(hidden)]
5906    impl crate::RequestBuilder for CreateMetadataFeed {
5907        fn request_options(&mut self) -> &mut crate::RequestOptions {
5908            &mut self.0.options
5909        }
5910    }
5911
5912    /// The request builder for [CatalogService::get_metadata_feed][crate::client::CatalogService::get_metadata_feed] calls.
5913    ///
5914    /// # Example
5915    /// ```
5916    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetMetadataFeed;
5917    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5918    ///
5919    /// let builder = prepare_request_builder();
5920    /// let response = builder.send().await?;
5921    /// # Ok(()) }
5922    ///
5923    /// fn prepare_request_builder() -> GetMetadataFeed {
5924    ///   # panic!();
5925    ///   // ... details omitted ...
5926    /// }
5927    /// ```
5928    #[derive(Clone, Debug)]
5929    pub struct GetMetadataFeed(RequestBuilder<crate::model::GetMetadataFeedRequest>);
5930
5931    impl GetMetadataFeed {
5932        pub(crate) fn new(
5933            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5934        ) -> Self {
5935            Self(RequestBuilder::new(stub))
5936        }
5937
5938        /// Sets the full request, replacing any prior values.
5939        pub fn with_request<V: Into<crate::model::GetMetadataFeedRequest>>(mut self, v: V) -> Self {
5940            self.0.request = v.into();
5941            self
5942        }
5943
5944        /// Sets all the options, replacing any prior values.
5945        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5946            self.0.options = v.into();
5947            self
5948        }
5949
5950        /// Sends the request.
5951        pub async fn send(self) -> Result<crate::model::MetadataFeed> {
5952            (*self.0.stub)
5953                .get_metadata_feed(self.0.request, self.0.options)
5954                .await
5955                .map(crate::Response::into_body)
5956        }
5957
5958        /// Sets the value of [name][crate::model::GetMetadataFeedRequest::name].
5959        ///
5960        /// This is a **required** field for requests.
5961        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5962            self.0.request.name = v.into();
5963            self
5964        }
5965    }
5966
5967    #[doc(hidden)]
5968    impl crate::RequestBuilder for GetMetadataFeed {
5969        fn request_options(&mut self) -> &mut crate::RequestOptions {
5970            &mut self.0.options
5971        }
5972    }
5973
5974    /// The request builder for [CatalogService::list_metadata_feeds][crate::client::CatalogService::list_metadata_feeds] calls.
5975    ///
5976    /// # Example
5977    /// ```
5978    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListMetadataFeeds;
5979    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5980    /// use google_cloud_gax::paginator::ItemPaginator;
5981    ///
5982    /// let builder = prepare_request_builder();
5983    /// let mut items = builder.by_item();
5984    /// while let Some(result) = items.next().await {
5985    ///   let item = result?;
5986    /// }
5987    /// # Ok(()) }
5988    ///
5989    /// fn prepare_request_builder() -> ListMetadataFeeds {
5990    ///   # panic!();
5991    ///   // ... details omitted ...
5992    /// }
5993    /// ```
5994    #[derive(Clone, Debug)]
5995    pub struct ListMetadataFeeds(RequestBuilder<crate::model::ListMetadataFeedsRequest>);
5996
5997    impl ListMetadataFeeds {
5998        pub(crate) fn new(
5999            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6000        ) -> Self {
6001            Self(RequestBuilder::new(stub))
6002        }
6003
6004        /// Sets the full request, replacing any prior values.
6005        pub fn with_request<V: Into<crate::model::ListMetadataFeedsRequest>>(
6006            mut self,
6007            v: V,
6008        ) -> Self {
6009            self.0.request = v.into();
6010            self
6011        }
6012
6013        /// Sets all the options, replacing any prior values.
6014        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6015            self.0.options = v.into();
6016            self
6017        }
6018
6019        /// Sends the request.
6020        pub async fn send(self) -> Result<crate::model::ListMetadataFeedsResponse> {
6021            (*self.0.stub)
6022                .list_metadata_feeds(self.0.request, self.0.options)
6023                .await
6024                .map(crate::Response::into_body)
6025        }
6026
6027        /// Streams each page in the collection.
6028        pub fn by_page(
6029            self,
6030        ) -> impl google_cloud_gax::paginator::Paginator<
6031            crate::model::ListMetadataFeedsResponse,
6032            crate::Error,
6033        > {
6034            use std::clone::Clone;
6035            let token = self.0.request.page_token.clone();
6036            let execute = move |token: String| {
6037                let mut builder = self.clone();
6038                builder.0.request = builder.0.request.set_page_token(token);
6039                builder.send()
6040            };
6041            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6042        }
6043
6044        /// Streams each item in the collection.
6045        pub fn by_item(
6046            self,
6047        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6048            crate::model::ListMetadataFeedsResponse,
6049            crate::Error,
6050        > {
6051            use google_cloud_gax::paginator::Paginator;
6052            self.by_page().items()
6053        }
6054
6055        /// Sets the value of [parent][crate::model::ListMetadataFeedsRequest::parent].
6056        ///
6057        /// This is a **required** field for requests.
6058        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6059            self.0.request.parent = v.into();
6060            self
6061        }
6062
6063        /// Sets the value of [page_size][crate::model::ListMetadataFeedsRequest::page_size].
6064        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6065            self.0.request.page_size = v.into();
6066            self
6067        }
6068
6069        /// Sets the value of [page_token][crate::model::ListMetadataFeedsRequest::page_token].
6070        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6071            self.0.request.page_token = v.into();
6072            self
6073        }
6074
6075        /// Sets the value of [filter][crate::model::ListMetadataFeedsRequest::filter].
6076        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6077            self.0.request.filter = v.into();
6078            self
6079        }
6080
6081        /// Sets the value of [order_by][crate::model::ListMetadataFeedsRequest::order_by].
6082        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6083            self.0.request.order_by = v.into();
6084            self
6085        }
6086    }
6087
6088    #[doc(hidden)]
6089    impl crate::RequestBuilder for ListMetadataFeeds {
6090        fn request_options(&mut self) -> &mut crate::RequestOptions {
6091            &mut self.0.options
6092        }
6093    }
6094
6095    /// The request builder for [CatalogService::delete_metadata_feed][crate::client::CatalogService::delete_metadata_feed] calls.
6096    ///
6097    /// # Example
6098    /// ```
6099    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteMetadataFeed;
6100    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6101    /// use google_cloud_lro::Poller;
6102    ///
6103    /// let builder = prepare_request_builder();
6104    /// let response = builder.poller().until_done().await?;
6105    /// # Ok(()) }
6106    ///
6107    /// fn prepare_request_builder() -> DeleteMetadataFeed {
6108    ///   # panic!();
6109    ///   // ... details omitted ...
6110    /// }
6111    /// ```
6112    #[derive(Clone, Debug)]
6113    pub struct DeleteMetadataFeed(RequestBuilder<crate::model::DeleteMetadataFeedRequest>);
6114
6115    impl DeleteMetadataFeed {
6116        pub(crate) fn new(
6117            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6118        ) -> Self {
6119            Self(RequestBuilder::new(stub))
6120        }
6121
6122        /// Sets the full request, replacing any prior values.
6123        pub fn with_request<V: Into<crate::model::DeleteMetadataFeedRequest>>(
6124            mut self,
6125            v: V,
6126        ) -> Self {
6127            self.0.request = v.into();
6128            self
6129        }
6130
6131        /// Sets all the options, replacing any prior values.
6132        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6133            self.0.options = v.into();
6134            self
6135        }
6136
6137        /// Sends the request.
6138        ///
6139        /// # Long running operations
6140        ///
6141        /// This starts, but does not poll, a longrunning operation. More information
6142        /// on [delete_metadata_feed][crate::client::CatalogService::delete_metadata_feed].
6143        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6144            (*self.0.stub)
6145                .delete_metadata_feed(self.0.request, self.0.options)
6146                .await
6147                .map(crate::Response::into_body)
6148        }
6149
6150        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_metadata_feed`.
6151        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6152            type Operation =
6153                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6154            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6155            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6156
6157            let stub = self.0.stub.clone();
6158            let mut options = self.0.options.clone();
6159            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6160            let query = move |name| {
6161                let stub = stub.clone();
6162                let options = options.clone();
6163                async {
6164                    let op = GetOperation::new(stub)
6165                        .set_name(name)
6166                        .with_options(options)
6167                        .send()
6168                        .await?;
6169                    Ok(Operation::new(op))
6170                }
6171            };
6172
6173            let start = move || async {
6174                let op = self.send().await?;
6175                Ok(Operation::new(op))
6176            };
6177
6178            google_cloud_lro::internal::new_unit_response_poller(
6179                polling_error_policy,
6180                polling_backoff_policy,
6181                start,
6182                query,
6183            )
6184        }
6185
6186        /// Sets the value of [name][crate::model::DeleteMetadataFeedRequest::name].
6187        ///
6188        /// This is a **required** field for requests.
6189        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6190            self.0.request.name = v.into();
6191            self
6192        }
6193    }
6194
6195    #[doc(hidden)]
6196    impl crate::RequestBuilder for DeleteMetadataFeed {
6197        fn request_options(&mut self) -> &mut crate::RequestOptions {
6198            &mut self.0.options
6199        }
6200    }
6201
6202    /// The request builder for [CatalogService::update_metadata_feed][crate::client::CatalogService::update_metadata_feed] calls.
6203    ///
6204    /// # Example
6205    /// ```
6206    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateMetadataFeed;
6207    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6208    /// use google_cloud_lro::Poller;
6209    ///
6210    /// let builder = prepare_request_builder();
6211    /// let response = builder.poller().until_done().await?;
6212    /// # Ok(()) }
6213    ///
6214    /// fn prepare_request_builder() -> UpdateMetadataFeed {
6215    ///   # panic!();
6216    ///   // ... details omitted ...
6217    /// }
6218    /// ```
6219    #[derive(Clone, Debug)]
6220    pub struct UpdateMetadataFeed(RequestBuilder<crate::model::UpdateMetadataFeedRequest>);
6221
6222    impl UpdateMetadataFeed {
6223        pub(crate) fn new(
6224            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6225        ) -> Self {
6226            Self(RequestBuilder::new(stub))
6227        }
6228
6229        /// Sets the full request, replacing any prior values.
6230        pub fn with_request<V: Into<crate::model::UpdateMetadataFeedRequest>>(
6231            mut self,
6232            v: V,
6233        ) -> Self {
6234            self.0.request = v.into();
6235            self
6236        }
6237
6238        /// Sets all the options, replacing any prior values.
6239        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6240            self.0.options = v.into();
6241            self
6242        }
6243
6244        /// Sends the request.
6245        ///
6246        /// # Long running operations
6247        ///
6248        /// This starts, but does not poll, a longrunning operation. More information
6249        /// on [update_metadata_feed][crate::client::CatalogService::update_metadata_feed].
6250        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6251            (*self.0.stub)
6252                .update_metadata_feed(self.0.request, self.0.options)
6253                .await
6254                .map(crate::Response::into_body)
6255        }
6256
6257        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_metadata_feed`.
6258        pub fn poller(
6259            self,
6260        ) -> impl google_cloud_lro::Poller<crate::model::MetadataFeed, crate::model::OperationMetadata>
6261        {
6262            type Operation = google_cloud_lro::internal::Operation<
6263                crate::model::MetadataFeed,
6264                crate::model::OperationMetadata,
6265            >;
6266            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6267            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6268
6269            let stub = self.0.stub.clone();
6270            let mut options = self.0.options.clone();
6271            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6272            let query = move |name| {
6273                let stub = stub.clone();
6274                let options = options.clone();
6275                async {
6276                    let op = GetOperation::new(stub)
6277                        .set_name(name)
6278                        .with_options(options)
6279                        .send()
6280                        .await?;
6281                    Ok(Operation::new(op))
6282                }
6283            };
6284
6285            let start = move || async {
6286                let op = self.send().await?;
6287                Ok(Operation::new(op))
6288            };
6289
6290            google_cloud_lro::internal::new_poller(
6291                polling_error_policy,
6292                polling_backoff_policy,
6293                start,
6294                query,
6295            )
6296        }
6297
6298        /// Sets the value of [metadata_feed][crate::model::UpdateMetadataFeedRequest::metadata_feed].
6299        ///
6300        /// This is a **required** field for requests.
6301        pub fn set_metadata_feed<T>(mut self, v: T) -> Self
6302        where
6303            T: std::convert::Into<crate::model::MetadataFeed>,
6304        {
6305            self.0.request.metadata_feed = std::option::Option::Some(v.into());
6306            self
6307        }
6308
6309        /// Sets or clears the value of [metadata_feed][crate::model::UpdateMetadataFeedRequest::metadata_feed].
6310        ///
6311        /// This is a **required** field for requests.
6312        pub fn set_or_clear_metadata_feed<T>(mut self, v: std::option::Option<T>) -> Self
6313        where
6314            T: std::convert::Into<crate::model::MetadataFeed>,
6315        {
6316            self.0.request.metadata_feed = v.map(|x| x.into());
6317            self
6318        }
6319
6320        /// Sets the value of [update_mask][crate::model::UpdateMetadataFeedRequest::update_mask].
6321        pub fn set_update_mask<T>(mut self, v: T) -> Self
6322        where
6323            T: std::convert::Into<wkt::FieldMask>,
6324        {
6325            self.0.request.update_mask = std::option::Option::Some(v.into());
6326            self
6327        }
6328
6329        /// Sets or clears the value of [update_mask][crate::model::UpdateMetadataFeedRequest::update_mask].
6330        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6331        where
6332            T: std::convert::Into<wkt::FieldMask>,
6333        {
6334            self.0.request.update_mask = v.map(|x| x.into());
6335            self
6336        }
6337
6338        /// Sets the value of [validate_only][crate::model::UpdateMetadataFeedRequest::validate_only].
6339        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
6340            self.0.request.validate_only = v.into();
6341            self
6342        }
6343    }
6344
6345    #[doc(hidden)]
6346    impl crate::RequestBuilder for UpdateMetadataFeed {
6347        fn request_options(&mut self) -> &mut crate::RequestOptions {
6348            &mut self.0.options
6349        }
6350    }
6351
6352    /// The request builder for [CatalogService::list_locations][crate::client::CatalogService::list_locations] calls.
6353    ///
6354    /// # Example
6355    /// ```
6356    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListLocations;
6357    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6358    /// use google_cloud_gax::paginator::ItemPaginator;
6359    ///
6360    /// let builder = prepare_request_builder();
6361    /// let mut items = builder.by_item();
6362    /// while let Some(result) = items.next().await {
6363    ///   let item = result?;
6364    /// }
6365    /// # Ok(()) }
6366    ///
6367    /// fn prepare_request_builder() -> ListLocations {
6368    ///   # panic!();
6369    ///   // ... details omitted ...
6370    /// }
6371    /// ```
6372    #[derive(Clone, Debug)]
6373    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
6374
6375    impl ListLocations {
6376        pub(crate) fn new(
6377            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6378        ) -> Self {
6379            Self(RequestBuilder::new(stub))
6380        }
6381
6382        /// Sets the full request, replacing any prior values.
6383        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
6384            mut self,
6385            v: V,
6386        ) -> Self {
6387            self.0.request = v.into();
6388            self
6389        }
6390
6391        /// Sets all the options, replacing any prior values.
6392        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6393            self.0.options = v.into();
6394            self
6395        }
6396
6397        /// Sends the request.
6398        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
6399            (*self.0.stub)
6400                .list_locations(self.0.request, self.0.options)
6401                .await
6402                .map(crate::Response::into_body)
6403        }
6404
6405        /// Streams each page in the collection.
6406        pub fn by_page(
6407            self,
6408        ) -> impl google_cloud_gax::paginator::Paginator<
6409            google_cloud_location::model::ListLocationsResponse,
6410            crate::Error,
6411        > {
6412            use std::clone::Clone;
6413            let token = self.0.request.page_token.clone();
6414            let execute = move |token: String| {
6415                let mut builder = self.clone();
6416                builder.0.request = builder.0.request.set_page_token(token);
6417                builder.send()
6418            };
6419            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6420        }
6421
6422        /// Streams each item in the collection.
6423        pub fn by_item(
6424            self,
6425        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6426            google_cloud_location::model::ListLocationsResponse,
6427            crate::Error,
6428        > {
6429            use google_cloud_gax::paginator::Paginator;
6430            self.by_page().items()
6431        }
6432
6433        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
6434        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6435            self.0.request.name = v.into();
6436            self
6437        }
6438
6439        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
6440        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6441            self.0.request.filter = v.into();
6442            self
6443        }
6444
6445        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
6446        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6447            self.0.request.page_size = v.into();
6448            self
6449        }
6450
6451        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
6452        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6453            self.0.request.page_token = v.into();
6454            self
6455        }
6456    }
6457
6458    #[doc(hidden)]
6459    impl crate::RequestBuilder for ListLocations {
6460        fn request_options(&mut self) -> &mut crate::RequestOptions {
6461            &mut self.0.options
6462        }
6463    }
6464
6465    /// The request builder for [CatalogService::get_location][crate::client::CatalogService::get_location] calls.
6466    ///
6467    /// # Example
6468    /// ```
6469    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetLocation;
6470    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6471    ///
6472    /// let builder = prepare_request_builder();
6473    /// let response = builder.send().await?;
6474    /// # Ok(()) }
6475    ///
6476    /// fn prepare_request_builder() -> GetLocation {
6477    ///   # panic!();
6478    ///   // ... details omitted ...
6479    /// }
6480    /// ```
6481    #[derive(Clone, Debug)]
6482    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
6483
6484    impl GetLocation {
6485        pub(crate) fn new(
6486            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6487        ) -> Self {
6488            Self(RequestBuilder::new(stub))
6489        }
6490
6491        /// Sets the full request, replacing any prior values.
6492        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
6493            mut self,
6494            v: V,
6495        ) -> Self {
6496            self.0.request = v.into();
6497            self
6498        }
6499
6500        /// Sets all the options, replacing any prior values.
6501        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6502            self.0.options = v.into();
6503            self
6504        }
6505
6506        /// Sends the request.
6507        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
6508            (*self.0.stub)
6509                .get_location(self.0.request, self.0.options)
6510                .await
6511                .map(crate::Response::into_body)
6512        }
6513
6514        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
6515        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6516            self.0.request.name = v.into();
6517            self
6518        }
6519    }
6520
6521    #[doc(hidden)]
6522    impl crate::RequestBuilder for GetLocation {
6523        fn request_options(&mut self) -> &mut crate::RequestOptions {
6524            &mut self.0.options
6525        }
6526    }
6527
6528    /// The request builder for [CatalogService::set_iam_policy][crate::client::CatalogService::set_iam_policy] calls.
6529    ///
6530    /// # Example
6531    /// ```
6532    /// # use google_cloud_dataplex_v1::builder::catalog_service::SetIamPolicy;
6533    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6534    ///
6535    /// let builder = prepare_request_builder();
6536    /// let response = builder.send().await?;
6537    /// # Ok(()) }
6538    ///
6539    /// fn prepare_request_builder() -> SetIamPolicy {
6540    ///   # panic!();
6541    ///   // ... details omitted ...
6542    /// }
6543    /// ```
6544    #[derive(Clone, Debug)]
6545    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
6546
6547    impl SetIamPolicy {
6548        pub(crate) fn new(
6549            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6550        ) -> Self {
6551            Self(RequestBuilder::new(stub))
6552        }
6553
6554        /// Sets the full request, replacing any prior values.
6555        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
6556            mut self,
6557            v: V,
6558        ) -> Self {
6559            self.0.request = v.into();
6560            self
6561        }
6562
6563        /// Sets all the options, replacing any prior values.
6564        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6565            self.0.options = v.into();
6566            self
6567        }
6568
6569        /// Sends the request.
6570        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
6571            (*self.0.stub)
6572                .set_iam_policy(self.0.request, self.0.options)
6573                .await
6574                .map(crate::Response::into_body)
6575        }
6576
6577        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
6578        ///
6579        /// This is a **required** field for requests.
6580        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6581            self.0.request.resource = v.into();
6582            self
6583        }
6584
6585        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
6586        ///
6587        /// This is a **required** field for requests.
6588        pub fn set_policy<T>(mut self, v: T) -> Self
6589        where
6590            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
6591        {
6592            self.0.request.policy = std::option::Option::Some(v.into());
6593            self
6594        }
6595
6596        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
6597        ///
6598        /// This is a **required** field for requests.
6599        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
6600        where
6601            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
6602        {
6603            self.0.request.policy = v.map(|x| x.into());
6604            self
6605        }
6606
6607        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
6608        pub fn set_update_mask<T>(mut self, v: T) -> Self
6609        where
6610            T: std::convert::Into<wkt::FieldMask>,
6611        {
6612            self.0.request.update_mask = std::option::Option::Some(v.into());
6613            self
6614        }
6615
6616        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
6617        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6618        where
6619            T: std::convert::Into<wkt::FieldMask>,
6620        {
6621            self.0.request.update_mask = v.map(|x| x.into());
6622            self
6623        }
6624    }
6625
6626    #[doc(hidden)]
6627    impl crate::RequestBuilder for SetIamPolicy {
6628        fn request_options(&mut self) -> &mut crate::RequestOptions {
6629            &mut self.0.options
6630        }
6631    }
6632
6633    /// The request builder for [CatalogService::get_iam_policy][crate::client::CatalogService::get_iam_policy] calls.
6634    ///
6635    /// # Example
6636    /// ```
6637    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetIamPolicy;
6638    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6639    ///
6640    /// let builder = prepare_request_builder();
6641    /// let response = builder.send().await?;
6642    /// # Ok(()) }
6643    ///
6644    /// fn prepare_request_builder() -> GetIamPolicy {
6645    ///   # panic!();
6646    ///   // ... details omitted ...
6647    /// }
6648    /// ```
6649    #[derive(Clone, Debug)]
6650    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
6651
6652    impl GetIamPolicy {
6653        pub(crate) fn new(
6654            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6655        ) -> Self {
6656            Self(RequestBuilder::new(stub))
6657        }
6658
6659        /// Sets the full request, replacing any prior values.
6660        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
6661            mut self,
6662            v: V,
6663        ) -> Self {
6664            self.0.request = v.into();
6665            self
6666        }
6667
6668        /// Sets all the options, replacing any prior values.
6669        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6670            self.0.options = v.into();
6671            self
6672        }
6673
6674        /// Sends the request.
6675        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
6676            (*self.0.stub)
6677                .get_iam_policy(self.0.request, self.0.options)
6678                .await
6679                .map(crate::Response::into_body)
6680        }
6681
6682        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
6683        ///
6684        /// This is a **required** field for requests.
6685        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6686            self.0.request.resource = v.into();
6687            self
6688        }
6689
6690        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
6691        pub fn set_options<T>(mut self, v: T) -> Self
6692        where
6693            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
6694        {
6695            self.0.request.options = std::option::Option::Some(v.into());
6696            self
6697        }
6698
6699        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
6700        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
6701        where
6702            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
6703        {
6704            self.0.request.options = v.map(|x| x.into());
6705            self
6706        }
6707    }
6708
6709    #[doc(hidden)]
6710    impl crate::RequestBuilder for GetIamPolicy {
6711        fn request_options(&mut self) -> &mut crate::RequestOptions {
6712            &mut self.0.options
6713        }
6714    }
6715
6716    /// The request builder for [CatalogService::test_iam_permissions][crate::client::CatalogService::test_iam_permissions] calls.
6717    ///
6718    /// # Example
6719    /// ```
6720    /// # use google_cloud_dataplex_v1::builder::catalog_service::TestIamPermissions;
6721    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6722    ///
6723    /// let builder = prepare_request_builder();
6724    /// let response = builder.send().await?;
6725    /// # Ok(()) }
6726    ///
6727    /// fn prepare_request_builder() -> TestIamPermissions {
6728    ///   # panic!();
6729    ///   // ... details omitted ...
6730    /// }
6731    /// ```
6732    #[derive(Clone, Debug)]
6733    pub struct TestIamPermissions(
6734        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
6735    );
6736
6737    impl TestIamPermissions {
6738        pub(crate) fn new(
6739            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6740        ) -> Self {
6741            Self(RequestBuilder::new(stub))
6742        }
6743
6744        /// Sets the full request, replacing any prior values.
6745        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
6746            mut self,
6747            v: V,
6748        ) -> Self {
6749            self.0.request = v.into();
6750            self
6751        }
6752
6753        /// Sets all the options, replacing any prior values.
6754        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6755            self.0.options = v.into();
6756            self
6757        }
6758
6759        /// Sends the request.
6760        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
6761            (*self.0.stub)
6762                .test_iam_permissions(self.0.request, self.0.options)
6763                .await
6764                .map(crate::Response::into_body)
6765        }
6766
6767        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
6768        ///
6769        /// This is a **required** field for requests.
6770        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6771            self.0.request.resource = v.into();
6772            self
6773        }
6774
6775        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
6776        ///
6777        /// This is a **required** field for requests.
6778        pub fn set_permissions<T, V>(mut self, v: T) -> Self
6779        where
6780            T: std::iter::IntoIterator<Item = V>,
6781            V: std::convert::Into<std::string::String>,
6782        {
6783            use std::iter::Iterator;
6784            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
6785            self
6786        }
6787    }
6788
6789    #[doc(hidden)]
6790    impl crate::RequestBuilder for TestIamPermissions {
6791        fn request_options(&mut self) -> &mut crate::RequestOptions {
6792            &mut self.0.options
6793        }
6794    }
6795
6796    /// The request builder for [CatalogService::list_operations][crate::client::CatalogService::list_operations] calls.
6797    ///
6798    /// # Example
6799    /// ```
6800    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListOperations;
6801    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6802    /// use google_cloud_gax::paginator::ItemPaginator;
6803    ///
6804    /// let builder = prepare_request_builder();
6805    /// let mut items = builder.by_item();
6806    /// while let Some(result) = items.next().await {
6807    ///   let item = result?;
6808    /// }
6809    /// # Ok(()) }
6810    ///
6811    /// fn prepare_request_builder() -> ListOperations {
6812    ///   # panic!();
6813    ///   // ... details omitted ...
6814    /// }
6815    /// ```
6816    #[derive(Clone, Debug)]
6817    pub struct ListOperations(
6818        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
6819    );
6820
6821    impl ListOperations {
6822        pub(crate) fn new(
6823            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6824        ) -> Self {
6825            Self(RequestBuilder::new(stub))
6826        }
6827
6828        /// Sets the full request, replacing any prior values.
6829        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
6830            mut self,
6831            v: V,
6832        ) -> Self {
6833            self.0.request = v.into();
6834            self
6835        }
6836
6837        /// Sets all the options, replacing any prior values.
6838        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6839            self.0.options = v.into();
6840            self
6841        }
6842
6843        /// Sends the request.
6844        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
6845            (*self.0.stub)
6846                .list_operations(self.0.request, self.0.options)
6847                .await
6848                .map(crate::Response::into_body)
6849        }
6850
6851        /// Streams each page in the collection.
6852        pub fn by_page(
6853            self,
6854        ) -> impl google_cloud_gax::paginator::Paginator<
6855            google_cloud_longrunning::model::ListOperationsResponse,
6856            crate::Error,
6857        > {
6858            use std::clone::Clone;
6859            let token = self.0.request.page_token.clone();
6860            let execute = move |token: String| {
6861                let mut builder = self.clone();
6862                builder.0.request = builder.0.request.set_page_token(token);
6863                builder.send()
6864            };
6865            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6866        }
6867
6868        /// Streams each item in the collection.
6869        pub fn by_item(
6870            self,
6871        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6872            google_cloud_longrunning::model::ListOperationsResponse,
6873            crate::Error,
6874        > {
6875            use google_cloud_gax::paginator::Paginator;
6876            self.by_page().items()
6877        }
6878
6879        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
6880        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6881            self.0.request.name = v.into();
6882            self
6883        }
6884
6885        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
6886        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6887            self.0.request.filter = v.into();
6888            self
6889        }
6890
6891        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
6892        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6893            self.0.request.page_size = v.into();
6894            self
6895        }
6896
6897        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
6898        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6899            self.0.request.page_token = v.into();
6900            self
6901        }
6902
6903        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
6904        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
6905            self.0.request.return_partial_success = v.into();
6906            self
6907        }
6908    }
6909
6910    #[doc(hidden)]
6911    impl crate::RequestBuilder for ListOperations {
6912        fn request_options(&mut self) -> &mut crate::RequestOptions {
6913            &mut self.0.options
6914        }
6915    }
6916
6917    /// The request builder for [CatalogService::get_operation][crate::client::CatalogService::get_operation] calls.
6918    ///
6919    /// # Example
6920    /// ```
6921    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetOperation;
6922    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6923    ///
6924    /// let builder = prepare_request_builder();
6925    /// let response = builder.send().await?;
6926    /// # Ok(()) }
6927    ///
6928    /// fn prepare_request_builder() -> GetOperation {
6929    ///   # panic!();
6930    ///   // ... details omitted ...
6931    /// }
6932    /// ```
6933    #[derive(Clone, Debug)]
6934    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
6935
6936    impl GetOperation {
6937        pub(crate) fn new(
6938            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6939        ) -> Self {
6940            Self(RequestBuilder::new(stub))
6941        }
6942
6943        /// Sets the full request, replacing any prior values.
6944        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
6945            mut self,
6946            v: V,
6947        ) -> Self {
6948            self.0.request = v.into();
6949            self
6950        }
6951
6952        /// Sets all the options, replacing any prior values.
6953        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6954            self.0.options = v.into();
6955            self
6956        }
6957
6958        /// Sends the request.
6959        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6960            (*self.0.stub)
6961                .get_operation(self.0.request, self.0.options)
6962                .await
6963                .map(crate::Response::into_body)
6964        }
6965
6966        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
6967        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6968            self.0.request.name = v.into();
6969            self
6970        }
6971    }
6972
6973    #[doc(hidden)]
6974    impl crate::RequestBuilder for GetOperation {
6975        fn request_options(&mut self) -> &mut crate::RequestOptions {
6976            &mut self.0.options
6977        }
6978    }
6979
6980    /// The request builder for [CatalogService::delete_operation][crate::client::CatalogService::delete_operation] calls.
6981    ///
6982    /// # Example
6983    /// ```
6984    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteOperation;
6985    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6986    ///
6987    /// let builder = prepare_request_builder();
6988    /// let response = builder.send().await?;
6989    /// # Ok(()) }
6990    ///
6991    /// fn prepare_request_builder() -> DeleteOperation {
6992    ///   # panic!();
6993    ///   // ... details omitted ...
6994    /// }
6995    /// ```
6996    #[derive(Clone, Debug)]
6997    pub struct DeleteOperation(
6998        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
6999    );
7000
7001    impl DeleteOperation {
7002        pub(crate) fn new(
7003            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
7004        ) -> Self {
7005            Self(RequestBuilder::new(stub))
7006        }
7007
7008        /// Sets the full request, replacing any prior values.
7009        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
7010            mut self,
7011            v: V,
7012        ) -> Self {
7013            self.0.request = v.into();
7014            self
7015        }
7016
7017        /// Sets all the options, replacing any prior values.
7018        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7019            self.0.options = v.into();
7020            self
7021        }
7022
7023        /// Sends the request.
7024        pub async fn send(self) -> Result<()> {
7025            (*self.0.stub)
7026                .delete_operation(self.0.request, self.0.options)
7027                .await
7028                .map(crate::Response::into_body)
7029        }
7030
7031        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
7032        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7033            self.0.request.name = v.into();
7034            self
7035        }
7036    }
7037
7038    #[doc(hidden)]
7039    impl crate::RequestBuilder for DeleteOperation {
7040        fn request_options(&mut self) -> &mut crate::RequestOptions {
7041            &mut self.0.options
7042        }
7043    }
7044
7045    /// The request builder for [CatalogService::cancel_operation][crate::client::CatalogService::cancel_operation] calls.
7046    ///
7047    /// # Example
7048    /// ```
7049    /// # use google_cloud_dataplex_v1::builder::catalog_service::CancelOperation;
7050    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7051    ///
7052    /// let builder = prepare_request_builder();
7053    /// let response = builder.send().await?;
7054    /// # Ok(()) }
7055    ///
7056    /// fn prepare_request_builder() -> CancelOperation {
7057    ///   # panic!();
7058    ///   // ... details omitted ...
7059    /// }
7060    /// ```
7061    #[derive(Clone, Debug)]
7062    pub struct CancelOperation(
7063        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
7064    );
7065
7066    impl CancelOperation {
7067        pub(crate) fn new(
7068            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
7069        ) -> Self {
7070            Self(RequestBuilder::new(stub))
7071        }
7072
7073        /// Sets the full request, replacing any prior values.
7074        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
7075            mut self,
7076            v: V,
7077        ) -> Self {
7078            self.0.request = v.into();
7079            self
7080        }
7081
7082        /// Sets all the options, replacing any prior values.
7083        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7084            self.0.options = v.into();
7085            self
7086        }
7087
7088        /// Sends the request.
7089        pub async fn send(self) -> Result<()> {
7090            (*self.0.stub)
7091                .cancel_operation(self.0.request, self.0.options)
7092                .await
7093                .map(crate::Response::into_body)
7094        }
7095
7096        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
7097        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7098            self.0.request.name = v.into();
7099            self
7100        }
7101    }
7102
7103    #[doc(hidden)]
7104    impl crate::RequestBuilder for CancelOperation {
7105        fn request_options(&mut self) -> &mut crate::RequestOptions {
7106            &mut self.0.options
7107        }
7108    }
7109}
7110
7111pub mod cmek_service {
7112    use crate::Result;
7113
7114    /// A builder for [CmekService][crate::client::CmekService].
7115    ///
7116    /// ```
7117    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
7118    /// # use google_cloud_dataplex_v1::*;
7119    /// # use builder::cmek_service::ClientBuilder;
7120    /// # use client::CmekService;
7121    /// let builder : ClientBuilder = CmekService::builder();
7122    /// let client = builder
7123    ///     .with_endpoint("https://dataplex.googleapis.com")
7124    ///     .build().await?;
7125    /// # Ok(()) }
7126    /// ```
7127    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
7128
7129    pub(crate) mod client {
7130        use super::super::super::client::CmekService;
7131        pub struct Factory;
7132        impl crate::ClientFactory for Factory {
7133            type Client = CmekService;
7134            type Credentials = gaxi::options::Credentials;
7135            async fn build(
7136                self,
7137                config: gaxi::options::ClientConfig,
7138            ) -> crate::ClientBuilderResult<Self::Client> {
7139                Self::Client::new(config).await
7140            }
7141        }
7142    }
7143
7144    /// Common implementation for [crate::client::CmekService] request builders.
7145    #[derive(Clone, Debug)]
7146    pub(crate) struct RequestBuilder<R: std::default::Default> {
7147        stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7148        request: R,
7149        options: crate::RequestOptions,
7150    }
7151
7152    impl<R> RequestBuilder<R>
7153    where
7154        R: std::default::Default,
7155    {
7156        pub(crate) fn new(
7157            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7158        ) -> Self {
7159            Self {
7160                stub,
7161                request: R::default(),
7162                options: crate::RequestOptions::default(),
7163            }
7164        }
7165    }
7166
7167    /// The request builder for [CmekService::create_encryption_config][crate::client::CmekService::create_encryption_config] calls.
7168    ///
7169    /// # Example
7170    /// ```
7171    /// # use google_cloud_dataplex_v1::builder::cmek_service::CreateEncryptionConfig;
7172    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7173    /// use google_cloud_lro::Poller;
7174    ///
7175    /// let builder = prepare_request_builder();
7176    /// let response = builder.poller().until_done().await?;
7177    /// # Ok(()) }
7178    ///
7179    /// fn prepare_request_builder() -> CreateEncryptionConfig {
7180    ///   # panic!();
7181    ///   // ... details omitted ...
7182    /// }
7183    /// ```
7184    #[derive(Clone, Debug)]
7185    pub struct CreateEncryptionConfig(RequestBuilder<crate::model::CreateEncryptionConfigRequest>);
7186
7187    impl CreateEncryptionConfig {
7188        pub(crate) fn new(
7189            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7190        ) -> Self {
7191            Self(RequestBuilder::new(stub))
7192        }
7193
7194        /// Sets the full request, replacing any prior values.
7195        pub fn with_request<V: Into<crate::model::CreateEncryptionConfigRequest>>(
7196            mut self,
7197            v: V,
7198        ) -> Self {
7199            self.0.request = v.into();
7200            self
7201        }
7202
7203        /// Sets all the options, replacing any prior values.
7204        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7205            self.0.options = v.into();
7206            self
7207        }
7208
7209        /// Sends the request.
7210        ///
7211        /// # Long running operations
7212        ///
7213        /// This starts, but does not poll, a longrunning operation. More information
7214        /// on [create_encryption_config][crate::client::CmekService::create_encryption_config].
7215        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7216            (*self.0.stub)
7217                .create_encryption_config(self.0.request, self.0.options)
7218                .await
7219                .map(crate::Response::into_body)
7220        }
7221
7222        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_encryption_config`.
7223        pub fn poller(
7224            self,
7225        ) -> impl google_cloud_lro::Poller<crate::model::EncryptionConfig, crate::model::OperationMetadata>
7226        {
7227            type Operation = google_cloud_lro::internal::Operation<
7228                crate::model::EncryptionConfig,
7229                crate::model::OperationMetadata,
7230            >;
7231            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7232            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7233
7234            let stub = self.0.stub.clone();
7235            let mut options = self.0.options.clone();
7236            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7237            let query = move |name| {
7238                let stub = stub.clone();
7239                let options = options.clone();
7240                async {
7241                    let op = GetOperation::new(stub)
7242                        .set_name(name)
7243                        .with_options(options)
7244                        .send()
7245                        .await?;
7246                    Ok(Operation::new(op))
7247                }
7248            };
7249
7250            let start = move || async {
7251                let op = self.send().await?;
7252                Ok(Operation::new(op))
7253            };
7254
7255            google_cloud_lro::internal::new_poller(
7256                polling_error_policy,
7257                polling_backoff_policy,
7258                start,
7259                query,
7260            )
7261        }
7262
7263        /// Sets the value of [parent][crate::model::CreateEncryptionConfigRequest::parent].
7264        ///
7265        /// This is a **required** field for requests.
7266        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7267            self.0.request.parent = v.into();
7268            self
7269        }
7270
7271        /// Sets the value of [encryption_config_id][crate::model::CreateEncryptionConfigRequest::encryption_config_id].
7272        ///
7273        /// This is a **required** field for requests.
7274        pub fn set_encryption_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7275            self.0.request.encryption_config_id = v.into();
7276            self
7277        }
7278
7279        /// Sets the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
7280        ///
7281        /// This is a **required** field for requests.
7282        pub fn set_encryption_config<T>(mut self, v: T) -> Self
7283        where
7284            T: std::convert::Into<crate::model::EncryptionConfig>,
7285        {
7286            self.0.request.encryption_config = std::option::Option::Some(v.into());
7287            self
7288        }
7289
7290        /// Sets or clears the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
7291        ///
7292        /// This is a **required** field for requests.
7293        pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
7294        where
7295            T: std::convert::Into<crate::model::EncryptionConfig>,
7296        {
7297            self.0.request.encryption_config = v.map(|x| x.into());
7298            self
7299        }
7300    }
7301
7302    #[doc(hidden)]
7303    impl crate::RequestBuilder for CreateEncryptionConfig {
7304        fn request_options(&mut self) -> &mut crate::RequestOptions {
7305            &mut self.0.options
7306        }
7307    }
7308
7309    /// The request builder for [CmekService::update_encryption_config][crate::client::CmekService::update_encryption_config] calls.
7310    ///
7311    /// # Example
7312    /// ```
7313    /// # use google_cloud_dataplex_v1::builder::cmek_service::UpdateEncryptionConfig;
7314    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7315    /// use google_cloud_lro::Poller;
7316    ///
7317    /// let builder = prepare_request_builder();
7318    /// let response = builder.poller().until_done().await?;
7319    /// # Ok(()) }
7320    ///
7321    /// fn prepare_request_builder() -> UpdateEncryptionConfig {
7322    ///   # panic!();
7323    ///   // ... details omitted ...
7324    /// }
7325    /// ```
7326    #[derive(Clone, Debug)]
7327    pub struct UpdateEncryptionConfig(RequestBuilder<crate::model::UpdateEncryptionConfigRequest>);
7328
7329    impl UpdateEncryptionConfig {
7330        pub(crate) fn new(
7331            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7332        ) -> Self {
7333            Self(RequestBuilder::new(stub))
7334        }
7335
7336        /// Sets the full request, replacing any prior values.
7337        pub fn with_request<V: Into<crate::model::UpdateEncryptionConfigRequest>>(
7338            mut self,
7339            v: V,
7340        ) -> Self {
7341            self.0.request = v.into();
7342            self
7343        }
7344
7345        /// Sets all the options, replacing any prior values.
7346        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7347            self.0.options = v.into();
7348            self
7349        }
7350
7351        /// Sends the request.
7352        ///
7353        /// # Long running operations
7354        ///
7355        /// This starts, but does not poll, a longrunning operation. More information
7356        /// on [update_encryption_config][crate::client::CmekService::update_encryption_config].
7357        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7358            (*self.0.stub)
7359                .update_encryption_config(self.0.request, self.0.options)
7360                .await
7361                .map(crate::Response::into_body)
7362        }
7363
7364        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_encryption_config`.
7365        pub fn poller(
7366            self,
7367        ) -> impl google_cloud_lro::Poller<crate::model::EncryptionConfig, crate::model::OperationMetadata>
7368        {
7369            type Operation = google_cloud_lro::internal::Operation<
7370                crate::model::EncryptionConfig,
7371                crate::model::OperationMetadata,
7372            >;
7373            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7374            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7375
7376            let stub = self.0.stub.clone();
7377            let mut options = self.0.options.clone();
7378            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7379            let query = move |name| {
7380                let stub = stub.clone();
7381                let options = options.clone();
7382                async {
7383                    let op = GetOperation::new(stub)
7384                        .set_name(name)
7385                        .with_options(options)
7386                        .send()
7387                        .await?;
7388                    Ok(Operation::new(op))
7389                }
7390            };
7391
7392            let start = move || async {
7393                let op = self.send().await?;
7394                Ok(Operation::new(op))
7395            };
7396
7397            google_cloud_lro::internal::new_poller(
7398                polling_error_policy,
7399                polling_backoff_policy,
7400                start,
7401                query,
7402            )
7403        }
7404
7405        /// Sets the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
7406        ///
7407        /// This is a **required** field for requests.
7408        pub fn set_encryption_config<T>(mut self, v: T) -> Self
7409        where
7410            T: std::convert::Into<crate::model::EncryptionConfig>,
7411        {
7412            self.0.request.encryption_config = std::option::Option::Some(v.into());
7413            self
7414        }
7415
7416        /// Sets or clears the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
7417        ///
7418        /// This is a **required** field for requests.
7419        pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
7420        where
7421            T: std::convert::Into<crate::model::EncryptionConfig>,
7422        {
7423            self.0.request.encryption_config = v.map(|x| x.into());
7424            self
7425        }
7426
7427        /// Sets the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
7428        pub fn set_update_mask<T>(mut self, v: T) -> Self
7429        where
7430            T: std::convert::Into<wkt::FieldMask>,
7431        {
7432            self.0.request.update_mask = std::option::Option::Some(v.into());
7433            self
7434        }
7435
7436        /// Sets or clears the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
7437        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7438        where
7439            T: std::convert::Into<wkt::FieldMask>,
7440        {
7441            self.0.request.update_mask = v.map(|x| x.into());
7442            self
7443        }
7444    }
7445
7446    #[doc(hidden)]
7447    impl crate::RequestBuilder for UpdateEncryptionConfig {
7448        fn request_options(&mut self) -> &mut crate::RequestOptions {
7449            &mut self.0.options
7450        }
7451    }
7452
7453    /// The request builder for [CmekService::delete_encryption_config][crate::client::CmekService::delete_encryption_config] calls.
7454    ///
7455    /// # Example
7456    /// ```
7457    /// # use google_cloud_dataplex_v1::builder::cmek_service::DeleteEncryptionConfig;
7458    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7459    /// use google_cloud_lro::Poller;
7460    ///
7461    /// let builder = prepare_request_builder();
7462    /// let response = builder.poller().until_done().await?;
7463    /// # Ok(()) }
7464    ///
7465    /// fn prepare_request_builder() -> DeleteEncryptionConfig {
7466    ///   # panic!();
7467    ///   // ... details omitted ...
7468    /// }
7469    /// ```
7470    #[derive(Clone, Debug)]
7471    pub struct DeleteEncryptionConfig(RequestBuilder<crate::model::DeleteEncryptionConfigRequest>);
7472
7473    impl DeleteEncryptionConfig {
7474        pub(crate) fn new(
7475            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7476        ) -> Self {
7477            Self(RequestBuilder::new(stub))
7478        }
7479
7480        /// Sets the full request, replacing any prior values.
7481        pub fn with_request<V: Into<crate::model::DeleteEncryptionConfigRequest>>(
7482            mut self,
7483            v: V,
7484        ) -> Self {
7485            self.0.request = v.into();
7486            self
7487        }
7488
7489        /// Sets all the options, replacing any prior values.
7490        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7491            self.0.options = v.into();
7492            self
7493        }
7494
7495        /// Sends the request.
7496        ///
7497        /// # Long running operations
7498        ///
7499        /// This starts, but does not poll, a longrunning operation. More information
7500        /// on [delete_encryption_config][crate::client::CmekService::delete_encryption_config].
7501        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7502            (*self.0.stub)
7503                .delete_encryption_config(self.0.request, self.0.options)
7504                .await
7505                .map(crate::Response::into_body)
7506        }
7507
7508        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_encryption_config`.
7509        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
7510            type Operation =
7511                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7512            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7513            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7514
7515            let stub = self.0.stub.clone();
7516            let mut options = self.0.options.clone();
7517            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7518            let query = move |name| {
7519                let stub = stub.clone();
7520                let options = options.clone();
7521                async {
7522                    let op = GetOperation::new(stub)
7523                        .set_name(name)
7524                        .with_options(options)
7525                        .send()
7526                        .await?;
7527                    Ok(Operation::new(op))
7528                }
7529            };
7530
7531            let start = move || async {
7532                let op = self.send().await?;
7533                Ok(Operation::new(op))
7534            };
7535
7536            google_cloud_lro::internal::new_unit_response_poller(
7537                polling_error_policy,
7538                polling_backoff_policy,
7539                start,
7540                query,
7541            )
7542        }
7543
7544        /// Sets the value of [name][crate::model::DeleteEncryptionConfigRequest::name].
7545        ///
7546        /// This is a **required** field for requests.
7547        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7548            self.0.request.name = v.into();
7549            self
7550        }
7551
7552        /// Sets the value of [etag][crate::model::DeleteEncryptionConfigRequest::etag].
7553        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
7554            self.0.request.etag = v.into();
7555            self
7556        }
7557    }
7558
7559    #[doc(hidden)]
7560    impl crate::RequestBuilder for DeleteEncryptionConfig {
7561        fn request_options(&mut self) -> &mut crate::RequestOptions {
7562            &mut self.0.options
7563        }
7564    }
7565
7566    /// The request builder for [CmekService::list_encryption_configs][crate::client::CmekService::list_encryption_configs] calls.
7567    ///
7568    /// # Example
7569    /// ```
7570    /// # use google_cloud_dataplex_v1::builder::cmek_service::ListEncryptionConfigs;
7571    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7572    /// use google_cloud_gax::paginator::ItemPaginator;
7573    ///
7574    /// let builder = prepare_request_builder();
7575    /// let mut items = builder.by_item();
7576    /// while let Some(result) = items.next().await {
7577    ///   let item = result?;
7578    /// }
7579    /// # Ok(()) }
7580    ///
7581    /// fn prepare_request_builder() -> ListEncryptionConfigs {
7582    ///   # panic!();
7583    ///   // ... details omitted ...
7584    /// }
7585    /// ```
7586    #[derive(Clone, Debug)]
7587    pub struct ListEncryptionConfigs(RequestBuilder<crate::model::ListEncryptionConfigsRequest>);
7588
7589    impl ListEncryptionConfigs {
7590        pub(crate) fn new(
7591            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7592        ) -> Self {
7593            Self(RequestBuilder::new(stub))
7594        }
7595
7596        /// Sets the full request, replacing any prior values.
7597        pub fn with_request<V: Into<crate::model::ListEncryptionConfigsRequest>>(
7598            mut self,
7599            v: V,
7600        ) -> Self {
7601            self.0.request = v.into();
7602            self
7603        }
7604
7605        /// Sets all the options, replacing any prior values.
7606        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7607            self.0.options = v.into();
7608            self
7609        }
7610
7611        /// Sends the request.
7612        pub async fn send(self) -> Result<crate::model::ListEncryptionConfigsResponse> {
7613            (*self.0.stub)
7614                .list_encryption_configs(self.0.request, self.0.options)
7615                .await
7616                .map(crate::Response::into_body)
7617        }
7618
7619        /// Streams each page in the collection.
7620        pub fn by_page(
7621            self,
7622        ) -> impl google_cloud_gax::paginator::Paginator<
7623            crate::model::ListEncryptionConfigsResponse,
7624            crate::Error,
7625        > {
7626            use std::clone::Clone;
7627            let token = self.0.request.page_token.clone();
7628            let execute = move |token: String| {
7629                let mut builder = self.clone();
7630                builder.0.request = builder.0.request.set_page_token(token);
7631                builder.send()
7632            };
7633            google_cloud_gax::paginator::internal::new_paginator(token, execute)
7634        }
7635
7636        /// Streams each item in the collection.
7637        pub fn by_item(
7638            self,
7639        ) -> impl google_cloud_gax::paginator::ItemPaginator<
7640            crate::model::ListEncryptionConfigsResponse,
7641            crate::Error,
7642        > {
7643            use google_cloud_gax::paginator::Paginator;
7644            self.by_page().items()
7645        }
7646
7647        /// Sets the value of [parent][crate::model::ListEncryptionConfigsRequest::parent].
7648        ///
7649        /// This is a **required** field for requests.
7650        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7651            self.0.request.parent = v.into();
7652            self
7653        }
7654
7655        /// Sets the value of [page_size][crate::model::ListEncryptionConfigsRequest::page_size].
7656        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7657            self.0.request.page_size = v.into();
7658            self
7659        }
7660
7661        /// Sets the value of [page_token][crate::model::ListEncryptionConfigsRequest::page_token].
7662        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7663            self.0.request.page_token = v.into();
7664            self
7665        }
7666
7667        /// Sets the value of [filter][crate::model::ListEncryptionConfigsRequest::filter].
7668        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7669            self.0.request.filter = v.into();
7670            self
7671        }
7672
7673        /// Sets the value of [order_by][crate::model::ListEncryptionConfigsRequest::order_by].
7674        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7675            self.0.request.order_by = v.into();
7676            self
7677        }
7678    }
7679
7680    #[doc(hidden)]
7681    impl crate::RequestBuilder for ListEncryptionConfigs {
7682        fn request_options(&mut self) -> &mut crate::RequestOptions {
7683            &mut self.0.options
7684        }
7685    }
7686
7687    /// The request builder for [CmekService::get_encryption_config][crate::client::CmekService::get_encryption_config] calls.
7688    ///
7689    /// # Example
7690    /// ```
7691    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetEncryptionConfig;
7692    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7693    ///
7694    /// let builder = prepare_request_builder();
7695    /// let response = builder.send().await?;
7696    /// # Ok(()) }
7697    ///
7698    /// fn prepare_request_builder() -> GetEncryptionConfig {
7699    ///   # panic!();
7700    ///   // ... details omitted ...
7701    /// }
7702    /// ```
7703    #[derive(Clone, Debug)]
7704    pub struct GetEncryptionConfig(RequestBuilder<crate::model::GetEncryptionConfigRequest>);
7705
7706    impl GetEncryptionConfig {
7707        pub(crate) fn new(
7708            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7709        ) -> Self {
7710            Self(RequestBuilder::new(stub))
7711        }
7712
7713        /// Sets the full request, replacing any prior values.
7714        pub fn with_request<V: Into<crate::model::GetEncryptionConfigRequest>>(
7715            mut self,
7716            v: V,
7717        ) -> Self {
7718            self.0.request = v.into();
7719            self
7720        }
7721
7722        /// Sets all the options, replacing any prior values.
7723        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7724            self.0.options = v.into();
7725            self
7726        }
7727
7728        /// Sends the request.
7729        pub async fn send(self) -> Result<crate::model::EncryptionConfig> {
7730            (*self.0.stub)
7731                .get_encryption_config(self.0.request, self.0.options)
7732                .await
7733                .map(crate::Response::into_body)
7734        }
7735
7736        /// Sets the value of [name][crate::model::GetEncryptionConfigRequest::name].
7737        ///
7738        /// This is a **required** field for requests.
7739        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7740            self.0.request.name = v.into();
7741            self
7742        }
7743    }
7744
7745    #[doc(hidden)]
7746    impl crate::RequestBuilder for GetEncryptionConfig {
7747        fn request_options(&mut self) -> &mut crate::RequestOptions {
7748            &mut self.0.options
7749        }
7750    }
7751
7752    /// The request builder for [CmekService::list_locations][crate::client::CmekService::list_locations] calls.
7753    ///
7754    /// # Example
7755    /// ```
7756    /// # use google_cloud_dataplex_v1::builder::cmek_service::ListLocations;
7757    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7758    /// use google_cloud_gax::paginator::ItemPaginator;
7759    ///
7760    /// let builder = prepare_request_builder();
7761    /// let mut items = builder.by_item();
7762    /// while let Some(result) = items.next().await {
7763    ///   let item = result?;
7764    /// }
7765    /// # Ok(()) }
7766    ///
7767    /// fn prepare_request_builder() -> ListLocations {
7768    ///   # panic!();
7769    ///   // ... details omitted ...
7770    /// }
7771    /// ```
7772    #[derive(Clone, Debug)]
7773    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
7774
7775    impl ListLocations {
7776        pub(crate) fn new(
7777            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7778        ) -> Self {
7779            Self(RequestBuilder::new(stub))
7780        }
7781
7782        /// Sets the full request, replacing any prior values.
7783        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
7784            mut self,
7785            v: V,
7786        ) -> Self {
7787            self.0.request = v.into();
7788            self
7789        }
7790
7791        /// Sets all the options, replacing any prior values.
7792        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7793            self.0.options = v.into();
7794            self
7795        }
7796
7797        /// Sends the request.
7798        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
7799            (*self.0.stub)
7800                .list_locations(self.0.request, self.0.options)
7801                .await
7802                .map(crate::Response::into_body)
7803        }
7804
7805        /// Streams each page in the collection.
7806        pub fn by_page(
7807            self,
7808        ) -> impl google_cloud_gax::paginator::Paginator<
7809            google_cloud_location::model::ListLocationsResponse,
7810            crate::Error,
7811        > {
7812            use std::clone::Clone;
7813            let token = self.0.request.page_token.clone();
7814            let execute = move |token: String| {
7815                let mut builder = self.clone();
7816                builder.0.request = builder.0.request.set_page_token(token);
7817                builder.send()
7818            };
7819            google_cloud_gax::paginator::internal::new_paginator(token, execute)
7820        }
7821
7822        /// Streams each item in the collection.
7823        pub fn by_item(
7824            self,
7825        ) -> impl google_cloud_gax::paginator::ItemPaginator<
7826            google_cloud_location::model::ListLocationsResponse,
7827            crate::Error,
7828        > {
7829            use google_cloud_gax::paginator::Paginator;
7830            self.by_page().items()
7831        }
7832
7833        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
7834        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7835            self.0.request.name = v.into();
7836            self
7837        }
7838
7839        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
7840        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7841            self.0.request.filter = v.into();
7842            self
7843        }
7844
7845        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
7846        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7847            self.0.request.page_size = v.into();
7848            self
7849        }
7850
7851        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
7852        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7853            self.0.request.page_token = v.into();
7854            self
7855        }
7856    }
7857
7858    #[doc(hidden)]
7859    impl crate::RequestBuilder for ListLocations {
7860        fn request_options(&mut self) -> &mut crate::RequestOptions {
7861            &mut self.0.options
7862        }
7863    }
7864
7865    /// The request builder for [CmekService::get_location][crate::client::CmekService::get_location] calls.
7866    ///
7867    /// # Example
7868    /// ```
7869    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetLocation;
7870    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7871    ///
7872    /// let builder = prepare_request_builder();
7873    /// let response = builder.send().await?;
7874    /// # Ok(()) }
7875    ///
7876    /// fn prepare_request_builder() -> GetLocation {
7877    ///   # panic!();
7878    ///   // ... details omitted ...
7879    /// }
7880    /// ```
7881    #[derive(Clone, Debug)]
7882    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
7883
7884    impl GetLocation {
7885        pub(crate) fn new(
7886            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7887        ) -> Self {
7888            Self(RequestBuilder::new(stub))
7889        }
7890
7891        /// Sets the full request, replacing any prior values.
7892        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
7893            mut self,
7894            v: V,
7895        ) -> Self {
7896            self.0.request = v.into();
7897            self
7898        }
7899
7900        /// Sets all the options, replacing any prior values.
7901        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7902            self.0.options = v.into();
7903            self
7904        }
7905
7906        /// Sends the request.
7907        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
7908            (*self.0.stub)
7909                .get_location(self.0.request, self.0.options)
7910                .await
7911                .map(crate::Response::into_body)
7912        }
7913
7914        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
7915        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7916            self.0.request.name = v.into();
7917            self
7918        }
7919    }
7920
7921    #[doc(hidden)]
7922    impl crate::RequestBuilder for GetLocation {
7923        fn request_options(&mut self) -> &mut crate::RequestOptions {
7924            &mut self.0.options
7925        }
7926    }
7927
7928    /// The request builder for [CmekService::set_iam_policy][crate::client::CmekService::set_iam_policy] calls.
7929    ///
7930    /// # Example
7931    /// ```
7932    /// # use google_cloud_dataplex_v1::builder::cmek_service::SetIamPolicy;
7933    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7934    ///
7935    /// let builder = prepare_request_builder();
7936    /// let response = builder.send().await?;
7937    /// # Ok(()) }
7938    ///
7939    /// fn prepare_request_builder() -> SetIamPolicy {
7940    ///   # panic!();
7941    ///   // ... details omitted ...
7942    /// }
7943    /// ```
7944    #[derive(Clone, Debug)]
7945    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
7946
7947    impl SetIamPolicy {
7948        pub(crate) fn new(
7949            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7950        ) -> Self {
7951            Self(RequestBuilder::new(stub))
7952        }
7953
7954        /// Sets the full request, replacing any prior values.
7955        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
7956            mut self,
7957            v: V,
7958        ) -> Self {
7959            self.0.request = v.into();
7960            self
7961        }
7962
7963        /// Sets all the options, replacing any prior values.
7964        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7965            self.0.options = v.into();
7966            self
7967        }
7968
7969        /// Sends the request.
7970        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
7971            (*self.0.stub)
7972                .set_iam_policy(self.0.request, self.0.options)
7973                .await
7974                .map(crate::Response::into_body)
7975        }
7976
7977        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
7978        ///
7979        /// This is a **required** field for requests.
7980        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7981            self.0.request.resource = v.into();
7982            self
7983        }
7984
7985        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
7986        ///
7987        /// This is a **required** field for requests.
7988        pub fn set_policy<T>(mut self, v: T) -> Self
7989        where
7990            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
7991        {
7992            self.0.request.policy = std::option::Option::Some(v.into());
7993            self
7994        }
7995
7996        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
7997        ///
7998        /// This is a **required** field for requests.
7999        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
8000        where
8001            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8002        {
8003            self.0.request.policy = v.map(|x| x.into());
8004            self
8005        }
8006
8007        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
8008        pub fn set_update_mask<T>(mut self, v: T) -> Self
8009        where
8010            T: std::convert::Into<wkt::FieldMask>,
8011        {
8012            self.0.request.update_mask = std::option::Option::Some(v.into());
8013            self
8014        }
8015
8016        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
8017        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8018        where
8019            T: std::convert::Into<wkt::FieldMask>,
8020        {
8021            self.0.request.update_mask = v.map(|x| x.into());
8022            self
8023        }
8024    }
8025
8026    #[doc(hidden)]
8027    impl crate::RequestBuilder for SetIamPolicy {
8028        fn request_options(&mut self) -> &mut crate::RequestOptions {
8029            &mut self.0.options
8030        }
8031    }
8032
8033    /// The request builder for [CmekService::get_iam_policy][crate::client::CmekService::get_iam_policy] calls.
8034    ///
8035    /// # Example
8036    /// ```
8037    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetIamPolicy;
8038    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8039    ///
8040    /// let builder = prepare_request_builder();
8041    /// let response = builder.send().await?;
8042    /// # Ok(()) }
8043    ///
8044    /// fn prepare_request_builder() -> GetIamPolicy {
8045    ///   # panic!();
8046    ///   // ... details omitted ...
8047    /// }
8048    /// ```
8049    #[derive(Clone, Debug)]
8050    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
8051
8052    impl GetIamPolicy {
8053        pub(crate) fn new(
8054            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8055        ) -> Self {
8056            Self(RequestBuilder::new(stub))
8057        }
8058
8059        /// Sets the full request, replacing any prior values.
8060        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
8061            mut self,
8062            v: V,
8063        ) -> Self {
8064            self.0.request = v.into();
8065            self
8066        }
8067
8068        /// Sets all the options, replacing any prior values.
8069        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8070            self.0.options = v.into();
8071            self
8072        }
8073
8074        /// Sends the request.
8075        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8076            (*self.0.stub)
8077                .get_iam_policy(self.0.request, self.0.options)
8078                .await
8079                .map(crate::Response::into_body)
8080        }
8081
8082        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
8083        ///
8084        /// This is a **required** field for requests.
8085        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8086            self.0.request.resource = v.into();
8087            self
8088        }
8089
8090        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
8091        pub fn set_options<T>(mut self, v: T) -> Self
8092        where
8093            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
8094        {
8095            self.0.request.options = std::option::Option::Some(v.into());
8096            self
8097        }
8098
8099        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
8100        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
8101        where
8102            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
8103        {
8104            self.0.request.options = v.map(|x| x.into());
8105            self
8106        }
8107    }
8108
8109    #[doc(hidden)]
8110    impl crate::RequestBuilder for GetIamPolicy {
8111        fn request_options(&mut self) -> &mut crate::RequestOptions {
8112            &mut self.0.options
8113        }
8114    }
8115
8116    /// The request builder for [CmekService::test_iam_permissions][crate::client::CmekService::test_iam_permissions] calls.
8117    ///
8118    /// # Example
8119    /// ```
8120    /// # use google_cloud_dataplex_v1::builder::cmek_service::TestIamPermissions;
8121    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8122    ///
8123    /// let builder = prepare_request_builder();
8124    /// let response = builder.send().await?;
8125    /// # Ok(()) }
8126    ///
8127    /// fn prepare_request_builder() -> TestIamPermissions {
8128    ///   # panic!();
8129    ///   // ... details omitted ...
8130    /// }
8131    /// ```
8132    #[derive(Clone, Debug)]
8133    pub struct TestIamPermissions(
8134        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
8135    );
8136
8137    impl TestIamPermissions {
8138        pub(crate) fn new(
8139            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8140        ) -> Self {
8141            Self(RequestBuilder::new(stub))
8142        }
8143
8144        /// Sets the full request, replacing any prior values.
8145        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
8146            mut self,
8147            v: V,
8148        ) -> Self {
8149            self.0.request = v.into();
8150            self
8151        }
8152
8153        /// Sets all the options, replacing any prior values.
8154        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8155            self.0.options = v.into();
8156            self
8157        }
8158
8159        /// Sends the request.
8160        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
8161            (*self.0.stub)
8162                .test_iam_permissions(self.0.request, self.0.options)
8163                .await
8164                .map(crate::Response::into_body)
8165        }
8166
8167        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
8168        ///
8169        /// This is a **required** field for requests.
8170        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8171            self.0.request.resource = v.into();
8172            self
8173        }
8174
8175        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
8176        ///
8177        /// This is a **required** field for requests.
8178        pub fn set_permissions<T, V>(mut self, v: T) -> Self
8179        where
8180            T: std::iter::IntoIterator<Item = V>,
8181            V: std::convert::Into<std::string::String>,
8182        {
8183            use std::iter::Iterator;
8184            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
8185            self
8186        }
8187    }
8188
8189    #[doc(hidden)]
8190    impl crate::RequestBuilder for TestIamPermissions {
8191        fn request_options(&mut self) -> &mut crate::RequestOptions {
8192            &mut self.0.options
8193        }
8194    }
8195
8196    /// The request builder for [CmekService::list_operations][crate::client::CmekService::list_operations] calls.
8197    ///
8198    /// # Example
8199    /// ```
8200    /// # use google_cloud_dataplex_v1::builder::cmek_service::ListOperations;
8201    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8202    /// use google_cloud_gax::paginator::ItemPaginator;
8203    ///
8204    /// let builder = prepare_request_builder();
8205    /// let mut items = builder.by_item();
8206    /// while let Some(result) = items.next().await {
8207    ///   let item = result?;
8208    /// }
8209    /// # Ok(()) }
8210    ///
8211    /// fn prepare_request_builder() -> ListOperations {
8212    ///   # panic!();
8213    ///   // ... details omitted ...
8214    /// }
8215    /// ```
8216    #[derive(Clone, Debug)]
8217    pub struct ListOperations(
8218        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
8219    );
8220
8221    impl ListOperations {
8222        pub(crate) fn new(
8223            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8224        ) -> Self {
8225            Self(RequestBuilder::new(stub))
8226        }
8227
8228        /// Sets the full request, replacing any prior values.
8229        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
8230            mut self,
8231            v: V,
8232        ) -> Self {
8233            self.0.request = v.into();
8234            self
8235        }
8236
8237        /// Sets all the options, replacing any prior values.
8238        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8239            self.0.options = v.into();
8240            self
8241        }
8242
8243        /// Sends the request.
8244        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
8245            (*self.0.stub)
8246                .list_operations(self.0.request, self.0.options)
8247                .await
8248                .map(crate::Response::into_body)
8249        }
8250
8251        /// Streams each page in the collection.
8252        pub fn by_page(
8253            self,
8254        ) -> impl google_cloud_gax::paginator::Paginator<
8255            google_cloud_longrunning::model::ListOperationsResponse,
8256            crate::Error,
8257        > {
8258            use std::clone::Clone;
8259            let token = self.0.request.page_token.clone();
8260            let execute = move |token: String| {
8261                let mut builder = self.clone();
8262                builder.0.request = builder.0.request.set_page_token(token);
8263                builder.send()
8264            };
8265            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8266        }
8267
8268        /// Streams each item in the collection.
8269        pub fn by_item(
8270            self,
8271        ) -> impl google_cloud_gax::paginator::ItemPaginator<
8272            google_cloud_longrunning::model::ListOperationsResponse,
8273            crate::Error,
8274        > {
8275            use google_cloud_gax::paginator::Paginator;
8276            self.by_page().items()
8277        }
8278
8279        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
8280        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8281            self.0.request.name = v.into();
8282            self
8283        }
8284
8285        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
8286        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8287            self.0.request.filter = v.into();
8288            self
8289        }
8290
8291        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
8292        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8293            self.0.request.page_size = v.into();
8294            self
8295        }
8296
8297        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
8298        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8299            self.0.request.page_token = v.into();
8300            self
8301        }
8302
8303        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
8304        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
8305            self.0.request.return_partial_success = v.into();
8306            self
8307        }
8308    }
8309
8310    #[doc(hidden)]
8311    impl crate::RequestBuilder for ListOperations {
8312        fn request_options(&mut self) -> &mut crate::RequestOptions {
8313            &mut self.0.options
8314        }
8315    }
8316
8317    /// The request builder for [CmekService::get_operation][crate::client::CmekService::get_operation] calls.
8318    ///
8319    /// # Example
8320    /// ```
8321    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetOperation;
8322    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8323    ///
8324    /// let builder = prepare_request_builder();
8325    /// let response = builder.send().await?;
8326    /// # Ok(()) }
8327    ///
8328    /// fn prepare_request_builder() -> GetOperation {
8329    ///   # panic!();
8330    ///   // ... details omitted ...
8331    /// }
8332    /// ```
8333    #[derive(Clone, Debug)]
8334    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
8335
8336    impl GetOperation {
8337        pub(crate) fn new(
8338            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8339        ) -> Self {
8340            Self(RequestBuilder::new(stub))
8341        }
8342
8343        /// Sets the full request, replacing any prior values.
8344        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
8345            mut self,
8346            v: V,
8347        ) -> Self {
8348            self.0.request = v.into();
8349            self
8350        }
8351
8352        /// Sets all the options, replacing any prior values.
8353        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8354            self.0.options = v.into();
8355            self
8356        }
8357
8358        /// Sends the request.
8359        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8360            (*self.0.stub)
8361                .get_operation(self.0.request, self.0.options)
8362                .await
8363                .map(crate::Response::into_body)
8364        }
8365
8366        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
8367        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8368            self.0.request.name = v.into();
8369            self
8370        }
8371    }
8372
8373    #[doc(hidden)]
8374    impl crate::RequestBuilder for GetOperation {
8375        fn request_options(&mut self) -> &mut crate::RequestOptions {
8376            &mut self.0.options
8377        }
8378    }
8379
8380    /// The request builder for [CmekService::delete_operation][crate::client::CmekService::delete_operation] calls.
8381    ///
8382    /// # Example
8383    /// ```
8384    /// # use google_cloud_dataplex_v1::builder::cmek_service::DeleteOperation;
8385    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8386    ///
8387    /// let builder = prepare_request_builder();
8388    /// let response = builder.send().await?;
8389    /// # Ok(()) }
8390    ///
8391    /// fn prepare_request_builder() -> DeleteOperation {
8392    ///   # panic!();
8393    ///   // ... details omitted ...
8394    /// }
8395    /// ```
8396    #[derive(Clone, Debug)]
8397    pub struct DeleteOperation(
8398        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
8399    );
8400
8401    impl DeleteOperation {
8402        pub(crate) fn new(
8403            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8404        ) -> Self {
8405            Self(RequestBuilder::new(stub))
8406        }
8407
8408        /// Sets the full request, replacing any prior values.
8409        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
8410            mut self,
8411            v: V,
8412        ) -> Self {
8413            self.0.request = v.into();
8414            self
8415        }
8416
8417        /// Sets all the options, replacing any prior values.
8418        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8419            self.0.options = v.into();
8420            self
8421        }
8422
8423        /// Sends the request.
8424        pub async fn send(self) -> Result<()> {
8425            (*self.0.stub)
8426                .delete_operation(self.0.request, self.0.options)
8427                .await
8428                .map(crate::Response::into_body)
8429        }
8430
8431        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
8432        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8433            self.0.request.name = v.into();
8434            self
8435        }
8436    }
8437
8438    #[doc(hidden)]
8439    impl crate::RequestBuilder for DeleteOperation {
8440        fn request_options(&mut self) -> &mut crate::RequestOptions {
8441            &mut self.0.options
8442        }
8443    }
8444
8445    /// The request builder for [CmekService::cancel_operation][crate::client::CmekService::cancel_operation] calls.
8446    ///
8447    /// # Example
8448    /// ```
8449    /// # use google_cloud_dataplex_v1::builder::cmek_service::CancelOperation;
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() -> CancelOperation {
8457    ///   # panic!();
8458    ///   // ... details omitted ...
8459    /// }
8460    /// ```
8461    #[derive(Clone, Debug)]
8462    pub struct CancelOperation(
8463        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
8464    );
8465
8466    impl CancelOperation {
8467        pub(crate) fn new(
8468            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8469        ) -> Self {
8470            Self(RequestBuilder::new(stub))
8471        }
8472
8473        /// Sets the full request, replacing any prior values.
8474        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
8475            mut self,
8476            v: V,
8477        ) -> Self {
8478            self.0.request = v.into();
8479            self
8480        }
8481
8482        /// Sets all the options, replacing any prior values.
8483        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8484            self.0.options = v.into();
8485            self
8486        }
8487
8488        /// Sends the request.
8489        pub async fn send(self) -> Result<()> {
8490            (*self.0.stub)
8491                .cancel_operation(self.0.request, self.0.options)
8492                .await
8493                .map(crate::Response::into_body)
8494        }
8495
8496        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
8497        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8498            self.0.request.name = v.into();
8499            self
8500        }
8501    }
8502
8503    #[doc(hidden)]
8504    impl crate::RequestBuilder for CancelOperation {
8505        fn request_options(&mut self) -> &mut crate::RequestOptions {
8506            &mut self.0.options
8507        }
8508    }
8509}
8510
8511pub mod content_service {
8512    use crate::Result;
8513
8514    /// A builder for [ContentService][crate::client::ContentService].
8515    ///
8516    /// ```
8517    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
8518    /// # use google_cloud_dataplex_v1::*;
8519    /// # use builder::content_service::ClientBuilder;
8520    /// # use client::ContentService;
8521    /// let builder : ClientBuilder = ContentService::builder();
8522    /// let client = builder
8523    ///     .with_endpoint("https://dataplex.googleapis.com")
8524    ///     .build().await?;
8525    /// # Ok(()) }
8526    /// ```
8527    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
8528
8529    pub(crate) mod client {
8530        use super::super::super::client::ContentService;
8531        pub struct Factory;
8532        impl crate::ClientFactory for Factory {
8533            type Client = ContentService;
8534            type Credentials = gaxi::options::Credentials;
8535            async fn build(
8536                self,
8537                config: gaxi::options::ClientConfig,
8538            ) -> crate::ClientBuilderResult<Self::Client> {
8539                Self::Client::new(config).await
8540            }
8541        }
8542    }
8543
8544    /// Common implementation for [crate::client::ContentService] request builders.
8545    #[derive(Clone, Debug)]
8546    pub(crate) struct RequestBuilder<R: std::default::Default> {
8547        stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8548        request: R,
8549        options: crate::RequestOptions,
8550    }
8551
8552    impl<R> RequestBuilder<R>
8553    where
8554        R: std::default::Default,
8555    {
8556        pub(crate) fn new(
8557            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8558        ) -> Self {
8559            Self {
8560                stub,
8561                request: R::default(),
8562                options: crate::RequestOptions::default(),
8563            }
8564        }
8565    }
8566
8567    /// The request builder for [ContentService::list_locations][crate::client::ContentService::list_locations] calls.
8568    ///
8569    /// # Example
8570    /// ```
8571    /// # use google_cloud_dataplex_v1::builder::content_service::ListLocations;
8572    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8573    /// use google_cloud_gax::paginator::ItemPaginator;
8574    ///
8575    /// let builder = prepare_request_builder();
8576    /// let mut items = builder.by_item();
8577    /// while let Some(result) = items.next().await {
8578    ///   let item = result?;
8579    /// }
8580    /// # Ok(()) }
8581    ///
8582    /// fn prepare_request_builder() -> ListLocations {
8583    ///   # panic!();
8584    ///   // ... details omitted ...
8585    /// }
8586    /// ```
8587    #[derive(Clone, Debug)]
8588    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
8589
8590    impl ListLocations {
8591        pub(crate) fn new(
8592            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8593        ) -> Self {
8594            Self(RequestBuilder::new(stub))
8595        }
8596
8597        /// Sets the full request, replacing any prior values.
8598        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
8599            mut self,
8600            v: V,
8601        ) -> Self {
8602            self.0.request = v.into();
8603            self
8604        }
8605
8606        /// Sets all the options, replacing any prior values.
8607        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8608            self.0.options = v.into();
8609            self
8610        }
8611
8612        /// Sends the request.
8613        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
8614            (*self.0.stub)
8615                .list_locations(self.0.request, self.0.options)
8616                .await
8617                .map(crate::Response::into_body)
8618        }
8619
8620        /// Streams each page in the collection.
8621        pub fn by_page(
8622            self,
8623        ) -> impl google_cloud_gax::paginator::Paginator<
8624            google_cloud_location::model::ListLocationsResponse,
8625            crate::Error,
8626        > {
8627            use std::clone::Clone;
8628            let token = self.0.request.page_token.clone();
8629            let execute = move |token: String| {
8630                let mut builder = self.clone();
8631                builder.0.request = builder.0.request.set_page_token(token);
8632                builder.send()
8633            };
8634            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8635        }
8636
8637        /// Streams each item in the collection.
8638        pub fn by_item(
8639            self,
8640        ) -> impl google_cloud_gax::paginator::ItemPaginator<
8641            google_cloud_location::model::ListLocationsResponse,
8642            crate::Error,
8643        > {
8644            use google_cloud_gax::paginator::Paginator;
8645            self.by_page().items()
8646        }
8647
8648        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
8649        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8650            self.0.request.name = v.into();
8651            self
8652        }
8653
8654        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
8655        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8656            self.0.request.filter = v.into();
8657            self
8658        }
8659
8660        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
8661        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8662            self.0.request.page_size = v.into();
8663            self
8664        }
8665
8666        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
8667        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8668            self.0.request.page_token = v.into();
8669            self
8670        }
8671    }
8672
8673    #[doc(hidden)]
8674    impl crate::RequestBuilder for ListLocations {
8675        fn request_options(&mut self) -> &mut crate::RequestOptions {
8676            &mut self.0.options
8677        }
8678    }
8679
8680    /// The request builder for [ContentService::get_location][crate::client::ContentService::get_location] calls.
8681    ///
8682    /// # Example
8683    /// ```
8684    /// # use google_cloud_dataplex_v1::builder::content_service::GetLocation;
8685    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8686    ///
8687    /// let builder = prepare_request_builder();
8688    /// let response = builder.send().await?;
8689    /// # Ok(()) }
8690    ///
8691    /// fn prepare_request_builder() -> GetLocation {
8692    ///   # panic!();
8693    ///   // ... details omitted ...
8694    /// }
8695    /// ```
8696    #[derive(Clone, Debug)]
8697    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
8698
8699    impl GetLocation {
8700        pub(crate) fn new(
8701            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8702        ) -> Self {
8703            Self(RequestBuilder::new(stub))
8704        }
8705
8706        /// Sets the full request, replacing any prior values.
8707        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
8708            mut self,
8709            v: V,
8710        ) -> Self {
8711            self.0.request = v.into();
8712            self
8713        }
8714
8715        /// Sets all the options, replacing any prior values.
8716        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8717            self.0.options = v.into();
8718            self
8719        }
8720
8721        /// Sends the request.
8722        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
8723            (*self.0.stub)
8724                .get_location(self.0.request, self.0.options)
8725                .await
8726                .map(crate::Response::into_body)
8727        }
8728
8729        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
8730        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8731            self.0.request.name = v.into();
8732            self
8733        }
8734    }
8735
8736    #[doc(hidden)]
8737    impl crate::RequestBuilder for GetLocation {
8738        fn request_options(&mut self) -> &mut crate::RequestOptions {
8739            &mut self.0.options
8740        }
8741    }
8742
8743    /// The request builder for [ContentService::set_iam_policy][crate::client::ContentService::set_iam_policy] calls.
8744    ///
8745    /// # Example
8746    /// ```
8747    /// # use google_cloud_dataplex_v1::builder::content_service::SetIamPolicy;
8748    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8749    ///
8750    /// let builder = prepare_request_builder();
8751    /// let response = builder.send().await?;
8752    /// # Ok(()) }
8753    ///
8754    /// fn prepare_request_builder() -> SetIamPolicy {
8755    ///   # panic!();
8756    ///   // ... details omitted ...
8757    /// }
8758    /// ```
8759    #[derive(Clone, Debug)]
8760    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
8761
8762    impl SetIamPolicy {
8763        pub(crate) fn new(
8764            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8765        ) -> Self {
8766            Self(RequestBuilder::new(stub))
8767        }
8768
8769        /// Sets the full request, replacing any prior values.
8770        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
8771            mut self,
8772            v: V,
8773        ) -> Self {
8774            self.0.request = v.into();
8775            self
8776        }
8777
8778        /// Sets all the options, replacing any prior values.
8779        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8780            self.0.options = v.into();
8781            self
8782        }
8783
8784        /// Sends the request.
8785        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8786            (*self.0.stub)
8787                .set_iam_policy(self.0.request, self.0.options)
8788                .await
8789                .map(crate::Response::into_body)
8790        }
8791
8792        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
8793        ///
8794        /// This is a **required** field for requests.
8795        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8796            self.0.request.resource = v.into();
8797            self
8798        }
8799
8800        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
8801        ///
8802        /// This is a **required** field for requests.
8803        pub fn set_policy<T>(mut self, v: T) -> Self
8804        where
8805            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8806        {
8807            self.0.request.policy = std::option::Option::Some(v.into());
8808            self
8809        }
8810
8811        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
8812        ///
8813        /// This is a **required** field for requests.
8814        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
8815        where
8816            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8817        {
8818            self.0.request.policy = v.map(|x| x.into());
8819            self
8820        }
8821
8822        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
8823        pub fn set_update_mask<T>(mut self, v: T) -> Self
8824        where
8825            T: std::convert::Into<wkt::FieldMask>,
8826        {
8827            self.0.request.update_mask = std::option::Option::Some(v.into());
8828            self
8829        }
8830
8831        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
8832        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8833        where
8834            T: std::convert::Into<wkt::FieldMask>,
8835        {
8836            self.0.request.update_mask = v.map(|x| x.into());
8837            self
8838        }
8839    }
8840
8841    #[doc(hidden)]
8842    impl crate::RequestBuilder for SetIamPolicy {
8843        fn request_options(&mut self) -> &mut crate::RequestOptions {
8844            &mut self.0.options
8845        }
8846    }
8847
8848    /// The request builder for [ContentService::get_iam_policy][crate::client::ContentService::get_iam_policy] calls.
8849    ///
8850    /// # Example
8851    /// ```
8852    /// # use google_cloud_dataplex_v1::builder::content_service::GetIamPolicy;
8853    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8854    ///
8855    /// let builder = prepare_request_builder();
8856    /// let response = builder.send().await?;
8857    /// # Ok(()) }
8858    ///
8859    /// fn prepare_request_builder() -> GetIamPolicy {
8860    ///   # panic!();
8861    ///   // ... details omitted ...
8862    /// }
8863    /// ```
8864    #[derive(Clone, Debug)]
8865    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
8866
8867    impl GetIamPolicy {
8868        pub(crate) fn new(
8869            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8870        ) -> Self {
8871            Self(RequestBuilder::new(stub))
8872        }
8873
8874        /// Sets the full request, replacing any prior values.
8875        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
8876            mut self,
8877            v: V,
8878        ) -> Self {
8879            self.0.request = v.into();
8880            self
8881        }
8882
8883        /// Sets all the options, replacing any prior values.
8884        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8885            self.0.options = v.into();
8886            self
8887        }
8888
8889        /// Sends the request.
8890        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8891            (*self.0.stub)
8892                .get_iam_policy(self.0.request, self.0.options)
8893                .await
8894                .map(crate::Response::into_body)
8895        }
8896
8897        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
8898        ///
8899        /// This is a **required** field for requests.
8900        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8901            self.0.request.resource = v.into();
8902            self
8903        }
8904
8905        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
8906        pub fn set_options<T>(mut self, v: T) -> Self
8907        where
8908            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
8909        {
8910            self.0.request.options = std::option::Option::Some(v.into());
8911            self
8912        }
8913
8914        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
8915        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
8916        where
8917            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
8918        {
8919            self.0.request.options = v.map(|x| x.into());
8920            self
8921        }
8922    }
8923
8924    #[doc(hidden)]
8925    impl crate::RequestBuilder for GetIamPolicy {
8926        fn request_options(&mut self) -> &mut crate::RequestOptions {
8927            &mut self.0.options
8928        }
8929    }
8930
8931    /// The request builder for [ContentService::test_iam_permissions][crate::client::ContentService::test_iam_permissions] calls.
8932    ///
8933    /// # Example
8934    /// ```
8935    /// # use google_cloud_dataplex_v1::builder::content_service::TestIamPermissions;
8936    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8937    ///
8938    /// let builder = prepare_request_builder();
8939    /// let response = builder.send().await?;
8940    /// # Ok(()) }
8941    ///
8942    /// fn prepare_request_builder() -> TestIamPermissions {
8943    ///   # panic!();
8944    ///   // ... details omitted ...
8945    /// }
8946    /// ```
8947    #[derive(Clone, Debug)]
8948    pub struct TestIamPermissions(
8949        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
8950    );
8951
8952    impl TestIamPermissions {
8953        pub(crate) fn new(
8954            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8955        ) -> Self {
8956            Self(RequestBuilder::new(stub))
8957        }
8958
8959        /// Sets the full request, replacing any prior values.
8960        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
8961            mut self,
8962            v: V,
8963        ) -> Self {
8964            self.0.request = v.into();
8965            self
8966        }
8967
8968        /// Sets all the options, replacing any prior values.
8969        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8970            self.0.options = v.into();
8971            self
8972        }
8973
8974        /// Sends the request.
8975        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
8976            (*self.0.stub)
8977                .test_iam_permissions(self.0.request, self.0.options)
8978                .await
8979                .map(crate::Response::into_body)
8980        }
8981
8982        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
8983        ///
8984        /// This is a **required** field for requests.
8985        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8986            self.0.request.resource = v.into();
8987            self
8988        }
8989
8990        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
8991        ///
8992        /// This is a **required** field for requests.
8993        pub fn set_permissions<T, V>(mut self, v: T) -> Self
8994        where
8995            T: std::iter::IntoIterator<Item = V>,
8996            V: std::convert::Into<std::string::String>,
8997        {
8998            use std::iter::Iterator;
8999            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
9000            self
9001        }
9002    }
9003
9004    #[doc(hidden)]
9005    impl crate::RequestBuilder for TestIamPermissions {
9006        fn request_options(&mut self) -> &mut crate::RequestOptions {
9007            &mut self.0.options
9008        }
9009    }
9010
9011    /// The request builder for [ContentService::list_operations][crate::client::ContentService::list_operations] calls.
9012    ///
9013    /// # Example
9014    /// ```
9015    /// # use google_cloud_dataplex_v1::builder::content_service::ListOperations;
9016    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9017    /// use google_cloud_gax::paginator::ItemPaginator;
9018    ///
9019    /// let builder = prepare_request_builder();
9020    /// let mut items = builder.by_item();
9021    /// while let Some(result) = items.next().await {
9022    ///   let item = result?;
9023    /// }
9024    /// # Ok(()) }
9025    ///
9026    /// fn prepare_request_builder() -> ListOperations {
9027    ///   # panic!();
9028    ///   // ... details omitted ...
9029    /// }
9030    /// ```
9031    #[derive(Clone, Debug)]
9032    pub struct ListOperations(
9033        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
9034    );
9035
9036    impl ListOperations {
9037        pub(crate) fn new(
9038            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9039        ) -> Self {
9040            Self(RequestBuilder::new(stub))
9041        }
9042
9043        /// Sets the full request, replacing any prior values.
9044        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
9045            mut self,
9046            v: V,
9047        ) -> Self {
9048            self.0.request = v.into();
9049            self
9050        }
9051
9052        /// Sets all the options, replacing any prior values.
9053        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9054            self.0.options = v.into();
9055            self
9056        }
9057
9058        /// Sends the request.
9059        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
9060            (*self.0.stub)
9061                .list_operations(self.0.request, self.0.options)
9062                .await
9063                .map(crate::Response::into_body)
9064        }
9065
9066        /// Streams each page in the collection.
9067        pub fn by_page(
9068            self,
9069        ) -> impl google_cloud_gax::paginator::Paginator<
9070            google_cloud_longrunning::model::ListOperationsResponse,
9071            crate::Error,
9072        > {
9073            use std::clone::Clone;
9074            let token = self.0.request.page_token.clone();
9075            let execute = move |token: String| {
9076                let mut builder = self.clone();
9077                builder.0.request = builder.0.request.set_page_token(token);
9078                builder.send()
9079            };
9080            google_cloud_gax::paginator::internal::new_paginator(token, execute)
9081        }
9082
9083        /// Streams each item in the collection.
9084        pub fn by_item(
9085            self,
9086        ) -> impl google_cloud_gax::paginator::ItemPaginator<
9087            google_cloud_longrunning::model::ListOperationsResponse,
9088            crate::Error,
9089        > {
9090            use google_cloud_gax::paginator::Paginator;
9091            self.by_page().items()
9092        }
9093
9094        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
9095        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9096            self.0.request.name = v.into();
9097            self
9098        }
9099
9100        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
9101        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9102            self.0.request.filter = v.into();
9103            self
9104        }
9105
9106        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
9107        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9108            self.0.request.page_size = v.into();
9109            self
9110        }
9111
9112        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
9113        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9114            self.0.request.page_token = v.into();
9115            self
9116        }
9117
9118        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
9119        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
9120            self.0.request.return_partial_success = v.into();
9121            self
9122        }
9123    }
9124
9125    #[doc(hidden)]
9126    impl crate::RequestBuilder for ListOperations {
9127        fn request_options(&mut self) -> &mut crate::RequestOptions {
9128            &mut self.0.options
9129        }
9130    }
9131
9132    /// The request builder for [ContentService::get_operation][crate::client::ContentService::get_operation] calls.
9133    ///
9134    /// # Example
9135    /// ```
9136    /// # use google_cloud_dataplex_v1::builder::content_service::GetOperation;
9137    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9138    ///
9139    /// let builder = prepare_request_builder();
9140    /// let response = builder.send().await?;
9141    /// # Ok(()) }
9142    ///
9143    /// fn prepare_request_builder() -> GetOperation {
9144    ///   # panic!();
9145    ///   // ... details omitted ...
9146    /// }
9147    /// ```
9148    #[derive(Clone, Debug)]
9149    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
9150
9151    impl GetOperation {
9152        pub(crate) fn new(
9153            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9154        ) -> Self {
9155            Self(RequestBuilder::new(stub))
9156        }
9157
9158        /// Sets the full request, replacing any prior values.
9159        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
9160            mut self,
9161            v: V,
9162        ) -> Self {
9163            self.0.request = v.into();
9164            self
9165        }
9166
9167        /// Sets all the options, replacing any prior values.
9168        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9169            self.0.options = v.into();
9170            self
9171        }
9172
9173        /// Sends the request.
9174        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9175            (*self.0.stub)
9176                .get_operation(self.0.request, self.0.options)
9177                .await
9178                .map(crate::Response::into_body)
9179        }
9180
9181        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
9182        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9183            self.0.request.name = v.into();
9184            self
9185        }
9186    }
9187
9188    #[doc(hidden)]
9189    impl crate::RequestBuilder for GetOperation {
9190        fn request_options(&mut self) -> &mut crate::RequestOptions {
9191            &mut self.0.options
9192        }
9193    }
9194
9195    /// The request builder for [ContentService::delete_operation][crate::client::ContentService::delete_operation] calls.
9196    ///
9197    /// # Example
9198    /// ```
9199    /// # use google_cloud_dataplex_v1::builder::content_service::DeleteOperation;
9200    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9201    ///
9202    /// let builder = prepare_request_builder();
9203    /// let response = builder.send().await?;
9204    /// # Ok(()) }
9205    ///
9206    /// fn prepare_request_builder() -> DeleteOperation {
9207    ///   # panic!();
9208    ///   // ... details omitted ...
9209    /// }
9210    /// ```
9211    #[derive(Clone, Debug)]
9212    pub struct DeleteOperation(
9213        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
9214    );
9215
9216    impl DeleteOperation {
9217        pub(crate) fn new(
9218            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9219        ) -> Self {
9220            Self(RequestBuilder::new(stub))
9221        }
9222
9223        /// Sets the full request, replacing any prior values.
9224        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
9225            mut self,
9226            v: V,
9227        ) -> Self {
9228            self.0.request = v.into();
9229            self
9230        }
9231
9232        /// Sets all the options, replacing any prior values.
9233        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9234            self.0.options = v.into();
9235            self
9236        }
9237
9238        /// Sends the request.
9239        pub async fn send(self) -> Result<()> {
9240            (*self.0.stub)
9241                .delete_operation(self.0.request, self.0.options)
9242                .await
9243                .map(crate::Response::into_body)
9244        }
9245
9246        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
9247        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9248            self.0.request.name = v.into();
9249            self
9250        }
9251    }
9252
9253    #[doc(hidden)]
9254    impl crate::RequestBuilder for DeleteOperation {
9255        fn request_options(&mut self) -> &mut crate::RequestOptions {
9256            &mut self.0.options
9257        }
9258    }
9259
9260    /// The request builder for [ContentService::cancel_operation][crate::client::ContentService::cancel_operation] calls.
9261    ///
9262    /// # Example
9263    /// ```
9264    /// # use google_cloud_dataplex_v1::builder::content_service::CancelOperation;
9265    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9266    ///
9267    /// let builder = prepare_request_builder();
9268    /// let response = builder.send().await?;
9269    /// # Ok(()) }
9270    ///
9271    /// fn prepare_request_builder() -> CancelOperation {
9272    ///   # panic!();
9273    ///   // ... details omitted ...
9274    /// }
9275    /// ```
9276    #[derive(Clone, Debug)]
9277    pub struct CancelOperation(
9278        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
9279    );
9280
9281    impl CancelOperation {
9282        pub(crate) fn new(
9283            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9284        ) -> Self {
9285            Self(RequestBuilder::new(stub))
9286        }
9287
9288        /// Sets the full request, replacing any prior values.
9289        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
9290            mut self,
9291            v: V,
9292        ) -> Self {
9293            self.0.request = v.into();
9294            self
9295        }
9296
9297        /// Sets all the options, replacing any prior values.
9298        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9299            self.0.options = v.into();
9300            self
9301        }
9302
9303        /// Sends the request.
9304        pub async fn send(self) -> Result<()> {
9305            (*self.0.stub)
9306                .cancel_operation(self.0.request, self.0.options)
9307                .await
9308                .map(crate::Response::into_body)
9309        }
9310
9311        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
9312        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9313            self.0.request.name = v.into();
9314            self
9315        }
9316    }
9317
9318    #[doc(hidden)]
9319    impl crate::RequestBuilder for CancelOperation {
9320        fn request_options(&mut self) -> &mut crate::RequestOptions {
9321            &mut self.0.options
9322        }
9323    }
9324}
9325
9326pub mod data_product_service {
9327    use crate::Result;
9328
9329    /// A builder for [DataProductService][crate::client::DataProductService].
9330    ///
9331    /// ```
9332    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
9333    /// # use google_cloud_dataplex_v1::*;
9334    /// # use builder::data_product_service::ClientBuilder;
9335    /// # use client::DataProductService;
9336    /// let builder : ClientBuilder = DataProductService::builder();
9337    /// let client = builder
9338    ///     .with_endpoint("https://dataplex.googleapis.com")
9339    ///     .build().await?;
9340    /// # Ok(()) }
9341    /// ```
9342    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
9343
9344    pub(crate) mod client {
9345        use super::super::super::client::DataProductService;
9346        pub struct Factory;
9347        impl crate::ClientFactory for Factory {
9348            type Client = DataProductService;
9349            type Credentials = gaxi::options::Credentials;
9350            async fn build(
9351                self,
9352                config: gaxi::options::ClientConfig,
9353            ) -> crate::ClientBuilderResult<Self::Client> {
9354                Self::Client::new(config).await
9355            }
9356        }
9357    }
9358
9359    /// Common implementation for [crate::client::DataProductService] request builders.
9360    #[derive(Clone, Debug)]
9361    pub(crate) struct RequestBuilder<R: std::default::Default> {
9362        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9363        request: R,
9364        options: crate::RequestOptions,
9365    }
9366
9367    impl<R> RequestBuilder<R>
9368    where
9369        R: std::default::Default,
9370    {
9371        pub(crate) fn new(
9372            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9373        ) -> Self {
9374            Self {
9375                stub,
9376                request: R::default(),
9377                options: crate::RequestOptions::default(),
9378            }
9379        }
9380    }
9381
9382    /// The request builder for [DataProductService::create_data_product][crate::client::DataProductService::create_data_product] calls.
9383    ///
9384    /// # Example
9385    /// ```
9386    /// # use google_cloud_dataplex_v1::builder::data_product_service::CreateDataProduct;
9387    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9388    /// use google_cloud_lro::Poller;
9389    ///
9390    /// let builder = prepare_request_builder();
9391    /// let response = builder.poller().until_done().await?;
9392    /// # Ok(()) }
9393    ///
9394    /// fn prepare_request_builder() -> CreateDataProduct {
9395    ///   # panic!();
9396    ///   // ... details omitted ...
9397    /// }
9398    /// ```
9399    #[derive(Clone, Debug)]
9400    pub struct CreateDataProduct(RequestBuilder<crate::model::CreateDataProductRequest>);
9401
9402    impl CreateDataProduct {
9403        pub(crate) fn new(
9404            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9405        ) -> Self {
9406            Self(RequestBuilder::new(stub))
9407        }
9408
9409        /// Sets the full request, replacing any prior values.
9410        pub fn with_request<V: Into<crate::model::CreateDataProductRequest>>(
9411            mut self,
9412            v: V,
9413        ) -> Self {
9414            self.0.request = v.into();
9415            self
9416        }
9417
9418        /// Sets all the options, replacing any prior values.
9419        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9420            self.0.options = v.into();
9421            self
9422        }
9423
9424        /// Sends the request.
9425        ///
9426        /// # Long running operations
9427        ///
9428        /// This starts, but does not poll, a longrunning operation. More information
9429        /// on [create_data_product][crate::client::DataProductService::create_data_product].
9430        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9431            (*self.0.stub)
9432                .create_data_product(self.0.request, self.0.options)
9433                .await
9434                .map(crate::Response::into_body)
9435        }
9436
9437        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_product`.
9438        pub fn poller(
9439            self,
9440        ) -> impl google_cloud_lro::Poller<crate::model::DataProduct, crate::model::OperationMetadata>
9441        {
9442            type Operation = google_cloud_lro::internal::Operation<
9443                crate::model::DataProduct,
9444                crate::model::OperationMetadata,
9445            >;
9446            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9447            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9448
9449            let stub = self.0.stub.clone();
9450            let mut options = self.0.options.clone();
9451            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
9452            let query = move |name| {
9453                let stub = stub.clone();
9454                let options = options.clone();
9455                async {
9456                    let op = GetOperation::new(stub)
9457                        .set_name(name)
9458                        .with_options(options)
9459                        .send()
9460                        .await?;
9461                    Ok(Operation::new(op))
9462                }
9463            };
9464
9465            let start = move || async {
9466                let op = self.send().await?;
9467                Ok(Operation::new(op))
9468            };
9469
9470            google_cloud_lro::internal::new_poller(
9471                polling_error_policy,
9472                polling_backoff_policy,
9473                start,
9474                query,
9475            )
9476        }
9477
9478        /// Sets the value of [parent][crate::model::CreateDataProductRequest::parent].
9479        ///
9480        /// This is a **required** field for requests.
9481        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9482            self.0.request.parent = v.into();
9483            self
9484        }
9485
9486        /// Sets the value of [data_product_id][crate::model::CreateDataProductRequest::data_product_id].
9487        pub fn set_data_product_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
9488            self.0.request.data_product_id = v.into();
9489            self
9490        }
9491
9492        /// Sets the value of [data_product][crate::model::CreateDataProductRequest::data_product].
9493        ///
9494        /// This is a **required** field for requests.
9495        pub fn set_data_product<T>(mut self, v: T) -> Self
9496        where
9497            T: std::convert::Into<crate::model::DataProduct>,
9498        {
9499            self.0.request.data_product = std::option::Option::Some(v.into());
9500            self
9501        }
9502
9503        /// Sets or clears the value of [data_product][crate::model::CreateDataProductRequest::data_product].
9504        ///
9505        /// This is a **required** field for requests.
9506        pub fn set_or_clear_data_product<T>(mut self, v: std::option::Option<T>) -> Self
9507        where
9508            T: std::convert::Into<crate::model::DataProduct>,
9509        {
9510            self.0.request.data_product = v.map(|x| x.into());
9511            self
9512        }
9513
9514        /// Sets the value of [validate_only][crate::model::CreateDataProductRequest::validate_only].
9515        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9516            self.0.request.validate_only = v.into();
9517            self
9518        }
9519    }
9520
9521    #[doc(hidden)]
9522    impl crate::RequestBuilder for CreateDataProduct {
9523        fn request_options(&mut self) -> &mut crate::RequestOptions {
9524            &mut self.0.options
9525        }
9526    }
9527
9528    /// The request builder for [DataProductService::delete_data_product][crate::client::DataProductService::delete_data_product] calls.
9529    ///
9530    /// # Example
9531    /// ```
9532    /// # use google_cloud_dataplex_v1::builder::data_product_service::DeleteDataProduct;
9533    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9534    /// use google_cloud_lro::Poller;
9535    ///
9536    /// let builder = prepare_request_builder();
9537    /// let response = builder.poller().until_done().await?;
9538    /// # Ok(()) }
9539    ///
9540    /// fn prepare_request_builder() -> DeleteDataProduct {
9541    ///   # panic!();
9542    ///   // ... details omitted ...
9543    /// }
9544    /// ```
9545    #[derive(Clone, Debug)]
9546    pub struct DeleteDataProduct(RequestBuilder<crate::model::DeleteDataProductRequest>);
9547
9548    impl DeleteDataProduct {
9549        pub(crate) fn new(
9550            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9551        ) -> Self {
9552            Self(RequestBuilder::new(stub))
9553        }
9554
9555        /// Sets the full request, replacing any prior values.
9556        pub fn with_request<V: Into<crate::model::DeleteDataProductRequest>>(
9557            mut self,
9558            v: V,
9559        ) -> Self {
9560            self.0.request = v.into();
9561            self
9562        }
9563
9564        /// Sets all the options, replacing any prior values.
9565        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9566            self.0.options = v.into();
9567            self
9568        }
9569
9570        /// Sends the request.
9571        ///
9572        /// # Long running operations
9573        ///
9574        /// This starts, but does not poll, a longrunning operation. More information
9575        /// on [delete_data_product][crate::client::DataProductService::delete_data_product].
9576        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9577            (*self.0.stub)
9578                .delete_data_product(self.0.request, self.0.options)
9579                .await
9580                .map(crate::Response::into_body)
9581        }
9582
9583        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_product`.
9584        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
9585            type Operation =
9586                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
9587            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9588            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9589
9590            let stub = self.0.stub.clone();
9591            let mut options = self.0.options.clone();
9592            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
9593            let query = move |name| {
9594                let stub = stub.clone();
9595                let options = options.clone();
9596                async {
9597                    let op = GetOperation::new(stub)
9598                        .set_name(name)
9599                        .with_options(options)
9600                        .send()
9601                        .await?;
9602                    Ok(Operation::new(op))
9603                }
9604            };
9605
9606            let start = move || async {
9607                let op = self.send().await?;
9608                Ok(Operation::new(op))
9609            };
9610
9611            google_cloud_lro::internal::new_unit_response_poller(
9612                polling_error_policy,
9613                polling_backoff_policy,
9614                start,
9615                query,
9616            )
9617        }
9618
9619        /// Sets the value of [name][crate::model::DeleteDataProductRequest::name].
9620        ///
9621        /// This is a **required** field for requests.
9622        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9623            self.0.request.name = v.into();
9624            self
9625        }
9626
9627        /// Sets the value of [etag][crate::model::DeleteDataProductRequest::etag].
9628        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
9629            self.0.request.etag = v.into();
9630            self
9631        }
9632
9633        /// Sets the value of [validate_only][crate::model::DeleteDataProductRequest::validate_only].
9634        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9635            self.0.request.validate_only = v.into();
9636            self
9637        }
9638    }
9639
9640    #[doc(hidden)]
9641    impl crate::RequestBuilder for DeleteDataProduct {
9642        fn request_options(&mut self) -> &mut crate::RequestOptions {
9643            &mut self.0.options
9644        }
9645    }
9646
9647    /// The request builder for [DataProductService::get_data_product][crate::client::DataProductService::get_data_product] calls.
9648    ///
9649    /// # Example
9650    /// ```
9651    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetDataProduct;
9652    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9653    ///
9654    /// let builder = prepare_request_builder();
9655    /// let response = builder.send().await?;
9656    /// # Ok(()) }
9657    ///
9658    /// fn prepare_request_builder() -> GetDataProduct {
9659    ///   # panic!();
9660    ///   // ... details omitted ...
9661    /// }
9662    /// ```
9663    #[derive(Clone, Debug)]
9664    pub struct GetDataProduct(RequestBuilder<crate::model::GetDataProductRequest>);
9665
9666    impl GetDataProduct {
9667        pub(crate) fn new(
9668            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9669        ) -> Self {
9670            Self(RequestBuilder::new(stub))
9671        }
9672
9673        /// Sets the full request, replacing any prior values.
9674        pub fn with_request<V: Into<crate::model::GetDataProductRequest>>(mut self, v: V) -> Self {
9675            self.0.request = v.into();
9676            self
9677        }
9678
9679        /// Sets all the options, replacing any prior values.
9680        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9681            self.0.options = v.into();
9682            self
9683        }
9684
9685        /// Sends the request.
9686        pub async fn send(self) -> Result<crate::model::DataProduct> {
9687            (*self.0.stub)
9688                .get_data_product(self.0.request, self.0.options)
9689                .await
9690                .map(crate::Response::into_body)
9691        }
9692
9693        /// Sets the value of [name][crate::model::GetDataProductRequest::name].
9694        ///
9695        /// This is a **required** field for requests.
9696        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9697            self.0.request.name = v.into();
9698            self
9699        }
9700    }
9701
9702    #[doc(hidden)]
9703    impl crate::RequestBuilder for GetDataProduct {
9704        fn request_options(&mut self) -> &mut crate::RequestOptions {
9705            &mut self.0.options
9706        }
9707    }
9708
9709    /// The request builder for [DataProductService::list_data_products][crate::client::DataProductService::list_data_products] calls.
9710    ///
9711    /// # Example
9712    /// ```
9713    /// # use google_cloud_dataplex_v1::builder::data_product_service::ListDataProducts;
9714    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9715    /// use google_cloud_gax::paginator::ItemPaginator;
9716    ///
9717    /// let builder = prepare_request_builder();
9718    /// let mut items = builder.by_item();
9719    /// while let Some(result) = items.next().await {
9720    ///   let item = result?;
9721    /// }
9722    /// # Ok(()) }
9723    ///
9724    /// fn prepare_request_builder() -> ListDataProducts {
9725    ///   # panic!();
9726    ///   // ... details omitted ...
9727    /// }
9728    /// ```
9729    #[derive(Clone, Debug)]
9730    pub struct ListDataProducts(RequestBuilder<crate::model::ListDataProductsRequest>);
9731
9732    impl ListDataProducts {
9733        pub(crate) fn new(
9734            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9735        ) -> Self {
9736            Self(RequestBuilder::new(stub))
9737        }
9738
9739        /// Sets the full request, replacing any prior values.
9740        pub fn with_request<V: Into<crate::model::ListDataProductsRequest>>(
9741            mut self,
9742            v: V,
9743        ) -> Self {
9744            self.0.request = v.into();
9745            self
9746        }
9747
9748        /// Sets all the options, replacing any prior values.
9749        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9750            self.0.options = v.into();
9751            self
9752        }
9753
9754        /// Sends the request.
9755        pub async fn send(self) -> Result<crate::model::ListDataProductsResponse> {
9756            (*self.0.stub)
9757                .list_data_products(self.0.request, self.0.options)
9758                .await
9759                .map(crate::Response::into_body)
9760        }
9761
9762        /// Streams each page in the collection.
9763        pub fn by_page(
9764            self,
9765        ) -> impl google_cloud_gax::paginator::Paginator<
9766            crate::model::ListDataProductsResponse,
9767            crate::Error,
9768        > {
9769            use std::clone::Clone;
9770            let token = self.0.request.page_token.clone();
9771            let execute = move |token: String| {
9772                let mut builder = self.clone();
9773                builder.0.request = builder.0.request.set_page_token(token);
9774                builder.send()
9775            };
9776            google_cloud_gax::paginator::internal::new_paginator(token, execute)
9777        }
9778
9779        /// Streams each item in the collection.
9780        pub fn by_item(
9781            self,
9782        ) -> impl google_cloud_gax::paginator::ItemPaginator<
9783            crate::model::ListDataProductsResponse,
9784            crate::Error,
9785        > {
9786            use google_cloud_gax::paginator::Paginator;
9787            self.by_page().items()
9788        }
9789
9790        /// Sets the value of [parent][crate::model::ListDataProductsRequest::parent].
9791        ///
9792        /// This is a **required** field for requests.
9793        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9794            self.0.request.parent = v.into();
9795            self
9796        }
9797
9798        /// Sets the value of [filter][crate::model::ListDataProductsRequest::filter].
9799        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9800            self.0.request.filter = v.into();
9801            self
9802        }
9803
9804        /// Sets the value of [page_size][crate::model::ListDataProductsRequest::page_size].
9805        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9806            self.0.request.page_size = v.into();
9807            self
9808        }
9809
9810        /// Sets the value of [page_token][crate::model::ListDataProductsRequest::page_token].
9811        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9812            self.0.request.page_token = v.into();
9813            self
9814        }
9815
9816        /// Sets the value of [order_by][crate::model::ListDataProductsRequest::order_by].
9817        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
9818            self.0.request.order_by = v.into();
9819            self
9820        }
9821    }
9822
9823    #[doc(hidden)]
9824    impl crate::RequestBuilder for ListDataProducts {
9825        fn request_options(&mut self) -> &mut crate::RequestOptions {
9826            &mut self.0.options
9827        }
9828    }
9829
9830    /// The request builder for [DataProductService::update_data_product][crate::client::DataProductService::update_data_product] calls.
9831    ///
9832    /// # Example
9833    /// ```
9834    /// # use google_cloud_dataplex_v1::builder::data_product_service::UpdateDataProduct;
9835    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9836    /// use google_cloud_lro::Poller;
9837    ///
9838    /// let builder = prepare_request_builder();
9839    /// let response = builder.poller().until_done().await?;
9840    /// # Ok(()) }
9841    ///
9842    /// fn prepare_request_builder() -> UpdateDataProduct {
9843    ///   # panic!();
9844    ///   // ... details omitted ...
9845    /// }
9846    /// ```
9847    #[derive(Clone, Debug)]
9848    pub struct UpdateDataProduct(RequestBuilder<crate::model::UpdateDataProductRequest>);
9849
9850    impl UpdateDataProduct {
9851        pub(crate) fn new(
9852            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9853        ) -> Self {
9854            Self(RequestBuilder::new(stub))
9855        }
9856
9857        /// Sets the full request, replacing any prior values.
9858        pub fn with_request<V: Into<crate::model::UpdateDataProductRequest>>(
9859            mut self,
9860            v: V,
9861        ) -> Self {
9862            self.0.request = v.into();
9863            self
9864        }
9865
9866        /// Sets all the options, replacing any prior values.
9867        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9868            self.0.options = v.into();
9869            self
9870        }
9871
9872        /// Sends the request.
9873        ///
9874        /// # Long running operations
9875        ///
9876        /// This starts, but does not poll, a longrunning operation. More information
9877        /// on [update_data_product][crate::client::DataProductService::update_data_product].
9878        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9879            (*self.0.stub)
9880                .update_data_product(self.0.request, self.0.options)
9881                .await
9882                .map(crate::Response::into_body)
9883        }
9884
9885        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_product`.
9886        pub fn poller(
9887            self,
9888        ) -> impl google_cloud_lro::Poller<crate::model::DataProduct, crate::model::OperationMetadata>
9889        {
9890            type Operation = google_cloud_lro::internal::Operation<
9891                crate::model::DataProduct,
9892                crate::model::OperationMetadata,
9893            >;
9894            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9895            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9896
9897            let stub = self.0.stub.clone();
9898            let mut options = self.0.options.clone();
9899            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
9900            let query = move |name| {
9901                let stub = stub.clone();
9902                let options = options.clone();
9903                async {
9904                    let op = GetOperation::new(stub)
9905                        .set_name(name)
9906                        .with_options(options)
9907                        .send()
9908                        .await?;
9909                    Ok(Operation::new(op))
9910                }
9911            };
9912
9913            let start = move || async {
9914                let op = self.send().await?;
9915                Ok(Operation::new(op))
9916            };
9917
9918            google_cloud_lro::internal::new_poller(
9919                polling_error_policy,
9920                polling_backoff_policy,
9921                start,
9922                query,
9923            )
9924        }
9925
9926        /// Sets the value of [data_product][crate::model::UpdateDataProductRequest::data_product].
9927        ///
9928        /// This is a **required** field for requests.
9929        pub fn set_data_product<T>(mut self, v: T) -> Self
9930        where
9931            T: std::convert::Into<crate::model::DataProduct>,
9932        {
9933            self.0.request.data_product = std::option::Option::Some(v.into());
9934            self
9935        }
9936
9937        /// Sets or clears the value of [data_product][crate::model::UpdateDataProductRequest::data_product].
9938        ///
9939        /// This is a **required** field for requests.
9940        pub fn set_or_clear_data_product<T>(mut self, v: std::option::Option<T>) -> Self
9941        where
9942            T: std::convert::Into<crate::model::DataProduct>,
9943        {
9944            self.0.request.data_product = v.map(|x| x.into());
9945            self
9946        }
9947
9948        /// Sets the value of [update_mask][crate::model::UpdateDataProductRequest::update_mask].
9949        pub fn set_update_mask<T>(mut self, v: T) -> Self
9950        where
9951            T: std::convert::Into<wkt::FieldMask>,
9952        {
9953            self.0.request.update_mask = std::option::Option::Some(v.into());
9954            self
9955        }
9956
9957        /// Sets or clears the value of [update_mask][crate::model::UpdateDataProductRequest::update_mask].
9958        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9959        where
9960            T: std::convert::Into<wkt::FieldMask>,
9961        {
9962            self.0.request.update_mask = v.map(|x| x.into());
9963            self
9964        }
9965
9966        /// Sets the value of [validate_only][crate::model::UpdateDataProductRequest::validate_only].
9967        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9968            self.0.request.validate_only = v.into();
9969            self
9970        }
9971    }
9972
9973    #[doc(hidden)]
9974    impl crate::RequestBuilder for UpdateDataProduct {
9975        fn request_options(&mut self) -> &mut crate::RequestOptions {
9976            &mut self.0.options
9977        }
9978    }
9979
9980    /// The request builder for [DataProductService::create_data_asset][crate::client::DataProductService::create_data_asset] calls.
9981    ///
9982    /// # Example
9983    /// ```
9984    /// # use google_cloud_dataplex_v1::builder::data_product_service::CreateDataAsset;
9985    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9986    /// use google_cloud_lro::Poller;
9987    ///
9988    /// let builder = prepare_request_builder();
9989    /// let response = builder.poller().until_done().await?;
9990    /// # Ok(()) }
9991    ///
9992    /// fn prepare_request_builder() -> CreateDataAsset {
9993    ///   # panic!();
9994    ///   // ... details omitted ...
9995    /// }
9996    /// ```
9997    #[derive(Clone, Debug)]
9998    pub struct CreateDataAsset(RequestBuilder<crate::model::CreateDataAssetRequest>);
9999
10000    impl CreateDataAsset {
10001        pub(crate) fn new(
10002            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10003        ) -> Self {
10004            Self(RequestBuilder::new(stub))
10005        }
10006
10007        /// Sets the full request, replacing any prior values.
10008        pub fn with_request<V: Into<crate::model::CreateDataAssetRequest>>(mut self, v: V) -> Self {
10009            self.0.request = v.into();
10010            self
10011        }
10012
10013        /// Sets all the options, replacing any prior values.
10014        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10015            self.0.options = v.into();
10016            self
10017        }
10018
10019        /// Sends the request.
10020        ///
10021        /// # Long running operations
10022        ///
10023        /// This starts, but does not poll, a longrunning operation. More information
10024        /// on [create_data_asset][crate::client::DataProductService::create_data_asset].
10025        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10026            (*self.0.stub)
10027                .create_data_asset(self.0.request, self.0.options)
10028                .await
10029                .map(crate::Response::into_body)
10030        }
10031
10032        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_asset`.
10033        pub fn poller(
10034            self,
10035        ) -> impl google_cloud_lro::Poller<crate::model::DataAsset, crate::model::OperationMetadata>
10036        {
10037            type Operation = google_cloud_lro::internal::Operation<
10038                crate::model::DataAsset,
10039                crate::model::OperationMetadata,
10040            >;
10041            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10042            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10043
10044            let stub = self.0.stub.clone();
10045            let mut options = self.0.options.clone();
10046            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10047            let query = move |name| {
10048                let stub = stub.clone();
10049                let options = options.clone();
10050                async {
10051                    let op = GetOperation::new(stub)
10052                        .set_name(name)
10053                        .with_options(options)
10054                        .send()
10055                        .await?;
10056                    Ok(Operation::new(op))
10057                }
10058            };
10059
10060            let start = move || async {
10061                let op = self.send().await?;
10062                Ok(Operation::new(op))
10063            };
10064
10065            google_cloud_lro::internal::new_poller(
10066                polling_error_policy,
10067                polling_backoff_policy,
10068                start,
10069                query,
10070            )
10071        }
10072
10073        /// Sets the value of [parent][crate::model::CreateDataAssetRequest::parent].
10074        ///
10075        /// This is a **required** field for requests.
10076        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10077            self.0.request.parent = v.into();
10078            self
10079        }
10080
10081        /// Sets the value of [data_asset_id][crate::model::CreateDataAssetRequest::data_asset_id].
10082        pub fn set_data_asset_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
10083            self.0.request.data_asset_id = v.into();
10084            self
10085        }
10086
10087        /// Sets the value of [data_asset][crate::model::CreateDataAssetRequest::data_asset].
10088        ///
10089        /// This is a **required** field for requests.
10090        pub fn set_data_asset<T>(mut self, v: T) -> Self
10091        where
10092            T: std::convert::Into<crate::model::DataAsset>,
10093        {
10094            self.0.request.data_asset = std::option::Option::Some(v.into());
10095            self
10096        }
10097
10098        /// Sets or clears the value of [data_asset][crate::model::CreateDataAssetRequest::data_asset].
10099        ///
10100        /// This is a **required** field for requests.
10101        pub fn set_or_clear_data_asset<T>(mut self, v: std::option::Option<T>) -> Self
10102        where
10103            T: std::convert::Into<crate::model::DataAsset>,
10104        {
10105            self.0.request.data_asset = v.map(|x| x.into());
10106            self
10107        }
10108
10109        /// Sets the value of [validate_only][crate::model::CreateDataAssetRequest::validate_only].
10110        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10111            self.0.request.validate_only = v.into();
10112            self
10113        }
10114    }
10115
10116    #[doc(hidden)]
10117    impl crate::RequestBuilder for CreateDataAsset {
10118        fn request_options(&mut self) -> &mut crate::RequestOptions {
10119            &mut self.0.options
10120        }
10121    }
10122
10123    /// The request builder for [DataProductService::update_data_asset][crate::client::DataProductService::update_data_asset] calls.
10124    ///
10125    /// # Example
10126    /// ```
10127    /// # use google_cloud_dataplex_v1::builder::data_product_service::UpdateDataAsset;
10128    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10129    /// use google_cloud_lro::Poller;
10130    ///
10131    /// let builder = prepare_request_builder();
10132    /// let response = builder.poller().until_done().await?;
10133    /// # Ok(()) }
10134    ///
10135    /// fn prepare_request_builder() -> UpdateDataAsset {
10136    ///   # panic!();
10137    ///   // ... details omitted ...
10138    /// }
10139    /// ```
10140    #[derive(Clone, Debug)]
10141    pub struct UpdateDataAsset(RequestBuilder<crate::model::UpdateDataAssetRequest>);
10142
10143    impl UpdateDataAsset {
10144        pub(crate) fn new(
10145            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10146        ) -> Self {
10147            Self(RequestBuilder::new(stub))
10148        }
10149
10150        /// Sets the full request, replacing any prior values.
10151        pub fn with_request<V: Into<crate::model::UpdateDataAssetRequest>>(mut self, v: V) -> Self {
10152            self.0.request = v.into();
10153            self
10154        }
10155
10156        /// Sets all the options, replacing any prior values.
10157        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10158            self.0.options = v.into();
10159            self
10160        }
10161
10162        /// Sends the request.
10163        ///
10164        /// # Long running operations
10165        ///
10166        /// This starts, but does not poll, a longrunning operation. More information
10167        /// on [update_data_asset][crate::client::DataProductService::update_data_asset].
10168        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10169            (*self.0.stub)
10170                .update_data_asset(self.0.request, self.0.options)
10171                .await
10172                .map(crate::Response::into_body)
10173        }
10174
10175        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_asset`.
10176        pub fn poller(
10177            self,
10178        ) -> impl google_cloud_lro::Poller<crate::model::DataAsset, crate::model::OperationMetadata>
10179        {
10180            type Operation = google_cloud_lro::internal::Operation<
10181                crate::model::DataAsset,
10182                crate::model::OperationMetadata,
10183            >;
10184            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10185            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10186
10187            let stub = self.0.stub.clone();
10188            let mut options = self.0.options.clone();
10189            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10190            let query = move |name| {
10191                let stub = stub.clone();
10192                let options = options.clone();
10193                async {
10194                    let op = GetOperation::new(stub)
10195                        .set_name(name)
10196                        .with_options(options)
10197                        .send()
10198                        .await?;
10199                    Ok(Operation::new(op))
10200                }
10201            };
10202
10203            let start = move || async {
10204                let op = self.send().await?;
10205                Ok(Operation::new(op))
10206            };
10207
10208            google_cloud_lro::internal::new_poller(
10209                polling_error_policy,
10210                polling_backoff_policy,
10211                start,
10212                query,
10213            )
10214        }
10215
10216        /// Sets the value of [data_asset][crate::model::UpdateDataAssetRequest::data_asset].
10217        ///
10218        /// This is a **required** field for requests.
10219        pub fn set_data_asset<T>(mut self, v: T) -> Self
10220        where
10221            T: std::convert::Into<crate::model::DataAsset>,
10222        {
10223            self.0.request.data_asset = std::option::Option::Some(v.into());
10224            self
10225        }
10226
10227        /// Sets or clears the value of [data_asset][crate::model::UpdateDataAssetRequest::data_asset].
10228        ///
10229        /// This is a **required** field for requests.
10230        pub fn set_or_clear_data_asset<T>(mut self, v: std::option::Option<T>) -> Self
10231        where
10232            T: std::convert::Into<crate::model::DataAsset>,
10233        {
10234            self.0.request.data_asset = v.map(|x| x.into());
10235            self
10236        }
10237
10238        /// Sets the value of [update_mask][crate::model::UpdateDataAssetRequest::update_mask].
10239        pub fn set_update_mask<T>(mut self, v: T) -> Self
10240        where
10241            T: std::convert::Into<wkt::FieldMask>,
10242        {
10243            self.0.request.update_mask = std::option::Option::Some(v.into());
10244            self
10245        }
10246
10247        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAssetRequest::update_mask].
10248        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10249        where
10250            T: std::convert::Into<wkt::FieldMask>,
10251        {
10252            self.0.request.update_mask = v.map(|x| x.into());
10253            self
10254        }
10255
10256        /// Sets the value of [validate_only][crate::model::UpdateDataAssetRequest::validate_only].
10257        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10258            self.0.request.validate_only = v.into();
10259            self
10260        }
10261    }
10262
10263    #[doc(hidden)]
10264    impl crate::RequestBuilder for UpdateDataAsset {
10265        fn request_options(&mut self) -> &mut crate::RequestOptions {
10266            &mut self.0.options
10267        }
10268    }
10269
10270    /// The request builder for [DataProductService::delete_data_asset][crate::client::DataProductService::delete_data_asset] calls.
10271    ///
10272    /// # Example
10273    /// ```
10274    /// # use google_cloud_dataplex_v1::builder::data_product_service::DeleteDataAsset;
10275    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10276    /// use google_cloud_lro::Poller;
10277    ///
10278    /// let builder = prepare_request_builder();
10279    /// let response = builder.poller().until_done().await?;
10280    /// # Ok(()) }
10281    ///
10282    /// fn prepare_request_builder() -> DeleteDataAsset {
10283    ///   # panic!();
10284    ///   // ... details omitted ...
10285    /// }
10286    /// ```
10287    #[derive(Clone, Debug)]
10288    pub struct DeleteDataAsset(RequestBuilder<crate::model::DeleteDataAssetRequest>);
10289
10290    impl DeleteDataAsset {
10291        pub(crate) fn new(
10292            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10293        ) -> Self {
10294            Self(RequestBuilder::new(stub))
10295        }
10296
10297        /// Sets the full request, replacing any prior values.
10298        pub fn with_request<V: Into<crate::model::DeleteDataAssetRequest>>(mut self, v: V) -> Self {
10299            self.0.request = v.into();
10300            self
10301        }
10302
10303        /// Sets all the options, replacing any prior values.
10304        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10305            self.0.options = v.into();
10306            self
10307        }
10308
10309        /// Sends the request.
10310        ///
10311        /// # Long running operations
10312        ///
10313        /// This starts, but does not poll, a longrunning operation. More information
10314        /// on [delete_data_asset][crate::client::DataProductService::delete_data_asset].
10315        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10316            (*self.0.stub)
10317                .delete_data_asset(self.0.request, self.0.options)
10318                .await
10319                .map(crate::Response::into_body)
10320        }
10321
10322        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_asset`.
10323        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
10324            type Operation =
10325                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
10326            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10327            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10328
10329            let stub = self.0.stub.clone();
10330            let mut options = self.0.options.clone();
10331            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10332            let query = move |name| {
10333                let stub = stub.clone();
10334                let options = options.clone();
10335                async {
10336                    let op = GetOperation::new(stub)
10337                        .set_name(name)
10338                        .with_options(options)
10339                        .send()
10340                        .await?;
10341                    Ok(Operation::new(op))
10342                }
10343            };
10344
10345            let start = move || async {
10346                let op = self.send().await?;
10347                Ok(Operation::new(op))
10348            };
10349
10350            google_cloud_lro::internal::new_unit_response_poller(
10351                polling_error_policy,
10352                polling_backoff_policy,
10353                start,
10354                query,
10355            )
10356        }
10357
10358        /// Sets the value of [name][crate::model::DeleteDataAssetRequest::name].
10359        ///
10360        /// This is a **required** field for requests.
10361        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10362            self.0.request.name = v.into();
10363            self
10364        }
10365
10366        /// Sets the value of [etag][crate::model::DeleteDataAssetRequest::etag].
10367        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
10368            self.0.request.etag = v.into();
10369            self
10370        }
10371
10372        /// Sets the value of [validate_only][crate::model::DeleteDataAssetRequest::validate_only].
10373        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10374            self.0.request.validate_only = v.into();
10375            self
10376        }
10377    }
10378
10379    #[doc(hidden)]
10380    impl crate::RequestBuilder for DeleteDataAsset {
10381        fn request_options(&mut self) -> &mut crate::RequestOptions {
10382            &mut self.0.options
10383        }
10384    }
10385
10386    /// The request builder for [DataProductService::get_data_asset][crate::client::DataProductService::get_data_asset] calls.
10387    ///
10388    /// # Example
10389    /// ```
10390    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetDataAsset;
10391    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10392    ///
10393    /// let builder = prepare_request_builder();
10394    /// let response = builder.send().await?;
10395    /// # Ok(()) }
10396    ///
10397    /// fn prepare_request_builder() -> GetDataAsset {
10398    ///   # panic!();
10399    ///   // ... details omitted ...
10400    /// }
10401    /// ```
10402    #[derive(Clone, Debug)]
10403    pub struct GetDataAsset(RequestBuilder<crate::model::GetDataAssetRequest>);
10404
10405    impl GetDataAsset {
10406        pub(crate) fn new(
10407            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10408        ) -> Self {
10409            Self(RequestBuilder::new(stub))
10410        }
10411
10412        /// Sets the full request, replacing any prior values.
10413        pub fn with_request<V: Into<crate::model::GetDataAssetRequest>>(mut self, v: V) -> Self {
10414            self.0.request = v.into();
10415            self
10416        }
10417
10418        /// Sets all the options, replacing any prior values.
10419        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10420            self.0.options = v.into();
10421            self
10422        }
10423
10424        /// Sends the request.
10425        pub async fn send(self) -> Result<crate::model::DataAsset> {
10426            (*self.0.stub)
10427                .get_data_asset(self.0.request, self.0.options)
10428                .await
10429                .map(crate::Response::into_body)
10430        }
10431
10432        /// Sets the value of [name][crate::model::GetDataAssetRequest::name].
10433        ///
10434        /// This is a **required** field for requests.
10435        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10436            self.0.request.name = v.into();
10437            self
10438        }
10439    }
10440
10441    #[doc(hidden)]
10442    impl crate::RequestBuilder for GetDataAsset {
10443        fn request_options(&mut self) -> &mut crate::RequestOptions {
10444            &mut self.0.options
10445        }
10446    }
10447
10448    /// The request builder for [DataProductService::list_data_assets][crate::client::DataProductService::list_data_assets] calls.
10449    ///
10450    /// # Example
10451    /// ```
10452    /// # use google_cloud_dataplex_v1::builder::data_product_service::ListDataAssets;
10453    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10454    /// use google_cloud_gax::paginator::ItemPaginator;
10455    ///
10456    /// let builder = prepare_request_builder();
10457    /// let mut items = builder.by_item();
10458    /// while let Some(result) = items.next().await {
10459    ///   let item = result?;
10460    /// }
10461    /// # Ok(()) }
10462    ///
10463    /// fn prepare_request_builder() -> ListDataAssets {
10464    ///   # panic!();
10465    ///   // ... details omitted ...
10466    /// }
10467    /// ```
10468    #[derive(Clone, Debug)]
10469    pub struct ListDataAssets(RequestBuilder<crate::model::ListDataAssetsRequest>);
10470
10471    impl ListDataAssets {
10472        pub(crate) fn new(
10473            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10474        ) -> Self {
10475            Self(RequestBuilder::new(stub))
10476        }
10477
10478        /// Sets the full request, replacing any prior values.
10479        pub fn with_request<V: Into<crate::model::ListDataAssetsRequest>>(mut self, v: V) -> Self {
10480            self.0.request = v.into();
10481            self
10482        }
10483
10484        /// Sets all the options, replacing any prior values.
10485        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10486            self.0.options = v.into();
10487            self
10488        }
10489
10490        /// Sends the request.
10491        pub async fn send(self) -> Result<crate::model::ListDataAssetsResponse> {
10492            (*self.0.stub)
10493                .list_data_assets(self.0.request, self.0.options)
10494                .await
10495                .map(crate::Response::into_body)
10496        }
10497
10498        /// Streams each page in the collection.
10499        pub fn by_page(
10500            self,
10501        ) -> impl google_cloud_gax::paginator::Paginator<
10502            crate::model::ListDataAssetsResponse,
10503            crate::Error,
10504        > {
10505            use std::clone::Clone;
10506            let token = self.0.request.page_token.clone();
10507            let execute = move |token: String| {
10508                let mut builder = self.clone();
10509                builder.0.request = builder.0.request.set_page_token(token);
10510                builder.send()
10511            };
10512            google_cloud_gax::paginator::internal::new_paginator(token, execute)
10513        }
10514
10515        /// Streams each item in the collection.
10516        pub fn by_item(
10517            self,
10518        ) -> impl google_cloud_gax::paginator::ItemPaginator<
10519            crate::model::ListDataAssetsResponse,
10520            crate::Error,
10521        > {
10522            use google_cloud_gax::paginator::Paginator;
10523            self.by_page().items()
10524        }
10525
10526        /// Sets the value of [parent][crate::model::ListDataAssetsRequest::parent].
10527        ///
10528        /// This is a **required** field for requests.
10529        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10530            self.0.request.parent = v.into();
10531            self
10532        }
10533
10534        /// Sets the value of [filter][crate::model::ListDataAssetsRequest::filter].
10535        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10536            self.0.request.filter = v.into();
10537            self
10538        }
10539
10540        /// Sets the value of [order_by][crate::model::ListDataAssetsRequest::order_by].
10541        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
10542            self.0.request.order_by = v.into();
10543            self
10544        }
10545
10546        /// Sets the value of [page_size][crate::model::ListDataAssetsRequest::page_size].
10547        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10548            self.0.request.page_size = v.into();
10549            self
10550        }
10551
10552        /// Sets the value of [page_token][crate::model::ListDataAssetsRequest::page_token].
10553        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10554            self.0.request.page_token = v.into();
10555            self
10556        }
10557    }
10558
10559    #[doc(hidden)]
10560    impl crate::RequestBuilder for ListDataAssets {
10561        fn request_options(&mut self) -> &mut crate::RequestOptions {
10562            &mut self.0.options
10563        }
10564    }
10565
10566    /// The request builder for [DataProductService::list_locations][crate::client::DataProductService::list_locations] calls.
10567    ///
10568    /// # Example
10569    /// ```
10570    /// # use google_cloud_dataplex_v1::builder::data_product_service::ListLocations;
10571    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10572    /// use google_cloud_gax::paginator::ItemPaginator;
10573    ///
10574    /// let builder = prepare_request_builder();
10575    /// let mut items = builder.by_item();
10576    /// while let Some(result) = items.next().await {
10577    ///   let item = result?;
10578    /// }
10579    /// # Ok(()) }
10580    ///
10581    /// fn prepare_request_builder() -> ListLocations {
10582    ///   # panic!();
10583    ///   // ... details omitted ...
10584    /// }
10585    /// ```
10586    #[derive(Clone, Debug)]
10587    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
10588
10589    impl ListLocations {
10590        pub(crate) fn new(
10591            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10592        ) -> Self {
10593            Self(RequestBuilder::new(stub))
10594        }
10595
10596        /// Sets the full request, replacing any prior values.
10597        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
10598            mut self,
10599            v: V,
10600        ) -> Self {
10601            self.0.request = v.into();
10602            self
10603        }
10604
10605        /// Sets all the options, replacing any prior values.
10606        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10607            self.0.options = v.into();
10608            self
10609        }
10610
10611        /// Sends the request.
10612        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
10613            (*self.0.stub)
10614                .list_locations(self.0.request, self.0.options)
10615                .await
10616                .map(crate::Response::into_body)
10617        }
10618
10619        /// Streams each page in the collection.
10620        pub fn by_page(
10621            self,
10622        ) -> impl google_cloud_gax::paginator::Paginator<
10623            google_cloud_location::model::ListLocationsResponse,
10624            crate::Error,
10625        > {
10626            use std::clone::Clone;
10627            let token = self.0.request.page_token.clone();
10628            let execute = move |token: String| {
10629                let mut builder = self.clone();
10630                builder.0.request = builder.0.request.set_page_token(token);
10631                builder.send()
10632            };
10633            google_cloud_gax::paginator::internal::new_paginator(token, execute)
10634        }
10635
10636        /// Streams each item in the collection.
10637        pub fn by_item(
10638            self,
10639        ) -> impl google_cloud_gax::paginator::ItemPaginator<
10640            google_cloud_location::model::ListLocationsResponse,
10641            crate::Error,
10642        > {
10643            use google_cloud_gax::paginator::Paginator;
10644            self.by_page().items()
10645        }
10646
10647        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
10648        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10649            self.0.request.name = v.into();
10650            self
10651        }
10652
10653        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
10654        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10655            self.0.request.filter = v.into();
10656            self
10657        }
10658
10659        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
10660        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10661            self.0.request.page_size = v.into();
10662            self
10663        }
10664
10665        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
10666        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10667            self.0.request.page_token = v.into();
10668            self
10669        }
10670    }
10671
10672    #[doc(hidden)]
10673    impl crate::RequestBuilder for ListLocations {
10674        fn request_options(&mut self) -> &mut crate::RequestOptions {
10675            &mut self.0.options
10676        }
10677    }
10678
10679    /// The request builder for [DataProductService::get_location][crate::client::DataProductService::get_location] calls.
10680    ///
10681    /// # Example
10682    /// ```
10683    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetLocation;
10684    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10685    ///
10686    /// let builder = prepare_request_builder();
10687    /// let response = builder.send().await?;
10688    /// # Ok(()) }
10689    ///
10690    /// fn prepare_request_builder() -> GetLocation {
10691    ///   # panic!();
10692    ///   // ... details omitted ...
10693    /// }
10694    /// ```
10695    #[derive(Clone, Debug)]
10696    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
10697
10698    impl GetLocation {
10699        pub(crate) fn new(
10700            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10701        ) -> Self {
10702            Self(RequestBuilder::new(stub))
10703        }
10704
10705        /// Sets the full request, replacing any prior values.
10706        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
10707            mut self,
10708            v: V,
10709        ) -> Self {
10710            self.0.request = v.into();
10711            self
10712        }
10713
10714        /// Sets all the options, replacing any prior values.
10715        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10716            self.0.options = v.into();
10717            self
10718        }
10719
10720        /// Sends the request.
10721        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
10722            (*self.0.stub)
10723                .get_location(self.0.request, self.0.options)
10724                .await
10725                .map(crate::Response::into_body)
10726        }
10727
10728        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
10729        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10730            self.0.request.name = v.into();
10731            self
10732        }
10733    }
10734
10735    #[doc(hidden)]
10736    impl crate::RequestBuilder for GetLocation {
10737        fn request_options(&mut self) -> &mut crate::RequestOptions {
10738            &mut self.0.options
10739        }
10740    }
10741
10742    /// The request builder for [DataProductService::set_iam_policy][crate::client::DataProductService::set_iam_policy] calls.
10743    ///
10744    /// # Example
10745    /// ```
10746    /// # use google_cloud_dataplex_v1::builder::data_product_service::SetIamPolicy;
10747    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10748    ///
10749    /// let builder = prepare_request_builder();
10750    /// let response = builder.send().await?;
10751    /// # Ok(()) }
10752    ///
10753    /// fn prepare_request_builder() -> SetIamPolicy {
10754    ///   # panic!();
10755    ///   // ... details omitted ...
10756    /// }
10757    /// ```
10758    #[derive(Clone, Debug)]
10759    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
10760
10761    impl SetIamPolicy {
10762        pub(crate) fn new(
10763            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10764        ) -> Self {
10765            Self(RequestBuilder::new(stub))
10766        }
10767
10768        /// Sets the full request, replacing any prior values.
10769        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
10770            mut self,
10771            v: V,
10772        ) -> Self {
10773            self.0.request = v.into();
10774            self
10775        }
10776
10777        /// Sets all the options, replacing any prior values.
10778        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10779            self.0.options = v.into();
10780            self
10781        }
10782
10783        /// Sends the request.
10784        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
10785            (*self.0.stub)
10786                .set_iam_policy(self.0.request, self.0.options)
10787                .await
10788                .map(crate::Response::into_body)
10789        }
10790
10791        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
10792        ///
10793        /// This is a **required** field for requests.
10794        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
10795            self.0.request.resource = v.into();
10796            self
10797        }
10798
10799        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
10800        ///
10801        /// This is a **required** field for requests.
10802        pub fn set_policy<T>(mut self, v: T) -> Self
10803        where
10804            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
10805        {
10806            self.0.request.policy = std::option::Option::Some(v.into());
10807            self
10808        }
10809
10810        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
10811        ///
10812        /// This is a **required** field for requests.
10813        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
10814        where
10815            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
10816        {
10817            self.0.request.policy = v.map(|x| x.into());
10818            self
10819        }
10820
10821        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
10822        pub fn set_update_mask<T>(mut self, v: T) -> Self
10823        where
10824            T: std::convert::Into<wkt::FieldMask>,
10825        {
10826            self.0.request.update_mask = std::option::Option::Some(v.into());
10827            self
10828        }
10829
10830        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
10831        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10832        where
10833            T: std::convert::Into<wkt::FieldMask>,
10834        {
10835            self.0.request.update_mask = v.map(|x| x.into());
10836            self
10837        }
10838    }
10839
10840    #[doc(hidden)]
10841    impl crate::RequestBuilder for SetIamPolicy {
10842        fn request_options(&mut self) -> &mut crate::RequestOptions {
10843            &mut self.0.options
10844        }
10845    }
10846
10847    /// The request builder for [DataProductService::get_iam_policy][crate::client::DataProductService::get_iam_policy] calls.
10848    ///
10849    /// # Example
10850    /// ```
10851    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetIamPolicy;
10852    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10853    ///
10854    /// let builder = prepare_request_builder();
10855    /// let response = builder.send().await?;
10856    /// # Ok(()) }
10857    ///
10858    /// fn prepare_request_builder() -> GetIamPolicy {
10859    ///   # panic!();
10860    ///   // ... details omitted ...
10861    /// }
10862    /// ```
10863    #[derive(Clone, Debug)]
10864    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
10865
10866    impl GetIamPolicy {
10867        pub(crate) fn new(
10868            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10869        ) -> Self {
10870            Self(RequestBuilder::new(stub))
10871        }
10872
10873        /// Sets the full request, replacing any prior values.
10874        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
10875            mut self,
10876            v: V,
10877        ) -> Self {
10878            self.0.request = v.into();
10879            self
10880        }
10881
10882        /// Sets all the options, replacing any prior values.
10883        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10884            self.0.options = v.into();
10885            self
10886        }
10887
10888        /// Sends the request.
10889        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
10890            (*self.0.stub)
10891                .get_iam_policy(self.0.request, self.0.options)
10892                .await
10893                .map(crate::Response::into_body)
10894        }
10895
10896        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
10897        ///
10898        /// This is a **required** field for requests.
10899        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
10900            self.0.request.resource = v.into();
10901            self
10902        }
10903
10904        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
10905        pub fn set_options<T>(mut self, v: T) -> Self
10906        where
10907            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
10908        {
10909            self.0.request.options = std::option::Option::Some(v.into());
10910            self
10911        }
10912
10913        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
10914        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
10915        where
10916            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
10917        {
10918            self.0.request.options = v.map(|x| x.into());
10919            self
10920        }
10921    }
10922
10923    #[doc(hidden)]
10924    impl crate::RequestBuilder for GetIamPolicy {
10925        fn request_options(&mut self) -> &mut crate::RequestOptions {
10926            &mut self.0.options
10927        }
10928    }
10929
10930    /// The request builder for [DataProductService::test_iam_permissions][crate::client::DataProductService::test_iam_permissions] calls.
10931    ///
10932    /// # Example
10933    /// ```
10934    /// # use google_cloud_dataplex_v1::builder::data_product_service::TestIamPermissions;
10935    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10936    ///
10937    /// let builder = prepare_request_builder();
10938    /// let response = builder.send().await?;
10939    /// # Ok(()) }
10940    ///
10941    /// fn prepare_request_builder() -> TestIamPermissions {
10942    ///   # panic!();
10943    ///   // ... details omitted ...
10944    /// }
10945    /// ```
10946    #[derive(Clone, Debug)]
10947    pub struct TestIamPermissions(
10948        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
10949    );
10950
10951    impl TestIamPermissions {
10952        pub(crate) fn new(
10953            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10954        ) -> Self {
10955            Self(RequestBuilder::new(stub))
10956        }
10957
10958        /// Sets the full request, replacing any prior values.
10959        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
10960            mut self,
10961            v: V,
10962        ) -> Self {
10963            self.0.request = v.into();
10964            self
10965        }
10966
10967        /// Sets all the options, replacing any prior values.
10968        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10969            self.0.options = v.into();
10970            self
10971        }
10972
10973        /// Sends the request.
10974        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
10975            (*self.0.stub)
10976                .test_iam_permissions(self.0.request, self.0.options)
10977                .await
10978                .map(crate::Response::into_body)
10979        }
10980
10981        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
10982        ///
10983        /// This is a **required** field for requests.
10984        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
10985            self.0.request.resource = v.into();
10986            self
10987        }
10988
10989        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
10990        ///
10991        /// This is a **required** field for requests.
10992        pub fn set_permissions<T, V>(mut self, v: T) -> Self
10993        where
10994            T: std::iter::IntoIterator<Item = V>,
10995            V: std::convert::Into<std::string::String>,
10996        {
10997            use std::iter::Iterator;
10998            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
10999            self
11000        }
11001    }
11002
11003    #[doc(hidden)]
11004    impl crate::RequestBuilder for TestIamPermissions {
11005        fn request_options(&mut self) -> &mut crate::RequestOptions {
11006            &mut self.0.options
11007        }
11008    }
11009
11010    /// The request builder for [DataProductService::list_operations][crate::client::DataProductService::list_operations] calls.
11011    ///
11012    /// # Example
11013    /// ```
11014    /// # use google_cloud_dataplex_v1::builder::data_product_service::ListOperations;
11015    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11016    /// use google_cloud_gax::paginator::ItemPaginator;
11017    ///
11018    /// let builder = prepare_request_builder();
11019    /// let mut items = builder.by_item();
11020    /// while let Some(result) = items.next().await {
11021    ///   let item = result?;
11022    /// }
11023    /// # Ok(()) }
11024    ///
11025    /// fn prepare_request_builder() -> ListOperations {
11026    ///   # panic!();
11027    ///   // ... details omitted ...
11028    /// }
11029    /// ```
11030    #[derive(Clone, Debug)]
11031    pub struct ListOperations(
11032        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
11033    );
11034
11035    impl ListOperations {
11036        pub(crate) fn new(
11037            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11038        ) -> Self {
11039            Self(RequestBuilder::new(stub))
11040        }
11041
11042        /// Sets the full request, replacing any prior values.
11043        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
11044            mut self,
11045            v: V,
11046        ) -> Self {
11047            self.0.request = v.into();
11048            self
11049        }
11050
11051        /// Sets all the options, replacing any prior values.
11052        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11053            self.0.options = v.into();
11054            self
11055        }
11056
11057        /// Sends the request.
11058        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
11059            (*self.0.stub)
11060                .list_operations(self.0.request, self.0.options)
11061                .await
11062                .map(crate::Response::into_body)
11063        }
11064
11065        /// Streams each page in the collection.
11066        pub fn by_page(
11067            self,
11068        ) -> impl google_cloud_gax::paginator::Paginator<
11069            google_cloud_longrunning::model::ListOperationsResponse,
11070            crate::Error,
11071        > {
11072            use std::clone::Clone;
11073            let token = self.0.request.page_token.clone();
11074            let execute = move |token: String| {
11075                let mut builder = self.clone();
11076                builder.0.request = builder.0.request.set_page_token(token);
11077                builder.send()
11078            };
11079            google_cloud_gax::paginator::internal::new_paginator(token, execute)
11080        }
11081
11082        /// Streams each item in the collection.
11083        pub fn by_item(
11084            self,
11085        ) -> impl google_cloud_gax::paginator::ItemPaginator<
11086            google_cloud_longrunning::model::ListOperationsResponse,
11087            crate::Error,
11088        > {
11089            use google_cloud_gax::paginator::Paginator;
11090            self.by_page().items()
11091        }
11092
11093        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
11094        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11095            self.0.request.name = v.into();
11096            self
11097        }
11098
11099        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
11100        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
11101            self.0.request.filter = v.into();
11102            self
11103        }
11104
11105        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
11106        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
11107            self.0.request.page_size = v.into();
11108            self
11109        }
11110
11111        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
11112        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
11113            self.0.request.page_token = v.into();
11114            self
11115        }
11116
11117        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
11118        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
11119            self.0.request.return_partial_success = v.into();
11120            self
11121        }
11122    }
11123
11124    #[doc(hidden)]
11125    impl crate::RequestBuilder for ListOperations {
11126        fn request_options(&mut self) -> &mut crate::RequestOptions {
11127            &mut self.0.options
11128        }
11129    }
11130
11131    /// The request builder for [DataProductService::get_operation][crate::client::DataProductService::get_operation] calls.
11132    ///
11133    /// # Example
11134    /// ```
11135    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetOperation;
11136    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11137    ///
11138    /// let builder = prepare_request_builder();
11139    /// let response = builder.send().await?;
11140    /// # Ok(()) }
11141    ///
11142    /// fn prepare_request_builder() -> GetOperation {
11143    ///   # panic!();
11144    ///   // ... details omitted ...
11145    /// }
11146    /// ```
11147    #[derive(Clone, Debug)]
11148    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
11149
11150    impl GetOperation {
11151        pub(crate) fn new(
11152            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11153        ) -> Self {
11154            Self(RequestBuilder::new(stub))
11155        }
11156
11157        /// Sets the full request, replacing any prior values.
11158        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
11159            mut self,
11160            v: V,
11161        ) -> Self {
11162            self.0.request = v.into();
11163            self
11164        }
11165
11166        /// Sets all the options, replacing any prior values.
11167        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11168            self.0.options = v.into();
11169            self
11170        }
11171
11172        /// Sends the request.
11173        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11174            (*self.0.stub)
11175                .get_operation(self.0.request, self.0.options)
11176                .await
11177                .map(crate::Response::into_body)
11178        }
11179
11180        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
11181        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11182            self.0.request.name = v.into();
11183            self
11184        }
11185    }
11186
11187    #[doc(hidden)]
11188    impl crate::RequestBuilder for GetOperation {
11189        fn request_options(&mut self) -> &mut crate::RequestOptions {
11190            &mut self.0.options
11191        }
11192    }
11193
11194    /// The request builder for [DataProductService::delete_operation][crate::client::DataProductService::delete_operation] calls.
11195    ///
11196    /// # Example
11197    /// ```
11198    /// # use google_cloud_dataplex_v1::builder::data_product_service::DeleteOperation;
11199    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11200    ///
11201    /// let builder = prepare_request_builder();
11202    /// let response = builder.send().await?;
11203    /// # Ok(()) }
11204    ///
11205    /// fn prepare_request_builder() -> DeleteOperation {
11206    ///   # panic!();
11207    ///   // ... details omitted ...
11208    /// }
11209    /// ```
11210    #[derive(Clone, Debug)]
11211    pub struct DeleteOperation(
11212        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
11213    );
11214
11215    impl DeleteOperation {
11216        pub(crate) fn new(
11217            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11218        ) -> Self {
11219            Self(RequestBuilder::new(stub))
11220        }
11221
11222        /// Sets the full request, replacing any prior values.
11223        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
11224            mut self,
11225            v: V,
11226        ) -> Self {
11227            self.0.request = v.into();
11228            self
11229        }
11230
11231        /// Sets all the options, replacing any prior values.
11232        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11233            self.0.options = v.into();
11234            self
11235        }
11236
11237        /// Sends the request.
11238        pub async fn send(self) -> Result<()> {
11239            (*self.0.stub)
11240                .delete_operation(self.0.request, self.0.options)
11241                .await
11242                .map(crate::Response::into_body)
11243        }
11244
11245        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
11246        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11247            self.0.request.name = v.into();
11248            self
11249        }
11250    }
11251
11252    #[doc(hidden)]
11253    impl crate::RequestBuilder for DeleteOperation {
11254        fn request_options(&mut self) -> &mut crate::RequestOptions {
11255            &mut self.0.options
11256        }
11257    }
11258
11259    /// The request builder for [DataProductService::cancel_operation][crate::client::DataProductService::cancel_operation] calls.
11260    ///
11261    /// # Example
11262    /// ```
11263    /// # use google_cloud_dataplex_v1::builder::data_product_service::CancelOperation;
11264    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11265    ///
11266    /// let builder = prepare_request_builder();
11267    /// let response = builder.send().await?;
11268    /// # Ok(()) }
11269    ///
11270    /// fn prepare_request_builder() -> CancelOperation {
11271    ///   # panic!();
11272    ///   // ... details omitted ...
11273    /// }
11274    /// ```
11275    #[derive(Clone, Debug)]
11276    pub struct CancelOperation(
11277        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
11278    );
11279
11280    impl CancelOperation {
11281        pub(crate) fn new(
11282            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11283        ) -> Self {
11284            Self(RequestBuilder::new(stub))
11285        }
11286
11287        /// Sets the full request, replacing any prior values.
11288        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
11289            mut self,
11290            v: V,
11291        ) -> Self {
11292            self.0.request = v.into();
11293            self
11294        }
11295
11296        /// Sets all the options, replacing any prior values.
11297        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11298            self.0.options = v.into();
11299            self
11300        }
11301
11302        /// Sends the request.
11303        pub async fn send(self) -> Result<()> {
11304            (*self.0.stub)
11305                .cancel_operation(self.0.request, self.0.options)
11306                .await
11307                .map(crate::Response::into_body)
11308        }
11309
11310        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
11311        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11312            self.0.request.name = v.into();
11313            self
11314        }
11315    }
11316
11317    #[doc(hidden)]
11318    impl crate::RequestBuilder for CancelOperation {
11319        fn request_options(&mut self) -> &mut crate::RequestOptions {
11320            &mut self.0.options
11321        }
11322    }
11323}
11324
11325pub mod data_taxonomy_service {
11326    use crate::Result;
11327
11328    /// A builder for [DataTaxonomyService][crate::client::DataTaxonomyService].
11329    ///
11330    /// ```
11331    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
11332    /// # use google_cloud_dataplex_v1::*;
11333    /// # use builder::data_taxonomy_service::ClientBuilder;
11334    /// # use client::DataTaxonomyService;
11335    /// let builder : ClientBuilder = DataTaxonomyService::builder();
11336    /// let client = builder
11337    ///     .with_endpoint("https://dataplex.googleapis.com")
11338    ///     .build().await?;
11339    /// # Ok(()) }
11340    /// ```
11341    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
11342
11343    pub(crate) mod client {
11344        use super::super::super::client::DataTaxonomyService;
11345        pub struct Factory;
11346        impl crate::ClientFactory for Factory {
11347            type Client = DataTaxonomyService;
11348            type Credentials = gaxi::options::Credentials;
11349            async fn build(
11350                self,
11351                config: gaxi::options::ClientConfig,
11352            ) -> crate::ClientBuilderResult<Self::Client> {
11353                Self::Client::new(config).await
11354            }
11355        }
11356    }
11357
11358    /// Common implementation for [crate::client::DataTaxonomyService] request builders.
11359    #[derive(Clone, Debug)]
11360    pub(crate) struct RequestBuilder<R: std::default::Default> {
11361        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11362        request: R,
11363        options: crate::RequestOptions,
11364    }
11365
11366    impl<R> RequestBuilder<R>
11367    where
11368        R: std::default::Default,
11369    {
11370        pub(crate) fn new(
11371            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11372        ) -> Self {
11373            Self {
11374                stub,
11375                request: R::default(),
11376                options: crate::RequestOptions::default(),
11377            }
11378        }
11379    }
11380
11381    /// The request builder for [DataTaxonomyService::create_data_taxonomy][crate::client::DataTaxonomyService::create_data_taxonomy] calls.
11382    ///
11383    /// # Example
11384    /// ```
11385    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CreateDataTaxonomy;
11386    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11387    /// use google_cloud_lro::Poller;
11388    ///
11389    /// let builder = prepare_request_builder();
11390    /// let response = builder.poller().until_done().await?;
11391    /// # Ok(()) }
11392    ///
11393    /// fn prepare_request_builder() -> CreateDataTaxonomy {
11394    ///   # panic!();
11395    ///   // ... details omitted ...
11396    /// }
11397    /// ```
11398    #[derive(Clone, Debug)]
11399    pub struct CreateDataTaxonomy(RequestBuilder<crate::model::CreateDataTaxonomyRequest>);
11400
11401    impl CreateDataTaxonomy {
11402        pub(crate) fn new(
11403            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11404        ) -> Self {
11405            Self(RequestBuilder::new(stub))
11406        }
11407
11408        /// Sets the full request, replacing any prior values.
11409        pub fn with_request<V: Into<crate::model::CreateDataTaxonomyRequest>>(
11410            mut self,
11411            v: V,
11412        ) -> Self {
11413            self.0.request = v.into();
11414            self
11415        }
11416
11417        /// Sets all the options, replacing any prior values.
11418        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11419            self.0.options = v.into();
11420            self
11421        }
11422
11423        /// Sends the request.
11424        ///
11425        /// # Long running operations
11426        ///
11427        /// This starts, but does not poll, a longrunning operation. More information
11428        /// on [create_data_taxonomy][crate::client::DataTaxonomyService::create_data_taxonomy].
11429        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11430            (*self.0.stub)
11431                .create_data_taxonomy(self.0.request, self.0.options)
11432                .await
11433                .map(crate::Response::into_body)
11434        }
11435
11436        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_taxonomy`.
11437        pub fn poller(
11438            self,
11439        ) -> impl google_cloud_lro::Poller<crate::model::DataTaxonomy, crate::model::OperationMetadata>
11440        {
11441            type Operation = google_cloud_lro::internal::Operation<
11442                crate::model::DataTaxonomy,
11443                crate::model::OperationMetadata,
11444            >;
11445            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11446            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11447
11448            let stub = self.0.stub.clone();
11449            let mut options = self.0.options.clone();
11450            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
11451            let query = move |name| {
11452                let stub = stub.clone();
11453                let options = options.clone();
11454                async {
11455                    let op = GetOperation::new(stub)
11456                        .set_name(name)
11457                        .with_options(options)
11458                        .send()
11459                        .await?;
11460                    Ok(Operation::new(op))
11461                }
11462            };
11463
11464            let start = move || async {
11465                let op = self.send().await?;
11466                Ok(Operation::new(op))
11467            };
11468
11469            google_cloud_lro::internal::new_poller(
11470                polling_error_policy,
11471                polling_backoff_policy,
11472                start,
11473                query,
11474            )
11475        }
11476
11477        /// Sets the value of [parent][crate::model::CreateDataTaxonomyRequest::parent].
11478        ///
11479        /// This is a **required** field for requests.
11480        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
11481            self.0.request.parent = v.into();
11482            self
11483        }
11484
11485        /// Sets the value of [data_taxonomy_id][crate::model::CreateDataTaxonomyRequest::data_taxonomy_id].
11486        ///
11487        /// This is a **required** field for requests.
11488        pub fn set_data_taxonomy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
11489            self.0.request.data_taxonomy_id = v.into();
11490            self
11491        }
11492
11493        /// Sets the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
11494        ///
11495        /// This is a **required** field for requests.
11496        pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
11497        where
11498            T: std::convert::Into<crate::model::DataTaxonomy>,
11499        {
11500            self.0.request.data_taxonomy = std::option::Option::Some(v.into());
11501            self
11502        }
11503
11504        /// Sets or clears the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
11505        ///
11506        /// This is a **required** field for requests.
11507        pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
11508        where
11509            T: std::convert::Into<crate::model::DataTaxonomy>,
11510        {
11511            self.0.request.data_taxonomy = v.map(|x| x.into());
11512            self
11513        }
11514
11515        /// Sets the value of [validate_only][crate::model::CreateDataTaxonomyRequest::validate_only].
11516        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
11517            self.0.request.validate_only = v.into();
11518            self
11519        }
11520    }
11521
11522    #[doc(hidden)]
11523    impl crate::RequestBuilder for CreateDataTaxonomy {
11524        fn request_options(&mut self) -> &mut crate::RequestOptions {
11525            &mut self.0.options
11526        }
11527    }
11528
11529    /// The request builder for [DataTaxonomyService::update_data_taxonomy][crate::client::DataTaxonomyService::update_data_taxonomy] calls.
11530    ///
11531    /// # Example
11532    /// ```
11533    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::UpdateDataTaxonomy;
11534    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11535    /// use google_cloud_lro::Poller;
11536    ///
11537    /// let builder = prepare_request_builder();
11538    /// let response = builder.poller().until_done().await?;
11539    /// # Ok(()) }
11540    ///
11541    /// fn prepare_request_builder() -> UpdateDataTaxonomy {
11542    ///   # panic!();
11543    ///   // ... details omitted ...
11544    /// }
11545    /// ```
11546    #[derive(Clone, Debug)]
11547    pub struct UpdateDataTaxonomy(RequestBuilder<crate::model::UpdateDataTaxonomyRequest>);
11548
11549    impl UpdateDataTaxonomy {
11550        pub(crate) fn new(
11551            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11552        ) -> Self {
11553            Self(RequestBuilder::new(stub))
11554        }
11555
11556        /// Sets the full request, replacing any prior values.
11557        pub fn with_request<V: Into<crate::model::UpdateDataTaxonomyRequest>>(
11558            mut self,
11559            v: V,
11560        ) -> Self {
11561            self.0.request = v.into();
11562            self
11563        }
11564
11565        /// Sets all the options, replacing any prior values.
11566        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11567            self.0.options = v.into();
11568            self
11569        }
11570
11571        /// Sends the request.
11572        ///
11573        /// # Long running operations
11574        ///
11575        /// This starts, but does not poll, a longrunning operation. More information
11576        /// on [update_data_taxonomy][crate::client::DataTaxonomyService::update_data_taxonomy].
11577        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11578            (*self.0.stub)
11579                .update_data_taxonomy(self.0.request, self.0.options)
11580                .await
11581                .map(crate::Response::into_body)
11582        }
11583
11584        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_taxonomy`.
11585        pub fn poller(
11586            self,
11587        ) -> impl google_cloud_lro::Poller<crate::model::DataTaxonomy, crate::model::OperationMetadata>
11588        {
11589            type Operation = google_cloud_lro::internal::Operation<
11590                crate::model::DataTaxonomy,
11591                crate::model::OperationMetadata,
11592            >;
11593            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11594            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11595
11596            let stub = self.0.stub.clone();
11597            let mut options = self.0.options.clone();
11598            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
11599            let query = move |name| {
11600                let stub = stub.clone();
11601                let options = options.clone();
11602                async {
11603                    let op = GetOperation::new(stub)
11604                        .set_name(name)
11605                        .with_options(options)
11606                        .send()
11607                        .await?;
11608                    Ok(Operation::new(op))
11609                }
11610            };
11611
11612            let start = move || async {
11613                let op = self.send().await?;
11614                Ok(Operation::new(op))
11615            };
11616
11617            google_cloud_lro::internal::new_poller(
11618                polling_error_policy,
11619                polling_backoff_policy,
11620                start,
11621                query,
11622            )
11623        }
11624
11625        /// Sets the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
11626        ///
11627        /// This is a **required** field for requests.
11628        pub fn set_update_mask<T>(mut self, v: T) -> Self
11629        where
11630            T: std::convert::Into<wkt::FieldMask>,
11631        {
11632            self.0.request.update_mask = std::option::Option::Some(v.into());
11633            self
11634        }
11635
11636        /// Sets or clears the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
11637        ///
11638        /// This is a **required** field for requests.
11639        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
11640        where
11641            T: std::convert::Into<wkt::FieldMask>,
11642        {
11643            self.0.request.update_mask = v.map(|x| x.into());
11644            self
11645        }
11646
11647        /// Sets the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
11648        ///
11649        /// This is a **required** field for requests.
11650        pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
11651        where
11652            T: std::convert::Into<crate::model::DataTaxonomy>,
11653        {
11654            self.0.request.data_taxonomy = std::option::Option::Some(v.into());
11655            self
11656        }
11657
11658        /// Sets or clears the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
11659        ///
11660        /// This is a **required** field for requests.
11661        pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
11662        where
11663            T: std::convert::Into<crate::model::DataTaxonomy>,
11664        {
11665            self.0.request.data_taxonomy = v.map(|x| x.into());
11666            self
11667        }
11668
11669        /// Sets the value of [validate_only][crate::model::UpdateDataTaxonomyRequest::validate_only].
11670        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
11671            self.0.request.validate_only = v.into();
11672            self
11673        }
11674    }
11675
11676    #[doc(hidden)]
11677    impl crate::RequestBuilder for UpdateDataTaxonomy {
11678        fn request_options(&mut self) -> &mut crate::RequestOptions {
11679            &mut self.0.options
11680        }
11681    }
11682
11683    /// The request builder for [DataTaxonomyService::delete_data_taxonomy][crate::client::DataTaxonomyService::delete_data_taxonomy] calls.
11684    ///
11685    /// # Example
11686    /// ```
11687    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteDataTaxonomy;
11688    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11689    /// use google_cloud_lro::Poller;
11690    ///
11691    /// let builder = prepare_request_builder();
11692    /// let response = builder.poller().until_done().await?;
11693    /// # Ok(()) }
11694    ///
11695    /// fn prepare_request_builder() -> DeleteDataTaxonomy {
11696    ///   # panic!();
11697    ///   // ... details omitted ...
11698    /// }
11699    /// ```
11700    #[derive(Clone, Debug)]
11701    pub struct DeleteDataTaxonomy(RequestBuilder<crate::model::DeleteDataTaxonomyRequest>);
11702
11703    impl DeleteDataTaxonomy {
11704        pub(crate) fn new(
11705            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11706        ) -> Self {
11707            Self(RequestBuilder::new(stub))
11708        }
11709
11710        /// Sets the full request, replacing any prior values.
11711        pub fn with_request<V: Into<crate::model::DeleteDataTaxonomyRequest>>(
11712            mut self,
11713            v: V,
11714        ) -> Self {
11715            self.0.request = v.into();
11716            self
11717        }
11718
11719        /// Sets all the options, replacing any prior values.
11720        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11721            self.0.options = v.into();
11722            self
11723        }
11724
11725        /// Sends the request.
11726        ///
11727        /// # Long running operations
11728        ///
11729        /// This starts, but does not poll, a longrunning operation. More information
11730        /// on [delete_data_taxonomy][crate::client::DataTaxonomyService::delete_data_taxonomy].
11731        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11732            (*self.0.stub)
11733                .delete_data_taxonomy(self.0.request, self.0.options)
11734                .await
11735                .map(crate::Response::into_body)
11736        }
11737
11738        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_taxonomy`.
11739        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
11740            type Operation =
11741                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
11742            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11743            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11744
11745            let stub = self.0.stub.clone();
11746            let mut options = self.0.options.clone();
11747            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
11748            let query = move |name| {
11749                let stub = stub.clone();
11750                let options = options.clone();
11751                async {
11752                    let op = GetOperation::new(stub)
11753                        .set_name(name)
11754                        .with_options(options)
11755                        .send()
11756                        .await?;
11757                    Ok(Operation::new(op))
11758                }
11759            };
11760
11761            let start = move || async {
11762                let op = self.send().await?;
11763                Ok(Operation::new(op))
11764            };
11765
11766            google_cloud_lro::internal::new_unit_response_poller(
11767                polling_error_policy,
11768                polling_backoff_policy,
11769                start,
11770                query,
11771            )
11772        }
11773
11774        /// Sets the value of [name][crate::model::DeleteDataTaxonomyRequest::name].
11775        ///
11776        /// This is a **required** field for requests.
11777        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11778            self.0.request.name = v.into();
11779            self
11780        }
11781
11782        /// Sets the value of [etag][crate::model::DeleteDataTaxonomyRequest::etag].
11783        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
11784            self.0.request.etag = v.into();
11785            self
11786        }
11787    }
11788
11789    #[doc(hidden)]
11790    impl crate::RequestBuilder for DeleteDataTaxonomy {
11791        fn request_options(&mut self) -> &mut crate::RequestOptions {
11792            &mut self.0.options
11793        }
11794    }
11795
11796    /// The request builder for [DataTaxonomyService::list_data_taxonomies][crate::client::DataTaxonomyService::list_data_taxonomies] calls.
11797    ///
11798    /// # Example
11799    /// ```
11800    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListDataTaxonomies;
11801    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11802    /// use google_cloud_gax::paginator::ItemPaginator;
11803    ///
11804    /// let builder = prepare_request_builder();
11805    /// let mut items = builder.by_item();
11806    /// while let Some(result) = items.next().await {
11807    ///   let item = result?;
11808    /// }
11809    /// # Ok(()) }
11810    ///
11811    /// fn prepare_request_builder() -> ListDataTaxonomies {
11812    ///   # panic!();
11813    ///   // ... details omitted ...
11814    /// }
11815    /// ```
11816    #[derive(Clone, Debug)]
11817    pub struct ListDataTaxonomies(RequestBuilder<crate::model::ListDataTaxonomiesRequest>);
11818
11819    impl ListDataTaxonomies {
11820        pub(crate) fn new(
11821            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11822        ) -> Self {
11823            Self(RequestBuilder::new(stub))
11824        }
11825
11826        /// Sets the full request, replacing any prior values.
11827        pub fn with_request<V: Into<crate::model::ListDataTaxonomiesRequest>>(
11828            mut self,
11829            v: V,
11830        ) -> Self {
11831            self.0.request = v.into();
11832            self
11833        }
11834
11835        /// Sets all the options, replacing any prior values.
11836        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11837            self.0.options = v.into();
11838            self
11839        }
11840
11841        /// Sends the request.
11842        pub async fn send(self) -> Result<crate::model::ListDataTaxonomiesResponse> {
11843            (*self.0.stub)
11844                .list_data_taxonomies(self.0.request, self.0.options)
11845                .await
11846                .map(crate::Response::into_body)
11847        }
11848
11849        /// Streams each page in the collection.
11850        pub fn by_page(
11851            self,
11852        ) -> impl google_cloud_gax::paginator::Paginator<
11853            crate::model::ListDataTaxonomiesResponse,
11854            crate::Error,
11855        > {
11856            use std::clone::Clone;
11857            let token = self.0.request.page_token.clone();
11858            let execute = move |token: String| {
11859                let mut builder = self.clone();
11860                builder.0.request = builder.0.request.set_page_token(token);
11861                builder.send()
11862            };
11863            google_cloud_gax::paginator::internal::new_paginator(token, execute)
11864        }
11865
11866        /// Streams each item in the collection.
11867        pub fn by_item(
11868            self,
11869        ) -> impl google_cloud_gax::paginator::ItemPaginator<
11870            crate::model::ListDataTaxonomiesResponse,
11871            crate::Error,
11872        > {
11873            use google_cloud_gax::paginator::Paginator;
11874            self.by_page().items()
11875        }
11876
11877        /// Sets the value of [parent][crate::model::ListDataTaxonomiesRequest::parent].
11878        ///
11879        /// This is a **required** field for requests.
11880        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
11881            self.0.request.parent = v.into();
11882            self
11883        }
11884
11885        /// Sets the value of [page_size][crate::model::ListDataTaxonomiesRequest::page_size].
11886        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
11887            self.0.request.page_size = v.into();
11888            self
11889        }
11890
11891        /// Sets the value of [page_token][crate::model::ListDataTaxonomiesRequest::page_token].
11892        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
11893            self.0.request.page_token = v.into();
11894            self
11895        }
11896
11897        /// Sets the value of [filter][crate::model::ListDataTaxonomiesRequest::filter].
11898        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
11899            self.0.request.filter = v.into();
11900            self
11901        }
11902
11903        /// Sets the value of [order_by][crate::model::ListDataTaxonomiesRequest::order_by].
11904        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
11905            self.0.request.order_by = v.into();
11906            self
11907        }
11908    }
11909
11910    #[doc(hidden)]
11911    impl crate::RequestBuilder for ListDataTaxonomies {
11912        fn request_options(&mut self) -> &mut crate::RequestOptions {
11913            &mut self.0.options
11914        }
11915    }
11916
11917    /// The request builder for [DataTaxonomyService::get_data_taxonomy][crate::client::DataTaxonomyService::get_data_taxonomy] calls.
11918    ///
11919    /// # Example
11920    /// ```
11921    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetDataTaxonomy;
11922    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11923    ///
11924    /// let builder = prepare_request_builder();
11925    /// let response = builder.send().await?;
11926    /// # Ok(()) }
11927    ///
11928    /// fn prepare_request_builder() -> GetDataTaxonomy {
11929    ///   # panic!();
11930    ///   // ... details omitted ...
11931    /// }
11932    /// ```
11933    #[derive(Clone, Debug)]
11934    pub struct GetDataTaxonomy(RequestBuilder<crate::model::GetDataTaxonomyRequest>);
11935
11936    impl GetDataTaxonomy {
11937        pub(crate) fn new(
11938            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11939        ) -> Self {
11940            Self(RequestBuilder::new(stub))
11941        }
11942
11943        /// Sets the full request, replacing any prior values.
11944        pub fn with_request<V: Into<crate::model::GetDataTaxonomyRequest>>(mut self, v: V) -> Self {
11945            self.0.request = v.into();
11946            self
11947        }
11948
11949        /// Sets all the options, replacing any prior values.
11950        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11951            self.0.options = v.into();
11952            self
11953        }
11954
11955        /// Sends the request.
11956        pub async fn send(self) -> Result<crate::model::DataTaxonomy> {
11957            (*self.0.stub)
11958                .get_data_taxonomy(self.0.request, self.0.options)
11959                .await
11960                .map(crate::Response::into_body)
11961        }
11962
11963        /// Sets the value of [name][crate::model::GetDataTaxonomyRequest::name].
11964        ///
11965        /// This is a **required** field for requests.
11966        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11967            self.0.request.name = v.into();
11968            self
11969        }
11970    }
11971
11972    #[doc(hidden)]
11973    impl crate::RequestBuilder for GetDataTaxonomy {
11974        fn request_options(&mut self) -> &mut crate::RequestOptions {
11975            &mut self.0.options
11976        }
11977    }
11978
11979    /// The request builder for [DataTaxonomyService::create_data_attribute_binding][crate::client::DataTaxonomyService::create_data_attribute_binding] calls.
11980    ///
11981    /// # Example
11982    /// ```
11983    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CreateDataAttributeBinding;
11984    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11985    /// use google_cloud_lro::Poller;
11986    ///
11987    /// let builder = prepare_request_builder();
11988    /// let response = builder.poller().until_done().await?;
11989    /// # Ok(()) }
11990    ///
11991    /// fn prepare_request_builder() -> CreateDataAttributeBinding {
11992    ///   # panic!();
11993    ///   // ... details omitted ...
11994    /// }
11995    /// ```
11996    #[derive(Clone, Debug)]
11997    pub struct CreateDataAttributeBinding(
11998        RequestBuilder<crate::model::CreateDataAttributeBindingRequest>,
11999    );
12000
12001    impl CreateDataAttributeBinding {
12002        pub(crate) fn new(
12003            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12004        ) -> Self {
12005            Self(RequestBuilder::new(stub))
12006        }
12007
12008        /// Sets the full request, replacing any prior values.
12009        pub fn with_request<V: Into<crate::model::CreateDataAttributeBindingRequest>>(
12010            mut self,
12011            v: V,
12012        ) -> Self {
12013            self.0.request = v.into();
12014            self
12015        }
12016
12017        /// Sets all the options, replacing any prior values.
12018        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12019            self.0.options = v.into();
12020            self
12021        }
12022
12023        /// Sends the request.
12024        ///
12025        /// # Long running operations
12026        ///
12027        /// This starts, but does not poll, a longrunning operation. More information
12028        /// on [create_data_attribute_binding][crate::client::DataTaxonomyService::create_data_attribute_binding].
12029        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12030            (*self.0.stub)
12031                .create_data_attribute_binding(self.0.request, self.0.options)
12032                .await
12033                .map(crate::Response::into_body)
12034        }
12035
12036        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_attribute_binding`.
12037        pub fn poller(
12038            self,
12039        ) -> impl google_cloud_lro::Poller<
12040            crate::model::DataAttributeBinding,
12041            crate::model::OperationMetadata,
12042        > {
12043            type Operation = google_cloud_lro::internal::Operation<
12044                crate::model::DataAttributeBinding,
12045                crate::model::OperationMetadata,
12046            >;
12047            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12048            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12049
12050            let stub = self.0.stub.clone();
12051            let mut options = self.0.options.clone();
12052            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12053            let query = move |name| {
12054                let stub = stub.clone();
12055                let options = options.clone();
12056                async {
12057                    let op = GetOperation::new(stub)
12058                        .set_name(name)
12059                        .with_options(options)
12060                        .send()
12061                        .await?;
12062                    Ok(Operation::new(op))
12063                }
12064            };
12065
12066            let start = move || async {
12067                let op = self.send().await?;
12068                Ok(Operation::new(op))
12069            };
12070
12071            google_cloud_lro::internal::new_poller(
12072                polling_error_policy,
12073                polling_backoff_policy,
12074                start,
12075                query,
12076            )
12077        }
12078
12079        /// Sets the value of [parent][crate::model::CreateDataAttributeBindingRequest::parent].
12080        ///
12081        /// This is a **required** field for requests.
12082        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12083            self.0.request.parent = v.into();
12084            self
12085        }
12086
12087        /// Sets the value of [data_attribute_binding_id][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding_id].
12088        ///
12089        /// This is a **required** field for requests.
12090        pub fn set_data_attribute_binding_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
12091            self.0.request.data_attribute_binding_id = v.into();
12092            self
12093        }
12094
12095        /// Sets the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
12096        ///
12097        /// This is a **required** field for requests.
12098        pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
12099        where
12100            T: std::convert::Into<crate::model::DataAttributeBinding>,
12101        {
12102            self.0.request.data_attribute_binding = std::option::Option::Some(v.into());
12103            self
12104        }
12105
12106        /// Sets or clears the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
12107        ///
12108        /// This is a **required** field for requests.
12109        pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
12110        where
12111            T: std::convert::Into<crate::model::DataAttributeBinding>,
12112        {
12113            self.0.request.data_attribute_binding = v.map(|x| x.into());
12114            self
12115        }
12116
12117        /// Sets the value of [validate_only][crate::model::CreateDataAttributeBindingRequest::validate_only].
12118        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12119            self.0.request.validate_only = v.into();
12120            self
12121        }
12122    }
12123
12124    #[doc(hidden)]
12125    impl crate::RequestBuilder for CreateDataAttributeBinding {
12126        fn request_options(&mut self) -> &mut crate::RequestOptions {
12127            &mut self.0.options
12128        }
12129    }
12130
12131    /// The request builder for [DataTaxonomyService::update_data_attribute_binding][crate::client::DataTaxonomyService::update_data_attribute_binding] calls.
12132    ///
12133    /// # Example
12134    /// ```
12135    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::UpdateDataAttributeBinding;
12136    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12137    /// use google_cloud_lro::Poller;
12138    ///
12139    /// let builder = prepare_request_builder();
12140    /// let response = builder.poller().until_done().await?;
12141    /// # Ok(()) }
12142    ///
12143    /// fn prepare_request_builder() -> UpdateDataAttributeBinding {
12144    ///   # panic!();
12145    ///   // ... details omitted ...
12146    /// }
12147    /// ```
12148    #[derive(Clone, Debug)]
12149    pub struct UpdateDataAttributeBinding(
12150        RequestBuilder<crate::model::UpdateDataAttributeBindingRequest>,
12151    );
12152
12153    impl UpdateDataAttributeBinding {
12154        pub(crate) fn new(
12155            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12156        ) -> Self {
12157            Self(RequestBuilder::new(stub))
12158        }
12159
12160        /// Sets the full request, replacing any prior values.
12161        pub fn with_request<V: Into<crate::model::UpdateDataAttributeBindingRequest>>(
12162            mut self,
12163            v: V,
12164        ) -> Self {
12165            self.0.request = v.into();
12166            self
12167        }
12168
12169        /// Sets all the options, replacing any prior values.
12170        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12171            self.0.options = v.into();
12172            self
12173        }
12174
12175        /// Sends the request.
12176        ///
12177        /// # Long running operations
12178        ///
12179        /// This starts, but does not poll, a longrunning operation. More information
12180        /// on [update_data_attribute_binding][crate::client::DataTaxonomyService::update_data_attribute_binding].
12181        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12182            (*self.0.stub)
12183                .update_data_attribute_binding(self.0.request, self.0.options)
12184                .await
12185                .map(crate::Response::into_body)
12186        }
12187
12188        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_attribute_binding`.
12189        pub fn poller(
12190            self,
12191        ) -> impl google_cloud_lro::Poller<
12192            crate::model::DataAttributeBinding,
12193            crate::model::OperationMetadata,
12194        > {
12195            type Operation = google_cloud_lro::internal::Operation<
12196                crate::model::DataAttributeBinding,
12197                crate::model::OperationMetadata,
12198            >;
12199            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12200            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12201
12202            let stub = self.0.stub.clone();
12203            let mut options = self.0.options.clone();
12204            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12205            let query = move |name| {
12206                let stub = stub.clone();
12207                let options = options.clone();
12208                async {
12209                    let op = GetOperation::new(stub)
12210                        .set_name(name)
12211                        .with_options(options)
12212                        .send()
12213                        .await?;
12214                    Ok(Operation::new(op))
12215                }
12216            };
12217
12218            let start = move || async {
12219                let op = self.send().await?;
12220                Ok(Operation::new(op))
12221            };
12222
12223            google_cloud_lro::internal::new_poller(
12224                polling_error_policy,
12225                polling_backoff_policy,
12226                start,
12227                query,
12228            )
12229        }
12230
12231        /// Sets the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
12232        ///
12233        /// This is a **required** field for requests.
12234        pub fn set_update_mask<T>(mut self, v: T) -> Self
12235        where
12236            T: std::convert::Into<wkt::FieldMask>,
12237        {
12238            self.0.request.update_mask = std::option::Option::Some(v.into());
12239            self
12240        }
12241
12242        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
12243        ///
12244        /// This is a **required** field for requests.
12245        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
12246        where
12247            T: std::convert::Into<wkt::FieldMask>,
12248        {
12249            self.0.request.update_mask = v.map(|x| x.into());
12250            self
12251        }
12252
12253        /// Sets the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
12254        ///
12255        /// This is a **required** field for requests.
12256        pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
12257        where
12258            T: std::convert::Into<crate::model::DataAttributeBinding>,
12259        {
12260            self.0.request.data_attribute_binding = std::option::Option::Some(v.into());
12261            self
12262        }
12263
12264        /// Sets or clears the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
12265        ///
12266        /// This is a **required** field for requests.
12267        pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
12268        where
12269            T: std::convert::Into<crate::model::DataAttributeBinding>,
12270        {
12271            self.0.request.data_attribute_binding = v.map(|x| x.into());
12272            self
12273        }
12274
12275        /// Sets the value of [validate_only][crate::model::UpdateDataAttributeBindingRequest::validate_only].
12276        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12277            self.0.request.validate_only = v.into();
12278            self
12279        }
12280    }
12281
12282    #[doc(hidden)]
12283    impl crate::RequestBuilder for UpdateDataAttributeBinding {
12284        fn request_options(&mut self) -> &mut crate::RequestOptions {
12285            &mut self.0.options
12286        }
12287    }
12288
12289    /// The request builder for [DataTaxonomyService::delete_data_attribute_binding][crate::client::DataTaxonomyService::delete_data_attribute_binding] calls.
12290    ///
12291    /// # Example
12292    /// ```
12293    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteDataAttributeBinding;
12294    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12295    /// use google_cloud_lro::Poller;
12296    ///
12297    /// let builder = prepare_request_builder();
12298    /// let response = builder.poller().until_done().await?;
12299    /// # Ok(()) }
12300    ///
12301    /// fn prepare_request_builder() -> DeleteDataAttributeBinding {
12302    ///   # panic!();
12303    ///   // ... details omitted ...
12304    /// }
12305    /// ```
12306    #[derive(Clone, Debug)]
12307    pub struct DeleteDataAttributeBinding(
12308        RequestBuilder<crate::model::DeleteDataAttributeBindingRequest>,
12309    );
12310
12311    impl DeleteDataAttributeBinding {
12312        pub(crate) fn new(
12313            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12314        ) -> Self {
12315            Self(RequestBuilder::new(stub))
12316        }
12317
12318        /// Sets the full request, replacing any prior values.
12319        pub fn with_request<V: Into<crate::model::DeleteDataAttributeBindingRequest>>(
12320            mut self,
12321            v: V,
12322        ) -> Self {
12323            self.0.request = v.into();
12324            self
12325        }
12326
12327        /// Sets all the options, replacing any prior values.
12328        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12329            self.0.options = v.into();
12330            self
12331        }
12332
12333        /// Sends the request.
12334        ///
12335        /// # Long running operations
12336        ///
12337        /// This starts, but does not poll, a longrunning operation. More information
12338        /// on [delete_data_attribute_binding][crate::client::DataTaxonomyService::delete_data_attribute_binding].
12339        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12340            (*self.0.stub)
12341                .delete_data_attribute_binding(self.0.request, self.0.options)
12342                .await
12343                .map(crate::Response::into_body)
12344        }
12345
12346        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_attribute_binding`.
12347        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
12348            type Operation =
12349                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
12350            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12351            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12352
12353            let stub = self.0.stub.clone();
12354            let mut options = self.0.options.clone();
12355            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12356            let query = move |name| {
12357                let stub = stub.clone();
12358                let options = options.clone();
12359                async {
12360                    let op = GetOperation::new(stub)
12361                        .set_name(name)
12362                        .with_options(options)
12363                        .send()
12364                        .await?;
12365                    Ok(Operation::new(op))
12366                }
12367            };
12368
12369            let start = move || async {
12370                let op = self.send().await?;
12371                Ok(Operation::new(op))
12372            };
12373
12374            google_cloud_lro::internal::new_unit_response_poller(
12375                polling_error_policy,
12376                polling_backoff_policy,
12377                start,
12378                query,
12379            )
12380        }
12381
12382        /// Sets the value of [name][crate::model::DeleteDataAttributeBindingRequest::name].
12383        ///
12384        /// This is a **required** field for requests.
12385        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12386            self.0.request.name = v.into();
12387            self
12388        }
12389
12390        /// Sets the value of [etag][crate::model::DeleteDataAttributeBindingRequest::etag].
12391        ///
12392        /// This is a **required** field for requests.
12393        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
12394            self.0.request.etag = v.into();
12395            self
12396        }
12397    }
12398
12399    #[doc(hidden)]
12400    impl crate::RequestBuilder for DeleteDataAttributeBinding {
12401        fn request_options(&mut self) -> &mut crate::RequestOptions {
12402            &mut self.0.options
12403        }
12404    }
12405
12406    /// The request builder for [DataTaxonomyService::list_data_attribute_bindings][crate::client::DataTaxonomyService::list_data_attribute_bindings] calls.
12407    ///
12408    /// # Example
12409    /// ```
12410    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListDataAttributeBindings;
12411    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12412    /// use google_cloud_gax::paginator::ItemPaginator;
12413    ///
12414    /// let builder = prepare_request_builder();
12415    /// let mut items = builder.by_item();
12416    /// while let Some(result) = items.next().await {
12417    ///   let item = result?;
12418    /// }
12419    /// # Ok(()) }
12420    ///
12421    /// fn prepare_request_builder() -> ListDataAttributeBindings {
12422    ///   # panic!();
12423    ///   // ... details omitted ...
12424    /// }
12425    /// ```
12426    #[derive(Clone, Debug)]
12427    pub struct ListDataAttributeBindings(
12428        RequestBuilder<crate::model::ListDataAttributeBindingsRequest>,
12429    );
12430
12431    impl ListDataAttributeBindings {
12432        pub(crate) fn new(
12433            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12434        ) -> Self {
12435            Self(RequestBuilder::new(stub))
12436        }
12437
12438        /// Sets the full request, replacing any prior values.
12439        pub fn with_request<V: Into<crate::model::ListDataAttributeBindingsRequest>>(
12440            mut self,
12441            v: V,
12442        ) -> Self {
12443            self.0.request = v.into();
12444            self
12445        }
12446
12447        /// Sets all the options, replacing any prior values.
12448        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12449            self.0.options = v.into();
12450            self
12451        }
12452
12453        /// Sends the request.
12454        pub async fn send(self) -> Result<crate::model::ListDataAttributeBindingsResponse> {
12455            (*self.0.stub)
12456                .list_data_attribute_bindings(self.0.request, self.0.options)
12457                .await
12458                .map(crate::Response::into_body)
12459        }
12460
12461        /// Streams each page in the collection.
12462        pub fn by_page(
12463            self,
12464        ) -> impl google_cloud_gax::paginator::Paginator<
12465            crate::model::ListDataAttributeBindingsResponse,
12466            crate::Error,
12467        > {
12468            use std::clone::Clone;
12469            let token = self.0.request.page_token.clone();
12470            let execute = move |token: String| {
12471                let mut builder = self.clone();
12472                builder.0.request = builder.0.request.set_page_token(token);
12473                builder.send()
12474            };
12475            google_cloud_gax::paginator::internal::new_paginator(token, execute)
12476        }
12477
12478        /// Streams each item in the collection.
12479        pub fn by_item(
12480            self,
12481        ) -> impl google_cloud_gax::paginator::ItemPaginator<
12482            crate::model::ListDataAttributeBindingsResponse,
12483            crate::Error,
12484        > {
12485            use google_cloud_gax::paginator::Paginator;
12486            self.by_page().items()
12487        }
12488
12489        /// Sets the value of [parent][crate::model::ListDataAttributeBindingsRequest::parent].
12490        ///
12491        /// This is a **required** field for requests.
12492        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12493            self.0.request.parent = v.into();
12494            self
12495        }
12496
12497        /// Sets the value of [page_size][crate::model::ListDataAttributeBindingsRequest::page_size].
12498        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12499            self.0.request.page_size = v.into();
12500            self
12501        }
12502
12503        /// Sets the value of [page_token][crate::model::ListDataAttributeBindingsRequest::page_token].
12504        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12505            self.0.request.page_token = v.into();
12506            self
12507        }
12508
12509        /// Sets the value of [filter][crate::model::ListDataAttributeBindingsRequest::filter].
12510        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12511            self.0.request.filter = v.into();
12512            self
12513        }
12514
12515        /// Sets the value of [order_by][crate::model::ListDataAttributeBindingsRequest::order_by].
12516        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
12517            self.0.request.order_by = v.into();
12518            self
12519        }
12520    }
12521
12522    #[doc(hidden)]
12523    impl crate::RequestBuilder for ListDataAttributeBindings {
12524        fn request_options(&mut self) -> &mut crate::RequestOptions {
12525            &mut self.0.options
12526        }
12527    }
12528
12529    /// The request builder for [DataTaxonomyService::get_data_attribute_binding][crate::client::DataTaxonomyService::get_data_attribute_binding] calls.
12530    ///
12531    /// # Example
12532    /// ```
12533    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetDataAttributeBinding;
12534    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12535    ///
12536    /// let builder = prepare_request_builder();
12537    /// let response = builder.send().await?;
12538    /// # Ok(()) }
12539    ///
12540    /// fn prepare_request_builder() -> GetDataAttributeBinding {
12541    ///   # panic!();
12542    ///   // ... details omitted ...
12543    /// }
12544    /// ```
12545    #[derive(Clone, Debug)]
12546    pub struct GetDataAttributeBinding(
12547        RequestBuilder<crate::model::GetDataAttributeBindingRequest>,
12548    );
12549
12550    impl GetDataAttributeBinding {
12551        pub(crate) fn new(
12552            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12553        ) -> Self {
12554            Self(RequestBuilder::new(stub))
12555        }
12556
12557        /// Sets the full request, replacing any prior values.
12558        pub fn with_request<V: Into<crate::model::GetDataAttributeBindingRequest>>(
12559            mut self,
12560            v: V,
12561        ) -> Self {
12562            self.0.request = v.into();
12563            self
12564        }
12565
12566        /// Sets all the options, replacing any prior values.
12567        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12568            self.0.options = v.into();
12569            self
12570        }
12571
12572        /// Sends the request.
12573        pub async fn send(self) -> Result<crate::model::DataAttributeBinding> {
12574            (*self.0.stub)
12575                .get_data_attribute_binding(self.0.request, self.0.options)
12576                .await
12577                .map(crate::Response::into_body)
12578        }
12579
12580        /// Sets the value of [name][crate::model::GetDataAttributeBindingRequest::name].
12581        ///
12582        /// This is a **required** field for requests.
12583        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12584            self.0.request.name = v.into();
12585            self
12586        }
12587    }
12588
12589    #[doc(hidden)]
12590    impl crate::RequestBuilder for GetDataAttributeBinding {
12591        fn request_options(&mut self) -> &mut crate::RequestOptions {
12592            &mut self.0.options
12593        }
12594    }
12595
12596    /// The request builder for [DataTaxonomyService::create_data_attribute][crate::client::DataTaxonomyService::create_data_attribute] calls.
12597    ///
12598    /// # Example
12599    /// ```
12600    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CreateDataAttribute;
12601    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12602    /// use google_cloud_lro::Poller;
12603    ///
12604    /// let builder = prepare_request_builder();
12605    /// let response = builder.poller().until_done().await?;
12606    /// # Ok(()) }
12607    ///
12608    /// fn prepare_request_builder() -> CreateDataAttribute {
12609    ///   # panic!();
12610    ///   // ... details omitted ...
12611    /// }
12612    /// ```
12613    #[derive(Clone, Debug)]
12614    pub struct CreateDataAttribute(RequestBuilder<crate::model::CreateDataAttributeRequest>);
12615
12616    impl CreateDataAttribute {
12617        pub(crate) fn new(
12618            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12619        ) -> Self {
12620            Self(RequestBuilder::new(stub))
12621        }
12622
12623        /// Sets the full request, replacing any prior values.
12624        pub fn with_request<V: Into<crate::model::CreateDataAttributeRequest>>(
12625            mut self,
12626            v: V,
12627        ) -> Self {
12628            self.0.request = v.into();
12629            self
12630        }
12631
12632        /// Sets all the options, replacing any prior values.
12633        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12634            self.0.options = v.into();
12635            self
12636        }
12637
12638        /// Sends the request.
12639        ///
12640        /// # Long running operations
12641        ///
12642        /// This starts, but does not poll, a longrunning operation. More information
12643        /// on [create_data_attribute][crate::client::DataTaxonomyService::create_data_attribute].
12644        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12645            (*self.0.stub)
12646                .create_data_attribute(self.0.request, self.0.options)
12647                .await
12648                .map(crate::Response::into_body)
12649        }
12650
12651        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_attribute`.
12652        pub fn poller(
12653            self,
12654        ) -> impl google_cloud_lro::Poller<crate::model::DataAttribute, crate::model::OperationMetadata>
12655        {
12656            type Operation = google_cloud_lro::internal::Operation<
12657                crate::model::DataAttribute,
12658                crate::model::OperationMetadata,
12659            >;
12660            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12661            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12662
12663            let stub = self.0.stub.clone();
12664            let mut options = self.0.options.clone();
12665            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12666            let query = move |name| {
12667                let stub = stub.clone();
12668                let options = options.clone();
12669                async {
12670                    let op = GetOperation::new(stub)
12671                        .set_name(name)
12672                        .with_options(options)
12673                        .send()
12674                        .await?;
12675                    Ok(Operation::new(op))
12676                }
12677            };
12678
12679            let start = move || async {
12680                let op = self.send().await?;
12681                Ok(Operation::new(op))
12682            };
12683
12684            google_cloud_lro::internal::new_poller(
12685                polling_error_policy,
12686                polling_backoff_policy,
12687                start,
12688                query,
12689            )
12690        }
12691
12692        /// Sets the value of [parent][crate::model::CreateDataAttributeRequest::parent].
12693        ///
12694        /// This is a **required** field for requests.
12695        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12696            self.0.request.parent = v.into();
12697            self
12698        }
12699
12700        /// Sets the value of [data_attribute_id][crate::model::CreateDataAttributeRequest::data_attribute_id].
12701        ///
12702        /// This is a **required** field for requests.
12703        pub fn set_data_attribute_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
12704            self.0.request.data_attribute_id = v.into();
12705            self
12706        }
12707
12708        /// Sets the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
12709        ///
12710        /// This is a **required** field for requests.
12711        pub fn set_data_attribute<T>(mut self, v: T) -> Self
12712        where
12713            T: std::convert::Into<crate::model::DataAttribute>,
12714        {
12715            self.0.request.data_attribute = std::option::Option::Some(v.into());
12716            self
12717        }
12718
12719        /// Sets or clears the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
12720        ///
12721        /// This is a **required** field for requests.
12722        pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
12723        where
12724            T: std::convert::Into<crate::model::DataAttribute>,
12725        {
12726            self.0.request.data_attribute = v.map(|x| x.into());
12727            self
12728        }
12729
12730        /// Sets the value of [validate_only][crate::model::CreateDataAttributeRequest::validate_only].
12731        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12732            self.0.request.validate_only = v.into();
12733            self
12734        }
12735    }
12736
12737    #[doc(hidden)]
12738    impl crate::RequestBuilder for CreateDataAttribute {
12739        fn request_options(&mut self) -> &mut crate::RequestOptions {
12740            &mut self.0.options
12741        }
12742    }
12743
12744    /// The request builder for [DataTaxonomyService::update_data_attribute][crate::client::DataTaxonomyService::update_data_attribute] calls.
12745    ///
12746    /// # Example
12747    /// ```
12748    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::UpdateDataAttribute;
12749    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12750    /// use google_cloud_lro::Poller;
12751    ///
12752    /// let builder = prepare_request_builder();
12753    /// let response = builder.poller().until_done().await?;
12754    /// # Ok(()) }
12755    ///
12756    /// fn prepare_request_builder() -> UpdateDataAttribute {
12757    ///   # panic!();
12758    ///   // ... details omitted ...
12759    /// }
12760    /// ```
12761    #[derive(Clone, Debug)]
12762    pub struct UpdateDataAttribute(RequestBuilder<crate::model::UpdateDataAttributeRequest>);
12763
12764    impl UpdateDataAttribute {
12765        pub(crate) fn new(
12766            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12767        ) -> Self {
12768            Self(RequestBuilder::new(stub))
12769        }
12770
12771        /// Sets the full request, replacing any prior values.
12772        pub fn with_request<V: Into<crate::model::UpdateDataAttributeRequest>>(
12773            mut self,
12774            v: V,
12775        ) -> Self {
12776            self.0.request = v.into();
12777            self
12778        }
12779
12780        /// Sets all the options, replacing any prior values.
12781        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12782            self.0.options = v.into();
12783            self
12784        }
12785
12786        /// Sends the request.
12787        ///
12788        /// # Long running operations
12789        ///
12790        /// This starts, but does not poll, a longrunning operation. More information
12791        /// on [update_data_attribute][crate::client::DataTaxonomyService::update_data_attribute].
12792        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12793            (*self.0.stub)
12794                .update_data_attribute(self.0.request, self.0.options)
12795                .await
12796                .map(crate::Response::into_body)
12797        }
12798
12799        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_attribute`.
12800        pub fn poller(
12801            self,
12802        ) -> impl google_cloud_lro::Poller<crate::model::DataAttribute, crate::model::OperationMetadata>
12803        {
12804            type Operation = google_cloud_lro::internal::Operation<
12805                crate::model::DataAttribute,
12806                crate::model::OperationMetadata,
12807            >;
12808            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12809            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12810
12811            let stub = self.0.stub.clone();
12812            let mut options = self.0.options.clone();
12813            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12814            let query = move |name| {
12815                let stub = stub.clone();
12816                let options = options.clone();
12817                async {
12818                    let op = GetOperation::new(stub)
12819                        .set_name(name)
12820                        .with_options(options)
12821                        .send()
12822                        .await?;
12823                    Ok(Operation::new(op))
12824                }
12825            };
12826
12827            let start = move || async {
12828                let op = self.send().await?;
12829                Ok(Operation::new(op))
12830            };
12831
12832            google_cloud_lro::internal::new_poller(
12833                polling_error_policy,
12834                polling_backoff_policy,
12835                start,
12836                query,
12837            )
12838        }
12839
12840        /// Sets the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
12841        ///
12842        /// This is a **required** field for requests.
12843        pub fn set_update_mask<T>(mut self, v: T) -> Self
12844        where
12845            T: std::convert::Into<wkt::FieldMask>,
12846        {
12847            self.0.request.update_mask = std::option::Option::Some(v.into());
12848            self
12849        }
12850
12851        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
12852        ///
12853        /// This is a **required** field for requests.
12854        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
12855        where
12856            T: std::convert::Into<wkt::FieldMask>,
12857        {
12858            self.0.request.update_mask = v.map(|x| x.into());
12859            self
12860        }
12861
12862        /// Sets the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
12863        ///
12864        /// This is a **required** field for requests.
12865        pub fn set_data_attribute<T>(mut self, v: T) -> Self
12866        where
12867            T: std::convert::Into<crate::model::DataAttribute>,
12868        {
12869            self.0.request.data_attribute = std::option::Option::Some(v.into());
12870            self
12871        }
12872
12873        /// Sets or clears the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
12874        ///
12875        /// This is a **required** field for requests.
12876        pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
12877        where
12878            T: std::convert::Into<crate::model::DataAttribute>,
12879        {
12880            self.0.request.data_attribute = v.map(|x| x.into());
12881            self
12882        }
12883
12884        /// Sets the value of [validate_only][crate::model::UpdateDataAttributeRequest::validate_only].
12885        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12886            self.0.request.validate_only = v.into();
12887            self
12888        }
12889    }
12890
12891    #[doc(hidden)]
12892    impl crate::RequestBuilder for UpdateDataAttribute {
12893        fn request_options(&mut self) -> &mut crate::RequestOptions {
12894            &mut self.0.options
12895        }
12896    }
12897
12898    /// The request builder for [DataTaxonomyService::delete_data_attribute][crate::client::DataTaxonomyService::delete_data_attribute] calls.
12899    ///
12900    /// # Example
12901    /// ```
12902    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteDataAttribute;
12903    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12904    /// use google_cloud_lro::Poller;
12905    ///
12906    /// let builder = prepare_request_builder();
12907    /// let response = builder.poller().until_done().await?;
12908    /// # Ok(()) }
12909    ///
12910    /// fn prepare_request_builder() -> DeleteDataAttribute {
12911    ///   # panic!();
12912    ///   // ... details omitted ...
12913    /// }
12914    /// ```
12915    #[derive(Clone, Debug)]
12916    pub struct DeleteDataAttribute(RequestBuilder<crate::model::DeleteDataAttributeRequest>);
12917
12918    impl DeleteDataAttribute {
12919        pub(crate) fn new(
12920            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12921        ) -> Self {
12922            Self(RequestBuilder::new(stub))
12923        }
12924
12925        /// Sets the full request, replacing any prior values.
12926        pub fn with_request<V: Into<crate::model::DeleteDataAttributeRequest>>(
12927            mut self,
12928            v: V,
12929        ) -> Self {
12930            self.0.request = v.into();
12931            self
12932        }
12933
12934        /// Sets all the options, replacing any prior values.
12935        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12936            self.0.options = v.into();
12937            self
12938        }
12939
12940        /// Sends the request.
12941        ///
12942        /// # Long running operations
12943        ///
12944        /// This starts, but does not poll, a longrunning operation. More information
12945        /// on [delete_data_attribute][crate::client::DataTaxonomyService::delete_data_attribute].
12946        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12947            (*self.0.stub)
12948                .delete_data_attribute(self.0.request, self.0.options)
12949                .await
12950                .map(crate::Response::into_body)
12951        }
12952
12953        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_attribute`.
12954        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
12955            type Operation =
12956                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
12957            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12958            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12959
12960            let stub = self.0.stub.clone();
12961            let mut options = self.0.options.clone();
12962            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12963            let query = move |name| {
12964                let stub = stub.clone();
12965                let options = options.clone();
12966                async {
12967                    let op = GetOperation::new(stub)
12968                        .set_name(name)
12969                        .with_options(options)
12970                        .send()
12971                        .await?;
12972                    Ok(Operation::new(op))
12973                }
12974            };
12975
12976            let start = move || async {
12977                let op = self.send().await?;
12978                Ok(Operation::new(op))
12979            };
12980
12981            google_cloud_lro::internal::new_unit_response_poller(
12982                polling_error_policy,
12983                polling_backoff_policy,
12984                start,
12985                query,
12986            )
12987        }
12988
12989        /// Sets the value of [name][crate::model::DeleteDataAttributeRequest::name].
12990        ///
12991        /// This is a **required** field for requests.
12992        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12993            self.0.request.name = v.into();
12994            self
12995        }
12996
12997        /// Sets the value of [etag][crate::model::DeleteDataAttributeRequest::etag].
12998        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
12999            self.0.request.etag = v.into();
13000            self
13001        }
13002    }
13003
13004    #[doc(hidden)]
13005    impl crate::RequestBuilder for DeleteDataAttribute {
13006        fn request_options(&mut self) -> &mut crate::RequestOptions {
13007            &mut self.0.options
13008        }
13009    }
13010
13011    /// The request builder for [DataTaxonomyService::list_data_attributes][crate::client::DataTaxonomyService::list_data_attributes] calls.
13012    ///
13013    /// # Example
13014    /// ```
13015    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListDataAttributes;
13016    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13017    /// use google_cloud_gax::paginator::ItemPaginator;
13018    ///
13019    /// let builder = prepare_request_builder();
13020    /// let mut items = builder.by_item();
13021    /// while let Some(result) = items.next().await {
13022    ///   let item = result?;
13023    /// }
13024    /// # Ok(()) }
13025    ///
13026    /// fn prepare_request_builder() -> ListDataAttributes {
13027    ///   # panic!();
13028    ///   // ... details omitted ...
13029    /// }
13030    /// ```
13031    #[derive(Clone, Debug)]
13032    pub struct ListDataAttributes(RequestBuilder<crate::model::ListDataAttributesRequest>);
13033
13034    impl ListDataAttributes {
13035        pub(crate) fn new(
13036            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13037        ) -> Self {
13038            Self(RequestBuilder::new(stub))
13039        }
13040
13041        /// Sets the full request, replacing any prior values.
13042        pub fn with_request<V: Into<crate::model::ListDataAttributesRequest>>(
13043            mut self,
13044            v: V,
13045        ) -> Self {
13046            self.0.request = v.into();
13047            self
13048        }
13049
13050        /// Sets all the options, replacing any prior values.
13051        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13052            self.0.options = v.into();
13053            self
13054        }
13055
13056        /// Sends the request.
13057        pub async fn send(self) -> Result<crate::model::ListDataAttributesResponse> {
13058            (*self.0.stub)
13059                .list_data_attributes(self.0.request, self.0.options)
13060                .await
13061                .map(crate::Response::into_body)
13062        }
13063
13064        /// Streams each page in the collection.
13065        pub fn by_page(
13066            self,
13067        ) -> impl google_cloud_gax::paginator::Paginator<
13068            crate::model::ListDataAttributesResponse,
13069            crate::Error,
13070        > {
13071            use std::clone::Clone;
13072            let token = self.0.request.page_token.clone();
13073            let execute = move |token: String| {
13074                let mut builder = self.clone();
13075                builder.0.request = builder.0.request.set_page_token(token);
13076                builder.send()
13077            };
13078            google_cloud_gax::paginator::internal::new_paginator(token, execute)
13079        }
13080
13081        /// Streams each item in the collection.
13082        pub fn by_item(
13083            self,
13084        ) -> impl google_cloud_gax::paginator::ItemPaginator<
13085            crate::model::ListDataAttributesResponse,
13086            crate::Error,
13087        > {
13088            use google_cloud_gax::paginator::Paginator;
13089            self.by_page().items()
13090        }
13091
13092        /// Sets the value of [parent][crate::model::ListDataAttributesRequest::parent].
13093        ///
13094        /// This is a **required** field for requests.
13095        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13096            self.0.request.parent = v.into();
13097            self
13098        }
13099
13100        /// Sets the value of [page_size][crate::model::ListDataAttributesRequest::page_size].
13101        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13102            self.0.request.page_size = v.into();
13103            self
13104        }
13105
13106        /// Sets the value of [page_token][crate::model::ListDataAttributesRequest::page_token].
13107        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13108            self.0.request.page_token = v.into();
13109            self
13110        }
13111
13112        /// Sets the value of [filter][crate::model::ListDataAttributesRequest::filter].
13113        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13114            self.0.request.filter = v.into();
13115            self
13116        }
13117
13118        /// Sets the value of [order_by][crate::model::ListDataAttributesRequest::order_by].
13119        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
13120            self.0.request.order_by = v.into();
13121            self
13122        }
13123    }
13124
13125    #[doc(hidden)]
13126    impl crate::RequestBuilder for ListDataAttributes {
13127        fn request_options(&mut self) -> &mut crate::RequestOptions {
13128            &mut self.0.options
13129        }
13130    }
13131
13132    /// The request builder for [DataTaxonomyService::get_data_attribute][crate::client::DataTaxonomyService::get_data_attribute] calls.
13133    ///
13134    /// # Example
13135    /// ```
13136    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetDataAttribute;
13137    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13138    ///
13139    /// let builder = prepare_request_builder();
13140    /// let response = builder.send().await?;
13141    /// # Ok(()) }
13142    ///
13143    /// fn prepare_request_builder() -> GetDataAttribute {
13144    ///   # panic!();
13145    ///   // ... details omitted ...
13146    /// }
13147    /// ```
13148    #[derive(Clone, Debug)]
13149    pub struct GetDataAttribute(RequestBuilder<crate::model::GetDataAttributeRequest>);
13150
13151    impl GetDataAttribute {
13152        pub(crate) fn new(
13153            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13154        ) -> Self {
13155            Self(RequestBuilder::new(stub))
13156        }
13157
13158        /// Sets the full request, replacing any prior values.
13159        pub fn with_request<V: Into<crate::model::GetDataAttributeRequest>>(
13160            mut self,
13161            v: V,
13162        ) -> Self {
13163            self.0.request = v.into();
13164            self
13165        }
13166
13167        /// Sets all the options, replacing any prior values.
13168        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13169            self.0.options = v.into();
13170            self
13171        }
13172
13173        /// Sends the request.
13174        pub async fn send(self) -> Result<crate::model::DataAttribute> {
13175            (*self.0.stub)
13176                .get_data_attribute(self.0.request, self.0.options)
13177                .await
13178                .map(crate::Response::into_body)
13179        }
13180
13181        /// Sets the value of [name][crate::model::GetDataAttributeRequest::name].
13182        ///
13183        /// This is a **required** field for requests.
13184        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13185            self.0.request.name = v.into();
13186            self
13187        }
13188    }
13189
13190    #[doc(hidden)]
13191    impl crate::RequestBuilder for GetDataAttribute {
13192        fn request_options(&mut self) -> &mut crate::RequestOptions {
13193            &mut self.0.options
13194        }
13195    }
13196
13197    /// The request builder for [DataTaxonomyService::list_locations][crate::client::DataTaxonomyService::list_locations] calls.
13198    ///
13199    /// # Example
13200    /// ```
13201    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListLocations;
13202    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13203    /// use google_cloud_gax::paginator::ItemPaginator;
13204    ///
13205    /// let builder = prepare_request_builder();
13206    /// let mut items = builder.by_item();
13207    /// while let Some(result) = items.next().await {
13208    ///   let item = result?;
13209    /// }
13210    /// # Ok(()) }
13211    ///
13212    /// fn prepare_request_builder() -> ListLocations {
13213    ///   # panic!();
13214    ///   // ... details omitted ...
13215    /// }
13216    /// ```
13217    #[derive(Clone, Debug)]
13218    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
13219
13220    impl ListLocations {
13221        pub(crate) fn new(
13222            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13223        ) -> Self {
13224            Self(RequestBuilder::new(stub))
13225        }
13226
13227        /// Sets the full request, replacing any prior values.
13228        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
13229            mut self,
13230            v: V,
13231        ) -> Self {
13232            self.0.request = v.into();
13233            self
13234        }
13235
13236        /// Sets all the options, replacing any prior values.
13237        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13238            self.0.options = v.into();
13239            self
13240        }
13241
13242        /// Sends the request.
13243        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
13244            (*self.0.stub)
13245                .list_locations(self.0.request, self.0.options)
13246                .await
13247                .map(crate::Response::into_body)
13248        }
13249
13250        /// Streams each page in the collection.
13251        pub fn by_page(
13252            self,
13253        ) -> impl google_cloud_gax::paginator::Paginator<
13254            google_cloud_location::model::ListLocationsResponse,
13255            crate::Error,
13256        > {
13257            use std::clone::Clone;
13258            let token = self.0.request.page_token.clone();
13259            let execute = move |token: String| {
13260                let mut builder = self.clone();
13261                builder.0.request = builder.0.request.set_page_token(token);
13262                builder.send()
13263            };
13264            google_cloud_gax::paginator::internal::new_paginator(token, execute)
13265        }
13266
13267        /// Streams each item in the collection.
13268        pub fn by_item(
13269            self,
13270        ) -> impl google_cloud_gax::paginator::ItemPaginator<
13271            google_cloud_location::model::ListLocationsResponse,
13272            crate::Error,
13273        > {
13274            use google_cloud_gax::paginator::Paginator;
13275            self.by_page().items()
13276        }
13277
13278        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
13279        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13280            self.0.request.name = v.into();
13281            self
13282        }
13283
13284        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
13285        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13286            self.0.request.filter = v.into();
13287            self
13288        }
13289
13290        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
13291        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13292            self.0.request.page_size = v.into();
13293            self
13294        }
13295
13296        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
13297        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13298            self.0.request.page_token = v.into();
13299            self
13300        }
13301    }
13302
13303    #[doc(hidden)]
13304    impl crate::RequestBuilder for ListLocations {
13305        fn request_options(&mut self) -> &mut crate::RequestOptions {
13306            &mut self.0.options
13307        }
13308    }
13309
13310    /// The request builder for [DataTaxonomyService::get_location][crate::client::DataTaxonomyService::get_location] calls.
13311    ///
13312    /// # Example
13313    /// ```
13314    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetLocation;
13315    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13316    ///
13317    /// let builder = prepare_request_builder();
13318    /// let response = builder.send().await?;
13319    /// # Ok(()) }
13320    ///
13321    /// fn prepare_request_builder() -> GetLocation {
13322    ///   # panic!();
13323    ///   // ... details omitted ...
13324    /// }
13325    /// ```
13326    #[derive(Clone, Debug)]
13327    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
13328
13329    impl GetLocation {
13330        pub(crate) fn new(
13331            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13332        ) -> Self {
13333            Self(RequestBuilder::new(stub))
13334        }
13335
13336        /// Sets the full request, replacing any prior values.
13337        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
13338            mut self,
13339            v: V,
13340        ) -> Self {
13341            self.0.request = v.into();
13342            self
13343        }
13344
13345        /// Sets all the options, replacing any prior values.
13346        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13347            self.0.options = v.into();
13348            self
13349        }
13350
13351        /// Sends the request.
13352        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
13353            (*self.0.stub)
13354                .get_location(self.0.request, self.0.options)
13355                .await
13356                .map(crate::Response::into_body)
13357        }
13358
13359        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
13360        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13361            self.0.request.name = v.into();
13362            self
13363        }
13364    }
13365
13366    #[doc(hidden)]
13367    impl crate::RequestBuilder for GetLocation {
13368        fn request_options(&mut self) -> &mut crate::RequestOptions {
13369            &mut self.0.options
13370        }
13371    }
13372
13373    /// The request builder for [DataTaxonomyService::set_iam_policy][crate::client::DataTaxonomyService::set_iam_policy] calls.
13374    ///
13375    /// # Example
13376    /// ```
13377    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::SetIamPolicy;
13378    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13379    ///
13380    /// let builder = prepare_request_builder();
13381    /// let response = builder.send().await?;
13382    /// # Ok(()) }
13383    ///
13384    /// fn prepare_request_builder() -> SetIamPolicy {
13385    ///   # panic!();
13386    ///   // ... details omitted ...
13387    /// }
13388    /// ```
13389    #[derive(Clone, Debug)]
13390    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
13391
13392    impl SetIamPolicy {
13393        pub(crate) fn new(
13394            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13395        ) -> Self {
13396            Self(RequestBuilder::new(stub))
13397        }
13398
13399        /// Sets the full request, replacing any prior values.
13400        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
13401            mut self,
13402            v: V,
13403        ) -> Self {
13404            self.0.request = v.into();
13405            self
13406        }
13407
13408        /// Sets all the options, replacing any prior values.
13409        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13410            self.0.options = v.into();
13411            self
13412        }
13413
13414        /// Sends the request.
13415        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
13416            (*self.0.stub)
13417                .set_iam_policy(self.0.request, self.0.options)
13418                .await
13419                .map(crate::Response::into_body)
13420        }
13421
13422        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
13423        ///
13424        /// This is a **required** field for requests.
13425        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
13426            self.0.request.resource = v.into();
13427            self
13428        }
13429
13430        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
13431        ///
13432        /// This is a **required** field for requests.
13433        pub fn set_policy<T>(mut self, v: T) -> Self
13434        where
13435            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
13436        {
13437            self.0.request.policy = std::option::Option::Some(v.into());
13438            self
13439        }
13440
13441        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
13442        ///
13443        /// This is a **required** field for requests.
13444        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
13445        where
13446            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
13447        {
13448            self.0.request.policy = v.map(|x| x.into());
13449            self
13450        }
13451
13452        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
13453        pub fn set_update_mask<T>(mut self, v: T) -> Self
13454        where
13455            T: std::convert::Into<wkt::FieldMask>,
13456        {
13457            self.0.request.update_mask = std::option::Option::Some(v.into());
13458            self
13459        }
13460
13461        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
13462        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
13463        where
13464            T: std::convert::Into<wkt::FieldMask>,
13465        {
13466            self.0.request.update_mask = v.map(|x| x.into());
13467            self
13468        }
13469    }
13470
13471    #[doc(hidden)]
13472    impl crate::RequestBuilder for SetIamPolicy {
13473        fn request_options(&mut self) -> &mut crate::RequestOptions {
13474            &mut self.0.options
13475        }
13476    }
13477
13478    /// The request builder for [DataTaxonomyService::get_iam_policy][crate::client::DataTaxonomyService::get_iam_policy] calls.
13479    ///
13480    /// # Example
13481    /// ```
13482    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetIamPolicy;
13483    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13484    ///
13485    /// let builder = prepare_request_builder();
13486    /// let response = builder.send().await?;
13487    /// # Ok(()) }
13488    ///
13489    /// fn prepare_request_builder() -> GetIamPolicy {
13490    ///   # panic!();
13491    ///   // ... details omitted ...
13492    /// }
13493    /// ```
13494    #[derive(Clone, Debug)]
13495    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
13496
13497    impl GetIamPolicy {
13498        pub(crate) fn new(
13499            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13500        ) -> Self {
13501            Self(RequestBuilder::new(stub))
13502        }
13503
13504        /// Sets the full request, replacing any prior values.
13505        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
13506            mut self,
13507            v: V,
13508        ) -> Self {
13509            self.0.request = v.into();
13510            self
13511        }
13512
13513        /// Sets all the options, replacing any prior values.
13514        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13515            self.0.options = v.into();
13516            self
13517        }
13518
13519        /// Sends the request.
13520        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
13521            (*self.0.stub)
13522                .get_iam_policy(self.0.request, self.0.options)
13523                .await
13524                .map(crate::Response::into_body)
13525        }
13526
13527        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
13528        ///
13529        /// This is a **required** field for requests.
13530        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
13531            self.0.request.resource = v.into();
13532            self
13533        }
13534
13535        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
13536        pub fn set_options<T>(mut self, v: T) -> Self
13537        where
13538            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
13539        {
13540            self.0.request.options = std::option::Option::Some(v.into());
13541            self
13542        }
13543
13544        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
13545        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
13546        where
13547            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
13548        {
13549            self.0.request.options = v.map(|x| x.into());
13550            self
13551        }
13552    }
13553
13554    #[doc(hidden)]
13555    impl crate::RequestBuilder for GetIamPolicy {
13556        fn request_options(&mut self) -> &mut crate::RequestOptions {
13557            &mut self.0.options
13558        }
13559    }
13560
13561    /// The request builder for [DataTaxonomyService::test_iam_permissions][crate::client::DataTaxonomyService::test_iam_permissions] calls.
13562    ///
13563    /// # Example
13564    /// ```
13565    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::TestIamPermissions;
13566    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13567    ///
13568    /// let builder = prepare_request_builder();
13569    /// let response = builder.send().await?;
13570    /// # Ok(()) }
13571    ///
13572    /// fn prepare_request_builder() -> TestIamPermissions {
13573    ///   # panic!();
13574    ///   // ... details omitted ...
13575    /// }
13576    /// ```
13577    #[derive(Clone, Debug)]
13578    pub struct TestIamPermissions(
13579        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
13580    );
13581
13582    impl TestIamPermissions {
13583        pub(crate) fn new(
13584            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13585        ) -> Self {
13586            Self(RequestBuilder::new(stub))
13587        }
13588
13589        /// Sets the full request, replacing any prior values.
13590        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
13591            mut self,
13592            v: V,
13593        ) -> Self {
13594            self.0.request = v.into();
13595            self
13596        }
13597
13598        /// Sets all the options, replacing any prior values.
13599        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13600            self.0.options = v.into();
13601            self
13602        }
13603
13604        /// Sends the request.
13605        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
13606            (*self.0.stub)
13607                .test_iam_permissions(self.0.request, self.0.options)
13608                .await
13609                .map(crate::Response::into_body)
13610        }
13611
13612        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
13613        ///
13614        /// This is a **required** field for requests.
13615        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
13616            self.0.request.resource = v.into();
13617            self
13618        }
13619
13620        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
13621        ///
13622        /// This is a **required** field for requests.
13623        pub fn set_permissions<T, V>(mut self, v: T) -> Self
13624        where
13625            T: std::iter::IntoIterator<Item = V>,
13626            V: std::convert::Into<std::string::String>,
13627        {
13628            use std::iter::Iterator;
13629            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
13630            self
13631        }
13632    }
13633
13634    #[doc(hidden)]
13635    impl crate::RequestBuilder for TestIamPermissions {
13636        fn request_options(&mut self) -> &mut crate::RequestOptions {
13637            &mut self.0.options
13638        }
13639    }
13640
13641    /// The request builder for [DataTaxonomyService::list_operations][crate::client::DataTaxonomyService::list_operations] calls.
13642    ///
13643    /// # Example
13644    /// ```
13645    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListOperations;
13646    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13647    /// use google_cloud_gax::paginator::ItemPaginator;
13648    ///
13649    /// let builder = prepare_request_builder();
13650    /// let mut items = builder.by_item();
13651    /// while let Some(result) = items.next().await {
13652    ///   let item = result?;
13653    /// }
13654    /// # Ok(()) }
13655    ///
13656    /// fn prepare_request_builder() -> ListOperations {
13657    ///   # panic!();
13658    ///   // ... details omitted ...
13659    /// }
13660    /// ```
13661    #[derive(Clone, Debug)]
13662    pub struct ListOperations(
13663        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
13664    );
13665
13666    impl ListOperations {
13667        pub(crate) fn new(
13668            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13669        ) -> Self {
13670            Self(RequestBuilder::new(stub))
13671        }
13672
13673        /// Sets the full request, replacing any prior values.
13674        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
13675            mut self,
13676            v: V,
13677        ) -> Self {
13678            self.0.request = v.into();
13679            self
13680        }
13681
13682        /// Sets all the options, replacing any prior values.
13683        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13684            self.0.options = v.into();
13685            self
13686        }
13687
13688        /// Sends the request.
13689        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
13690            (*self.0.stub)
13691                .list_operations(self.0.request, self.0.options)
13692                .await
13693                .map(crate::Response::into_body)
13694        }
13695
13696        /// Streams each page in the collection.
13697        pub fn by_page(
13698            self,
13699        ) -> impl google_cloud_gax::paginator::Paginator<
13700            google_cloud_longrunning::model::ListOperationsResponse,
13701            crate::Error,
13702        > {
13703            use std::clone::Clone;
13704            let token = self.0.request.page_token.clone();
13705            let execute = move |token: String| {
13706                let mut builder = self.clone();
13707                builder.0.request = builder.0.request.set_page_token(token);
13708                builder.send()
13709            };
13710            google_cloud_gax::paginator::internal::new_paginator(token, execute)
13711        }
13712
13713        /// Streams each item in the collection.
13714        pub fn by_item(
13715            self,
13716        ) -> impl google_cloud_gax::paginator::ItemPaginator<
13717            google_cloud_longrunning::model::ListOperationsResponse,
13718            crate::Error,
13719        > {
13720            use google_cloud_gax::paginator::Paginator;
13721            self.by_page().items()
13722        }
13723
13724        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
13725        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13726            self.0.request.name = v.into();
13727            self
13728        }
13729
13730        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
13731        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13732            self.0.request.filter = v.into();
13733            self
13734        }
13735
13736        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
13737        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13738            self.0.request.page_size = v.into();
13739            self
13740        }
13741
13742        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
13743        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13744            self.0.request.page_token = v.into();
13745            self
13746        }
13747
13748        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
13749        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
13750            self.0.request.return_partial_success = v.into();
13751            self
13752        }
13753    }
13754
13755    #[doc(hidden)]
13756    impl crate::RequestBuilder for ListOperations {
13757        fn request_options(&mut self) -> &mut crate::RequestOptions {
13758            &mut self.0.options
13759        }
13760    }
13761
13762    /// The request builder for [DataTaxonomyService::get_operation][crate::client::DataTaxonomyService::get_operation] calls.
13763    ///
13764    /// # Example
13765    /// ```
13766    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetOperation;
13767    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13768    ///
13769    /// let builder = prepare_request_builder();
13770    /// let response = builder.send().await?;
13771    /// # Ok(()) }
13772    ///
13773    /// fn prepare_request_builder() -> GetOperation {
13774    ///   # panic!();
13775    ///   // ... details omitted ...
13776    /// }
13777    /// ```
13778    #[derive(Clone, Debug)]
13779    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
13780
13781    impl GetOperation {
13782        pub(crate) fn new(
13783            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13784        ) -> Self {
13785            Self(RequestBuilder::new(stub))
13786        }
13787
13788        /// Sets the full request, replacing any prior values.
13789        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
13790            mut self,
13791            v: V,
13792        ) -> Self {
13793            self.0.request = v.into();
13794            self
13795        }
13796
13797        /// Sets all the options, replacing any prior values.
13798        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13799            self.0.options = v.into();
13800            self
13801        }
13802
13803        /// Sends the request.
13804        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
13805            (*self.0.stub)
13806                .get_operation(self.0.request, self.0.options)
13807                .await
13808                .map(crate::Response::into_body)
13809        }
13810
13811        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
13812        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13813            self.0.request.name = v.into();
13814            self
13815        }
13816    }
13817
13818    #[doc(hidden)]
13819    impl crate::RequestBuilder for GetOperation {
13820        fn request_options(&mut self) -> &mut crate::RequestOptions {
13821            &mut self.0.options
13822        }
13823    }
13824
13825    /// The request builder for [DataTaxonomyService::delete_operation][crate::client::DataTaxonomyService::delete_operation] calls.
13826    ///
13827    /// # Example
13828    /// ```
13829    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteOperation;
13830    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13831    ///
13832    /// let builder = prepare_request_builder();
13833    /// let response = builder.send().await?;
13834    /// # Ok(()) }
13835    ///
13836    /// fn prepare_request_builder() -> DeleteOperation {
13837    ///   # panic!();
13838    ///   // ... details omitted ...
13839    /// }
13840    /// ```
13841    #[derive(Clone, Debug)]
13842    pub struct DeleteOperation(
13843        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
13844    );
13845
13846    impl DeleteOperation {
13847        pub(crate) fn new(
13848            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13849        ) -> Self {
13850            Self(RequestBuilder::new(stub))
13851        }
13852
13853        /// Sets the full request, replacing any prior values.
13854        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
13855            mut self,
13856            v: V,
13857        ) -> Self {
13858            self.0.request = v.into();
13859            self
13860        }
13861
13862        /// Sets all the options, replacing any prior values.
13863        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13864            self.0.options = v.into();
13865            self
13866        }
13867
13868        /// Sends the request.
13869        pub async fn send(self) -> Result<()> {
13870            (*self.0.stub)
13871                .delete_operation(self.0.request, self.0.options)
13872                .await
13873                .map(crate::Response::into_body)
13874        }
13875
13876        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
13877        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13878            self.0.request.name = v.into();
13879            self
13880        }
13881    }
13882
13883    #[doc(hidden)]
13884    impl crate::RequestBuilder for DeleteOperation {
13885        fn request_options(&mut self) -> &mut crate::RequestOptions {
13886            &mut self.0.options
13887        }
13888    }
13889
13890    /// The request builder for [DataTaxonomyService::cancel_operation][crate::client::DataTaxonomyService::cancel_operation] calls.
13891    ///
13892    /// # Example
13893    /// ```
13894    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CancelOperation;
13895    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13896    ///
13897    /// let builder = prepare_request_builder();
13898    /// let response = builder.send().await?;
13899    /// # Ok(()) }
13900    ///
13901    /// fn prepare_request_builder() -> CancelOperation {
13902    ///   # panic!();
13903    ///   // ... details omitted ...
13904    /// }
13905    /// ```
13906    #[derive(Clone, Debug)]
13907    pub struct CancelOperation(
13908        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
13909    );
13910
13911    impl CancelOperation {
13912        pub(crate) fn new(
13913            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13914        ) -> Self {
13915            Self(RequestBuilder::new(stub))
13916        }
13917
13918        /// Sets the full request, replacing any prior values.
13919        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
13920            mut self,
13921            v: V,
13922        ) -> Self {
13923            self.0.request = v.into();
13924            self
13925        }
13926
13927        /// Sets all the options, replacing any prior values.
13928        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13929            self.0.options = v.into();
13930            self
13931        }
13932
13933        /// Sends the request.
13934        pub async fn send(self) -> Result<()> {
13935            (*self.0.stub)
13936                .cancel_operation(self.0.request, self.0.options)
13937                .await
13938                .map(crate::Response::into_body)
13939        }
13940
13941        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
13942        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13943            self.0.request.name = v.into();
13944            self
13945        }
13946    }
13947
13948    #[doc(hidden)]
13949    impl crate::RequestBuilder for CancelOperation {
13950        fn request_options(&mut self) -> &mut crate::RequestOptions {
13951            &mut self.0.options
13952        }
13953    }
13954}
13955
13956pub mod data_scan_service {
13957    use crate::Result;
13958
13959    /// A builder for [DataScanService][crate::client::DataScanService].
13960    ///
13961    /// ```
13962    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
13963    /// # use google_cloud_dataplex_v1::*;
13964    /// # use builder::data_scan_service::ClientBuilder;
13965    /// # use client::DataScanService;
13966    /// let builder : ClientBuilder = DataScanService::builder();
13967    /// let client = builder
13968    ///     .with_endpoint("https://dataplex.googleapis.com")
13969    ///     .build().await?;
13970    /// # Ok(()) }
13971    /// ```
13972    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
13973
13974    pub(crate) mod client {
13975        use super::super::super::client::DataScanService;
13976        pub struct Factory;
13977        impl crate::ClientFactory for Factory {
13978            type Client = DataScanService;
13979            type Credentials = gaxi::options::Credentials;
13980            async fn build(
13981                self,
13982                config: gaxi::options::ClientConfig,
13983            ) -> crate::ClientBuilderResult<Self::Client> {
13984                Self::Client::new(config).await
13985            }
13986        }
13987    }
13988
13989    /// Common implementation for [crate::client::DataScanService] request builders.
13990    #[derive(Clone, Debug)]
13991    pub(crate) struct RequestBuilder<R: std::default::Default> {
13992        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
13993        request: R,
13994        options: crate::RequestOptions,
13995    }
13996
13997    impl<R> RequestBuilder<R>
13998    where
13999        R: std::default::Default,
14000    {
14001        pub(crate) fn new(
14002            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14003        ) -> Self {
14004            Self {
14005                stub,
14006                request: R::default(),
14007                options: crate::RequestOptions::default(),
14008            }
14009        }
14010    }
14011
14012    /// The request builder for [DataScanService::create_data_scan][crate::client::DataScanService::create_data_scan] calls.
14013    ///
14014    /// # Example
14015    /// ```
14016    /// # use google_cloud_dataplex_v1::builder::data_scan_service::CreateDataScan;
14017    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14018    /// use google_cloud_lro::Poller;
14019    ///
14020    /// let builder = prepare_request_builder();
14021    /// let response = builder.poller().until_done().await?;
14022    /// # Ok(()) }
14023    ///
14024    /// fn prepare_request_builder() -> CreateDataScan {
14025    ///   # panic!();
14026    ///   // ... details omitted ...
14027    /// }
14028    /// ```
14029    #[derive(Clone, Debug)]
14030    pub struct CreateDataScan(RequestBuilder<crate::model::CreateDataScanRequest>);
14031
14032    impl CreateDataScan {
14033        pub(crate) fn new(
14034            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14035        ) -> Self {
14036            Self(RequestBuilder::new(stub))
14037        }
14038
14039        /// Sets the full request, replacing any prior values.
14040        pub fn with_request<V: Into<crate::model::CreateDataScanRequest>>(mut self, v: V) -> Self {
14041            self.0.request = v.into();
14042            self
14043        }
14044
14045        /// Sets all the options, replacing any prior values.
14046        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14047            self.0.options = v.into();
14048            self
14049        }
14050
14051        /// Sends the request.
14052        ///
14053        /// # Long running operations
14054        ///
14055        /// This starts, but does not poll, a longrunning operation. More information
14056        /// on [create_data_scan][crate::client::DataScanService::create_data_scan].
14057        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14058            (*self.0.stub)
14059                .create_data_scan(self.0.request, self.0.options)
14060                .await
14061                .map(crate::Response::into_body)
14062        }
14063
14064        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_scan`.
14065        pub fn poller(
14066            self,
14067        ) -> impl google_cloud_lro::Poller<crate::model::DataScan, crate::model::OperationMetadata>
14068        {
14069            type Operation = google_cloud_lro::internal::Operation<
14070                crate::model::DataScan,
14071                crate::model::OperationMetadata,
14072            >;
14073            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14074            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14075
14076            let stub = self.0.stub.clone();
14077            let mut options = self.0.options.clone();
14078            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
14079            let query = move |name| {
14080                let stub = stub.clone();
14081                let options = options.clone();
14082                async {
14083                    let op = GetOperation::new(stub)
14084                        .set_name(name)
14085                        .with_options(options)
14086                        .send()
14087                        .await?;
14088                    Ok(Operation::new(op))
14089                }
14090            };
14091
14092            let start = move || async {
14093                let op = self.send().await?;
14094                Ok(Operation::new(op))
14095            };
14096
14097            google_cloud_lro::internal::new_poller(
14098                polling_error_policy,
14099                polling_backoff_policy,
14100                start,
14101                query,
14102            )
14103        }
14104
14105        /// Sets the value of [parent][crate::model::CreateDataScanRequest::parent].
14106        ///
14107        /// This is a **required** field for requests.
14108        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14109            self.0.request.parent = v.into();
14110            self
14111        }
14112
14113        /// Sets the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
14114        ///
14115        /// This is a **required** field for requests.
14116        pub fn set_data_scan<T>(mut self, v: T) -> Self
14117        where
14118            T: std::convert::Into<crate::model::DataScan>,
14119        {
14120            self.0.request.data_scan = std::option::Option::Some(v.into());
14121            self
14122        }
14123
14124        /// Sets or clears the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
14125        ///
14126        /// This is a **required** field for requests.
14127        pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
14128        where
14129            T: std::convert::Into<crate::model::DataScan>,
14130        {
14131            self.0.request.data_scan = v.map(|x| x.into());
14132            self
14133        }
14134
14135        /// Sets the value of [data_scan_id][crate::model::CreateDataScanRequest::data_scan_id].
14136        ///
14137        /// This is a **required** field for requests.
14138        pub fn set_data_scan_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
14139            self.0.request.data_scan_id = v.into();
14140            self
14141        }
14142
14143        /// Sets the value of [validate_only][crate::model::CreateDataScanRequest::validate_only].
14144        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
14145            self.0.request.validate_only = v.into();
14146            self
14147        }
14148    }
14149
14150    #[doc(hidden)]
14151    impl crate::RequestBuilder for CreateDataScan {
14152        fn request_options(&mut self) -> &mut crate::RequestOptions {
14153            &mut self.0.options
14154        }
14155    }
14156
14157    /// The request builder for [DataScanService::update_data_scan][crate::client::DataScanService::update_data_scan] calls.
14158    ///
14159    /// # Example
14160    /// ```
14161    /// # use google_cloud_dataplex_v1::builder::data_scan_service::UpdateDataScan;
14162    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14163    /// use google_cloud_lro::Poller;
14164    ///
14165    /// let builder = prepare_request_builder();
14166    /// let response = builder.poller().until_done().await?;
14167    /// # Ok(()) }
14168    ///
14169    /// fn prepare_request_builder() -> UpdateDataScan {
14170    ///   # panic!();
14171    ///   // ... details omitted ...
14172    /// }
14173    /// ```
14174    #[derive(Clone, Debug)]
14175    pub struct UpdateDataScan(RequestBuilder<crate::model::UpdateDataScanRequest>);
14176
14177    impl UpdateDataScan {
14178        pub(crate) fn new(
14179            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14180        ) -> Self {
14181            Self(RequestBuilder::new(stub))
14182        }
14183
14184        /// Sets the full request, replacing any prior values.
14185        pub fn with_request<V: Into<crate::model::UpdateDataScanRequest>>(mut self, v: V) -> Self {
14186            self.0.request = v.into();
14187            self
14188        }
14189
14190        /// Sets all the options, replacing any prior values.
14191        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14192            self.0.options = v.into();
14193            self
14194        }
14195
14196        /// Sends the request.
14197        ///
14198        /// # Long running operations
14199        ///
14200        /// This starts, but does not poll, a longrunning operation. More information
14201        /// on [update_data_scan][crate::client::DataScanService::update_data_scan].
14202        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14203            (*self.0.stub)
14204                .update_data_scan(self.0.request, self.0.options)
14205                .await
14206                .map(crate::Response::into_body)
14207        }
14208
14209        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_scan`.
14210        pub fn poller(
14211            self,
14212        ) -> impl google_cloud_lro::Poller<crate::model::DataScan, crate::model::OperationMetadata>
14213        {
14214            type Operation = google_cloud_lro::internal::Operation<
14215                crate::model::DataScan,
14216                crate::model::OperationMetadata,
14217            >;
14218            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14219            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14220
14221            let stub = self.0.stub.clone();
14222            let mut options = self.0.options.clone();
14223            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
14224            let query = move |name| {
14225                let stub = stub.clone();
14226                let options = options.clone();
14227                async {
14228                    let op = GetOperation::new(stub)
14229                        .set_name(name)
14230                        .with_options(options)
14231                        .send()
14232                        .await?;
14233                    Ok(Operation::new(op))
14234                }
14235            };
14236
14237            let start = move || async {
14238                let op = self.send().await?;
14239                Ok(Operation::new(op))
14240            };
14241
14242            google_cloud_lro::internal::new_poller(
14243                polling_error_policy,
14244                polling_backoff_policy,
14245                start,
14246                query,
14247            )
14248        }
14249
14250        /// Sets the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
14251        ///
14252        /// This is a **required** field for requests.
14253        pub fn set_data_scan<T>(mut self, v: T) -> Self
14254        where
14255            T: std::convert::Into<crate::model::DataScan>,
14256        {
14257            self.0.request.data_scan = std::option::Option::Some(v.into());
14258            self
14259        }
14260
14261        /// Sets or clears the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
14262        ///
14263        /// This is a **required** field for requests.
14264        pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
14265        where
14266            T: std::convert::Into<crate::model::DataScan>,
14267        {
14268            self.0.request.data_scan = v.map(|x| x.into());
14269            self
14270        }
14271
14272        /// Sets the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
14273        pub fn set_update_mask<T>(mut self, v: T) -> Self
14274        where
14275            T: std::convert::Into<wkt::FieldMask>,
14276        {
14277            self.0.request.update_mask = std::option::Option::Some(v.into());
14278            self
14279        }
14280
14281        /// Sets or clears the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
14282        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
14283        where
14284            T: std::convert::Into<wkt::FieldMask>,
14285        {
14286            self.0.request.update_mask = v.map(|x| x.into());
14287            self
14288        }
14289
14290        /// Sets the value of [validate_only][crate::model::UpdateDataScanRequest::validate_only].
14291        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
14292            self.0.request.validate_only = v.into();
14293            self
14294        }
14295    }
14296
14297    #[doc(hidden)]
14298    impl crate::RequestBuilder for UpdateDataScan {
14299        fn request_options(&mut self) -> &mut crate::RequestOptions {
14300            &mut self.0.options
14301        }
14302    }
14303
14304    /// The request builder for [DataScanService::delete_data_scan][crate::client::DataScanService::delete_data_scan] calls.
14305    ///
14306    /// # Example
14307    /// ```
14308    /// # use google_cloud_dataplex_v1::builder::data_scan_service::DeleteDataScan;
14309    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14310    /// use google_cloud_lro::Poller;
14311    ///
14312    /// let builder = prepare_request_builder();
14313    /// let response = builder.poller().until_done().await?;
14314    /// # Ok(()) }
14315    ///
14316    /// fn prepare_request_builder() -> DeleteDataScan {
14317    ///   # panic!();
14318    ///   // ... details omitted ...
14319    /// }
14320    /// ```
14321    #[derive(Clone, Debug)]
14322    pub struct DeleteDataScan(RequestBuilder<crate::model::DeleteDataScanRequest>);
14323
14324    impl DeleteDataScan {
14325        pub(crate) fn new(
14326            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14327        ) -> Self {
14328            Self(RequestBuilder::new(stub))
14329        }
14330
14331        /// Sets the full request, replacing any prior values.
14332        pub fn with_request<V: Into<crate::model::DeleteDataScanRequest>>(mut self, v: V) -> Self {
14333            self.0.request = v.into();
14334            self
14335        }
14336
14337        /// Sets all the options, replacing any prior values.
14338        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14339            self.0.options = v.into();
14340            self
14341        }
14342
14343        /// Sends the request.
14344        ///
14345        /// # Long running operations
14346        ///
14347        /// This starts, but does not poll, a longrunning operation. More information
14348        /// on [delete_data_scan][crate::client::DataScanService::delete_data_scan].
14349        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14350            (*self.0.stub)
14351                .delete_data_scan(self.0.request, self.0.options)
14352                .await
14353                .map(crate::Response::into_body)
14354        }
14355
14356        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_scan`.
14357        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
14358            type Operation =
14359                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
14360            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14361            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14362
14363            let stub = self.0.stub.clone();
14364            let mut options = self.0.options.clone();
14365            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
14366            let query = move |name| {
14367                let stub = stub.clone();
14368                let options = options.clone();
14369                async {
14370                    let op = GetOperation::new(stub)
14371                        .set_name(name)
14372                        .with_options(options)
14373                        .send()
14374                        .await?;
14375                    Ok(Operation::new(op))
14376                }
14377            };
14378
14379            let start = move || async {
14380                let op = self.send().await?;
14381                Ok(Operation::new(op))
14382            };
14383
14384            google_cloud_lro::internal::new_unit_response_poller(
14385                polling_error_policy,
14386                polling_backoff_policy,
14387                start,
14388                query,
14389            )
14390        }
14391
14392        /// Sets the value of [name][crate::model::DeleteDataScanRequest::name].
14393        ///
14394        /// This is a **required** field for requests.
14395        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14396            self.0.request.name = v.into();
14397            self
14398        }
14399
14400        /// Sets the value of [force][crate::model::DeleteDataScanRequest::force].
14401        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
14402            self.0.request.force = v.into();
14403            self
14404        }
14405    }
14406
14407    #[doc(hidden)]
14408    impl crate::RequestBuilder for DeleteDataScan {
14409        fn request_options(&mut self) -> &mut crate::RequestOptions {
14410            &mut self.0.options
14411        }
14412    }
14413
14414    /// The request builder for [DataScanService::get_data_scan][crate::client::DataScanService::get_data_scan] calls.
14415    ///
14416    /// # Example
14417    /// ```
14418    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetDataScan;
14419    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14420    ///
14421    /// let builder = prepare_request_builder();
14422    /// let response = builder.send().await?;
14423    /// # Ok(()) }
14424    ///
14425    /// fn prepare_request_builder() -> GetDataScan {
14426    ///   # panic!();
14427    ///   // ... details omitted ...
14428    /// }
14429    /// ```
14430    #[derive(Clone, Debug)]
14431    pub struct GetDataScan(RequestBuilder<crate::model::GetDataScanRequest>);
14432
14433    impl GetDataScan {
14434        pub(crate) fn new(
14435            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14436        ) -> Self {
14437            Self(RequestBuilder::new(stub))
14438        }
14439
14440        /// Sets the full request, replacing any prior values.
14441        pub fn with_request<V: Into<crate::model::GetDataScanRequest>>(mut self, v: V) -> Self {
14442            self.0.request = v.into();
14443            self
14444        }
14445
14446        /// Sets all the options, replacing any prior values.
14447        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14448            self.0.options = v.into();
14449            self
14450        }
14451
14452        /// Sends the request.
14453        pub async fn send(self) -> Result<crate::model::DataScan> {
14454            (*self.0.stub)
14455                .get_data_scan(self.0.request, self.0.options)
14456                .await
14457                .map(crate::Response::into_body)
14458        }
14459
14460        /// Sets the value of [name][crate::model::GetDataScanRequest::name].
14461        ///
14462        /// This is a **required** field for requests.
14463        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14464            self.0.request.name = v.into();
14465            self
14466        }
14467
14468        /// Sets the value of [view][crate::model::GetDataScanRequest::view].
14469        pub fn set_view<T: Into<crate::model::get_data_scan_request::DataScanView>>(
14470            mut self,
14471            v: T,
14472        ) -> Self {
14473            self.0.request.view = v.into();
14474            self
14475        }
14476    }
14477
14478    #[doc(hidden)]
14479    impl crate::RequestBuilder for GetDataScan {
14480        fn request_options(&mut self) -> &mut crate::RequestOptions {
14481            &mut self.0.options
14482        }
14483    }
14484
14485    /// The request builder for [DataScanService::list_data_scans][crate::client::DataScanService::list_data_scans] calls.
14486    ///
14487    /// # Example
14488    /// ```
14489    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListDataScans;
14490    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14491    /// use google_cloud_gax::paginator::ItemPaginator;
14492    ///
14493    /// let builder = prepare_request_builder();
14494    /// let mut items = builder.by_item();
14495    /// while let Some(result) = items.next().await {
14496    ///   let item = result?;
14497    /// }
14498    /// # Ok(()) }
14499    ///
14500    /// fn prepare_request_builder() -> ListDataScans {
14501    ///   # panic!();
14502    ///   // ... details omitted ...
14503    /// }
14504    /// ```
14505    #[derive(Clone, Debug)]
14506    pub struct ListDataScans(RequestBuilder<crate::model::ListDataScansRequest>);
14507
14508    impl ListDataScans {
14509        pub(crate) fn new(
14510            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14511        ) -> Self {
14512            Self(RequestBuilder::new(stub))
14513        }
14514
14515        /// Sets the full request, replacing any prior values.
14516        pub fn with_request<V: Into<crate::model::ListDataScansRequest>>(mut self, v: V) -> Self {
14517            self.0.request = v.into();
14518            self
14519        }
14520
14521        /// Sets all the options, replacing any prior values.
14522        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14523            self.0.options = v.into();
14524            self
14525        }
14526
14527        /// Sends the request.
14528        pub async fn send(self) -> Result<crate::model::ListDataScansResponse> {
14529            (*self.0.stub)
14530                .list_data_scans(self.0.request, self.0.options)
14531                .await
14532                .map(crate::Response::into_body)
14533        }
14534
14535        /// Streams each page in the collection.
14536        pub fn by_page(
14537            self,
14538        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListDataScansResponse, crate::Error>
14539        {
14540            use std::clone::Clone;
14541            let token = self.0.request.page_token.clone();
14542            let execute = move |token: String| {
14543                let mut builder = self.clone();
14544                builder.0.request = builder.0.request.set_page_token(token);
14545                builder.send()
14546            };
14547            google_cloud_gax::paginator::internal::new_paginator(token, execute)
14548        }
14549
14550        /// Streams each item in the collection.
14551        pub fn by_item(
14552            self,
14553        ) -> impl google_cloud_gax::paginator::ItemPaginator<
14554            crate::model::ListDataScansResponse,
14555            crate::Error,
14556        > {
14557            use google_cloud_gax::paginator::Paginator;
14558            self.by_page().items()
14559        }
14560
14561        /// Sets the value of [parent][crate::model::ListDataScansRequest::parent].
14562        ///
14563        /// This is a **required** field for requests.
14564        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14565            self.0.request.parent = v.into();
14566            self
14567        }
14568
14569        /// Sets the value of [page_size][crate::model::ListDataScansRequest::page_size].
14570        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
14571            self.0.request.page_size = v.into();
14572            self
14573        }
14574
14575        /// Sets the value of [page_token][crate::model::ListDataScansRequest::page_token].
14576        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
14577            self.0.request.page_token = v.into();
14578            self
14579        }
14580
14581        /// Sets the value of [filter][crate::model::ListDataScansRequest::filter].
14582        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
14583            self.0.request.filter = v.into();
14584            self
14585        }
14586
14587        /// Sets the value of [order_by][crate::model::ListDataScansRequest::order_by].
14588        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
14589            self.0.request.order_by = v.into();
14590            self
14591        }
14592    }
14593
14594    #[doc(hidden)]
14595    impl crate::RequestBuilder for ListDataScans {
14596        fn request_options(&mut self) -> &mut crate::RequestOptions {
14597            &mut self.0.options
14598        }
14599    }
14600
14601    /// The request builder for [DataScanService::run_data_scan][crate::client::DataScanService::run_data_scan] calls.
14602    ///
14603    /// # Example
14604    /// ```
14605    /// # use google_cloud_dataplex_v1::builder::data_scan_service::RunDataScan;
14606    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14607    ///
14608    /// let builder = prepare_request_builder();
14609    /// let response = builder.send().await?;
14610    /// # Ok(()) }
14611    ///
14612    /// fn prepare_request_builder() -> RunDataScan {
14613    ///   # panic!();
14614    ///   // ... details omitted ...
14615    /// }
14616    /// ```
14617    #[derive(Clone, Debug)]
14618    pub struct RunDataScan(RequestBuilder<crate::model::RunDataScanRequest>);
14619
14620    impl RunDataScan {
14621        pub(crate) fn new(
14622            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14623        ) -> Self {
14624            Self(RequestBuilder::new(stub))
14625        }
14626
14627        /// Sets the full request, replacing any prior values.
14628        pub fn with_request<V: Into<crate::model::RunDataScanRequest>>(mut self, v: V) -> Self {
14629            self.0.request = v.into();
14630            self
14631        }
14632
14633        /// Sets all the options, replacing any prior values.
14634        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14635            self.0.options = v.into();
14636            self
14637        }
14638
14639        /// Sends the request.
14640        pub async fn send(self) -> Result<crate::model::RunDataScanResponse> {
14641            (*self.0.stub)
14642                .run_data_scan(self.0.request, self.0.options)
14643                .await
14644                .map(crate::Response::into_body)
14645        }
14646
14647        /// Sets the value of [name][crate::model::RunDataScanRequest::name].
14648        ///
14649        /// This is a **required** field for requests.
14650        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14651            self.0.request.name = v.into();
14652            self
14653        }
14654    }
14655
14656    #[doc(hidden)]
14657    impl crate::RequestBuilder for RunDataScan {
14658        fn request_options(&mut self) -> &mut crate::RequestOptions {
14659            &mut self.0.options
14660        }
14661    }
14662
14663    /// The request builder for [DataScanService::get_data_scan_job][crate::client::DataScanService::get_data_scan_job] calls.
14664    ///
14665    /// # Example
14666    /// ```
14667    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetDataScanJob;
14668    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14669    ///
14670    /// let builder = prepare_request_builder();
14671    /// let response = builder.send().await?;
14672    /// # Ok(()) }
14673    ///
14674    /// fn prepare_request_builder() -> GetDataScanJob {
14675    ///   # panic!();
14676    ///   // ... details omitted ...
14677    /// }
14678    /// ```
14679    #[derive(Clone, Debug)]
14680    pub struct GetDataScanJob(RequestBuilder<crate::model::GetDataScanJobRequest>);
14681
14682    impl GetDataScanJob {
14683        pub(crate) fn new(
14684            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14685        ) -> Self {
14686            Self(RequestBuilder::new(stub))
14687        }
14688
14689        /// Sets the full request, replacing any prior values.
14690        pub fn with_request<V: Into<crate::model::GetDataScanJobRequest>>(mut self, v: V) -> Self {
14691            self.0.request = v.into();
14692            self
14693        }
14694
14695        /// Sets all the options, replacing any prior values.
14696        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14697            self.0.options = v.into();
14698            self
14699        }
14700
14701        /// Sends the request.
14702        pub async fn send(self) -> Result<crate::model::DataScanJob> {
14703            (*self.0.stub)
14704                .get_data_scan_job(self.0.request, self.0.options)
14705                .await
14706                .map(crate::Response::into_body)
14707        }
14708
14709        /// Sets the value of [name][crate::model::GetDataScanJobRequest::name].
14710        ///
14711        /// This is a **required** field for requests.
14712        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14713            self.0.request.name = v.into();
14714            self
14715        }
14716
14717        /// Sets the value of [view][crate::model::GetDataScanJobRequest::view].
14718        pub fn set_view<T: Into<crate::model::get_data_scan_job_request::DataScanJobView>>(
14719            mut self,
14720            v: T,
14721        ) -> Self {
14722            self.0.request.view = v.into();
14723            self
14724        }
14725    }
14726
14727    #[doc(hidden)]
14728    impl crate::RequestBuilder for GetDataScanJob {
14729        fn request_options(&mut self) -> &mut crate::RequestOptions {
14730            &mut self.0.options
14731        }
14732    }
14733
14734    /// The request builder for [DataScanService::list_data_scan_jobs][crate::client::DataScanService::list_data_scan_jobs] calls.
14735    ///
14736    /// # Example
14737    /// ```
14738    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListDataScanJobs;
14739    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14740    /// use google_cloud_gax::paginator::ItemPaginator;
14741    ///
14742    /// let builder = prepare_request_builder();
14743    /// let mut items = builder.by_item();
14744    /// while let Some(result) = items.next().await {
14745    ///   let item = result?;
14746    /// }
14747    /// # Ok(()) }
14748    ///
14749    /// fn prepare_request_builder() -> ListDataScanJobs {
14750    ///   # panic!();
14751    ///   // ... details omitted ...
14752    /// }
14753    /// ```
14754    #[derive(Clone, Debug)]
14755    pub struct ListDataScanJobs(RequestBuilder<crate::model::ListDataScanJobsRequest>);
14756
14757    impl ListDataScanJobs {
14758        pub(crate) fn new(
14759            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14760        ) -> Self {
14761            Self(RequestBuilder::new(stub))
14762        }
14763
14764        /// Sets the full request, replacing any prior values.
14765        pub fn with_request<V: Into<crate::model::ListDataScanJobsRequest>>(
14766            mut self,
14767            v: V,
14768        ) -> Self {
14769            self.0.request = v.into();
14770            self
14771        }
14772
14773        /// Sets all the options, replacing any prior values.
14774        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14775            self.0.options = v.into();
14776            self
14777        }
14778
14779        /// Sends the request.
14780        pub async fn send(self) -> Result<crate::model::ListDataScanJobsResponse> {
14781            (*self.0.stub)
14782                .list_data_scan_jobs(self.0.request, self.0.options)
14783                .await
14784                .map(crate::Response::into_body)
14785        }
14786
14787        /// Streams each page in the collection.
14788        pub fn by_page(
14789            self,
14790        ) -> impl google_cloud_gax::paginator::Paginator<
14791            crate::model::ListDataScanJobsResponse,
14792            crate::Error,
14793        > {
14794            use std::clone::Clone;
14795            let token = self.0.request.page_token.clone();
14796            let execute = move |token: String| {
14797                let mut builder = self.clone();
14798                builder.0.request = builder.0.request.set_page_token(token);
14799                builder.send()
14800            };
14801            google_cloud_gax::paginator::internal::new_paginator(token, execute)
14802        }
14803
14804        /// Streams each item in the collection.
14805        pub fn by_item(
14806            self,
14807        ) -> impl google_cloud_gax::paginator::ItemPaginator<
14808            crate::model::ListDataScanJobsResponse,
14809            crate::Error,
14810        > {
14811            use google_cloud_gax::paginator::Paginator;
14812            self.by_page().items()
14813        }
14814
14815        /// Sets the value of [parent][crate::model::ListDataScanJobsRequest::parent].
14816        ///
14817        /// This is a **required** field for requests.
14818        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14819            self.0.request.parent = v.into();
14820            self
14821        }
14822
14823        /// Sets the value of [page_size][crate::model::ListDataScanJobsRequest::page_size].
14824        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
14825            self.0.request.page_size = v.into();
14826            self
14827        }
14828
14829        /// Sets the value of [page_token][crate::model::ListDataScanJobsRequest::page_token].
14830        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
14831            self.0.request.page_token = v.into();
14832            self
14833        }
14834
14835        /// Sets the value of [filter][crate::model::ListDataScanJobsRequest::filter].
14836        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
14837            self.0.request.filter = v.into();
14838            self
14839        }
14840    }
14841
14842    #[doc(hidden)]
14843    impl crate::RequestBuilder for ListDataScanJobs {
14844        fn request_options(&mut self) -> &mut crate::RequestOptions {
14845            &mut self.0.options
14846        }
14847    }
14848
14849    /// The request builder for [DataScanService::generate_data_quality_rules][crate::client::DataScanService::generate_data_quality_rules] calls.
14850    ///
14851    /// # Example
14852    /// ```
14853    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GenerateDataQualityRules;
14854    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14855    ///
14856    /// let builder = prepare_request_builder();
14857    /// let response = builder.send().await?;
14858    /// # Ok(()) }
14859    ///
14860    /// fn prepare_request_builder() -> GenerateDataQualityRules {
14861    ///   # panic!();
14862    ///   // ... details omitted ...
14863    /// }
14864    /// ```
14865    #[derive(Clone, Debug)]
14866    pub struct GenerateDataQualityRules(
14867        RequestBuilder<crate::model::GenerateDataQualityRulesRequest>,
14868    );
14869
14870    impl GenerateDataQualityRules {
14871        pub(crate) fn new(
14872            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14873        ) -> Self {
14874            Self(RequestBuilder::new(stub))
14875        }
14876
14877        /// Sets the full request, replacing any prior values.
14878        pub fn with_request<V: Into<crate::model::GenerateDataQualityRulesRequest>>(
14879            mut self,
14880            v: V,
14881        ) -> Self {
14882            self.0.request = v.into();
14883            self
14884        }
14885
14886        /// Sets all the options, replacing any prior values.
14887        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14888            self.0.options = v.into();
14889            self
14890        }
14891
14892        /// Sends the request.
14893        pub async fn send(self) -> Result<crate::model::GenerateDataQualityRulesResponse> {
14894            (*self.0.stub)
14895                .generate_data_quality_rules(self.0.request, self.0.options)
14896                .await
14897                .map(crate::Response::into_body)
14898        }
14899
14900        /// Sets the value of [name][crate::model::GenerateDataQualityRulesRequest::name].
14901        ///
14902        /// This is a **required** field for requests.
14903        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14904            self.0.request.name = v.into();
14905            self
14906        }
14907    }
14908
14909    #[doc(hidden)]
14910    impl crate::RequestBuilder for GenerateDataQualityRules {
14911        fn request_options(&mut self) -> &mut crate::RequestOptions {
14912            &mut self.0.options
14913        }
14914    }
14915
14916    /// The request builder for [DataScanService::list_locations][crate::client::DataScanService::list_locations] calls.
14917    ///
14918    /// # Example
14919    /// ```
14920    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListLocations;
14921    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14922    /// use google_cloud_gax::paginator::ItemPaginator;
14923    ///
14924    /// let builder = prepare_request_builder();
14925    /// let mut items = builder.by_item();
14926    /// while let Some(result) = items.next().await {
14927    ///   let item = result?;
14928    /// }
14929    /// # Ok(()) }
14930    ///
14931    /// fn prepare_request_builder() -> ListLocations {
14932    ///   # panic!();
14933    ///   // ... details omitted ...
14934    /// }
14935    /// ```
14936    #[derive(Clone, Debug)]
14937    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
14938
14939    impl ListLocations {
14940        pub(crate) fn new(
14941            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14942        ) -> Self {
14943            Self(RequestBuilder::new(stub))
14944        }
14945
14946        /// Sets the full request, replacing any prior values.
14947        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
14948            mut self,
14949            v: V,
14950        ) -> Self {
14951            self.0.request = v.into();
14952            self
14953        }
14954
14955        /// Sets all the options, replacing any prior values.
14956        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14957            self.0.options = v.into();
14958            self
14959        }
14960
14961        /// Sends the request.
14962        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
14963            (*self.0.stub)
14964                .list_locations(self.0.request, self.0.options)
14965                .await
14966                .map(crate::Response::into_body)
14967        }
14968
14969        /// Streams each page in the collection.
14970        pub fn by_page(
14971            self,
14972        ) -> impl google_cloud_gax::paginator::Paginator<
14973            google_cloud_location::model::ListLocationsResponse,
14974            crate::Error,
14975        > {
14976            use std::clone::Clone;
14977            let token = self.0.request.page_token.clone();
14978            let execute = move |token: String| {
14979                let mut builder = self.clone();
14980                builder.0.request = builder.0.request.set_page_token(token);
14981                builder.send()
14982            };
14983            google_cloud_gax::paginator::internal::new_paginator(token, execute)
14984        }
14985
14986        /// Streams each item in the collection.
14987        pub fn by_item(
14988            self,
14989        ) -> impl google_cloud_gax::paginator::ItemPaginator<
14990            google_cloud_location::model::ListLocationsResponse,
14991            crate::Error,
14992        > {
14993            use google_cloud_gax::paginator::Paginator;
14994            self.by_page().items()
14995        }
14996
14997        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
14998        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14999            self.0.request.name = v.into();
15000            self
15001        }
15002
15003        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
15004        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15005            self.0.request.filter = v.into();
15006            self
15007        }
15008
15009        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
15010        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15011            self.0.request.page_size = v.into();
15012            self
15013        }
15014
15015        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
15016        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15017            self.0.request.page_token = v.into();
15018            self
15019        }
15020    }
15021
15022    #[doc(hidden)]
15023    impl crate::RequestBuilder for ListLocations {
15024        fn request_options(&mut self) -> &mut crate::RequestOptions {
15025            &mut self.0.options
15026        }
15027    }
15028
15029    /// The request builder for [DataScanService::get_location][crate::client::DataScanService::get_location] calls.
15030    ///
15031    /// # Example
15032    /// ```
15033    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetLocation;
15034    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15035    ///
15036    /// let builder = prepare_request_builder();
15037    /// let response = builder.send().await?;
15038    /// # Ok(()) }
15039    ///
15040    /// fn prepare_request_builder() -> GetLocation {
15041    ///   # panic!();
15042    ///   // ... details omitted ...
15043    /// }
15044    /// ```
15045    #[derive(Clone, Debug)]
15046    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
15047
15048    impl GetLocation {
15049        pub(crate) fn new(
15050            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15051        ) -> Self {
15052            Self(RequestBuilder::new(stub))
15053        }
15054
15055        /// Sets the full request, replacing any prior values.
15056        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
15057            mut self,
15058            v: V,
15059        ) -> Self {
15060            self.0.request = v.into();
15061            self
15062        }
15063
15064        /// Sets all the options, replacing any prior values.
15065        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15066            self.0.options = v.into();
15067            self
15068        }
15069
15070        /// Sends the request.
15071        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
15072            (*self.0.stub)
15073                .get_location(self.0.request, self.0.options)
15074                .await
15075                .map(crate::Response::into_body)
15076        }
15077
15078        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
15079        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15080            self.0.request.name = v.into();
15081            self
15082        }
15083    }
15084
15085    #[doc(hidden)]
15086    impl crate::RequestBuilder for GetLocation {
15087        fn request_options(&mut self) -> &mut crate::RequestOptions {
15088            &mut self.0.options
15089        }
15090    }
15091
15092    /// The request builder for [DataScanService::set_iam_policy][crate::client::DataScanService::set_iam_policy] calls.
15093    ///
15094    /// # Example
15095    /// ```
15096    /// # use google_cloud_dataplex_v1::builder::data_scan_service::SetIamPolicy;
15097    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15098    ///
15099    /// let builder = prepare_request_builder();
15100    /// let response = builder.send().await?;
15101    /// # Ok(()) }
15102    ///
15103    /// fn prepare_request_builder() -> SetIamPolicy {
15104    ///   # panic!();
15105    ///   // ... details omitted ...
15106    /// }
15107    /// ```
15108    #[derive(Clone, Debug)]
15109    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
15110
15111    impl SetIamPolicy {
15112        pub(crate) fn new(
15113            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15114        ) -> Self {
15115            Self(RequestBuilder::new(stub))
15116        }
15117
15118        /// Sets the full request, replacing any prior values.
15119        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
15120            mut self,
15121            v: V,
15122        ) -> Self {
15123            self.0.request = v.into();
15124            self
15125        }
15126
15127        /// Sets all the options, replacing any prior values.
15128        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15129            self.0.options = v.into();
15130            self
15131        }
15132
15133        /// Sends the request.
15134        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
15135            (*self.0.stub)
15136                .set_iam_policy(self.0.request, self.0.options)
15137                .await
15138                .map(crate::Response::into_body)
15139        }
15140
15141        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
15142        ///
15143        /// This is a **required** field for requests.
15144        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
15145            self.0.request.resource = v.into();
15146            self
15147        }
15148
15149        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
15150        ///
15151        /// This is a **required** field for requests.
15152        pub fn set_policy<T>(mut self, v: T) -> Self
15153        where
15154            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
15155        {
15156            self.0.request.policy = std::option::Option::Some(v.into());
15157            self
15158        }
15159
15160        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
15161        ///
15162        /// This is a **required** field for requests.
15163        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
15164        where
15165            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
15166        {
15167            self.0.request.policy = v.map(|x| x.into());
15168            self
15169        }
15170
15171        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
15172        pub fn set_update_mask<T>(mut self, v: T) -> Self
15173        where
15174            T: std::convert::Into<wkt::FieldMask>,
15175        {
15176            self.0.request.update_mask = std::option::Option::Some(v.into());
15177            self
15178        }
15179
15180        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
15181        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15182        where
15183            T: std::convert::Into<wkt::FieldMask>,
15184        {
15185            self.0.request.update_mask = v.map(|x| x.into());
15186            self
15187        }
15188    }
15189
15190    #[doc(hidden)]
15191    impl crate::RequestBuilder for SetIamPolicy {
15192        fn request_options(&mut self) -> &mut crate::RequestOptions {
15193            &mut self.0.options
15194        }
15195    }
15196
15197    /// The request builder for [DataScanService::get_iam_policy][crate::client::DataScanService::get_iam_policy] calls.
15198    ///
15199    /// # Example
15200    /// ```
15201    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetIamPolicy;
15202    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15203    ///
15204    /// let builder = prepare_request_builder();
15205    /// let response = builder.send().await?;
15206    /// # Ok(()) }
15207    ///
15208    /// fn prepare_request_builder() -> GetIamPolicy {
15209    ///   # panic!();
15210    ///   // ... details omitted ...
15211    /// }
15212    /// ```
15213    #[derive(Clone, Debug)]
15214    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
15215
15216    impl GetIamPolicy {
15217        pub(crate) fn new(
15218            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15219        ) -> Self {
15220            Self(RequestBuilder::new(stub))
15221        }
15222
15223        /// Sets the full request, replacing any prior values.
15224        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
15225            mut self,
15226            v: V,
15227        ) -> Self {
15228            self.0.request = v.into();
15229            self
15230        }
15231
15232        /// Sets all the options, replacing any prior values.
15233        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15234            self.0.options = v.into();
15235            self
15236        }
15237
15238        /// Sends the request.
15239        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
15240            (*self.0.stub)
15241                .get_iam_policy(self.0.request, self.0.options)
15242                .await
15243                .map(crate::Response::into_body)
15244        }
15245
15246        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
15247        ///
15248        /// This is a **required** field for requests.
15249        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
15250            self.0.request.resource = v.into();
15251            self
15252        }
15253
15254        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
15255        pub fn set_options<T>(mut self, v: T) -> Self
15256        where
15257            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
15258        {
15259            self.0.request.options = std::option::Option::Some(v.into());
15260            self
15261        }
15262
15263        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
15264        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
15265        where
15266            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
15267        {
15268            self.0.request.options = v.map(|x| x.into());
15269            self
15270        }
15271    }
15272
15273    #[doc(hidden)]
15274    impl crate::RequestBuilder for GetIamPolicy {
15275        fn request_options(&mut self) -> &mut crate::RequestOptions {
15276            &mut self.0.options
15277        }
15278    }
15279
15280    /// The request builder for [DataScanService::test_iam_permissions][crate::client::DataScanService::test_iam_permissions] calls.
15281    ///
15282    /// # Example
15283    /// ```
15284    /// # use google_cloud_dataplex_v1::builder::data_scan_service::TestIamPermissions;
15285    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15286    ///
15287    /// let builder = prepare_request_builder();
15288    /// let response = builder.send().await?;
15289    /// # Ok(()) }
15290    ///
15291    /// fn prepare_request_builder() -> TestIamPermissions {
15292    ///   # panic!();
15293    ///   // ... details omitted ...
15294    /// }
15295    /// ```
15296    #[derive(Clone, Debug)]
15297    pub struct TestIamPermissions(
15298        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
15299    );
15300
15301    impl TestIamPermissions {
15302        pub(crate) fn new(
15303            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15304        ) -> Self {
15305            Self(RequestBuilder::new(stub))
15306        }
15307
15308        /// Sets the full request, replacing any prior values.
15309        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
15310            mut self,
15311            v: V,
15312        ) -> Self {
15313            self.0.request = v.into();
15314            self
15315        }
15316
15317        /// Sets all the options, replacing any prior values.
15318        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15319            self.0.options = v.into();
15320            self
15321        }
15322
15323        /// Sends the request.
15324        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
15325            (*self.0.stub)
15326                .test_iam_permissions(self.0.request, self.0.options)
15327                .await
15328                .map(crate::Response::into_body)
15329        }
15330
15331        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
15332        ///
15333        /// This is a **required** field for requests.
15334        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
15335            self.0.request.resource = v.into();
15336            self
15337        }
15338
15339        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
15340        ///
15341        /// This is a **required** field for requests.
15342        pub fn set_permissions<T, V>(mut self, v: T) -> Self
15343        where
15344            T: std::iter::IntoIterator<Item = V>,
15345            V: std::convert::Into<std::string::String>,
15346        {
15347            use std::iter::Iterator;
15348            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
15349            self
15350        }
15351    }
15352
15353    #[doc(hidden)]
15354    impl crate::RequestBuilder for TestIamPermissions {
15355        fn request_options(&mut self) -> &mut crate::RequestOptions {
15356            &mut self.0.options
15357        }
15358    }
15359
15360    /// The request builder for [DataScanService::list_operations][crate::client::DataScanService::list_operations] calls.
15361    ///
15362    /// # Example
15363    /// ```
15364    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListOperations;
15365    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15366    /// use google_cloud_gax::paginator::ItemPaginator;
15367    ///
15368    /// let builder = prepare_request_builder();
15369    /// let mut items = builder.by_item();
15370    /// while let Some(result) = items.next().await {
15371    ///   let item = result?;
15372    /// }
15373    /// # Ok(()) }
15374    ///
15375    /// fn prepare_request_builder() -> ListOperations {
15376    ///   # panic!();
15377    ///   // ... details omitted ...
15378    /// }
15379    /// ```
15380    #[derive(Clone, Debug)]
15381    pub struct ListOperations(
15382        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
15383    );
15384
15385    impl ListOperations {
15386        pub(crate) fn new(
15387            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15388        ) -> Self {
15389            Self(RequestBuilder::new(stub))
15390        }
15391
15392        /// Sets the full request, replacing any prior values.
15393        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
15394            mut self,
15395            v: V,
15396        ) -> Self {
15397            self.0.request = v.into();
15398            self
15399        }
15400
15401        /// Sets all the options, replacing any prior values.
15402        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15403            self.0.options = v.into();
15404            self
15405        }
15406
15407        /// Sends the request.
15408        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
15409            (*self.0.stub)
15410                .list_operations(self.0.request, self.0.options)
15411                .await
15412                .map(crate::Response::into_body)
15413        }
15414
15415        /// Streams each page in the collection.
15416        pub fn by_page(
15417            self,
15418        ) -> impl google_cloud_gax::paginator::Paginator<
15419            google_cloud_longrunning::model::ListOperationsResponse,
15420            crate::Error,
15421        > {
15422            use std::clone::Clone;
15423            let token = self.0.request.page_token.clone();
15424            let execute = move |token: String| {
15425                let mut builder = self.clone();
15426                builder.0.request = builder.0.request.set_page_token(token);
15427                builder.send()
15428            };
15429            google_cloud_gax::paginator::internal::new_paginator(token, execute)
15430        }
15431
15432        /// Streams each item in the collection.
15433        pub fn by_item(
15434            self,
15435        ) -> impl google_cloud_gax::paginator::ItemPaginator<
15436            google_cloud_longrunning::model::ListOperationsResponse,
15437            crate::Error,
15438        > {
15439            use google_cloud_gax::paginator::Paginator;
15440            self.by_page().items()
15441        }
15442
15443        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
15444        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15445            self.0.request.name = v.into();
15446            self
15447        }
15448
15449        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
15450        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15451            self.0.request.filter = v.into();
15452            self
15453        }
15454
15455        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
15456        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15457            self.0.request.page_size = v.into();
15458            self
15459        }
15460
15461        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
15462        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15463            self.0.request.page_token = v.into();
15464            self
15465        }
15466
15467        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
15468        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
15469            self.0.request.return_partial_success = v.into();
15470            self
15471        }
15472    }
15473
15474    #[doc(hidden)]
15475    impl crate::RequestBuilder for ListOperations {
15476        fn request_options(&mut self) -> &mut crate::RequestOptions {
15477            &mut self.0.options
15478        }
15479    }
15480
15481    /// The request builder for [DataScanService::get_operation][crate::client::DataScanService::get_operation] calls.
15482    ///
15483    /// # Example
15484    /// ```
15485    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetOperation;
15486    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15487    ///
15488    /// let builder = prepare_request_builder();
15489    /// let response = builder.send().await?;
15490    /// # Ok(()) }
15491    ///
15492    /// fn prepare_request_builder() -> GetOperation {
15493    ///   # panic!();
15494    ///   // ... details omitted ...
15495    /// }
15496    /// ```
15497    #[derive(Clone, Debug)]
15498    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
15499
15500    impl GetOperation {
15501        pub(crate) fn new(
15502            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15503        ) -> Self {
15504            Self(RequestBuilder::new(stub))
15505        }
15506
15507        /// Sets the full request, replacing any prior values.
15508        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
15509            mut self,
15510            v: V,
15511        ) -> Self {
15512            self.0.request = v.into();
15513            self
15514        }
15515
15516        /// Sets all the options, replacing any prior values.
15517        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15518            self.0.options = v.into();
15519            self
15520        }
15521
15522        /// Sends the request.
15523        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
15524            (*self.0.stub)
15525                .get_operation(self.0.request, self.0.options)
15526                .await
15527                .map(crate::Response::into_body)
15528        }
15529
15530        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
15531        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15532            self.0.request.name = v.into();
15533            self
15534        }
15535    }
15536
15537    #[doc(hidden)]
15538    impl crate::RequestBuilder for GetOperation {
15539        fn request_options(&mut self) -> &mut crate::RequestOptions {
15540            &mut self.0.options
15541        }
15542    }
15543
15544    /// The request builder for [DataScanService::delete_operation][crate::client::DataScanService::delete_operation] calls.
15545    ///
15546    /// # Example
15547    /// ```
15548    /// # use google_cloud_dataplex_v1::builder::data_scan_service::DeleteOperation;
15549    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15550    ///
15551    /// let builder = prepare_request_builder();
15552    /// let response = builder.send().await?;
15553    /// # Ok(()) }
15554    ///
15555    /// fn prepare_request_builder() -> DeleteOperation {
15556    ///   # panic!();
15557    ///   // ... details omitted ...
15558    /// }
15559    /// ```
15560    #[derive(Clone, Debug)]
15561    pub struct DeleteOperation(
15562        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
15563    );
15564
15565    impl DeleteOperation {
15566        pub(crate) fn new(
15567            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15568        ) -> Self {
15569            Self(RequestBuilder::new(stub))
15570        }
15571
15572        /// Sets the full request, replacing any prior values.
15573        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
15574            mut self,
15575            v: V,
15576        ) -> Self {
15577            self.0.request = v.into();
15578            self
15579        }
15580
15581        /// Sets all the options, replacing any prior values.
15582        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15583            self.0.options = v.into();
15584            self
15585        }
15586
15587        /// Sends the request.
15588        pub async fn send(self) -> Result<()> {
15589            (*self.0.stub)
15590                .delete_operation(self.0.request, self.0.options)
15591                .await
15592                .map(crate::Response::into_body)
15593        }
15594
15595        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
15596        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15597            self.0.request.name = v.into();
15598            self
15599        }
15600    }
15601
15602    #[doc(hidden)]
15603    impl crate::RequestBuilder for DeleteOperation {
15604        fn request_options(&mut self) -> &mut crate::RequestOptions {
15605            &mut self.0.options
15606        }
15607    }
15608
15609    /// The request builder for [DataScanService::cancel_operation][crate::client::DataScanService::cancel_operation] calls.
15610    ///
15611    /// # Example
15612    /// ```
15613    /// # use google_cloud_dataplex_v1::builder::data_scan_service::CancelOperation;
15614    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15615    ///
15616    /// let builder = prepare_request_builder();
15617    /// let response = builder.send().await?;
15618    /// # Ok(()) }
15619    ///
15620    /// fn prepare_request_builder() -> CancelOperation {
15621    ///   # panic!();
15622    ///   // ... details omitted ...
15623    /// }
15624    /// ```
15625    #[derive(Clone, Debug)]
15626    pub struct CancelOperation(
15627        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
15628    );
15629
15630    impl CancelOperation {
15631        pub(crate) fn new(
15632            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15633        ) -> Self {
15634            Self(RequestBuilder::new(stub))
15635        }
15636
15637        /// Sets the full request, replacing any prior values.
15638        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
15639            mut self,
15640            v: V,
15641        ) -> Self {
15642            self.0.request = v.into();
15643            self
15644        }
15645
15646        /// Sets all the options, replacing any prior values.
15647        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15648            self.0.options = v.into();
15649            self
15650        }
15651
15652        /// Sends the request.
15653        pub async fn send(self) -> Result<()> {
15654            (*self.0.stub)
15655                .cancel_operation(self.0.request, self.0.options)
15656                .await
15657                .map(crate::Response::into_body)
15658        }
15659
15660        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
15661        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15662            self.0.request.name = v.into();
15663            self
15664        }
15665    }
15666
15667    #[doc(hidden)]
15668    impl crate::RequestBuilder for CancelOperation {
15669        fn request_options(&mut self) -> &mut crate::RequestOptions {
15670            &mut self.0.options
15671        }
15672    }
15673}
15674
15675pub mod metadata_service {
15676    use crate::Result;
15677
15678    /// A builder for [MetadataService][crate::client::MetadataService].
15679    ///
15680    /// ```
15681    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
15682    /// # use google_cloud_dataplex_v1::*;
15683    /// # use builder::metadata_service::ClientBuilder;
15684    /// # use client::MetadataService;
15685    /// let builder : ClientBuilder = MetadataService::builder();
15686    /// let client = builder
15687    ///     .with_endpoint("https://dataplex.googleapis.com")
15688    ///     .build().await?;
15689    /// # Ok(()) }
15690    /// ```
15691    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
15692
15693    pub(crate) mod client {
15694        use super::super::super::client::MetadataService;
15695        pub struct Factory;
15696        impl crate::ClientFactory for Factory {
15697            type Client = MetadataService;
15698            type Credentials = gaxi::options::Credentials;
15699            async fn build(
15700                self,
15701                config: gaxi::options::ClientConfig,
15702            ) -> crate::ClientBuilderResult<Self::Client> {
15703                Self::Client::new(config).await
15704            }
15705        }
15706    }
15707
15708    /// Common implementation for [crate::client::MetadataService] request builders.
15709    #[derive(Clone, Debug)]
15710    pub(crate) struct RequestBuilder<R: std::default::Default> {
15711        stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
15712        request: R,
15713        options: crate::RequestOptions,
15714    }
15715
15716    impl<R> RequestBuilder<R>
15717    where
15718        R: std::default::Default,
15719    {
15720        pub(crate) fn new(
15721            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
15722        ) -> Self {
15723            Self {
15724                stub,
15725                request: R::default(),
15726                options: crate::RequestOptions::default(),
15727            }
15728        }
15729    }
15730
15731    /// The request builder for [MetadataService::create_entity][crate::client::MetadataService::create_entity] calls.
15732    ///
15733    /// # Example
15734    /// ```
15735    /// # use google_cloud_dataplex_v1::builder::metadata_service::CreateEntity;
15736    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15737    ///
15738    /// let builder = prepare_request_builder();
15739    /// let response = builder.send().await?;
15740    /// # Ok(()) }
15741    ///
15742    /// fn prepare_request_builder() -> CreateEntity {
15743    ///   # panic!();
15744    ///   // ... details omitted ...
15745    /// }
15746    /// ```
15747    #[derive(Clone, Debug)]
15748    pub struct CreateEntity(RequestBuilder<crate::model::CreateEntityRequest>);
15749
15750    impl CreateEntity {
15751        pub(crate) fn new(
15752            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
15753        ) -> Self {
15754            Self(RequestBuilder::new(stub))
15755        }
15756
15757        /// Sets the full request, replacing any prior values.
15758        pub fn with_request<V: Into<crate::model::CreateEntityRequest>>(mut self, v: V) -> Self {
15759            self.0.request = v.into();
15760            self
15761        }
15762
15763        /// Sets all the options, replacing any prior values.
15764        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15765            self.0.options = v.into();
15766            self
15767        }
15768
15769        /// Sends the request.
15770        pub async fn send(self) -> Result<crate::model::Entity> {
15771            (*self.0.stub)
15772                .create_entity(self.0.request, self.0.options)
15773                .await
15774                .map(crate::Response::into_body)
15775        }
15776
15777        /// Sets the value of [parent][crate::model::CreateEntityRequest::parent].
15778        ///
15779        /// This is a **required** field for requests.
15780        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15781            self.0.request.parent = v.into();
15782            self
15783        }
15784
15785        /// Sets the value of [entity][crate::model::CreateEntityRequest::entity].
15786        ///
15787        /// This is a **required** field for requests.
15788        pub fn set_entity<T>(mut self, v: T) -> Self
15789        where
15790            T: std::convert::Into<crate::model::Entity>,
15791        {
15792            self.0.request.entity = std::option::Option::Some(v.into());
15793            self
15794        }
15795
15796        /// Sets or clears the value of [entity][crate::model::CreateEntityRequest::entity].
15797        ///
15798        /// This is a **required** field for requests.
15799        pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
15800        where
15801            T: std::convert::Into<crate::model::Entity>,
15802        {
15803            self.0.request.entity = v.map(|x| x.into());
15804            self
15805        }
15806
15807        /// Sets the value of [validate_only][crate::model::CreateEntityRequest::validate_only].
15808        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
15809            self.0.request.validate_only = v.into();
15810            self
15811        }
15812    }
15813
15814    #[doc(hidden)]
15815    impl crate::RequestBuilder for CreateEntity {
15816        fn request_options(&mut self) -> &mut crate::RequestOptions {
15817            &mut self.0.options
15818        }
15819    }
15820
15821    /// The request builder for [MetadataService::update_entity][crate::client::MetadataService::update_entity] calls.
15822    ///
15823    /// # Example
15824    /// ```
15825    /// # use google_cloud_dataplex_v1::builder::metadata_service::UpdateEntity;
15826    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15827    ///
15828    /// let builder = prepare_request_builder();
15829    /// let response = builder.send().await?;
15830    /// # Ok(()) }
15831    ///
15832    /// fn prepare_request_builder() -> UpdateEntity {
15833    ///   # panic!();
15834    ///   // ... details omitted ...
15835    /// }
15836    /// ```
15837    #[derive(Clone, Debug)]
15838    pub struct UpdateEntity(RequestBuilder<crate::model::UpdateEntityRequest>);
15839
15840    impl UpdateEntity {
15841        pub(crate) fn new(
15842            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
15843        ) -> Self {
15844            Self(RequestBuilder::new(stub))
15845        }
15846
15847        /// Sets the full request, replacing any prior values.
15848        pub fn with_request<V: Into<crate::model::UpdateEntityRequest>>(mut self, v: V) -> Self {
15849            self.0.request = v.into();
15850            self
15851        }
15852
15853        /// Sets all the options, replacing any prior values.
15854        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15855            self.0.options = v.into();
15856            self
15857        }
15858
15859        /// Sends the request.
15860        pub async fn send(self) -> Result<crate::model::Entity> {
15861            (*self.0.stub)
15862                .update_entity(self.0.request, self.0.options)
15863                .await
15864                .map(crate::Response::into_body)
15865        }
15866
15867        /// Sets the value of [entity][crate::model::UpdateEntityRequest::entity].
15868        ///
15869        /// This is a **required** field for requests.
15870        pub fn set_entity<T>(mut self, v: T) -> Self
15871        where
15872            T: std::convert::Into<crate::model::Entity>,
15873        {
15874            self.0.request.entity = std::option::Option::Some(v.into());
15875            self
15876        }
15877
15878        /// Sets or clears the value of [entity][crate::model::UpdateEntityRequest::entity].
15879        ///
15880        /// This is a **required** field for requests.
15881        pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
15882        where
15883            T: std::convert::Into<crate::model::Entity>,
15884        {
15885            self.0.request.entity = v.map(|x| x.into());
15886            self
15887        }
15888
15889        /// Sets the value of [validate_only][crate::model::UpdateEntityRequest::validate_only].
15890        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
15891            self.0.request.validate_only = v.into();
15892            self
15893        }
15894    }
15895
15896    #[doc(hidden)]
15897    impl crate::RequestBuilder for UpdateEntity {
15898        fn request_options(&mut self) -> &mut crate::RequestOptions {
15899            &mut self.0.options
15900        }
15901    }
15902
15903    /// The request builder for [MetadataService::delete_entity][crate::client::MetadataService::delete_entity] calls.
15904    ///
15905    /// # Example
15906    /// ```
15907    /// # use google_cloud_dataplex_v1::builder::metadata_service::DeleteEntity;
15908    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15909    ///
15910    /// let builder = prepare_request_builder();
15911    /// let response = builder.send().await?;
15912    /// # Ok(()) }
15913    ///
15914    /// fn prepare_request_builder() -> DeleteEntity {
15915    ///   # panic!();
15916    ///   // ... details omitted ...
15917    /// }
15918    /// ```
15919    #[derive(Clone, Debug)]
15920    pub struct DeleteEntity(RequestBuilder<crate::model::DeleteEntityRequest>);
15921
15922    impl DeleteEntity {
15923        pub(crate) fn new(
15924            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
15925        ) -> Self {
15926            Self(RequestBuilder::new(stub))
15927        }
15928
15929        /// Sets the full request, replacing any prior values.
15930        pub fn with_request<V: Into<crate::model::DeleteEntityRequest>>(mut self, v: V) -> Self {
15931            self.0.request = v.into();
15932            self
15933        }
15934
15935        /// Sets all the options, replacing any prior values.
15936        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15937            self.0.options = v.into();
15938            self
15939        }
15940
15941        /// Sends the request.
15942        pub async fn send(self) -> Result<()> {
15943            (*self.0.stub)
15944                .delete_entity(self.0.request, self.0.options)
15945                .await
15946                .map(crate::Response::into_body)
15947        }
15948
15949        /// Sets the value of [name][crate::model::DeleteEntityRequest::name].
15950        ///
15951        /// This is a **required** field for requests.
15952        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15953            self.0.request.name = v.into();
15954            self
15955        }
15956
15957        /// Sets the value of [etag][crate::model::DeleteEntityRequest::etag].
15958        ///
15959        /// This is a **required** field for requests.
15960        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
15961            self.0.request.etag = v.into();
15962            self
15963        }
15964    }
15965
15966    #[doc(hidden)]
15967    impl crate::RequestBuilder for DeleteEntity {
15968        fn request_options(&mut self) -> &mut crate::RequestOptions {
15969            &mut self.0.options
15970        }
15971    }
15972
15973    /// The request builder for [MetadataService::get_entity][crate::client::MetadataService::get_entity] calls.
15974    ///
15975    /// # Example
15976    /// ```
15977    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetEntity;
15978    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15979    ///
15980    /// let builder = prepare_request_builder();
15981    /// let response = builder.send().await?;
15982    /// # Ok(()) }
15983    ///
15984    /// fn prepare_request_builder() -> GetEntity {
15985    ///   # panic!();
15986    ///   // ... details omitted ...
15987    /// }
15988    /// ```
15989    #[derive(Clone, Debug)]
15990    pub struct GetEntity(RequestBuilder<crate::model::GetEntityRequest>);
15991
15992    impl GetEntity {
15993        pub(crate) fn new(
15994            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
15995        ) -> Self {
15996            Self(RequestBuilder::new(stub))
15997        }
15998
15999        /// Sets the full request, replacing any prior values.
16000        pub fn with_request<V: Into<crate::model::GetEntityRequest>>(mut self, v: V) -> Self {
16001            self.0.request = v.into();
16002            self
16003        }
16004
16005        /// Sets all the options, replacing any prior values.
16006        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16007            self.0.options = v.into();
16008            self
16009        }
16010
16011        /// Sends the request.
16012        pub async fn send(self) -> Result<crate::model::Entity> {
16013            (*self.0.stub)
16014                .get_entity(self.0.request, self.0.options)
16015                .await
16016                .map(crate::Response::into_body)
16017        }
16018
16019        /// Sets the value of [name][crate::model::GetEntityRequest::name].
16020        ///
16021        /// This is a **required** field for requests.
16022        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16023            self.0.request.name = v.into();
16024            self
16025        }
16026
16027        /// Sets the value of [view][crate::model::GetEntityRequest::view].
16028        pub fn set_view<T: Into<crate::model::get_entity_request::EntityView>>(
16029            mut self,
16030            v: T,
16031        ) -> Self {
16032            self.0.request.view = v.into();
16033            self
16034        }
16035    }
16036
16037    #[doc(hidden)]
16038    impl crate::RequestBuilder for GetEntity {
16039        fn request_options(&mut self) -> &mut crate::RequestOptions {
16040            &mut self.0.options
16041        }
16042    }
16043
16044    /// The request builder for [MetadataService::list_entities][crate::client::MetadataService::list_entities] calls.
16045    ///
16046    /// # Example
16047    /// ```
16048    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListEntities;
16049    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16050    /// use google_cloud_gax::paginator::ItemPaginator;
16051    ///
16052    /// let builder = prepare_request_builder();
16053    /// let mut items = builder.by_item();
16054    /// while let Some(result) = items.next().await {
16055    ///   let item = result?;
16056    /// }
16057    /// # Ok(()) }
16058    ///
16059    /// fn prepare_request_builder() -> ListEntities {
16060    ///   # panic!();
16061    ///   // ... details omitted ...
16062    /// }
16063    /// ```
16064    #[derive(Clone, Debug)]
16065    pub struct ListEntities(RequestBuilder<crate::model::ListEntitiesRequest>);
16066
16067    impl ListEntities {
16068        pub(crate) fn new(
16069            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16070        ) -> Self {
16071            Self(RequestBuilder::new(stub))
16072        }
16073
16074        /// Sets the full request, replacing any prior values.
16075        pub fn with_request<V: Into<crate::model::ListEntitiesRequest>>(mut self, v: V) -> Self {
16076            self.0.request = v.into();
16077            self
16078        }
16079
16080        /// Sets all the options, replacing any prior values.
16081        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16082            self.0.options = v.into();
16083            self
16084        }
16085
16086        /// Sends the request.
16087        pub async fn send(self) -> Result<crate::model::ListEntitiesResponse> {
16088            (*self.0.stub)
16089                .list_entities(self.0.request, self.0.options)
16090                .await
16091                .map(crate::Response::into_body)
16092        }
16093
16094        /// Streams each page in the collection.
16095        pub fn by_page(
16096            self,
16097        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListEntitiesResponse, crate::Error>
16098        {
16099            use std::clone::Clone;
16100            let token = self.0.request.page_token.clone();
16101            let execute = move |token: String| {
16102                let mut builder = self.clone();
16103                builder.0.request = builder.0.request.set_page_token(token);
16104                builder.send()
16105            };
16106            google_cloud_gax::paginator::internal::new_paginator(token, execute)
16107        }
16108
16109        /// Streams each item in the collection.
16110        pub fn by_item(
16111            self,
16112        ) -> impl google_cloud_gax::paginator::ItemPaginator<
16113            crate::model::ListEntitiesResponse,
16114            crate::Error,
16115        > {
16116            use google_cloud_gax::paginator::Paginator;
16117            self.by_page().items()
16118        }
16119
16120        /// Sets the value of [parent][crate::model::ListEntitiesRequest::parent].
16121        ///
16122        /// This is a **required** field for requests.
16123        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16124            self.0.request.parent = v.into();
16125            self
16126        }
16127
16128        /// Sets the value of [view][crate::model::ListEntitiesRequest::view].
16129        ///
16130        /// This is a **required** field for requests.
16131        pub fn set_view<T: Into<crate::model::list_entities_request::EntityView>>(
16132            mut self,
16133            v: T,
16134        ) -> Self {
16135            self.0.request.view = v.into();
16136            self
16137        }
16138
16139        /// Sets the value of [page_size][crate::model::ListEntitiesRequest::page_size].
16140        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16141            self.0.request.page_size = v.into();
16142            self
16143        }
16144
16145        /// Sets the value of [page_token][crate::model::ListEntitiesRequest::page_token].
16146        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16147            self.0.request.page_token = v.into();
16148            self
16149        }
16150
16151        /// Sets the value of [filter][crate::model::ListEntitiesRequest::filter].
16152        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16153            self.0.request.filter = v.into();
16154            self
16155        }
16156    }
16157
16158    #[doc(hidden)]
16159    impl crate::RequestBuilder for ListEntities {
16160        fn request_options(&mut self) -> &mut crate::RequestOptions {
16161            &mut self.0.options
16162        }
16163    }
16164
16165    /// The request builder for [MetadataService::create_partition][crate::client::MetadataService::create_partition] calls.
16166    ///
16167    /// # Example
16168    /// ```
16169    /// # use google_cloud_dataplex_v1::builder::metadata_service::CreatePartition;
16170    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16171    ///
16172    /// let builder = prepare_request_builder();
16173    /// let response = builder.send().await?;
16174    /// # Ok(()) }
16175    ///
16176    /// fn prepare_request_builder() -> CreatePartition {
16177    ///   # panic!();
16178    ///   // ... details omitted ...
16179    /// }
16180    /// ```
16181    #[derive(Clone, Debug)]
16182    pub struct CreatePartition(RequestBuilder<crate::model::CreatePartitionRequest>);
16183
16184    impl CreatePartition {
16185        pub(crate) fn new(
16186            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16187        ) -> Self {
16188            Self(RequestBuilder::new(stub))
16189        }
16190
16191        /// Sets the full request, replacing any prior values.
16192        pub fn with_request<V: Into<crate::model::CreatePartitionRequest>>(mut self, v: V) -> Self {
16193            self.0.request = v.into();
16194            self
16195        }
16196
16197        /// Sets all the options, replacing any prior values.
16198        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16199            self.0.options = v.into();
16200            self
16201        }
16202
16203        /// Sends the request.
16204        pub async fn send(self) -> Result<crate::model::Partition> {
16205            (*self.0.stub)
16206                .create_partition(self.0.request, self.0.options)
16207                .await
16208                .map(crate::Response::into_body)
16209        }
16210
16211        /// Sets the value of [parent][crate::model::CreatePartitionRequest::parent].
16212        ///
16213        /// This is a **required** field for requests.
16214        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16215            self.0.request.parent = v.into();
16216            self
16217        }
16218
16219        /// Sets the value of [partition][crate::model::CreatePartitionRequest::partition].
16220        ///
16221        /// This is a **required** field for requests.
16222        pub fn set_partition<T>(mut self, v: T) -> Self
16223        where
16224            T: std::convert::Into<crate::model::Partition>,
16225        {
16226            self.0.request.partition = std::option::Option::Some(v.into());
16227            self
16228        }
16229
16230        /// Sets or clears the value of [partition][crate::model::CreatePartitionRequest::partition].
16231        ///
16232        /// This is a **required** field for requests.
16233        pub fn set_or_clear_partition<T>(mut self, v: std::option::Option<T>) -> Self
16234        where
16235            T: std::convert::Into<crate::model::Partition>,
16236        {
16237            self.0.request.partition = v.map(|x| x.into());
16238            self
16239        }
16240
16241        /// Sets the value of [validate_only][crate::model::CreatePartitionRequest::validate_only].
16242        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16243            self.0.request.validate_only = v.into();
16244            self
16245        }
16246    }
16247
16248    #[doc(hidden)]
16249    impl crate::RequestBuilder for CreatePartition {
16250        fn request_options(&mut self) -> &mut crate::RequestOptions {
16251            &mut self.0.options
16252        }
16253    }
16254
16255    /// The request builder for [MetadataService::delete_partition][crate::client::MetadataService::delete_partition] calls.
16256    ///
16257    /// # Example
16258    /// ```
16259    /// # use google_cloud_dataplex_v1::builder::metadata_service::DeletePartition;
16260    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16261    ///
16262    /// let builder = prepare_request_builder();
16263    /// let response = builder.send().await?;
16264    /// # Ok(()) }
16265    ///
16266    /// fn prepare_request_builder() -> DeletePartition {
16267    ///   # panic!();
16268    ///   // ... details omitted ...
16269    /// }
16270    /// ```
16271    #[derive(Clone, Debug)]
16272    pub struct DeletePartition(RequestBuilder<crate::model::DeletePartitionRequest>);
16273
16274    impl DeletePartition {
16275        pub(crate) fn new(
16276            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16277        ) -> Self {
16278            Self(RequestBuilder::new(stub))
16279        }
16280
16281        /// Sets the full request, replacing any prior values.
16282        pub fn with_request<V: Into<crate::model::DeletePartitionRequest>>(mut self, v: V) -> Self {
16283            self.0.request = v.into();
16284            self
16285        }
16286
16287        /// Sets all the options, replacing any prior values.
16288        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16289            self.0.options = v.into();
16290            self
16291        }
16292
16293        /// Sends the request.
16294        pub async fn send(self) -> Result<()> {
16295            (*self.0.stub)
16296                .delete_partition(self.0.request, self.0.options)
16297                .await
16298                .map(crate::Response::into_body)
16299        }
16300
16301        /// Sets the value of [name][crate::model::DeletePartitionRequest::name].
16302        ///
16303        /// This is a **required** field for requests.
16304        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16305            self.0.request.name = v.into();
16306            self
16307        }
16308
16309        /// Sets the value of [etag][crate::model::DeletePartitionRequest::etag].
16310        #[deprecated]
16311        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
16312            self.0.request.etag = v.into();
16313            self
16314        }
16315    }
16316
16317    #[doc(hidden)]
16318    impl crate::RequestBuilder for DeletePartition {
16319        fn request_options(&mut self) -> &mut crate::RequestOptions {
16320            &mut self.0.options
16321        }
16322    }
16323
16324    /// The request builder for [MetadataService::get_partition][crate::client::MetadataService::get_partition] calls.
16325    ///
16326    /// # Example
16327    /// ```
16328    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetPartition;
16329    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16330    ///
16331    /// let builder = prepare_request_builder();
16332    /// let response = builder.send().await?;
16333    /// # Ok(()) }
16334    ///
16335    /// fn prepare_request_builder() -> GetPartition {
16336    ///   # panic!();
16337    ///   // ... details omitted ...
16338    /// }
16339    /// ```
16340    #[derive(Clone, Debug)]
16341    pub struct GetPartition(RequestBuilder<crate::model::GetPartitionRequest>);
16342
16343    impl GetPartition {
16344        pub(crate) fn new(
16345            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16346        ) -> Self {
16347            Self(RequestBuilder::new(stub))
16348        }
16349
16350        /// Sets the full request, replacing any prior values.
16351        pub fn with_request<V: Into<crate::model::GetPartitionRequest>>(mut self, v: V) -> Self {
16352            self.0.request = v.into();
16353            self
16354        }
16355
16356        /// Sets all the options, replacing any prior values.
16357        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16358            self.0.options = v.into();
16359            self
16360        }
16361
16362        /// Sends the request.
16363        pub async fn send(self) -> Result<crate::model::Partition> {
16364            (*self.0.stub)
16365                .get_partition(self.0.request, self.0.options)
16366                .await
16367                .map(crate::Response::into_body)
16368        }
16369
16370        /// Sets the value of [name][crate::model::GetPartitionRequest::name].
16371        ///
16372        /// This is a **required** field for requests.
16373        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16374            self.0.request.name = v.into();
16375            self
16376        }
16377    }
16378
16379    #[doc(hidden)]
16380    impl crate::RequestBuilder for GetPartition {
16381        fn request_options(&mut self) -> &mut crate::RequestOptions {
16382            &mut self.0.options
16383        }
16384    }
16385
16386    /// The request builder for [MetadataService::list_partitions][crate::client::MetadataService::list_partitions] calls.
16387    ///
16388    /// # Example
16389    /// ```
16390    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListPartitions;
16391    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16392    /// use google_cloud_gax::paginator::ItemPaginator;
16393    ///
16394    /// let builder = prepare_request_builder();
16395    /// let mut items = builder.by_item();
16396    /// while let Some(result) = items.next().await {
16397    ///   let item = result?;
16398    /// }
16399    /// # Ok(()) }
16400    ///
16401    /// fn prepare_request_builder() -> ListPartitions {
16402    ///   # panic!();
16403    ///   // ... details omitted ...
16404    /// }
16405    /// ```
16406    #[derive(Clone, Debug)]
16407    pub struct ListPartitions(RequestBuilder<crate::model::ListPartitionsRequest>);
16408
16409    impl ListPartitions {
16410        pub(crate) fn new(
16411            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16412        ) -> Self {
16413            Self(RequestBuilder::new(stub))
16414        }
16415
16416        /// Sets the full request, replacing any prior values.
16417        pub fn with_request<V: Into<crate::model::ListPartitionsRequest>>(mut self, v: V) -> Self {
16418            self.0.request = v.into();
16419            self
16420        }
16421
16422        /// Sets all the options, replacing any prior values.
16423        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16424            self.0.options = v.into();
16425            self
16426        }
16427
16428        /// Sends the request.
16429        pub async fn send(self) -> Result<crate::model::ListPartitionsResponse> {
16430            (*self.0.stub)
16431                .list_partitions(self.0.request, self.0.options)
16432                .await
16433                .map(crate::Response::into_body)
16434        }
16435
16436        /// Streams each page in the collection.
16437        pub fn by_page(
16438            self,
16439        ) -> impl google_cloud_gax::paginator::Paginator<
16440            crate::model::ListPartitionsResponse,
16441            crate::Error,
16442        > {
16443            use std::clone::Clone;
16444            let token = self.0.request.page_token.clone();
16445            let execute = move |token: String| {
16446                let mut builder = self.clone();
16447                builder.0.request = builder.0.request.set_page_token(token);
16448                builder.send()
16449            };
16450            google_cloud_gax::paginator::internal::new_paginator(token, execute)
16451        }
16452
16453        /// Streams each item in the collection.
16454        pub fn by_item(
16455            self,
16456        ) -> impl google_cloud_gax::paginator::ItemPaginator<
16457            crate::model::ListPartitionsResponse,
16458            crate::Error,
16459        > {
16460            use google_cloud_gax::paginator::Paginator;
16461            self.by_page().items()
16462        }
16463
16464        /// Sets the value of [parent][crate::model::ListPartitionsRequest::parent].
16465        ///
16466        /// This is a **required** field for requests.
16467        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16468            self.0.request.parent = v.into();
16469            self
16470        }
16471
16472        /// Sets the value of [page_size][crate::model::ListPartitionsRequest::page_size].
16473        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16474            self.0.request.page_size = v.into();
16475            self
16476        }
16477
16478        /// Sets the value of [page_token][crate::model::ListPartitionsRequest::page_token].
16479        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16480            self.0.request.page_token = v.into();
16481            self
16482        }
16483
16484        /// Sets the value of [filter][crate::model::ListPartitionsRequest::filter].
16485        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16486            self.0.request.filter = v.into();
16487            self
16488        }
16489    }
16490
16491    #[doc(hidden)]
16492    impl crate::RequestBuilder for ListPartitions {
16493        fn request_options(&mut self) -> &mut crate::RequestOptions {
16494            &mut self.0.options
16495        }
16496    }
16497
16498    /// The request builder for [MetadataService::list_locations][crate::client::MetadataService::list_locations] calls.
16499    ///
16500    /// # Example
16501    /// ```
16502    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListLocations;
16503    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16504    /// use google_cloud_gax::paginator::ItemPaginator;
16505    ///
16506    /// let builder = prepare_request_builder();
16507    /// let mut items = builder.by_item();
16508    /// while let Some(result) = items.next().await {
16509    ///   let item = result?;
16510    /// }
16511    /// # Ok(()) }
16512    ///
16513    /// fn prepare_request_builder() -> ListLocations {
16514    ///   # panic!();
16515    ///   // ... details omitted ...
16516    /// }
16517    /// ```
16518    #[derive(Clone, Debug)]
16519    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
16520
16521    impl ListLocations {
16522        pub(crate) fn new(
16523            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16524        ) -> Self {
16525            Self(RequestBuilder::new(stub))
16526        }
16527
16528        /// Sets the full request, replacing any prior values.
16529        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
16530            mut self,
16531            v: V,
16532        ) -> Self {
16533            self.0.request = v.into();
16534            self
16535        }
16536
16537        /// Sets all the options, replacing any prior values.
16538        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16539            self.0.options = v.into();
16540            self
16541        }
16542
16543        /// Sends the request.
16544        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
16545            (*self.0.stub)
16546                .list_locations(self.0.request, self.0.options)
16547                .await
16548                .map(crate::Response::into_body)
16549        }
16550
16551        /// Streams each page in the collection.
16552        pub fn by_page(
16553            self,
16554        ) -> impl google_cloud_gax::paginator::Paginator<
16555            google_cloud_location::model::ListLocationsResponse,
16556            crate::Error,
16557        > {
16558            use std::clone::Clone;
16559            let token = self.0.request.page_token.clone();
16560            let execute = move |token: String| {
16561                let mut builder = self.clone();
16562                builder.0.request = builder.0.request.set_page_token(token);
16563                builder.send()
16564            };
16565            google_cloud_gax::paginator::internal::new_paginator(token, execute)
16566        }
16567
16568        /// Streams each item in the collection.
16569        pub fn by_item(
16570            self,
16571        ) -> impl google_cloud_gax::paginator::ItemPaginator<
16572            google_cloud_location::model::ListLocationsResponse,
16573            crate::Error,
16574        > {
16575            use google_cloud_gax::paginator::Paginator;
16576            self.by_page().items()
16577        }
16578
16579        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
16580        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16581            self.0.request.name = v.into();
16582            self
16583        }
16584
16585        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
16586        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16587            self.0.request.filter = v.into();
16588            self
16589        }
16590
16591        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
16592        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16593            self.0.request.page_size = v.into();
16594            self
16595        }
16596
16597        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
16598        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16599            self.0.request.page_token = v.into();
16600            self
16601        }
16602    }
16603
16604    #[doc(hidden)]
16605    impl crate::RequestBuilder for ListLocations {
16606        fn request_options(&mut self) -> &mut crate::RequestOptions {
16607            &mut self.0.options
16608        }
16609    }
16610
16611    /// The request builder for [MetadataService::get_location][crate::client::MetadataService::get_location] calls.
16612    ///
16613    /// # Example
16614    /// ```
16615    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetLocation;
16616    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16617    ///
16618    /// let builder = prepare_request_builder();
16619    /// let response = builder.send().await?;
16620    /// # Ok(()) }
16621    ///
16622    /// fn prepare_request_builder() -> GetLocation {
16623    ///   # panic!();
16624    ///   // ... details omitted ...
16625    /// }
16626    /// ```
16627    #[derive(Clone, Debug)]
16628    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
16629
16630    impl GetLocation {
16631        pub(crate) fn new(
16632            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16633        ) -> Self {
16634            Self(RequestBuilder::new(stub))
16635        }
16636
16637        /// Sets the full request, replacing any prior values.
16638        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
16639            mut self,
16640            v: V,
16641        ) -> Self {
16642            self.0.request = v.into();
16643            self
16644        }
16645
16646        /// Sets all the options, replacing any prior values.
16647        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16648            self.0.options = v.into();
16649            self
16650        }
16651
16652        /// Sends the request.
16653        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
16654            (*self.0.stub)
16655                .get_location(self.0.request, self.0.options)
16656                .await
16657                .map(crate::Response::into_body)
16658        }
16659
16660        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
16661        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16662            self.0.request.name = v.into();
16663            self
16664        }
16665    }
16666
16667    #[doc(hidden)]
16668    impl crate::RequestBuilder for GetLocation {
16669        fn request_options(&mut self) -> &mut crate::RequestOptions {
16670            &mut self.0.options
16671        }
16672    }
16673
16674    /// The request builder for [MetadataService::set_iam_policy][crate::client::MetadataService::set_iam_policy] calls.
16675    ///
16676    /// # Example
16677    /// ```
16678    /// # use google_cloud_dataplex_v1::builder::metadata_service::SetIamPolicy;
16679    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16680    ///
16681    /// let builder = prepare_request_builder();
16682    /// let response = builder.send().await?;
16683    /// # Ok(()) }
16684    ///
16685    /// fn prepare_request_builder() -> SetIamPolicy {
16686    ///   # panic!();
16687    ///   // ... details omitted ...
16688    /// }
16689    /// ```
16690    #[derive(Clone, Debug)]
16691    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
16692
16693    impl SetIamPolicy {
16694        pub(crate) fn new(
16695            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16696        ) -> Self {
16697            Self(RequestBuilder::new(stub))
16698        }
16699
16700        /// Sets the full request, replacing any prior values.
16701        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
16702            mut self,
16703            v: V,
16704        ) -> Self {
16705            self.0.request = v.into();
16706            self
16707        }
16708
16709        /// Sets all the options, replacing any prior values.
16710        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16711            self.0.options = v.into();
16712            self
16713        }
16714
16715        /// Sends the request.
16716        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
16717            (*self.0.stub)
16718                .set_iam_policy(self.0.request, self.0.options)
16719                .await
16720                .map(crate::Response::into_body)
16721        }
16722
16723        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
16724        ///
16725        /// This is a **required** field for requests.
16726        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
16727            self.0.request.resource = v.into();
16728            self
16729        }
16730
16731        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
16732        ///
16733        /// This is a **required** field for requests.
16734        pub fn set_policy<T>(mut self, v: T) -> Self
16735        where
16736            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
16737        {
16738            self.0.request.policy = std::option::Option::Some(v.into());
16739            self
16740        }
16741
16742        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
16743        ///
16744        /// This is a **required** field for requests.
16745        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
16746        where
16747            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
16748        {
16749            self.0.request.policy = v.map(|x| x.into());
16750            self
16751        }
16752
16753        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
16754        pub fn set_update_mask<T>(mut self, v: T) -> Self
16755        where
16756            T: std::convert::Into<wkt::FieldMask>,
16757        {
16758            self.0.request.update_mask = std::option::Option::Some(v.into());
16759            self
16760        }
16761
16762        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
16763        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
16764        where
16765            T: std::convert::Into<wkt::FieldMask>,
16766        {
16767            self.0.request.update_mask = v.map(|x| x.into());
16768            self
16769        }
16770    }
16771
16772    #[doc(hidden)]
16773    impl crate::RequestBuilder for SetIamPolicy {
16774        fn request_options(&mut self) -> &mut crate::RequestOptions {
16775            &mut self.0.options
16776        }
16777    }
16778
16779    /// The request builder for [MetadataService::get_iam_policy][crate::client::MetadataService::get_iam_policy] calls.
16780    ///
16781    /// # Example
16782    /// ```
16783    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetIamPolicy;
16784    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16785    ///
16786    /// let builder = prepare_request_builder();
16787    /// let response = builder.send().await?;
16788    /// # Ok(()) }
16789    ///
16790    /// fn prepare_request_builder() -> GetIamPolicy {
16791    ///   # panic!();
16792    ///   // ... details omitted ...
16793    /// }
16794    /// ```
16795    #[derive(Clone, Debug)]
16796    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
16797
16798    impl GetIamPolicy {
16799        pub(crate) fn new(
16800            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16801        ) -> Self {
16802            Self(RequestBuilder::new(stub))
16803        }
16804
16805        /// Sets the full request, replacing any prior values.
16806        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
16807            mut self,
16808            v: V,
16809        ) -> Self {
16810            self.0.request = v.into();
16811            self
16812        }
16813
16814        /// Sets all the options, replacing any prior values.
16815        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16816            self.0.options = v.into();
16817            self
16818        }
16819
16820        /// Sends the request.
16821        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
16822            (*self.0.stub)
16823                .get_iam_policy(self.0.request, self.0.options)
16824                .await
16825                .map(crate::Response::into_body)
16826        }
16827
16828        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
16829        ///
16830        /// This is a **required** field for requests.
16831        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
16832            self.0.request.resource = v.into();
16833            self
16834        }
16835
16836        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
16837        pub fn set_options<T>(mut self, v: T) -> Self
16838        where
16839            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
16840        {
16841            self.0.request.options = std::option::Option::Some(v.into());
16842            self
16843        }
16844
16845        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
16846        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
16847        where
16848            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
16849        {
16850            self.0.request.options = v.map(|x| x.into());
16851            self
16852        }
16853    }
16854
16855    #[doc(hidden)]
16856    impl crate::RequestBuilder for GetIamPolicy {
16857        fn request_options(&mut self) -> &mut crate::RequestOptions {
16858            &mut self.0.options
16859        }
16860    }
16861
16862    /// The request builder for [MetadataService::test_iam_permissions][crate::client::MetadataService::test_iam_permissions] calls.
16863    ///
16864    /// # Example
16865    /// ```
16866    /// # use google_cloud_dataplex_v1::builder::metadata_service::TestIamPermissions;
16867    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16868    ///
16869    /// let builder = prepare_request_builder();
16870    /// let response = builder.send().await?;
16871    /// # Ok(()) }
16872    ///
16873    /// fn prepare_request_builder() -> TestIamPermissions {
16874    ///   # panic!();
16875    ///   // ... details omitted ...
16876    /// }
16877    /// ```
16878    #[derive(Clone, Debug)]
16879    pub struct TestIamPermissions(
16880        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
16881    );
16882
16883    impl TestIamPermissions {
16884        pub(crate) fn new(
16885            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16886        ) -> Self {
16887            Self(RequestBuilder::new(stub))
16888        }
16889
16890        /// Sets the full request, replacing any prior values.
16891        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
16892            mut self,
16893            v: V,
16894        ) -> Self {
16895            self.0.request = v.into();
16896            self
16897        }
16898
16899        /// Sets all the options, replacing any prior values.
16900        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16901            self.0.options = v.into();
16902            self
16903        }
16904
16905        /// Sends the request.
16906        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
16907            (*self.0.stub)
16908                .test_iam_permissions(self.0.request, self.0.options)
16909                .await
16910                .map(crate::Response::into_body)
16911        }
16912
16913        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
16914        ///
16915        /// This is a **required** field for requests.
16916        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
16917            self.0.request.resource = v.into();
16918            self
16919        }
16920
16921        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
16922        ///
16923        /// This is a **required** field for requests.
16924        pub fn set_permissions<T, V>(mut self, v: T) -> Self
16925        where
16926            T: std::iter::IntoIterator<Item = V>,
16927            V: std::convert::Into<std::string::String>,
16928        {
16929            use std::iter::Iterator;
16930            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
16931            self
16932        }
16933    }
16934
16935    #[doc(hidden)]
16936    impl crate::RequestBuilder for TestIamPermissions {
16937        fn request_options(&mut self) -> &mut crate::RequestOptions {
16938            &mut self.0.options
16939        }
16940    }
16941
16942    /// The request builder for [MetadataService::list_operations][crate::client::MetadataService::list_operations] calls.
16943    ///
16944    /// # Example
16945    /// ```
16946    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListOperations;
16947    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16948    /// use google_cloud_gax::paginator::ItemPaginator;
16949    ///
16950    /// let builder = prepare_request_builder();
16951    /// let mut items = builder.by_item();
16952    /// while let Some(result) = items.next().await {
16953    ///   let item = result?;
16954    /// }
16955    /// # Ok(()) }
16956    ///
16957    /// fn prepare_request_builder() -> ListOperations {
16958    ///   # panic!();
16959    ///   // ... details omitted ...
16960    /// }
16961    /// ```
16962    #[derive(Clone, Debug)]
16963    pub struct ListOperations(
16964        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
16965    );
16966
16967    impl ListOperations {
16968        pub(crate) fn new(
16969            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16970        ) -> Self {
16971            Self(RequestBuilder::new(stub))
16972        }
16973
16974        /// Sets the full request, replacing any prior values.
16975        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
16976            mut self,
16977            v: V,
16978        ) -> Self {
16979            self.0.request = v.into();
16980            self
16981        }
16982
16983        /// Sets all the options, replacing any prior values.
16984        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16985            self.0.options = v.into();
16986            self
16987        }
16988
16989        /// Sends the request.
16990        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
16991            (*self.0.stub)
16992                .list_operations(self.0.request, self.0.options)
16993                .await
16994                .map(crate::Response::into_body)
16995        }
16996
16997        /// Streams each page in the collection.
16998        pub fn by_page(
16999            self,
17000        ) -> impl google_cloud_gax::paginator::Paginator<
17001            google_cloud_longrunning::model::ListOperationsResponse,
17002            crate::Error,
17003        > {
17004            use std::clone::Clone;
17005            let token = self.0.request.page_token.clone();
17006            let execute = move |token: String| {
17007                let mut builder = self.clone();
17008                builder.0.request = builder.0.request.set_page_token(token);
17009                builder.send()
17010            };
17011            google_cloud_gax::paginator::internal::new_paginator(token, execute)
17012        }
17013
17014        /// Streams each item in the collection.
17015        pub fn by_item(
17016            self,
17017        ) -> impl google_cloud_gax::paginator::ItemPaginator<
17018            google_cloud_longrunning::model::ListOperationsResponse,
17019            crate::Error,
17020        > {
17021            use google_cloud_gax::paginator::Paginator;
17022            self.by_page().items()
17023        }
17024
17025        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
17026        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17027            self.0.request.name = v.into();
17028            self
17029        }
17030
17031        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
17032        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
17033            self.0.request.filter = v.into();
17034            self
17035        }
17036
17037        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
17038        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17039            self.0.request.page_size = v.into();
17040            self
17041        }
17042
17043        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
17044        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17045            self.0.request.page_token = v.into();
17046            self
17047        }
17048
17049        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
17050        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
17051            self.0.request.return_partial_success = v.into();
17052            self
17053        }
17054    }
17055
17056    #[doc(hidden)]
17057    impl crate::RequestBuilder for ListOperations {
17058        fn request_options(&mut self) -> &mut crate::RequestOptions {
17059            &mut self.0.options
17060        }
17061    }
17062
17063    /// The request builder for [MetadataService::get_operation][crate::client::MetadataService::get_operation] calls.
17064    ///
17065    /// # Example
17066    /// ```
17067    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetOperation;
17068    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17069    ///
17070    /// let builder = prepare_request_builder();
17071    /// let response = builder.send().await?;
17072    /// # Ok(()) }
17073    ///
17074    /// fn prepare_request_builder() -> GetOperation {
17075    ///   # panic!();
17076    ///   // ... details omitted ...
17077    /// }
17078    /// ```
17079    #[derive(Clone, Debug)]
17080    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
17081
17082    impl GetOperation {
17083        pub(crate) fn new(
17084            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17085        ) -> Self {
17086            Self(RequestBuilder::new(stub))
17087        }
17088
17089        /// Sets the full request, replacing any prior values.
17090        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
17091            mut self,
17092            v: V,
17093        ) -> Self {
17094            self.0.request = v.into();
17095            self
17096        }
17097
17098        /// Sets all the options, replacing any prior values.
17099        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17100            self.0.options = v.into();
17101            self
17102        }
17103
17104        /// Sends the request.
17105        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17106            (*self.0.stub)
17107                .get_operation(self.0.request, self.0.options)
17108                .await
17109                .map(crate::Response::into_body)
17110        }
17111
17112        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
17113        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17114            self.0.request.name = v.into();
17115            self
17116        }
17117    }
17118
17119    #[doc(hidden)]
17120    impl crate::RequestBuilder for GetOperation {
17121        fn request_options(&mut self) -> &mut crate::RequestOptions {
17122            &mut self.0.options
17123        }
17124    }
17125
17126    /// The request builder for [MetadataService::delete_operation][crate::client::MetadataService::delete_operation] calls.
17127    ///
17128    /// # Example
17129    /// ```
17130    /// # use google_cloud_dataplex_v1::builder::metadata_service::DeleteOperation;
17131    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17132    ///
17133    /// let builder = prepare_request_builder();
17134    /// let response = builder.send().await?;
17135    /// # Ok(()) }
17136    ///
17137    /// fn prepare_request_builder() -> DeleteOperation {
17138    ///   # panic!();
17139    ///   // ... details omitted ...
17140    /// }
17141    /// ```
17142    #[derive(Clone, Debug)]
17143    pub struct DeleteOperation(
17144        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
17145    );
17146
17147    impl DeleteOperation {
17148        pub(crate) fn new(
17149            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17150        ) -> Self {
17151            Self(RequestBuilder::new(stub))
17152        }
17153
17154        /// Sets the full request, replacing any prior values.
17155        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
17156            mut self,
17157            v: V,
17158        ) -> Self {
17159            self.0.request = v.into();
17160            self
17161        }
17162
17163        /// Sets all the options, replacing any prior values.
17164        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17165            self.0.options = v.into();
17166            self
17167        }
17168
17169        /// Sends the request.
17170        pub async fn send(self) -> Result<()> {
17171            (*self.0.stub)
17172                .delete_operation(self.0.request, self.0.options)
17173                .await
17174                .map(crate::Response::into_body)
17175        }
17176
17177        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
17178        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17179            self.0.request.name = v.into();
17180            self
17181        }
17182    }
17183
17184    #[doc(hidden)]
17185    impl crate::RequestBuilder for DeleteOperation {
17186        fn request_options(&mut self) -> &mut crate::RequestOptions {
17187            &mut self.0.options
17188        }
17189    }
17190
17191    /// The request builder for [MetadataService::cancel_operation][crate::client::MetadataService::cancel_operation] calls.
17192    ///
17193    /// # Example
17194    /// ```
17195    /// # use google_cloud_dataplex_v1::builder::metadata_service::CancelOperation;
17196    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17197    ///
17198    /// let builder = prepare_request_builder();
17199    /// let response = builder.send().await?;
17200    /// # Ok(()) }
17201    ///
17202    /// fn prepare_request_builder() -> CancelOperation {
17203    ///   # panic!();
17204    ///   // ... details omitted ...
17205    /// }
17206    /// ```
17207    #[derive(Clone, Debug)]
17208    pub struct CancelOperation(
17209        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
17210    );
17211
17212    impl CancelOperation {
17213        pub(crate) fn new(
17214            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17215        ) -> Self {
17216            Self(RequestBuilder::new(stub))
17217        }
17218
17219        /// Sets the full request, replacing any prior values.
17220        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
17221            mut self,
17222            v: V,
17223        ) -> Self {
17224            self.0.request = v.into();
17225            self
17226        }
17227
17228        /// Sets all the options, replacing any prior values.
17229        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17230            self.0.options = v.into();
17231            self
17232        }
17233
17234        /// Sends the request.
17235        pub async fn send(self) -> Result<()> {
17236            (*self.0.stub)
17237                .cancel_operation(self.0.request, self.0.options)
17238                .await
17239                .map(crate::Response::into_body)
17240        }
17241
17242        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
17243        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17244            self.0.request.name = v.into();
17245            self
17246        }
17247    }
17248
17249    #[doc(hidden)]
17250    impl crate::RequestBuilder for CancelOperation {
17251        fn request_options(&mut self) -> &mut crate::RequestOptions {
17252            &mut self.0.options
17253        }
17254    }
17255}
17256
17257pub mod dataplex_service {
17258    use crate::Result;
17259
17260    /// A builder for [DataplexService][crate::client::DataplexService].
17261    ///
17262    /// ```
17263    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
17264    /// # use google_cloud_dataplex_v1::*;
17265    /// # use builder::dataplex_service::ClientBuilder;
17266    /// # use client::DataplexService;
17267    /// let builder : ClientBuilder = DataplexService::builder();
17268    /// let client = builder
17269    ///     .with_endpoint("https://dataplex.googleapis.com")
17270    ///     .build().await?;
17271    /// # Ok(()) }
17272    /// ```
17273    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
17274
17275    pub(crate) mod client {
17276        use super::super::super::client::DataplexService;
17277        pub struct Factory;
17278        impl crate::ClientFactory for Factory {
17279            type Client = DataplexService;
17280            type Credentials = gaxi::options::Credentials;
17281            async fn build(
17282                self,
17283                config: gaxi::options::ClientConfig,
17284            ) -> crate::ClientBuilderResult<Self::Client> {
17285                Self::Client::new(config).await
17286            }
17287        }
17288    }
17289
17290    /// Common implementation for [crate::client::DataplexService] request builders.
17291    #[derive(Clone, Debug)]
17292    pub(crate) struct RequestBuilder<R: std::default::Default> {
17293        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17294        request: R,
17295        options: crate::RequestOptions,
17296    }
17297
17298    impl<R> RequestBuilder<R>
17299    where
17300        R: std::default::Default,
17301    {
17302        pub(crate) fn new(
17303            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17304        ) -> Self {
17305            Self {
17306                stub,
17307                request: R::default(),
17308                options: crate::RequestOptions::default(),
17309            }
17310        }
17311    }
17312
17313    /// The request builder for [DataplexService::create_lake][crate::client::DataplexService::create_lake] calls.
17314    ///
17315    /// # Example
17316    /// ```
17317    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateLake;
17318    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17319    /// use google_cloud_lro::Poller;
17320    ///
17321    /// let builder = prepare_request_builder();
17322    /// let response = builder.poller().until_done().await?;
17323    /// # Ok(()) }
17324    ///
17325    /// fn prepare_request_builder() -> CreateLake {
17326    ///   # panic!();
17327    ///   // ... details omitted ...
17328    /// }
17329    /// ```
17330    #[derive(Clone, Debug)]
17331    pub struct CreateLake(RequestBuilder<crate::model::CreateLakeRequest>);
17332
17333    impl CreateLake {
17334        pub(crate) fn new(
17335            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17336        ) -> Self {
17337            Self(RequestBuilder::new(stub))
17338        }
17339
17340        /// Sets the full request, replacing any prior values.
17341        pub fn with_request<V: Into<crate::model::CreateLakeRequest>>(mut self, v: V) -> Self {
17342            self.0.request = v.into();
17343            self
17344        }
17345
17346        /// Sets all the options, replacing any prior values.
17347        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17348            self.0.options = v.into();
17349            self
17350        }
17351
17352        /// Sends the request.
17353        ///
17354        /// # Long running operations
17355        ///
17356        /// This starts, but does not poll, a longrunning operation. More information
17357        /// on [create_lake][crate::client::DataplexService::create_lake].
17358        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17359            (*self.0.stub)
17360                .create_lake(self.0.request, self.0.options)
17361                .await
17362                .map(crate::Response::into_body)
17363        }
17364
17365        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_lake`.
17366        pub fn poller(
17367            self,
17368        ) -> impl google_cloud_lro::Poller<crate::model::Lake, crate::model::OperationMetadata>
17369        {
17370            type Operation = google_cloud_lro::internal::Operation<
17371                crate::model::Lake,
17372                crate::model::OperationMetadata,
17373            >;
17374            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17375            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17376
17377            let stub = self.0.stub.clone();
17378            let mut options = self.0.options.clone();
17379            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
17380            let query = move |name| {
17381                let stub = stub.clone();
17382                let options = options.clone();
17383                async {
17384                    let op = GetOperation::new(stub)
17385                        .set_name(name)
17386                        .with_options(options)
17387                        .send()
17388                        .await?;
17389                    Ok(Operation::new(op))
17390                }
17391            };
17392
17393            let start = move || async {
17394                let op = self.send().await?;
17395                Ok(Operation::new(op))
17396            };
17397
17398            google_cloud_lro::internal::new_poller(
17399                polling_error_policy,
17400                polling_backoff_policy,
17401                start,
17402                query,
17403            )
17404        }
17405
17406        /// Sets the value of [parent][crate::model::CreateLakeRequest::parent].
17407        ///
17408        /// This is a **required** field for requests.
17409        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
17410            self.0.request.parent = v.into();
17411            self
17412        }
17413
17414        /// Sets the value of [lake_id][crate::model::CreateLakeRequest::lake_id].
17415        ///
17416        /// This is a **required** field for requests.
17417        pub fn set_lake_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
17418            self.0.request.lake_id = v.into();
17419            self
17420        }
17421
17422        /// Sets the value of [lake][crate::model::CreateLakeRequest::lake].
17423        ///
17424        /// This is a **required** field for requests.
17425        pub fn set_lake<T>(mut self, v: T) -> Self
17426        where
17427            T: std::convert::Into<crate::model::Lake>,
17428        {
17429            self.0.request.lake = std::option::Option::Some(v.into());
17430            self
17431        }
17432
17433        /// Sets or clears the value of [lake][crate::model::CreateLakeRequest::lake].
17434        ///
17435        /// This is a **required** field for requests.
17436        pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
17437        where
17438            T: std::convert::Into<crate::model::Lake>,
17439        {
17440            self.0.request.lake = v.map(|x| x.into());
17441            self
17442        }
17443
17444        /// Sets the value of [validate_only][crate::model::CreateLakeRequest::validate_only].
17445        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
17446            self.0.request.validate_only = v.into();
17447            self
17448        }
17449    }
17450
17451    #[doc(hidden)]
17452    impl crate::RequestBuilder for CreateLake {
17453        fn request_options(&mut self) -> &mut crate::RequestOptions {
17454            &mut self.0.options
17455        }
17456    }
17457
17458    /// The request builder for [DataplexService::update_lake][crate::client::DataplexService::update_lake] calls.
17459    ///
17460    /// # Example
17461    /// ```
17462    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateLake;
17463    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17464    /// use google_cloud_lro::Poller;
17465    ///
17466    /// let builder = prepare_request_builder();
17467    /// let response = builder.poller().until_done().await?;
17468    /// # Ok(()) }
17469    ///
17470    /// fn prepare_request_builder() -> UpdateLake {
17471    ///   # panic!();
17472    ///   // ... details omitted ...
17473    /// }
17474    /// ```
17475    #[derive(Clone, Debug)]
17476    pub struct UpdateLake(RequestBuilder<crate::model::UpdateLakeRequest>);
17477
17478    impl UpdateLake {
17479        pub(crate) fn new(
17480            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17481        ) -> Self {
17482            Self(RequestBuilder::new(stub))
17483        }
17484
17485        /// Sets the full request, replacing any prior values.
17486        pub fn with_request<V: Into<crate::model::UpdateLakeRequest>>(mut self, v: V) -> Self {
17487            self.0.request = v.into();
17488            self
17489        }
17490
17491        /// Sets all the options, replacing any prior values.
17492        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17493            self.0.options = v.into();
17494            self
17495        }
17496
17497        /// Sends the request.
17498        ///
17499        /// # Long running operations
17500        ///
17501        /// This starts, but does not poll, a longrunning operation. More information
17502        /// on [update_lake][crate::client::DataplexService::update_lake].
17503        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17504            (*self.0.stub)
17505                .update_lake(self.0.request, self.0.options)
17506                .await
17507                .map(crate::Response::into_body)
17508        }
17509
17510        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_lake`.
17511        pub fn poller(
17512            self,
17513        ) -> impl google_cloud_lro::Poller<crate::model::Lake, crate::model::OperationMetadata>
17514        {
17515            type Operation = google_cloud_lro::internal::Operation<
17516                crate::model::Lake,
17517                crate::model::OperationMetadata,
17518            >;
17519            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17520            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17521
17522            let stub = self.0.stub.clone();
17523            let mut options = self.0.options.clone();
17524            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
17525            let query = move |name| {
17526                let stub = stub.clone();
17527                let options = options.clone();
17528                async {
17529                    let op = GetOperation::new(stub)
17530                        .set_name(name)
17531                        .with_options(options)
17532                        .send()
17533                        .await?;
17534                    Ok(Operation::new(op))
17535                }
17536            };
17537
17538            let start = move || async {
17539                let op = self.send().await?;
17540                Ok(Operation::new(op))
17541            };
17542
17543            google_cloud_lro::internal::new_poller(
17544                polling_error_policy,
17545                polling_backoff_policy,
17546                start,
17547                query,
17548            )
17549        }
17550
17551        /// Sets the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
17552        ///
17553        /// This is a **required** field for requests.
17554        pub fn set_update_mask<T>(mut self, v: T) -> Self
17555        where
17556            T: std::convert::Into<wkt::FieldMask>,
17557        {
17558            self.0.request.update_mask = std::option::Option::Some(v.into());
17559            self
17560        }
17561
17562        /// Sets or clears the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
17563        ///
17564        /// This is a **required** field for requests.
17565        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
17566        where
17567            T: std::convert::Into<wkt::FieldMask>,
17568        {
17569            self.0.request.update_mask = v.map(|x| x.into());
17570            self
17571        }
17572
17573        /// Sets the value of [lake][crate::model::UpdateLakeRequest::lake].
17574        ///
17575        /// This is a **required** field for requests.
17576        pub fn set_lake<T>(mut self, v: T) -> Self
17577        where
17578            T: std::convert::Into<crate::model::Lake>,
17579        {
17580            self.0.request.lake = std::option::Option::Some(v.into());
17581            self
17582        }
17583
17584        /// Sets or clears the value of [lake][crate::model::UpdateLakeRequest::lake].
17585        ///
17586        /// This is a **required** field for requests.
17587        pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
17588        where
17589            T: std::convert::Into<crate::model::Lake>,
17590        {
17591            self.0.request.lake = v.map(|x| x.into());
17592            self
17593        }
17594
17595        /// Sets the value of [validate_only][crate::model::UpdateLakeRequest::validate_only].
17596        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
17597            self.0.request.validate_only = v.into();
17598            self
17599        }
17600    }
17601
17602    #[doc(hidden)]
17603    impl crate::RequestBuilder for UpdateLake {
17604        fn request_options(&mut self) -> &mut crate::RequestOptions {
17605            &mut self.0.options
17606        }
17607    }
17608
17609    /// The request builder for [DataplexService::delete_lake][crate::client::DataplexService::delete_lake] calls.
17610    ///
17611    /// # Example
17612    /// ```
17613    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteLake;
17614    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17615    /// use google_cloud_lro::Poller;
17616    ///
17617    /// let builder = prepare_request_builder();
17618    /// let response = builder.poller().until_done().await?;
17619    /// # Ok(()) }
17620    ///
17621    /// fn prepare_request_builder() -> DeleteLake {
17622    ///   # panic!();
17623    ///   // ... details omitted ...
17624    /// }
17625    /// ```
17626    #[derive(Clone, Debug)]
17627    pub struct DeleteLake(RequestBuilder<crate::model::DeleteLakeRequest>);
17628
17629    impl DeleteLake {
17630        pub(crate) fn new(
17631            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17632        ) -> Self {
17633            Self(RequestBuilder::new(stub))
17634        }
17635
17636        /// Sets the full request, replacing any prior values.
17637        pub fn with_request<V: Into<crate::model::DeleteLakeRequest>>(mut self, v: V) -> Self {
17638            self.0.request = v.into();
17639            self
17640        }
17641
17642        /// Sets all the options, replacing any prior values.
17643        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17644            self.0.options = v.into();
17645            self
17646        }
17647
17648        /// Sends the request.
17649        ///
17650        /// # Long running operations
17651        ///
17652        /// This starts, but does not poll, a longrunning operation. More information
17653        /// on [delete_lake][crate::client::DataplexService::delete_lake].
17654        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17655            (*self.0.stub)
17656                .delete_lake(self.0.request, self.0.options)
17657                .await
17658                .map(crate::Response::into_body)
17659        }
17660
17661        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_lake`.
17662        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
17663            type Operation =
17664                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
17665            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17666            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17667
17668            let stub = self.0.stub.clone();
17669            let mut options = self.0.options.clone();
17670            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
17671            let query = move |name| {
17672                let stub = stub.clone();
17673                let options = options.clone();
17674                async {
17675                    let op = GetOperation::new(stub)
17676                        .set_name(name)
17677                        .with_options(options)
17678                        .send()
17679                        .await?;
17680                    Ok(Operation::new(op))
17681                }
17682            };
17683
17684            let start = move || async {
17685                let op = self.send().await?;
17686                Ok(Operation::new(op))
17687            };
17688
17689            google_cloud_lro::internal::new_unit_response_poller(
17690                polling_error_policy,
17691                polling_backoff_policy,
17692                start,
17693                query,
17694            )
17695        }
17696
17697        /// Sets the value of [name][crate::model::DeleteLakeRequest::name].
17698        ///
17699        /// This is a **required** field for requests.
17700        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17701            self.0.request.name = v.into();
17702            self
17703        }
17704    }
17705
17706    #[doc(hidden)]
17707    impl crate::RequestBuilder for DeleteLake {
17708        fn request_options(&mut self) -> &mut crate::RequestOptions {
17709            &mut self.0.options
17710        }
17711    }
17712
17713    /// The request builder for [DataplexService::list_lakes][crate::client::DataplexService::list_lakes] calls.
17714    ///
17715    /// # Example
17716    /// ```
17717    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListLakes;
17718    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17719    /// use google_cloud_gax::paginator::ItemPaginator;
17720    ///
17721    /// let builder = prepare_request_builder();
17722    /// let mut items = builder.by_item();
17723    /// while let Some(result) = items.next().await {
17724    ///   let item = result?;
17725    /// }
17726    /// # Ok(()) }
17727    ///
17728    /// fn prepare_request_builder() -> ListLakes {
17729    ///   # panic!();
17730    ///   // ... details omitted ...
17731    /// }
17732    /// ```
17733    #[derive(Clone, Debug)]
17734    pub struct ListLakes(RequestBuilder<crate::model::ListLakesRequest>);
17735
17736    impl ListLakes {
17737        pub(crate) fn new(
17738            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17739        ) -> Self {
17740            Self(RequestBuilder::new(stub))
17741        }
17742
17743        /// Sets the full request, replacing any prior values.
17744        pub fn with_request<V: Into<crate::model::ListLakesRequest>>(mut self, v: V) -> Self {
17745            self.0.request = v.into();
17746            self
17747        }
17748
17749        /// Sets all the options, replacing any prior values.
17750        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17751            self.0.options = v.into();
17752            self
17753        }
17754
17755        /// Sends the request.
17756        pub async fn send(self) -> Result<crate::model::ListLakesResponse> {
17757            (*self.0.stub)
17758                .list_lakes(self.0.request, self.0.options)
17759                .await
17760                .map(crate::Response::into_body)
17761        }
17762
17763        /// Streams each page in the collection.
17764        pub fn by_page(
17765            self,
17766        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListLakesResponse, crate::Error>
17767        {
17768            use std::clone::Clone;
17769            let token = self.0.request.page_token.clone();
17770            let execute = move |token: String| {
17771                let mut builder = self.clone();
17772                builder.0.request = builder.0.request.set_page_token(token);
17773                builder.send()
17774            };
17775            google_cloud_gax::paginator::internal::new_paginator(token, execute)
17776        }
17777
17778        /// Streams each item in the collection.
17779        pub fn by_item(
17780            self,
17781        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListLakesResponse, crate::Error>
17782        {
17783            use google_cloud_gax::paginator::Paginator;
17784            self.by_page().items()
17785        }
17786
17787        /// Sets the value of [parent][crate::model::ListLakesRequest::parent].
17788        ///
17789        /// This is a **required** field for requests.
17790        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
17791            self.0.request.parent = v.into();
17792            self
17793        }
17794
17795        /// Sets the value of [page_size][crate::model::ListLakesRequest::page_size].
17796        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17797            self.0.request.page_size = v.into();
17798            self
17799        }
17800
17801        /// Sets the value of [page_token][crate::model::ListLakesRequest::page_token].
17802        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17803            self.0.request.page_token = v.into();
17804            self
17805        }
17806
17807        /// Sets the value of [filter][crate::model::ListLakesRequest::filter].
17808        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
17809            self.0.request.filter = v.into();
17810            self
17811        }
17812
17813        /// Sets the value of [order_by][crate::model::ListLakesRequest::order_by].
17814        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
17815            self.0.request.order_by = v.into();
17816            self
17817        }
17818    }
17819
17820    #[doc(hidden)]
17821    impl crate::RequestBuilder for ListLakes {
17822        fn request_options(&mut self) -> &mut crate::RequestOptions {
17823            &mut self.0.options
17824        }
17825    }
17826
17827    /// The request builder for [DataplexService::get_lake][crate::client::DataplexService::get_lake] calls.
17828    ///
17829    /// # Example
17830    /// ```
17831    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetLake;
17832    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17833    ///
17834    /// let builder = prepare_request_builder();
17835    /// let response = builder.send().await?;
17836    /// # Ok(()) }
17837    ///
17838    /// fn prepare_request_builder() -> GetLake {
17839    ///   # panic!();
17840    ///   // ... details omitted ...
17841    /// }
17842    /// ```
17843    #[derive(Clone, Debug)]
17844    pub struct GetLake(RequestBuilder<crate::model::GetLakeRequest>);
17845
17846    impl GetLake {
17847        pub(crate) fn new(
17848            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17849        ) -> Self {
17850            Self(RequestBuilder::new(stub))
17851        }
17852
17853        /// Sets the full request, replacing any prior values.
17854        pub fn with_request<V: Into<crate::model::GetLakeRequest>>(mut self, v: V) -> Self {
17855            self.0.request = v.into();
17856            self
17857        }
17858
17859        /// Sets all the options, replacing any prior values.
17860        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17861            self.0.options = v.into();
17862            self
17863        }
17864
17865        /// Sends the request.
17866        pub async fn send(self) -> Result<crate::model::Lake> {
17867            (*self.0.stub)
17868                .get_lake(self.0.request, self.0.options)
17869                .await
17870                .map(crate::Response::into_body)
17871        }
17872
17873        /// Sets the value of [name][crate::model::GetLakeRequest::name].
17874        ///
17875        /// This is a **required** field for requests.
17876        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17877            self.0.request.name = v.into();
17878            self
17879        }
17880    }
17881
17882    #[doc(hidden)]
17883    impl crate::RequestBuilder for GetLake {
17884        fn request_options(&mut self) -> &mut crate::RequestOptions {
17885            &mut self.0.options
17886        }
17887    }
17888
17889    /// The request builder for [DataplexService::list_lake_actions][crate::client::DataplexService::list_lake_actions] calls.
17890    ///
17891    /// # Example
17892    /// ```
17893    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListLakeActions;
17894    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17895    /// use google_cloud_gax::paginator::ItemPaginator;
17896    ///
17897    /// let builder = prepare_request_builder();
17898    /// let mut items = builder.by_item();
17899    /// while let Some(result) = items.next().await {
17900    ///   let item = result?;
17901    /// }
17902    /// # Ok(()) }
17903    ///
17904    /// fn prepare_request_builder() -> ListLakeActions {
17905    ///   # panic!();
17906    ///   // ... details omitted ...
17907    /// }
17908    /// ```
17909    #[derive(Clone, Debug)]
17910    pub struct ListLakeActions(RequestBuilder<crate::model::ListLakeActionsRequest>);
17911
17912    impl ListLakeActions {
17913        pub(crate) fn new(
17914            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17915        ) -> Self {
17916            Self(RequestBuilder::new(stub))
17917        }
17918
17919        /// Sets the full request, replacing any prior values.
17920        pub fn with_request<V: Into<crate::model::ListLakeActionsRequest>>(mut self, v: V) -> Self {
17921            self.0.request = v.into();
17922            self
17923        }
17924
17925        /// Sets all the options, replacing any prior values.
17926        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17927            self.0.options = v.into();
17928            self
17929        }
17930
17931        /// Sends the request.
17932        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
17933            (*self.0.stub)
17934                .list_lake_actions(self.0.request, self.0.options)
17935                .await
17936                .map(crate::Response::into_body)
17937        }
17938
17939        /// Streams each page in the collection.
17940        pub fn by_page(
17941            self,
17942        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListActionsResponse, crate::Error>
17943        {
17944            use std::clone::Clone;
17945            let token = self.0.request.page_token.clone();
17946            let execute = move |token: String| {
17947                let mut builder = self.clone();
17948                builder.0.request = builder.0.request.set_page_token(token);
17949                builder.send()
17950            };
17951            google_cloud_gax::paginator::internal::new_paginator(token, execute)
17952        }
17953
17954        /// Streams each item in the collection.
17955        pub fn by_item(
17956            self,
17957        ) -> impl google_cloud_gax::paginator::ItemPaginator<
17958            crate::model::ListActionsResponse,
17959            crate::Error,
17960        > {
17961            use google_cloud_gax::paginator::Paginator;
17962            self.by_page().items()
17963        }
17964
17965        /// Sets the value of [parent][crate::model::ListLakeActionsRequest::parent].
17966        ///
17967        /// This is a **required** field for requests.
17968        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
17969            self.0.request.parent = v.into();
17970            self
17971        }
17972
17973        /// Sets the value of [page_size][crate::model::ListLakeActionsRequest::page_size].
17974        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17975            self.0.request.page_size = v.into();
17976            self
17977        }
17978
17979        /// Sets the value of [page_token][crate::model::ListLakeActionsRequest::page_token].
17980        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17981            self.0.request.page_token = v.into();
17982            self
17983        }
17984    }
17985
17986    #[doc(hidden)]
17987    impl crate::RequestBuilder for ListLakeActions {
17988        fn request_options(&mut self) -> &mut crate::RequestOptions {
17989            &mut self.0.options
17990        }
17991    }
17992
17993    /// The request builder for [DataplexService::create_zone][crate::client::DataplexService::create_zone] calls.
17994    ///
17995    /// # Example
17996    /// ```
17997    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateZone;
17998    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17999    /// use google_cloud_lro::Poller;
18000    ///
18001    /// let builder = prepare_request_builder();
18002    /// let response = builder.poller().until_done().await?;
18003    /// # Ok(()) }
18004    ///
18005    /// fn prepare_request_builder() -> CreateZone {
18006    ///   # panic!();
18007    ///   // ... details omitted ...
18008    /// }
18009    /// ```
18010    #[derive(Clone, Debug)]
18011    pub struct CreateZone(RequestBuilder<crate::model::CreateZoneRequest>);
18012
18013    impl CreateZone {
18014        pub(crate) fn new(
18015            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18016        ) -> Self {
18017            Self(RequestBuilder::new(stub))
18018        }
18019
18020        /// Sets the full request, replacing any prior values.
18021        pub fn with_request<V: Into<crate::model::CreateZoneRequest>>(mut self, v: V) -> Self {
18022            self.0.request = v.into();
18023            self
18024        }
18025
18026        /// Sets all the options, replacing any prior values.
18027        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18028            self.0.options = v.into();
18029            self
18030        }
18031
18032        /// Sends the request.
18033        ///
18034        /// # Long running operations
18035        ///
18036        /// This starts, but does not poll, a longrunning operation. More information
18037        /// on [create_zone][crate::client::DataplexService::create_zone].
18038        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18039            (*self.0.stub)
18040                .create_zone(self.0.request, self.0.options)
18041                .await
18042                .map(crate::Response::into_body)
18043        }
18044
18045        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_zone`.
18046        pub fn poller(
18047            self,
18048        ) -> impl google_cloud_lro::Poller<crate::model::Zone, crate::model::OperationMetadata>
18049        {
18050            type Operation = google_cloud_lro::internal::Operation<
18051                crate::model::Zone,
18052                crate::model::OperationMetadata,
18053            >;
18054            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18055            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18056
18057            let stub = self.0.stub.clone();
18058            let mut options = self.0.options.clone();
18059            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18060            let query = move |name| {
18061                let stub = stub.clone();
18062                let options = options.clone();
18063                async {
18064                    let op = GetOperation::new(stub)
18065                        .set_name(name)
18066                        .with_options(options)
18067                        .send()
18068                        .await?;
18069                    Ok(Operation::new(op))
18070                }
18071            };
18072
18073            let start = move || async {
18074                let op = self.send().await?;
18075                Ok(Operation::new(op))
18076            };
18077
18078            google_cloud_lro::internal::new_poller(
18079                polling_error_policy,
18080                polling_backoff_policy,
18081                start,
18082                query,
18083            )
18084        }
18085
18086        /// Sets the value of [parent][crate::model::CreateZoneRequest::parent].
18087        ///
18088        /// This is a **required** field for requests.
18089        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18090            self.0.request.parent = v.into();
18091            self
18092        }
18093
18094        /// Sets the value of [zone_id][crate::model::CreateZoneRequest::zone_id].
18095        ///
18096        /// This is a **required** field for requests.
18097        pub fn set_zone_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
18098            self.0.request.zone_id = v.into();
18099            self
18100        }
18101
18102        /// Sets the value of [zone][crate::model::CreateZoneRequest::zone].
18103        ///
18104        /// This is a **required** field for requests.
18105        pub fn set_zone<T>(mut self, v: T) -> Self
18106        where
18107            T: std::convert::Into<crate::model::Zone>,
18108        {
18109            self.0.request.zone = std::option::Option::Some(v.into());
18110            self
18111        }
18112
18113        /// Sets or clears the value of [zone][crate::model::CreateZoneRequest::zone].
18114        ///
18115        /// This is a **required** field for requests.
18116        pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
18117        where
18118            T: std::convert::Into<crate::model::Zone>,
18119        {
18120            self.0.request.zone = v.map(|x| x.into());
18121            self
18122        }
18123
18124        /// Sets the value of [validate_only][crate::model::CreateZoneRequest::validate_only].
18125        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18126            self.0.request.validate_only = v.into();
18127            self
18128        }
18129    }
18130
18131    #[doc(hidden)]
18132    impl crate::RequestBuilder for CreateZone {
18133        fn request_options(&mut self) -> &mut crate::RequestOptions {
18134            &mut self.0.options
18135        }
18136    }
18137
18138    /// The request builder for [DataplexService::update_zone][crate::client::DataplexService::update_zone] calls.
18139    ///
18140    /// # Example
18141    /// ```
18142    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateZone;
18143    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18144    /// use google_cloud_lro::Poller;
18145    ///
18146    /// let builder = prepare_request_builder();
18147    /// let response = builder.poller().until_done().await?;
18148    /// # Ok(()) }
18149    ///
18150    /// fn prepare_request_builder() -> UpdateZone {
18151    ///   # panic!();
18152    ///   // ... details omitted ...
18153    /// }
18154    /// ```
18155    #[derive(Clone, Debug)]
18156    pub struct UpdateZone(RequestBuilder<crate::model::UpdateZoneRequest>);
18157
18158    impl UpdateZone {
18159        pub(crate) fn new(
18160            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18161        ) -> Self {
18162            Self(RequestBuilder::new(stub))
18163        }
18164
18165        /// Sets the full request, replacing any prior values.
18166        pub fn with_request<V: Into<crate::model::UpdateZoneRequest>>(mut self, v: V) -> Self {
18167            self.0.request = v.into();
18168            self
18169        }
18170
18171        /// Sets all the options, replacing any prior values.
18172        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18173            self.0.options = v.into();
18174            self
18175        }
18176
18177        /// Sends the request.
18178        ///
18179        /// # Long running operations
18180        ///
18181        /// This starts, but does not poll, a longrunning operation. More information
18182        /// on [update_zone][crate::client::DataplexService::update_zone].
18183        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18184            (*self.0.stub)
18185                .update_zone(self.0.request, self.0.options)
18186                .await
18187                .map(crate::Response::into_body)
18188        }
18189
18190        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_zone`.
18191        pub fn poller(
18192            self,
18193        ) -> impl google_cloud_lro::Poller<crate::model::Zone, crate::model::OperationMetadata>
18194        {
18195            type Operation = google_cloud_lro::internal::Operation<
18196                crate::model::Zone,
18197                crate::model::OperationMetadata,
18198            >;
18199            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18200            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18201
18202            let stub = self.0.stub.clone();
18203            let mut options = self.0.options.clone();
18204            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18205            let query = move |name| {
18206                let stub = stub.clone();
18207                let options = options.clone();
18208                async {
18209                    let op = GetOperation::new(stub)
18210                        .set_name(name)
18211                        .with_options(options)
18212                        .send()
18213                        .await?;
18214                    Ok(Operation::new(op))
18215                }
18216            };
18217
18218            let start = move || async {
18219                let op = self.send().await?;
18220                Ok(Operation::new(op))
18221            };
18222
18223            google_cloud_lro::internal::new_poller(
18224                polling_error_policy,
18225                polling_backoff_policy,
18226                start,
18227                query,
18228            )
18229        }
18230
18231        /// Sets the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
18232        ///
18233        /// This is a **required** field for requests.
18234        pub fn set_update_mask<T>(mut self, v: T) -> Self
18235        where
18236            T: std::convert::Into<wkt::FieldMask>,
18237        {
18238            self.0.request.update_mask = std::option::Option::Some(v.into());
18239            self
18240        }
18241
18242        /// Sets or clears the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
18243        ///
18244        /// This is a **required** field for requests.
18245        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
18246        where
18247            T: std::convert::Into<wkt::FieldMask>,
18248        {
18249            self.0.request.update_mask = v.map(|x| x.into());
18250            self
18251        }
18252
18253        /// Sets the value of [zone][crate::model::UpdateZoneRequest::zone].
18254        ///
18255        /// This is a **required** field for requests.
18256        pub fn set_zone<T>(mut self, v: T) -> Self
18257        where
18258            T: std::convert::Into<crate::model::Zone>,
18259        {
18260            self.0.request.zone = std::option::Option::Some(v.into());
18261            self
18262        }
18263
18264        /// Sets or clears the value of [zone][crate::model::UpdateZoneRequest::zone].
18265        ///
18266        /// This is a **required** field for requests.
18267        pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
18268        where
18269            T: std::convert::Into<crate::model::Zone>,
18270        {
18271            self.0.request.zone = v.map(|x| x.into());
18272            self
18273        }
18274
18275        /// Sets the value of [validate_only][crate::model::UpdateZoneRequest::validate_only].
18276        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18277            self.0.request.validate_only = v.into();
18278            self
18279        }
18280    }
18281
18282    #[doc(hidden)]
18283    impl crate::RequestBuilder for UpdateZone {
18284        fn request_options(&mut self) -> &mut crate::RequestOptions {
18285            &mut self.0.options
18286        }
18287    }
18288
18289    /// The request builder for [DataplexService::delete_zone][crate::client::DataplexService::delete_zone] calls.
18290    ///
18291    /// # Example
18292    /// ```
18293    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteZone;
18294    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18295    /// use google_cloud_lro::Poller;
18296    ///
18297    /// let builder = prepare_request_builder();
18298    /// let response = builder.poller().until_done().await?;
18299    /// # Ok(()) }
18300    ///
18301    /// fn prepare_request_builder() -> DeleteZone {
18302    ///   # panic!();
18303    ///   // ... details omitted ...
18304    /// }
18305    /// ```
18306    #[derive(Clone, Debug)]
18307    pub struct DeleteZone(RequestBuilder<crate::model::DeleteZoneRequest>);
18308
18309    impl DeleteZone {
18310        pub(crate) fn new(
18311            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18312        ) -> Self {
18313            Self(RequestBuilder::new(stub))
18314        }
18315
18316        /// Sets the full request, replacing any prior values.
18317        pub fn with_request<V: Into<crate::model::DeleteZoneRequest>>(mut self, v: V) -> Self {
18318            self.0.request = v.into();
18319            self
18320        }
18321
18322        /// Sets all the options, replacing any prior values.
18323        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18324            self.0.options = v.into();
18325            self
18326        }
18327
18328        /// Sends the request.
18329        ///
18330        /// # Long running operations
18331        ///
18332        /// This starts, but does not poll, a longrunning operation. More information
18333        /// on [delete_zone][crate::client::DataplexService::delete_zone].
18334        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18335            (*self.0.stub)
18336                .delete_zone(self.0.request, self.0.options)
18337                .await
18338                .map(crate::Response::into_body)
18339        }
18340
18341        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_zone`.
18342        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
18343            type Operation =
18344                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
18345            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18346            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18347
18348            let stub = self.0.stub.clone();
18349            let mut options = self.0.options.clone();
18350            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18351            let query = move |name| {
18352                let stub = stub.clone();
18353                let options = options.clone();
18354                async {
18355                    let op = GetOperation::new(stub)
18356                        .set_name(name)
18357                        .with_options(options)
18358                        .send()
18359                        .await?;
18360                    Ok(Operation::new(op))
18361                }
18362            };
18363
18364            let start = move || async {
18365                let op = self.send().await?;
18366                Ok(Operation::new(op))
18367            };
18368
18369            google_cloud_lro::internal::new_unit_response_poller(
18370                polling_error_policy,
18371                polling_backoff_policy,
18372                start,
18373                query,
18374            )
18375        }
18376
18377        /// Sets the value of [name][crate::model::DeleteZoneRequest::name].
18378        ///
18379        /// This is a **required** field for requests.
18380        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18381            self.0.request.name = v.into();
18382            self
18383        }
18384    }
18385
18386    #[doc(hidden)]
18387    impl crate::RequestBuilder for DeleteZone {
18388        fn request_options(&mut self) -> &mut crate::RequestOptions {
18389            &mut self.0.options
18390        }
18391    }
18392
18393    /// The request builder for [DataplexService::list_zones][crate::client::DataplexService::list_zones] calls.
18394    ///
18395    /// # Example
18396    /// ```
18397    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListZones;
18398    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18399    /// use google_cloud_gax::paginator::ItemPaginator;
18400    ///
18401    /// let builder = prepare_request_builder();
18402    /// let mut items = builder.by_item();
18403    /// while let Some(result) = items.next().await {
18404    ///   let item = result?;
18405    /// }
18406    /// # Ok(()) }
18407    ///
18408    /// fn prepare_request_builder() -> ListZones {
18409    ///   # panic!();
18410    ///   // ... details omitted ...
18411    /// }
18412    /// ```
18413    #[derive(Clone, Debug)]
18414    pub struct ListZones(RequestBuilder<crate::model::ListZonesRequest>);
18415
18416    impl ListZones {
18417        pub(crate) fn new(
18418            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18419        ) -> Self {
18420            Self(RequestBuilder::new(stub))
18421        }
18422
18423        /// Sets the full request, replacing any prior values.
18424        pub fn with_request<V: Into<crate::model::ListZonesRequest>>(mut self, v: V) -> Self {
18425            self.0.request = v.into();
18426            self
18427        }
18428
18429        /// Sets all the options, replacing any prior values.
18430        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18431            self.0.options = v.into();
18432            self
18433        }
18434
18435        /// Sends the request.
18436        pub async fn send(self) -> Result<crate::model::ListZonesResponse> {
18437            (*self.0.stub)
18438                .list_zones(self.0.request, self.0.options)
18439                .await
18440                .map(crate::Response::into_body)
18441        }
18442
18443        /// Streams each page in the collection.
18444        pub fn by_page(
18445            self,
18446        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListZonesResponse, crate::Error>
18447        {
18448            use std::clone::Clone;
18449            let token = self.0.request.page_token.clone();
18450            let execute = move |token: String| {
18451                let mut builder = self.clone();
18452                builder.0.request = builder.0.request.set_page_token(token);
18453                builder.send()
18454            };
18455            google_cloud_gax::paginator::internal::new_paginator(token, execute)
18456        }
18457
18458        /// Streams each item in the collection.
18459        pub fn by_item(
18460            self,
18461        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListZonesResponse, crate::Error>
18462        {
18463            use google_cloud_gax::paginator::Paginator;
18464            self.by_page().items()
18465        }
18466
18467        /// Sets the value of [parent][crate::model::ListZonesRequest::parent].
18468        ///
18469        /// This is a **required** field for requests.
18470        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18471            self.0.request.parent = v.into();
18472            self
18473        }
18474
18475        /// Sets the value of [page_size][crate::model::ListZonesRequest::page_size].
18476        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18477            self.0.request.page_size = v.into();
18478            self
18479        }
18480
18481        /// Sets the value of [page_token][crate::model::ListZonesRequest::page_token].
18482        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18483            self.0.request.page_token = v.into();
18484            self
18485        }
18486
18487        /// Sets the value of [filter][crate::model::ListZonesRequest::filter].
18488        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
18489            self.0.request.filter = v.into();
18490            self
18491        }
18492
18493        /// Sets the value of [order_by][crate::model::ListZonesRequest::order_by].
18494        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
18495            self.0.request.order_by = v.into();
18496            self
18497        }
18498    }
18499
18500    #[doc(hidden)]
18501    impl crate::RequestBuilder for ListZones {
18502        fn request_options(&mut self) -> &mut crate::RequestOptions {
18503            &mut self.0.options
18504        }
18505    }
18506
18507    /// The request builder for [DataplexService::get_zone][crate::client::DataplexService::get_zone] calls.
18508    ///
18509    /// # Example
18510    /// ```
18511    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetZone;
18512    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18513    ///
18514    /// let builder = prepare_request_builder();
18515    /// let response = builder.send().await?;
18516    /// # Ok(()) }
18517    ///
18518    /// fn prepare_request_builder() -> GetZone {
18519    ///   # panic!();
18520    ///   // ... details omitted ...
18521    /// }
18522    /// ```
18523    #[derive(Clone, Debug)]
18524    pub struct GetZone(RequestBuilder<crate::model::GetZoneRequest>);
18525
18526    impl GetZone {
18527        pub(crate) fn new(
18528            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18529        ) -> Self {
18530            Self(RequestBuilder::new(stub))
18531        }
18532
18533        /// Sets the full request, replacing any prior values.
18534        pub fn with_request<V: Into<crate::model::GetZoneRequest>>(mut self, v: V) -> Self {
18535            self.0.request = v.into();
18536            self
18537        }
18538
18539        /// Sets all the options, replacing any prior values.
18540        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18541            self.0.options = v.into();
18542            self
18543        }
18544
18545        /// Sends the request.
18546        pub async fn send(self) -> Result<crate::model::Zone> {
18547            (*self.0.stub)
18548                .get_zone(self.0.request, self.0.options)
18549                .await
18550                .map(crate::Response::into_body)
18551        }
18552
18553        /// Sets the value of [name][crate::model::GetZoneRequest::name].
18554        ///
18555        /// This is a **required** field for requests.
18556        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18557            self.0.request.name = v.into();
18558            self
18559        }
18560    }
18561
18562    #[doc(hidden)]
18563    impl crate::RequestBuilder for GetZone {
18564        fn request_options(&mut self) -> &mut crate::RequestOptions {
18565            &mut self.0.options
18566        }
18567    }
18568
18569    /// The request builder for [DataplexService::list_zone_actions][crate::client::DataplexService::list_zone_actions] calls.
18570    ///
18571    /// # Example
18572    /// ```
18573    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListZoneActions;
18574    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18575    /// use google_cloud_gax::paginator::ItemPaginator;
18576    ///
18577    /// let builder = prepare_request_builder();
18578    /// let mut items = builder.by_item();
18579    /// while let Some(result) = items.next().await {
18580    ///   let item = result?;
18581    /// }
18582    /// # Ok(()) }
18583    ///
18584    /// fn prepare_request_builder() -> ListZoneActions {
18585    ///   # panic!();
18586    ///   // ... details omitted ...
18587    /// }
18588    /// ```
18589    #[derive(Clone, Debug)]
18590    pub struct ListZoneActions(RequestBuilder<crate::model::ListZoneActionsRequest>);
18591
18592    impl ListZoneActions {
18593        pub(crate) fn new(
18594            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18595        ) -> Self {
18596            Self(RequestBuilder::new(stub))
18597        }
18598
18599        /// Sets the full request, replacing any prior values.
18600        pub fn with_request<V: Into<crate::model::ListZoneActionsRequest>>(mut self, v: V) -> Self {
18601            self.0.request = v.into();
18602            self
18603        }
18604
18605        /// Sets all the options, replacing any prior values.
18606        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18607            self.0.options = v.into();
18608            self
18609        }
18610
18611        /// Sends the request.
18612        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
18613            (*self.0.stub)
18614                .list_zone_actions(self.0.request, self.0.options)
18615                .await
18616                .map(crate::Response::into_body)
18617        }
18618
18619        /// Streams each page in the collection.
18620        pub fn by_page(
18621            self,
18622        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListActionsResponse, crate::Error>
18623        {
18624            use std::clone::Clone;
18625            let token = self.0.request.page_token.clone();
18626            let execute = move |token: String| {
18627                let mut builder = self.clone();
18628                builder.0.request = builder.0.request.set_page_token(token);
18629                builder.send()
18630            };
18631            google_cloud_gax::paginator::internal::new_paginator(token, execute)
18632        }
18633
18634        /// Streams each item in the collection.
18635        pub fn by_item(
18636            self,
18637        ) -> impl google_cloud_gax::paginator::ItemPaginator<
18638            crate::model::ListActionsResponse,
18639            crate::Error,
18640        > {
18641            use google_cloud_gax::paginator::Paginator;
18642            self.by_page().items()
18643        }
18644
18645        /// Sets the value of [parent][crate::model::ListZoneActionsRequest::parent].
18646        ///
18647        /// This is a **required** field for requests.
18648        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18649            self.0.request.parent = v.into();
18650            self
18651        }
18652
18653        /// Sets the value of [page_size][crate::model::ListZoneActionsRequest::page_size].
18654        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18655            self.0.request.page_size = v.into();
18656            self
18657        }
18658
18659        /// Sets the value of [page_token][crate::model::ListZoneActionsRequest::page_token].
18660        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18661            self.0.request.page_token = v.into();
18662            self
18663        }
18664    }
18665
18666    #[doc(hidden)]
18667    impl crate::RequestBuilder for ListZoneActions {
18668        fn request_options(&mut self) -> &mut crate::RequestOptions {
18669            &mut self.0.options
18670        }
18671    }
18672
18673    /// The request builder for [DataplexService::create_asset][crate::client::DataplexService::create_asset] calls.
18674    ///
18675    /// # Example
18676    /// ```
18677    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateAsset;
18678    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18679    /// use google_cloud_lro::Poller;
18680    ///
18681    /// let builder = prepare_request_builder();
18682    /// let response = builder.poller().until_done().await?;
18683    /// # Ok(()) }
18684    ///
18685    /// fn prepare_request_builder() -> CreateAsset {
18686    ///   # panic!();
18687    ///   // ... details omitted ...
18688    /// }
18689    /// ```
18690    #[derive(Clone, Debug)]
18691    pub struct CreateAsset(RequestBuilder<crate::model::CreateAssetRequest>);
18692
18693    impl CreateAsset {
18694        pub(crate) fn new(
18695            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18696        ) -> Self {
18697            Self(RequestBuilder::new(stub))
18698        }
18699
18700        /// Sets the full request, replacing any prior values.
18701        pub fn with_request<V: Into<crate::model::CreateAssetRequest>>(mut self, v: V) -> Self {
18702            self.0.request = v.into();
18703            self
18704        }
18705
18706        /// Sets all the options, replacing any prior values.
18707        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18708            self.0.options = v.into();
18709            self
18710        }
18711
18712        /// Sends the request.
18713        ///
18714        /// # Long running operations
18715        ///
18716        /// This starts, but does not poll, a longrunning operation. More information
18717        /// on [create_asset][crate::client::DataplexService::create_asset].
18718        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18719            (*self.0.stub)
18720                .create_asset(self.0.request, self.0.options)
18721                .await
18722                .map(crate::Response::into_body)
18723        }
18724
18725        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_asset`.
18726        pub fn poller(
18727            self,
18728        ) -> impl google_cloud_lro::Poller<crate::model::Asset, crate::model::OperationMetadata>
18729        {
18730            type Operation = google_cloud_lro::internal::Operation<
18731                crate::model::Asset,
18732                crate::model::OperationMetadata,
18733            >;
18734            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18735            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18736
18737            let stub = self.0.stub.clone();
18738            let mut options = self.0.options.clone();
18739            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18740            let query = move |name| {
18741                let stub = stub.clone();
18742                let options = options.clone();
18743                async {
18744                    let op = GetOperation::new(stub)
18745                        .set_name(name)
18746                        .with_options(options)
18747                        .send()
18748                        .await?;
18749                    Ok(Operation::new(op))
18750                }
18751            };
18752
18753            let start = move || async {
18754                let op = self.send().await?;
18755                Ok(Operation::new(op))
18756            };
18757
18758            google_cloud_lro::internal::new_poller(
18759                polling_error_policy,
18760                polling_backoff_policy,
18761                start,
18762                query,
18763            )
18764        }
18765
18766        /// Sets the value of [parent][crate::model::CreateAssetRequest::parent].
18767        ///
18768        /// This is a **required** field for requests.
18769        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18770            self.0.request.parent = v.into();
18771            self
18772        }
18773
18774        /// Sets the value of [asset_id][crate::model::CreateAssetRequest::asset_id].
18775        ///
18776        /// This is a **required** field for requests.
18777        pub fn set_asset_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
18778            self.0.request.asset_id = v.into();
18779            self
18780        }
18781
18782        /// Sets the value of [asset][crate::model::CreateAssetRequest::asset].
18783        ///
18784        /// This is a **required** field for requests.
18785        pub fn set_asset<T>(mut self, v: T) -> Self
18786        where
18787            T: std::convert::Into<crate::model::Asset>,
18788        {
18789            self.0.request.asset = std::option::Option::Some(v.into());
18790            self
18791        }
18792
18793        /// Sets or clears the value of [asset][crate::model::CreateAssetRequest::asset].
18794        ///
18795        /// This is a **required** field for requests.
18796        pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
18797        where
18798            T: std::convert::Into<crate::model::Asset>,
18799        {
18800            self.0.request.asset = v.map(|x| x.into());
18801            self
18802        }
18803
18804        /// Sets the value of [validate_only][crate::model::CreateAssetRequest::validate_only].
18805        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18806            self.0.request.validate_only = v.into();
18807            self
18808        }
18809    }
18810
18811    #[doc(hidden)]
18812    impl crate::RequestBuilder for CreateAsset {
18813        fn request_options(&mut self) -> &mut crate::RequestOptions {
18814            &mut self.0.options
18815        }
18816    }
18817
18818    /// The request builder for [DataplexService::update_asset][crate::client::DataplexService::update_asset] calls.
18819    ///
18820    /// # Example
18821    /// ```
18822    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateAsset;
18823    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18824    /// use google_cloud_lro::Poller;
18825    ///
18826    /// let builder = prepare_request_builder();
18827    /// let response = builder.poller().until_done().await?;
18828    /// # Ok(()) }
18829    ///
18830    /// fn prepare_request_builder() -> UpdateAsset {
18831    ///   # panic!();
18832    ///   // ... details omitted ...
18833    /// }
18834    /// ```
18835    #[derive(Clone, Debug)]
18836    pub struct UpdateAsset(RequestBuilder<crate::model::UpdateAssetRequest>);
18837
18838    impl UpdateAsset {
18839        pub(crate) fn new(
18840            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18841        ) -> Self {
18842            Self(RequestBuilder::new(stub))
18843        }
18844
18845        /// Sets the full request, replacing any prior values.
18846        pub fn with_request<V: Into<crate::model::UpdateAssetRequest>>(mut self, v: V) -> Self {
18847            self.0.request = v.into();
18848            self
18849        }
18850
18851        /// Sets all the options, replacing any prior values.
18852        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18853            self.0.options = v.into();
18854            self
18855        }
18856
18857        /// Sends the request.
18858        ///
18859        /// # Long running operations
18860        ///
18861        /// This starts, but does not poll, a longrunning operation. More information
18862        /// on [update_asset][crate::client::DataplexService::update_asset].
18863        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18864            (*self.0.stub)
18865                .update_asset(self.0.request, self.0.options)
18866                .await
18867                .map(crate::Response::into_body)
18868        }
18869
18870        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_asset`.
18871        pub fn poller(
18872            self,
18873        ) -> impl google_cloud_lro::Poller<crate::model::Asset, crate::model::OperationMetadata>
18874        {
18875            type Operation = google_cloud_lro::internal::Operation<
18876                crate::model::Asset,
18877                crate::model::OperationMetadata,
18878            >;
18879            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18880            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18881
18882            let stub = self.0.stub.clone();
18883            let mut options = self.0.options.clone();
18884            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18885            let query = move |name| {
18886                let stub = stub.clone();
18887                let options = options.clone();
18888                async {
18889                    let op = GetOperation::new(stub)
18890                        .set_name(name)
18891                        .with_options(options)
18892                        .send()
18893                        .await?;
18894                    Ok(Operation::new(op))
18895                }
18896            };
18897
18898            let start = move || async {
18899                let op = self.send().await?;
18900                Ok(Operation::new(op))
18901            };
18902
18903            google_cloud_lro::internal::new_poller(
18904                polling_error_policy,
18905                polling_backoff_policy,
18906                start,
18907                query,
18908            )
18909        }
18910
18911        /// Sets the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
18912        ///
18913        /// This is a **required** field for requests.
18914        pub fn set_update_mask<T>(mut self, v: T) -> Self
18915        where
18916            T: std::convert::Into<wkt::FieldMask>,
18917        {
18918            self.0.request.update_mask = std::option::Option::Some(v.into());
18919            self
18920        }
18921
18922        /// Sets or clears the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
18923        ///
18924        /// This is a **required** field for requests.
18925        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
18926        where
18927            T: std::convert::Into<wkt::FieldMask>,
18928        {
18929            self.0.request.update_mask = v.map(|x| x.into());
18930            self
18931        }
18932
18933        /// Sets the value of [asset][crate::model::UpdateAssetRequest::asset].
18934        ///
18935        /// This is a **required** field for requests.
18936        pub fn set_asset<T>(mut self, v: T) -> Self
18937        where
18938            T: std::convert::Into<crate::model::Asset>,
18939        {
18940            self.0.request.asset = std::option::Option::Some(v.into());
18941            self
18942        }
18943
18944        /// Sets or clears the value of [asset][crate::model::UpdateAssetRequest::asset].
18945        ///
18946        /// This is a **required** field for requests.
18947        pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
18948        where
18949            T: std::convert::Into<crate::model::Asset>,
18950        {
18951            self.0.request.asset = v.map(|x| x.into());
18952            self
18953        }
18954
18955        /// Sets the value of [validate_only][crate::model::UpdateAssetRequest::validate_only].
18956        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18957            self.0.request.validate_only = v.into();
18958            self
18959        }
18960    }
18961
18962    #[doc(hidden)]
18963    impl crate::RequestBuilder for UpdateAsset {
18964        fn request_options(&mut self) -> &mut crate::RequestOptions {
18965            &mut self.0.options
18966        }
18967    }
18968
18969    /// The request builder for [DataplexService::delete_asset][crate::client::DataplexService::delete_asset] calls.
18970    ///
18971    /// # Example
18972    /// ```
18973    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteAsset;
18974    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18975    /// use google_cloud_lro::Poller;
18976    ///
18977    /// let builder = prepare_request_builder();
18978    /// let response = builder.poller().until_done().await?;
18979    /// # Ok(()) }
18980    ///
18981    /// fn prepare_request_builder() -> DeleteAsset {
18982    ///   # panic!();
18983    ///   // ... details omitted ...
18984    /// }
18985    /// ```
18986    #[derive(Clone, Debug)]
18987    pub struct DeleteAsset(RequestBuilder<crate::model::DeleteAssetRequest>);
18988
18989    impl DeleteAsset {
18990        pub(crate) fn new(
18991            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18992        ) -> Self {
18993            Self(RequestBuilder::new(stub))
18994        }
18995
18996        /// Sets the full request, replacing any prior values.
18997        pub fn with_request<V: Into<crate::model::DeleteAssetRequest>>(mut self, v: V) -> Self {
18998            self.0.request = v.into();
18999            self
19000        }
19001
19002        /// Sets all the options, replacing any prior values.
19003        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19004            self.0.options = v.into();
19005            self
19006        }
19007
19008        /// Sends the request.
19009        ///
19010        /// # Long running operations
19011        ///
19012        /// This starts, but does not poll, a longrunning operation. More information
19013        /// on [delete_asset][crate::client::DataplexService::delete_asset].
19014        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19015            (*self.0.stub)
19016                .delete_asset(self.0.request, self.0.options)
19017                .await
19018                .map(crate::Response::into_body)
19019        }
19020
19021        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_asset`.
19022        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
19023            type Operation =
19024                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
19025            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19026            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19027
19028            let stub = self.0.stub.clone();
19029            let mut options = self.0.options.clone();
19030            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19031            let query = move |name| {
19032                let stub = stub.clone();
19033                let options = options.clone();
19034                async {
19035                    let op = GetOperation::new(stub)
19036                        .set_name(name)
19037                        .with_options(options)
19038                        .send()
19039                        .await?;
19040                    Ok(Operation::new(op))
19041                }
19042            };
19043
19044            let start = move || async {
19045                let op = self.send().await?;
19046                Ok(Operation::new(op))
19047            };
19048
19049            google_cloud_lro::internal::new_unit_response_poller(
19050                polling_error_policy,
19051                polling_backoff_policy,
19052                start,
19053                query,
19054            )
19055        }
19056
19057        /// Sets the value of [name][crate::model::DeleteAssetRequest::name].
19058        ///
19059        /// This is a **required** field for requests.
19060        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19061            self.0.request.name = v.into();
19062            self
19063        }
19064    }
19065
19066    #[doc(hidden)]
19067    impl crate::RequestBuilder for DeleteAsset {
19068        fn request_options(&mut self) -> &mut crate::RequestOptions {
19069            &mut self.0.options
19070        }
19071    }
19072
19073    /// The request builder for [DataplexService::list_assets][crate::client::DataplexService::list_assets] calls.
19074    ///
19075    /// # Example
19076    /// ```
19077    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListAssets;
19078    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19079    /// use google_cloud_gax::paginator::ItemPaginator;
19080    ///
19081    /// let builder = prepare_request_builder();
19082    /// let mut items = builder.by_item();
19083    /// while let Some(result) = items.next().await {
19084    ///   let item = result?;
19085    /// }
19086    /// # Ok(()) }
19087    ///
19088    /// fn prepare_request_builder() -> ListAssets {
19089    ///   # panic!();
19090    ///   // ... details omitted ...
19091    /// }
19092    /// ```
19093    #[derive(Clone, Debug)]
19094    pub struct ListAssets(RequestBuilder<crate::model::ListAssetsRequest>);
19095
19096    impl ListAssets {
19097        pub(crate) fn new(
19098            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19099        ) -> Self {
19100            Self(RequestBuilder::new(stub))
19101        }
19102
19103        /// Sets the full request, replacing any prior values.
19104        pub fn with_request<V: Into<crate::model::ListAssetsRequest>>(mut self, v: V) -> Self {
19105            self.0.request = v.into();
19106            self
19107        }
19108
19109        /// Sets all the options, replacing any prior values.
19110        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19111            self.0.options = v.into();
19112            self
19113        }
19114
19115        /// Sends the request.
19116        pub async fn send(self) -> Result<crate::model::ListAssetsResponse> {
19117            (*self.0.stub)
19118                .list_assets(self.0.request, self.0.options)
19119                .await
19120                .map(crate::Response::into_body)
19121        }
19122
19123        /// Streams each page in the collection.
19124        pub fn by_page(
19125            self,
19126        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListAssetsResponse, crate::Error>
19127        {
19128            use std::clone::Clone;
19129            let token = self.0.request.page_token.clone();
19130            let execute = move |token: String| {
19131                let mut builder = self.clone();
19132                builder.0.request = builder.0.request.set_page_token(token);
19133                builder.send()
19134            };
19135            google_cloud_gax::paginator::internal::new_paginator(token, execute)
19136        }
19137
19138        /// Streams each item in the collection.
19139        pub fn by_item(
19140            self,
19141        ) -> impl google_cloud_gax::paginator::ItemPaginator<
19142            crate::model::ListAssetsResponse,
19143            crate::Error,
19144        > {
19145            use google_cloud_gax::paginator::Paginator;
19146            self.by_page().items()
19147        }
19148
19149        /// Sets the value of [parent][crate::model::ListAssetsRequest::parent].
19150        ///
19151        /// This is a **required** field for requests.
19152        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19153            self.0.request.parent = v.into();
19154            self
19155        }
19156
19157        /// Sets the value of [page_size][crate::model::ListAssetsRequest::page_size].
19158        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
19159            self.0.request.page_size = v.into();
19160            self
19161        }
19162
19163        /// Sets the value of [page_token][crate::model::ListAssetsRequest::page_token].
19164        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
19165            self.0.request.page_token = v.into();
19166            self
19167        }
19168
19169        /// Sets the value of [filter][crate::model::ListAssetsRequest::filter].
19170        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
19171            self.0.request.filter = v.into();
19172            self
19173        }
19174
19175        /// Sets the value of [order_by][crate::model::ListAssetsRequest::order_by].
19176        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
19177            self.0.request.order_by = v.into();
19178            self
19179        }
19180    }
19181
19182    #[doc(hidden)]
19183    impl crate::RequestBuilder for ListAssets {
19184        fn request_options(&mut self) -> &mut crate::RequestOptions {
19185            &mut self.0.options
19186        }
19187    }
19188
19189    /// The request builder for [DataplexService::get_asset][crate::client::DataplexService::get_asset] calls.
19190    ///
19191    /// # Example
19192    /// ```
19193    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetAsset;
19194    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19195    ///
19196    /// let builder = prepare_request_builder();
19197    /// let response = builder.send().await?;
19198    /// # Ok(()) }
19199    ///
19200    /// fn prepare_request_builder() -> GetAsset {
19201    ///   # panic!();
19202    ///   // ... details omitted ...
19203    /// }
19204    /// ```
19205    #[derive(Clone, Debug)]
19206    pub struct GetAsset(RequestBuilder<crate::model::GetAssetRequest>);
19207
19208    impl GetAsset {
19209        pub(crate) fn new(
19210            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19211        ) -> Self {
19212            Self(RequestBuilder::new(stub))
19213        }
19214
19215        /// Sets the full request, replacing any prior values.
19216        pub fn with_request<V: Into<crate::model::GetAssetRequest>>(mut self, v: V) -> Self {
19217            self.0.request = v.into();
19218            self
19219        }
19220
19221        /// Sets all the options, replacing any prior values.
19222        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19223            self.0.options = v.into();
19224            self
19225        }
19226
19227        /// Sends the request.
19228        pub async fn send(self) -> Result<crate::model::Asset> {
19229            (*self.0.stub)
19230                .get_asset(self.0.request, self.0.options)
19231                .await
19232                .map(crate::Response::into_body)
19233        }
19234
19235        /// Sets the value of [name][crate::model::GetAssetRequest::name].
19236        ///
19237        /// This is a **required** field for requests.
19238        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19239            self.0.request.name = v.into();
19240            self
19241        }
19242    }
19243
19244    #[doc(hidden)]
19245    impl crate::RequestBuilder for GetAsset {
19246        fn request_options(&mut self) -> &mut crate::RequestOptions {
19247            &mut self.0.options
19248        }
19249    }
19250
19251    /// The request builder for [DataplexService::list_asset_actions][crate::client::DataplexService::list_asset_actions] calls.
19252    ///
19253    /// # Example
19254    /// ```
19255    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListAssetActions;
19256    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19257    /// use google_cloud_gax::paginator::ItemPaginator;
19258    ///
19259    /// let builder = prepare_request_builder();
19260    /// let mut items = builder.by_item();
19261    /// while let Some(result) = items.next().await {
19262    ///   let item = result?;
19263    /// }
19264    /// # Ok(()) }
19265    ///
19266    /// fn prepare_request_builder() -> ListAssetActions {
19267    ///   # panic!();
19268    ///   // ... details omitted ...
19269    /// }
19270    /// ```
19271    #[derive(Clone, Debug)]
19272    pub struct ListAssetActions(RequestBuilder<crate::model::ListAssetActionsRequest>);
19273
19274    impl ListAssetActions {
19275        pub(crate) fn new(
19276            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19277        ) -> Self {
19278            Self(RequestBuilder::new(stub))
19279        }
19280
19281        /// Sets the full request, replacing any prior values.
19282        pub fn with_request<V: Into<crate::model::ListAssetActionsRequest>>(
19283            mut self,
19284            v: V,
19285        ) -> Self {
19286            self.0.request = v.into();
19287            self
19288        }
19289
19290        /// Sets all the options, replacing any prior values.
19291        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19292            self.0.options = v.into();
19293            self
19294        }
19295
19296        /// Sends the request.
19297        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
19298            (*self.0.stub)
19299                .list_asset_actions(self.0.request, self.0.options)
19300                .await
19301                .map(crate::Response::into_body)
19302        }
19303
19304        /// Streams each page in the collection.
19305        pub fn by_page(
19306            self,
19307        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListActionsResponse, crate::Error>
19308        {
19309            use std::clone::Clone;
19310            let token = self.0.request.page_token.clone();
19311            let execute = move |token: String| {
19312                let mut builder = self.clone();
19313                builder.0.request = builder.0.request.set_page_token(token);
19314                builder.send()
19315            };
19316            google_cloud_gax::paginator::internal::new_paginator(token, execute)
19317        }
19318
19319        /// Streams each item in the collection.
19320        pub fn by_item(
19321            self,
19322        ) -> impl google_cloud_gax::paginator::ItemPaginator<
19323            crate::model::ListActionsResponse,
19324            crate::Error,
19325        > {
19326            use google_cloud_gax::paginator::Paginator;
19327            self.by_page().items()
19328        }
19329
19330        /// Sets the value of [parent][crate::model::ListAssetActionsRequest::parent].
19331        ///
19332        /// This is a **required** field for requests.
19333        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19334            self.0.request.parent = v.into();
19335            self
19336        }
19337
19338        /// Sets the value of [page_size][crate::model::ListAssetActionsRequest::page_size].
19339        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
19340            self.0.request.page_size = v.into();
19341            self
19342        }
19343
19344        /// Sets the value of [page_token][crate::model::ListAssetActionsRequest::page_token].
19345        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
19346            self.0.request.page_token = v.into();
19347            self
19348        }
19349    }
19350
19351    #[doc(hidden)]
19352    impl crate::RequestBuilder for ListAssetActions {
19353        fn request_options(&mut self) -> &mut crate::RequestOptions {
19354            &mut self.0.options
19355        }
19356    }
19357
19358    /// The request builder for [DataplexService::create_task][crate::client::DataplexService::create_task] calls.
19359    ///
19360    /// # Example
19361    /// ```
19362    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateTask;
19363    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19364    /// use google_cloud_lro::Poller;
19365    ///
19366    /// let builder = prepare_request_builder();
19367    /// let response = builder.poller().until_done().await?;
19368    /// # Ok(()) }
19369    ///
19370    /// fn prepare_request_builder() -> CreateTask {
19371    ///   # panic!();
19372    ///   // ... details omitted ...
19373    /// }
19374    /// ```
19375    #[derive(Clone, Debug)]
19376    pub struct CreateTask(RequestBuilder<crate::model::CreateTaskRequest>);
19377
19378    impl CreateTask {
19379        pub(crate) fn new(
19380            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19381        ) -> Self {
19382            Self(RequestBuilder::new(stub))
19383        }
19384
19385        /// Sets the full request, replacing any prior values.
19386        pub fn with_request<V: Into<crate::model::CreateTaskRequest>>(mut self, v: V) -> Self {
19387            self.0.request = v.into();
19388            self
19389        }
19390
19391        /// Sets all the options, replacing any prior values.
19392        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19393            self.0.options = v.into();
19394            self
19395        }
19396
19397        /// Sends the request.
19398        ///
19399        /// # Long running operations
19400        ///
19401        /// This starts, but does not poll, a longrunning operation. More information
19402        /// on [create_task][crate::client::DataplexService::create_task].
19403        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19404            (*self.0.stub)
19405                .create_task(self.0.request, self.0.options)
19406                .await
19407                .map(crate::Response::into_body)
19408        }
19409
19410        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_task`.
19411        pub fn poller(
19412            self,
19413        ) -> impl google_cloud_lro::Poller<crate::model::Task, crate::model::OperationMetadata>
19414        {
19415            type Operation = google_cloud_lro::internal::Operation<
19416                crate::model::Task,
19417                crate::model::OperationMetadata,
19418            >;
19419            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19420            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19421
19422            let stub = self.0.stub.clone();
19423            let mut options = self.0.options.clone();
19424            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19425            let query = move |name| {
19426                let stub = stub.clone();
19427                let options = options.clone();
19428                async {
19429                    let op = GetOperation::new(stub)
19430                        .set_name(name)
19431                        .with_options(options)
19432                        .send()
19433                        .await?;
19434                    Ok(Operation::new(op))
19435                }
19436            };
19437
19438            let start = move || async {
19439                let op = self.send().await?;
19440                Ok(Operation::new(op))
19441            };
19442
19443            google_cloud_lro::internal::new_poller(
19444                polling_error_policy,
19445                polling_backoff_policy,
19446                start,
19447                query,
19448            )
19449        }
19450
19451        /// Sets the value of [parent][crate::model::CreateTaskRequest::parent].
19452        ///
19453        /// This is a **required** field for requests.
19454        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19455            self.0.request.parent = v.into();
19456            self
19457        }
19458
19459        /// Sets the value of [task_id][crate::model::CreateTaskRequest::task_id].
19460        ///
19461        /// This is a **required** field for requests.
19462        pub fn set_task_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
19463            self.0.request.task_id = v.into();
19464            self
19465        }
19466
19467        /// Sets the value of [task][crate::model::CreateTaskRequest::task].
19468        ///
19469        /// This is a **required** field for requests.
19470        pub fn set_task<T>(mut self, v: T) -> Self
19471        where
19472            T: std::convert::Into<crate::model::Task>,
19473        {
19474            self.0.request.task = std::option::Option::Some(v.into());
19475            self
19476        }
19477
19478        /// Sets or clears the value of [task][crate::model::CreateTaskRequest::task].
19479        ///
19480        /// This is a **required** field for requests.
19481        pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
19482        where
19483            T: std::convert::Into<crate::model::Task>,
19484        {
19485            self.0.request.task = v.map(|x| x.into());
19486            self
19487        }
19488
19489        /// Sets the value of [validate_only][crate::model::CreateTaskRequest::validate_only].
19490        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
19491            self.0.request.validate_only = v.into();
19492            self
19493        }
19494    }
19495
19496    #[doc(hidden)]
19497    impl crate::RequestBuilder for CreateTask {
19498        fn request_options(&mut self) -> &mut crate::RequestOptions {
19499            &mut self.0.options
19500        }
19501    }
19502
19503    /// The request builder for [DataplexService::update_task][crate::client::DataplexService::update_task] calls.
19504    ///
19505    /// # Example
19506    /// ```
19507    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateTask;
19508    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19509    /// use google_cloud_lro::Poller;
19510    ///
19511    /// let builder = prepare_request_builder();
19512    /// let response = builder.poller().until_done().await?;
19513    /// # Ok(()) }
19514    ///
19515    /// fn prepare_request_builder() -> UpdateTask {
19516    ///   # panic!();
19517    ///   // ... details omitted ...
19518    /// }
19519    /// ```
19520    #[derive(Clone, Debug)]
19521    pub struct UpdateTask(RequestBuilder<crate::model::UpdateTaskRequest>);
19522
19523    impl UpdateTask {
19524        pub(crate) fn new(
19525            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19526        ) -> Self {
19527            Self(RequestBuilder::new(stub))
19528        }
19529
19530        /// Sets the full request, replacing any prior values.
19531        pub fn with_request<V: Into<crate::model::UpdateTaskRequest>>(mut self, v: V) -> Self {
19532            self.0.request = v.into();
19533            self
19534        }
19535
19536        /// Sets all the options, replacing any prior values.
19537        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19538            self.0.options = v.into();
19539            self
19540        }
19541
19542        /// Sends the request.
19543        ///
19544        /// # Long running operations
19545        ///
19546        /// This starts, but does not poll, a longrunning operation. More information
19547        /// on [update_task][crate::client::DataplexService::update_task].
19548        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19549            (*self.0.stub)
19550                .update_task(self.0.request, self.0.options)
19551                .await
19552                .map(crate::Response::into_body)
19553        }
19554
19555        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_task`.
19556        pub fn poller(
19557            self,
19558        ) -> impl google_cloud_lro::Poller<crate::model::Task, crate::model::OperationMetadata>
19559        {
19560            type Operation = google_cloud_lro::internal::Operation<
19561                crate::model::Task,
19562                crate::model::OperationMetadata,
19563            >;
19564            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19565            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19566
19567            let stub = self.0.stub.clone();
19568            let mut options = self.0.options.clone();
19569            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19570            let query = move |name| {
19571                let stub = stub.clone();
19572                let options = options.clone();
19573                async {
19574                    let op = GetOperation::new(stub)
19575                        .set_name(name)
19576                        .with_options(options)
19577                        .send()
19578                        .await?;
19579                    Ok(Operation::new(op))
19580                }
19581            };
19582
19583            let start = move || async {
19584                let op = self.send().await?;
19585                Ok(Operation::new(op))
19586            };
19587
19588            google_cloud_lro::internal::new_poller(
19589                polling_error_policy,
19590                polling_backoff_policy,
19591                start,
19592                query,
19593            )
19594        }
19595
19596        /// Sets the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
19597        ///
19598        /// This is a **required** field for requests.
19599        pub fn set_update_mask<T>(mut self, v: T) -> Self
19600        where
19601            T: std::convert::Into<wkt::FieldMask>,
19602        {
19603            self.0.request.update_mask = std::option::Option::Some(v.into());
19604            self
19605        }
19606
19607        /// Sets or clears the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
19608        ///
19609        /// This is a **required** field for requests.
19610        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
19611        where
19612            T: std::convert::Into<wkt::FieldMask>,
19613        {
19614            self.0.request.update_mask = v.map(|x| x.into());
19615            self
19616        }
19617
19618        /// Sets the value of [task][crate::model::UpdateTaskRequest::task].
19619        ///
19620        /// This is a **required** field for requests.
19621        pub fn set_task<T>(mut self, v: T) -> Self
19622        where
19623            T: std::convert::Into<crate::model::Task>,
19624        {
19625            self.0.request.task = std::option::Option::Some(v.into());
19626            self
19627        }
19628
19629        /// Sets or clears the value of [task][crate::model::UpdateTaskRequest::task].
19630        ///
19631        /// This is a **required** field for requests.
19632        pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
19633        where
19634            T: std::convert::Into<crate::model::Task>,
19635        {
19636            self.0.request.task = v.map(|x| x.into());
19637            self
19638        }
19639
19640        /// Sets the value of [validate_only][crate::model::UpdateTaskRequest::validate_only].
19641        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
19642            self.0.request.validate_only = v.into();
19643            self
19644        }
19645    }
19646
19647    #[doc(hidden)]
19648    impl crate::RequestBuilder for UpdateTask {
19649        fn request_options(&mut self) -> &mut crate::RequestOptions {
19650            &mut self.0.options
19651        }
19652    }
19653
19654    /// The request builder for [DataplexService::delete_task][crate::client::DataplexService::delete_task] calls.
19655    ///
19656    /// # Example
19657    /// ```
19658    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteTask;
19659    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19660    /// use google_cloud_lro::Poller;
19661    ///
19662    /// let builder = prepare_request_builder();
19663    /// let response = builder.poller().until_done().await?;
19664    /// # Ok(()) }
19665    ///
19666    /// fn prepare_request_builder() -> DeleteTask {
19667    ///   # panic!();
19668    ///   // ... details omitted ...
19669    /// }
19670    /// ```
19671    #[derive(Clone, Debug)]
19672    pub struct DeleteTask(RequestBuilder<crate::model::DeleteTaskRequest>);
19673
19674    impl DeleteTask {
19675        pub(crate) fn new(
19676            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19677        ) -> Self {
19678            Self(RequestBuilder::new(stub))
19679        }
19680
19681        /// Sets the full request, replacing any prior values.
19682        pub fn with_request<V: Into<crate::model::DeleteTaskRequest>>(mut self, v: V) -> Self {
19683            self.0.request = v.into();
19684            self
19685        }
19686
19687        /// Sets all the options, replacing any prior values.
19688        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19689            self.0.options = v.into();
19690            self
19691        }
19692
19693        /// Sends the request.
19694        ///
19695        /// # Long running operations
19696        ///
19697        /// This starts, but does not poll, a longrunning operation. More information
19698        /// on [delete_task][crate::client::DataplexService::delete_task].
19699        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19700            (*self.0.stub)
19701                .delete_task(self.0.request, self.0.options)
19702                .await
19703                .map(crate::Response::into_body)
19704        }
19705
19706        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_task`.
19707        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
19708            type Operation =
19709                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
19710            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19711            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19712
19713            let stub = self.0.stub.clone();
19714            let mut options = self.0.options.clone();
19715            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19716            let query = move |name| {
19717                let stub = stub.clone();
19718                let options = options.clone();
19719                async {
19720                    let op = GetOperation::new(stub)
19721                        .set_name(name)
19722                        .with_options(options)
19723                        .send()
19724                        .await?;
19725                    Ok(Operation::new(op))
19726                }
19727            };
19728
19729            let start = move || async {
19730                let op = self.send().await?;
19731                Ok(Operation::new(op))
19732            };
19733
19734            google_cloud_lro::internal::new_unit_response_poller(
19735                polling_error_policy,
19736                polling_backoff_policy,
19737                start,
19738                query,
19739            )
19740        }
19741
19742        /// Sets the value of [name][crate::model::DeleteTaskRequest::name].
19743        ///
19744        /// This is a **required** field for requests.
19745        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19746            self.0.request.name = v.into();
19747            self
19748        }
19749    }
19750
19751    #[doc(hidden)]
19752    impl crate::RequestBuilder for DeleteTask {
19753        fn request_options(&mut self) -> &mut crate::RequestOptions {
19754            &mut self.0.options
19755        }
19756    }
19757
19758    /// The request builder for [DataplexService::list_tasks][crate::client::DataplexService::list_tasks] calls.
19759    ///
19760    /// # Example
19761    /// ```
19762    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListTasks;
19763    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19764    /// use google_cloud_gax::paginator::ItemPaginator;
19765    ///
19766    /// let builder = prepare_request_builder();
19767    /// let mut items = builder.by_item();
19768    /// while let Some(result) = items.next().await {
19769    ///   let item = result?;
19770    /// }
19771    /// # Ok(()) }
19772    ///
19773    /// fn prepare_request_builder() -> ListTasks {
19774    ///   # panic!();
19775    ///   // ... details omitted ...
19776    /// }
19777    /// ```
19778    #[derive(Clone, Debug)]
19779    pub struct ListTasks(RequestBuilder<crate::model::ListTasksRequest>);
19780
19781    impl ListTasks {
19782        pub(crate) fn new(
19783            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19784        ) -> Self {
19785            Self(RequestBuilder::new(stub))
19786        }
19787
19788        /// Sets the full request, replacing any prior values.
19789        pub fn with_request<V: Into<crate::model::ListTasksRequest>>(mut self, v: V) -> Self {
19790            self.0.request = v.into();
19791            self
19792        }
19793
19794        /// Sets all the options, replacing any prior values.
19795        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19796            self.0.options = v.into();
19797            self
19798        }
19799
19800        /// Sends the request.
19801        pub async fn send(self) -> Result<crate::model::ListTasksResponse> {
19802            (*self.0.stub)
19803                .list_tasks(self.0.request, self.0.options)
19804                .await
19805                .map(crate::Response::into_body)
19806        }
19807
19808        /// Streams each page in the collection.
19809        pub fn by_page(
19810            self,
19811        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListTasksResponse, crate::Error>
19812        {
19813            use std::clone::Clone;
19814            let token = self.0.request.page_token.clone();
19815            let execute = move |token: String| {
19816                let mut builder = self.clone();
19817                builder.0.request = builder.0.request.set_page_token(token);
19818                builder.send()
19819            };
19820            google_cloud_gax::paginator::internal::new_paginator(token, execute)
19821        }
19822
19823        /// Streams each item in the collection.
19824        pub fn by_item(
19825            self,
19826        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListTasksResponse, crate::Error>
19827        {
19828            use google_cloud_gax::paginator::Paginator;
19829            self.by_page().items()
19830        }
19831
19832        /// Sets the value of [parent][crate::model::ListTasksRequest::parent].
19833        ///
19834        /// This is a **required** field for requests.
19835        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19836            self.0.request.parent = v.into();
19837            self
19838        }
19839
19840        /// Sets the value of [page_size][crate::model::ListTasksRequest::page_size].
19841        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
19842            self.0.request.page_size = v.into();
19843            self
19844        }
19845
19846        /// Sets the value of [page_token][crate::model::ListTasksRequest::page_token].
19847        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
19848            self.0.request.page_token = v.into();
19849            self
19850        }
19851
19852        /// Sets the value of [filter][crate::model::ListTasksRequest::filter].
19853        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
19854            self.0.request.filter = v.into();
19855            self
19856        }
19857
19858        /// Sets the value of [order_by][crate::model::ListTasksRequest::order_by].
19859        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
19860            self.0.request.order_by = v.into();
19861            self
19862        }
19863    }
19864
19865    #[doc(hidden)]
19866    impl crate::RequestBuilder for ListTasks {
19867        fn request_options(&mut self) -> &mut crate::RequestOptions {
19868            &mut self.0.options
19869        }
19870    }
19871
19872    /// The request builder for [DataplexService::get_task][crate::client::DataplexService::get_task] calls.
19873    ///
19874    /// # Example
19875    /// ```
19876    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetTask;
19877    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19878    ///
19879    /// let builder = prepare_request_builder();
19880    /// let response = builder.send().await?;
19881    /// # Ok(()) }
19882    ///
19883    /// fn prepare_request_builder() -> GetTask {
19884    ///   # panic!();
19885    ///   // ... details omitted ...
19886    /// }
19887    /// ```
19888    #[derive(Clone, Debug)]
19889    pub struct GetTask(RequestBuilder<crate::model::GetTaskRequest>);
19890
19891    impl GetTask {
19892        pub(crate) fn new(
19893            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19894        ) -> Self {
19895            Self(RequestBuilder::new(stub))
19896        }
19897
19898        /// Sets the full request, replacing any prior values.
19899        pub fn with_request<V: Into<crate::model::GetTaskRequest>>(mut self, v: V) -> Self {
19900            self.0.request = v.into();
19901            self
19902        }
19903
19904        /// Sets all the options, replacing any prior values.
19905        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19906            self.0.options = v.into();
19907            self
19908        }
19909
19910        /// Sends the request.
19911        pub async fn send(self) -> Result<crate::model::Task> {
19912            (*self.0.stub)
19913                .get_task(self.0.request, self.0.options)
19914                .await
19915                .map(crate::Response::into_body)
19916        }
19917
19918        /// Sets the value of [name][crate::model::GetTaskRequest::name].
19919        ///
19920        /// This is a **required** field for requests.
19921        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19922            self.0.request.name = v.into();
19923            self
19924        }
19925    }
19926
19927    #[doc(hidden)]
19928    impl crate::RequestBuilder for GetTask {
19929        fn request_options(&mut self) -> &mut crate::RequestOptions {
19930            &mut self.0.options
19931        }
19932    }
19933
19934    /// The request builder for [DataplexService::list_jobs][crate::client::DataplexService::list_jobs] calls.
19935    ///
19936    /// # Example
19937    /// ```
19938    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListJobs;
19939    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19940    /// use google_cloud_gax::paginator::ItemPaginator;
19941    ///
19942    /// let builder = prepare_request_builder();
19943    /// let mut items = builder.by_item();
19944    /// while let Some(result) = items.next().await {
19945    ///   let item = result?;
19946    /// }
19947    /// # Ok(()) }
19948    ///
19949    /// fn prepare_request_builder() -> ListJobs {
19950    ///   # panic!();
19951    ///   // ... details omitted ...
19952    /// }
19953    /// ```
19954    #[derive(Clone, Debug)]
19955    pub struct ListJobs(RequestBuilder<crate::model::ListJobsRequest>);
19956
19957    impl ListJobs {
19958        pub(crate) fn new(
19959            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19960        ) -> Self {
19961            Self(RequestBuilder::new(stub))
19962        }
19963
19964        /// Sets the full request, replacing any prior values.
19965        pub fn with_request<V: Into<crate::model::ListJobsRequest>>(mut self, v: V) -> Self {
19966            self.0.request = v.into();
19967            self
19968        }
19969
19970        /// Sets all the options, replacing any prior values.
19971        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19972            self.0.options = v.into();
19973            self
19974        }
19975
19976        /// Sends the request.
19977        pub async fn send(self) -> Result<crate::model::ListJobsResponse> {
19978            (*self.0.stub)
19979                .list_jobs(self.0.request, self.0.options)
19980                .await
19981                .map(crate::Response::into_body)
19982        }
19983
19984        /// Streams each page in the collection.
19985        pub fn by_page(
19986            self,
19987        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListJobsResponse, crate::Error>
19988        {
19989            use std::clone::Clone;
19990            let token = self.0.request.page_token.clone();
19991            let execute = move |token: String| {
19992                let mut builder = self.clone();
19993                builder.0.request = builder.0.request.set_page_token(token);
19994                builder.send()
19995            };
19996            google_cloud_gax::paginator::internal::new_paginator(token, execute)
19997        }
19998
19999        /// Streams each item in the collection.
20000        pub fn by_item(
20001            self,
20002        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListJobsResponse, crate::Error>
20003        {
20004            use google_cloud_gax::paginator::Paginator;
20005            self.by_page().items()
20006        }
20007
20008        /// Sets the value of [parent][crate::model::ListJobsRequest::parent].
20009        ///
20010        /// This is a **required** field for requests.
20011        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
20012            self.0.request.parent = v.into();
20013            self
20014        }
20015
20016        /// Sets the value of [page_size][crate::model::ListJobsRequest::page_size].
20017        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
20018            self.0.request.page_size = v.into();
20019            self
20020        }
20021
20022        /// Sets the value of [page_token][crate::model::ListJobsRequest::page_token].
20023        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
20024            self.0.request.page_token = v.into();
20025            self
20026        }
20027    }
20028
20029    #[doc(hidden)]
20030    impl crate::RequestBuilder for ListJobs {
20031        fn request_options(&mut self) -> &mut crate::RequestOptions {
20032            &mut self.0.options
20033        }
20034    }
20035
20036    /// The request builder for [DataplexService::run_task][crate::client::DataplexService::run_task] calls.
20037    ///
20038    /// # Example
20039    /// ```
20040    /// # use google_cloud_dataplex_v1::builder::dataplex_service::RunTask;
20041    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20042    ///
20043    /// let builder = prepare_request_builder();
20044    /// let response = builder.send().await?;
20045    /// # Ok(()) }
20046    ///
20047    /// fn prepare_request_builder() -> RunTask {
20048    ///   # panic!();
20049    ///   // ... details omitted ...
20050    /// }
20051    /// ```
20052    #[derive(Clone, Debug)]
20053    pub struct RunTask(RequestBuilder<crate::model::RunTaskRequest>);
20054
20055    impl RunTask {
20056        pub(crate) fn new(
20057            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20058        ) -> Self {
20059            Self(RequestBuilder::new(stub))
20060        }
20061
20062        /// Sets the full request, replacing any prior values.
20063        pub fn with_request<V: Into<crate::model::RunTaskRequest>>(mut self, v: V) -> Self {
20064            self.0.request = v.into();
20065            self
20066        }
20067
20068        /// Sets all the options, replacing any prior values.
20069        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20070            self.0.options = v.into();
20071            self
20072        }
20073
20074        /// Sends the request.
20075        pub async fn send(self) -> Result<crate::model::RunTaskResponse> {
20076            (*self.0.stub)
20077                .run_task(self.0.request, self.0.options)
20078                .await
20079                .map(crate::Response::into_body)
20080        }
20081
20082        /// Sets the value of [name][crate::model::RunTaskRequest::name].
20083        ///
20084        /// This is a **required** field for requests.
20085        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20086            self.0.request.name = v.into();
20087            self
20088        }
20089
20090        /// Sets the value of [labels][crate::model::RunTaskRequest::labels].
20091        pub fn set_labels<T, K, V>(mut self, v: T) -> Self
20092        where
20093            T: std::iter::IntoIterator<Item = (K, V)>,
20094            K: std::convert::Into<std::string::String>,
20095            V: std::convert::Into<std::string::String>,
20096        {
20097            self.0.request.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
20098            self
20099        }
20100
20101        /// Sets the value of [args][crate::model::RunTaskRequest::args].
20102        pub fn set_args<T, K, V>(mut self, v: T) -> Self
20103        where
20104            T: std::iter::IntoIterator<Item = (K, V)>,
20105            K: std::convert::Into<std::string::String>,
20106            V: std::convert::Into<std::string::String>,
20107        {
20108            self.0.request.args = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
20109            self
20110        }
20111    }
20112
20113    #[doc(hidden)]
20114    impl crate::RequestBuilder for RunTask {
20115        fn request_options(&mut self) -> &mut crate::RequestOptions {
20116            &mut self.0.options
20117        }
20118    }
20119
20120    /// The request builder for [DataplexService::get_job][crate::client::DataplexService::get_job] calls.
20121    ///
20122    /// # Example
20123    /// ```
20124    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetJob;
20125    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20126    ///
20127    /// let builder = prepare_request_builder();
20128    /// let response = builder.send().await?;
20129    /// # Ok(()) }
20130    ///
20131    /// fn prepare_request_builder() -> GetJob {
20132    ///   # panic!();
20133    ///   // ... details omitted ...
20134    /// }
20135    /// ```
20136    #[derive(Clone, Debug)]
20137    pub struct GetJob(RequestBuilder<crate::model::GetJobRequest>);
20138
20139    impl GetJob {
20140        pub(crate) fn new(
20141            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20142        ) -> Self {
20143            Self(RequestBuilder::new(stub))
20144        }
20145
20146        /// Sets the full request, replacing any prior values.
20147        pub fn with_request<V: Into<crate::model::GetJobRequest>>(mut self, v: V) -> Self {
20148            self.0.request = v.into();
20149            self
20150        }
20151
20152        /// Sets all the options, replacing any prior values.
20153        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20154            self.0.options = v.into();
20155            self
20156        }
20157
20158        /// Sends the request.
20159        pub async fn send(self) -> Result<crate::model::Job> {
20160            (*self.0.stub)
20161                .get_job(self.0.request, self.0.options)
20162                .await
20163                .map(crate::Response::into_body)
20164        }
20165
20166        /// Sets the value of [name][crate::model::GetJobRequest::name].
20167        ///
20168        /// This is a **required** field for requests.
20169        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20170            self.0.request.name = v.into();
20171            self
20172        }
20173    }
20174
20175    #[doc(hidden)]
20176    impl crate::RequestBuilder for GetJob {
20177        fn request_options(&mut self) -> &mut crate::RequestOptions {
20178            &mut self.0.options
20179        }
20180    }
20181
20182    /// The request builder for [DataplexService::cancel_job][crate::client::DataplexService::cancel_job] calls.
20183    ///
20184    /// # Example
20185    /// ```
20186    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CancelJob;
20187    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20188    ///
20189    /// let builder = prepare_request_builder();
20190    /// let response = builder.send().await?;
20191    /// # Ok(()) }
20192    ///
20193    /// fn prepare_request_builder() -> CancelJob {
20194    ///   # panic!();
20195    ///   // ... details omitted ...
20196    /// }
20197    /// ```
20198    #[derive(Clone, Debug)]
20199    pub struct CancelJob(RequestBuilder<crate::model::CancelJobRequest>);
20200
20201    impl CancelJob {
20202        pub(crate) fn new(
20203            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20204        ) -> Self {
20205            Self(RequestBuilder::new(stub))
20206        }
20207
20208        /// Sets the full request, replacing any prior values.
20209        pub fn with_request<V: Into<crate::model::CancelJobRequest>>(mut self, v: V) -> Self {
20210            self.0.request = v.into();
20211            self
20212        }
20213
20214        /// Sets all the options, replacing any prior values.
20215        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20216            self.0.options = v.into();
20217            self
20218        }
20219
20220        /// Sends the request.
20221        pub async fn send(self) -> Result<()> {
20222            (*self.0.stub)
20223                .cancel_job(self.0.request, self.0.options)
20224                .await
20225                .map(crate::Response::into_body)
20226        }
20227
20228        /// Sets the value of [name][crate::model::CancelJobRequest::name].
20229        ///
20230        /// This is a **required** field for requests.
20231        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20232            self.0.request.name = v.into();
20233            self
20234        }
20235    }
20236
20237    #[doc(hidden)]
20238    impl crate::RequestBuilder for CancelJob {
20239        fn request_options(&mut self) -> &mut crate::RequestOptions {
20240            &mut self.0.options
20241        }
20242    }
20243
20244    /// The request builder for [DataplexService::list_locations][crate::client::DataplexService::list_locations] calls.
20245    ///
20246    /// # Example
20247    /// ```
20248    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListLocations;
20249    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20250    /// use google_cloud_gax::paginator::ItemPaginator;
20251    ///
20252    /// let builder = prepare_request_builder();
20253    /// let mut items = builder.by_item();
20254    /// while let Some(result) = items.next().await {
20255    ///   let item = result?;
20256    /// }
20257    /// # Ok(()) }
20258    ///
20259    /// fn prepare_request_builder() -> ListLocations {
20260    ///   # panic!();
20261    ///   // ... details omitted ...
20262    /// }
20263    /// ```
20264    #[derive(Clone, Debug)]
20265    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
20266
20267    impl ListLocations {
20268        pub(crate) fn new(
20269            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20270        ) -> Self {
20271            Self(RequestBuilder::new(stub))
20272        }
20273
20274        /// Sets the full request, replacing any prior values.
20275        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
20276            mut self,
20277            v: V,
20278        ) -> Self {
20279            self.0.request = v.into();
20280            self
20281        }
20282
20283        /// Sets all the options, replacing any prior values.
20284        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20285            self.0.options = v.into();
20286            self
20287        }
20288
20289        /// Sends the request.
20290        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
20291            (*self.0.stub)
20292                .list_locations(self.0.request, self.0.options)
20293                .await
20294                .map(crate::Response::into_body)
20295        }
20296
20297        /// Streams each page in the collection.
20298        pub fn by_page(
20299            self,
20300        ) -> impl google_cloud_gax::paginator::Paginator<
20301            google_cloud_location::model::ListLocationsResponse,
20302            crate::Error,
20303        > {
20304            use std::clone::Clone;
20305            let token = self.0.request.page_token.clone();
20306            let execute = move |token: String| {
20307                let mut builder = self.clone();
20308                builder.0.request = builder.0.request.set_page_token(token);
20309                builder.send()
20310            };
20311            google_cloud_gax::paginator::internal::new_paginator(token, execute)
20312        }
20313
20314        /// Streams each item in the collection.
20315        pub fn by_item(
20316            self,
20317        ) -> impl google_cloud_gax::paginator::ItemPaginator<
20318            google_cloud_location::model::ListLocationsResponse,
20319            crate::Error,
20320        > {
20321            use google_cloud_gax::paginator::Paginator;
20322            self.by_page().items()
20323        }
20324
20325        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
20326        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20327            self.0.request.name = v.into();
20328            self
20329        }
20330
20331        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
20332        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
20333            self.0.request.filter = v.into();
20334            self
20335        }
20336
20337        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
20338        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
20339            self.0.request.page_size = v.into();
20340            self
20341        }
20342
20343        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
20344        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
20345            self.0.request.page_token = v.into();
20346            self
20347        }
20348    }
20349
20350    #[doc(hidden)]
20351    impl crate::RequestBuilder for ListLocations {
20352        fn request_options(&mut self) -> &mut crate::RequestOptions {
20353            &mut self.0.options
20354        }
20355    }
20356
20357    /// The request builder for [DataplexService::get_location][crate::client::DataplexService::get_location] calls.
20358    ///
20359    /// # Example
20360    /// ```
20361    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetLocation;
20362    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20363    ///
20364    /// let builder = prepare_request_builder();
20365    /// let response = builder.send().await?;
20366    /// # Ok(()) }
20367    ///
20368    /// fn prepare_request_builder() -> GetLocation {
20369    ///   # panic!();
20370    ///   // ... details omitted ...
20371    /// }
20372    /// ```
20373    #[derive(Clone, Debug)]
20374    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
20375
20376    impl GetLocation {
20377        pub(crate) fn new(
20378            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20379        ) -> Self {
20380            Self(RequestBuilder::new(stub))
20381        }
20382
20383        /// Sets the full request, replacing any prior values.
20384        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
20385            mut self,
20386            v: V,
20387        ) -> Self {
20388            self.0.request = v.into();
20389            self
20390        }
20391
20392        /// Sets all the options, replacing any prior values.
20393        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20394            self.0.options = v.into();
20395            self
20396        }
20397
20398        /// Sends the request.
20399        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
20400            (*self.0.stub)
20401                .get_location(self.0.request, self.0.options)
20402                .await
20403                .map(crate::Response::into_body)
20404        }
20405
20406        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
20407        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20408            self.0.request.name = v.into();
20409            self
20410        }
20411    }
20412
20413    #[doc(hidden)]
20414    impl crate::RequestBuilder for GetLocation {
20415        fn request_options(&mut self) -> &mut crate::RequestOptions {
20416            &mut self.0.options
20417        }
20418    }
20419
20420    /// The request builder for [DataplexService::set_iam_policy][crate::client::DataplexService::set_iam_policy] calls.
20421    ///
20422    /// # Example
20423    /// ```
20424    /// # use google_cloud_dataplex_v1::builder::dataplex_service::SetIamPolicy;
20425    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20426    ///
20427    /// let builder = prepare_request_builder();
20428    /// let response = builder.send().await?;
20429    /// # Ok(()) }
20430    ///
20431    /// fn prepare_request_builder() -> SetIamPolicy {
20432    ///   # panic!();
20433    ///   // ... details omitted ...
20434    /// }
20435    /// ```
20436    #[derive(Clone, Debug)]
20437    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
20438
20439    impl SetIamPolicy {
20440        pub(crate) fn new(
20441            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20442        ) -> Self {
20443            Self(RequestBuilder::new(stub))
20444        }
20445
20446        /// Sets the full request, replacing any prior values.
20447        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
20448            mut self,
20449            v: V,
20450        ) -> Self {
20451            self.0.request = v.into();
20452            self
20453        }
20454
20455        /// Sets all the options, replacing any prior values.
20456        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20457            self.0.options = v.into();
20458            self
20459        }
20460
20461        /// Sends the request.
20462        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
20463            (*self.0.stub)
20464                .set_iam_policy(self.0.request, self.0.options)
20465                .await
20466                .map(crate::Response::into_body)
20467        }
20468
20469        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
20470        ///
20471        /// This is a **required** field for requests.
20472        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
20473            self.0.request.resource = v.into();
20474            self
20475        }
20476
20477        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
20478        ///
20479        /// This is a **required** field for requests.
20480        pub fn set_policy<T>(mut self, v: T) -> Self
20481        where
20482            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
20483        {
20484            self.0.request.policy = std::option::Option::Some(v.into());
20485            self
20486        }
20487
20488        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
20489        ///
20490        /// This is a **required** field for requests.
20491        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
20492        where
20493            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
20494        {
20495            self.0.request.policy = v.map(|x| x.into());
20496            self
20497        }
20498
20499        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
20500        pub fn set_update_mask<T>(mut self, v: T) -> Self
20501        where
20502            T: std::convert::Into<wkt::FieldMask>,
20503        {
20504            self.0.request.update_mask = std::option::Option::Some(v.into());
20505            self
20506        }
20507
20508        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
20509        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
20510        where
20511            T: std::convert::Into<wkt::FieldMask>,
20512        {
20513            self.0.request.update_mask = v.map(|x| x.into());
20514            self
20515        }
20516    }
20517
20518    #[doc(hidden)]
20519    impl crate::RequestBuilder for SetIamPolicy {
20520        fn request_options(&mut self) -> &mut crate::RequestOptions {
20521            &mut self.0.options
20522        }
20523    }
20524
20525    /// The request builder for [DataplexService::get_iam_policy][crate::client::DataplexService::get_iam_policy] calls.
20526    ///
20527    /// # Example
20528    /// ```
20529    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetIamPolicy;
20530    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20531    ///
20532    /// let builder = prepare_request_builder();
20533    /// let response = builder.send().await?;
20534    /// # Ok(()) }
20535    ///
20536    /// fn prepare_request_builder() -> GetIamPolicy {
20537    ///   # panic!();
20538    ///   // ... details omitted ...
20539    /// }
20540    /// ```
20541    #[derive(Clone, Debug)]
20542    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
20543
20544    impl GetIamPolicy {
20545        pub(crate) fn new(
20546            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20547        ) -> Self {
20548            Self(RequestBuilder::new(stub))
20549        }
20550
20551        /// Sets the full request, replacing any prior values.
20552        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
20553            mut self,
20554            v: V,
20555        ) -> Self {
20556            self.0.request = v.into();
20557            self
20558        }
20559
20560        /// Sets all the options, replacing any prior values.
20561        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20562            self.0.options = v.into();
20563            self
20564        }
20565
20566        /// Sends the request.
20567        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
20568            (*self.0.stub)
20569                .get_iam_policy(self.0.request, self.0.options)
20570                .await
20571                .map(crate::Response::into_body)
20572        }
20573
20574        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
20575        ///
20576        /// This is a **required** field for requests.
20577        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
20578            self.0.request.resource = v.into();
20579            self
20580        }
20581
20582        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
20583        pub fn set_options<T>(mut self, v: T) -> Self
20584        where
20585            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
20586        {
20587            self.0.request.options = std::option::Option::Some(v.into());
20588            self
20589        }
20590
20591        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
20592        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
20593        where
20594            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
20595        {
20596            self.0.request.options = v.map(|x| x.into());
20597            self
20598        }
20599    }
20600
20601    #[doc(hidden)]
20602    impl crate::RequestBuilder for GetIamPolicy {
20603        fn request_options(&mut self) -> &mut crate::RequestOptions {
20604            &mut self.0.options
20605        }
20606    }
20607
20608    /// The request builder for [DataplexService::test_iam_permissions][crate::client::DataplexService::test_iam_permissions] calls.
20609    ///
20610    /// # Example
20611    /// ```
20612    /// # use google_cloud_dataplex_v1::builder::dataplex_service::TestIamPermissions;
20613    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20614    ///
20615    /// let builder = prepare_request_builder();
20616    /// let response = builder.send().await?;
20617    /// # Ok(()) }
20618    ///
20619    /// fn prepare_request_builder() -> TestIamPermissions {
20620    ///   # panic!();
20621    ///   // ... details omitted ...
20622    /// }
20623    /// ```
20624    #[derive(Clone, Debug)]
20625    pub struct TestIamPermissions(
20626        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
20627    );
20628
20629    impl TestIamPermissions {
20630        pub(crate) fn new(
20631            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20632        ) -> Self {
20633            Self(RequestBuilder::new(stub))
20634        }
20635
20636        /// Sets the full request, replacing any prior values.
20637        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
20638            mut self,
20639            v: V,
20640        ) -> Self {
20641            self.0.request = v.into();
20642            self
20643        }
20644
20645        /// Sets all the options, replacing any prior values.
20646        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20647            self.0.options = v.into();
20648            self
20649        }
20650
20651        /// Sends the request.
20652        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
20653            (*self.0.stub)
20654                .test_iam_permissions(self.0.request, self.0.options)
20655                .await
20656                .map(crate::Response::into_body)
20657        }
20658
20659        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
20660        ///
20661        /// This is a **required** field for requests.
20662        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
20663            self.0.request.resource = v.into();
20664            self
20665        }
20666
20667        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
20668        ///
20669        /// This is a **required** field for requests.
20670        pub fn set_permissions<T, V>(mut self, v: T) -> Self
20671        where
20672            T: std::iter::IntoIterator<Item = V>,
20673            V: std::convert::Into<std::string::String>,
20674        {
20675            use std::iter::Iterator;
20676            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
20677            self
20678        }
20679    }
20680
20681    #[doc(hidden)]
20682    impl crate::RequestBuilder for TestIamPermissions {
20683        fn request_options(&mut self) -> &mut crate::RequestOptions {
20684            &mut self.0.options
20685        }
20686    }
20687
20688    /// The request builder for [DataplexService::list_operations][crate::client::DataplexService::list_operations] calls.
20689    ///
20690    /// # Example
20691    /// ```
20692    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListOperations;
20693    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20694    /// use google_cloud_gax::paginator::ItemPaginator;
20695    ///
20696    /// let builder = prepare_request_builder();
20697    /// let mut items = builder.by_item();
20698    /// while let Some(result) = items.next().await {
20699    ///   let item = result?;
20700    /// }
20701    /// # Ok(()) }
20702    ///
20703    /// fn prepare_request_builder() -> ListOperations {
20704    ///   # panic!();
20705    ///   // ... details omitted ...
20706    /// }
20707    /// ```
20708    #[derive(Clone, Debug)]
20709    pub struct ListOperations(
20710        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
20711    );
20712
20713    impl ListOperations {
20714        pub(crate) fn new(
20715            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20716        ) -> Self {
20717            Self(RequestBuilder::new(stub))
20718        }
20719
20720        /// Sets the full request, replacing any prior values.
20721        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
20722            mut self,
20723            v: V,
20724        ) -> Self {
20725            self.0.request = v.into();
20726            self
20727        }
20728
20729        /// Sets all the options, replacing any prior values.
20730        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20731            self.0.options = v.into();
20732            self
20733        }
20734
20735        /// Sends the request.
20736        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
20737            (*self.0.stub)
20738                .list_operations(self.0.request, self.0.options)
20739                .await
20740                .map(crate::Response::into_body)
20741        }
20742
20743        /// Streams each page in the collection.
20744        pub fn by_page(
20745            self,
20746        ) -> impl google_cloud_gax::paginator::Paginator<
20747            google_cloud_longrunning::model::ListOperationsResponse,
20748            crate::Error,
20749        > {
20750            use std::clone::Clone;
20751            let token = self.0.request.page_token.clone();
20752            let execute = move |token: String| {
20753                let mut builder = self.clone();
20754                builder.0.request = builder.0.request.set_page_token(token);
20755                builder.send()
20756            };
20757            google_cloud_gax::paginator::internal::new_paginator(token, execute)
20758        }
20759
20760        /// Streams each item in the collection.
20761        pub fn by_item(
20762            self,
20763        ) -> impl google_cloud_gax::paginator::ItemPaginator<
20764            google_cloud_longrunning::model::ListOperationsResponse,
20765            crate::Error,
20766        > {
20767            use google_cloud_gax::paginator::Paginator;
20768            self.by_page().items()
20769        }
20770
20771        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
20772        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20773            self.0.request.name = v.into();
20774            self
20775        }
20776
20777        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
20778        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
20779            self.0.request.filter = v.into();
20780            self
20781        }
20782
20783        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
20784        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
20785            self.0.request.page_size = v.into();
20786            self
20787        }
20788
20789        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
20790        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
20791            self.0.request.page_token = v.into();
20792            self
20793        }
20794
20795        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
20796        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
20797            self.0.request.return_partial_success = v.into();
20798            self
20799        }
20800    }
20801
20802    #[doc(hidden)]
20803    impl crate::RequestBuilder for ListOperations {
20804        fn request_options(&mut self) -> &mut crate::RequestOptions {
20805            &mut self.0.options
20806        }
20807    }
20808
20809    /// The request builder for [DataplexService::get_operation][crate::client::DataplexService::get_operation] calls.
20810    ///
20811    /// # Example
20812    /// ```
20813    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetOperation;
20814    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20815    ///
20816    /// let builder = prepare_request_builder();
20817    /// let response = builder.send().await?;
20818    /// # Ok(()) }
20819    ///
20820    /// fn prepare_request_builder() -> GetOperation {
20821    ///   # panic!();
20822    ///   // ... details omitted ...
20823    /// }
20824    /// ```
20825    #[derive(Clone, Debug)]
20826    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
20827
20828    impl GetOperation {
20829        pub(crate) fn new(
20830            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20831        ) -> Self {
20832            Self(RequestBuilder::new(stub))
20833        }
20834
20835        /// Sets the full request, replacing any prior values.
20836        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
20837            mut self,
20838            v: V,
20839        ) -> Self {
20840            self.0.request = v.into();
20841            self
20842        }
20843
20844        /// Sets all the options, replacing any prior values.
20845        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20846            self.0.options = v.into();
20847            self
20848        }
20849
20850        /// Sends the request.
20851        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
20852            (*self.0.stub)
20853                .get_operation(self.0.request, self.0.options)
20854                .await
20855                .map(crate::Response::into_body)
20856        }
20857
20858        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
20859        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20860            self.0.request.name = v.into();
20861            self
20862        }
20863    }
20864
20865    #[doc(hidden)]
20866    impl crate::RequestBuilder for GetOperation {
20867        fn request_options(&mut self) -> &mut crate::RequestOptions {
20868            &mut self.0.options
20869        }
20870    }
20871
20872    /// The request builder for [DataplexService::delete_operation][crate::client::DataplexService::delete_operation] calls.
20873    ///
20874    /// # Example
20875    /// ```
20876    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteOperation;
20877    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20878    ///
20879    /// let builder = prepare_request_builder();
20880    /// let response = builder.send().await?;
20881    /// # Ok(()) }
20882    ///
20883    /// fn prepare_request_builder() -> DeleteOperation {
20884    ///   # panic!();
20885    ///   // ... details omitted ...
20886    /// }
20887    /// ```
20888    #[derive(Clone, Debug)]
20889    pub struct DeleteOperation(
20890        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
20891    );
20892
20893    impl DeleteOperation {
20894        pub(crate) fn new(
20895            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20896        ) -> Self {
20897            Self(RequestBuilder::new(stub))
20898        }
20899
20900        /// Sets the full request, replacing any prior values.
20901        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
20902            mut self,
20903            v: V,
20904        ) -> Self {
20905            self.0.request = v.into();
20906            self
20907        }
20908
20909        /// Sets all the options, replacing any prior values.
20910        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20911            self.0.options = v.into();
20912            self
20913        }
20914
20915        /// Sends the request.
20916        pub async fn send(self) -> Result<()> {
20917            (*self.0.stub)
20918                .delete_operation(self.0.request, self.0.options)
20919                .await
20920                .map(crate::Response::into_body)
20921        }
20922
20923        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
20924        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20925            self.0.request.name = v.into();
20926            self
20927        }
20928    }
20929
20930    #[doc(hidden)]
20931    impl crate::RequestBuilder for DeleteOperation {
20932        fn request_options(&mut self) -> &mut crate::RequestOptions {
20933            &mut self.0.options
20934        }
20935    }
20936
20937    /// The request builder for [DataplexService::cancel_operation][crate::client::DataplexService::cancel_operation] calls.
20938    ///
20939    /// # Example
20940    /// ```
20941    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CancelOperation;
20942    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20943    ///
20944    /// let builder = prepare_request_builder();
20945    /// let response = builder.send().await?;
20946    /// # Ok(()) }
20947    ///
20948    /// fn prepare_request_builder() -> CancelOperation {
20949    ///   # panic!();
20950    ///   // ... details omitted ...
20951    /// }
20952    /// ```
20953    #[derive(Clone, Debug)]
20954    pub struct CancelOperation(
20955        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
20956    );
20957
20958    impl CancelOperation {
20959        pub(crate) fn new(
20960            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20961        ) -> Self {
20962            Self(RequestBuilder::new(stub))
20963        }
20964
20965        /// Sets the full request, replacing any prior values.
20966        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
20967            mut self,
20968            v: V,
20969        ) -> Self {
20970            self.0.request = v.into();
20971            self
20972        }
20973
20974        /// Sets all the options, replacing any prior values.
20975        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20976            self.0.options = v.into();
20977            self
20978        }
20979
20980        /// Sends the request.
20981        pub async fn send(self) -> Result<()> {
20982            (*self.0.stub)
20983                .cancel_operation(self.0.request, self.0.options)
20984                .await
20985                .map(crate::Response::into_body)
20986        }
20987
20988        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
20989        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20990            self.0.request.name = v.into();
20991            self
20992        }
20993    }
20994
20995    #[doc(hidden)]
20996    impl crate::RequestBuilder for CancelOperation {
20997        fn request_options(&mut self) -> &mut crate::RequestOptions {
20998            &mut self.0.options
20999        }
21000    }
21001}