Skip to main content

google_cloud_dataplex_v1/
builder.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17/// Request and client builders for [BusinessGlossaryService][crate::client::BusinessGlossaryService].
18pub mod business_glossary_service {
19    use crate::Result;
20
21    /// A builder for [BusinessGlossaryService][crate::client::BusinessGlossaryService].
22    ///
23    /// ```
24    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
25    /// # use google_cloud_dataplex_v1::*;
26    /// # use builder::business_glossary_service::ClientBuilder;
27    /// # use client::BusinessGlossaryService;
28    /// let builder : ClientBuilder = BusinessGlossaryService::builder();
29    /// let client = builder
30    ///     .with_endpoint("https://dataplex.googleapis.com")
31    ///     .build().await?;
32    /// # Ok(()) }
33    /// ```
34    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36    pub(crate) mod client {
37        use super::super::super::client::BusinessGlossaryService;
38        pub struct Factory;
39        impl crate::ClientFactory for Factory {
40            type Client = BusinessGlossaryService;
41            type Credentials = gaxi::options::Credentials;
42            async fn build(
43                self,
44                config: gaxi::options::ClientConfig,
45            ) -> crate::ClientBuilderResult<Self::Client> {
46                Self::Client::new(config).await
47            }
48        }
49    }
50
51    /// Common implementation for [crate::client::BusinessGlossaryService] request builders.
52    #[derive(Clone, Debug)]
53    pub(crate) struct RequestBuilder<R: std::default::Default> {
54        stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
55        request: R,
56        options: crate::RequestOptions,
57    }
58
59    impl<R> RequestBuilder<R>
60    where
61        R: std::default::Default,
62    {
63        pub(crate) fn new(
64            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
65        ) -> Self {
66            Self {
67                stub,
68                request: R::default(),
69                options: crate::RequestOptions::default(),
70            }
71        }
72    }
73
74    /// The request builder for [BusinessGlossaryService::create_glossary][crate::client::BusinessGlossaryService::create_glossary] calls.
75    ///
76    /// # Example
77    /// ```
78    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CreateGlossary;
79    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
80    /// use google_cloud_lro::Poller;
81    ///
82    /// let builder = prepare_request_builder();
83    /// let response = builder.poller().until_done().await?;
84    /// # Ok(()) }
85    ///
86    /// fn prepare_request_builder() -> CreateGlossary {
87    ///   # panic!();
88    ///   // ... details omitted ...
89    /// }
90    /// ```
91    #[derive(Clone, Debug)]
92    pub struct CreateGlossary(RequestBuilder<crate::model::CreateGlossaryRequest>);
93
94    impl CreateGlossary {
95        pub(crate) fn new(
96            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
97        ) -> Self {
98            Self(RequestBuilder::new(stub))
99        }
100
101        /// Sets the full request, replacing any prior values.
102        pub fn with_request<V: Into<crate::model::CreateGlossaryRequest>>(mut self, v: V) -> Self {
103            self.0.request = v.into();
104            self
105        }
106
107        /// Sets all the options, replacing any prior values.
108        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
109            self.0.options = v.into();
110            self
111        }
112
113        /// Sends the request.
114        ///
115        /// # Long running operations
116        ///
117        /// This starts, but does not poll, a longrunning operation. More information
118        /// on [create_glossary][crate::client::BusinessGlossaryService::create_glossary].
119        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
120            (*self.0.stub)
121                .create_glossary(self.0.request, self.0.options)
122                .await
123                .map(crate::Response::into_body)
124        }
125
126        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_glossary`.
127        pub fn poller(
128            self,
129        ) -> impl google_cloud_lro::Poller<crate::model::Glossary, crate::model::OperationMetadata>
130        {
131            type Operation = google_cloud_lro::internal::Operation<
132                crate::model::Glossary,
133                crate::model::OperationMetadata,
134            >;
135            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
136            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
137            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
138            if let Some(ref mut details) = poller_options.tracing {
139                details.method_name = "google_cloud_dataplex_v1::client::BusinessGlossaryService::create_glossary::until_done";
140            }
141
142            let stub = self.0.stub.clone();
143            let mut options = self.0.options.clone();
144            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
145            let query = move |name| {
146                let stub = stub.clone();
147                let options = options.clone();
148                async {
149                    let op = GetOperation::new(stub)
150                        .set_name(name)
151                        .with_options(options)
152                        .send()
153                        .await?;
154                    Ok(Operation::new(op))
155                }
156            };
157
158            let start = move || async {
159                let op = self.send().await?;
160                Ok(Operation::new(op))
161            };
162
163            use google_cloud_lro::internal::PollerExt;
164            {
165                google_cloud_lro::internal::new_poller(
166                    polling_error_policy,
167                    polling_backoff_policy,
168                    start,
169                    query,
170                )
171            }
172            .with_options(poller_options)
173        }
174
175        /// Sets the value of [parent][crate::model::CreateGlossaryRequest::parent].
176        ///
177        /// This is a **required** field for requests.
178        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
179            self.0.request.parent = v.into();
180            self
181        }
182
183        /// Sets the value of [glossary_id][crate::model::CreateGlossaryRequest::glossary_id].
184        ///
185        /// This is a **required** field for requests.
186        pub fn set_glossary_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
187            self.0.request.glossary_id = v.into();
188            self
189        }
190
191        /// Sets the value of [glossary][crate::model::CreateGlossaryRequest::glossary].
192        ///
193        /// This is a **required** field for requests.
194        pub fn set_glossary<T>(mut self, v: T) -> Self
195        where
196            T: std::convert::Into<crate::model::Glossary>,
197        {
198            self.0.request.glossary = std::option::Option::Some(v.into());
199            self
200        }
201
202        /// Sets or clears the value of [glossary][crate::model::CreateGlossaryRequest::glossary].
203        ///
204        /// This is a **required** field for requests.
205        pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
206        where
207            T: std::convert::Into<crate::model::Glossary>,
208        {
209            self.0.request.glossary = v.map(|x| x.into());
210            self
211        }
212
213        /// Sets the value of [validate_only][crate::model::CreateGlossaryRequest::validate_only].
214        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
215            self.0.request.validate_only = v.into();
216            self
217        }
218    }
219
220    #[doc(hidden)]
221    impl crate::RequestBuilder for CreateGlossary {
222        fn request_options(&mut self) -> &mut crate::RequestOptions {
223            &mut self.0.options
224        }
225    }
226
227    /// The request builder for [BusinessGlossaryService::update_glossary][crate::client::BusinessGlossaryService::update_glossary] calls.
228    ///
229    /// # Example
230    /// ```
231    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::UpdateGlossary;
232    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
233    /// use google_cloud_lro::Poller;
234    ///
235    /// let builder = prepare_request_builder();
236    /// let response = builder.poller().until_done().await?;
237    /// # Ok(()) }
238    ///
239    /// fn prepare_request_builder() -> UpdateGlossary {
240    ///   # panic!();
241    ///   // ... details omitted ...
242    /// }
243    /// ```
244    #[derive(Clone, Debug)]
245    pub struct UpdateGlossary(RequestBuilder<crate::model::UpdateGlossaryRequest>);
246
247    impl UpdateGlossary {
248        pub(crate) fn new(
249            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
250        ) -> Self {
251            Self(RequestBuilder::new(stub))
252        }
253
254        /// Sets the full request, replacing any prior values.
255        pub fn with_request<V: Into<crate::model::UpdateGlossaryRequest>>(mut self, v: V) -> Self {
256            self.0.request = v.into();
257            self
258        }
259
260        /// Sets all the options, replacing any prior values.
261        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
262            self.0.options = v.into();
263            self
264        }
265
266        /// Sends the request.
267        ///
268        /// # Long running operations
269        ///
270        /// This starts, but does not poll, a longrunning operation. More information
271        /// on [update_glossary][crate::client::BusinessGlossaryService::update_glossary].
272        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
273            (*self.0.stub)
274                .update_glossary(self.0.request, self.0.options)
275                .await
276                .map(crate::Response::into_body)
277        }
278
279        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_glossary`.
280        pub fn poller(
281            self,
282        ) -> impl google_cloud_lro::Poller<crate::model::Glossary, crate::model::OperationMetadata>
283        {
284            type Operation = google_cloud_lro::internal::Operation<
285                crate::model::Glossary,
286                crate::model::OperationMetadata,
287            >;
288            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
289            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
290            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
291            if let Some(ref mut details) = poller_options.tracing {
292                details.method_name = "google_cloud_dataplex_v1::client::BusinessGlossaryService::update_glossary::until_done";
293            }
294
295            let stub = self.0.stub.clone();
296            let mut options = self.0.options.clone();
297            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
298            let query = move |name| {
299                let stub = stub.clone();
300                let options = options.clone();
301                async {
302                    let op = GetOperation::new(stub)
303                        .set_name(name)
304                        .with_options(options)
305                        .send()
306                        .await?;
307                    Ok(Operation::new(op))
308                }
309            };
310
311            let start = move || async {
312                let op = self.send().await?;
313                Ok(Operation::new(op))
314            };
315
316            use google_cloud_lro::internal::PollerExt;
317            {
318                google_cloud_lro::internal::new_poller(
319                    polling_error_policy,
320                    polling_backoff_policy,
321                    start,
322                    query,
323                )
324            }
325            .with_options(poller_options)
326        }
327
328        /// Sets the value of [glossary][crate::model::UpdateGlossaryRequest::glossary].
329        ///
330        /// This is a **required** field for requests.
331        pub fn set_glossary<T>(mut self, v: T) -> Self
332        where
333            T: std::convert::Into<crate::model::Glossary>,
334        {
335            self.0.request.glossary = std::option::Option::Some(v.into());
336            self
337        }
338
339        /// Sets or clears the value of [glossary][crate::model::UpdateGlossaryRequest::glossary].
340        ///
341        /// This is a **required** field for requests.
342        pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
343        where
344            T: std::convert::Into<crate::model::Glossary>,
345        {
346            self.0.request.glossary = v.map(|x| x.into());
347            self
348        }
349
350        /// Sets the value of [update_mask][crate::model::UpdateGlossaryRequest::update_mask].
351        ///
352        /// This is a **required** field for requests.
353        pub fn set_update_mask<T>(mut self, v: T) -> Self
354        where
355            T: std::convert::Into<wkt::FieldMask>,
356        {
357            self.0.request.update_mask = std::option::Option::Some(v.into());
358            self
359        }
360
361        /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryRequest::update_mask].
362        ///
363        /// This is a **required** field for requests.
364        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
365        where
366            T: std::convert::Into<wkt::FieldMask>,
367        {
368            self.0.request.update_mask = v.map(|x| x.into());
369            self
370        }
371
372        /// Sets the value of [validate_only][crate::model::UpdateGlossaryRequest::validate_only].
373        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
374            self.0.request.validate_only = v.into();
375            self
376        }
377    }
378
379    #[doc(hidden)]
380    impl crate::RequestBuilder for UpdateGlossary {
381        fn request_options(&mut self) -> &mut crate::RequestOptions {
382            &mut self.0.options
383        }
384    }
385
386    /// The request builder for [BusinessGlossaryService::delete_glossary][crate::client::BusinessGlossaryService::delete_glossary] calls.
387    ///
388    /// # Example
389    /// ```
390    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteGlossary;
391    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
392    /// use google_cloud_lro::Poller;
393    ///
394    /// let builder = prepare_request_builder();
395    /// let response = builder.poller().until_done().await?;
396    /// # Ok(()) }
397    ///
398    /// fn prepare_request_builder() -> DeleteGlossary {
399    ///   # panic!();
400    ///   // ... details omitted ...
401    /// }
402    /// ```
403    #[derive(Clone, Debug)]
404    pub struct DeleteGlossary(RequestBuilder<crate::model::DeleteGlossaryRequest>);
405
406    impl DeleteGlossary {
407        pub(crate) fn new(
408            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
409        ) -> Self {
410            Self(RequestBuilder::new(stub))
411        }
412
413        /// Sets the full request, replacing any prior values.
414        pub fn with_request<V: Into<crate::model::DeleteGlossaryRequest>>(mut self, v: V) -> Self {
415            self.0.request = v.into();
416            self
417        }
418
419        /// Sets all the options, replacing any prior values.
420        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
421            self.0.options = v.into();
422            self
423        }
424
425        /// Sends the request.
426        ///
427        /// # Long running operations
428        ///
429        /// This starts, but does not poll, a longrunning operation. More information
430        /// on [delete_glossary][crate::client::BusinessGlossaryService::delete_glossary].
431        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
432            (*self.0.stub)
433                .delete_glossary(self.0.request, self.0.options)
434                .await
435                .map(crate::Response::into_body)
436        }
437
438        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_glossary`.
439        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
440            type Operation =
441                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
442            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
443            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
444            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
445            if let Some(ref mut details) = poller_options.tracing {
446                details.method_name = "google_cloud_dataplex_v1::client::BusinessGlossaryService::delete_glossary::until_done";
447            }
448
449            let stub = self.0.stub.clone();
450            let mut options = self.0.options.clone();
451            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
452            let query = move |name| {
453                let stub = stub.clone();
454                let options = options.clone();
455                async {
456                    let op = GetOperation::new(stub)
457                        .set_name(name)
458                        .with_options(options)
459                        .send()
460                        .await?;
461                    Ok(Operation::new(op))
462                }
463            };
464
465            let start = move || async {
466                let op = self.send().await?;
467                Ok(Operation::new(op))
468            };
469
470            use google_cloud_lro::internal::PollerExt;
471            {
472                google_cloud_lro::internal::new_unit_response_poller(
473                    polling_error_policy,
474                    polling_backoff_policy,
475                    start,
476                    query,
477                )
478            }
479            .with_options(poller_options)
480        }
481
482        /// Sets the value of [name][crate::model::DeleteGlossaryRequest::name].
483        ///
484        /// This is a **required** field for requests.
485        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
486            self.0.request.name = v.into();
487            self
488        }
489
490        /// Sets the value of [etag][crate::model::DeleteGlossaryRequest::etag].
491        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
492            self.0.request.etag = v.into();
493            self
494        }
495    }
496
497    #[doc(hidden)]
498    impl crate::RequestBuilder for DeleteGlossary {
499        fn request_options(&mut self) -> &mut crate::RequestOptions {
500            &mut self.0.options
501        }
502    }
503
504    /// The request builder for [BusinessGlossaryService::get_glossary][crate::client::BusinessGlossaryService::get_glossary] calls.
505    ///
506    /// # Example
507    /// ```
508    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetGlossary;
509    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
510    ///
511    /// let builder = prepare_request_builder();
512    /// let response = builder.send().await?;
513    /// # Ok(()) }
514    ///
515    /// fn prepare_request_builder() -> GetGlossary {
516    ///   # panic!();
517    ///   // ... details omitted ...
518    /// }
519    /// ```
520    #[derive(Clone, Debug)]
521    pub struct GetGlossary(RequestBuilder<crate::model::GetGlossaryRequest>);
522
523    impl GetGlossary {
524        pub(crate) fn new(
525            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
526        ) -> Self {
527            Self(RequestBuilder::new(stub))
528        }
529
530        /// Sets the full request, replacing any prior values.
531        pub fn with_request<V: Into<crate::model::GetGlossaryRequest>>(mut self, v: V) -> Self {
532            self.0.request = v.into();
533            self
534        }
535
536        /// Sets all the options, replacing any prior values.
537        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
538            self.0.options = v.into();
539            self
540        }
541
542        /// Sends the request.
543        pub async fn send(self) -> Result<crate::model::Glossary> {
544            (*self.0.stub)
545                .get_glossary(self.0.request, self.0.options)
546                .await
547                .map(crate::Response::into_body)
548        }
549
550        /// Sets the value of [name][crate::model::GetGlossaryRequest::name].
551        ///
552        /// This is a **required** field for requests.
553        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
554            self.0.request.name = v.into();
555            self
556        }
557    }
558
559    #[doc(hidden)]
560    impl crate::RequestBuilder for GetGlossary {
561        fn request_options(&mut self) -> &mut crate::RequestOptions {
562            &mut self.0.options
563        }
564    }
565
566    /// The request builder for [BusinessGlossaryService::list_glossaries][crate::client::BusinessGlossaryService::list_glossaries] calls.
567    ///
568    /// # Example
569    /// ```
570    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListGlossaries;
571    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
572    /// use google_cloud_gax::paginator::ItemPaginator;
573    ///
574    /// let builder = prepare_request_builder();
575    /// let mut items = builder.by_item();
576    /// while let Some(result) = items.next().await {
577    ///   let item = result?;
578    /// }
579    /// # Ok(()) }
580    ///
581    /// fn prepare_request_builder() -> ListGlossaries {
582    ///   # panic!();
583    ///   // ... details omitted ...
584    /// }
585    /// ```
586    #[derive(Clone, Debug)]
587    pub struct ListGlossaries(RequestBuilder<crate::model::ListGlossariesRequest>);
588
589    impl ListGlossaries {
590        pub(crate) fn new(
591            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
592        ) -> Self {
593            Self(RequestBuilder::new(stub))
594        }
595
596        /// Sets the full request, replacing any prior values.
597        pub fn with_request<V: Into<crate::model::ListGlossariesRequest>>(mut self, v: V) -> Self {
598            self.0.request = v.into();
599            self
600        }
601
602        /// Sets all the options, replacing any prior values.
603        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
604            self.0.options = v.into();
605            self
606        }
607
608        /// Sends the request.
609        pub async fn send(self) -> Result<crate::model::ListGlossariesResponse> {
610            (*self.0.stub)
611                .list_glossaries(self.0.request, self.0.options)
612                .await
613                .map(crate::Response::into_body)
614        }
615
616        /// Streams each page in the collection.
617        pub fn by_page(
618            self,
619        ) -> impl google_cloud_gax::paginator::Paginator<
620            crate::model::ListGlossariesResponse,
621            crate::Error,
622        > {
623            use std::clone::Clone;
624            let token = self.0.request.page_token.clone();
625            let execute = move |token: String| {
626                let mut builder = self.clone();
627                builder.0.request = builder.0.request.set_page_token(token);
628                builder.send()
629            };
630            google_cloud_gax::paginator::internal::new_paginator(token, execute)
631        }
632
633        /// Streams each item in the collection.
634        pub fn by_item(
635            self,
636        ) -> impl google_cloud_gax::paginator::ItemPaginator<
637            crate::model::ListGlossariesResponse,
638            crate::Error,
639        > {
640            use google_cloud_gax::paginator::Paginator;
641            self.by_page().items()
642        }
643
644        /// Sets the value of [parent][crate::model::ListGlossariesRequest::parent].
645        ///
646        /// This is a **required** field for requests.
647        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
648            self.0.request.parent = v.into();
649            self
650        }
651
652        /// Sets the value of [page_size][crate::model::ListGlossariesRequest::page_size].
653        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
654            self.0.request.page_size = v.into();
655            self
656        }
657
658        /// Sets the value of [page_token][crate::model::ListGlossariesRequest::page_token].
659        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
660            self.0.request.page_token = v.into();
661            self
662        }
663
664        /// Sets the value of [filter][crate::model::ListGlossariesRequest::filter].
665        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
666            self.0.request.filter = v.into();
667            self
668        }
669
670        /// Sets the value of [order_by][crate::model::ListGlossariesRequest::order_by].
671        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
672            self.0.request.order_by = v.into();
673            self
674        }
675    }
676
677    #[doc(hidden)]
678    impl crate::RequestBuilder for ListGlossaries {
679        fn request_options(&mut self) -> &mut crate::RequestOptions {
680            &mut self.0.options
681        }
682    }
683
684    /// The request builder for [BusinessGlossaryService::create_glossary_category][crate::client::BusinessGlossaryService::create_glossary_category] calls.
685    ///
686    /// # Example
687    /// ```
688    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CreateGlossaryCategory;
689    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
690    ///
691    /// let builder = prepare_request_builder();
692    /// let response = builder.send().await?;
693    /// # Ok(()) }
694    ///
695    /// fn prepare_request_builder() -> CreateGlossaryCategory {
696    ///   # panic!();
697    ///   // ... details omitted ...
698    /// }
699    /// ```
700    #[derive(Clone, Debug)]
701    pub struct CreateGlossaryCategory(RequestBuilder<crate::model::CreateGlossaryCategoryRequest>);
702
703    impl CreateGlossaryCategory {
704        pub(crate) fn new(
705            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
706        ) -> Self {
707            Self(RequestBuilder::new(stub))
708        }
709
710        /// Sets the full request, replacing any prior values.
711        pub fn with_request<V: Into<crate::model::CreateGlossaryCategoryRequest>>(
712            mut self,
713            v: V,
714        ) -> Self {
715            self.0.request = v.into();
716            self
717        }
718
719        /// Sets all the options, replacing any prior values.
720        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
721            self.0.options = v.into();
722            self
723        }
724
725        /// Sends the request.
726        pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
727            (*self.0.stub)
728                .create_glossary_category(self.0.request, self.0.options)
729                .await
730                .map(crate::Response::into_body)
731        }
732
733        /// Sets the value of [parent][crate::model::CreateGlossaryCategoryRequest::parent].
734        ///
735        /// This is a **required** field for requests.
736        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
737            self.0.request.parent = v.into();
738            self
739        }
740
741        /// Sets the value of [category_id][crate::model::CreateGlossaryCategoryRequest::category_id].
742        ///
743        /// This is a **required** field for requests.
744        pub fn set_category_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
745            self.0.request.category_id = v.into();
746            self
747        }
748
749        /// Sets the value of [category][crate::model::CreateGlossaryCategoryRequest::category].
750        ///
751        /// This is a **required** field for requests.
752        pub fn set_category<T>(mut self, v: T) -> Self
753        where
754            T: std::convert::Into<crate::model::GlossaryCategory>,
755        {
756            self.0.request.category = std::option::Option::Some(v.into());
757            self
758        }
759
760        /// Sets or clears the value of [category][crate::model::CreateGlossaryCategoryRequest::category].
761        ///
762        /// This is a **required** field for requests.
763        pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
764        where
765            T: std::convert::Into<crate::model::GlossaryCategory>,
766        {
767            self.0.request.category = v.map(|x| x.into());
768            self
769        }
770    }
771
772    #[doc(hidden)]
773    impl crate::RequestBuilder for CreateGlossaryCategory {
774        fn request_options(&mut self) -> &mut crate::RequestOptions {
775            &mut self.0.options
776        }
777    }
778
779    /// The request builder for [BusinessGlossaryService::update_glossary_category][crate::client::BusinessGlossaryService::update_glossary_category] calls.
780    ///
781    /// # Example
782    /// ```
783    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::UpdateGlossaryCategory;
784    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
785    ///
786    /// let builder = prepare_request_builder();
787    /// let response = builder.send().await?;
788    /// # Ok(()) }
789    ///
790    /// fn prepare_request_builder() -> UpdateGlossaryCategory {
791    ///   # panic!();
792    ///   // ... details omitted ...
793    /// }
794    /// ```
795    #[derive(Clone, Debug)]
796    pub struct UpdateGlossaryCategory(RequestBuilder<crate::model::UpdateGlossaryCategoryRequest>);
797
798    impl UpdateGlossaryCategory {
799        pub(crate) fn new(
800            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
801        ) -> Self {
802            Self(RequestBuilder::new(stub))
803        }
804
805        /// Sets the full request, replacing any prior values.
806        pub fn with_request<V: Into<crate::model::UpdateGlossaryCategoryRequest>>(
807            mut self,
808            v: V,
809        ) -> Self {
810            self.0.request = v.into();
811            self
812        }
813
814        /// Sets all the options, replacing any prior values.
815        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
816            self.0.options = v.into();
817            self
818        }
819
820        /// Sends the request.
821        pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
822            (*self.0.stub)
823                .update_glossary_category(self.0.request, self.0.options)
824                .await
825                .map(crate::Response::into_body)
826        }
827
828        /// Sets the value of [category][crate::model::UpdateGlossaryCategoryRequest::category].
829        ///
830        /// This is a **required** field for requests.
831        pub fn set_category<T>(mut self, v: T) -> Self
832        where
833            T: std::convert::Into<crate::model::GlossaryCategory>,
834        {
835            self.0.request.category = std::option::Option::Some(v.into());
836            self
837        }
838
839        /// Sets or clears the value of [category][crate::model::UpdateGlossaryCategoryRequest::category].
840        ///
841        /// This is a **required** field for requests.
842        pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
843        where
844            T: std::convert::Into<crate::model::GlossaryCategory>,
845        {
846            self.0.request.category = v.map(|x| x.into());
847            self
848        }
849
850        /// Sets the value of [update_mask][crate::model::UpdateGlossaryCategoryRequest::update_mask].
851        ///
852        /// This is a **required** field for requests.
853        pub fn set_update_mask<T>(mut self, v: T) -> Self
854        where
855            T: std::convert::Into<wkt::FieldMask>,
856        {
857            self.0.request.update_mask = std::option::Option::Some(v.into());
858            self
859        }
860
861        /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryCategoryRequest::update_mask].
862        ///
863        /// This is a **required** field for requests.
864        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
865        where
866            T: std::convert::Into<wkt::FieldMask>,
867        {
868            self.0.request.update_mask = v.map(|x| x.into());
869            self
870        }
871    }
872
873    #[doc(hidden)]
874    impl crate::RequestBuilder for UpdateGlossaryCategory {
875        fn request_options(&mut self) -> &mut crate::RequestOptions {
876            &mut self.0.options
877        }
878    }
879
880    /// The request builder for [BusinessGlossaryService::delete_glossary_category][crate::client::BusinessGlossaryService::delete_glossary_category] calls.
881    ///
882    /// # Example
883    /// ```
884    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteGlossaryCategory;
885    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
886    ///
887    /// let builder = prepare_request_builder();
888    /// let response = builder.send().await?;
889    /// # Ok(()) }
890    ///
891    /// fn prepare_request_builder() -> DeleteGlossaryCategory {
892    ///   # panic!();
893    ///   // ... details omitted ...
894    /// }
895    /// ```
896    #[derive(Clone, Debug)]
897    pub struct DeleteGlossaryCategory(RequestBuilder<crate::model::DeleteGlossaryCategoryRequest>);
898
899    impl DeleteGlossaryCategory {
900        pub(crate) fn new(
901            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
902        ) -> Self {
903            Self(RequestBuilder::new(stub))
904        }
905
906        /// Sets the full request, replacing any prior values.
907        pub fn with_request<V: Into<crate::model::DeleteGlossaryCategoryRequest>>(
908            mut self,
909            v: V,
910        ) -> Self {
911            self.0.request = v.into();
912            self
913        }
914
915        /// Sets all the options, replacing any prior values.
916        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
917            self.0.options = v.into();
918            self
919        }
920
921        /// Sends the request.
922        pub async fn send(self) -> Result<()> {
923            (*self.0.stub)
924                .delete_glossary_category(self.0.request, self.0.options)
925                .await
926                .map(crate::Response::into_body)
927        }
928
929        /// Sets the value of [name][crate::model::DeleteGlossaryCategoryRequest::name].
930        ///
931        /// This is a **required** field for requests.
932        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
933            self.0.request.name = v.into();
934            self
935        }
936    }
937
938    #[doc(hidden)]
939    impl crate::RequestBuilder for DeleteGlossaryCategory {
940        fn request_options(&mut self) -> &mut crate::RequestOptions {
941            &mut self.0.options
942        }
943    }
944
945    /// The request builder for [BusinessGlossaryService::get_glossary_category][crate::client::BusinessGlossaryService::get_glossary_category] calls.
946    ///
947    /// # Example
948    /// ```
949    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetGlossaryCategory;
950    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
951    ///
952    /// let builder = prepare_request_builder();
953    /// let response = builder.send().await?;
954    /// # Ok(()) }
955    ///
956    /// fn prepare_request_builder() -> GetGlossaryCategory {
957    ///   # panic!();
958    ///   // ... details omitted ...
959    /// }
960    /// ```
961    #[derive(Clone, Debug)]
962    pub struct GetGlossaryCategory(RequestBuilder<crate::model::GetGlossaryCategoryRequest>);
963
964    impl GetGlossaryCategory {
965        pub(crate) fn new(
966            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
967        ) -> Self {
968            Self(RequestBuilder::new(stub))
969        }
970
971        /// Sets the full request, replacing any prior values.
972        pub fn with_request<V: Into<crate::model::GetGlossaryCategoryRequest>>(
973            mut self,
974            v: V,
975        ) -> Self {
976            self.0.request = v.into();
977            self
978        }
979
980        /// Sets all the options, replacing any prior values.
981        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
982            self.0.options = v.into();
983            self
984        }
985
986        /// Sends the request.
987        pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
988            (*self.0.stub)
989                .get_glossary_category(self.0.request, self.0.options)
990                .await
991                .map(crate::Response::into_body)
992        }
993
994        /// Sets the value of [name][crate::model::GetGlossaryCategoryRequest::name].
995        ///
996        /// This is a **required** field for requests.
997        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
998            self.0.request.name = v.into();
999            self
1000        }
1001    }
1002
1003    #[doc(hidden)]
1004    impl crate::RequestBuilder for GetGlossaryCategory {
1005        fn request_options(&mut self) -> &mut crate::RequestOptions {
1006            &mut self.0.options
1007        }
1008    }
1009
1010    /// The request builder for [BusinessGlossaryService::list_glossary_categories][crate::client::BusinessGlossaryService::list_glossary_categories] calls.
1011    ///
1012    /// # Example
1013    /// ```
1014    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListGlossaryCategories;
1015    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1016    /// use google_cloud_gax::paginator::ItemPaginator;
1017    ///
1018    /// let builder = prepare_request_builder();
1019    /// let mut items = builder.by_item();
1020    /// while let Some(result) = items.next().await {
1021    ///   let item = result?;
1022    /// }
1023    /// # Ok(()) }
1024    ///
1025    /// fn prepare_request_builder() -> ListGlossaryCategories {
1026    ///   # panic!();
1027    ///   // ... details omitted ...
1028    /// }
1029    /// ```
1030    #[derive(Clone, Debug)]
1031    pub struct ListGlossaryCategories(RequestBuilder<crate::model::ListGlossaryCategoriesRequest>);
1032
1033    impl ListGlossaryCategories {
1034        pub(crate) fn new(
1035            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1036        ) -> Self {
1037            Self(RequestBuilder::new(stub))
1038        }
1039
1040        /// Sets the full request, replacing any prior values.
1041        pub fn with_request<V: Into<crate::model::ListGlossaryCategoriesRequest>>(
1042            mut self,
1043            v: V,
1044        ) -> Self {
1045            self.0.request = v.into();
1046            self
1047        }
1048
1049        /// Sets all the options, replacing any prior values.
1050        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1051            self.0.options = v.into();
1052            self
1053        }
1054
1055        /// Sends the request.
1056        pub async fn send(self) -> Result<crate::model::ListGlossaryCategoriesResponse> {
1057            (*self.0.stub)
1058                .list_glossary_categories(self.0.request, self.0.options)
1059                .await
1060                .map(crate::Response::into_body)
1061        }
1062
1063        /// Streams each page in the collection.
1064        pub fn by_page(
1065            self,
1066        ) -> impl google_cloud_gax::paginator::Paginator<
1067            crate::model::ListGlossaryCategoriesResponse,
1068            crate::Error,
1069        > {
1070            use std::clone::Clone;
1071            let token = self.0.request.page_token.clone();
1072            let execute = move |token: String| {
1073                let mut builder = self.clone();
1074                builder.0.request = builder.0.request.set_page_token(token);
1075                builder.send()
1076            };
1077            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1078        }
1079
1080        /// Streams each item in the collection.
1081        pub fn by_item(
1082            self,
1083        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1084            crate::model::ListGlossaryCategoriesResponse,
1085            crate::Error,
1086        > {
1087            use google_cloud_gax::paginator::Paginator;
1088            self.by_page().items()
1089        }
1090
1091        /// Sets the value of [parent][crate::model::ListGlossaryCategoriesRequest::parent].
1092        ///
1093        /// This is a **required** field for requests.
1094        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1095            self.0.request.parent = v.into();
1096            self
1097        }
1098
1099        /// Sets the value of [page_size][crate::model::ListGlossaryCategoriesRequest::page_size].
1100        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1101            self.0.request.page_size = v.into();
1102            self
1103        }
1104
1105        /// Sets the value of [page_token][crate::model::ListGlossaryCategoriesRequest::page_token].
1106        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1107            self.0.request.page_token = v.into();
1108            self
1109        }
1110
1111        /// Sets the value of [filter][crate::model::ListGlossaryCategoriesRequest::filter].
1112        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1113            self.0.request.filter = v.into();
1114            self
1115        }
1116
1117        /// Sets the value of [order_by][crate::model::ListGlossaryCategoriesRequest::order_by].
1118        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1119            self.0.request.order_by = v.into();
1120            self
1121        }
1122    }
1123
1124    #[doc(hidden)]
1125    impl crate::RequestBuilder for ListGlossaryCategories {
1126        fn request_options(&mut self) -> &mut crate::RequestOptions {
1127            &mut self.0.options
1128        }
1129    }
1130
1131    /// The request builder for [BusinessGlossaryService::create_glossary_term][crate::client::BusinessGlossaryService::create_glossary_term] calls.
1132    ///
1133    /// # Example
1134    /// ```
1135    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CreateGlossaryTerm;
1136    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1137    ///
1138    /// let builder = prepare_request_builder();
1139    /// let response = builder.send().await?;
1140    /// # Ok(()) }
1141    ///
1142    /// fn prepare_request_builder() -> CreateGlossaryTerm {
1143    ///   # panic!();
1144    ///   // ... details omitted ...
1145    /// }
1146    /// ```
1147    #[derive(Clone, Debug)]
1148    pub struct CreateGlossaryTerm(RequestBuilder<crate::model::CreateGlossaryTermRequest>);
1149
1150    impl CreateGlossaryTerm {
1151        pub(crate) fn new(
1152            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1153        ) -> Self {
1154            Self(RequestBuilder::new(stub))
1155        }
1156
1157        /// Sets the full request, replacing any prior values.
1158        pub fn with_request<V: Into<crate::model::CreateGlossaryTermRequest>>(
1159            mut self,
1160            v: V,
1161        ) -> Self {
1162            self.0.request = v.into();
1163            self
1164        }
1165
1166        /// Sets all the options, replacing any prior values.
1167        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1168            self.0.options = v.into();
1169            self
1170        }
1171
1172        /// Sends the request.
1173        pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1174            (*self.0.stub)
1175                .create_glossary_term(self.0.request, self.0.options)
1176                .await
1177                .map(crate::Response::into_body)
1178        }
1179
1180        /// Sets the value of [parent][crate::model::CreateGlossaryTermRequest::parent].
1181        ///
1182        /// This is a **required** field for requests.
1183        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1184            self.0.request.parent = v.into();
1185            self
1186        }
1187
1188        /// Sets the value of [term_id][crate::model::CreateGlossaryTermRequest::term_id].
1189        ///
1190        /// This is a **required** field for requests.
1191        pub fn set_term_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1192            self.0.request.term_id = v.into();
1193            self
1194        }
1195
1196        /// Sets the value of [term][crate::model::CreateGlossaryTermRequest::term].
1197        ///
1198        /// This is a **required** field for requests.
1199        pub fn set_term<T>(mut self, v: T) -> Self
1200        where
1201            T: std::convert::Into<crate::model::GlossaryTerm>,
1202        {
1203            self.0.request.term = std::option::Option::Some(v.into());
1204            self
1205        }
1206
1207        /// Sets or clears the value of [term][crate::model::CreateGlossaryTermRequest::term].
1208        ///
1209        /// This is a **required** field for requests.
1210        pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
1211        where
1212            T: std::convert::Into<crate::model::GlossaryTerm>,
1213        {
1214            self.0.request.term = v.map(|x| x.into());
1215            self
1216        }
1217    }
1218
1219    #[doc(hidden)]
1220    impl crate::RequestBuilder for CreateGlossaryTerm {
1221        fn request_options(&mut self) -> &mut crate::RequestOptions {
1222            &mut self.0.options
1223        }
1224    }
1225
1226    /// The request builder for [BusinessGlossaryService::update_glossary_term][crate::client::BusinessGlossaryService::update_glossary_term] calls.
1227    ///
1228    /// # Example
1229    /// ```
1230    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::UpdateGlossaryTerm;
1231    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1232    ///
1233    /// let builder = prepare_request_builder();
1234    /// let response = builder.send().await?;
1235    /// # Ok(()) }
1236    ///
1237    /// fn prepare_request_builder() -> UpdateGlossaryTerm {
1238    ///   # panic!();
1239    ///   // ... details omitted ...
1240    /// }
1241    /// ```
1242    #[derive(Clone, Debug)]
1243    pub struct UpdateGlossaryTerm(RequestBuilder<crate::model::UpdateGlossaryTermRequest>);
1244
1245    impl UpdateGlossaryTerm {
1246        pub(crate) fn new(
1247            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1248        ) -> Self {
1249            Self(RequestBuilder::new(stub))
1250        }
1251
1252        /// Sets the full request, replacing any prior values.
1253        pub fn with_request<V: Into<crate::model::UpdateGlossaryTermRequest>>(
1254            mut self,
1255            v: V,
1256        ) -> Self {
1257            self.0.request = v.into();
1258            self
1259        }
1260
1261        /// Sets all the options, replacing any prior values.
1262        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1263            self.0.options = v.into();
1264            self
1265        }
1266
1267        /// Sends the request.
1268        pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1269            (*self.0.stub)
1270                .update_glossary_term(self.0.request, self.0.options)
1271                .await
1272                .map(crate::Response::into_body)
1273        }
1274
1275        /// Sets the value of [term][crate::model::UpdateGlossaryTermRequest::term].
1276        ///
1277        /// This is a **required** field for requests.
1278        pub fn set_term<T>(mut self, v: T) -> Self
1279        where
1280            T: std::convert::Into<crate::model::GlossaryTerm>,
1281        {
1282            self.0.request.term = std::option::Option::Some(v.into());
1283            self
1284        }
1285
1286        /// Sets or clears the value of [term][crate::model::UpdateGlossaryTermRequest::term].
1287        ///
1288        /// This is a **required** field for requests.
1289        pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
1290        where
1291            T: std::convert::Into<crate::model::GlossaryTerm>,
1292        {
1293            self.0.request.term = v.map(|x| x.into());
1294            self
1295        }
1296
1297        /// Sets the value of [update_mask][crate::model::UpdateGlossaryTermRequest::update_mask].
1298        ///
1299        /// This is a **required** field for requests.
1300        pub fn set_update_mask<T>(mut self, v: T) -> Self
1301        where
1302            T: std::convert::Into<wkt::FieldMask>,
1303        {
1304            self.0.request.update_mask = std::option::Option::Some(v.into());
1305            self
1306        }
1307
1308        /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryTermRequest::update_mask].
1309        ///
1310        /// This is a **required** field for requests.
1311        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1312        where
1313            T: std::convert::Into<wkt::FieldMask>,
1314        {
1315            self.0.request.update_mask = v.map(|x| x.into());
1316            self
1317        }
1318    }
1319
1320    #[doc(hidden)]
1321    impl crate::RequestBuilder for UpdateGlossaryTerm {
1322        fn request_options(&mut self) -> &mut crate::RequestOptions {
1323            &mut self.0.options
1324        }
1325    }
1326
1327    /// The request builder for [BusinessGlossaryService::delete_glossary_term][crate::client::BusinessGlossaryService::delete_glossary_term] calls.
1328    ///
1329    /// # Example
1330    /// ```
1331    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteGlossaryTerm;
1332    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1333    ///
1334    /// let builder = prepare_request_builder();
1335    /// let response = builder.send().await?;
1336    /// # Ok(()) }
1337    ///
1338    /// fn prepare_request_builder() -> DeleteGlossaryTerm {
1339    ///   # panic!();
1340    ///   // ... details omitted ...
1341    /// }
1342    /// ```
1343    #[derive(Clone, Debug)]
1344    pub struct DeleteGlossaryTerm(RequestBuilder<crate::model::DeleteGlossaryTermRequest>);
1345
1346    impl DeleteGlossaryTerm {
1347        pub(crate) fn new(
1348            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1349        ) -> Self {
1350            Self(RequestBuilder::new(stub))
1351        }
1352
1353        /// Sets the full request, replacing any prior values.
1354        pub fn with_request<V: Into<crate::model::DeleteGlossaryTermRequest>>(
1355            mut self,
1356            v: V,
1357        ) -> Self {
1358            self.0.request = v.into();
1359            self
1360        }
1361
1362        /// Sets all the options, replacing any prior values.
1363        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1364            self.0.options = v.into();
1365            self
1366        }
1367
1368        /// Sends the request.
1369        pub async fn send(self) -> Result<()> {
1370            (*self.0.stub)
1371                .delete_glossary_term(self.0.request, self.0.options)
1372                .await
1373                .map(crate::Response::into_body)
1374        }
1375
1376        /// Sets the value of [name][crate::model::DeleteGlossaryTermRequest::name].
1377        ///
1378        /// This is a **required** field for requests.
1379        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1380            self.0.request.name = v.into();
1381            self
1382        }
1383    }
1384
1385    #[doc(hidden)]
1386    impl crate::RequestBuilder for DeleteGlossaryTerm {
1387        fn request_options(&mut self) -> &mut crate::RequestOptions {
1388            &mut self.0.options
1389        }
1390    }
1391
1392    /// The request builder for [BusinessGlossaryService::get_glossary_term][crate::client::BusinessGlossaryService::get_glossary_term] calls.
1393    ///
1394    /// # Example
1395    /// ```
1396    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetGlossaryTerm;
1397    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1398    ///
1399    /// let builder = prepare_request_builder();
1400    /// let response = builder.send().await?;
1401    /// # Ok(()) }
1402    ///
1403    /// fn prepare_request_builder() -> GetGlossaryTerm {
1404    ///   # panic!();
1405    ///   // ... details omitted ...
1406    /// }
1407    /// ```
1408    #[derive(Clone, Debug)]
1409    pub struct GetGlossaryTerm(RequestBuilder<crate::model::GetGlossaryTermRequest>);
1410
1411    impl GetGlossaryTerm {
1412        pub(crate) fn new(
1413            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1414        ) -> Self {
1415            Self(RequestBuilder::new(stub))
1416        }
1417
1418        /// Sets the full request, replacing any prior values.
1419        pub fn with_request<V: Into<crate::model::GetGlossaryTermRequest>>(mut self, v: V) -> Self {
1420            self.0.request = v.into();
1421            self
1422        }
1423
1424        /// Sets all the options, replacing any prior values.
1425        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1426            self.0.options = v.into();
1427            self
1428        }
1429
1430        /// Sends the request.
1431        pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1432            (*self.0.stub)
1433                .get_glossary_term(self.0.request, self.0.options)
1434                .await
1435                .map(crate::Response::into_body)
1436        }
1437
1438        /// Sets the value of [name][crate::model::GetGlossaryTermRequest::name].
1439        ///
1440        /// This is a **required** field for requests.
1441        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1442            self.0.request.name = v.into();
1443            self
1444        }
1445    }
1446
1447    #[doc(hidden)]
1448    impl crate::RequestBuilder for GetGlossaryTerm {
1449        fn request_options(&mut self) -> &mut crate::RequestOptions {
1450            &mut self.0.options
1451        }
1452    }
1453
1454    /// The request builder for [BusinessGlossaryService::list_glossary_terms][crate::client::BusinessGlossaryService::list_glossary_terms] calls.
1455    ///
1456    /// # Example
1457    /// ```
1458    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListGlossaryTerms;
1459    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1460    /// use google_cloud_gax::paginator::ItemPaginator;
1461    ///
1462    /// let builder = prepare_request_builder();
1463    /// let mut items = builder.by_item();
1464    /// while let Some(result) = items.next().await {
1465    ///   let item = result?;
1466    /// }
1467    /// # Ok(()) }
1468    ///
1469    /// fn prepare_request_builder() -> ListGlossaryTerms {
1470    ///   # panic!();
1471    ///   // ... details omitted ...
1472    /// }
1473    /// ```
1474    #[derive(Clone, Debug)]
1475    pub struct ListGlossaryTerms(RequestBuilder<crate::model::ListGlossaryTermsRequest>);
1476
1477    impl ListGlossaryTerms {
1478        pub(crate) fn new(
1479            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1480        ) -> Self {
1481            Self(RequestBuilder::new(stub))
1482        }
1483
1484        /// Sets the full request, replacing any prior values.
1485        pub fn with_request<V: Into<crate::model::ListGlossaryTermsRequest>>(
1486            mut self,
1487            v: V,
1488        ) -> Self {
1489            self.0.request = v.into();
1490            self
1491        }
1492
1493        /// Sets all the options, replacing any prior values.
1494        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1495            self.0.options = v.into();
1496            self
1497        }
1498
1499        /// Sends the request.
1500        pub async fn send(self) -> Result<crate::model::ListGlossaryTermsResponse> {
1501            (*self.0.stub)
1502                .list_glossary_terms(self.0.request, self.0.options)
1503                .await
1504                .map(crate::Response::into_body)
1505        }
1506
1507        /// Streams each page in the collection.
1508        pub fn by_page(
1509            self,
1510        ) -> impl google_cloud_gax::paginator::Paginator<
1511            crate::model::ListGlossaryTermsResponse,
1512            crate::Error,
1513        > {
1514            use std::clone::Clone;
1515            let token = self.0.request.page_token.clone();
1516            let execute = move |token: String| {
1517                let mut builder = self.clone();
1518                builder.0.request = builder.0.request.set_page_token(token);
1519                builder.send()
1520            };
1521            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1522        }
1523
1524        /// Streams each item in the collection.
1525        pub fn by_item(
1526            self,
1527        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1528            crate::model::ListGlossaryTermsResponse,
1529            crate::Error,
1530        > {
1531            use google_cloud_gax::paginator::Paginator;
1532            self.by_page().items()
1533        }
1534
1535        /// Sets the value of [parent][crate::model::ListGlossaryTermsRequest::parent].
1536        ///
1537        /// This is a **required** field for requests.
1538        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1539            self.0.request.parent = v.into();
1540            self
1541        }
1542
1543        /// Sets the value of [page_size][crate::model::ListGlossaryTermsRequest::page_size].
1544        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1545            self.0.request.page_size = v.into();
1546            self
1547        }
1548
1549        /// Sets the value of [page_token][crate::model::ListGlossaryTermsRequest::page_token].
1550        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1551            self.0.request.page_token = v.into();
1552            self
1553        }
1554
1555        /// Sets the value of [filter][crate::model::ListGlossaryTermsRequest::filter].
1556        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1557            self.0.request.filter = v.into();
1558            self
1559        }
1560
1561        /// Sets the value of [order_by][crate::model::ListGlossaryTermsRequest::order_by].
1562        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1563            self.0.request.order_by = v.into();
1564            self
1565        }
1566    }
1567
1568    #[doc(hidden)]
1569    impl crate::RequestBuilder for ListGlossaryTerms {
1570        fn request_options(&mut self) -> &mut crate::RequestOptions {
1571            &mut self.0.options
1572        }
1573    }
1574
1575    /// The request builder for [BusinessGlossaryService::list_locations][crate::client::BusinessGlossaryService::list_locations] calls.
1576    ///
1577    /// # Example
1578    /// ```
1579    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListLocations;
1580    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1581    /// use google_cloud_gax::paginator::ItemPaginator;
1582    ///
1583    /// let builder = prepare_request_builder();
1584    /// let mut items = builder.by_item();
1585    /// while let Some(result) = items.next().await {
1586    ///   let item = result?;
1587    /// }
1588    /// # Ok(()) }
1589    ///
1590    /// fn prepare_request_builder() -> ListLocations {
1591    ///   # panic!();
1592    ///   // ... details omitted ...
1593    /// }
1594    /// ```
1595    #[derive(Clone, Debug)]
1596    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
1597
1598    impl ListLocations {
1599        pub(crate) fn new(
1600            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1601        ) -> Self {
1602            Self(RequestBuilder::new(stub))
1603        }
1604
1605        /// Sets the full request, replacing any prior values.
1606        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
1607            mut self,
1608            v: V,
1609        ) -> Self {
1610            self.0.request = v.into();
1611            self
1612        }
1613
1614        /// Sets all the options, replacing any prior values.
1615        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1616            self.0.options = v.into();
1617            self
1618        }
1619
1620        /// Sends the request.
1621        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
1622            (*self.0.stub)
1623                .list_locations(self.0.request, self.0.options)
1624                .await
1625                .map(crate::Response::into_body)
1626        }
1627
1628        /// Streams each page in the collection.
1629        pub fn by_page(
1630            self,
1631        ) -> impl google_cloud_gax::paginator::Paginator<
1632            google_cloud_location::model::ListLocationsResponse,
1633            crate::Error,
1634        > {
1635            use std::clone::Clone;
1636            let token = self.0.request.page_token.clone();
1637            let execute = move |token: String| {
1638                let mut builder = self.clone();
1639                builder.0.request = builder.0.request.set_page_token(token);
1640                builder.send()
1641            };
1642            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1643        }
1644
1645        /// Streams each item in the collection.
1646        pub fn by_item(
1647            self,
1648        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1649            google_cloud_location::model::ListLocationsResponse,
1650            crate::Error,
1651        > {
1652            use google_cloud_gax::paginator::Paginator;
1653            self.by_page().items()
1654        }
1655
1656        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
1657        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1658            self.0.request.name = v.into();
1659            self
1660        }
1661
1662        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
1663        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1664            self.0.request.filter = v.into();
1665            self
1666        }
1667
1668        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
1669        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1670            self.0.request.page_size = v.into();
1671            self
1672        }
1673
1674        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
1675        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1676            self.0.request.page_token = v.into();
1677            self
1678        }
1679    }
1680
1681    #[doc(hidden)]
1682    impl crate::RequestBuilder for ListLocations {
1683        fn request_options(&mut self) -> &mut crate::RequestOptions {
1684            &mut self.0.options
1685        }
1686    }
1687
1688    /// The request builder for [BusinessGlossaryService::get_location][crate::client::BusinessGlossaryService::get_location] calls.
1689    ///
1690    /// # Example
1691    /// ```
1692    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetLocation;
1693    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1694    ///
1695    /// let builder = prepare_request_builder();
1696    /// let response = builder.send().await?;
1697    /// # Ok(()) }
1698    ///
1699    /// fn prepare_request_builder() -> GetLocation {
1700    ///   # panic!();
1701    ///   // ... details omitted ...
1702    /// }
1703    /// ```
1704    #[derive(Clone, Debug)]
1705    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
1706
1707    impl GetLocation {
1708        pub(crate) fn new(
1709            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1710        ) -> Self {
1711            Self(RequestBuilder::new(stub))
1712        }
1713
1714        /// Sets the full request, replacing any prior values.
1715        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
1716            mut self,
1717            v: V,
1718        ) -> Self {
1719            self.0.request = v.into();
1720            self
1721        }
1722
1723        /// Sets all the options, replacing any prior values.
1724        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1725            self.0.options = v.into();
1726            self
1727        }
1728
1729        /// Sends the request.
1730        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
1731            (*self.0.stub)
1732                .get_location(self.0.request, self.0.options)
1733                .await
1734                .map(crate::Response::into_body)
1735        }
1736
1737        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
1738        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1739            self.0.request.name = v.into();
1740            self
1741        }
1742    }
1743
1744    #[doc(hidden)]
1745    impl crate::RequestBuilder for GetLocation {
1746        fn request_options(&mut self) -> &mut crate::RequestOptions {
1747            &mut self.0.options
1748        }
1749    }
1750
1751    /// The request builder for [BusinessGlossaryService::set_iam_policy][crate::client::BusinessGlossaryService::set_iam_policy] calls.
1752    ///
1753    /// # Example
1754    /// ```
1755    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::SetIamPolicy;
1756    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1757    ///
1758    /// let builder = prepare_request_builder();
1759    /// let response = builder.send().await?;
1760    /// # Ok(()) }
1761    ///
1762    /// fn prepare_request_builder() -> SetIamPolicy {
1763    ///   # panic!();
1764    ///   // ... details omitted ...
1765    /// }
1766    /// ```
1767    #[derive(Clone, Debug)]
1768    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
1769
1770    impl SetIamPolicy {
1771        pub(crate) fn new(
1772            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1773        ) -> Self {
1774            Self(RequestBuilder::new(stub))
1775        }
1776
1777        /// Sets the full request, replacing any prior values.
1778        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
1779            mut self,
1780            v: V,
1781        ) -> Self {
1782            self.0.request = v.into();
1783            self
1784        }
1785
1786        /// Sets all the options, replacing any prior values.
1787        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1788            self.0.options = v.into();
1789            self
1790        }
1791
1792        /// Sends the request.
1793        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
1794            (*self.0.stub)
1795                .set_iam_policy(self.0.request, self.0.options)
1796                .await
1797                .map(crate::Response::into_body)
1798        }
1799
1800        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
1801        ///
1802        /// This is a **required** field for requests.
1803        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1804            self.0.request.resource = v.into();
1805            self
1806        }
1807
1808        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
1809        ///
1810        /// This is a **required** field for requests.
1811        pub fn set_policy<T>(mut self, v: T) -> Self
1812        where
1813            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
1814        {
1815            self.0.request.policy = std::option::Option::Some(v.into());
1816            self
1817        }
1818
1819        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
1820        ///
1821        /// This is a **required** field for requests.
1822        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
1823        where
1824            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
1825        {
1826            self.0.request.policy = v.map(|x| x.into());
1827            self
1828        }
1829
1830        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
1831        pub fn set_update_mask<T>(mut self, v: T) -> Self
1832        where
1833            T: std::convert::Into<wkt::FieldMask>,
1834        {
1835            self.0.request.update_mask = std::option::Option::Some(v.into());
1836            self
1837        }
1838
1839        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
1840        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1841        where
1842            T: std::convert::Into<wkt::FieldMask>,
1843        {
1844            self.0.request.update_mask = v.map(|x| x.into());
1845            self
1846        }
1847    }
1848
1849    #[doc(hidden)]
1850    impl crate::RequestBuilder for SetIamPolicy {
1851        fn request_options(&mut self) -> &mut crate::RequestOptions {
1852            &mut self.0.options
1853        }
1854    }
1855
1856    /// The request builder for [BusinessGlossaryService::get_iam_policy][crate::client::BusinessGlossaryService::get_iam_policy] calls.
1857    ///
1858    /// # Example
1859    /// ```
1860    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetIamPolicy;
1861    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1862    ///
1863    /// let builder = prepare_request_builder();
1864    /// let response = builder.send().await?;
1865    /// # Ok(()) }
1866    ///
1867    /// fn prepare_request_builder() -> GetIamPolicy {
1868    ///   # panic!();
1869    ///   // ... details omitted ...
1870    /// }
1871    /// ```
1872    #[derive(Clone, Debug)]
1873    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
1874
1875    impl GetIamPolicy {
1876        pub(crate) fn new(
1877            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1878        ) -> Self {
1879            Self(RequestBuilder::new(stub))
1880        }
1881
1882        /// Sets the full request, replacing any prior values.
1883        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
1884            mut self,
1885            v: V,
1886        ) -> Self {
1887            self.0.request = v.into();
1888            self
1889        }
1890
1891        /// Sets all the options, replacing any prior values.
1892        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1893            self.0.options = v.into();
1894            self
1895        }
1896
1897        /// Sends the request.
1898        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
1899            (*self.0.stub)
1900                .get_iam_policy(self.0.request, self.0.options)
1901                .await
1902                .map(crate::Response::into_body)
1903        }
1904
1905        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
1906        ///
1907        /// This is a **required** field for requests.
1908        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1909            self.0.request.resource = v.into();
1910            self
1911        }
1912
1913        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
1914        pub fn set_options<T>(mut self, v: T) -> Self
1915        where
1916            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
1917        {
1918            self.0.request.options = std::option::Option::Some(v.into());
1919            self
1920        }
1921
1922        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
1923        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
1924        where
1925            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
1926        {
1927            self.0.request.options = v.map(|x| x.into());
1928            self
1929        }
1930    }
1931
1932    #[doc(hidden)]
1933    impl crate::RequestBuilder for GetIamPolicy {
1934        fn request_options(&mut self) -> &mut crate::RequestOptions {
1935            &mut self.0.options
1936        }
1937    }
1938
1939    /// The request builder for [BusinessGlossaryService::test_iam_permissions][crate::client::BusinessGlossaryService::test_iam_permissions] calls.
1940    ///
1941    /// # Example
1942    /// ```
1943    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::TestIamPermissions;
1944    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
1945    ///
1946    /// let builder = prepare_request_builder();
1947    /// let response = builder.send().await?;
1948    /// # Ok(()) }
1949    ///
1950    /// fn prepare_request_builder() -> TestIamPermissions {
1951    ///   # panic!();
1952    ///   // ... details omitted ...
1953    /// }
1954    /// ```
1955    #[derive(Clone, Debug)]
1956    pub struct TestIamPermissions(
1957        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
1958    );
1959
1960    impl TestIamPermissions {
1961        pub(crate) fn new(
1962            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1963        ) -> Self {
1964            Self(RequestBuilder::new(stub))
1965        }
1966
1967        /// Sets the full request, replacing any prior values.
1968        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
1969            mut self,
1970            v: V,
1971        ) -> Self {
1972            self.0.request = v.into();
1973            self
1974        }
1975
1976        /// Sets all the options, replacing any prior values.
1977        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1978            self.0.options = v.into();
1979            self
1980        }
1981
1982        /// Sends the request.
1983        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
1984            (*self.0.stub)
1985                .test_iam_permissions(self.0.request, self.0.options)
1986                .await
1987                .map(crate::Response::into_body)
1988        }
1989
1990        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
1991        ///
1992        /// This is a **required** field for requests.
1993        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1994            self.0.request.resource = v.into();
1995            self
1996        }
1997
1998        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
1999        ///
2000        /// This is a **required** field for requests.
2001        pub fn set_permissions<T, V>(mut self, v: T) -> Self
2002        where
2003            T: std::iter::IntoIterator<Item = V>,
2004            V: std::convert::Into<std::string::String>,
2005        {
2006            use std::iter::Iterator;
2007            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
2008            self
2009        }
2010    }
2011
2012    #[doc(hidden)]
2013    impl crate::RequestBuilder for TestIamPermissions {
2014        fn request_options(&mut self) -> &mut crate::RequestOptions {
2015            &mut self.0.options
2016        }
2017    }
2018
2019    /// The request builder for [BusinessGlossaryService::list_operations][crate::client::BusinessGlossaryService::list_operations] calls.
2020    ///
2021    /// # Example
2022    /// ```
2023    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::ListOperations;
2024    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2025    /// use google_cloud_gax::paginator::ItemPaginator;
2026    ///
2027    /// let builder = prepare_request_builder();
2028    /// let mut items = builder.by_item();
2029    /// while let Some(result) = items.next().await {
2030    ///   let item = result?;
2031    /// }
2032    /// # Ok(()) }
2033    ///
2034    /// fn prepare_request_builder() -> ListOperations {
2035    ///   # panic!();
2036    ///   // ... details omitted ...
2037    /// }
2038    /// ```
2039    #[derive(Clone, Debug)]
2040    pub struct ListOperations(
2041        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
2042    );
2043
2044    impl ListOperations {
2045        pub(crate) fn new(
2046            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2047        ) -> Self {
2048            Self(RequestBuilder::new(stub))
2049        }
2050
2051        /// Sets the full request, replacing any prior values.
2052        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
2053            mut self,
2054            v: V,
2055        ) -> Self {
2056            self.0.request = v.into();
2057            self
2058        }
2059
2060        /// Sets all the options, replacing any prior values.
2061        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2062            self.0.options = v.into();
2063            self
2064        }
2065
2066        /// Sends the request.
2067        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
2068            (*self.0.stub)
2069                .list_operations(self.0.request, self.0.options)
2070                .await
2071                .map(crate::Response::into_body)
2072        }
2073
2074        /// Streams each page in the collection.
2075        pub fn by_page(
2076            self,
2077        ) -> impl google_cloud_gax::paginator::Paginator<
2078            google_cloud_longrunning::model::ListOperationsResponse,
2079            crate::Error,
2080        > {
2081            use std::clone::Clone;
2082            let token = self.0.request.page_token.clone();
2083            let execute = move |token: String| {
2084                let mut builder = self.clone();
2085                builder.0.request = builder.0.request.set_page_token(token);
2086                builder.send()
2087            };
2088            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2089        }
2090
2091        /// Streams each item in the collection.
2092        pub fn by_item(
2093            self,
2094        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2095            google_cloud_longrunning::model::ListOperationsResponse,
2096            crate::Error,
2097        > {
2098            use google_cloud_gax::paginator::Paginator;
2099            self.by_page().items()
2100        }
2101
2102        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
2103        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2104            self.0.request.name = v.into();
2105            self
2106        }
2107
2108        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
2109        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2110            self.0.request.filter = v.into();
2111            self
2112        }
2113
2114        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
2115        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2116            self.0.request.page_size = v.into();
2117            self
2118        }
2119
2120        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
2121        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2122            self.0.request.page_token = v.into();
2123            self
2124        }
2125
2126        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
2127        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
2128            self.0.request.return_partial_success = v.into();
2129            self
2130        }
2131    }
2132
2133    #[doc(hidden)]
2134    impl crate::RequestBuilder for ListOperations {
2135        fn request_options(&mut self) -> &mut crate::RequestOptions {
2136            &mut self.0.options
2137        }
2138    }
2139
2140    /// The request builder for [BusinessGlossaryService::get_operation][crate::client::BusinessGlossaryService::get_operation] calls.
2141    ///
2142    /// # Example
2143    /// ```
2144    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::GetOperation;
2145    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2146    ///
2147    /// let builder = prepare_request_builder();
2148    /// let response = builder.send().await?;
2149    /// # Ok(()) }
2150    ///
2151    /// fn prepare_request_builder() -> GetOperation {
2152    ///   # panic!();
2153    ///   // ... details omitted ...
2154    /// }
2155    /// ```
2156    #[derive(Clone, Debug)]
2157    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
2158
2159    impl GetOperation {
2160        pub(crate) fn new(
2161            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2162        ) -> Self {
2163            Self(RequestBuilder::new(stub))
2164        }
2165
2166        /// Sets the full request, replacing any prior values.
2167        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
2168            mut self,
2169            v: V,
2170        ) -> Self {
2171            self.0.request = v.into();
2172            self
2173        }
2174
2175        /// Sets all the options, replacing any prior values.
2176        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2177            self.0.options = v.into();
2178            self
2179        }
2180
2181        /// Sends the request.
2182        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2183            (*self.0.stub)
2184                .get_operation(self.0.request, self.0.options)
2185                .await
2186                .map(crate::Response::into_body)
2187        }
2188
2189        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
2190        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2191            self.0.request.name = v.into();
2192            self
2193        }
2194    }
2195
2196    #[doc(hidden)]
2197    impl crate::RequestBuilder for GetOperation {
2198        fn request_options(&mut self) -> &mut crate::RequestOptions {
2199            &mut self.0.options
2200        }
2201    }
2202
2203    /// The request builder for [BusinessGlossaryService::delete_operation][crate::client::BusinessGlossaryService::delete_operation] calls.
2204    ///
2205    /// # Example
2206    /// ```
2207    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::DeleteOperation;
2208    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2209    ///
2210    /// let builder = prepare_request_builder();
2211    /// let response = builder.send().await?;
2212    /// # Ok(()) }
2213    ///
2214    /// fn prepare_request_builder() -> DeleteOperation {
2215    ///   # panic!();
2216    ///   // ... details omitted ...
2217    /// }
2218    /// ```
2219    #[derive(Clone, Debug)]
2220    pub struct DeleteOperation(
2221        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
2222    );
2223
2224    impl DeleteOperation {
2225        pub(crate) fn new(
2226            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2227        ) -> Self {
2228            Self(RequestBuilder::new(stub))
2229        }
2230
2231        /// Sets the full request, replacing any prior values.
2232        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
2233            mut self,
2234            v: V,
2235        ) -> Self {
2236            self.0.request = v.into();
2237            self
2238        }
2239
2240        /// Sets all the options, replacing any prior values.
2241        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2242            self.0.options = v.into();
2243            self
2244        }
2245
2246        /// Sends the request.
2247        pub async fn send(self) -> Result<()> {
2248            (*self.0.stub)
2249                .delete_operation(self.0.request, self.0.options)
2250                .await
2251                .map(crate::Response::into_body)
2252        }
2253
2254        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
2255        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2256            self.0.request.name = v.into();
2257            self
2258        }
2259    }
2260
2261    #[doc(hidden)]
2262    impl crate::RequestBuilder for DeleteOperation {
2263        fn request_options(&mut self) -> &mut crate::RequestOptions {
2264            &mut self.0.options
2265        }
2266    }
2267
2268    /// The request builder for [BusinessGlossaryService::cancel_operation][crate::client::BusinessGlossaryService::cancel_operation] calls.
2269    ///
2270    /// # Example
2271    /// ```
2272    /// # use google_cloud_dataplex_v1::builder::business_glossary_service::CancelOperation;
2273    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2274    ///
2275    /// let builder = prepare_request_builder();
2276    /// let response = builder.send().await?;
2277    /// # Ok(()) }
2278    ///
2279    /// fn prepare_request_builder() -> CancelOperation {
2280    ///   # panic!();
2281    ///   // ... details omitted ...
2282    /// }
2283    /// ```
2284    #[derive(Clone, Debug)]
2285    pub struct CancelOperation(
2286        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
2287    );
2288
2289    impl CancelOperation {
2290        pub(crate) fn new(
2291            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2292        ) -> Self {
2293            Self(RequestBuilder::new(stub))
2294        }
2295
2296        /// Sets the full request, replacing any prior values.
2297        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
2298            mut self,
2299            v: V,
2300        ) -> Self {
2301            self.0.request = v.into();
2302            self
2303        }
2304
2305        /// Sets all the options, replacing any prior values.
2306        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2307            self.0.options = v.into();
2308            self
2309        }
2310
2311        /// Sends the request.
2312        pub async fn send(self) -> Result<()> {
2313            (*self.0.stub)
2314                .cancel_operation(self.0.request, self.0.options)
2315                .await
2316                .map(crate::Response::into_body)
2317        }
2318
2319        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
2320        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2321            self.0.request.name = v.into();
2322            self
2323        }
2324    }
2325
2326    #[doc(hidden)]
2327    impl crate::RequestBuilder for CancelOperation {
2328        fn request_options(&mut self) -> &mut crate::RequestOptions {
2329            &mut self.0.options
2330        }
2331    }
2332}
2333
2334/// Request and client builders for [CatalogService][crate::client::CatalogService].
2335pub mod catalog_service {
2336    use crate::Result;
2337
2338    /// A builder for [CatalogService][crate::client::CatalogService].
2339    ///
2340    /// ```
2341    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
2342    /// # use google_cloud_dataplex_v1::*;
2343    /// # use builder::catalog_service::ClientBuilder;
2344    /// # use client::CatalogService;
2345    /// let builder : ClientBuilder = CatalogService::builder();
2346    /// let client = builder
2347    ///     .with_endpoint("https://dataplex.googleapis.com")
2348    ///     .build().await?;
2349    /// # Ok(()) }
2350    /// ```
2351    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
2352
2353    pub(crate) mod client {
2354        use super::super::super::client::CatalogService;
2355        pub struct Factory;
2356        impl crate::ClientFactory for Factory {
2357            type Client = CatalogService;
2358            type Credentials = gaxi::options::Credentials;
2359            async fn build(
2360                self,
2361                config: gaxi::options::ClientConfig,
2362            ) -> crate::ClientBuilderResult<Self::Client> {
2363                Self::Client::new(config).await
2364            }
2365        }
2366    }
2367
2368    /// Common implementation for [crate::client::CatalogService] request builders.
2369    #[derive(Clone, Debug)]
2370    pub(crate) struct RequestBuilder<R: std::default::Default> {
2371        stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2372        request: R,
2373        options: crate::RequestOptions,
2374    }
2375
2376    impl<R> RequestBuilder<R>
2377    where
2378        R: std::default::Default,
2379    {
2380        pub(crate) fn new(
2381            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2382        ) -> Self {
2383            Self {
2384                stub,
2385                request: R::default(),
2386                options: crate::RequestOptions::default(),
2387            }
2388        }
2389    }
2390
2391    /// The request builder for [CatalogService::create_entry_type][crate::client::CatalogService::create_entry_type] calls.
2392    ///
2393    /// # Example
2394    /// ```
2395    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntryType;
2396    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2397    /// use google_cloud_lro::Poller;
2398    ///
2399    /// let builder = prepare_request_builder();
2400    /// let response = builder.poller().until_done().await?;
2401    /// # Ok(()) }
2402    ///
2403    /// fn prepare_request_builder() -> CreateEntryType {
2404    ///   # panic!();
2405    ///   // ... details omitted ...
2406    /// }
2407    /// ```
2408    #[derive(Clone, Debug)]
2409    pub struct CreateEntryType(RequestBuilder<crate::model::CreateEntryTypeRequest>);
2410
2411    impl CreateEntryType {
2412        pub(crate) fn new(
2413            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2414        ) -> Self {
2415            Self(RequestBuilder::new(stub))
2416        }
2417
2418        /// Sets the full request, replacing any prior values.
2419        pub fn with_request<V: Into<crate::model::CreateEntryTypeRequest>>(mut self, v: V) -> Self {
2420            self.0.request = v.into();
2421            self
2422        }
2423
2424        /// Sets all the options, replacing any prior values.
2425        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2426            self.0.options = v.into();
2427            self
2428        }
2429
2430        /// Sends the request.
2431        ///
2432        /// # Long running operations
2433        ///
2434        /// This starts, but does not poll, a longrunning operation. More information
2435        /// on [create_entry_type][crate::client::CatalogService::create_entry_type].
2436        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2437            (*self.0.stub)
2438                .create_entry_type(self.0.request, self.0.options)
2439                .await
2440                .map(crate::Response::into_body)
2441        }
2442
2443        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_entry_type`.
2444        pub fn poller(
2445            self,
2446        ) -> impl google_cloud_lro::Poller<crate::model::EntryType, crate::model::OperationMetadata>
2447        {
2448            type Operation = google_cloud_lro::internal::Operation<
2449                crate::model::EntryType,
2450                crate::model::OperationMetadata,
2451            >;
2452            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2453            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2454            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2455            if let Some(ref mut details) = poller_options.tracing {
2456                details.method_name = "google_cloud_dataplex_v1::client::CatalogService::create_entry_type::until_done";
2457            }
2458
2459            let stub = self.0.stub.clone();
2460            let mut options = self.0.options.clone();
2461            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2462            let query = move |name| {
2463                let stub = stub.clone();
2464                let options = options.clone();
2465                async {
2466                    let op = GetOperation::new(stub)
2467                        .set_name(name)
2468                        .with_options(options)
2469                        .send()
2470                        .await?;
2471                    Ok(Operation::new(op))
2472                }
2473            };
2474
2475            let start = move || async {
2476                let op = self.send().await?;
2477                Ok(Operation::new(op))
2478            };
2479
2480            use google_cloud_lro::internal::PollerExt;
2481            {
2482                google_cloud_lro::internal::new_poller(
2483                    polling_error_policy,
2484                    polling_backoff_policy,
2485                    start,
2486                    query,
2487                )
2488            }
2489            .with_options(poller_options)
2490        }
2491
2492        /// Sets the value of [parent][crate::model::CreateEntryTypeRequest::parent].
2493        ///
2494        /// This is a **required** field for requests.
2495        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2496            self.0.request.parent = v.into();
2497            self
2498        }
2499
2500        /// Sets the value of [entry_type_id][crate::model::CreateEntryTypeRequest::entry_type_id].
2501        ///
2502        /// This is a **required** field for requests.
2503        pub fn set_entry_type_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2504            self.0.request.entry_type_id = v.into();
2505            self
2506        }
2507
2508        /// Sets the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
2509        ///
2510        /// This is a **required** field for requests.
2511        pub fn set_entry_type<T>(mut self, v: T) -> Self
2512        where
2513            T: std::convert::Into<crate::model::EntryType>,
2514        {
2515            self.0.request.entry_type = std::option::Option::Some(v.into());
2516            self
2517        }
2518
2519        /// Sets or clears the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
2520        ///
2521        /// This is a **required** field for requests.
2522        pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
2523        where
2524            T: std::convert::Into<crate::model::EntryType>,
2525        {
2526            self.0.request.entry_type = v.map(|x| x.into());
2527            self
2528        }
2529
2530        /// Sets the value of [validate_only][crate::model::CreateEntryTypeRequest::validate_only].
2531        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2532            self.0.request.validate_only = v.into();
2533            self
2534        }
2535    }
2536
2537    #[doc(hidden)]
2538    impl crate::RequestBuilder for CreateEntryType {
2539        fn request_options(&mut self) -> &mut crate::RequestOptions {
2540            &mut self.0.options
2541        }
2542    }
2543
2544    /// The request builder for [CatalogService::update_entry_type][crate::client::CatalogService::update_entry_type] calls.
2545    ///
2546    /// # Example
2547    /// ```
2548    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntryType;
2549    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2550    /// use google_cloud_lro::Poller;
2551    ///
2552    /// let builder = prepare_request_builder();
2553    /// let response = builder.poller().until_done().await?;
2554    /// # Ok(()) }
2555    ///
2556    /// fn prepare_request_builder() -> UpdateEntryType {
2557    ///   # panic!();
2558    ///   // ... details omitted ...
2559    /// }
2560    /// ```
2561    #[derive(Clone, Debug)]
2562    pub struct UpdateEntryType(RequestBuilder<crate::model::UpdateEntryTypeRequest>);
2563
2564    impl UpdateEntryType {
2565        pub(crate) fn new(
2566            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2567        ) -> Self {
2568            Self(RequestBuilder::new(stub))
2569        }
2570
2571        /// Sets the full request, replacing any prior values.
2572        pub fn with_request<V: Into<crate::model::UpdateEntryTypeRequest>>(mut self, v: V) -> Self {
2573            self.0.request = v.into();
2574            self
2575        }
2576
2577        /// Sets all the options, replacing any prior values.
2578        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2579            self.0.options = v.into();
2580            self
2581        }
2582
2583        /// Sends the request.
2584        ///
2585        /// # Long running operations
2586        ///
2587        /// This starts, but does not poll, a longrunning operation. More information
2588        /// on [update_entry_type][crate::client::CatalogService::update_entry_type].
2589        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2590            (*self.0.stub)
2591                .update_entry_type(self.0.request, self.0.options)
2592                .await
2593                .map(crate::Response::into_body)
2594        }
2595
2596        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_entry_type`.
2597        pub fn poller(
2598            self,
2599        ) -> impl google_cloud_lro::Poller<crate::model::EntryType, crate::model::OperationMetadata>
2600        {
2601            type Operation = google_cloud_lro::internal::Operation<
2602                crate::model::EntryType,
2603                crate::model::OperationMetadata,
2604            >;
2605            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2606            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2607            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2608            if let Some(ref mut details) = poller_options.tracing {
2609                details.method_name = "google_cloud_dataplex_v1::client::CatalogService::update_entry_type::until_done";
2610            }
2611
2612            let stub = self.0.stub.clone();
2613            let mut options = self.0.options.clone();
2614            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2615            let query = move |name| {
2616                let stub = stub.clone();
2617                let options = options.clone();
2618                async {
2619                    let op = GetOperation::new(stub)
2620                        .set_name(name)
2621                        .with_options(options)
2622                        .send()
2623                        .await?;
2624                    Ok(Operation::new(op))
2625                }
2626            };
2627
2628            let start = move || async {
2629                let op = self.send().await?;
2630                Ok(Operation::new(op))
2631            };
2632
2633            use google_cloud_lro::internal::PollerExt;
2634            {
2635                google_cloud_lro::internal::new_poller(
2636                    polling_error_policy,
2637                    polling_backoff_policy,
2638                    start,
2639                    query,
2640                )
2641            }
2642            .with_options(poller_options)
2643        }
2644
2645        /// Sets the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
2646        ///
2647        /// This is a **required** field for requests.
2648        pub fn set_entry_type<T>(mut self, v: T) -> Self
2649        where
2650            T: std::convert::Into<crate::model::EntryType>,
2651        {
2652            self.0.request.entry_type = std::option::Option::Some(v.into());
2653            self
2654        }
2655
2656        /// Sets or clears the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
2657        ///
2658        /// This is a **required** field for requests.
2659        pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
2660        where
2661            T: std::convert::Into<crate::model::EntryType>,
2662        {
2663            self.0.request.entry_type = v.map(|x| x.into());
2664            self
2665        }
2666
2667        /// Sets the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
2668        ///
2669        /// This is a **required** field for requests.
2670        pub fn set_update_mask<T>(mut self, v: T) -> Self
2671        where
2672            T: std::convert::Into<wkt::FieldMask>,
2673        {
2674            self.0.request.update_mask = std::option::Option::Some(v.into());
2675            self
2676        }
2677
2678        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
2679        ///
2680        /// This is a **required** field for requests.
2681        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2682        where
2683            T: std::convert::Into<wkt::FieldMask>,
2684        {
2685            self.0.request.update_mask = v.map(|x| x.into());
2686            self
2687        }
2688
2689        /// Sets the value of [validate_only][crate::model::UpdateEntryTypeRequest::validate_only].
2690        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2691            self.0.request.validate_only = v.into();
2692            self
2693        }
2694    }
2695
2696    #[doc(hidden)]
2697    impl crate::RequestBuilder for UpdateEntryType {
2698        fn request_options(&mut self) -> &mut crate::RequestOptions {
2699            &mut self.0.options
2700        }
2701    }
2702
2703    /// The request builder for [CatalogService::delete_entry_type][crate::client::CatalogService::delete_entry_type] calls.
2704    ///
2705    /// # Example
2706    /// ```
2707    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntryType;
2708    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2709    /// use google_cloud_lro::Poller;
2710    ///
2711    /// let builder = prepare_request_builder();
2712    /// let response = builder.poller().until_done().await?;
2713    /// # Ok(()) }
2714    ///
2715    /// fn prepare_request_builder() -> DeleteEntryType {
2716    ///   # panic!();
2717    ///   // ... details omitted ...
2718    /// }
2719    /// ```
2720    #[derive(Clone, Debug)]
2721    pub struct DeleteEntryType(RequestBuilder<crate::model::DeleteEntryTypeRequest>);
2722
2723    impl DeleteEntryType {
2724        pub(crate) fn new(
2725            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2726        ) -> Self {
2727            Self(RequestBuilder::new(stub))
2728        }
2729
2730        /// Sets the full request, replacing any prior values.
2731        pub fn with_request<V: Into<crate::model::DeleteEntryTypeRequest>>(mut self, v: V) -> Self {
2732            self.0.request = v.into();
2733            self
2734        }
2735
2736        /// Sets all the options, replacing any prior values.
2737        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2738            self.0.options = v.into();
2739            self
2740        }
2741
2742        /// Sends the request.
2743        ///
2744        /// # Long running operations
2745        ///
2746        /// This starts, but does not poll, a longrunning operation. More information
2747        /// on [delete_entry_type][crate::client::CatalogService::delete_entry_type].
2748        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2749            (*self.0.stub)
2750                .delete_entry_type(self.0.request, self.0.options)
2751                .await
2752                .map(crate::Response::into_body)
2753        }
2754
2755        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_entry_type`.
2756        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2757            type Operation =
2758                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2759            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2760            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2761            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2762            if let Some(ref mut details) = poller_options.tracing {
2763                details.method_name = "google_cloud_dataplex_v1::client::CatalogService::delete_entry_type::until_done";
2764            }
2765
2766            let stub = self.0.stub.clone();
2767            let mut options = self.0.options.clone();
2768            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2769            let query = move |name| {
2770                let stub = stub.clone();
2771                let options = options.clone();
2772                async {
2773                    let op = GetOperation::new(stub)
2774                        .set_name(name)
2775                        .with_options(options)
2776                        .send()
2777                        .await?;
2778                    Ok(Operation::new(op))
2779                }
2780            };
2781
2782            let start = move || async {
2783                let op = self.send().await?;
2784                Ok(Operation::new(op))
2785            };
2786
2787            use google_cloud_lro::internal::PollerExt;
2788            {
2789                google_cloud_lro::internal::new_unit_response_poller(
2790                    polling_error_policy,
2791                    polling_backoff_policy,
2792                    start,
2793                    query,
2794                )
2795            }
2796            .with_options(poller_options)
2797        }
2798
2799        /// Sets the value of [name][crate::model::DeleteEntryTypeRequest::name].
2800        ///
2801        /// This is a **required** field for requests.
2802        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2803            self.0.request.name = v.into();
2804            self
2805        }
2806
2807        /// Sets the value of [etag][crate::model::DeleteEntryTypeRequest::etag].
2808        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
2809            self.0.request.etag = v.into();
2810            self
2811        }
2812    }
2813
2814    #[doc(hidden)]
2815    impl crate::RequestBuilder for DeleteEntryType {
2816        fn request_options(&mut self) -> &mut crate::RequestOptions {
2817            &mut self.0.options
2818        }
2819    }
2820
2821    /// The request builder for [CatalogService::list_entry_types][crate::client::CatalogService::list_entry_types] calls.
2822    ///
2823    /// # Example
2824    /// ```
2825    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListEntryTypes;
2826    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2827    /// use google_cloud_gax::paginator::ItemPaginator;
2828    ///
2829    /// let builder = prepare_request_builder();
2830    /// let mut items = builder.by_item();
2831    /// while let Some(result) = items.next().await {
2832    ///   let item = result?;
2833    /// }
2834    /// # Ok(()) }
2835    ///
2836    /// fn prepare_request_builder() -> ListEntryTypes {
2837    ///   # panic!();
2838    ///   // ... details omitted ...
2839    /// }
2840    /// ```
2841    #[derive(Clone, Debug)]
2842    pub struct ListEntryTypes(RequestBuilder<crate::model::ListEntryTypesRequest>);
2843
2844    impl ListEntryTypes {
2845        pub(crate) fn new(
2846            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2847        ) -> Self {
2848            Self(RequestBuilder::new(stub))
2849        }
2850
2851        /// Sets the full request, replacing any prior values.
2852        pub fn with_request<V: Into<crate::model::ListEntryTypesRequest>>(mut self, v: V) -> Self {
2853            self.0.request = v.into();
2854            self
2855        }
2856
2857        /// Sets all the options, replacing any prior values.
2858        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2859            self.0.options = v.into();
2860            self
2861        }
2862
2863        /// Sends the request.
2864        pub async fn send(self) -> Result<crate::model::ListEntryTypesResponse> {
2865            (*self.0.stub)
2866                .list_entry_types(self.0.request, self.0.options)
2867                .await
2868                .map(crate::Response::into_body)
2869        }
2870
2871        /// Streams each page in the collection.
2872        pub fn by_page(
2873            self,
2874        ) -> impl google_cloud_gax::paginator::Paginator<
2875            crate::model::ListEntryTypesResponse,
2876            crate::Error,
2877        > {
2878            use std::clone::Clone;
2879            let token = self.0.request.page_token.clone();
2880            let execute = move |token: String| {
2881                let mut builder = self.clone();
2882                builder.0.request = builder.0.request.set_page_token(token);
2883                builder.send()
2884            };
2885            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2886        }
2887
2888        /// Streams each item in the collection.
2889        pub fn by_item(
2890            self,
2891        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2892            crate::model::ListEntryTypesResponse,
2893            crate::Error,
2894        > {
2895            use google_cloud_gax::paginator::Paginator;
2896            self.by_page().items()
2897        }
2898
2899        /// Sets the value of [parent][crate::model::ListEntryTypesRequest::parent].
2900        ///
2901        /// This is a **required** field for requests.
2902        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2903            self.0.request.parent = v.into();
2904            self
2905        }
2906
2907        /// Sets the value of [page_size][crate::model::ListEntryTypesRequest::page_size].
2908        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2909            self.0.request.page_size = v.into();
2910            self
2911        }
2912
2913        /// Sets the value of [page_token][crate::model::ListEntryTypesRequest::page_token].
2914        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2915            self.0.request.page_token = v.into();
2916            self
2917        }
2918
2919        /// Sets the value of [filter][crate::model::ListEntryTypesRequest::filter].
2920        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2921            self.0.request.filter = v.into();
2922            self
2923        }
2924
2925        /// Sets the value of [order_by][crate::model::ListEntryTypesRequest::order_by].
2926        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2927            self.0.request.order_by = v.into();
2928            self
2929        }
2930    }
2931
2932    #[doc(hidden)]
2933    impl crate::RequestBuilder for ListEntryTypes {
2934        fn request_options(&mut self) -> &mut crate::RequestOptions {
2935            &mut self.0.options
2936        }
2937    }
2938
2939    /// The request builder for [CatalogService::get_entry_type][crate::client::CatalogService::get_entry_type] calls.
2940    ///
2941    /// # Example
2942    /// ```
2943    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntryType;
2944    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
2945    ///
2946    /// let builder = prepare_request_builder();
2947    /// let response = builder.send().await?;
2948    /// # Ok(()) }
2949    ///
2950    /// fn prepare_request_builder() -> GetEntryType {
2951    ///   # panic!();
2952    ///   // ... details omitted ...
2953    /// }
2954    /// ```
2955    #[derive(Clone, Debug)]
2956    pub struct GetEntryType(RequestBuilder<crate::model::GetEntryTypeRequest>);
2957
2958    impl GetEntryType {
2959        pub(crate) fn new(
2960            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2961        ) -> Self {
2962            Self(RequestBuilder::new(stub))
2963        }
2964
2965        /// Sets the full request, replacing any prior values.
2966        pub fn with_request<V: Into<crate::model::GetEntryTypeRequest>>(mut self, v: V) -> Self {
2967            self.0.request = v.into();
2968            self
2969        }
2970
2971        /// Sets all the options, replacing any prior values.
2972        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2973            self.0.options = v.into();
2974            self
2975        }
2976
2977        /// Sends the request.
2978        pub async fn send(self) -> Result<crate::model::EntryType> {
2979            (*self.0.stub)
2980                .get_entry_type(self.0.request, self.0.options)
2981                .await
2982                .map(crate::Response::into_body)
2983        }
2984
2985        /// Sets the value of [name][crate::model::GetEntryTypeRequest::name].
2986        ///
2987        /// This is a **required** field for requests.
2988        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2989            self.0.request.name = v.into();
2990            self
2991        }
2992    }
2993
2994    #[doc(hidden)]
2995    impl crate::RequestBuilder for GetEntryType {
2996        fn request_options(&mut self) -> &mut crate::RequestOptions {
2997            &mut self.0.options
2998        }
2999    }
3000
3001    /// The request builder for [CatalogService::create_aspect_type][crate::client::CatalogService::create_aspect_type] calls.
3002    ///
3003    /// # Example
3004    /// ```
3005    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateAspectType;
3006    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3007    /// use google_cloud_lro::Poller;
3008    ///
3009    /// let builder = prepare_request_builder();
3010    /// let response = builder.poller().until_done().await?;
3011    /// # Ok(()) }
3012    ///
3013    /// fn prepare_request_builder() -> CreateAspectType {
3014    ///   # panic!();
3015    ///   // ... details omitted ...
3016    /// }
3017    /// ```
3018    #[derive(Clone, Debug)]
3019    pub struct CreateAspectType(RequestBuilder<crate::model::CreateAspectTypeRequest>);
3020
3021    impl CreateAspectType {
3022        pub(crate) fn new(
3023            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3024        ) -> Self {
3025            Self(RequestBuilder::new(stub))
3026        }
3027
3028        /// Sets the full request, replacing any prior values.
3029        pub fn with_request<V: Into<crate::model::CreateAspectTypeRequest>>(
3030            mut self,
3031            v: V,
3032        ) -> Self {
3033            self.0.request = v.into();
3034            self
3035        }
3036
3037        /// Sets all the options, replacing any prior values.
3038        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3039            self.0.options = v.into();
3040            self
3041        }
3042
3043        /// Sends the request.
3044        ///
3045        /// # Long running operations
3046        ///
3047        /// This starts, but does not poll, a longrunning operation. More information
3048        /// on [create_aspect_type][crate::client::CatalogService::create_aspect_type].
3049        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3050            (*self.0.stub)
3051                .create_aspect_type(self.0.request, self.0.options)
3052                .await
3053                .map(crate::Response::into_body)
3054        }
3055
3056        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_aspect_type`.
3057        pub fn poller(
3058            self,
3059        ) -> impl google_cloud_lro::Poller<crate::model::AspectType, crate::model::OperationMetadata>
3060        {
3061            type Operation = google_cloud_lro::internal::Operation<
3062                crate::model::AspectType,
3063                crate::model::OperationMetadata,
3064            >;
3065            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3066            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3067            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3068            if let Some(ref mut details) = poller_options.tracing {
3069                details.method_name = "google_cloud_dataplex_v1::client::CatalogService::create_aspect_type::until_done";
3070            }
3071
3072            let stub = self.0.stub.clone();
3073            let mut options = self.0.options.clone();
3074            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3075            let query = move |name| {
3076                let stub = stub.clone();
3077                let options = options.clone();
3078                async {
3079                    let op = GetOperation::new(stub)
3080                        .set_name(name)
3081                        .with_options(options)
3082                        .send()
3083                        .await?;
3084                    Ok(Operation::new(op))
3085                }
3086            };
3087
3088            let start = move || async {
3089                let op = self.send().await?;
3090                Ok(Operation::new(op))
3091            };
3092
3093            use google_cloud_lro::internal::PollerExt;
3094            {
3095                google_cloud_lro::internal::new_poller(
3096                    polling_error_policy,
3097                    polling_backoff_policy,
3098                    start,
3099                    query,
3100                )
3101            }
3102            .with_options(poller_options)
3103        }
3104
3105        /// Sets the value of [parent][crate::model::CreateAspectTypeRequest::parent].
3106        ///
3107        /// This is a **required** field for requests.
3108        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3109            self.0.request.parent = v.into();
3110            self
3111        }
3112
3113        /// Sets the value of [aspect_type_id][crate::model::CreateAspectTypeRequest::aspect_type_id].
3114        ///
3115        /// This is a **required** field for requests.
3116        pub fn set_aspect_type_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3117            self.0.request.aspect_type_id = v.into();
3118            self
3119        }
3120
3121        /// Sets the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
3122        ///
3123        /// This is a **required** field for requests.
3124        pub fn set_aspect_type<T>(mut self, v: T) -> Self
3125        where
3126            T: std::convert::Into<crate::model::AspectType>,
3127        {
3128            self.0.request.aspect_type = std::option::Option::Some(v.into());
3129            self
3130        }
3131
3132        /// Sets or clears the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
3133        ///
3134        /// This is a **required** field for requests.
3135        pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
3136        where
3137            T: std::convert::Into<crate::model::AspectType>,
3138        {
3139            self.0.request.aspect_type = v.map(|x| x.into());
3140            self
3141        }
3142
3143        /// Sets the value of [validate_only][crate::model::CreateAspectTypeRequest::validate_only].
3144        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3145            self.0.request.validate_only = v.into();
3146            self
3147        }
3148    }
3149
3150    #[doc(hidden)]
3151    impl crate::RequestBuilder for CreateAspectType {
3152        fn request_options(&mut self) -> &mut crate::RequestOptions {
3153            &mut self.0.options
3154        }
3155    }
3156
3157    /// The request builder for [CatalogService::update_aspect_type][crate::client::CatalogService::update_aspect_type] calls.
3158    ///
3159    /// # Example
3160    /// ```
3161    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateAspectType;
3162    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3163    /// use google_cloud_lro::Poller;
3164    ///
3165    /// let builder = prepare_request_builder();
3166    /// let response = builder.poller().until_done().await?;
3167    /// # Ok(()) }
3168    ///
3169    /// fn prepare_request_builder() -> UpdateAspectType {
3170    ///   # panic!();
3171    ///   // ... details omitted ...
3172    /// }
3173    /// ```
3174    #[derive(Clone, Debug)]
3175    pub struct UpdateAspectType(RequestBuilder<crate::model::UpdateAspectTypeRequest>);
3176
3177    impl UpdateAspectType {
3178        pub(crate) fn new(
3179            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3180        ) -> Self {
3181            Self(RequestBuilder::new(stub))
3182        }
3183
3184        /// Sets the full request, replacing any prior values.
3185        pub fn with_request<V: Into<crate::model::UpdateAspectTypeRequest>>(
3186            mut self,
3187            v: V,
3188        ) -> Self {
3189            self.0.request = v.into();
3190            self
3191        }
3192
3193        /// Sets all the options, replacing any prior values.
3194        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3195            self.0.options = v.into();
3196            self
3197        }
3198
3199        /// Sends the request.
3200        ///
3201        /// # Long running operations
3202        ///
3203        /// This starts, but does not poll, a longrunning operation. More information
3204        /// on [update_aspect_type][crate::client::CatalogService::update_aspect_type].
3205        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3206            (*self.0.stub)
3207                .update_aspect_type(self.0.request, self.0.options)
3208                .await
3209                .map(crate::Response::into_body)
3210        }
3211
3212        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_aspect_type`.
3213        pub fn poller(
3214            self,
3215        ) -> impl google_cloud_lro::Poller<crate::model::AspectType, crate::model::OperationMetadata>
3216        {
3217            type Operation = google_cloud_lro::internal::Operation<
3218                crate::model::AspectType,
3219                crate::model::OperationMetadata,
3220            >;
3221            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3222            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3223            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3224            if let Some(ref mut details) = poller_options.tracing {
3225                details.method_name = "google_cloud_dataplex_v1::client::CatalogService::update_aspect_type::until_done";
3226            }
3227
3228            let stub = self.0.stub.clone();
3229            let mut options = self.0.options.clone();
3230            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3231            let query = move |name| {
3232                let stub = stub.clone();
3233                let options = options.clone();
3234                async {
3235                    let op = GetOperation::new(stub)
3236                        .set_name(name)
3237                        .with_options(options)
3238                        .send()
3239                        .await?;
3240                    Ok(Operation::new(op))
3241                }
3242            };
3243
3244            let start = move || async {
3245                let op = self.send().await?;
3246                Ok(Operation::new(op))
3247            };
3248
3249            use google_cloud_lro::internal::PollerExt;
3250            {
3251                google_cloud_lro::internal::new_poller(
3252                    polling_error_policy,
3253                    polling_backoff_policy,
3254                    start,
3255                    query,
3256                )
3257            }
3258            .with_options(poller_options)
3259        }
3260
3261        /// Sets the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
3262        ///
3263        /// This is a **required** field for requests.
3264        pub fn set_aspect_type<T>(mut self, v: T) -> Self
3265        where
3266            T: std::convert::Into<crate::model::AspectType>,
3267        {
3268            self.0.request.aspect_type = std::option::Option::Some(v.into());
3269            self
3270        }
3271
3272        /// Sets or clears the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
3273        ///
3274        /// This is a **required** field for requests.
3275        pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
3276        where
3277            T: std::convert::Into<crate::model::AspectType>,
3278        {
3279            self.0.request.aspect_type = v.map(|x| x.into());
3280            self
3281        }
3282
3283        /// Sets the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
3284        ///
3285        /// This is a **required** field for requests.
3286        pub fn set_update_mask<T>(mut self, v: T) -> Self
3287        where
3288            T: std::convert::Into<wkt::FieldMask>,
3289        {
3290            self.0.request.update_mask = std::option::Option::Some(v.into());
3291            self
3292        }
3293
3294        /// Sets or clears the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
3295        ///
3296        /// This is a **required** field for requests.
3297        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3298        where
3299            T: std::convert::Into<wkt::FieldMask>,
3300        {
3301            self.0.request.update_mask = v.map(|x| x.into());
3302            self
3303        }
3304
3305        /// Sets the value of [validate_only][crate::model::UpdateAspectTypeRequest::validate_only].
3306        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3307            self.0.request.validate_only = v.into();
3308            self
3309        }
3310    }
3311
3312    #[doc(hidden)]
3313    impl crate::RequestBuilder for UpdateAspectType {
3314        fn request_options(&mut self) -> &mut crate::RequestOptions {
3315            &mut self.0.options
3316        }
3317    }
3318
3319    /// The request builder for [CatalogService::delete_aspect_type][crate::client::CatalogService::delete_aspect_type] calls.
3320    ///
3321    /// # Example
3322    /// ```
3323    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteAspectType;
3324    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3325    /// use google_cloud_lro::Poller;
3326    ///
3327    /// let builder = prepare_request_builder();
3328    /// let response = builder.poller().until_done().await?;
3329    /// # Ok(()) }
3330    ///
3331    /// fn prepare_request_builder() -> DeleteAspectType {
3332    ///   # panic!();
3333    ///   // ... details omitted ...
3334    /// }
3335    /// ```
3336    #[derive(Clone, Debug)]
3337    pub struct DeleteAspectType(RequestBuilder<crate::model::DeleteAspectTypeRequest>);
3338
3339    impl DeleteAspectType {
3340        pub(crate) fn new(
3341            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3342        ) -> Self {
3343            Self(RequestBuilder::new(stub))
3344        }
3345
3346        /// Sets the full request, replacing any prior values.
3347        pub fn with_request<V: Into<crate::model::DeleteAspectTypeRequest>>(
3348            mut self,
3349            v: V,
3350        ) -> Self {
3351            self.0.request = v.into();
3352            self
3353        }
3354
3355        /// Sets all the options, replacing any prior values.
3356        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3357            self.0.options = v.into();
3358            self
3359        }
3360
3361        /// Sends the request.
3362        ///
3363        /// # Long running operations
3364        ///
3365        /// This starts, but does not poll, a longrunning operation. More information
3366        /// on [delete_aspect_type][crate::client::CatalogService::delete_aspect_type].
3367        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3368            (*self.0.stub)
3369                .delete_aspect_type(self.0.request, self.0.options)
3370                .await
3371                .map(crate::Response::into_body)
3372        }
3373
3374        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_aspect_type`.
3375        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3376            type Operation =
3377                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3378            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3379            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3380            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3381            if let Some(ref mut details) = poller_options.tracing {
3382                details.method_name = "google_cloud_dataplex_v1::client::CatalogService::delete_aspect_type::until_done";
3383            }
3384
3385            let stub = self.0.stub.clone();
3386            let mut options = self.0.options.clone();
3387            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3388            let query = move |name| {
3389                let stub = stub.clone();
3390                let options = options.clone();
3391                async {
3392                    let op = GetOperation::new(stub)
3393                        .set_name(name)
3394                        .with_options(options)
3395                        .send()
3396                        .await?;
3397                    Ok(Operation::new(op))
3398                }
3399            };
3400
3401            let start = move || async {
3402                let op = self.send().await?;
3403                Ok(Operation::new(op))
3404            };
3405
3406            use google_cloud_lro::internal::PollerExt;
3407            {
3408                google_cloud_lro::internal::new_unit_response_poller(
3409                    polling_error_policy,
3410                    polling_backoff_policy,
3411                    start,
3412                    query,
3413                )
3414            }
3415            .with_options(poller_options)
3416        }
3417
3418        /// Sets the value of [name][crate::model::DeleteAspectTypeRequest::name].
3419        ///
3420        /// This is a **required** field for requests.
3421        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3422            self.0.request.name = v.into();
3423            self
3424        }
3425
3426        /// Sets the value of [etag][crate::model::DeleteAspectTypeRequest::etag].
3427        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3428            self.0.request.etag = v.into();
3429            self
3430        }
3431    }
3432
3433    #[doc(hidden)]
3434    impl crate::RequestBuilder for DeleteAspectType {
3435        fn request_options(&mut self) -> &mut crate::RequestOptions {
3436            &mut self.0.options
3437        }
3438    }
3439
3440    /// The request builder for [CatalogService::list_aspect_types][crate::client::CatalogService::list_aspect_types] calls.
3441    ///
3442    /// # Example
3443    /// ```
3444    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListAspectTypes;
3445    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3446    /// use google_cloud_gax::paginator::ItemPaginator;
3447    ///
3448    /// let builder = prepare_request_builder();
3449    /// let mut items = builder.by_item();
3450    /// while let Some(result) = items.next().await {
3451    ///   let item = result?;
3452    /// }
3453    /// # Ok(()) }
3454    ///
3455    /// fn prepare_request_builder() -> ListAspectTypes {
3456    ///   # panic!();
3457    ///   // ... details omitted ...
3458    /// }
3459    /// ```
3460    #[derive(Clone, Debug)]
3461    pub struct ListAspectTypes(RequestBuilder<crate::model::ListAspectTypesRequest>);
3462
3463    impl ListAspectTypes {
3464        pub(crate) fn new(
3465            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3466        ) -> Self {
3467            Self(RequestBuilder::new(stub))
3468        }
3469
3470        /// Sets the full request, replacing any prior values.
3471        pub fn with_request<V: Into<crate::model::ListAspectTypesRequest>>(mut self, v: V) -> Self {
3472            self.0.request = v.into();
3473            self
3474        }
3475
3476        /// Sets all the options, replacing any prior values.
3477        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3478            self.0.options = v.into();
3479            self
3480        }
3481
3482        /// Sends the request.
3483        pub async fn send(self) -> Result<crate::model::ListAspectTypesResponse> {
3484            (*self.0.stub)
3485                .list_aspect_types(self.0.request, self.0.options)
3486                .await
3487                .map(crate::Response::into_body)
3488        }
3489
3490        /// Streams each page in the collection.
3491        pub fn by_page(
3492            self,
3493        ) -> impl google_cloud_gax::paginator::Paginator<
3494            crate::model::ListAspectTypesResponse,
3495            crate::Error,
3496        > {
3497            use std::clone::Clone;
3498            let token = self.0.request.page_token.clone();
3499            let execute = move |token: String| {
3500                let mut builder = self.clone();
3501                builder.0.request = builder.0.request.set_page_token(token);
3502                builder.send()
3503            };
3504            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3505        }
3506
3507        /// Streams each item in the collection.
3508        pub fn by_item(
3509            self,
3510        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3511            crate::model::ListAspectTypesResponse,
3512            crate::Error,
3513        > {
3514            use google_cloud_gax::paginator::Paginator;
3515            self.by_page().items()
3516        }
3517
3518        /// Sets the value of [parent][crate::model::ListAspectTypesRequest::parent].
3519        ///
3520        /// This is a **required** field for requests.
3521        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3522            self.0.request.parent = v.into();
3523            self
3524        }
3525
3526        /// Sets the value of [page_size][crate::model::ListAspectTypesRequest::page_size].
3527        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3528            self.0.request.page_size = v.into();
3529            self
3530        }
3531
3532        /// Sets the value of [page_token][crate::model::ListAspectTypesRequest::page_token].
3533        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3534            self.0.request.page_token = v.into();
3535            self
3536        }
3537
3538        /// Sets the value of [filter][crate::model::ListAspectTypesRequest::filter].
3539        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3540            self.0.request.filter = v.into();
3541            self
3542        }
3543
3544        /// Sets the value of [order_by][crate::model::ListAspectTypesRequest::order_by].
3545        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3546            self.0.request.order_by = v.into();
3547            self
3548        }
3549    }
3550
3551    #[doc(hidden)]
3552    impl crate::RequestBuilder for ListAspectTypes {
3553        fn request_options(&mut self) -> &mut crate::RequestOptions {
3554            &mut self.0.options
3555        }
3556    }
3557
3558    /// The request builder for [CatalogService::get_aspect_type][crate::client::CatalogService::get_aspect_type] calls.
3559    ///
3560    /// # Example
3561    /// ```
3562    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetAspectType;
3563    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3564    ///
3565    /// let builder = prepare_request_builder();
3566    /// let response = builder.send().await?;
3567    /// # Ok(()) }
3568    ///
3569    /// fn prepare_request_builder() -> GetAspectType {
3570    ///   # panic!();
3571    ///   // ... details omitted ...
3572    /// }
3573    /// ```
3574    #[derive(Clone, Debug)]
3575    pub struct GetAspectType(RequestBuilder<crate::model::GetAspectTypeRequest>);
3576
3577    impl GetAspectType {
3578        pub(crate) fn new(
3579            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3580        ) -> Self {
3581            Self(RequestBuilder::new(stub))
3582        }
3583
3584        /// Sets the full request, replacing any prior values.
3585        pub fn with_request<V: Into<crate::model::GetAspectTypeRequest>>(mut self, v: V) -> Self {
3586            self.0.request = v.into();
3587            self
3588        }
3589
3590        /// Sets all the options, replacing any prior values.
3591        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3592            self.0.options = v.into();
3593            self
3594        }
3595
3596        /// Sends the request.
3597        pub async fn send(self) -> Result<crate::model::AspectType> {
3598            (*self.0.stub)
3599                .get_aspect_type(self.0.request, self.0.options)
3600                .await
3601                .map(crate::Response::into_body)
3602        }
3603
3604        /// Sets the value of [name][crate::model::GetAspectTypeRequest::name].
3605        ///
3606        /// This is a **required** field for requests.
3607        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3608            self.0.request.name = v.into();
3609            self
3610        }
3611    }
3612
3613    #[doc(hidden)]
3614    impl crate::RequestBuilder for GetAspectType {
3615        fn request_options(&mut self) -> &mut crate::RequestOptions {
3616            &mut self.0.options
3617        }
3618    }
3619
3620    /// The request builder for [CatalogService::create_entry_group][crate::client::CatalogService::create_entry_group] calls.
3621    ///
3622    /// # Example
3623    /// ```
3624    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntryGroup;
3625    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3626    /// use google_cloud_lro::Poller;
3627    ///
3628    /// let builder = prepare_request_builder();
3629    /// let response = builder.poller().until_done().await?;
3630    /// # Ok(()) }
3631    ///
3632    /// fn prepare_request_builder() -> CreateEntryGroup {
3633    ///   # panic!();
3634    ///   // ... details omitted ...
3635    /// }
3636    /// ```
3637    #[derive(Clone, Debug)]
3638    pub struct CreateEntryGroup(RequestBuilder<crate::model::CreateEntryGroupRequest>);
3639
3640    impl CreateEntryGroup {
3641        pub(crate) fn new(
3642            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3643        ) -> Self {
3644            Self(RequestBuilder::new(stub))
3645        }
3646
3647        /// Sets the full request, replacing any prior values.
3648        pub fn with_request<V: Into<crate::model::CreateEntryGroupRequest>>(
3649            mut self,
3650            v: V,
3651        ) -> Self {
3652            self.0.request = v.into();
3653            self
3654        }
3655
3656        /// Sets all the options, replacing any prior values.
3657        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3658            self.0.options = v.into();
3659            self
3660        }
3661
3662        /// Sends the request.
3663        ///
3664        /// # Long running operations
3665        ///
3666        /// This starts, but does not poll, a longrunning operation. More information
3667        /// on [create_entry_group][crate::client::CatalogService::create_entry_group].
3668        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3669            (*self.0.stub)
3670                .create_entry_group(self.0.request, self.0.options)
3671                .await
3672                .map(crate::Response::into_body)
3673        }
3674
3675        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_entry_group`.
3676        pub fn poller(
3677            self,
3678        ) -> impl google_cloud_lro::Poller<crate::model::EntryGroup, crate::model::OperationMetadata>
3679        {
3680            type Operation = google_cloud_lro::internal::Operation<
3681                crate::model::EntryGroup,
3682                crate::model::OperationMetadata,
3683            >;
3684            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3685            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3686            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3687            if let Some(ref mut details) = poller_options.tracing {
3688                details.method_name = "google_cloud_dataplex_v1::client::CatalogService::create_entry_group::until_done";
3689            }
3690
3691            let stub = self.0.stub.clone();
3692            let mut options = self.0.options.clone();
3693            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3694            let query = move |name| {
3695                let stub = stub.clone();
3696                let options = options.clone();
3697                async {
3698                    let op = GetOperation::new(stub)
3699                        .set_name(name)
3700                        .with_options(options)
3701                        .send()
3702                        .await?;
3703                    Ok(Operation::new(op))
3704                }
3705            };
3706
3707            let start = move || async {
3708                let op = self.send().await?;
3709                Ok(Operation::new(op))
3710            };
3711
3712            use google_cloud_lro::internal::PollerExt;
3713            {
3714                google_cloud_lro::internal::new_poller(
3715                    polling_error_policy,
3716                    polling_backoff_policy,
3717                    start,
3718                    query,
3719                )
3720            }
3721            .with_options(poller_options)
3722        }
3723
3724        /// Sets the value of [parent][crate::model::CreateEntryGroupRequest::parent].
3725        ///
3726        /// This is a **required** field for requests.
3727        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3728            self.0.request.parent = v.into();
3729            self
3730        }
3731
3732        /// Sets the value of [entry_group_id][crate::model::CreateEntryGroupRequest::entry_group_id].
3733        ///
3734        /// This is a **required** field for requests.
3735        pub fn set_entry_group_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3736            self.0.request.entry_group_id = v.into();
3737            self
3738        }
3739
3740        /// Sets the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
3741        ///
3742        /// This is a **required** field for requests.
3743        pub fn set_entry_group<T>(mut self, v: T) -> Self
3744        where
3745            T: std::convert::Into<crate::model::EntryGroup>,
3746        {
3747            self.0.request.entry_group = std::option::Option::Some(v.into());
3748            self
3749        }
3750
3751        /// Sets or clears the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
3752        ///
3753        /// This is a **required** field for requests.
3754        pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
3755        where
3756            T: std::convert::Into<crate::model::EntryGroup>,
3757        {
3758            self.0.request.entry_group = v.map(|x| x.into());
3759            self
3760        }
3761
3762        /// Sets the value of [validate_only][crate::model::CreateEntryGroupRequest::validate_only].
3763        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3764            self.0.request.validate_only = v.into();
3765            self
3766        }
3767    }
3768
3769    #[doc(hidden)]
3770    impl crate::RequestBuilder for CreateEntryGroup {
3771        fn request_options(&mut self) -> &mut crate::RequestOptions {
3772            &mut self.0.options
3773        }
3774    }
3775
3776    /// The request builder for [CatalogService::update_entry_group][crate::client::CatalogService::update_entry_group] calls.
3777    ///
3778    /// # Example
3779    /// ```
3780    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntryGroup;
3781    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3782    /// use google_cloud_lro::Poller;
3783    ///
3784    /// let builder = prepare_request_builder();
3785    /// let response = builder.poller().until_done().await?;
3786    /// # Ok(()) }
3787    ///
3788    /// fn prepare_request_builder() -> UpdateEntryGroup {
3789    ///   # panic!();
3790    ///   // ... details omitted ...
3791    /// }
3792    /// ```
3793    #[derive(Clone, Debug)]
3794    pub struct UpdateEntryGroup(RequestBuilder<crate::model::UpdateEntryGroupRequest>);
3795
3796    impl UpdateEntryGroup {
3797        pub(crate) fn new(
3798            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3799        ) -> Self {
3800            Self(RequestBuilder::new(stub))
3801        }
3802
3803        /// Sets the full request, replacing any prior values.
3804        pub fn with_request<V: Into<crate::model::UpdateEntryGroupRequest>>(
3805            mut self,
3806            v: V,
3807        ) -> Self {
3808            self.0.request = v.into();
3809            self
3810        }
3811
3812        /// Sets all the options, replacing any prior values.
3813        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3814            self.0.options = v.into();
3815            self
3816        }
3817
3818        /// Sends the request.
3819        ///
3820        /// # Long running operations
3821        ///
3822        /// This starts, but does not poll, a longrunning operation. More information
3823        /// on [update_entry_group][crate::client::CatalogService::update_entry_group].
3824        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3825            (*self.0.stub)
3826                .update_entry_group(self.0.request, self.0.options)
3827                .await
3828                .map(crate::Response::into_body)
3829        }
3830
3831        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_entry_group`.
3832        pub fn poller(
3833            self,
3834        ) -> impl google_cloud_lro::Poller<crate::model::EntryGroup, crate::model::OperationMetadata>
3835        {
3836            type Operation = google_cloud_lro::internal::Operation<
3837                crate::model::EntryGroup,
3838                crate::model::OperationMetadata,
3839            >;
3840            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3841            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3842            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3843            if let Some(ref mut details) = poller_options.tracing {
3844                details.method_name = "google_cloud_dataplex_v1::client::CatalogService::update_entry_group::until_done";
3845            }
3846
3847            let stub = self.0.stub.clone();
3848            let mut options = self.0.options.clone();
3849            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3850            let query = move |name| {
3851                let stub = stub.clone();
3852                let options = options.clone();
3853                async {
3854                    let op = GetOperation::new(stub)
3855                        .set_name(name)
3856                        .with_options(options)
3857                        .send()
3858                        .await?;
3859                    Ok(Operation::new(op))
3860                }
3861            };
3862
3863            let start = move || async {
3864                let op = self.send().await?;
3865                Ok(Operation::new(op))
3866            };
3867
3868            use google_cloud_lro::internal::PollerExt;
3869            {
3870                google_cloud_lro::internal::new_poller(
3871                    polling_error_policy,
3872                    polling_backoff_policy,
3873                    start,
3874                    query,
3875                )
3876            }
3877            .with_options(poller_options)
3878        }
3879
3880        /// Sets the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
3881        ///
3882        /// This is a **required** field for requests.
3883        pub fn set_entry_group<T>(mut self, v: T) -> Self
3884        where
3885            T: std::convert::Into<crate::model::EntryGroup>,
3886        {
3887            self.0.request.entry_group = std::option::Option::Some(v.into());
3888            self
3889        }
3890
3891        /// Sets or clears the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
3892        ///
3893        /// This is a **required** field for requests.
3894        pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
3895        where
3896            T: std::convert::Into<crate::model::EntryGroup>,
3897        {
3898            self.0.request.entry_group = v.map(|x| x.into());
3899            self
3900        }
3901
3902        /// Sets the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
3903        ///
3904        /// This is a **required** field for requests.
3905        pub fn set_update_mask<T>(mut self, v: T) -> Self
3906        where
3907            T: std::convert::Into<wkt::FieldMask>,
3908        {
3909            self.0.request.update_mask = std::option::Option::Some(v.into());
3910            self
3911        }
3912
3913        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
3914        ///
3915        /// This is a **required** field for requests.
3916        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3917        where
3918            T: std::convert::Into<wkt::FieldMask>,
3919        {
3920            self.0.request.update_mask = v.map(|x| x.into());
3921            self
3922        }
3923
3924        /// Sets the value of [validate_only][crate::model::UpdateEntryGroupRequest::validate_only].
3925        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3926            self.0.request.validate_only = v.into();
3927            self
3928        }
3929    }
3930
3931    #[doc(hidden)]
3932    impl crate::RequestBuilder for UpdateEntryGroup {
3933        fn request_options(&mut self) -> &mut crate::RequestOptions {
3934            &mut self.0.options
3935        }
3936    }
3937
3938    /// The request builder for [CatalogService::delete_entry_group][crate::client::CatalogService::delete_entry_group] calls.
3939    ///
3940    /// # Example
3941    /// ```
3942    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntryGroup;
3943    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
3944    /// use google_cloud_lro::Poller;
3945    ///
3946    /// let builder = prepare_request_builder();
3947    /// let response = builder.poller().until_done().await?;
3948    /// # Ok(()) }
3949    ///
3950    /// fn prepare_request_builder() -> DeleteEntryGroup {
3951    ///   # panic!();
3952    ///   // ... details omitted ...
3953    /// }
3954    /// ```
3955    #[derive(Clone, Debug)]
3956    pub struct DeleteEntryGroup(RequestBuilder<crate::model::DeleteEntryGroupRequest>);
3957
3958    impl DeleteEntryGroup {
3959        pub(crate) fn new(
3960            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3961        ) -> Self {
3962            Self(RequestBuilder::new(stub))
3963        }
3964
3965        /// Sets the full request, replacing any prior values.
3966        pub fn with_request<V: Into<crate::model::DeleteEntryGroupRequest>>(
3967            mut self,
3968            v: V,
3969        ) -> Self {
3970            self.0.request = v.into();
3971            self
3972        }
3973
3974        /// Sets all the options, replacing any prior values.
3975        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3976            self.0.options = v.into();
3977            self
3978        }
3979
3980        /// Sends the request.
3981        ///
3982        /// # Long running operations
3983        ///
3984        /// This starts, but does not poll, a longrunning operation. More information
3985        /// on [delete_entry_group][crate::client::CatalogService::delete_entry_group].
3986        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3987            (*self.0.stub)
3988                .delete_entry_group(self.0.request, self.0.options)
3989                .await
3990                .map(crate::Response::into_body)
3991        }
3992
3993        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_entry_group`.
3994        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3995            type Operation =
3996                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3997            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3998            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3999            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4000            if let Some(ref mut details) = poller_options.tracing {
4001                details.method_name = "google_cloud_dataplex_v1::client::CatalogService::delete_entry_group::until_done";
4002            }
4003
4004            let stub = self.0.stub.clone();
4005            let mut options = self.0.options.clone();
4006            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4007            let query = move |name| {
4008                let stub = stub.clone();
4009                let options = options.clone();
4010                async {
4011                    let op = GetOperation::new(stub)
4012                        .set_name(name)
4013                        .with_options(options)
4014                        .send()
4015                        .await?;
4016                    Ok(Operation::new(op))
4017                }
4018            };
4019
4020            let start = move || async {
4021                let op = self.send().await?;
4022                Ok(Operation::new(op))
4023            };
4024
4025            use google_cloud_lro::internal::PollerExt;
4026            {
4027                google_cloud_lro::internal::new_unit_response_poller(
4028                    polling_error_policy,
4029                    polling_backoff_policy,
4030                    start,
4031                    query,
4032                )
4033            }
4034            .with_options(poller_options)
4035        }
4036
4037        /// Sets the value of [name][crate::model::DeleteEntryGroupRequest::name].
4038        ///
4039        /// This is a **required** field for requests.
4040        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4041            self.0.request.name = v.into();
4042            self
4043        }
4044
4045        /// Sets the value of [etag][crate::model::DeleteEntryGroupRequest::etag].
4046        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
4047            self.0.request.etag = v.into();
4048            self
4049        }
4050    }
4051
4052    #[doc(hidden)]
4053    impl crate::RequestBuilder for DeleteEntryGroup {
4054        fn request_options(&mut self) -> &mut crate::RequestOptions {
4055            &mut self.0.options
4056        }
4057    }
4058
4059    /// The request builder for [CatalogService::list_entry_groups][crate::client::CatalogService::list_entry_groups] calls.
4060    ///
4061    /// # Example
4062    /// ```
4063    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListEntryGroups;
4064    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4065    /// use google_cloud_gax::paginator::ItemPaginator;
4066    ///
4067    /// let builder = prepare_request_builder();
4068    /// let mut items = builder.by_item();
4069    /// while let Some(result) = items.next().await {
4070    ///   let item = result?;
4071    /// }
4072    /// # Ok(()) }
4073    ///
4074    /// fn prepare_request_builder() -> ListEntryGroups {
4075    ///   # panic!();
4076    ///   // ... details omitted ...
4077    /// }
4078    /// ```
4079    #[derive(Clone, Debug)]
4080    pub struct ListEntryGroups(RequestBuilder<crate::model::ListEntryGroupsRequest>);
4081
4082    impl ListEntryGroups {
4083        pub(crate) fn new(
4084            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4085        ) -> Self {
4086            Self(RequestBuilder::new(stub))
4087        }
4088
4089        /// Sets the full request, replacing any prior values.
4090        pub fn with_request<V: Into<crate::model::ListEntryGroupsRequest>>(mut self, v: V) -> Self {
4091            self.0.request = v.into();
4092            self
4093        }
4094
4095        /// Sets all the options, replacing any prior values.
4096        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4097            self.0.options = v.into();
4098            self
4099        }
4100
4101        /// Sends the request.
4102        pub async fn send(self) -> Result<crate::model::ListEntryGroupsResponse> {
4103            (*self.0.stub)
4104                .list_entry_groups(self.0.request, self.0.options)
4105                .await
4106                .map(crate::Response::into_body)
4107        }
4108
4109        /// Streams each page in the collection.
4110        pub fn by_page(
4111            self,
4112        ) -> impl google_cloud_gax::paginator::Paginator<
4113            crate::model::ListEntryGroupsResponse,
4114            crate::Error,
4115        > {
4116            use std::clone::Clone;
4117            let token = self.0.request.page_token.clone();
4118            let execute = move |token: String| {
4119                let mut builder = self.clone();
4120                builder.0.request = builder.0.request.set_page_token(token);
4121                builder.send()
4122            };
4123            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4124        }
4125
4126        /// Streams each item in the collection.
4127        pub fn by_item(
4128            self,
4129        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4130            crate::model::ListEntryGroupsResponse,
4131            crate::Error,
4132        > {
4133            use google_cloud_gax::paginator::Paginator;
4134            self.by_page().items()
4135        }
4136
4137        /// Sets the value of [parent][crate::model::ListEntryGroupsRequest::parent].
4138        ///
4139        /// This is a **required** field for requests.
4140        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4141            self.0.request.parent = v.into();
4142            self
4143        }
4144
4145        /// Sets the value of [page_size][crate::model::ListEntryGroupsRequest::page_size].
4146        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4147            self.0.request.page_size = v.into();
4148            self
4149        }
4150
4151        /// Sets the value of [page_token][crate::model::ListEntryGroupsRequest::page_token].
4152        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4153            self.0.request.page_token = v.into();
4154            self
4155        }
4156
4157        /// Sets the value of [filter][crate::model::ListEntryGroupsRequest::filter].
4158        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4159            self.0.request.filter = v.into();
4160            self
4161        }
4162
4163        /// Sets the value of [order_by][crate::model::ListEntryGroupsRequest::order_by].
4164        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4165            self.0.request.order_by = v.into();
4166            self
4167        }
4168    }
4169
4170    #[doc(hidden)]
4171    impl crate::RequestBuilder for ListEntryGroups {
4172        fn request_options(&mut self) -> &mut crate::RequestOptions {
4173            &mut self.0.options
4174        }
4175    }
4176
4177    /// The request builder for [CatalogService::get_entry_group][crate::client::CatalogService::get_entry_group] calls.
4178    ///
4179    /// # Example
4180    /// ```
4181    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntryGroup;
4182    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4183    ///
4184    /// let builder = prepare_request_builder();
4185    /// let response = builder.send().await?;
4186    /// # Ok(()) }
4187    ///
4188    /// fn prepare_request_builder() -> GetEntryGroup {
4189    ///   # panic!();
4190    ///   // ... details omitted ...
4191    /// }
4192    /// ```
4193    #[derive(Clone, Debug)]
4194    pub struct GetEntryGroup(RequestBuilder<crate::model::GetEntryGroupRequest>);
4195
4196    impl GetEntryGroup {
4197        pub(crate) fn new(
4198            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4199        ) -> Self {
4200            Self(RequestBuilder::new(stub))
4201        }
4202
4203        /// Sets the full request, replacing any prior values.
4204        pub fn with_request<V: Into<crate::model::GetEntryGroupRequest>>(mut self, v: V) -> Self {
4205            self.0.request = v.into();
4206            self
4207        }
4208
4209        /// Sets all the options, replacing any prior values.
4210        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4211            self.0.options = v.into();
4212            self
4213        }
4214
4215        /// Sends the request.
4216        pub async fn send(self) -> Result<crate::model::EntryGroup> {
4217            (*self.0.stub)
4218                .get_entry_group(self.0.request, self.0.options)
4219                .await
4220                .map(crate::Response::into_body)
4221        }
4222
4223        /// Sets the value of [name][crate::model::GetEntryGroupRequest::name].
4224        ///
4225        /// This is a **required** field for requests.
4226        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4227            self.0.request.name = v.into();
4228            self
4229        }
4230    }
4231
4232    #[doc(hidden)]
4233    impl crate::RequestBuilder for GetEntryGroup {
4234        fn request_options(&mut self) -> &mut crate::RequestOptions {
4235            &mut self.0.options
4236        }
4237    }
4238
4239    /// The request builder for [CatalogService::create_entry][crate::client::CatalogService::create_entry] calls.
4240    ///
4241    /// # Example
4242    /// ```
4243    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntry;
4244    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4245    ///
4246    /// let builder = prepare_request_builder();
4247    /// let response = builder.send().await?;
4248    /// # Ok(()) }
4249    ///
4250    /// fn prepare_request_builder() -> CreateEntry {
4251    ///   # panic!();
4252    ///   // ... details omitted ...
4253    /// }
4254    /// ```
4255    #[derive(Clone, Debug)]
4256    pub struct CreateEntry(RequestBuilder<crate::model::CreateEntryRequest>);
4257
4258    impl CreateEntry {
4259        pub(crate) fn new(
4260            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4261        ) -> Self {
4262            Self(RequestBuilder::new(stub))
4263        }
4264
4265        /// Sets the full request, replacing any prior values.
4266        pub fn with_request<V: Into<crate::model::CreateEntryRequest>>(mut self, v: V) -> Self {
4267            self.0.request = v.into();
4268            self
4269        }
4270
4271        /// Sets all the options, replacing any prior values.
4272        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4273            self.0.options = v.into();
4274            self
4275        }
4276
4277        /// Sends the request.
4278        pub async fn send(self) -> Result<crate::model::Entry> {
4279            (*self.0.stub)
4280                .create_entry(self.0.request, self.0.options)
4281                .await
4282                .map(crate::Response::into_body)
4283        }
4284
4285        /// Sets the value of [parent][crate::model::CreateEntryRequest::parent].
4286        ///
4287        /// This is a **required** field for requests.
4288        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4289            self.0.request.parent = v.into();
4290            self
4291        }
4292
4293        /// Sets the value of [entry_id][crate::model::CreateEntryRequest::entry_id].
4294        ///
4295        /// This is a **required** field for requests.
4296        pub fn set_entry_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4297            self.0.request.entry_id = v.into();
4298            self
4299        }
4300
4301        /// Sets the value of [entry][crate::model::CreateEntryRequest::entry].
4302        ///
4303        /// This is a **required** field for requests.
4304        pub fn set_entry<T>(mut self, v: T) -> Self
4305        where
4306            T: std::convert::Into<crate::model::Entry>,
4307        {
4308            self.0.request.entry = std::option::Option::Some(v.into());
4309            self
4310        }
4311
4312        /// Sets or clears the value of [entry][crate::model::CreateEntryRequest::entry].
4313        ///
4314        /// This is a **required** field for requests.
4315        pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
4316        where
4317            T: std::convert::Into<crate::model::Entry>,
4318        {
4319            self.0.request.entry = v.map(|x| x.into());
4320            self
4321        }
4322    }
4323
4324    #[doc(hidden)]
4325    impl crate::RequestBuilder for CreateEntry {
4326        fn request_options(&mut self) -> &mut crate::RequestOptions {
4327            &mut self.0.options
4328        }
4329    }
4330
4331    /// The request builder for [CatalogService::update_entry][crate::client::CatalogService::update_entry] calls.
4332    ///
4333    /// # Example
4334    /// ```
4335    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntry;
4336    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4337    ///
4338    /// let builder = prepare_request_builder();
4339    /// let response = builder.send().await?;
4340    /// # Ok(()) }
4341    ///
4342    /// fn prepare_request_builder() -> UpdateEntry {
4343    ///   # panic!();
4344    ///   // ... details omitted ...
4345    /// }
4346    /// ```
4347    #[derive(Clone, Debug)]
4348    pub struct UpdateEntry(RequestBuilder<crate::model::UpdateEntryRequest>);
4349
4350    impl UpdateEntry {
4351        pub(crate) fn new(
4352            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4353        ) -> Self {
4354            Self(RequestBuilder::new(stub))
4355        }
4356
4357        /// Sets the full request, replacing any prior values.
4358        pub fn with_request<V: Into<crate::model::UpdateEntryRequest>>(mut self, v: V) -> Self {
4359            self.0.request = v.into();
4360            self
4361        }
4362
4363        /// Sets all the options, replacing any prior values.
4364        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4365            self.0.options = v.into();
4366            self
4367        }
4368
4369        /// Sends the request.
4370        pub async fn send(self) -> Result<crate::model::Entry> {
4371            (*self.0.stub)
4372                .update_entry(self.0.request, self.0.options)
4373                .await
4374                .map(crate::Response::into_body)
4375        }
4376
4377        /// Sets the value of [entry][crate::model::UpdateEntryRequest::entry].
4378        ///
4379        /// This is a **required** field for requests.
4380        pub fn set_entry<T>(mut self, v: T) -> Self
4381        where
4382            T: std::convert::Into<crate::model::Entry>,
4383        {
4384            self.0.request.entry = std::option::Option::Some(v.into());
4385            self
4386        }
4387
4388        /// Sets or clears the value of [entry][crate::model::UpdateEntryRequest::entry].
4389        ///
4390        /// This is a **required** field for requests.
4391        pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
4392        where
4393            T: std::convert::Into<crate::model::Entry>,
4394        {
4395            self.0.request.entry = v.map(|x| x.into());
4396            self
4397        }
4398
4399        /// Sets the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
4400        pub fn set_update_mask<T>(mut self, v: T) -> Self
4401        where
4402            T: std::convert::Into<wkt::FieldMask>,
4403        {
4404            self.0.request.update_mask = std::option::Option::Some(v.into());
4405            self
4406        }
4407
4408        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
4409        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4410        where
4411            T: std::convert::Into<wkt::FieldMask>,
4412        {
4413            self.0.request.update_mask = v.map(|x| x.into());
4414            self
4415        }
4416
4417        /// Sets the value of [allow_missing][crate::model::UpdateEntryRequest::allow_missing].
4418        pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
4419            self.0.request.allow_missing = v.into();
4420            self
4421        }
4422
4423        /// Sets the value of [delete_missing_aspects][crate::model::UpdateEntryRequest::delete_missing_aspects].
4424        pub fn set_delete_missing_aspects<T: Into<bool>>(mut self, v: T) -> Self {
4425            self.0.request.delete_missing_aspects = v.into();
4426            self
4427        }
4428
4429        /// Sets the value of [aspect_keys][crate::model::UpdateEntryRequest::aspect_keys].
4430        pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
4431        where
4432            T: std::iter::IntoIterator<Item = V>,
4433            V: std::convert::Into<std::string::String>,
4434        {
4435            use std::iter::Iterator;
4436            self.0.request.aspect_keys = v.into_iter().map(|i| i.into()).collect();
4437            self
4438        }
4439    }
4440
4441    #[doc(hidden)]
4442    impl crate::RequestBuilder for UpdateEntry {
4443        fn request_options(&mut self) -> &mut crate::RequestOptions {
4444            &mut self.0.options
4445        }
4446    }
4447
4448    /// The request builder for [CatalogService::delete_entry][crate::client::CatalogService::delete_entry] calls.
4449    ///
4450    /// # Example
4451    /// ```
4452    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntry;
4453    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4454    ///
4455    /// let builder = prepare_request_builder();
4456    /// let response = builder.send().await?;
4457    /// # Ok(()) }
4458    ///
4459    /// fn prepare_request_builder() -> DeleteEntry {
4460    ///   # panic!();
4461    ///   // ... details omitted ...
4462    /// }
4463    /// ```
4464    #[derive(Clone, Debug)]
4465    pub struct DeleteEntry(RequestBuilder<crate::model::DeleteEntryRequest>);
4466
4467    impl DeleteEntry {
4468        pub(crate) fn new(
4469            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4470        ) -> Self {
4471            Self(RequestBuilder::new(stub))
4472        }
4473
4474        /// Sets the full request, replacing any prior values.
4475        pub fn with_request<V: Into<crate::model::DeleteEntryRequest>>(mut self, v: V) -> Self {
4476            self.0.request = v.into();
4477            self
4478        }
4479
4480        /// Sets all the options, replacing any prior values.
4481        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4482            self.0.options = v.into();
4483            self
4484        }
4485
4486        /// Sends the request.
4487        pub async fn send(self) -> Result<crate::model::Entry> {
4488            (*self.0.stub)
4489                .delete_entry(self.0.request, self.0.options)
4490                .await
4491                .map(crate::Response::into_body)
4492        }
4493
4494        /// Sets the value of [name][crate::model::DeleteEntryRequest::name].
4495        ///
4496        /// This is a **required** field for requests.
4497        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4498            self.0.request.name = v.into();
4499            self
4500        }
4501    }
4502
4503    #[doc(hidden)]
4504    impl crate::RequestBuilder for DeleteEntry {
4505        fn request_options(&mut self) -> &mut crate::RequestOptions {
4506            &mut self.0.options
4507        }
4508    }
4509
4510    /// The request builder for [CatalogService::list_entries][crate::client::CatalogService::list_entries] calls.
4511    ///
4512    /// # Example
4513    /// ```
4514    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListEntries;
4515    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4516    /// use google_cloud_gax::paginator::ItemPaginator;
4517    ///
4518    /// let builder = prepare_request_builder();
4519    /// let mut items = builder.by_item();
4520    /// while let Some(result) = items.next().await {
4521    ///   let item = result?;
4522    /// }
4523    /// # Ok(()) }
4524    ///
4525    /// fn prepare_request_builder() -> ListEntries {
4526    ///   # panic!();
4527    ///   // ... details omitted ...
4528    /// }
4529    /// ```
4530    #[derive(Clone, Debug)]
4531    pub struct ListEntries(RequestBuilder<crate::model::ListEntriesRequest>);
4532
4533    impl ListEntries {
4534        pub(crate) fn new(
4535            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4536        ) -> Self {
4537            Self(RequestBuilder::new(stub))
4538        }
4539
4540        /// Sets the full request, replacing any prior values.
4541        pub fn with_request<V: Into<crate::model::ListEntriesRequest>>(mut self, v: V) -> Self {
4542            self.0.request = v.into();
4543            self
4544        }
4545
4546        /// Sets all the options, replacing any prior values.
4547        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4548            self.0.options = v.into();
4549            self
4550        }
4551
4552        /// Sends the request.
4553        pub async fn send(self) -> Result<crate::model::ListEntriesResponse> {
4554            (*self.0.stub)
4555                .list_entries(self.0.request, self.0.options)
4556                .await
4557                .map(crate::Response::into_body)
4558        }
4559
4560        /// Streams each page in the collection.
4561        pub fn by_page(
4562            self,
4563        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListEntriesResponse, crate::Error>
4564        {
4565            use std::clone::Clone;
4566            let token = self.0.request.page_token.clone();
4567            let execute = move |token: String| {
4568                let mut builder = self.clone();
4569                builder.0.request = builder.0.request.set_page_token(token);
4570                builder.send()
4571            };
4572            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4573        }
4574
4575        /// Streams each item in the collection.
4576        pub fn by_item(
4577            self,
4578        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4579            crate::model::ListEntriesResponse,
4580            crate::Error,
4581        > {
4582            use google_cloud_gax::paginator::Paginator;
4583            self.by_page().items()
4584        }
4585
4586        /// Sets the value of [parent][crate::model::ListEntriesRequest::parent].
4587        ///
4588        /// This is a **required** field for requests.
4589        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4590            self.0.request.parent = v.into();
4591            self
4592        }
4593
4594        /// Sets the value of [page_size][crate::model::ListEntriesRequest::page_size].
4595        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4596            self.0.request.page_size = v.into();
4597            self
4598        }
4599
4600        /// Sets the value of [page_token][crate::model::ListEntriesRequest::page_token].
4601        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4602            self.0.request.page_token = v.into();
4603            self
4604        }
4605
4606        /// Sets the value of [filter][crate::model::ListEntriesRequest::filter].
4607        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4608            self.0.request.filter = v.into();
4609            self
4610        }
4611    }
4612
4613    #[doc(hidden)]
4614    impl crate::RequestBuilder for ListEntries {
4615        fn request_options(&mut self) -> &mut crate::RequestOptions {
4616            &mut self.0.options
4617        }
4618    }
4619
4620    /// The request builder for [CatalogService::get_entry][crate::client::CatalogService::get_entry] calls.
4621    ///
4622    /// # Example
4623    /// ```
4624    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntry;
4625    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4626    ///
4627    /// let builder = prepare_request_builder();
4628    /// let response = builder.send().await?;
4629    /// # Ok(()) }
4630    ///
4631    /// fn prepare_request_builder() -> GetEntry {
4632    ///   # panic!();
4633    ///   // ... details omitted ...
4634    /// }
4635    /// ```
4636    #[derive(Clone, Debug)]
4637    pub struct GetEntry(RequestBuilder<crate::model::GetEntryRequest>);
4638
4639    impl GetEntry {
4640        pub(crate) fn new(
4641            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4642        ) -> Self {
4643            Self(RequestBuilder::new(stub))
4644        }
4645
4646        /// Sets the full request, replacing any prior values.
4647        pub fn with_request<V: Into<crate::model::GetEntryRequest>>(mut self, v: V) -> Self {
4648            self.0.request = v.into();
4649            self
4650        }
4651
4652        /// Sets all the options, replacing any prior values.
4653        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4654            self.0.options = v.into();
4655            self
4656        }
4657
4658        /// Sends the request.
4659        pub async fn send(self) -> Result<crate::model::Entry> {
4660            (*self.0.stub)
4661                .get_entry(self.0.request, self.0.options)
4662                .await
4663                .map(crate::Response::into_body)
4664        }
4665
4666        /// Sets the value of [name][crate::model::GetEntryRequest::name].
4667        ///
4668        /// This is a **required** field for requests.
4669        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4670            self.0.request.name = v.into();
4671            self
4672        }
4673
4674        /// Sets the value of [view][crate::model::GetEntryRequest::view].
4675        pub fn set_view<T: Into<crate::model::EntryView>>(mut self, v: T) -> Self {
4676            self.0.request.view = v.into();
4677            self
4678        }
4679
4680        /// Sets the value of [aspect_types][crate::model::GetEntryRequest::aspect_types].
4681        pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
4682        where
4683            T: std::iter::IntoIterator<Item = V>,
4684            V: std::convert::Into<std::string::String>,
4685        {
4686            use std::iter::Iterator;
4687            self.0.request.aspect_types = v.into_iter().map(|i| i.into()).collect();
4688            self
4689        }
4690
4691        /// Sets the value of [paths][crate::model::GetEntryRequest::paths].
4692        pub fn set_paths<T, V>(mut self, v: T) -> Self
4693        where
4694            T: std::iter::IntoIterator<Item = V>,
4695            V: std::convert::Into<std::string::String>,
4696        {
4697            use std::iter::Iterator;
4698            self.0.request.paths = v.into_iter().map(|i| i.into()).collect();
4699            self
4700        }
4701    }
4702
4703    #[doc(hidden)]
4704    impl crate::RequestBuilder for GetEntry {
4705        fn request_options(&mut self) -> &mut crate::RequestOptions {
4706            &mut self.0.options
4707        }
4708    }
4709
4710    /// The request builder for [CatalogService::lookup_entry][crate::client::CatalogService::lookup_entry] calls.
4711    ///
4712    /// # Example
4713    /// ```
4714    /// # use google_cloud_dataplex_v1::builder::catalog_service::LookupEntry;
4715    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4716    ///
4717    /// let builder = prepare_request_builder();
4718    /// let response = builder.send().await?;
4719    /// # Ok(()) }
4720    ///
4721    /// fn prepare_request_builder() -> LookupEntry {
4722    ///   # panic!();
4723    ///   // ... details omitted ...
4724    /// }
4725    /// ```
4726    #[derive(Clone, Debug)]
4727    pub struct LookupEntry(RequestBuilder<crate::model::LookupEntryRequest>);
4728
4729    impl LookupEntry {
4730        pub(crate) fn new(
4731            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4732        ) -> Self {
4733            Self(RequestBuilder::new(stub))
4734        }
4735
4736        /// Sets the full request, replacing any prior values.
4737        pub fn with_request<V: Into<crate::model::LookupEntryRequest>>(mut self, v: V) -> Self {
4738            self.0.request = v.into();
4739            self
4740        }
4741
4742        /// Sets all the options, replacing any prior values.
4743        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4744            self.0.options = v.into();
4745            self
4746        }
4747
4748        /// Sends the request.
4749        pub async fn send(self) -> Result<crate::model::Entry> {
4750            (*self.0.stub)
4751                .lookup_entry(self.0.request, self.0.options)
4752                .await
4753                .map(crate::Response::into_body)
4754        }
4755
4756        /// Sets the value of [name][crate::model::LookupEntryRequest::name].
4757        ///
4758        /// This is a **required** field for requests.
4759        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4760            self.0.request.name = v.into();
4761            self
4762        }
4763
4764        /// Sets the value of [view][crate::model::LookupEntryRequest::view].
4765        pub fn set_view<T: Into<crate::model::EntryView>>(mut self, v: T) -> Self {
4766            self.0.request.view = v.into();
4767            self
4768        }
4769
4770        /// Sets the value of [aspect_types][crate::model::LookupEntryRequest::aspect_types].
4771        pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
4772        where
4773            T: std::iter::IntoIterator<Item = V>,
4774            V: std::convert::Into<std::string::String>,
4775        {
4776            use std::iter::Iterator;
4777            self.0.request.aspect_types = v.into_iter().map(|i| i.into()).collect();
4778            self
4779        }
4780
4781        /// Sets the value of [paths][crate::model::LookupEntryRequest::paths].
4782        pub fn set_paths<T, V>(mut self, v: T) -> Self
4783        where
4784            T: std::iter::IntoIterator<Item = V>,
4785            V: std::convert::Into<std::string::String>,
4786        {
4787            use std::iter::Iterator;
4788            self.0.request.paths = v.into_iter().map(|i| i.into()).collect();
4789            self
4790        }
4791
4792        /// Sets the value of [entry][crate::model::LookupEntryRequest::entry].
4793        ///
4794        /// This is a **required** field for requests.
4795        pub fn set_entry<T: Into<std::string::String>>(mut self, v: T) -> Self {
4796            self.0.request.entry = v.into();
4797            self
4798        }
4799    }
4800
4801    #[doc(hidden)]
4802    impl crate::RequestBuilder for LookupEntry {
4803        fn request_options(&mut self) -> &mut crate::RequestOptions {
4804            &mut self.0.options
4805        }
4806    }
4807
4808    /// The request builder for [CatalogService::modify_entry][crate::client::CatalogService::modify_entry] calls.
4809    ///
4810    /// # Example
4811    /// ```
4812    /// # use google_cloud_dataplex_v1::builder::catalog_service::ModifyEntry;
4813    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4814    ///
4815    /// let builder = prepare_request_builder();
4816    /// let response = builder.send().await?;
4817    /// # Ok(()) }
4818    ///
4819    /// fn prepare_request_builder() -> ModifyEntry {
4820    ///   # panic!();
4821    ///   // ... details omitted ...
4822    /// }
4823    /// ```
4824    #[derive(Clone, Debug)]
4825    pub struct ModifyEntry(RequestBuilder<crate::model::ModifyEntryRequest>);
4826
4827    impl ModifyEntry {
4828        pub(crate) fn new(
4829            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4830        ) -> Self {
4831            Self(RequestBuilder::new(stub))
4832        }
4833
4834        /// Sets the full request, replacing any prior values.
4835        pub fn with_request<V: Into<crate::model::ModifyEntryRequest>>(mut self, v: V) -> Self {
4836            self.0.request = v.into();
4837            self
4838        }
4839
4840        /// Sets all the options, replacing any prior values.
4841        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4842            self.0.options = v.into();
4843            self
4844        }
4845
4846        /// Sends the request.
4847        pub async fn send(self) -> Result<crate::model::Entry> {
4848            (*self.0.stub)
4849                .modify_entry(self.0.request, self.0.options)
4850                .await
4851                .map(crate::Response::into_body)
4852        }
4853
4854        /// Sets the value of [name][crate::model::ModifyEntryRequest::name].
4855        ///
4856        /// This is a **required** field for requests.
4857        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4858            self.0.request.name = v.into();
4859            self
4860        }
4861
4862        /// Sets the value of [entry][crate::model::ModifyEntryRequest::entry].
4863        ///
4864        /// This is a **required** field for requests.
4865        pub fn set_entry<T>(mut self, v: T) -> Self
4866        where
4867            T: std::convert::Into<crate::model::Entry>,
4868        {
4869            self.0.request.entry = std::option::Option::Some(v.into());
4870            self
4871        }
4872
4873        /// Sets or clears the value of [entry][crate::model::ModifyEntryRequest::entry].
4874        ///
4875        /// This is a **required** field for requests.
4876        pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
4877        where
4878            T: std::convert::Into<crate::model::Entry>,
4879        {
4880            self.0.request.entry = v.map(|x| x.into());
4881            self
4882        }
4883
4884        /// Sets the value of [update_mask][crate::model::ModifyEntryRequest::update_mask].
4885        pub fn set_update_mask<T>(mut self, v: T) -> Self
4886        where
4887            T: std::convert::Into<wkt::FieldMask>,
4888        {
4889            self.0.request.update_mask = std::option::Option::Some(v.into());
4890            self
4891        }
4892
4893        /// Sets or clears the value of [update_mask][crate::model::ModifyEntryRequest::update_mask].
4894        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4895        where
4896            T: std::convert::Into<wkt::FieldMask>,
4897        {
4898            self.0.request.update_mask = v.map(|x| x.into());
4899            self
4900        }
4901
4902        /// Sets the value of [delete_missing_aspects][crate::model::ModifyEntryRequest::delete_missing_aspects].
4903        pub fn set_delete_missing_aspects<T: Into<bool>>(mut self, v: T) -> Self {
4904            self.0.request.delete_missing_aspects = v.into();
4905            self
4906        }
4907
4908        /// Sets the value of [aspect_keys][crate::model::ModifyEntryRequest::aspect_keys].
4909        pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
4910        where
4911            T: std::iter::IntoIterator<Item = V>,
4912            V: std::convert::Into<std::string::String>,
4913        {
4914            use std::iter::Iterator;
4915            self.0.request.aspect_keys = v.into_iter().map(|i| i.into()).collect();
4916            self
4917        }
4918    }
4919
4920    #[doc(hidden)]
4921    impl crate::RequestBuilder for ModifyEntry {
4922        fn request_options(&mut self) -> &mut crate::RequestOptions {
4923            &mut self.0.options
4924        }
4925    }
4926
4927    /// The request builder for [CatalogService::search_entries][crate::client::CatalogService::search_entries] calls.
4928    ///
4929    /// # Example
4930    /// ```
4931    /// # use google_cloud_dataplex_v1::builder::catalog_service::SearchEntries;
4932    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
4933    /// use google_cloud_gax::paginator::ItemPaginator;
4934    ///
4935    /// let builder = prepare_request_builder();
4936    /// let mut items = builder.by_item();
4937    /// while let Some(result) = items.next().await {
4938    ///   let item = result?;
4939    /// }
4940    /// # Ok(()) }
4941    ///
4942    /// fn prepare_request_builder() -> SearchEntries {
4943    ///   # panic!();
4944    ///   // ... details omitted ...
4945    /// }
4946    /// ```
4947    #[derive(Clone, Debug)]
4948    pub struct SearchEntries(RequestBuilder<crate::model::SearchEntriesRequest>);
4949
4950    impl SearchEntries {
4951        pub(crate) fn new(
4952            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4953        ) -> Self {
4954            Self(RequestBuilder::new(stub))
4955        }
4956
4957        /// Sets the full request, replacing any prior values.
4958        pub fn with_request<V: Into<crate::model::SearchEntriesRequest>>(mut self, v: V) -> Self {
4959            self.0.request = v.into();
4960            self
4961        }
4962
4963        /// Sets all the options, replacing any prior values.
4964        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4965            self.0.options = v.into();
4966            self
4967        }
4968
4969        /// Sends the request.
4970        pub async fn send(self) -> Result<crate::model::SearchEntriesResponse> {
4971            (*self.0.stub)
4972                .search_entries(self.0.request, self.0.options)
4973                .await
4974                .map(crate::Response::into_body)
4975        }
4976
4977        /// Streams each page in the collection.
4978        pub fn by_page(
4979            self,
4980        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::SearchEntriesResponse, crate::Error>
4981        {
4982            use std::clone::Clone;
4983            let token = self.0.request.page_token.clone();
4984            let execute = move |token: String| {
4985                let mut builder = self.clone();
4986                builder.0.request = builder.0.request.set_page_token(token);
4987                builder.send()
4988            };
4989            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4990        }
4991
4992        /// Streams each item in the collection.
4993        pub fn by_item(
4994            self,
4995        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4996            crate::model::SearchEntriesResponse,
4997            crate::Error,
4998        > {
4999            use google_cloud_gax::paginator::Paginator;
5000            self.by_page().items()
5001        }
5002
5003        /// Sets the value of [name][crate::model::SearchEntriesRequest::name].
5004        ///
5005        /// This is a **required** field for requests.
5006        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5007            self.0.request.name = v.into();
5008            self
5009        }
5010
5011        /// Sets the value of [query][crate::model::SearchEntriesRequest::query].
5012        ///
5013        /// This is a **required** field for requests.
5014        pub fn set_query<T: Into<std::string::String>>(mut self, v: T) -> Self {
5015            self.0.request.query = v.into();
5016            self
5017        }
5018
5019        /// Sets the value of [page_size][crate::model::SearchEntriesRequest::page_size].
5020        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5021            self.0.request.page_size = v.into();
5022            self
5023        }
5024
5025        /// Sets the value of [page_token][crate::model::SearchEntriesRequest::page_token].
5026        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5027            self.0.request.page_token = v.into();
5028            self
5029        }
5030
5031        /// Sets the value of [order_by][crate::model::SearchEntriesRequest::order_by].
5032        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5033            self.0.request.order_by = v.into();
5034            self
5035        }
5036
5037        /// Sets the value of [scope][crate::model::SearchEntriesRequest::scope].
5038        pub fn set_scope<T: Into<std::string::String>>(mut self, v: T) -> Self {
5039            self.0.request.scope = v.into();
5040            self
5041        }
5042
5043        /// Sets the value of [semantic_search][crate::model::SearchEntriesRequest::semantic_search].
5044        pub fn set_semantic_search<T: Into<bool>>(mut self, v: T) -> Self {
5045            self.0.request.semantic_search = v.into();
5046            self
5047        }
5048    }
5049
5050    #[doc(hidden)]
5051    impl crate::RequestBuilder for SearchEntries {
5052        fn request_options(&mut self) -> &mut crate::RequestOptions {
5053            &mut self.0.options
5054        }
5055    }
5056
5057    /// The request builder for [CatalogService::create_metadata_job][crate::client::CatalogService::create_metadata_job] calls.
5058    ///
5059    /// # Example
5060    /// ```
5061    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateMetadataJob;
5062    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5063    /// use google_cloud_lro::Poller;
5064    ///
5065    /// let builder = prepare_request_builder();
5066    /// let response = builder.poller().until_done().await?;
5067    /// # Ok(()) }
5068    ///
5069    /// fn prepare_request_builder() -> CreateMetadataJob {
5070    ///   # panic!();
5071    ///   // ... details omitted ...
5072    /// }
5073    /// ```
5074    #[derive(Clone, Debug)]
5075    pub struct CreateMetadataJob(RequestBuilder<crate::model::CreateMetadataJobRequest>);
5076
5077    impl CreateMetadataJob {
5078        pub(crate) fn new(
5079            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5080        ) -> Self {
5081            Self(RequestBuilder::new(stub))
5082        }
5083
5084        /// Sets the full request, replacing any prior values.
5085        pub fn with_request<V: Into<crate::model::CreateMetadataJobRequest>>(
5086            mut self,
5087            v: V,
5088        ) -> Self {
5089            self.0.request = v.into();
5090            self
5091        }
5092
5093        /// Sets all the options, replacing any prior values.
5094        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5095            self.0.options = v.into();
5096            self
5097        }
5098
5099        /// Sends the request.
5100        ///
5101        /// # Long running operations
5102        ///
5103        /// This starts, but does not poll, a longrunning operation. More information
5104        /// on [create_metadata_job][crate::client::CatalogService::create_metadata_job].
5105        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5106            (*self.0.stub)
5107                .create_metadata_job(self.0.request, self.0.options)
5108                .await
5109                .map(crate::Response::into_body)
5110        }
5111
5112        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_metadata_job`.
5113        pub fn poller(
5114            self,
5115        ) -> impl google_cloud_lro::Poller<crate::model::MetadataJob, crate::model::OperationMetadata>
5116        {
5117            type Operation = google_cloud_lro::internal::Operation<
5118                crate::model::MetadataJob,
5119                crate::model::OperationMetadata,
5120            >;
5121            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5122            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5123            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5124            if let Some(ref mut details) = poller_options.tracing {
5125                details.method_name = "google_cloud_dataplex_v1::client::CatalogService::create_metadata_job::until_done";
5126            }
5127
5128            let stub = self.0.stub.clone();
5129            let mut options = self.0.options.clone();
5130            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5131            let query = move |name| {
5132                let stub = stub.clone();
5133                let options = options.clone();
5134                async {
5135                    let op = GetOperation::new(stub)
5136                        .set_name(name)
5137                        .with_options(options)
5138                        .send()
5139                        .await?;
5140                    Ok(Operation::new(op))
5141                }
5142            };
5143
5144            let start = move || async {
5145                let op = self.send().await?;
5146                Ok(Operation::new(op))
5147            };
5148
5149            use google_cloud_lro::internal::PollerExt;
5150            {
5151                google_cloud_lro::internal::new_poller(
5152                    polling_error_policy,
5153                    polling_backoff_policy,
5154                    start,
5155                    query,
5156                )
5157            }
5158            .with_options(poller_options)
5159        }
5160
5161        /// Sets the value of [parent][crate::model::CreateMetadataJobRequest::parent].
5162        ///
5163        /// This is a **required** field for requests.
5164        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5165            self.0.request.parent = v.into();
5166            self
5167        }
5168
5169        /// Sets the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
5170        ///
5171        /// This is a **required** field for requests.
5172        pub fn set_metadata_job<T>(mut self, v: T) -> Self
5173        where
5174            T: std::convert::Into<crate::model::MetadataJob>,
5175        {
5176            self.0.request.metadata_job = std::option::Option::Some(v.into());
5177            self
5178        }
5179
5180        /// Sets or clears the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
5181        ///
5182        /// This is a **required** field for requests.
5183        pub fn set_or_clear_metadata_job<T>(mut self, v: std::option::Option<T>) -> Self
5184        where
5185            T: std::convert::Into<crate::model::MetadataJob>,
5186        {
5187            self.0.request.metadata_job = v.map(|x| x.into());
5188            self
5189        }
5190
5191        /// Sets the value of [metadata_job_id][crate::model::CreateMetadataJobRequest::metadata_job_id].
5192        pub fn set_metadata_job_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5193            self.0.request.metadata_job_id = v.into();
5194            self
5195        }
5196
5197        /// Sets the value of [validate_only][crate::model::CreateMetadataJobRequest::validate_only].
5198        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
5199            self.0.request.validate_only = v.into();
5200            self
5201        }
5202    }
5203
5204    #[doc(hidden)]
5205    impl crate::RequestBuilder for CreateMetadataJob {
5206        fn request_options(&mut self) -> &mut crate::RequestOptions {
5207            &mut self.0.options
5208        }
5209    }
5210
5211    /// The request builder for [CatalogService::get_metadata_job][crate::client::CatalogService::get_metadata_job] calls.
5212    ///
5213    /// # Example
5214    /// ```
5215    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetMetadataJob;
5216    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5217    ///
5218    /// let builder = prepare_request_builder();
5219    /// let response = builder.send().await?;
5220    /// # Ok(()) }
5221    ///
5222    /// fn prepare_request_builder() -> GetMetadataJob {
5223    ///   # panic!();
5224    ///   // ... details omitted ...
5225    /// }
5226    /// ```
5227    #[derive(Clone, Debug)]
5228    pub struct GetMetadataJob(RequestBuilder<crate::model::GetMetadataJobRequest>);
5229
5230    impl GetMetadataJob {
5231        pub(crate) fn new(
5232            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5233        ) -> Self {
5234            Self(RequestBuilder::new(stub))
5235        }
5236
5237        /// Sets the full request, replacing any prior values.
5238        pub fn with_request<V: Into<crate::model::GetMetadataJobRequest>>(mut self, v: V) -> Self {
5239            self.0.request = v.into();
5240            self
5241        }
5242
5243        /// Sets all the options, replacing any prior values.
5244        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5245            self.0.options = v.into();
5246            self
5247        }
5248
5249        /// Sends the request.
5250        pub async fn send(self) -> Result<crate::model::MetadataJob> {
5251            (*self.0.stub)
5252                .get_metadata_job(self.0.request, self.0.options)
5253                .await
5254                .map(crate::Response::into_body)
5255        }
5256
5257        /// Sets the value of [name][crate::model::GetMetadataJobRequest::name].
5258        ///
5259        /// This is a **required** field for requests.
5260        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5261            self.0.request.name = v.into();
5262            self
5263        }
5264    }
5265
5266    #[doc(hidden)]
5267    impl crate::RequestBuilder for GetMetadataJob {
5268        fn request_options(&mut self) -> &mut crate::RequestOptions {
5269            &mut self.0.options
5270        }
5271    }
5272
5273    /// The request builder for [CatalogService::list_metadata_jobs][crate::client::CatalogService::list_metadata_jobs] calls.
5274    ///
5275    /// # Example
5276    /// ```
5277    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListMetadataJobs;
5278    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5279    /// use google_cloud_gax::paginator::ItemPaginator;
5280    ///
5281    /// let builder = prepare_request_builder();
5282    /// let mut items = builder.by_item();
5283    /// while let Some(result) = items.next().await {
5284    ///   let item = result?;
5285    /// }
5286    /// # Ok(()) }
5287    ///
5288    /// fn prepare_request_builder() -> ListMetadataJobs {
5289    ///   # panic!();
5290    ///   // ... details omitted ...
5291    /// }
5292    /// ```
5293    #[derive(Clone, Debug)]
5294    pub struct ListMetadataJobs(RequestBuilder<crate::model::ListMetadataJobsRequest>);
5295
5296    impl ListMetadataJobs {
5297        pub(crate) fn new(
5298            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5299        ) -> Self {
5300            Self(RequestBuilder::new(stub))
5301        }
5302
5303        /// Sets the full request, replacing any prior values.
5304        pub fn with_request<V: Into<crate::model::ListMetadataJobsRequest>>(
5305            mut self,
5306            v: V,
5307        ) -> Self {
5308            self.0.request = v.into();
5309            self
5310        }
5311
5312        /// Sets all the options, replacing any prior values.
5313        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5314            self.0.options = v.into();
5315            self
5316        }
5317
5318        /// Sends the request.
5319        pub async fn send(self) -> Result<crate::model::ListMetadataJobsResponse> {
5320            (*self.0.stub)
5321                .list_metadata_jobs(self.0.request, self.0.options)
5322                .await
5323                .map(crate::Response::into_body)
5324        }
5325
5326        /// Streams each page in the collection.
5327        pub fn by_page(
5328            self,
5329        ) -> impl google_cloud_gax::paginator::Paginator<
5330            crate::model::ListMetadataJobsResponse,
5331            crate::Error,
5332        > {
5333            use std::clone::Clone;
5334            let token = self.0.request.page_token.clone();
5335            let execute = move |token: String| {
5336                let mut builder = self.clone();
5337                builder.0.request = builder.0.request.set_page_token(token);
5338                builder.send()
5339            };
5340            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5341        }
5342
5343        /// Streams each item in the collection.
5344        pub fn by_item(
5345            self,
5346        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5347            crate::model::ListMetadataJobsResponse,
5348            crate::Error,
5349        > {
5350            use google_cloud_gax::paginator::Paginator;
5351            self.by_page().items()
5352        }
5353
5354        /// Sets the value of [parent][crate::model::ListMetadataJobsRequest::parent].
5355        ///
5356        /// This is a **required** field for requests.
5357        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5358            self.0.request.parent = v.into();
5359            self
5360        }
5361
5362        /// Sets the value of [page_size][crate::model::ListMetadataJobsRequest::page_size].
5363        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5364            self.0.request.page_size = v.into();
5365            self
5366        }
5367
5368        /// Sets the value of [page_token][crate::model::ListMetadataJobsRequest::page_token].
5369        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5370            self.0.request.page_token = v.into();
5371            self
5372        }
5373
5374        /// Sets the value of [filter][crate::model::ListMetadataJobsRequest::filter].
5375        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5376            self.0.request.filter = v.into();
5377            self
5378        }
5379
5380        /// Sets the value of [order_by][crate::model::ListMetadataJobsRequest::order_by].
5381        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5382            self.0.request.order_by = v.into();
5383            self
5384        }
5385    }
5386
5387    #[doc(hidden)]
5388    impl crate::RequestBuilder for ListMetadataJobs {
5389        fn request_options(&mut self) -> &mut crate::RequestOptions {
5390            &mut self.0.options
5391        }
5392    }
5393
5394    /// The request builder for [CatalogService::cancel_metadata_job][crate::client::CatalogService::cancel_metadata_job] calls.
5395    ///
5396    /// # Example
5397    /// ```
5398    /// # use google_cloud_dataplex_v1::builder::catalog_service::CancelMetadataJob;
5399    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5400    ///
5401    /// let builder = prepare_request_builder();
5402    /// let response = builder.send().await?;
5403    /// # Ok(()) }
5404    ///
5405    /// fn prepare_request_builder() -> CancelMetadataJob {
5406    ///   # panic!();
5407    ///   // ... details omitted ...
5408    /// }
5409    /// ```
5410    #[derive(Clone, Debug)]
5411    pub struct CancelMetadataJob(RequestBuilder<crate::model::CancelMetadataJobRequest>);
5412
5413    impl CancelMetadataJob {
5414        pub(crate) fn new(
5415            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5416        ) -> Self {
5417            Self(RequestBuilder::new(stub))
5418        }
5419
5420        /// Sets the full request, replacing any prior values.
5421        pub fn with_request<V: Into<crate::model::CancelMetadataJobRequest>>(
5422            mut self,
5423            v: V,
5424        ) -> Self {
5425            self.0.request = v.into();
5426            self
5427        }
5428
5429        /// Sets all the options, replacing any prior values.
5430        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5431            self.0.options = v.into();
5432            self
5433        }
5434
5435        /// Sends the request.
5436        pub async fn send(self) -> Result<()> {
5437            (*self.0.stub)
5438                .cancel_metadata_job(self.0.request, self.0.options)
5439                .await
5440                .map(crate::Response::into_body)
5441        }
5442
5443        /// Sets the value of [name][crate::model::CancelMetadataJobRequest::name].
5444        ///
5445        /// This is a **required** field for requests.
5446        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5447            self.0.request.name = v.into();
5448            self
5449        }
5450    }
5451
5452    #[doc(hidden)]
5453    impl crate::RequestBuilder for CancelMetadataJob {
5454        fn request_options(&mut self) -> &mut crate::RequestOptions {
5455            &mut self.0.options
5456        }
5457    }
5458
5459    /// The request builder for [CatalogService::create_entry_link][crate::client::CatalogService::create_entry_link] calls.
5460    ///
5461    /// # Example
5462    /// ```
5463    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateEntryLink;
5464    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5465    ///
5466    /// let builder = prepare_request_builder();
5467    /// let response = builder.send().await?;
5468    /// # Ok(()) }
5469    ///
5470    /// fn prepare_request_builder() -> CreateEntryLink {
5471    ///   # panic!();
5472    ///   // ... details omitted ...
5473    /// }
5474    /// ```
5475    #[derive(Clone, Debug)]
5476    pub struct CreateEntryLink(RequestBuilder<crate::model::CreateEntryLinkRequest>);
5477
5478    impl CreateEntryLink {
5479        pub(crate) fn new(
5480            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5481        ) -> Self {
5482            Self(RequestBuilder::new(stub))
5483        }
5484
5485        /// Sets the full request, replacing any prior values.
5486        pub fn with_request<V: Into<crate::model::CreateEntryLinkRequest>>(mut self, v: V) -> Self {
5487            self.0.request = v.into();
5488            self
5489        }
5490
5491        /// Sets all the options, replacing any prior values.
5492        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5493            self.0.options = v.into();
5494            self
5495        }
5496
5497        /// Sends the request.
5498        pub async fn send(self) -> Result<crate::model::EntryLink> {
5499            (*self.0.stub)
5500                .create_entry_link(self.0.request, self.0.options)
5501                .await
5502                .map(crate::Response::into_body)
5503        }
5504
5505        /// Sets the value of [parent][crate::model::CreateEntryLinkRequest::parent].
5506        ///
5507        /// This is a **required** field for requests.
5508        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5509            self.0.request.parent = v.into();
5510            self
5511        }
5512
5513        /// Sets the value of [entry_link_id][crate::model::CreateEntryLinkRequest::entry_link_id].
5514        ///
5515        /// This is a **required** field for requests.
5516        pub fn set_entry_link_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5517            self.0.request.entry_link_id = v.into();
5518            self
5519        }
5520
5521        /// Sets the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
5522        ///
5523        /// This is a **required** field for requests.
5524        pub fn set_entry_link<T>(mut self, v: T) -> Self
5525        where
5526            T: std::convert::Into<crate::model::EntryLink>,
5527        {
5528            self.0.request.entry_link = std::option::Option::Some(v.into());
5529            self
5530        }
5531
5532        /// Sets or clears the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
5533        ///
5534        /// This is a **required** field for requests.
5535        pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
5536        where
5537            T: std::convert::Into<crate::model::EntryLink>,
5538        {
5539            self.0.request.entry_link = v.map(|x| x.into());
5540            self
5541        }
5542    }
5543
5544    #[doc(hidden)]
5545    impl crate::RequestBuilder for CreateEntryLink {
5546        fn request_options(&mut self) -> &mut crate::RequestOptions {
5547            &mut self.0.options
5548        }
5549    }
5550
5551    /// The request builder for [CatalogService::update_entry_link][crate::client::CatalogService::update_entry_link] calls.
5552    ///
5553    /// # Example
5554    /// ```
5555    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateEntryLink;
5556    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5557    ///
5558    /// let builder = prepare_request_builder();
5559    /// let response = builder.send().await?;
5560    /// # Ok(()) }
5561    ///
5562    /// fn prepare_request_builder() -> UpdateEntryLink {
5563    ///   # panic!();
5564    ///   // ... details omitted ...
5565    /// }
5566    /// ```
5567    #[derive(Clone, Debug)]
5568    pub struct UpdateEntryLink(RequestBuilder<crate::model::UpdateEntryLinkRequest>);
5569
5570    impl UpdateEntryLink {
5571        pub(crate) fn new(
5572            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5573        ) -> Self {
5574            Self(RequestBuilder::new(stub))
5575        }
5576
5577        /// Sets the full request, replacing any prior values.
5578        pub fn with_request<V: Into<crate::model::UpdateEntryLinkRequest>>(mut self, v: V) -> Self {
5579            self.0.request = v.into();
5580            self
5581        }
5582
5583        /// Sets all the options, replacing any prior values.
5584        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5585            self.0.options = v.into();
5586            self
5587        }
5588
5589        /// Sends the request.
5590        pub async fn send(self) -> Result<crate::model::EntryLink> {
5591            (*self.0.stub)
5592                .update_entry_link(self.0.request, self.0.options)
5593                .await
5594                .map(crate::Response::into_body)
5595        }
5596
5597        /// Sets the value of [entry_link][crate::model::UpdateEntryLinkRequest::entry_link].
5598        ///
5599        /// This is a **required** field for requests.
5600        pub fn set_entry_link<T>(mut self, v: T) -> Self
5601        where
5602            T: std::convert::Into<crate::model::EntryLink>,
5603        {
5604            self.0.request.entry_link = std::option::Option::Some(v.into());
5605            self
5606        }
5607
5608        /// Sets or clears the value of [entry_link][crate::model::UpdateEntryLinkRequest::entry_link].
5609        ///
5610        /// This is a **required** field for requests.
5611        pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
5612        where
5613            T: std::convert::Into<crate::model::EntryLink>,
5614        {
5615            self.0.request.entry_link = v.map(|x| x.into());
5616            self
5617        }
5618
5619        /// Sets the value of [allow_missing][crate::model::UpdateEntryLinkRequest::allow_missing].
5620        pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
5621            self.0.request.allow_missing = v.into();
5622            self
5623        }
5624
5625        /// Sets the value of [aspect_keys][crate::model::UpdateEntryLinkRequest::aspect_keys].
5626        pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
5627        where
5628            T: std::iter::IntoIterator<Item = V>,
5629            V: std::convert::Into<std::string::String>,
5630        {
5631            use std::iter::Iterator;
5632            self.0.request.aspect_keys = v.into_iter().map(|i| i.into()).collect();
5633            self
5634        }
5635    }
5636
5637    #[doc(hidden)]
5638    impl crate::RequestBuilder for UpdateEntryLink {
5639        fn request_options(&mut self) -> &mut crate::RequestOptions {
5640            &mut self.0.options
5641        }
5642    }
5643
5644    /// The request builder for [CatalogService::delete_entry_link][crate::client::CatalogService::delete_entry_link] calls.
5645    ///
5646    /// # Example
5647    /// ```
5648    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteEntryLink;
5649    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5650    ///
5651    /// let builder = prepare_request_builder();
5652    /// let response = builder.send().await?;
5653    /// # Ok(()) }
5654    ///
5655    /// fn prepare_request_builder() -> DeleteEntryLink {
5656    ///   # panic!();
5657    ///   // ... details omitted ...
5658    /// }
5659    /// ```
5660    #[derive(Clone, Debug)]
5661    pub struct DeleteEntryLink(RequestBuilder<crate::model::DeleteEntryLinkRequest>);
5662
5663    impl DeleteEntryLink {
5664        pub(crate) fn new(
5665            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5666        ) -> Self {
5667            Self(RequestBuilder::new(stub))
5668        }
5669
5670        /// Sets the full request, replacing any prior values.
5671        pub fn with_request<V: Into<crate::model::DeleteEntryLinkRequest>>(mut self, v: V) -> Self {
5672            self.0.request = v.into();
5673            self
5674        }
5675
5676        /// Sets all the options, replacing any prior values.
5677        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5678            self.0.options = v.into();
5679            self
5680        }
5681
5682        /// Sends the request.
5683        pub async fn send(self) -> Result<crate::model::EntryLink> {
5684            (*self.0.stub)
5685                .delete_entry_link(self.0.request, self.0.options)
5686                .await
5687                .map(crate::Response::into_body)
5688        }
5689
5690        /// Sets the value of [name][crate::model::DeleteEntryLinkRequest::name].
5691        ///
5692        /// This is a **required** field for requests.
5693        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5694            self.0.request.name = v.into();
5695            self
5696        }
5697    }
5698
5699    #[doc(hidden)]
5700    impl crate::RequestBuilder for DeleteEntryLink {
5701        fn request_options(&mut self) -> &mut crate::RequestOptions {
5702            &mut self.0.options
5703        }
5704    }
5705
5706    /// The request builder for [CatalogService::lookup_entry_links][crate::client::CatalogService::lookup_entry_links] calls.
5707    ///
5708    /// # Example
5709    /// ```
5710    /// # use google_cloud_dataplex_v1::builder::catalog_service::LookupEntryLinks;
5711    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5712    /// use google_cloud_gax::paginator::ItemPaginator;
5713    ///
5714    /// let builder = prepare_request_builder();
5715    /// let mut items = builder.by_item();
5716    /// while let Some(result) = items.next().await {
5717    ///   let item = result?;
5718    /// }
5719    /// # Ok(()) }
5720    ///
5721    /// fn prepare_request_builder() -> LookupEntryLinks {
5722    ///   # panic!();
5723    ///   // ... details omitted ...
5724    /// }
5725    /// ```
5726    #[derive(Clone, Debug)]
5727    pub struct LookupEntryLinks(RequestBuilder<crate::model::LookupEntryLinksRequest>);
5728
5729    impl LookupEntryLinks {
5730        pub(crate) fn new(
5731            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5732        ) -> Self {
5733            Self(RequestBuilder::new(stub))
5734        }
5735
5736        /// Sets the full request, replacing any prior values.
5737        pub fn with_request<V: Into<crate::model::LookupEntryLinksRequest>>(
5738            mut self,
5739            v: V,
5740        ) -> Self {
5741            self.0.request = v.into();
5742            self
5743        }
5744
5745        /// Sets all the options, replacing any prior values.
5746        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5747            self.0.options = v.into();
5748            self
5749        }
5750
5751        /// Sends the request.
5752        pub async fn send(self) -> Result<crate::model::LookupEntryLinksResponse> {
5753            (*self.0.stub)
5754                .lookup_entry_links(self.0.request, self.0.options)
5755                .await
5756                .map(crate::Response::into_body)
5757        }
5758
5759        /// Streams each page in the collection.
5760        pub fn by_page(
5761            self,
5762        ) -> impl google_cloud_gax::paginator::Paginator<
5763            crate::model::LookupEntryLinksResponse,
5764            crate::Error,
5765        > {
5766            use std::clone::Clone;
5767            let token = self.0.request.page_token.clone();
5768            let execute = move |token: String| {
5769                let mut builder = self.clone();
5770                builder.0.request = builder.0.request.set_page_token(token);
5771                builder.send()
5772            };
5773            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5774        }
5775
5776        /// Streams each item in the collection.
5777        pub fn by_item(
5778            self,
5779        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5780            crate::model::LookupEntryLinksResponse,
5781            crate::Error,
5782        > {
5783            use google_cloud_gax::paginator::Paginator;
5784            self.by_page().items()
5785        }
5786
5787        /// Sets the value of [name][crate::model::LookupEntryLinksRequest::name].
5788        ///
5789        /// This is a **required** field for requests.
5790        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5791            self.0.request.name = v.into();
5792            self
5793        }
5794
5795        /// Sets the value of [entry][crate::model::LookupEntryLinksRequest::entry].
5796        ///
5797        /// This is a **required** field for requests.
5798        pub fn set_entry<T: Into<std::string::String>>(mut self, v: T) -> Self {
5799            self.0.request.entry = v.into();
5800            self
5801        }
5802
5803        /// Sets the value of [entry_mode][crate::model::LookupEntryLinksRequest::entry_mode].
5804        pub fn set_entry_mode<T: Into<crate::model::lookup_entry_links_request::EntryMode>>(
5805            mut self,
5806            v: T,
5807        ) -> Self {
5808            self.0.request.entry_mode = v.into();
5809            self
5810        }
5811
5812        /// Sets the value of [entry_link_types][crate::model::LookupEntryLinksRequest::entry_link_types].
5813        pub fn set_entry_link_types<T, V>(mut self, v: T) -> Self
5814        where
5815            T: std::iter::IntoIterator<Item = V>,
5816            V: std::convert::Into<std::string::String>,
5817        {
5818            use std::iter::Iterator;
5819            self.0.request.entry_link_types = v.into_iter().map(|i| i.into()).collect();
5820            self
5821        }
5822
5823        /// Sets the value of [page_size][crate::model::LookupEntryLinksRequest::page_size].
5824        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5825            self.0.request.page_size = v.into();
5826            self
5827        }
5828
5829        /// Sets the value of [page_token][crate::model::LookupEntryLinksRequest::page_token].
5830        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5831            self.0.request.page_token = v.into();
5832            self
5833        }
5834    }
5835
5836    #[doc(hidden)]
5837    impl crate::RequestBuilder for LookupEntryLinks {
5838        fn request_options(&mut self) -> &mut crate::RequestOptions {
5839            &mut self.0.options
5840        }
5841    }
5842
5843    /// The request builder for [CatalogService::lookup_context][crate::client::CatalogService::lookup_context] calls.
5844    ///
5845    /// # Example
5846    /// ```
5847    /// # use google_cloud_dataplex_v1::builder::catalog_service::LookupContext;
5848    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5849    ///
5850    /// let builder = prepare_request_builder();
5851    /// let response = builder.send().await?;
5852    /// # Ok(()) }
5853    ///
5854    /// fn prepare_request_builder() -> LookupContext {
5855    ///   # panic!();
5856    ///   // ... details omitted ...
5857    /// }
5858    /// ```
5859    #[derive(Clone, Debug)]
5860    pub struct LookupContext(RequestBuilder<crate::model::LookupContextRequest>);
5861
5862    impl LookupContext {
5863        pub(crate) fn new(
5864            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5865        ) -> Self {
5866            Self(RequestBuilder::new(stub))
5867        }
5868
5869        /// Sets the full request, replacing any prior values.
5870        pub fn with_request<V: Into<crate::model::LookupContextRequest>>(mut self, v: V) -> Self {
5871            self.0.request = v.into();
5872            self
5873        }
5874
5875        /// Sets all the options, replacing any prior values.
5876        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5877            self.0.options = v.into();
5878            self
5879        }
5880
5881        /// Sends the request.
5882        pub async fn send(self) -> Result<crate::model::LookupContextResponse> {
5883            (*self.0.stub)
5884                .lookup_context(self.0.request, self.0.options)
5885                .await
5886                .map(crate::Response::into_body)
5887        }
5888
5889        /// Sets the value of [name][crate::model::LookupContextRequest::name].
5890        ///
5891        /// This is a **required** field for requests.
5892        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5893            self.0.request.name = v.into();
5894            self
5895        }
5896
5897        /// Sets the value of [resources][crate::model::LookupContextRequest::resources].
5898        ///
5899        /// This is a **required** field for requests.
5900        pub fn set_resources<T, V>(mut self, v: T) -> Self
5901        where
5902            T: std::iter::IntoIterator<Item = V>,
5903            V: std::convert::Into<std::string::String>,
5904        {
5905            use std::iter::Iterator;
5906            self.0.request.resources = v.into_iter().map(|i| i.into()).collect();
5907            self
5908        }
5909
5910        /// Sets the value of [context][crate::model::LookupContextRequest::context].
5911        pub fn set_context<T: Into<std::string::String>>(mut self, v: T) -> Self {
5912            self.0.request.context = v.into();
5913            self
5914        }
5915
5916        /// Sets the value of [options][crate::model::LookupContextRequest::options].
5917        pub fn set_options<T, K, V>(mut self, v: T) -> Self
5918        where
5919            T: std::iter::IntoIterator<Item = (K, V)>,
5920            K: std::convert::Into<std::string::String>,
5921            V: std::convert::Into<std::string::String>,
5922        {
5923            self.0.request.options = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5924            self
5925        }
5926    }
5927
5928    #[doc(hidden)]
5929    impl crate::RequestBuilder for LookupContext {
5930        fn request_options(&mut self) -> &mut crate::RequestOptions {
5931            &mut self.0.options
5932        }
5933    }
5934
5935    /// The request builder for [CatalogService::get_entry_link][crate::client::CatalogService::get_entry_link] calls.
5936    ///
5937    /// # Example
5938    /// ```
5939    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetEntryLink;
5940    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
5941    ///
5942    /// let builder = prepare_request_builder();
5943    /// let response = builder.send().await?;
5944    /// # Ok(()) }
5945    ///
5946    /// fn prepare_request_builder() -> GetEntryLink {
5947    ///   # panic!();
5948    ///   // ... details omitted ...
5949    /// }
5950    /// ```
5951    #[derive(Clone, Debug)]
5952    pub struct GetEntryLink(RequestBuilder<crate::model::GetEntryLinkRequest>);
5953
5954    impl GetEntryLink {
5955        pub(crate) fn new(
5956            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5957        ) -> Self {
5958            Self(RequestBuilder::new(stub))
5959        }
5960
5961        /// Sets the full request, replacing any prior values.
5962        pub fn with_request<V: Into<crate::model::GetEntryLinkRequest>>(mut self, v: V) -> Self {
5963            self.0.request = v.into();
5964            self
5965        }
5966
5967        /// Sets all the options, replacing any prior values.
5968        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5969            self.0.options = v.into();
5970            self
5971        }
5972
5973        /// Sends the request.
5974        pub async fn send(self) -> Result<crate::model::EntryLink> {
5975            (*self.0.stub)
5976                .get_entry_link(self.0.request, self.0.options)
5977                .await
5978                .map(crate::Response::into_body)
5979        }
5980
5981        /// Sets the value of [name][crate::model::GetEntryLinkRequest::name].
5982        ///
5983        /// This is a **required** field for requests.
5984        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5985            self.0.request.name = v.into();
5986            self
5987        }
5988    }
5989
5990    #[doc(hidden)]
5991    impl crate::RequestBuilder for GetEntryLink {
5992        fn request_options(&mut self) -> &mut crate::RequestOptions {
5993            &mut self.0.options
5994        }
5995    }
5996
5997    /// The request builder for [CatalogService::create_metadata_feed][crate::client::CatalogService::create_metadata_feed] calls.
5998    ///
5999    /// # Example
6000    /// ```
6001    /// # use google_cloud_dataplex_v1::builder::catalog_service::CreateMetadataFeed;
6002    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6003    /// use google_cloud_lro::Poller;
6004    ///
6005    /// let builder = prepare_request_builder();
6006    /// let response = builder.poller().until_done().await?;
6007    /// # Ok(()) }
6008    ///
6009    /// fn prepare_request_builder() -> CreateMetadataFeed {
6010    ///   # panic!();
6011    ///   // ... details omitted ...
6012    /// }
6013    /// ```
6014    #[derive(Clone, Debug)]
6015    pub struct CreateMetadataFeed(RequestBuilder<crate::model::CreateMetadataFeedRequest>);
6016
6017    impl CreateMetadataFeed {
6018        pub(crate) fn new(
6019            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6020        ) -> Self {
6021            Self(RequestBuilder::new(stub))
6022        }
6023
6024        /// Sets the full request, replacing any prior values.
6025        pub fn with_request<V: Into<crate::model::CreateMetadataFeedRequest>>(
6026            mut self,
6027            v: V,
6028        ) -> Self {
6029            self.0.request = v.into();
6030            self
6031        }
6032
6033        /// Sets all the options, replacing any prior values.
6034        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6035            self.0.options = v.into();
6036            self
6037        }
6038
6039        /// Sends the request.
6040        ///
6041        /// # Long running operations
6042        ///
6043        /// This starts, but does not poll, a longrunning operation. More information
6044        /// on [create_metadata_feed][crate::client::CatalogService::create_metadata_feed].
6045        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6046            (*self.0.stub)
6047                .create_metadata_feed(self.0.request, self.0.options)
6048                .await
6049                .map(crate::Response::into_body)
6050        }
6051
6052        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_metadata_feed`.
6053        pub fn poller(
6054            self,
6055        ) -> impl google_cloud_lro::Poller<crate::model::MetadataFeed, crate::model::OperationMetadata>
6056        {
6057            type Operation = google_cloud_lro::internal::Operation<
6058                crate::model::MetadataFeed,
6059                crate::model::OperationMetadata,
6060            >;
6061            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6062            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6063            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6064            if let Some(ref mut details) = poller_options.tracing {
6065                details.method_name = "google_cloud_dataplex_v1::client::CatalogService::create_metadata_feed::until_done";
6066            }
6067
6068            let stub = self.0.stub.clone();
6069            let mut options = self.0.options.clone();
6070            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6071            let query = move |name| {
6072                let stub = stub.clone();
6073                let options = options.clone();
6074                async {
6075                    let op = GetOperation::new(stub)
6076                        .set_name(name)
6077                        .with_options(options)
6078                        .send()
6079                        .await?;
6080                    Ok(Operation::new(op))
6081                }
6082            };
6083
6084            let start = move || async {
6085                let op = self.send().await?;
6086                Ok(Operation::new(op))
6087            };
6088
6089            use google_cloud_lro::internal::PollerExt;
6090            {
6091                google_cloud_lro::internal::new_poller(
6092                    polling_error_policy,
6093                    polling_backoff_policy,
6094                    start,
6095                    query,
6096                )
6097            }
6098            .with_options(poller_options)
6099        }
6100
6101        /// Sets the value of [parent][crate::model::CreateMetadataFeedRequest::parent].
6102        ///
6103        /// This is a **required** field for requests.
6104        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6105            self.0.request.parent = v.into();
6106            self
6107        }
6108
6109        /// Sets the value of [metadata_feed][crate::model::CreateMetadataFeedRequest::metadata_feed].
6110        ///
6111        /// This is a **required** field for requests.
6112        pub fn set_metadata_feed<T>(mut self, v: T) -> Self
6113        where
6114            T: std::convert::Into<crate::model::MetadataFeed>,
6115        {
6116            self.0.request.metadata_feed = std::option::Option::Some(v.into());
6117            self
6118        }
6119
6120        /// Sets or clears the value of [metadata_feed][crate::model::CreateMetadataFeedRequest::metadata_feed].
6121        ///
6122        /// This is a **required** field for requests.
6123        pub fn set_or_clear_metadata_feed<T>(mut self, v: std::option::Option<T>) -> Self
6124        where
6125            T: std::convert::Into<crate::model::MetadataFeed>,
6126        {
6127            self.0.request.metadata_feed = v.map(|x| x.into());
6128            self
6129        }
6130
6131        /// Sets the value of [metadata_feed_id][crate::model::CreateMetadataFeedRequest::metadata_feed_id].
6132        pub fn set_metadata_feed_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6133            self.0.request.metadata_feed_id = v.into();
6134            self
6135        }
6136
6137        /// Sets the value of [validate_only][crate::model::CreateMetadataFeedRequest::validate_only].
6138        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
6139            self.0.request.validate_only = v.into();
6140            self
6141        }
6142    }
6143
6144    #[doc(hidden)]
6145    impl crate::RequestBuilder for CreateMetadataFeed {
6146        fn request_options(&mut self) -> &mut crate::RequestOptions {
6147            &mut self.0.options
6148        }
6149    }
6150
6151    /// The request builder for [CatalogService::get_metadata_feed][crate::client::CatalogService::get_metadata_feed] calls.
6152    ///
6153    /// # Example
6154    /// ```
6155    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetMetadataFeed;
6156    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6157    ///
6158    /// let builder = prepare_request_builder();
6159    /// let response = builder.send().await?;
6160    /// # Ok(()) }
6161    ///
6162    /// fn prepare_request_builder() -> GetMetadataFeed {
6163    ///   # panic!();
6164    ///   // ... details omitted ...
6165    /// }
6166    /// ```
6167    #[derive(Clone, Debug)]
6168    pub struct GetMetadataFeed(RequestBuilder<crate::model::GetMetadataFeedRequest>);
6169
6170    impl GetMetadataFeed {
6171        pub(crate) fn new(
6172            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6173        ) -> Self {
6174            Self(RequestBuilder::new(stub))
6175        }
6176
6177        /// Sets the full request, replacing any prior values.
6178        pub fn with_request<V: Into<crate::model::GetMetadataFeedRequest>>(mut self, v: V) -> Self {
6179            self.0.request = v.into();
6180            self
6181        }
6182
6183        /// Sets all the options, replacing any prior values.
6184        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6185            self.0.options = v.into();
6186            self
6187        }
6188
6189        /// Sends the request.
6190        pub async fn send(self) -> Result<crate::model::MetadataFeed> {
6191            (*self.0.stub)
6192                .get_metadata_feed(self.0.request, self.0.options)
6193                .await
6194                .map(crate::Response::into_body)
6195        }
6196
6197        /// Sets the value of [name][crate::model::GetMetadataFeedRequest::name].
6198        ///
6199        /// This is a **required** field for requests.
6200        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6201            self.0.request.name = v.into();
6202            self
6203        }
6204    }
6205
6206    #[doc(hidden)]
6207    impl crate::RequestBuilder for GetMetadataFeed {
6208        fn request_options(&mut self) -> &mut crate::RequestOptions {
6209            &mut self.0.options
6210        }
6211    }
6212
6213    /// The request builder for [CatalogService::list_metadata_feeds][crate::client::CatalogService::list_metadata_feeds] calls.
6214    ///
6215    /// # Example
6216    /// ```
6217    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListMetadataFeeds;
6218    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6219    /// use google_cloud_gax::paginator::ItemPaginator;
6220    ///
6221    /// let builder = prepare_request_builder();
6222    /// let mut items = builder.by_item();
6223    /// while let Some(result) = items.next().await {
6224    ///   let item = result?;
6225    /// }
6226    /// # Ok(()) }
6227    ///
6228    /// fn prepare_request_builder() -> ListMetadataFeeds {
6229    ///   # panic!();
6230    ///   // ... details omitted ...
6231    /// }
6232    /// ```
6233    #[derive(Clone, Debug)]
6234    pub struct ListMetadataFeeds(RequestBuilder<crate::model::ListMetadataFeedsRequest>);
6235
6236    impl ListMetadataFeeds {
6237        pub(crate) fn new(
6238            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6239        ) -> Self {
6240            Self(RequestBuilder::new(stub))
6241        }
6242
6243        /// Sets the full request, replacing any prior values.
6244        pub fn with_request<V: Into<crate::model::ListMetadataFeedsRequest>>(
6245            mut self,
6246            v: V,
6247        ) -> Self {
6248            self.0.request = v.into();
6249            self
6250        }
6251
6252        /// Sets all the options, replacing any prior values.
6253        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6254            self.0.options = v.into();
6255            self
6256        }
6257
6258        /// Sends the request.
6259        pub async fn send(self) -> Result<crate::model::ListMetadataFeedsResponse> {
6260            (*self.0.stub)
6261                .list_metadata_feeds(self.0.request, self.0.options)
6262                .await
6263                .map(crate::Response::into_body)
6264        }
6265
6266        /// Streams each page in the collection.
6267        pub fn by_page(
6268            self,
6269        ) -> impl google_cloud_gax::paginator::Paginator<
6270            crate::model::ListMetadataFeedsResponse,
6271            crate::Error,
6272        > {
6273            use std::clone::Clone;
6274            let token = self.0.request.page_token.clone();
6275            let execute = move |token: String| {
6276                let mut builder = self.clone();
6277                builder.0.request = builder.0.request.set_page_token(token);
6278                builder.send()
6279            };
6280            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6281        }
6282
6283        /// Streams each item in the collection.
6284        pub fn by_item(
6285            self,
6286        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6287            crate::model::ListMetadataFeedsResponse,
6288            crate::Error,
6289        > {
6290            use google_cloud_gax::paginator::Paginator;
6291            self.by_page().items()
6292        }
6293
6294        /// Sets the value of [parent][crate::model::ListMetadataFeedsRequest::parent].
6295        ///
6296        /// This is a **required** field for requests.
6297        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6298            self.0.request.parent = v.into();
6299            self
6300        }
6301
6302        /// Sets the value of [page_size][crate::model::ListMetadataFeedsRequest::page_size].
6303        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6304            self.0.request.page_size = v.into();
6305            self
6306        }
6307
6308        /// Sets the value of [page_token][crate::model::ListMetadataFeedsRequest::page_token].
6309        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6310            self.0.request.page_token = v.into();
6311            self
6312        }
6313
6314        /// Sets the value of [filter][crate::model::ListMetadataFeedsRequest::filter].
6315        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6316            self.0.request.filter = v.into();
6317            self
6318        }
6319
6320        /// Sets the value of [order_by][crate::model::ListMetadataFeedsRequest::order_by].
6321        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6322            self.0.request.order_by = v.into();
6323            self
6324        }
6325    }
6326
6327    #[doc(hidden)]
6328    impl crate::RequestBuilder for ListMetadataFeeds {
6329        fn request_options(&mut self) -> &mut crate::RequestOptions {
6330            &mut self.0.options
6331        }
6332    }
6333
6334    /// The request builder for [CatalogService::delete_metadata_feed][crate::client::CatalogService::delete_metadata_feed] calls.
6335    ///
6336    /// # Example
6337    /// ```
6338    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteMetadataFeed;
6339    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6340    /// use google_cloud_lro::Poller;
6341    ///
6342    /// let builder = prepare_request_builder();
6343    /// let response = builder.poller().until_done().await?;
6344    /// # Ok(()) }
6345    ///
6346    /// fn prepare_request_builder() -> DeleteMetadataFeed {
6347    ///   # panic!();
6348    ///   // ... details omitted ...
6349    /// }
6350    /// ```
6351    #[derive(Clone, Debug)]
6352    pub struct DeleteMetadataFeed(RequestBuilder<crate::model::DeleteMetadataFeedRequest>);
6353
6354    impl DeleteMetadataFeed {
6355        pub(crate) fn new(
6356            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6357        ) -> Self {
6358            Self(RequestBuilder::new(stub))
6359        }
6360
6361        /// Sets the full request, replacing any prior values.
6362        pub fn with_request<V: Into<crate::model::DeleteMetadataFeedRequest>>(
6363            mut self,
6364            v: V,
6365        ) -> Self {
6366            self.0.request = v.into();
6367            self
6368        }
6369
6370        /// Sets all the options, replacing any prior values.
6371        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6372            self.0.options = v.into();
6373            self
6374        }
6375
6376        /// Sends the request.
6377        ///
6378        /// # Long running operations
6379        ///
6380        /// This starts, but does not poll, a longrunning operation. More information
6381        /// on [delete_metadata_feed][crate::client::CatalogService::delete_metadata_feed].
6382        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6383            (*self.0.stub)
6384                .delete_metadata_feed(self.0.request, self.0.options)
6385                .await
6386                .map(crate::Response::into_body)
6387        }
6388
6389        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_metadata_feed`.
6390        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6391            type Operation =
6392                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6393            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6394            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6395            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6396            if let Some(ref mut details) = poller_options.tracing {
6397                details.method_name = "google_cloud_dataplex_v1::client::CatalogService::delete_metadata_feed::until_done";
6398            }
6399
6400            let stub = self.0.stub.clone();
6401            let mut options = self.0.options.clone();
6402            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6403            let query = move |name| {
6404                let stub = stub.clone();
6405                let options = options.clone();
6406                async {
6407                    let op = GetOperation::new(stub)
6408                        .set_name(name)
6409                        .with_options(options)
6410                        .send()
6411                        .await?;
6412                    Ok(Operation::new(op))
6413                }
6414            };
6415
6416            let start = move || async {
6417                let op = self.send().await?;
6418                Ok(Operation::new(op))
6419            };
6420
6421            use google_cloud_lro::internal::PollerExt;
6422            {
6423                google_cloud_lro::internal::new_unit_response_poller(
6424                    polling_error_policy,
6425                    polling_backoff_policy,
6426                    start,
6427                    query,
6428                )
6429            }
6430            .with_options(poller_options)
6431        }
6432
6433        /// Sets the value of [name][crate::model::DeleteMetadataFeedRequest::name].
6434        ///
6435        /// This is a **required** field for requests.
6436        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6437            self.0.request.name = v.into();
6438            self
6439        }
6440    }
6441
6442    #[doc(hidden)]
6443    impl crate::RequestBuilder for DeleteMetadataFeed {
6444        fn request_options(&mut self) -> &mut crate::RequestOptions {
6445            &mut self.0.options
6446        }
6447    }
6448
6449    /// The request builder for [CatalogService::update_metadata_feed][crate::client::CatalogService::update_metadata_feed] calls.
6450    ///
6451    /// # Example
6452    /// ```
6453    /// # use google_cloud_dataplex_v1::builder::catalog_service::UpdateMetadataFeed;
6454    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6455    /// use google_cloud_lro::Poller;
6456    ///
6457    /// let builder = prepare_request_builder();
6458    /// let response = builder.poller().until_done().await?;
6459    /// # Ok(()) }
6460    ///
6461    /// fn prepare_request_builder() -> UpdateMetadataFeed {
6462    ///   # panic!();
6463    ///   // ... details omitted ...
6464    /// }
6465    /// ```
6466    #[derive(Clone, Debug)]
6467    pub struct UpdateMetadataFeed(RequestBuilder<crate::model::UpdateMetadataFeedRequest>);
6468
6469    impl UpdateMetadataFeed {
6470        pub(crate) fn new(
6471            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6472        ) -> Self {
6473            Self(RequestBuilder::new(stub))
6474        }
6475
6476        /// Sets the full request, replacing any prior values.
6477        pub fn with_request<V: Into<crate::model::UpdateMetadataFeedRequest>>(
6478            mut self,
6479            v: V,
6480        ) -> Self {
6481            self.0.request = v.into();
6482            self
6483        }
6484
6485        /// Sets all the options, replacing any prior values.
6486        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6487            self.0.options = v.into();
6488            self
6489        }
6490
6491        /// Sends the request.
6492        ///
6493        /// # Long running operations
6494        ///
6495        /// This starts, but does not poll, a longrunning operation. More information
6496        /// on [update_metadata_feed][crate::client::CatalogService::update_metadata_feed].
6497        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6498            (*self.0.stub)
6499                .update_metadata_feed(self.0.request, self.0.options)
6500                .await
6501                .map(crate::Response::into_body)
6502        }
6503
6504        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_metadata_feed`.
6505        pub fn poller(
6506            self,
6507        ) -> impl google_cloud_lro::Poller<crate::model::MetadataFeed, crate::model::OperationMetadata>
6508        {
6509            type Operation = google_cloud_lro::internal::Operation<
6510                crate::model::MetadataFeed,
6511                crate::model::OperationMetadata,
6512            >;
6513            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6514            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6515            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6516            if let Some(ref mut details) = poller_options.tracing {
6517                details.method_name = "google_cloud_dataplex_v1::client::CatalogService::update_metadata_feed::until_done";
6518            }
6519
6520            let stub = self.0.stub.clone();
6521            let mut options = self.0.options.clone();
6522            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6523            let query = move |name| {
6524                let stub = stub.clone();
6525                let options = options.clone();
6526                async {
6527                    let op = GetOperation::new(stub)
6528                        .set_name(name)
6529                        .with_options(options)
6530                        .send()
6531                        .await?;
6532                    Ok(Operation::new(op))
6533                }
6534            };
6535
6536            let start = move || async {
6537                let op = self.send().await?;
6538                Ok(Operation::new(op))
6539            };
6540
6541            use google_cloud_lro::internal::PollerExt;
6542            {
6543                google_cloud_lro::internal::new_poller(
6544                    polling_error_policy,
6545                    polling_backoff_policy,
6546                    start,
6547                    query,
6548                )
6549            }
6550            .with_options(poller_options)
6551        }
6552
6553        /// Sets the value of [metadata_feed][crate::model::UpdateMetadataFeedRequest::metadata_feed].
6554        ///
6555        /// This is a **required** field for requests.
6556        pub fn set_metadata_feed<T>(mut self, v: T) -> Self
6557        where
6558            T: std::convert::Into<crate::model::MetadataFeed>,
6559        {
6560            self.0.request.metadata_feed = std::option::Option::Some(v.into());
6561            self
6562        }
6563
6564        /// Sets or clears the value of [metadata_feed][crate::model::UpdateMetadataFeedRequest::metadata_feed].
6565        ///
6566        /// This is a **required** field for requests.
6567        pub fn set_or_clear_metadata_feed<T>(mut self, v: std::option::Option<T>) -> Self
6568        where
6569            T: std::convert::Into<crate::model::MetadataFeed>,
6570        {
6571            self.0.request.metadata_feed = v.map(|x| x.into());
6572            self
6573        }
6574
6575        /// Sets the value of [update_mask][crate::model::UpdateMetadataFeedRequest::update_mask].
6576        pub fn set_update_mask<T>(mut self, v: T) -> Self
6577        where
6578            T: std::convert::Into<wkt::FieldMask>,
6579        {
6580            self.0.request.update_mask = std::option::Option::Some(v.into());
6581            self
6582        }
6583
6584        /// Sets or clears the value of [update_mask][crate::model::UpdateMetadataFeedRequest::update_mask].
6585        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6586        where
6587            T: std::convert::Into<wkt::FieldMask>,
6588        {
6589            self.0.request.update_mask = v.map(|x| x.into());
6590            self
6591        }
6592
6593        /// Sets the value of [validate_only][crate::model::UpdateMetadataFeedRequest::validate_only].
6594        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
6595            self.0.request.validate_only = v.into();
6596            self
6597        }
6598    }
6599
6600    #[doc(hidden)]
6601    impl crate::RequestBuilder for UpdateMetadataFeed {
6602        fn request_options(&mut self) -> &mut crate::RequestOptions {
6603            &mut self.0.options
6604        }
6605    }
6606
6607    /// The request builder for [CatalogService::list_locations][crate::client::CatalogService::list_locations] calls.
6608    ///
6609    /// # Example
6610    /// ```
6611    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListLocations;
6612    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6613    /// use google_cloud_gax::paginator::ItemPaginator;
6614    ///
6615    /// let builder = prepare_request_builder();
6616    /// let mut items = builder.by_item();
6617    /// while let Some(result) = items.next().await {
6618    ///   let item = result?;
6619    /// }
6620    /// # Ok(()) }
6621    ///
6622    /// fn prepare_request_builder() -> ListLocations {
6623    ///   # panic!();
6624    ///   // ... details omitted ...
6625    /// }
6626    /// ```
6627    #[derive(Clone, Debug)]
6628    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
6629
6630    impl ListLocations {
6631        pub(crate) fn new(
6632            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6633        ) -> Self {
6634            Self(RequestBuilder::new(stub))
6635        }
6636
6637        /// Sets the full request, replacing any prior values.
6638        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
6639            mut self,
6640            v: V,
6641        ) -> Self {
6642            self.0.request = v.into();
6643            self
6644        }
6645
6646        /// Sets all the options, replacing any prior values.
6647        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6648            self.0.options = v.into();
6649            self
6650        }
6651
6652        /// Sends the request.
6653        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
6654            (*self.0.stub)
6655                .list_locations(self.0.request, self.0.options)
6656                .await
6657                .map(crate::Response::into_body)
6658        }
6659
6660        /// Streams each page in the collection.
6661        pub fn by_page(
6662            self,
6663        ) -> impl google_cloud_gax::paginator::Paginator<
6664            google_cloud_location::model::ListLocationsResponse,
6665            crate::Error,
6666        > {
6667            use std::clone::Clone;
6668            let token = self.0.request.page_token.clone();
6669            let execute = move |token: String| {
6670                let mut builder = self.clone();
6671                builder.0.request = builder.0.request.set_page_token(token);
6672                builder.send()
6673            };
6674            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6675        }
6676
6677        /// Streams each item in the collection.
6678        pub fn by_item(
6679            self,
6680        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6681            google_cloud_location::model::ListLocationsResponse,
6682            crate::Error,
6683        > {
6684            use google_cloud_gax::paginator::Paginator;
6685            self.by_page().items()
6686        }
6687
6688        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
6689        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6690            self.0.request.name = v.into();
6691            self
6692        }
6693
6694        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
6695        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6696            self.0.request.filter = v.into();
6697            self
6698        }
6699
6700        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
6701        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6702            self.0.request.page_size = v.into();
6703            self
6704        }
6705
6706        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
6707        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6708            self.0.request.page_token = v.into();
6709            self
6710        }
6711    }
6712
6713    #[doc(hidden)]
6714    impl crate::RequestBuilder for ListLocations {
6715        fn request_options(&mut self) -> &mut crate::RequestOptions {
6716            &mut self.0.options
6717        }
6718    }
6719
6720    /// The request builder for [CatalogService::get_location][crate::client::CatalogService::get_location] calls.
6721    ///
6722    /// # Example
6723    /// ```
6724    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetLocation;
6725    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6726    ///
6727    /// let builder = prepare_request_builder();
6728    /// let response = builder.send().await?;
6729    /// # Ok(()) }
6730    ///
6731    /// fn prepare_request_builder() -> GetLocation {
6732    ///   # panic!();
6733    ///   // ... details omitted ...
6734    /// }
6735    /// ```
6736    #[derive(Clone, Debug)]
6737    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
6738
6739    impl GetLocation {
6740        pub(crate) fn new(
6741            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6742        ) -> Self {
6743            Self(RequestBuilder::new(stub))
6744        }
6745
6746        /// Sets the full request, replacing any prior values.
6747        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
6748            mut self,
6749            v: V,
6750        ) -> Self {
6751            self.0.request = v.into();
6752            self
6753        }
6754
6755        /// Sets all the options, replacing any prior values.
6756        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6757            self.0.options = v.into();
6758            self
6759        }
6760
6761        /// Sends the request.
6762        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
6763            (*self.0.stub)
6764                .get_location(self.0.request, self.0.options)
6765                .await
6766                .map(crate::Response::into_body)
6767        }
6768
6769        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
6770        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6771            self.0.request.name = v.into();
6772            self
6773        }
6774    }
6775
6776    #[doc(hidden)]
6777    impl crate::RequestBuilder for GetLocation {
6778        fn request_options(&mut self) -> &mut crate::RequestOptions {
6779            &mut self.0.options
6780        }
6781    }
6782
6783    /// The request builder for [CatalogService::set_iam_policy][crate::client::CatalogService::set_iam_policy] calls.
6784    ///
6785    /// # Example
6786    /// ```
6787    /// # use google_cloud_dataplex_v1::builder::catalog_service::SetIamPolicy;
6788    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6789    ///
6790    /// let builder = prepare_request_builder();
6791    /// let response = builder.send().await?;
6792    /// # Ok(()) }
6793    ///
6794    /// fn prepare_request_builder() -> SetIamPolicy {
6795    ///   # panic!();
6796    ///   // ... details omitted ...
6797    /// }
6798    /// ```
6799    #[derive(Clone, Debug)]
6800    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
6801
6802    impl SetIamPolicy {
6803        pub(crate) fn new(
6804            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6805        ) -> Self {
6806            Self(RequestBuilder::new(stub))
6807        }
6808
6809        /// Sets the full request, replacing any prior values.
6810        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
6811            mut self,
6812            v: V,
6813        ) -> Self {
6814            self.0.request = v.into();
6815            self
6816        }
6817
6818        /// Sets all the options, replacing any prior values.
6819        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6820            self.0.options = v.into();
6821            self
6822        }
6823
6824        /// Sends the request.
6825        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
6826            (*self.0.stub)
6827                .set_iam_policy(self.0.request, self.0.options)
6828                .await
6829                .map(crate::Response::into_body)
6830        }
6831
6832        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
6833        ///
6834        /// This is a **required** field for requests.
6835        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6836            self.0.request.resource = v.into();
6837            self
6838        }
6839
6840        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
6841        ///
6842        /// This is a **required** field for requests.
6843        pub fn set_policy<T>(mut self, v: T) -> Self
6844        where
6845            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
6846        {
6847            self.0.request.policy = std::option::Option::Some(v.into());
6848            self
6849        }
6850
6851        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
6852        ///
6853        /// This is a **required** field for requests.
6854        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
6855        where
6856            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
6857        {
6858            self.0.request.policy = v.map(|x| x.into());
6859            self
6860        }
6861
6862        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
6863        pub fn set_update_mask<T>(mut self, v: T) -> Self
6864        where
6865            T: std::convert::Into<wkt::FieldMask>,
6866        {
6867            self.0.request.update_mask = std::option::Option::Some(v.into());
6868            self
6869        }
6870
6871        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
6872        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6873        where
6874            T: std::convert::Into<wkt::FieldMask>,
6875        {
6876            self.0.request.update_mask = v.map(|x| x.into());
6877            self
6878        }
6879    }
6880
6881    #[doc(hidden)]
6882    impl crate::RequestBuilder for SetIamPolicy {
6883        fn request_options(&mut self) -> &mut crate::RequestOptions {
6884            &mut self.0.options
6885        }
6886    }
6887
6888    /// The request builder for [CatalogService::get_iam_policy][crate::client::CatalogService::get_iam_policy] calls.
6889    ///
6890    /// # Example
6891    /// ```
6892    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetIamPolicy;
6893    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6894    ///
6895    /// let builder = prepare_request_builder();
6896    /// let response = builder.send().await?;
6897    /// # Ok(()) }
6898    ///
6899    /// fn prepare_request_builder() -> GetIamPolicy {
6900    ///   # panic!();
6901    ///   // ... details omitted ...
6902    /// }
6903    /// ```
6904    #[derive(Clone, Debug)]
6905    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
6906
6907    impl GetIamPolicy {
6908        pub(crate) fn new(
6909            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6910        ) -> Self {
6911            Self(RequestBuilder::new(stub))
6912        }
6913
6914        /// Sets the full request, replacing any prior values.
6915        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
6916            mut self,
6917            v: V,
6918        ) -> Self {
6919            self.0.request = v.into();
6920            self
6921        }
6922
6923        /// Sets all the options, replacing any prior values.
6924        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6925            self.0.options = v.into();
6926            self
6927        }
6928
6929        /// Sends the request.
6930        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
6931            (*self.0.stub)
6932                .get_iam_policy(self.0.request, self.0.options)
6933                .await
6934                .map(crate::Response::into_body)
6935        }
6936
6937        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
6938        ///
6939        /// This is a **required** field for requests.
6940        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6941            self.0.request.resource = v.into();
6942            self
6943        }
6944
6945        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
6946        pub fn set_options<T>(mut self, v: T) -> Self
6947        where
6948            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
6949        {
6950            self.0.request.options = std::option::Option::Some(v.into());
6951            self
6952        }
6953
6954        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
6955        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
6956        where
6957            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
6958        {
6959            self.0.request.options = v.map(|x| x.into());
6960            self
6961        }
6962    }
6963
6964    #[doc(hidden)]
6965    impl crate::RequestBuilder for GetIamPolicy {
6966        fn request_options(&mut self) -> &mut crate::RequestOptions {
6967            &mut self.0.options
6968        }
6969    }
6970
6971    /// The request builder for [CatalogService::test_iam_permissions][crate::client::CatalogService::test_iam_permissions] calls.
6972    ///
6973    /// # Example
6974    /// ```
6975    /// # use google_cloud_dataplex_v1::builder::catalog_service::TestIamPermissions;
6976    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
6977    ///
6978    /// let builder = prepare_request_builder();
6979    /// let response = builder.send().await?;
6980    /// # Ok(()) }
6981    ///
6982    /// fn prepare_request_builder() -> TestIamPermissions {
6983    ///   # panic!();
6984    ///   // ... details omitted ...
6985    /// }
6986    /// ```
6987    #[derive(Clone, Debug)]
6988    pub struct TestIamPermissions(
6989        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
6990    );
6991
6992    impl TestIamPermissions {
6993        pub(crate) fn new(
6994            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6995        ) -> Self {
6996            Self(RequestBuilder::new(stub))
6997        }
6998
6999        /// Sets the full request, replacing any prior values.
7000        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
7001            mut self,
7002            v: V,
7003        ) -> Self {
7004            self.0.request = v.into();
7005            self
7006        }
7007
7008        /// Sets all the options, replacing any prior values.
7009        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7010            self.0.options = v.into();
7011            self
7012        }
7013
7014        /// Sends the request.
7015        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
7016            (*self.0.stub)
7017                .test_iam_permissions(self.0.request, self.0.options)
7018                .await
7019                .map(crate::Response::into_body)
7020        }
7021
7022        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
7023        ///
7024        /// This is a **required** field for requests.
7025        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7026            self.0.request.resource = v.into();
7027            self
7028        }
7029
7030        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
7031        ///
7032        /// This is a **required** field for requests.
7033        pub fn set_permissions<T, V>(mut self, v: T) -> Self
7034        where
7035            T: std::iter::IntoIterator<Item = V>,
7036            V: std::convert::Into<std::string::String>,
7037        {
7038            use std::iter::Iterator;
7039            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
7040            self
7041        }
7042    }
7043
7044    #[doc(hidden)]
7045    impl crate::RequestBuilder for TestIamPermissions {
7046        fn request_options(&mut self) -> &mut crate::RequestOptions {
7047            &mut self.0.options
7048        }
7049    }
7050
7051    /// The request builder for [CatalogService::list_operations][crate::client::CatalogService::list_operations] calls.
7052    ///
7053    /// # Example
7054    /// ```
7055    /// # use google_cloud_dataplex_v1::builder::catalog_service::ListOperations;
7056    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7057    /// use google_cloud_gax::paginator::ItemPaginator;
7058    ///
7059    /// let builder = prepare_request_builder();
7060    /// let mut items = builder.by_item();
7061    /// while let Some(result) = items.next().await {
7062    ///   let item = result?;
7063    /// }
7064    /// # Ok(()) }
7065    ///
7066    /// fn prepare_request_builder() -> ListOperations {
7067    ///   # panic!();
7068    ///   // ... details omitted ...
7069    /// }
7070    /// ```
7071    #[derive(Clone, Debug)]
7072    pub struct ListOperations(
7073        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
7074    );
7075
7076    impl ListOperations {
7077        pub(crate) fn new(
7078            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
7079        ) -> Self {
7080            Self(RequestBuilder::new(stub))
7081        }
7082
7083        /// Sets the full request, replacing any prior values.
7084        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
7085            mut self,
7086            v: V,
7087        ) -> Self {
7088            self.0.request = v.into();
7089            self
7090        }
7091
7092        /// Sets all the options, replacing any prior values.
7093        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7094            self.0.options = v.into();
7095            self
7096        }
7097
7098        /// Sends the request.
7099        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
7100            (*self.0.stub)
7101                .list_operations(self.0.request, self.0.options)
7102                .await
7103                .map(crate::Response::into_body)
7104        }
7105
7106        /// Streams each page in the collection.
7107        pub fn by_page(
7108            self,
7109        ) -> impl google_cloud_gax::paginator::Paginator<
7110            google_cloud_longrunning::model::ListOperationsResponse,
7111            crate::Error,
7112        > {
7113            use std::clone::Clone;
7114            let token = self.0.request.page_token.clone();
7115            let execute = move |token: String| {
7116                let mut builder = self.clone();
7117                builder.0.request = builder.0.request.set_page_token(token);
7118                builder.send()
7119            };
7120            google_cloud_gax::paginator::internal::new_paginator(token, execute)
7121        }
7122
7123        /// Streams each item in the collection.
7124        pub fn by_item(
7125            self,
7126        ) -> impl google_cloud_gax::paginator::ItemPaginator<
7127            google_cloud_longrunning::model::ListOperationsResponse,
7128            crate::Error,
7129        > {
7130            use google_cloud_gax::paginator::Paginator;
7131            self.by_page().items()
7132        }
7133
7134        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
7135        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7136            self.0.request.name = v.into();
7137            self
7138        }
7139
7140        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
7141        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7142            self.0.request.filter = v.into();
7143            self
7144        }
7145
7146        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
7147        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7148            self.0.request.page_size = v.into();
7149            self
7150        }
7151
7152        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
7153        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7154            self.0.request.page_token = v.into();
7155            self
7156        }
7157
7158        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
7159        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
7160            self.0.request.return_partial_success = v.into();
7161            self
7162        }
7163    }
7164
7165    #[doc(hidden)]
7166    impl crate::RequestBuilder for ListOperations {
7167        fn request_options(&mut self) -> &mut crate::RequestOptions {
7168            &mut self.0.options
7169        }
7170    }
7171
7172    /// The request builder for [CatalogService::get_operation][crate::client::CatalogService::get_operation] calls.
7173    ///
7174    /// # Example
7175    /// ```
7176    /// # use google_cloud_dataplex_v1::builder::catalog_service::GetOperation;
7177    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7178    ///
7179    /// let builder = prepare_request_builder();
7180    /// let response = builder.send().await?;
7181    /// # Ok(()) }
7182    ///
7183    /// fn prepare_request_builder() -> GetOperation {
7184    ///   # panic!();
7185    ///   // ... details omitted ...
7186    /// }
7187    /// ```
7188    #[derive(Clone, Debug)]
7189    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
7190
7191    impl GetOperation {
7192        pub(crate) fn new(
7193            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
7194        ) -> Self {
7195            Self(RequestBuilder::new(stub))
7196        }
7197
7198        /// Sets the full request, replacing any prior values.
7199        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
7200            mut self,
7201            v: V,
7202        ) -> Self {
7203            self.0.request = v.into();
7204            self
7205        }
7206
7207        /// Sets all the options, replacing any prior values.
7208        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7209            self.0.options = v.into();
7210            self
7211        }
7212
7213        /// Sends the request.
7214        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7215            (*self.0.stub)
7216                .get_operation(self.0.request, self.0.options)
7217                .await
7218                .map(crate::Response::into_body)
7219        }
7220
7221        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
7222        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7223            self.0.request.name = v.into();
7224            self
7225        }
7226    }
7227
7228    #[doc(hidden)]
7229    impl crate::RequestBuilder for GetOperation {
7230        fn request_options(&mut self) -> &mut crate::RequestOptions {
7231            &mut self.0.options
7232        }
7233    }
7234
7235    /// The request builder for [CatalogService::delete_operation][crate::client::CatalogService::delete_operation] calls.
7236    ///
7237    /// # Example
7238    /// ```
7239    /// # use google_cloud_dataplex_v1::builder::catalog_service::DeleteOperation;
7240    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7241    ///
7242    /// let builder = prepare_request_builder();
7243    /// let response = builder.send().await?;
7244    /// # Ok(()) }
7245    ///
7246    /// fn prepare_request_builder() -> DeleteOperation {
7247    ///   # panic!();
7248    ///   // ... details omitted ...
7249    /// }
7250    /// ```
7251    #[derive(Clone, Debug)]
7252    pub struct DeleteOperation(
7253        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
7254    );
7255
7256    impl DeleteOperation {
7257        pub(crate) fn new(
7258            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
7259        ) -> Self {
7260            Self(RequestBuilder::new(stub))
7261        }
7262
7263        /// Sets the full request, replacing any prior values.
7264        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
7265            mut self,
7266            v: V,
7267        ) -> Self {
7268            self.0.request = v.into();
7269            self
7270        }
7271
7272        /// Sets all the options, replacing any prior values.
7273        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7274            self.0.options = v.into();
7275            self
7276        }
7277
7278        /// Sends the request.
7279        pub async fn send(self) -> Result<()> {
7280            (*self.0.stub)
7281                .delete_operation(self.0.request, self.0.options)
7282                .await
7283                .map(crate::Response::into_body)
7284        }
7285
7286        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
7287        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7288            self.0.request.name = v.into();
7289            self
7290        }
7291    }
7292
7293    #[doc(hidden)]
7294    impl crate::RequestBuilder for DeleteOperation {
7295        fn request_options(&mut self) -> &mut crate::RequestOptions {
7296            &mut self.0.options
7297        }
7298    }
7299
7300    /// The request builder for [CatalogService::cancel_operation][crate::client::CatalogService::cancel_operation] calls.
7301    ///
7302    /// # Example
7303    /// ```
7304    /// # use google_cloud_dataplex_v1::builder::catalog_service::CancelOperation;
7305    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7306    ///
7307    /// let builder = prepare_request_builder();
7308    /// let response = builder.send().await?;
7309    /// # Ok(()) }
7310    ///
7311    /// fn prepare_request_builder() -> CancelOperation {
7312    ///   # panic!();
7313    ///   // ... details omitted ...
7314    /// }
7315    /// ```
7316    #[derive(Clone, Debug)]
7317    pub struct CancelOperation(
7318        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
7319    );
7320
7321    impl CancelOperation {
7322        pub(crate) fn new(
7323            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
7324        ) -> Self {
7325            Self(RequestBuilder::new(stub))
7326        }
7327
7328        /// Sets the full request, replacing any prior values.
7329        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
7330            mut self,
7331            v: V,
7332        ) -> Self {
7333            self.0.request = v.into();
7334            self
7335        }
7336
7337        /// Sets all the options, replacing any prior values.
7338        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7339            self.0.options = v.into();
7340            self
7341        }
7342
7343        /// Sends the request.
7344        pub async fn send(self) -> Result<()> {
7345            (*self.0.stub)
7346                .cancel_operation(self.0.request, self.0.options)
7347                .await
7348                .map(crate::Response::into_body)
7349        }
7350
7351        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
7352        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7353            self.0.request.name = v.into();
7354            self
7355        }
7356    }
7357
7358    #[doc(hidden)]
7359    impl crate::RequestBuilder for CancelOperation {
7360        fn request_options(&mut self) -> &mut crate::RequestOptions {
7361            &mut self.0.options
7362        }
7363    }
7364}
7365
7366/// Request and client builders for [CmekService][crate::client::CmekService].
7367pub mod cmek_service {
7368    use crate::Result;
7369
7370    /// A builder for [CmekService][crate::client::CmekService].
7371    ///
7372    /// ```
7373    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
7374    /// # use google_cloud_dataplex_v1::*;
7375    /// # use builder::cmek_service::ClientBuilder;
7376    /// # use client::CmekService;
7377    /// let builder : ClientBuilder = CmekService::builder();
7378    /// let client = builder
7379    ///     .with_endpoint("https://dataplex.googleapis.com")
7380    ///     .build().await?;
7381    /// # Ok(()) }
7382    /// ```
7383    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
7384
7385    pub(crate) mod client {
7386        use super::super::super::client::CmekService;
7387        pub struct Factory;
7388        impl crate::ClientFactory for Factory {
7389            type Client = CmekService;
7390            type Credentials = gaxi::options::Credentials;
7391            async fn build(
7392                self,
7393                config: gaxi::options::ClientConfig,
7394            ) -> crate::ClientBuilderResult<Self::Client> {
7395                Self::Client::new(config).await
7396            }
7397        }
7398    }
7399
7400    /// Common implementation for [crate::client::CmekService] request builders.
7401    #[derive(Clone, Debug)]
7402    pub(crate) struct RequestBuilder<R: std::default::Default> {
7403        stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7404        request: R,
7405        options: crate::RequestOptions,
7406    }
7407
7408    impl<R> RequestBuilder<R>
7409    where
7410        R: std::default::Default,
7411    {
7412        pub(crate) fn new(
7413            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7414        ) -> Self {
7415            Self {
7416                stub,
7417                request: R::default(),
7418                options: crate::RequestOptions::default(),
7419            }
7420        }
7421    }
7422
7423    /// The request builder for [CmekService::create_encryption_config][crate::client::CmekService::create_encryption_config] calls.
7424    ///
7425    /// # Example
7426    /// ```
7427    /// # use google_cloud_dataplex_v1::builder::cmek_service::CreateEncryptionConfig;
7428    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7429    /// use google_cloud_lro::Poller;
7430    ///
7431    /// let builder = prepare_request_builder();
7432    /// let response = builder.poller().until_done().await?;
7433    /// # Ok(()) }
7434    ///
7435    /// fn prepare_request_builder() -> CreateEncryptionConfig {
7436    ///   # panic!();
7437    ///   // ... details omitted ...
7438    /// }
7439    /// ```
7440    #[derive(Clone, Debug)]
7441    pub struct CreateEncryptionConfig(RequestBuilder<crate::model::CreateEncryptionConfigRequest>);
7442
7443    impl CreateEncryptionConfig {
7444        pub(crate) fn new(
7445            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7446        ) -> Self {
7447            Self(RequestBuilder::new(stub))
7448        }
7449
7450        /// Sets the full request, replacing any prior values.
7451        pub fn with_request<V: Into<crate::model::CreateEncryptionConfigRequest>>(
7452            mut self,
7453            v: V,
7454        ) -> Self {
7455            self.0.request = v.into();
7456            self
7457        }
7458
7459        /// Sets all the options, replacing any prior values.
7460        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7461            self.0.options = v.into();
7462            self
7463        }
7464
7465        /// Sends the request.
7466        ///
7467        /// # Long running operations
7468        ///
7469        /// This starts, but does not poll, a longrunning operation. More information
7470        /// on [create_encryption_config][crate::client::CmekService::create_encryption_config].
7471        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7472            (*self.0.stub)
7473                .create_encryption_config(self.0.request, self.0.options)
7474                .await
7475                .map(crate::Response::into_body)
7476        }
7477
7478        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_encryption_config`.
7479        pub fn poller(
7480            self,
7481        ) -> impl google_cloud_lro::Poller<crate::model::EncryptionConfig, crate::model::OperationMetadata>
7482        {
7483            type Operation = google_cloud_lro::internal::Operation<
7484                crate::model::EncryptionConfig,
7485                crate::model::OperationMetadata,
7486            >;
7487            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7488            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7489            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7490            if let Some(ref mut details) = poller_options.tracing {
7491                details.method_name = "google_cloud_dataplex_v1::client::CmekService::create_encryption_config::until_done";
7492            }
7493
7494            let stub = self.0.stub.clone();
7495            let mut options = self.0.options.clone();
7496            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7497            let query = move |name| {
7498                let stub = stub.clone();
7499                let options = options.clone();
7500                async {
7501                    let op = GetOperation::new(stub)
7502                        .set_name(name)
7503                        .with_options(options)
7504                        .send()
7505                        .await?;
7506                    Ok(Operation::new(op))
7507                }
7508            };
7509
7510            let start = move || async {
7511                let op = self.send().await?;
7512                Ok(Operation::new(op))
7513            };
7514
7515            use google_cloud_lro::internal::PollerExt;
7516            {
7517                google_cloud_lro::internal::new_poller(
7518                    polling_error_policy,
7519                    polling_backoff_policy,
7520                    start,
7521                    query,
7522                )
7523            }
7524            .with_options(poller_options)
7525        }
7526
7527        /// Sets the value of [parent][crate::model::CreateEncryptionConfigRequest::parent].
7528        ///
7529        /// This is a **required** field for requests.
7530        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7531            self.0.request.parent = v.into();
7532            self
7533        }
7534
7535        /// Sets the value of [encryption_config_id][crate::model::CreateEncryptionConfigRequest::encryption_config_id].
7536        ///
7537        /// This is a **required** field for requests.
7538        pub fn set_encryption_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7539            self.0.request.encryption_config_id = v.into();
7540            self
7541        }
7542
7543        /// Sets the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
7544        ///
7545        /// This is a **required** field for requests.
7546        pub fn set_encryption_config<T>(mut self, v: T) -> Self
7547        where
7548            T: std::convert::Into<crate::model::EncryptionConfig>,
7549        {
7550            self.0.request.encryption_config = std::option::Option::Some(v.into());
7551            self
7552        }
7553
7554        /// Sets or clears the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
7555        ///
7556        /// This is a **required** field for requests.
7557        pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
7558        where
7559            T: std::convert::Into<crate::model::EncryptionConfig>,
7560        {
7561            self.0.request.encryption_config = v.map(|x| x.into());
7562            self
7563        }
7564    }
7565
7566    #[doc(hidden)]
7567    impl crate::RequestBuilder for CreateEncryptionConfig {
7568        fn request_options(&mut self) -> &mut crate::RequestOptions {
7569            &mut self.0.options
7570        }
7571    }
7572
7573    /// The request builder for [CmekService::update_encryption_config][crate::client::CmekService::update_encryption_config] calls.
7574    ///
7575    /// # Example
7576    /// ```
7577    /// # use google_cloud_dataplex_v1::builder::cmek_service::UpdateEncryptionConfig;
7578    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7579    /// use google_cloud_lro::Poller;
7580    ///
7581    /// let builder = prepare_request_builder();
7582    /// let response = builder.poller().until_done().await?;
7583    /// # Ok(()) }
7584    ///
7585    /// fn prepare_request_builder() -> UpdateEncryptionConfig {
7586    ///   # panic!();
7587    ///   // ... details omitted ...
7588    /// }
7589    /// ```
7590    #[derive(Clone, Debug)]
7591    pub struct UpdateEncryptionConfig(RequestBuilder<crate::model::UpdateEncryptionConfigRequest>);
7592
7593    impl UpdateEncryptionConfig {
7594        pub(crate) fn new(
7595            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7596        ) -> Self {
7597            Self(RequestBuilder::new(stub))
7598        }
7599
7600        /// Sets the full request, replacing any prior values.
7601        pub fn with_request<V: Into<crate::model::UpdateEncryptionConfigRequest>>(
7602            mut self,
7603            v: V,
7604        ) -> Self {
7605            self.0.request = v.into();
7606            self
7607        }
7608
7609        /// Sets all the options, replacing any prior values.
7610        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7611            self.0.options = v.into();
7612            self
7613        }
7614
7615        /// Sends the request.
7616        ///
7617        /// # Long running operations
7618        ///
7619        /// This starts, but does not poll, a longrunning operation. More information
7620        /// on [update_encryption_config][crate::client::CmekService::update_encryption_config].
7621        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7622            (*self.0.stub)
7623                .update_encryption_config(self.0.request, self.0.options)
7624                .await
7625                .map(crate::Response::into_body)
7626        }
7627
7628        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_encryption_config`.
7629        pub fn poller(
7630            self,
7631        ) -> impl google_cloud_lro::Poller<crate::model::EncryptionConfig, crate::model::OperationMetadata>
7632        {
7633            type Operation = google_cloud_lro::internal::Operation<
7634                crate::model::EncryptionConfig,
7635                crate::model::OperationMetadata,
7636            >;
7637            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7638            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7639            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7640            if let Some(ref mut details) = poller_options.tracing {
7641                details.method_name = "google_cloud_dataplex_v1::client::CmekService::update_encryption_config::until_done";
7642            }
7643
7644            let stub = self.0.stub.clone();
7645            let mut options = self.0.options.clone();
7646            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7647            let query = move |name| {
7648                let stub = stub.clone();
7649                let options = options.clone();
7650                async {
7651                    let op = GetOperation::new(stub)
7652                        .set_name(name)
7653                        .with_options(options)
7654                        .send()
7655                        .await?;
7656                    Ok(Operation::new(op))
7657                }
7658            };
7659
7660            let start = move || async {
7661                let op = self.send().await?;
7662                Ok(Operation::new(op))
7663            };
7664
7665            use google_cloud_lro::internal::PollerExt;
7666            {
7667                google_cloud_lro::internal::new_poller(
7668                    polling_error_policy,
7669                    polling_backoff_policy,
7670                    start,
7671                    query,
7672                )
7673            }
7674            .with_options(poller_options)
7675        }
7676
7677        /// Sets the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
7678        ///
7679        /// This is a **required** field for requests.
7680        pub fn set_encryption_config<T>(mut self, v: T) -> Self
7681        where
7682            T: std::convert::Into<crate::model::EncryptionConfig>,
7683        {
7684            self.0.request.encryption_config = std::option::Option::Some(v.into());
7685            self
7686        }
7687
7688        /// Sets or clears the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
7689        ///
7690        /// This is a **required** field for requests.
7691        pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
7692        where
7693            T: std::convert::Into<crate::model::EncryptionConfig>,
7694        {
7695            self.0.request.encryption_config = v.map(|x| x.into());
7696            self
7697        }
7698
7699        /// Sets the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
7700        pub fn set_update_mask<T>(mut self, v: T) -> Self
7701        where
7702            T: std::convert::Into<wkt::FieldMask>,
7703        {
7704            self.0.request.update_mask = std::option::Option::Some(v.into());
7705            self
7706        }
7707
7708        /// Sets or clears the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
7709        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7710        where
7711            T: std::convert::Into<wkt::FieldMask>,
7712        {
7713            self.0.request.update_mask = v.map(|x| x.into());
7714            self
7715        }
7716    }
7717
7718    #[doc(hidden)]
7719    impl crate::RequestBuilder for UpdateEncryptionConfig {
7720        fn request_options(&mut self) -> &mut crate::RequestOptions {
7721            &mut self.0.options
7722        }
7723    }
7724
7725    /// The request builder for [CmekService::delete_encryption_config][crate::client::CmekService::delete_encryption_config] calls.
7726    ///
7727    /// # Example
7728    /// ```
7729    /// # use google_cloud_dataplex_v1::builder::cmek_service::DeleteEncryptionConfig;
7730    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7731    /// use google_cloud_lro::Poller;
7732    ///
7733    /// let builder = prepare_request_builder();
7734    /// let response = builder.poller().until_done().await?;
7735    /// # Ok(()) }
7736    ///
7737    /// fn prepare_request_builder() -> DeleteEncryptionConfig {
7738    ///   # panic!();
7739    ///   // ... details omitted ...
7740    /// }
7741    /// ```
7742    #[derive(Clone, Debug)]
7743    pub struct DeleteEncryptionConfig(RequestBuilder<crate::model::DeleteEncryptionConfigRequest>);
7744
7745    impl DeleteEncryptionConfig {
7746        pub(crate) fn new(
7747            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7748        ) -> Self {
7749            Self(RequestBuilder::new(stub))
7750        }
7751
7752        /// Sets the full request, replacing any prior values.
7753        pub fn with_request<V: Into<crate::model::DeleteEncryptionConfigRequest>>(
7754            mut self,
7755            v: V,
7756        ) -> Self {
7757            self.0.request = v.into();
7758            self
7759        }
7760
7761        /// Sets all the options, replacing any prior values.
7762        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7763            self.0.options = v.into();
7764            self
7765        }
7766
7767        /// Sends the request.
7768        ///
7769        /// # Long running operations
7770        ///
7771        /// This starts, but does not poll, a longrunning operation. More information
7772        /// on [delete_encryption_config][crate::client::CmekService::delete_encryption_config].
7773        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7774            (*self.0.stub)
7775                .delete_encryption_config(self.0.request, self.0.options)
7776                .await
7777                .map(crate::Response::into_body)
7778        }
7779
7780        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_encryption_config`.
7781        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
7782            type Operation =
7783                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7784            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7785            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7786            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7787            if let Some(ref mut details) = poller_options.tracing {
7788                details.method_name = "google_cloud_dataplex_v1::client::CmekService::delete_encryption_config::until_done";
7789            }
7790
7791            let stub = self.0.stub.clone();
7792            let mut options = self.0.options.clone();
7793            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7794            let query = move |name| {
7795                let stub = stub.clone();
7796                let options = options.clone();
7797                async {
7798                    let op = GetOperation::new(stub)
7799                        .set_name(name)
7800                        .with_options(options)
7801                        .send()
7802                        .await?;
7803                    Ok(Operation::new(op))
7804                }
7805            };
7806
7807            let start = move || async {
7808                let op = self.send().await?;
7809                Ok(Operation::new(op))
7810            };
7811
7812            use google_cloud_lro::internal::PollerExt;
7813            {
7814                google_cloud_lro::internal::new_unit_response_poller(
7815                    polling_error_policy,
7816                    polling_backoff_policy,
7817                    start,
7818                    query,
7819                )
7820            }
7821            .with_options(poller_options)
7822        }
7823
7824        /// Sets the value of [name][crate::model::DeleteEncryptionConfigRequest::name].
7825        ///
7826        /// This is a **required** field for requests.
7827        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7828            self.0.request.name = v.into();
7829            self
7830        }
7831
7832        /// Sets the value of [etag][crate::model::DeleteEncryptionConfigRequest::etag].
7833        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
7834            self.0.request.etag = v.into();
7835            self
7836        }
7837    }
7838
7839    #[doc(hidden)]
7840    impl crate::RequestBuilder for DeleteEncryptionConfig {
7841        fn request_options(&mut self) -> &mut crate::RequestOptions {
7842            &mut self.0.options
7843        }
7844    }
7845
7846    /// The request builder for [CmekService::list_encryption_configs][crate::client::CmekService::list_encryption_configs] calls.
7847    ///
7848    /// # Example
7849    /// ```
7850    /// # use google_cloud_dataplex_v1::builder::cmek_service::ListEncryptionConfigs;
7851    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7852    /// use google_cloud_gax::paginator::ItemPaginator;
7853    ///
7854    /// let builder = prepare_request_builder();
7855    /// let mut items = builder.by_item();
7856    /// while let Some(result) = items.next().await {
7857    ///   let item = result?;
7858    /// }
7859    /// # Ok(()) }
7860    ///
7861    /// fn prepare_request_builder() -> ListEncryptionConfigs {
7862    ///   # panic!();
7863    ///   // ... details omitted ...
7864    /// }
7865    /// ```
7866    #[derive(Clone, Debug)]
7867    pub struct ListEncryptionConfigs(RequestBuilder<crate::model::ListEncryptionConfigsRequest>);
7868
7869    impl ListEncryptionConfigs {
7870        pub(crate) fn new(
7871            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7872        ) -> Self {
7873            Self(RequestBuilder::new(stub))
7874        }
7875
7876        /// Sets the full request, replacing any prior values.
7877        pub fn with_request<V: Into<crate::model::ListEncryptionConfigsRequest>>(
7878            mut self,
7879            v: V,
7880        ) -> Self {
7881            self.0.request = v.into();
7882            self
7883        }
7884
7885        /// Sets all the options, replacing any prior values.
7886        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7887            self.0.options = v.into();
7888            self
7889        }
7890
7891        /// Sends the request.
7892        pub async fn send(self) -> Result<crate::model::ListEncryptionConfigsResponse> {
7893            (*self.0.stub)
7894                .list_encryption_configs(self.0.request, self.0.options)
7895                .await
7896                .map(crate::Response::into_body)
7897        }
7898
7899        /// Streams each page in the collection.
7900        pub fn by_page(
7901            self,
7902        ) -> impl google_cloud_gax::paginator::Paginator<
7903            crate::model::ListEncryptionConfigsResponse,
7904            crate::Error,
7905        > {
7906            use std::clone::Clone;
7907            let token = self.0.request.page_token.clone();
7908            let execute = move |token: String| {
7909                let mut builder = self.clone();
7910                builder.0.request = builder.0.request.set_page_token(token);
7911                builder.send()
7912            };
7913            google_cloud_gax::paginator::internal::new_paginator(token, execute)
7914        }
7915
7916        /// Streams each item in the collection.
7917        pub fn by_item(
7918            self,
7919        ) -> impl google_cloud_gax::paginator::ItemPaginator<
7920            crate::model::ListEncryptionConfigsResponse,
7921            crate::Error,
7922        > {
7923            use google_cloud_gax::paginator::Paginator;
7924            self.by_page().items()
7925        }
7926
7927        /// Sets the value of [parent][crate::model::ListEncryptionConfigsRequest::parent].
7928        ///
7929        /// This is a **required** field for requests.
7930        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7931            self.0.request.parent = v.into();
7932            self
7933        }
7934
7935        /// Sets the value of [page_size][crate::model::ListEncryptionConfigsRequest::page_size].
7936        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7937            self.0.request.page_size = v.into();
7938            self
7939        }
7940
7941        /// Sets the value of [page_token][crate::model::ListEncryptionConfigsRequest::page_token].
7942        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7943            self.0.request.page_token = v.into();
7944            self
7945        }
7946
7947        /// Sets the value of [filter][crate::model::ListEncryptionConfigsRequest::filter].
7948        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7949            self.0.request.filter = v.into();
7950            self
7951        }
7952
7953        /// Sets the value of [order_by][crate::model::ListEncryptionConfigsRequest::order_by].
7954        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7955            self.0.request.order_by = v.into();
7956            self
7957        }
7958    }
7959
7960    #[doc(hidden)]
7961    impl crate::RequestBuilder for ListEncryptionConfigs {
7962        fn request_options(&mut self) -> &mut crate::RequestOptions {
7963            &mut self.0.options
7964        }
7965    }
7966
7967    /// The request builder for [CmekService::get_encryption_config][crate::client::CmekService::get_encryption_config] calls.
7968    ///
7969    /// # Example
7970    /// ```
7971    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetEncryptionConfig;
7972    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
7973    ///
7974    /// let builder = prepare_request_builder();
7975    /// let response = builder.send().await?;
7976    /// # Ok(()) }
7977    ///
7978    /// fn prepare_request_builder() -> GetEncryptionConfig {
7979    ///   # panic!();
7980    ///   // ... details omitted ...
7981    /// }
7982    /// ```
7983    #[derive(Clone, Debug)]
7984    pub struct GetEncryptionConfig(RequestBuilder<crate::model::GetEncryptionConfigRequest>);
7985
7986    impl GetEncryptionConfig {
7987        pub(crate) fn new(
7988            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7989        ) -> Self {
7990            Self(RequestBuilder::new(stub))
7991        }
7992
7993        /// Sets the full request, replacing any prior values.
7994        pub fn with_request<V: Into<crate::model::GetEncryptionConfigRequest>>(
7995            mut self,
7996            v: V,
7997        ) -> Self {
7998            self.0.request = v.into();
7999            self
8000        }
8001
8002        /// Sets all the options, replacing any prior values.
8003        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8004            self.0.options = v.into();
8005            self
8006        }
8007
8008        /// Sends the request.
8009        pub async fn send(self) -> Result<crate::model::EncryptionConfig> {
8010            (*self.0.stub)
8011                .get_encryption_config(self.0.request, self.0.options)
8012                .await
8013                .map(crate::Response::into_body)
8014        }
8015
8016        /// Sets the value of [name][crate::model::GetEncryptionConfigRequest::name].
8017        ///
8018        /// This is a **required** field for requests.
8019        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8020            self.0.request.name = v.into();
8021            self
8022        }
8023    }
8024
8025    #[doc(hidden)]
8026    impl crate::RequestBuilder for GetEncryptionConfig {
8027        fn request_options(&mut self) -> &mut crate::RequestOptions {
8028            &mut self.0.options
8029        }
8030    }
8031
8032    /// The request builder for [CmekService::list_locations][crate::client::CmekService::list_locations] calls.
8033    ///
8034    /// # Example
8035    /// ```
8036    /// # use google_cloud_dataplex_v1::builder::cmek_service::ListLocations;
8037    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8038    /// use google_cloud_gax::paginator::ItemPaginator;
8039    ///
8040    /// let builder = prepare_request_builder();
8041    /// let mut items = builder.by_item();
8042    /// while let Some(result) = items.next().await {
8043    ///   let item = result?;
8044    /// }
8045    /// # Ok(()) }
8046    ///
8047    /// fn prepare_request_builder() -> ListLocations {
8048    ///   # panic!();
8049    ///   // ... details omitted ...
8050    /// }
8051    /// ```
8052    #[derive(Clone, Debug)]
8053    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
8054
8055    impl ListLocations {
8056        pub(crate) fn new(
8057            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8058        ) -> Self {
8059            Self(RequestBuilder::new(stub))
8060        }
8061
8062        /// Sets the full request, replacing any prior values.
8063        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
8064            mut self,
8065            v: V,
8066        ) -> Self {
8067            self.0.request = v.into();
8068            self
8069        }
8070
8071        /// Sets all the options, replacing any prior values.
8072        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8073            self.0.options = v.into();
8074            self
8075        }
8076
8077        /// Sends the request.
8078        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
8079            (*self.0.stub)
8080                .list_locations(self.0.request, self.0.options)
8081                .await
8082                .map(crate::Response::into_body)
8083        }
8084
8085        /// Streams each page in the collection.
8086        pub fn by_page(
8087            self,
8088        ) -> impl google_cloud_gax::paginator::Paginator<
8089            google_cloud_location::model::ListLocationsResponse,
8090            crate::Error,
8091        > {
8092            use std::clone::Clone;
8093            let token = self.0.request.page_token.clone();
8094            let execute = move |token: String| {
8095                let mut builder = self.clone();
8096                builder.0.request = builder.0.request.set_page_token(token);
8097                builder.send()
8098            };
8099            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8100        }
8101
8102        /// Streams each item in the collection.
8103        pub fn by_item(
8104            self,
8105        ) -> impl google_cloud_gax::paginator::ItemPaginator<
8106            google_cloud_location::model::ListLocationsResponse,
8107            crate::Error,
8108        > {
8109            use google_cloud_gax::paginator::Paginator;
8110            self.by_page().items()
8111        }
8112
8113        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
8114        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8115            self.0.request.name = v.into();
8116            self
8117        }
8118
8119        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
8120        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8121            self.0.request.filter = v.into();
8122            self
8123        }
8124
8125        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
8126        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8127            self.0.request.page_size = v.into();
8128            self
8129        }
8130
8131        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
8132        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8133            self.0.request.page_token = v.into();
8134            self
8135        }
8136    }
8137
8138    #[doc(hidden)]
8139    impl crate::RequestBuilder for ListLocations {
8140        fn request_options(&mut self) -> &mut crate::RequestOptions {
8141            &mut self.0.options
8142        }
8143    }
8144
8145    /// The request builder for [CmekService::get_location][crate::client::CmekService::get_location] calls.
8146    ///
8147    /// # Example
8148    /// ```
8149    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetLocation;
8150    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8151    ///
8152    /// let builder = prepare_request_builder();
8153    /// let response = builder.send().await?;
8154    /// # Ok(()) }
8155    ///
8156    /// fn prepare_request_builder() -> GetLocation {
8157    ///   # panic!();
8158    ///   // ... details omitted ...
8159    /// }
8160    /// ```
8161    #[derive(Clone, Debug)]
8162    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
8163
8164    impl GetLocation {
8165        pub(crate) fn new(
8166            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8167        ) -> Self {
8168            Self(RequestBuilder::new(stub))
8169        }
8170
8171        /// Sets the full request, replacing any prior values.
8172        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
8173            mut self,
8174            v: V,
8175        ) -> Self {
8176            self.0.request = v.into();
8177            self
8178        }
8179
8180        /// Sets all the options, replacing any prior values.
8181        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8182            self.0.options = v.into();
8183            self
8184        }
8185
8186        /// Sends the request.
8187        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
8188            (*self.0.stub)
8189                .get_location(self.0.request, self.0.options)
8190                .await
8191                .map(crate::Response::into_body)
8192        }
8193
8194        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
8195        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8196            self.0.request.name = v.into();
8197            self
8198        }
8199    }
8200
8201    #[doc(hidden)]
8202    impl crate::RequestBuilder for GetLocation {
8203        fn request_options(&mut self) -> &mut crate::RequestOptions {
8204            &mut self.0.options
8205        }
8206    }
8207
8208    /// The request builder for [CmekService::set_iam_policy][crate::client::CmekService::set_iam_policy] calls.
8209    ///
8210    /// # Example
8211    /// ```
8212    /// # use google_cloud_dataplex_v1::builder::cmek_service::SetIamPolicy;
8213    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8214    ///
8215    /// let builder = prepare_request_builder();
8216    /// let response = builder.send().await?;
8217    /// # Ok(()) }
8218    ///
8219    /// fn prepare_request_builder() -> SetIamPolicy {
8220    ///   # panic!();
8221    ///   // ... details omitted ...
8222    /// }
8223    /// ```
8224    #[derive(Clone, Debug)]
8225    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
8226
8227    impl SetIamPolicy {
8228        pub(crate) fn new(
8229            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8230        ) -> Self {
8231            Self(RequestBuilder::new(stub))
8232        }
8233
8234        /// Sets the full request, replacing any prior values.
8235        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
8236            mut self,
8237            v: V,
8238        ) -> Self {
8239            self.0.request = v.into();
8240            self
8241        }
8242
8243        /// Sets all the options, replacing any prior values.
8244        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8245            self.0.options = v.into();
8246            self
8247        }
8248
8249        /// Sends the request.
8250        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8251            (*self.0.stub)
8252                .set_iam_policy(self.0.request, self.0.options)
8253                .await
8254                .map(crate::Response::into_body)
8255        }
8256
8257        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
8258        ///
8259        /// This is a **required** field for requests.
8260        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8261            self.0.request.resource = v.into();
8262            self
8263        }
8264
8265        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
8266        ///
8267        /// This is a **required** field for requests.
8268        pub fn set_policy<T>(mut self, v: T) -> Self
8269        where
8270            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8271        {
8272            self.0.request.policy = std::option::Option::Some(v.into());
8273            self
8274        }
8275
8276        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
8277        ///
8278        /// This is a **required** field for requests.
8279        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
8280        where
8281            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8282        {
8283            self.0.request.policy = v.map(|x| x.into());
8284            self
8285        }
8286
8287        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
8288        pub fn set_update_mask<T>(mut self, v: T) -> Self
8289        where
8290            T: std::convert::Into<wkt::FieldMask>,
8291        {
8292            self.0.request.update_mask = std::option::Option::Some(v.into());
8293            self
8294        }
8295
8296        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
8297        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8298        where
8299            T: std::convert::Into<wkt::FieldMask>,
8300        {
8301            self.0.request.update_mask = v.map(|x| x.into());
8302            self
8303        }
8304    }
8305
8306    #[doc(hidden)]
8307    impl crate::RequestBuilder for SetIamPolicy {
8308        fn request_options(&mut self) -> &mut crate::RequestOptions {
8309            &mut self.0.options
8310        }
8311    }
8312
8313    /// The request builder for [CmekService::get_iam_policy][crate::client::CmekService::get_iam_policy] calls.
8314    ///
8315    /// # Example
8316    /// ```
8317    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetIamPolicy;
8318    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8319    ///
8320    /// let builder = prepare_request_builder();
8321    /// let response = builder.send().await?;
8322    /// # Ok(()) }
8323    ///
8324    /// fn prepare_request_builder() -> GetIamPolicy {
8325    ///   # panic!();
8326    ///   // ... details omitted ...
8327    /// }
8328    /// ```
8329    #[derive(Clone, Debug)]
8330    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
8331
8332    impl GetIamPolicy {
8333        pub(crate) fn new(
8334            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8335        ) -> Self {
8336            Self(RequestBuilder::new(stub))
8337        }
8338
8339        /// Sets the full request, replacing any prior values.
8340        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
8341            mut self,
8342            v: V,
8343        ) -> Self {
8344            self.0.request = v.into();
8345            self
8346        }
8347
8348        /// Sets all the options, replacing any prior values.
8349        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8350            self.0.options = v.into();
8351            self
8352        }
8353
8354        /// Sends the request.
8355        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8356            (*self.0.stub)
8357                .get_iam_policy(self.0.request, self.0.options)
8358                .await
8359                .map(crate::Response::into_body)
8360        }
8361
8362        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
8363        ///
8364        /// This is a **required** field for requests.
8365        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8366            self.0.request.resource = v.into();
8367            self
8368        }
8369
8370        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
8371        pub fn set_options<T>(mut self, v: T) -> Self
8372        where
8373            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
8374        {
8375            self.0.request.options = std::option::Option::Some(v.into());
8376            self
8377        }
8378
8379        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
8380        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
8381        where
8382            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
8383        {
8384            self.0.request.options = v.map(|x| x.into());
8385            self
8386        }
8387    }
8388
8389    #[doc(hidden)]
8390    impl crate::RequestBuilder for GetIamPolicy {
8391        fn request_options(&mut self) -> &mut crate::RequestOptions {
8392            &mut self.0.options
8393        }
8394    }
8395
8396    /// The request builder for [CmekService::test_iam_permissions][crate::client::CmekService::test_iam_permissions] calls.
8397    ///
8398    /// # Example
8399    /// ```
8400    /// # use google_cloud_dataplex_v1::builder::cmek_service::TestIamPermissions;
8401    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8402    ///
8403    /// let builder = prepare_request_builder();
8404    /// let response = builder.send().await?;
8405    /// # Ok(()) }
8406    ///
8407    /// fn prepare_request_builder() -> TestIamPermissions {
8408    ///   # panic!();
8409    ///   // ... details omitted ...
8410    /// }
8411    /// ```
8412    #[derive(Clone, Debug)]
8413    pub struct TestIamPermissions(
8414        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
8415    );
8416
8417    impl TestIamPermissions {
8418        pub(crate) fn new(
8419            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8420        ) -> Self {
8421            Self(RequestBuilder::new(stub))
8422        }
8423
8424        /// Sets the full request, replacing any prior values.
8425        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
8426            mut self,
8427            v: V,
8428        ) -> Self {
8429            self.0.request = v.into();
8430            self
8431        }
8432
8433        /// Sets all the options, replacing any prior values.
8434        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8435            self.0.options = v.into();
8436            self
8437        }
8438
8439        /// Sends the request.
8440        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
8441            (*self.0.stub)
8442                .test_iam_permissions(self.0.request, self.0.options)
8443                .await
8444                .map(crate::Response::into_body)
8445        }
8446
8447        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
8448        ///
8449        /// This is a **required** field for requests.
8450        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8451            self.0.request.resource = v.into();
8452            self
8453        }
8454
8455        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
8456        ///
8457        /// This is a **required** field for requests.
8458        pub fn set_permissions<T, V>(mut self, v: T) -> Self
8459        where
8460            T: std::iter::IntoIterator<Item = V>,
8461            V: std::convert::Into<std::string::String>,
8462        {
8463            use std::iter::Iterator;
8464            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
8465            self
8466        }
8467    }
8468
8469    #[doc(hidden)]
8470    impl crate::RequestBuilder for TestIamPermissions {
8471        fn request_options(&mut self) -> &mut crate::RequestOptions {
8472            &mut self.0.options
8473        }
8474    }
8475
8476    /// The request builder for [CmekService::list_operations][crate::client::CmekService::list_operations] calls.
8477    ///
8478    /// # Example
8479    /// ```
8480    /// # use google_cloud_dataplex_v1::builder::cmek_service::ListOperations;
8481    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8482    /// use google_cloud_gax::paginator::ItemPaginator;
8483    ///
8484    /// let builder = prepare_request_builder();
8485    /// let mut items = builder.by_item();
8486    /// while let Some(result) = items.next().await {
8487    ///   let item = result?;
8488    /// }
8489    /// # Ok(()) }
8490    ///
8491    /// fn prepare_request_builder() -> ListOperations {
8492    ///   # panic!();
8493    ///   // ... details omitted ...
8494    /// }
8495    /// ```
8496    #[derive(Clone, Debug)]
8497    pub struct ListOperations(
8498        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
8499    );
8500
8501    impl ListOperations {
8502        pub(crate) fn new(
8503            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8504        ) -> Self {
8505            Self(RequestBuilder::new(stub))
8506        }
8507
8508        /// Sets the full request, replacing any prior values.
8509        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
8510            mut self,
8511            v: V,
8512        ) -> Self {
8513            self.0.request = v.into();
8514            self
8515        }
8516
8517        /// Sets all the options, replacing any prior values.
8518        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8519            self.0.options = v.into();
8520            self
8521        }
8522
8523        /// Sends the request.
8524        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
8525            (*self.0.stub)
8526                .list_operations(self.0.request, self.0.options)
8527                .await
8528                .map(crate::Response::into_body)
8529        }
8530
8531        /// Streams each page in the collection.
8532        pub fn by_page(
8533            self,
8534        ) -> impl google_cloud_gax::paginator::Paginator<
8535            google_cloud_longrunning::model::ListOperationsResponse,
8536            crate::Error,
8537        > {
8538            use std::clone::Clone;
8539            let token = self.0.request.page_token.clone();
8540            let execute = move |token: String| {
8541                let mut builder = self.clone();
8542                builder.0.request = builder.0.request.set_page_token(token);
8543                builder.send()
8544            };
8545            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8546        }
8547
8548        /// Streams each item in the collection.
8549        pub fn by_item(
8550            self,
8551        ) -> impl google_cloud_gax::paginator::ItemPaginator<
8552            google_cloud_longrunning::model::ListOperationsResponse,
8553            crate::Error,
8554        > {
8555            use google_cloud_gax::paginator::Paginator;
8556            self.by_page().items()
8557        }
8558
8559        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
8560        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8561            self.0.request.name = v.into();
8562            self
8563        }
8564
8565        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
8566        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8567            self.0.request.filter = v.into();
8568            self
8569        }
8570
8571        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
8572        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8573            self.0.request.page_size = v.into();
8574            self
8575        }
8576
8577        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
8578        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8579            self.0.request.page_token = v.into();
8580            self
8581        }
8582
8583        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
8584        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
8585            self.0.request.return_partial_success = v.into();
8586            self
8587        }
8588    }
8589
8590    #[doc(hidden)]
8591    impl crate::RequestBuilder for ListOperations {
8592        fn request_options(&mut self) -> &mut crate::RequestOptions {
8593            &mut self.0.options
8594        }
8595    }
8596
8597    /// The request builder for [CmekService::get_operation][crate::client::CmekService::get_operation] calls.
8598    ///
8599    /// # Example
8600    /// ```
8601    /// # use google_cloud_dataplex_v1::builder::cmek_service::GetOperation;
8602    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8603    ///
8604    /// let builder = prepare_request_builder();
8605    /// let response = builder.send().await?;
8606    /// # Ok(()) }
8607    ///
8608    /// fn prepare_request_builder() -> GetOperation {
8609    ///   # panic!();
8610    ///   // ... details omitted ...
8611    /// }
8612    /// ```
8613    #[derive(Clone, Debug)]
8614    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
8615
8616    impl GetOperation {
8617        pub(crate) fn new(
8618            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8619        ) -> Self {
8620            Self(RequestBuilder::new(stub))
8621        }
8622
8623        /// Sets the full request, replacing any prior values.
8624        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
8625            mut self,
8626            v: V,
8627        ) -> Self {
8628            self.0.request = v.into();
8629            self
8630        }
8631
8632        /// Sets all the options, replacing any prior values.
8633        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8634            self.0.options = v.into();
8635            self
8636        }
8637
8638        /// Sends the request.
8639        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8640            (*self.0.stub)
8641                .get_operation(self.0.request, self.0.options)
8642                .await
8643                .map(crate::Response::into_body)
8644        }
8645
8646        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
8647        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8648            self.0.request.name = v.into();
8649            self
8650        }
8651    }
8652
8653    #[doc(hidden)]
8654    impl crate::RequestBuilder for GetOperation {
8655        fn request_options(&mut self) -> &mut crate::RequestOptions {
8656            &mut self.0.options
8657        }
8658    }
8659
8660    /// The request builder for [CmekService::delete_operation][crate::client::CmekService::delete_operation] calls.
8661    ///
8662    /// # Example
8663    /// ```
8664    /// # use google_cloud_dataplex_v1::builder::cmek_service::DeleteOperation;
8665    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8666    ///
8667    /// let builder = prepare_request_builder();
8668    /// let response = builder.send().await?;
8669    /// # Ok(()) }
8670    ///
8671    /// fn prepare_request_builder() -> DeleteOperation {
8672    ///   # panic!();
8673    ///   // ... details omitted ...
8674    /// }
8675    /// ```
8676    #[derive(Clone, Debug)]
8677    pub struct DeleteOperation(
8678        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
8679    );
8680
8681    impl DeleteOperation {
8682        pub(crate) fn new(
8683            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8684        ) -> Self {
8685            Self(RequestBuilder::new(stub))
8686        }
8687
8688        /// Sets the full request, replacing any prior values.
8689        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
8690            mut self,
8691            v: V,
8692        ) -> Self {
8693            self.0.request = v.into();
8694            self
8695        }
8696
8697        /// Sets all the options, replacing any prior values.
8698        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8699            self.0.options = v.into();
8700            self
8701        }
8702
8703        /// Sends the request.
8704        pub async fn send(self) -> Result<()> {
8705            (*self.0.stub)
8706                .delete_operation(self.0.request, self.0.options)
8707                .await
8708                .map(crate::Response::into_body)
8709        }
8710
8711        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
8712        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8713            self.0.request.name = v.into();
8714            self
8715        }
8716    }
8717
8718    #[doc(hidden)]
8719    impl crate::RequestBuilder for DeleteOperation {
8720        fn request_options(&mut self) -> &mut crate::RequestOptions {
8721            &mut self.0.options
8722        }
8723    }
8724
8725    /// The request builder for [CmekService::cancel_operation][crate::client::CmekService::cancel_operation] calls.
8726    ///
8727    /// # Example
8728    /// ```
8729    /// # use google_cloud_dataplex_v1::builder::cmek_service::CancelOperation;
8730    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8731    ///
8732    /// let builder = prepare_request_builder();
8733    /// let response = builder.send().await?;
8734    /// # Ok(()) }
8735    ///
8736    /// fn prepare_request_builder() -> CancelOperation {
8737    ///   # panic!();
8738    ///   // ... details omitted ...
8739    /// }
8740    /// ```
8741    #[derive(Clone, Debug)]
8742    pub struct CancelOperation(
8743        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
8744    );
8745
8746    impl CancelOperation {
8747        pub(crate) fn new(
8748            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8749        ) -> Self {
8750            Self(RequestBuilder::new(stub))
8751        }
8752
8753        /// Sets the full request, replacing any prior values.
8754        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
8755            mut self,
8756            v: V,
8757        ) -> Self {
8758            self.0.request = v.into();
8759            self
8760        }
8761
8762        /// Sets all the options, replacing any prior values.
8763        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8764            self.0.options = v.into();
8765            self
8766        }
8767
8768        /// Sends the request.
8769        pub async fn send(self) -> Result<()> {
8770            (*self.0.stub)
8771                .cancel_operation(self.0.request, self.0.options)
8772                .await
8773                .map(crate::Response::into_body)
8774        }
8775
8776        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
8777        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8778            self.0.request.name = v.into();
8779            self
8780        }
8781    }
8782
8783    #[doc(hidden)]
8784    impl crate::RequestBuilder for CancelOperation {
8785        fn request_options(&mut self) -> &mut crate::RequestOptions {
8786            &mut self.0.options
8787        }
8788    }
8789}
8790
8791/// Request and client builders for [ContentService][crate::client::ContentService].
8792pub mod content_service {
8793    use crate::Result;
8794
8795    /// A builder for [ContentService][crate::client::ContentService].
8796    ///
8797    /// ```
8798    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
8799    /// # use google_cloud_dataplex_v1::*;
8800    /// # use builder::content_service::ClientBuilder;
8801    /// # use client::ContentService;
8802    /// let builder : ClientBuilder = ContentService::builder();
8803    /// let client = builder
8804    ///     .with_endpoint("https://dataplex.googleapis.com")
8805    ///     .build().await?;
8806    /// # Ok(()) }
8807    /// ```
8808    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
8809
8810    pub(crate) mod client {
8811        use super::super::super::client::ContentService;
8812        pub struct Factory;
8813        impl crate::ClientFactory for Factory {
8814            type Client = ContentService;
8815            type Credentials = gaxi::options::Credentials;
8816            async fn build(
8817                self,
8818                config: gaxi::options::ClientConfig,
8819            ) -> crate::ClientBuilderResult<Self::Client> {
8820                Self::Client::new(config).await
8821            }
8822        }
8823    }
8824
8825    /// Common implementation for [crate::client::ContentService] request builders.
8826    #[derive(Clone, Debug)]
8827    pub(crate) struct RequestBuilder<R: std::default::Default> {
8828        stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8829        request: R,
8830        options: crate::RequestOptions,
8831    }
8832
8833    impl<R> RequestBuilder<R>
8834    where
8835        R: std::default::Default,
8836    {
8837        pub(crate) fn new(
8838            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8839        ) -> Self {
8840            Self {
8841                stub,
8842                request: R::default(),
8843                options: crate::RequestOptions::default(),
8844            }
8845        }
8846    }
8847
8848    /// The request builder for [ContentService::list_locations][crate::client::ContentService::list_locations] calls.
8849    ///
8850    /// # Example
8851    /// ```
8852    /// # use google_cloud_dataplex_v1::builder::content_service::ListLocations;
8853    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8854    /// use google_cloud_gax::paginator::ItemPaginator;
8855    ///
8856    /// let builder = prepare_request_builder();
8857    /// let mut items = builder.by_item();
8858    /// while let Some(result) = items.next().await {
8859    ///   let item = result?;
8860    /// }
8861    /// # Ok(()) }
8862    ///
8863    /// fn prepare_request_builder() -> ListLocations {
8864    ///   # panic!();
8865    ///   // ... details omitted ...
8866    /// }
8867    /// ```
8868    #[derive(Clone, Debug)]
8869    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
8870
8871    impl ListLocations {
8872        pub(crate) fn new(
8873            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8874        ) -> Self {
8875            Self(RequestBuilder::new(stub))
8876        }
8877
8878        /// Sets the full request, replacing any prior values.
8879        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
8880            mut self,
8881            v: V,
8882        ) -> Self {
8883            self.0.request = v.into();
8884            self
8885        }
8886
8887        /// Sets all the options, replacing any prior values.
8888        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8889            self.0.options = v.into();
8890            self
8891        }
8892
8893        /// Sends the request.
8894        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
8895            (*self.0.stub)
8896                .list_locations(self.0.request, self.0.options)
8897                .await
8898                .map(crate::Response::into_body)
8899        }
8900
8901        /// Streams each page in the collection.
8902        pub fn by_page(
8903            self,
8904        ) -> impl google_cloud_gax::paginator::Paginator<
8905            google_cloud_location::model::ListLocationsResponse,
8906            crate::Error,
8907        > {
8908            use std::clone::Clone;
8909            let token = self.0.request.page_token.clone();
8910            let execute = move |token: String| {
8911                let mut builder = self.clone();
8912                builder.0.request = builder.0.request.set_page_token(token);
8913                builder.send()
8914            };
8915            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8916        }
8917
8918        /// Streams each item in the collection.
8919        pub fn by_item(
8920            self,
8921        ) -> impl google_cloud_gax::paginator::ItemPaginator<
8922            google_cloud_location::model::ListLocationsResponse,
8923            crate::Error,
8924        > {
8925            use google_cloud_gax::paginator::Paginator;
8926            self.by_page().items()
8927        }
8928
8929        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
8930        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8931            self.0.request.name = v.into();
8932            self
8933        }
8934
8935        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
8936        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8937            self.0.request.filter = v.into();
8938            self
8939        }
8940
8941        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
8942        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8943            self.0.request.page_size = v.into();
8944            self
8945        }
8946
8947        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
8948        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8949            self.0.request.page_token = v.into();
8950            self
8951        }
8952    }
8953
8954    #[doc(hidden)]
8955    impl crate::RequestBuilder for ListLocations {
8956        fn request_options(&mut self) -> &mut crate::RequestOptions {
8957            &mut self.0.options
8958        }
8959    }
8960
8961    /// The request builder for [ContentService::get_location][crate::client::ContentService::get_location] calls.
8962    ///
8963    /// # Example
8964    /// ```
8965    /// # use google_cloud_dataplex_v1::builder::content_service::GetLocation;
8966    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
8967    ///
8968    /// let builder = prepare_request_builder();
8969    /// let response = builder.send().await?;
8970    /// # Ok(()) }
8971    ///
8972    /// fn prepare_request_builder() -> GetLocation {
8973    ///   # panic!();
8974    ///   // ... details omitted ...
8975    /// }
8976    /// ```
8977    #[derive(Clone, Debug)]
8978    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
8979
8980    impl GetLocation {
8981        pub(crate) fn new(
8982            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8983        ) -> Self {
8984            Self(RequestBuilder::new(stub))
8985        }
8986
8987        /// Sets the full request, replacing any prior values.
8988        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
8989            mut self,
8990            v: V,
8991        ) -> Self {
8992            self.0.request = v.into();
8993            self
8994        }
8995
8996        /// Sets all the options, replacing any prior values.
8997        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8998            self.0.options = v.into();
8999            self
9000        }
9001
9002        /// Sends the request.
9003        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
9004            (*self.0.stub)
9005                .get_location(self.0.request, self.0.options)
9006                .await
9007                .map(crate::Response::into_body)
9008        }
9009
9010        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
9011        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9012            self.0.request.name = v.into();
9013            self
9014        }
9015    }
9016
9017    #[doc(hidden)]
9018    impl crate::RequestBuilder for GetLocation {
9019        fn request_options(&mut self) -> &mut crate::RequestOptions {
9020            &mut self.0.options
9021        }
9022    }
9023
9024    /// The request builder for [ContentService::set_iam_policy][crate::client::ContentService::set_iam_policy] calls.
9025    ///
9026    /// # Example
9027    /// ```
9028    /// # use google_cloud_dataplex_v1::builder::content_service::SetIamPolicy;
9029    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9030    ///
9031    /// let builder = prepare_request_builder();
9032    /// let response = builder.send().await?;
9033    /// # Ok(()) }
9034    ///
9035    /// fn prepare_request_builder() -> SetIamPolicy {
9036    ///   # panic!();
9037    ///   // ... details omitted ...
9038    /// }
9039    /// ```
9040    #[derive(Clone, Debug)]
9041    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
9042
9043    impl SetIamPolicy {
9044        pub(crate) fn new(
9045            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9046        ) -> Self {
9047            Self(RequestBuilder::new(stub))
9048        }
9049
9050        /// Sets the full request, replacing any prior values.
9051        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
9052            mut self,
9053            v: V,
9054        ) -> Self {
9055            self.0.request = v.into();
9056            self
9057        }
9058
9059        /// Sets all the options, replacing any prior values.
9060        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9061            self.0.options = v.into();
9062            self
9063        }
9064
9065        /// Sends the request.
9066        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
9067            (*self.0.stub)
9068                .set_iam_policy(self.0.request, self.0.options)
9069                .await
9070                .map(crate::Response::into_body)
9071        }
9072
9073        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
9074        ///
9075        /// This is a **required** field for requests.
9076        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
9077            self.0.request.resource = v.into();
9078            self
9079        }
9080
9081        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
9082        ///
9083        /// This is a **required** field for requests.
9084        pub fn set_policy<T>(mut self, v: T) -> Self
9085        where
9086            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
9087        {
9088            self.0.request.policy = std::option::Option::Some(v.into());
9089            self
9090        }
9091
9092        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
9093        ///
9094        /// This is a **required** field for requests.
9095        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
9096        where
9097            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
9098        {
9099            self.0.request.policy = v.map(|x| x.into());
9100            self
9101        }
9102
9103        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
9104        pub fn set_update_mask<T>(mut self, v: T) -> Self
9105        where
9106            T: std::convert::Into<wkt::FieldMask>,
9107        {
9108            self.0.request.update_mask = std::option::Option::Some(v.into());
9109            self
9110        }
9111
9112        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
9113        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9114        where
9115            T: std::convert::Into<wkt::FieldMask>,
9116        {
9117            self.0.request.update_mask = v.map(|x| x.into());
9118            self
9119        }
9120    }
9121
9122    #[doc(hidden)]
9123    impl crate::RequestBuilder for SetIamPolicy {
9124        fn request_options(&mut self) -> &mut crate::RequestOptions {
9125            &mut self.0.options
9126        }
9127    }
9128
9129    /// The request builder for [ContentService::get_iam_policy][crate::client::ContentService::get_iam_policy] calls.
9130    ///
9131    /// # Example
9132    /// ```
9133    /// # use google_cloud_dataplex_v1::builder::content_service::GetIamPolicy;
9134    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9135    ///
9136    /// let builder = prepare_request_builder();
9137    /// let response = builder.send().await?;
9138    /// # Ok(()) }
9139    ///
9140    /// fn prepare_request_builder() -> GetIamPolicy {
9141    ///   # panic!();
9142    ///   // ... details omitted ...
9143    /// }
9144    /// ```
9145    #[derive(Clone, Debug)]
9146    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
9147
9148    impl GetIamPolicy {
9149        pub(crate) fn new(
9150            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9151        ) -> Self {
9152            Self(RequestBuilder::new(stub))
9153        }
9154
9155        /// Sets the full request, replacing any prior values.
9156        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
9157            mut self,
9158            v: V,
9159        ) -> Self {
9160            self.0.request = v.into();
9161            self
9162        }
9163
9164        /// Sets all the options, replacing any prior values.
9165        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9166            self.0.options = v.into();
9167            self
9168        }
9169
9170        /// Sends the request.
9171        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
9172            (*self.0.stub)
9173                .get_iam_policy(self.0.request, self.0.options)
9174                .await
9175                .map(crate::Response::into_body)
9176        }
9177
9178        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
9179        ///
9180        /// This is a **required** field for requests.
9181        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
9182            self.0.request.resource = v.into();
9183            self
9184        }
9185
9186        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
9187        pub fn set_options<T>(mut self, v: T) -> Self
9188        where
9189            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
9190        {
9191            self.0.request.options = std::option::Option::Some(v.into());
9192            self
9193        }
9194
9195        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
9196        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
9197        where
9198            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
9199        {
9200            self.0.request.options = v.map(|x| x.into());
9201            self
9202        }
9203    }
9204
9205    #[doc(hidden)]
9206    impl crate::RequestBuilder for GetIamPolicy {
9207        fn request_options(&mut self) -> &mut crate::RequestOptions {
9208            &mut self.0.options
9209        }
9210    }
9211
9212    /// The request builder for [ContentService::test_iam_permissions][crate::client::ContentService::test_iam_permissions] calls.
9213    ///
9214    /// # Example
9215    /// ```
9216    /// # use google_cloud_dataplex_v1::builder::content_service::TestIamPermissions;
9217    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9218    ///
9219    /// let builder = prepare_request_builder();
9220    /// let response = builder.send().await?;
9221    /// # Ok(()) }
9222    ///
9223    /// fn prepare_request_builder() -> TestIamPermissions {
9224    ///   # panic!();
9225    ///   // ... details omitted ...
9226    /// }
9227    /// ```
9228    #[derive(Clone, Debug)]
9229    pub struct TestIamPermissions(
9230        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
9231    );
9232
9233    impl TestIamPermissions {
9234        pub(crate) fn new(
9235            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9236        ) -> Self {
9237            Self(RequestBuilder::new(stub))
9238        }
9239
9240        /// Sets the full request, replacing any prior values.
9241        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
9242            mut self,
9243            v: V,
9244        ) -> Self {
9245            self.0.request = v.into();
9246            self
9247        }
9248
9249        /// Sets all the options, replacing any prior values.
9250        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9251            self.0.options = v.into();
9252            self
9253        }
9254
9255        /// Sends the request.
9256        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
9257            (*self.0.stub)
9258                .test_iam_permissions(self.0.request, self.0.options)
9259                .await
9260                .map(crate::Response::into_body)
9261        }
9262
9263        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
9264        ///
9265        /// This is a **required** field for requests.
9266        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
9267            self.0.request.resource = v.into();
9268            self
9269        }
9270
9271        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
9272        ///
9273        /// This is a **required** field for requests.
9274        pub fn set_permissions<T, V>(mut self, v: T) -> Self
9275        where
9276            T: std::iter::IntoIterator<Item = V>,
9277            V: std::convert::Into<std::string::String>,
9278        {
9279            use std::iter::Iterator;
9280            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
9281            self
9282        }
9283    }
9284
9285    #[doc(hidden)]
9286    impl crate::RequestBuilder for TestIamPermissions {
9287        fn request_options(&mut self) -> &mut crate::RequestOptions {
9288            &mut self.0.options
9289        }
9290    }
9291
9292    /// The request builder for [ContentService::list_operations][crate::client::ContentService::list_operations] calls.
9293    ///
9294    /// # Example
9295    /// ```
9296    /// # use google_cloud_dataplex_v1::builder::content_service::ListOperations;
9297    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9298    /// use google_cloud_gax::paginator::ItemPaginator;
9299    ///
9300    /// let builder = prepare_request_builder();
9301    /// let mut items = builder.by_item();
9302    /// while let Some(result) = items.next().await {
9303    ///   let item = result?;
9304    /// }
9305    /// # Ok(()) }
9306    ///
9307    /// fn prepare_request_builder() -> ListOperations {
9308    ///   # panic!();
9309    ///   // ... details omitted ...
9310    /// }
9311    /// ```
9312    #[derive(Clone, Debug)]
9313    pub struct ListOperations(
9314        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
9315    );
9316
9317    impl ListOperations {
9318        pub(crate) fn new(
9319            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9320        ) -> Self {
9321            Self(RequestBuilder::new(stub))
9322        }
9323
9324        /// Sets the full request, replacing any prior values.
9325        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
9326            mut self,
9327            v: V,
9328        ) -> Self {
9329            self.0.request = v.into();
9330            self
9331        }
9332
9333        /// Sets all the options, replacing any prior values.
9334        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9335            self.0.options = v.into();
9336            self
9337        }
9338
9339        /// Sends the request.
9340        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
9341            (*self.0.stub)
9342                .list_operations(self.0.request, self.0.options)
9343                .await
9344                .map(crate::Response::into_body)
9345        }
9346
9347        /// Streams each page in the collection.
9348        pub fn by_page(
9349            self,
9350        ) -> impl google_cloud_gax::paginator::Paginator<
9351            google_cloud_longrunning::model::ListOperationsResponse,
9352            crate::Error,
9353        > {
9354            use std::clone::Clone;
9355            let token = self.0.request.page_token.clone();
9356            let execute = move |token: String| {
9357                let mut builder = self.clone();
9358                builder.0.request = builder.0.request.set_page_token(token);
9359                builder.send()
9360            };
9361            google_cloud_gax::paginator::internal::new_paginator(token, execute)
9362        }
9363
9364        /// Streams each item in the collection.
9365        pub fn by_item(
9366            self,
9367        ) -> impl google_cloud_gax::paginator::ItemPaginator<
9368            google_cloud_longrunning::model::ListOperationsResponse,
9369            crate::Error,
9370        > {
9371            use google_cloud_gax::paginator::Paginator;
9372            self.by_page().items()
9373        }
9374
9375        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
9376        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9377            self.0.request.name = v.into();
9378            self
9379        }
9380
9381        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
9382        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9383            self.0.request.filter = v.into();
9384            self
9385        }
9386
9387        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
9388        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9389            self.0.request.page_size = v.into();
9390            self
9391        }
9392
9393        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
9394        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9395            self.0.request.page_token = v.into();
9396            self
9397        }
9398
9399        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
9400        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
9401            self.0.request.return_partial_success = v.into();
9402            self
9403        }
9404    }
9405
9406    #[doc(hidden)]
9407    impl crate::RequestBuilder for ListOperations {
9408        fn request_options(&mut self) -> &mut crate::RequestOptions {
9409            &mut self.0.options
9410        }
9411    }
9412
9413    /// The request builder for [ContentService::get_operation][crate::client::ContentService::get_operation] calls.
9414    ///
9415    /// # Example
9416    /// ```
9417    /// # use google_cloud_dataplex_v1::builder::content_service::GetOperation;
9418    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9419    ///
9420    /// let builder = prepare_request_builder();
9421    /// let response = builder.send().await?;
9422    /// # Ok(()) }
9423    ///
9424    /// fn prepare_request_builder() -> GetOperation {
9425    ///   # panic!();
9426    ///   // ... details omitted ...
9427    /// }
9428    /// ```
9429    #[derive(Clone, Debug)]
9430    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
9431
9432    impl GetOperation {
9433        pub(crate) fn new(
9434            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9435        ) -> Self {
9436            Self(RequestBuilder::new(stub))
9437        }
9438
9439        /// Sets the full request, replacing any prior values.
9440        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
9441            mut self,
9442            v: V,
9443        ) -> Self {
9444            self.0.request = v.into();
9445            self
9446        }
9447
9448        /// Sets all the options, replacing any prior values.
9449        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9450            self.0.options = v.into();
9451            self
9452        }
9453
9454        /// Sends the request.
9455        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9456            (*self.0.stub)
9457                .get_operation(self.0.request, self.0.options)
9458                .await
9459                .map(crate::Response::into_body)
9460        }
9461
9462        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
9463        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9464            self.0.request.name = v.into();
9465            self
9466        }
9467    }
9468
9469    #[doc(hidden)]
9470    impl crate::RequestBuilder for GetOperation {
9471        fn request_options(&mut self) -> &mut crate::RequestOptions {
9472            &mut self.0.options
9473        }
9474    }
9475
9476    /// The request builder for [ContentService::delete_operation][crate::client::ContentService::delete_operation] calls.
9477    ///
9478    /// # Example
9479    /// ```
9480    /// # use google_cloud_dataplex_v1::builder::content_service::DeleteOperation;
9481    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9482    ///
9483    /// let builder = prepare_request_builder();
9484    /// let response = builder.send().await?;
9485    /// # Ok(()) }
9486    ///
9487    /// fn prepare_request_builder() -> DeleteOperation {
9488    ///   # panic!();
9489    ///   // ... details omitted ...
9490    /// }
9491    /// ```
9492    #[derive(Clone, Debug)]
9493    pub struct DeleteOperation(
9494        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
9495    );
9496
9497    impl DeleteOperation {
9498        pub(crate) fn new(
9499            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9500        ) -> Self {
9501            Self(RequestBuilder::new(stub))
9502        }
9503
9504        /// Sets the full request, replacing any prior values.
9505        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
9506            mut self,
9507            v: V,
9508        ) -> Self {
9509            self.0.request = v.into();
9510            self
9511        }
9512
9513        /// Sets all the options, replacing any prior values.
9514        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9515            self.0.options = v.into();
9516            self
9517        }
9518
9519        /// Sends the request.
9520        pub async fn send(self) -> Result<()> {
9521            (*self.0.stub)
9522                .delete_operation(self.0.request, self.0.options)
9523                .await
9524                .map(crate::Response::into_body)
9525        }
9526
9527        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
9528        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9529            self.0.request.name = v.into();
9530            self
9531        }
9532    }
9533
9534    #[doc(hidden)]
9535    impl crate::RequestBuilder for DeleteOperation {
9536        fn request_options(&mut self) -> &mut crate::RequestOptions {
9537            &mut self.0.options
9538        }
9539    }
9540
9541    /// The request builder for [ContentService::cancel_operation][crate::client::ContentService::cancel_operation] calls.
9542    ///
9543    /// # Example
9544    /// ```
9545    /// # use google_cloud_dataplex_v1::builder::content_service::CancelOperation;
9546    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9547    ///
9548    /// let builder = prepare_request_builder();
9549    /// let response = builder.send().await?;
9550    /// # Ok(()) }
9551    ///
9552    /// fn prepare_request_builder() -> CancelOperation {
9553    ///   # panic!();
9554    ///   // ... details omitted ...
9555    /// }
9556    /// ```
9557    #[derive(Clone, Debug)]
9558    pub struct CancelOperation(
9559        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
9560    );
9561
9562    impl CancelOperation {
9563        pub(crate) fn new(
9564            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9565        ) -> Self {
9566            Self(RequestBuilder::new(stub))
9567        }
9568
9569        /// Sets the full request, replacing any prior values.
9570        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
9571            mut self,
9572            v: V,
9573        ) -> Self {
9574            self.0.request = v.into();
9575            self
9576        }
9577
9578        /// Sets all the options, replacing any prior values.
9579        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9580            self.0.options = v.into();
9581            self
9582        }
9583
9584        /// Sends the request.
9585        pub async fn send(self) -> Result<()> {
9586            (*self.0.stub)
9587                .cancel_operation(self.0.request, self.0.options)
9588                .await
9589                .map(crate::Response::into_body)
9590        }
9591
9592        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
9593        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9594            self.0.request.name = v.into();
9595            self
9596        }
9597    }
9598
9599    #[doc(hidden)]
9600    impl crate::RequestBuilder for CancelOperation {
9601        fn request_options(&mut self) -> &mut crate::RequestOptions {
9602            &mut self.0.options
9603        }
9604    }
9605}
9606
9607/// Request and client builders for [DataProductService][crate::client::DataProductService].
9608pub mod data_product_service {
9609    use crate::Result;
9610
9611    /// A builder for [DataProductService][crate::client::DataProductService].
9612    ///
9613    /// ```
9614    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
9615    /// # use google_cloud_dataplex_v1::*;
9616    /// # use builder::data_product_service::ClientBuilder;
9617    /// # use client::DataProductService;
9618    /// let builder : ClientBuilder = DataProductService::builder();
9619    /// let client = builder
9620    ///     .with_endpoint("https://dataplex.googleapis.com")
9621    ///     .build().await?;
9622    /// # Ok(()) }
9623    /// ```
9624    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
9625
9626    pub(crate) mod client {
9627        use super::super::super::client::DataProductService;
9628        pub struct Factory;
9629        impl crate::ClientFactory for Factory {
9630            type Client = DataProductService;
9631            type Credentials = gaxi::options::Credentials;
9632            async fn build(
9633                self,
9634                config: gaxi::options::ClientConfig,
9635            ) -> crate::ClientBuilderResult<Self::Client> {
9636                Self::Client::new(config).await
9637            }
9638        }
9639    }
9640
9641    /// Common implementation for [crate::client::DataProductService] request builders.
9642    #[derive(Clone, Debug)]
9643    pub(crate) struct RequestBuilder<R: std::default::Default> {
9644        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9645        request: R,
9646        options: crate::RequestOptions,
9647    }
9648
9649    impl<R> RequestBuilder<R>
9650    where
9651        R: std::default::Default,
9652    {
9653        pub(crate) fn new(
9654            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9655        ) -> Self {
9656            Self {
9657                stub,
9658                request: R::default(),
9659                options: crate::RequestOptions::default(),
9660            }
9661        }
9662    }
9663
9664    /// The request builder for [DataProductService::create_data_product][crate::client::DataProductService::create_data_product] calls.
9665    ///
9666    /// # Example
9667    /// ```
9668    /// # use google_cloud_dataplex_v1::builder::data_product_service::CreateDataProduct;
9669    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9670    /// use google_cloud_lro::Poller;
9671    ///
9672    /// let builder = prepare_request_builder();
9673    /// let response = builder.poller().until_done().await?;
9674    /// # Ok(()) }
9675    ///
9676    /// fn prepare_request_builder() -> CreateDataProduct {
9677    ///   # panic!();
9678    ///   // ... details omitted ...
9679    /// }
9680    /// ```
9681    #[derive(Clone, Debug)]
9682    pub struct CreateDataProduct(RequestBuilder<crate::model::CreateDataProductRequest>);
9683
9684    impl CreateDataProduct {
9685        pub(crate) fn new(
9686            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9687        ) -> Self {
9688            Self(RequestBuilder::new(stub))
9689        }
9690
9691        /// Sets the full request, replacing any prior values.
9692        pub fn with_request<V: Into<crate::model::CreateDataProductRequest>>(
9693            mut self,
9694            v: V,
9695        ) -> Self {
9696            self.0.request = v.into();
9697            self
9698        }
9699
9700        /// Sets all the options, replacing any prior values.
9701        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9702            self.0.options = v.into();
9703            self
9704        }
9705
9706        /// Sends the request.
9707        ///
9708        /// # Long running operations
9709        ///
9710        /// This starts, but does not poll, a longrunning operation. More information
9711        /// on [create_data_product][crate::client::DataProductService::create_data_product].
9712        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9713            (*self.0.stub)
9714                .create_data_product(self.0.request, self.0.options)
9715                .await
9716                .map(crate::Response::into_body)
9717        }
9718
9719        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_product`.
9720        pub fn poller(
9721            self,
9722        ) -> impl google_cloud_lro::Poller<crate::model::DataProduct, crate::model::OperationMetadata>
9723        {
9724            type Operation = google_cloud_lro::internal::Operation<
9725                crate::model::DataProduct,
9726                crate::model::OperationMetadata,
9727            >;
9728            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9729            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9730            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
9731            if let Some(ref mut details) = poller_options.tracing {
9732                details.method_name = "google_cloud_dataplex_v1::client::DataProductService::create_data_product::until_done";
9733            }
9734
9735            let stub = self.0.stub.clone();
9736            let mut options = self.0.options.clone();
9737            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
9738            let query = move |name| {
9739                let stub = stub.clone();
9740                let options = options.clone();
9741                async {
9742                    let op = GetOperation::new(stub)
9743                        .set_name(name)
9744                        .with_options(options)
9745                        .send()
9746                        .await?;
9747                    Ok(Operation::new(op))
9748                }
9749            };
9750
9751            let start = move || async {
9752                let op = self.send().await?;
9753                Ok(Operation::new(op))
9754            };
9755
9756            use google_cloud_lro::internal::PollerExt;
9757            {
9758                google_cloud_lro::internal::new_poller(
9759                    polling_error_policy,
9760                    polling_backoff_policy,
9761                    start,
9762                    query,
9763                )
9764            }
9765            .with_options(poller_options)
9766        }
9767
9768        /// Sets the value of [parent][crate::model::CreateDataProductRequest::parent].
9769        ///
9770        /// This is a **required** field for requests.
9771        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9772            self.0.request.parent = v.into();
9773            self
9774        }
9775
9776        /// Sets the value of [data_product_id][crate::model::CreateDataProductRequest::data_product_id].
9777        pub fn set_data_product_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
9778            self.0.request.data_product_id = v.into();
9779            self
9780        }
9781
9782        /// Sets the value of [data_product][crate::model::CreateDataProductRequest::data_product].
9783        ///
9784        /// This is a **required** field for requests.
9785        pub fn set_data_product<T>(mut self, v: T) -> Self
9786        where
9787            T: std::convert::Into<crate::model::DataProduct>,
9788        {
9789            self.0.request.data_product = std::option::Option::Some(v.into());
9790            self
9791        }
9792
9793        /// Sets or clears the value of [data_product][crate::model::CreateDataProductRequest::data_product].
9794        ///
9795        /// This is a **required** field for requests.
9796        pub fn set_or_clear_data_product<T>(mut self, v: std::option::Option<T>) -> Self
9797        where
9798            T: std::convert::Into<crate::model::DataProduct>,
9799        {
9800            self.0.request.data_product = v.map(|x| x.into());
9801            self
9802        }
9803
9804        /// Sets the value of [validate_only][crate::model::CreateDataProductRequest::validate_only].
9805        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9806            self.0.request.validate_only = v.into();
9807            self
9808        }
9809    }
9810
9811    #[doc(hidden)]
9812    impl crate::RequestBuilder for CreateDataProduct {
9813        fn request_options(&mut self) -> &mut crate::RequestOptions {
9814            &mut self.0.options
9815        }
9816    }
9817
9818    /// The request builder for [DataProductService::delete_data_product][crate::client::DataProductService::delete_data_product] calls.
9819    ///
9820    /// # Example
9821    /// ```
9822    /// # use google_cloud_dataplex_v1::builder::data_product_service::DeleteDataProduct;
9823    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9824    /// use google_cloud_lro::Poller;
9825    ///
9826    /// let builder = prepare_request_builder();
9827    /// let response = builder.poller().until_done().await?;
9828    /// # Ok(()) }
9829    ///
9830    /// fn prepare_request_builder() -> DeleteDataProduct {
9831    ///   # panic!();
9832    ///   // ... details omitted ...
9833    /// }
9834    /// ```
9835    #[derive(Clone, Debug)]
9836    pub struct DeleteDataProduct(RequestBuilder<crate::model::DeleteDataProductRequest>);
9837
9838    impl DeleteDataProduct {
9839        pub(crate) fn new(
9840            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9841        ) -> Self {
9842            Self(RequestBuilder::new(stub))
9843        }
9844
9845        /// Sets the full request, replacing any prior values.
9846        pub fn with_request<V: Into<crate::model::DeleteDataProductRequest>>(
9847            mut self,
9848            v: V,
9849        ) -> Self {
9850            self.0.request = v.into();
9851            self
9852        }
9853
9854        /// Sets all the options, replacing any prior values.
9855        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9856            self.0.options = v.into();
9857            self
9858        }
9859
9860        /// Sends the request.
9861        ///
9862        /// # Long running operations
9863        ///
9864        /// This starts, but does not poll, a longrunning operation. More information
9865        /// on [delete_data_product][crate::client::DataProductService::delete_data_product].
9866        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9867            (*self.0.stub)
9868                .delete_data_product(self.0.request, self.0.options)
9869                .await
9870                .map(crate::Response::into_body)
9871        }
9872
9873        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_product`.
9874        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
9875            type Operation =
9876                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
9877            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9878            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9879            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
9880            if let Some(ref mut details) = poller_options.tracing {
9881                details.method_name = "google_cloud_dataplex_v1::client::DataProductService::delete_data_product::until_done";
9882            }
9883
9884            let stub = self.0.stub.clone();
9885            let mut options = self.0.options.clone();
9886            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
9887            let query = move |name| {
9888                let stub = stub.clone();
9889                let options = options.clone();
9890                async {
9891                    let op = GetOperation::new(stub)
9892                        .set_name(name)
9893                        .with_options(options)
9894                        .send()
9895                        .await?;
9896                    Ok(Operation::new(op))
9897                }
9898            };
9899
9900            let start = move || async {
9901                let op = self.send().await?;
9902                Ok(Operation::new(op))
9903            };
9904
9905            use google_cloud_lro::internal::PollerExt;
9906            {
9907                google_cloud_lro::internal::new_unit_response_poller(
9908                    polling_error_policy,
9909                    polling_backoff_policy,
9910                    start,
9911                    query,
9912                )
9913            }
9914            .with_options(poller_options)
9915        }
9916
9917        /// Sets the value of [name][crate::model::DeleteDataProductRequest::name].
9918        ///
9919        /// This is a **required** field for requests.
9920        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9921            self.0.request.name = v.into();
9922            self
9923        }
9924
9925        /// Sets the value of [etag][crate::model::DeleteDataProductRequest::etag].
9926        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
9927            self.0.request.etag = v.into();
9928            self
9929        }
9930
9931        /// Sets the value of [validate_only][crate::model::DeleteDataProductRequest::validate_only].
9932        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9933            self.0.request.validate_only = v.into();
9934            self
9935        }
9936    }
9937
9938    #[doc(hidden)]
9939    impl crate::RequestBuilder for DeleteDataProduct {
9940        fn request_options(&mut self) -> &mut crate::RequestOptions {
9941            &mut self.0.options
9942        }
9943    }
9944
9945    /// The request builder for [DataProductService::get_data_product][crate::client::DataProductService::get_data_product] calls.
9946    ///
9947    /// # Example
9948    /// ```
9949    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetDataProduct;
9950    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
9951    ///
9952    /// let builder = prepare_request_builder();
9953    /// let response = builder.send().await?;
9954    /// # Ok(()) }
9955    ///
9956    /// fn prepare_request_builder() -> GetDataProduct {
9957    ///   # panic!();
9958    ///   // ... details omitted ...
9959    /// }
9960    /// ```
9961    #[derive(Clone, Debug)]
9962    pub struct GetDataProduct(RequestBuilder<crate::model::GetDataProductRequest>);
9963
9964    impl GetDataProduct {
9965        pub(crate) fn new(
9966            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9967        ) -> Self {
9968            Self(RequestBuilder::new(stub))
9969        }
9970
9971        /// Sets the full request, replacing any prior values.
9972        pub fn with_request<V: Into<crate::model::GetDataProductRequest>>(mut self, v: V) -> Self {
9973            self.0.request = v.into();
9974            self
9975        }
9976
9977        /// Sets all the options, replacing any prior values.
9978        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9979            self.0.options = v.into();
9980            self
9981        }
9982
9983        /// Sends the request.
9984        pub async fn send(self) -> Result<crate::model::DataProduct> {
9985            (*self.0.stub)
9986                .get_data_product(self.0.request, self.0.options)
9987                .await
9988                .map(crate::Response::into_body)
9989        }
9990
9991        /// Sets the value of [name][crate::model::GetDataProductRequest::name].
9992        ///
9993        /// This is a **required** field for requests.
9994        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9995            self.0.request.name = v.into();
9996            self
9997        }
9998    }
9999
10000    #[doc(hidden)]
10001    impl crate::RequestBuilder for GetDataProduct {
10002        fn request_options(&mut self) -> &mut crate::RequestOptions {
10003            &mut self.0.options
10004        }
10005    }
10006
10007    /// The request builder for [DataProductService::list_data_products][crate::client::DataProductService::list_data_products] calls.
10008    ///
10009    /// # Example
10010    /// ```
10011    /// # use google_cloud_dataplex_v1::builder::data_product_service::ListDataProducts;
10012    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10013    /// use google_cloud_gax::paginator::ItemPaginator;
10014    ///
10015    /// let builder = prepare_request_builder();
10016    /// let mut items = builder.by_item();
10017    /// while let Some(result) = items.next().await {
10018    ///   let item = result?;
10019    /// }
10020    /// # Ok(()) }
10021    ///
10022    /// fn prepare_request_builder() -> ListDataProducts {
10023    ///   # panic!();
10024    ///   // ... details omitted ...
10025    /// }
10026    /// ```
10027    #[derive(Clone, Debug)]
10028    pub struct ListDataProducts(RequestBuilder<crate::model::ListDataProductsRequest>);
10029
10030    impl ListDataProducts {
10031        pub(crate) fn new(
10032            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10033        ) -> Self {
10034            Self(RequestBuilder::new(stub))
10035        }
10036
10037        /// Sets the full request, replacing any prior values.
10038        pub fn with_request<V: Into<crate::model::ListDataProductsRequest>>(
10039            mut self,
10040            v: V,
10041        ) -> Self {
10042            self.0.request = v.into();
10043            self
10044        }
10045
10046        /// Sets all the options, replacing any prior values.
10047        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10048            self.0.options = v.into();
10049            self
10050        }
10051
10052        /// Sends the request.
10053        pub async fn send(self) -> Result<crate::model::ListDataProductsResponse> {
10054            (*self.0.stub)
10055                .list_data_products(self.0.request, self.0.options)
10056                .await
10057                .map(crate::Response::into_body)
10058        }
10059
10060        /// Streams each page in the collection.
10061        pub fn by_page(
10062            self,
10063        ) -> impl google_cloud_gax::paginator::Paginator<
10064            crate::model::ListDataProductsResponse,
10065            crate::Error,
10066        > {
10067            use std::clone::Clone;
10068            let token = self.0.request.page_token.clone();
10069            let execute = move |token: String| {
10070                let mut builder = self.clone();
10071                builder.0.request = builder.0.request.set_page_token(token);
10072                builder.send()
10073            };
10074            google_cloud_gax::paginator::internal::new_paginator(token, execute)
10075        }
10076
10077        /// Streams each item in the collection.
10078        pub fn by_item(
10079            self,
10080        ) -> impl google_cloud_gax::paginator::ItemPaginator<
10081            crate::model::ListDataProductsResponse,
10082            crate::Error,
10083        > {
10084            use google_cloud_gax::paginator::Paginator;
10085            self.by_page().items()
10086        }
10087
10088        /// Sets the value of [parent][crate::model::ListDataProductsRequest::parent].
10089        ///
10090        /// This is a **required** field for requests.
10091        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10092            self.0.request.parent = v.into();
10093            self
10094        }
10095
10096        /// Sets the value of [filter][crate::model::ListDataProductsRequest::filter].
10097        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10098            self.0.request.filter = v.into();
10099            self
10100        }
10101
10102        /// Sets the value of [page_size][crate::model::ListDataProductsRequest::page_size].
10103        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10104            self.0.request.page_size = v.into();
10105            self
10106        }
10107
10108        /// Sets the value of [page_token][crate::model::ListDataProductsRequest::page_token].
10109        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10110            self.0.request.page_token = v.into();
10111            self
10112        }
10113
10114        /// Sets the value of [order_by][crate::model::ListDataProductsRequest::order_by].
10115        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
10116            self.0.request.order_by = v.into();
10117            self
10118        }
10119    }
10120
10121    #[doc(hidden)]
10122    impl crate::RequestBuilder for ListDataProducts {
10123        fn request_options(&mut self) -> &mut crate::RequestOptions {
10124            &mut self.0.options
10125        }
10126    }
10127
10128    /// The request builder for [DataProductService::update_data_product][crate::client::DataProductService::update_data_product] calls.
10129    ///
10130    /// # Example
10131    /// ```
10132    /// # use google_cloud_dataplex_v1::builder::data_product_service::UpdateDataProduct;
10133    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10134    /// use google_cloud_lro::Poller;
10135    ///
10136    /// let builder = prepare_request_builder();
10137    /// let response = builder.poller().until_done().await?;
10138    /// # Ok(()) }
10139    ///
10140    /// fn prepare_request_builder() -> UpdateDataProduct {
10141    ///   # panic!();
10142    ///   // ... details omitted ...
10143    /// }
10144    /// ```
10145    #[derive(Clone, Debug)]
10146    pub struct UpdateDataProduct(RequestBuilder<crate::model::UpdateDataProductRequest>);
10147
10148    impl UpdateDataProduct {
10149        pub(crate) fn new(
10150            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10151        ) -> Self {
10152            Self(RequestBuilder::new(stub))
10153        }
10154
10155        /// Sets the full request, replacing any prior values.
10156        pub fn with_request<V: Into<crate::model::UpdateDataProductRequest>>(
10157            mut self,
10158            v: V,
10159        ) -> Self {
10160            self.0.request = v.into();
10161            self
10162        }
10163
10164        /// Sets all the options, replacing any prior values.
10165        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10166            self.0.options = v.into();
10167            self
10168        }
10169
10170        /// Sends the request.
10171        ///
10172        /// # Long running operations
10173        ///
10174        /// This starts, but does not poll, a longrunning operation. More information
10175        /// on [update_data_product][crate::client::DataProductService::update_data_product].
10176        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10177            (*self.0.stub)
10178                .update_data_product(self.0.request, self.0.options)
10179                .await
10180                .map(crate::Response::into_body)
10181        }
10182
10183        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_product`.
10184        pub fn poller(
10185            self,
10186        ) -> impl google_cloud_lro::Poller<crate::model::DataProduct, crate::model::OperationMetadata>
10187        {
10188            type Operation = google_cloud_lro::internal::Operation<
10189                crate::model::DataProduct,
10190                crate::model::OperationMetadata,
10191            >;
10192            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10193            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10194            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
10195            if let Some(ref mut details) = poller_options.tracing {
10196                details.method_name = "google_cloud_dataplex_v1::client::DataProductService::update_data_product::until_done";
10197            }
10198
10199            let stub = self.0.stub.clone();
10200            let mut options = self.0.options.clone();
10201            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10202            let query = move |name| {
10203                let stub = stub.clone();
10204                let options = options.clone();
10205                async {
10206                    let op = GetOperation::new(stub)
10207                        .set_name(name)
10208                        .with_options(options)
10209                        .send()
10210                        .await?;
10211                    Ok(Operation::new(op))
10212                }
10213            };
10214
10215            let start = move || async {
10216                let op = self.send().await?;
10217                Ok(Operation::new(op))
10218            };
10219
10220            use google_cloud_lro::internal::PollerExt;
10221            {
10222                google_cloud_lro::internal::new_poller(
10223                    polling_error_policy,
10224                    polling_backoff_policy,
10225                    start,
10226                    query,
10227                )
10228            }
10229            .with_options(poller_options)
10230        }
10231
10232        /// Sets the value of [data_product][crate::model::UpdateDataProductRequest::data_product].
10233        ///
10234        /// This is a **required** field for requests.
10235        pub fn set_data_product<T>(mut self, v: T) -> Self
10236        where
10237            T: std::convert::Into<crate::model::DataProduct>,
10238        {
10239            self.0.request.data_product = std::option::Option::Some(v.into());
10240            self
10241        }
10242
10243        /// Sets or clears the value of [data_product][crate::model::UpdateDataProductRequest::data_product].
10244        ///
10245        /// This is a **required** field for requests.
10246        pub fn set_or_clear_data_product<T>(mut self, v: std::option::Option<T>) -> Self
10247        where
10248            T: std::convert::Into<crate::model::DataProduct>,
10249        {
10250            self.0.request.data_product = v.map(|x| x.into());
10251            self
10252        }
10253
10254        /// Sets the value of [update_mask][crate::model::UpdateDataProductRequest::update_mask].
10255        pub fn set_update_mask<T>(mut self, v: T) -> Self
10256        where
10257            T: std::convert::Into<wkt::FieldMask>,
10258        {
10259            self.0.request.update_mask = std::option::Option::Some(v.into());
10260            self
10261        }
10262
10263        /// Sets or clears the value of [update_mask][crate::model::UpdateDataProductRequest::update_mask].
10264        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10265        where
10266            T: std::convert::Into<wkt::FieldMask>,
10267        {
10268            self.0.request.update_mask = v.map(|x| x.into());
10269            self
10270        }
10271
10272        /// Sets the value of [validate_only][crate::model::UpdateDataProductRequest::validate_only].
10273        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10274            self.0.request.validate_only = v.into();
10275            self
10276        }
10277    }
10278
10279    #[doc(hidden)]
10280    impl crate::RequestBuilder for UpdateDataProduct {
10281        fn request_options(&mut self) -> &mut crate::RequestOptions {
10282            &mut self.0.options
10283        }
10284    }
10285
10286    /// The request builder for [DataProductService::request_data_product_access][crate::client::DataProductService::request_data_product_access] calls.
10287    ///
10288    /// # Example
10289    /// ```
10290    /// # use google_cloud_dataplex_v1::builder::data_product_service::RequestDataProductAccess;
10291    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10292    ///
10293    /// let builder = prepare_request_builder();
10294    /// let response = builder.send().await?;
10295    /// # Ok(()) }
10296    ///
10297    /// fn prepare_request_builder() -> RequestDataProductAccess {
10298    ///   # panic!();
10299    ///   // ... details omitted ...
10300    /// }
10301    /// ```
10302    #[derive(Clone, Debug)]
10303    pub struct RequestDataProductAccess(
10304        RequestBuilder<crate::model::RequestDataProductAccessRequest>,
10305    );
10306
10307    impl RequestDataProductAccess {
10308        pub(crate) fn new(
10309            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10310        ) -> Self {
10311            Self(RequestBuilder::new(stub))
10312        }
10313
10314        /// Sets the full request, replacing any prior values.
10315        pub fn with_request<V: Into<crate::model::RequestDataProductAccessRequest>>(
10316            mut self,
10317            v: V,
10318        ) -> Self {
10319            self.0.request = v.into();
10320            self
10321        }
10322
10323        /// Sets all the options, replacing any prior values.
10324        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10325            self.0.options = v.into();
10326            self
10327        }
10328
10329        /// Sends the request.
10330        pub async fn send(self) -> Result<crate::model::RequestDataProductAccessResponse> {
10331            (*self.0.stub)
10332                .request_data_product_access(self.0.request, self.0.options)
10333                .await
10334                .map(crate::Response::into_body)
10335        }
10336
10337        /// Sets the value of [parent][crate::model::RequestDataProductAccessRequest::parent].
10338        ///
10339        /// This is a **required** field for requests.
10340        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10341            self.0.request.parent = v.into();
10342            self
10343        }
10344
10345        /// Sets the value of [change_request][crate::model::RequestDataProductAccessRequest::change_request].
10346        ///
10347        /// This is a **required** field for requests.
10348        pub fn set_change_request<T>(mut self, v: T) -> Self
10349        where
10350            T: std::convert::Into<crate::model::ChangeRequest>,
10351        {
10352            self.0.request.change_request = std::option::Option::Some(v.into());
10353            self
10354        }
10355
10356        /// Sets or clears the value of [change_request][crate::model::RequestDataProductAccessRequest::change_request].
10357        ///
10358        /// This is a **required** field for requests.
10359        pub fn set_or_clear_change_request<T>(mut self, v: std::option::Option<T>) -> Self
10360        where
10361            T: std::convert::Into<crate::model::ChangeRequest>,
10362        {
10363            self.0.request.change_request = v.map(|x| x.into());
10364            self
10365        }
10366
10367        /// Sets the value of [validate_only][crate::model::RequestDataProductAccessRequest::validate_only].
10368        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10369            self.0.request.validate_only = v.into();
10370            self
10371        }
10372    }
10373
10374    #[doc(hidden)]
10375    impl crate::RequestBuilder for RequestDataProductAccess {
10376        fn request_options(&mut self) -> &mut crate::RequestOptions {
10377            &mut self.0.options
10378        }
10379    }
10380
10381    /// The request builder for [DataProductService::create_data_asset][crate::client::DataProductService::create_data_asset] calls.
10382    ///
10383    /// # Example
10384    /// ```
10385    /// # use google_cloud_dataplex_v1::builder::data_product_service::CreateDataAsset;
10386    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10387    /// use google_cloud_lro::Poller;
10388    ///
10389    /// let builder = prepare_request_builder();
10390    /// let response = builder.poller().until_done().await?;
10391    /// # Ok(()) }
10392    ///
10393    /// fn prepare_request_builder() -> CreateDataAsset {
10394    ///   # panic!();
10395    ///   // ... details omitted ...
10396    /// }
10397    /// ```
10398    #[derive(Clone, Debug)]
10399    pub struct CreateDataAsset(RequestBuilder<crate::model::CreateDataAssetRequest>);
10400
10401    impl CreateDataAsset {
10402        pub(crate) fn new(
10403            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10404        ) -> Self {
10405            Self(RequestBuilder::new(stub))
10406        }
10407
10408        /// Sets the full request, replacing any prior values.
10409        pub fn with_request<V: Into<crate::model::CreateDataAssetRequest>>(mut self, v: V) -> Self {
10410            self.0.request = v.into();
10411            self
10412        }
10413
10414        /// Sets all the options, replacing any prior values.
10415        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10416            self.0.options = v.into();
10417            self
10418        }
10419
10420        /// Sends the request.
10421        ///
10422        /// # Long running operations
10423        ///
10424        /// This starts, but does not poll, a longrunning operation. More information
10425        /// on [create_data_asset][crate::client::DataProductService::create_data_asset].
10426        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10427            (*self.0.stub)
10428                .create_data_asset(self.0.request, self.0.options)
10429                .await
10430                .map(crate::Response::into_body)
10431        }
10432
10433        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_asset`.
10434        pub fn poller(
10435            self,
10436        ) -> impl google_cloud_lro::Poller<crate::model::DataAsset, crate::model::OperationMetadata>
10437        {
10438            type Operation = google_cloud_lro::internal::Operation<
10439                crate::model::DataAsset,
10440                crate::model::OperationMetadata,
10441            >;
10442            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10443            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10444            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
10445            if let Some(ref mut details) = poller_options.tracing {
10446                details.method_name = "google_cloud_dataplex_v1::client::DataProductService::create_data_asset::until_done";
10447            }
10448
10449            let stub = self.0.stub.clone();
10450            let mut options = self.0.options.clone();
10451            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10452            let query = move |name| {
10453                let stub = stub.clone();
10454                let options = options.clone();
10455                async {
10456                    let op = GetOperation::new(stub)
10457                        .set_name(name)
10458                        .with_options(options)
10459                        .send()
10460                        .await?;
10461                    Ok(Operation::new(op))
10462                }
10463            };
10464
10465            let start = move || async {
10466                let op = self.send().await?;
10467                Ok(Operation::new(op))
10468            };
10469
10470            use google_cloud_lro::internal::PollerExt;
10471            {
10472                google_cloud_lro::internal::new_poller(
10473                    polling_error_policy,
10474                    polling_backoff_policy,
10475                    start,
10476                    query,
10477                )
10478            }
10479            .with_options(poller_options)
10480        }
10481
10482        /// Sets the value of [parent][crate::model::CreateDataAssetRequest::parent].
10483        ///
10484        /// This is a **required** field for requests.
10485        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10486            self.0.request.parent = v.into();
10487            self
10488        }
10489
10490        /// Sets the value of [data_asset_id][crate::model::CreateDataAssetRequest::data_asset_id].
10491        pub fn set_data_asset_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
10492            self.0.request.data_asset_id = v.into();
10493            self
10494        }
10495
10496        /// Sets the value of [data_asset][crate::model::CreateDataAssetRequest::data_asset].
10497        ///
10498        /// This is a **required** field for requests.
10499        pub fn set_data_asset<T>(mut self, v: T) -> Self
10500        where
10501            T: std::convert::Into<crate::model::DataAsset>,
10502        {
10503            self.0.request.data_asset = std::option::Option::Some(v.into());
10504            self
10505        }
10506
10507        /// Sets or clears the value of [data_asset][crate::model::CreateDataAssetRequest::data_asset].
10508        ///
10509        /// This is a **required** field for requests.
10510        pub fn set_or_clear_data_asset<T>(mut self, v: std::option::Option<T>) -> Self
10511        where
10512            T: std::convert::Into<crate::model::DataAsset>,
10513        {
10514            self.0.request.data_asset = v.map(|x| x.into());
10515            self
10516        }
10517
10518        /// Sets the value of [validate_only][crate::model::CreateDataAssetRequest::validate_only].
10519        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10520            self.0.request.validate_only = v.into();
10521            self
10522        }
10523    }
10524
10525    #[doc(hidden)]
10526    impl crate::RequestBuilder for CreateDataAsset {
10527        fn request_options(&mut self) -> &mut crate::RequestOptions {
10528            &mut self.0.options
10529        }
10530    }
10531
10532    /// The request builder for [DataProductService::update_data_asset][crate::client::DataProductService::update_data_asset] calls.
10533    ///
10534    /// # Example
10535    /// ```
10536    /// # use google_cloud_dataplex_v1::builder::data_product_service::UpdateDataAsset;
10537    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10538    /// use google_cloud_lro::Poller;
10539    ///
10540    /// let builder = prepare_request_builder();
10541    /// let response = builder.poller().until_done().await?;
10542    /// # Ok(()) }
10543    ///
10544    /// fn prepare_request_builder() -> UpdateDataAsset {
10545    ///   # panic!();
10546    ///   // ... details omitted ...
10547    /// }
10548    /// ```
10549    #[derive(Clone, Debug)]
10550    pub struct UpdateDataAsset(RequestBuilder<crate::model::UpdateDataAssetRequest>);
10551
10552    impl UpdateDataAsset {
10553        pub(crate) fn new(
10554            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10555        ) -> Self {
10556            Self(RequestBuilder::new(stub))
10557        }
10558
10559        /// Sets the full request, replacing any prior values.
10560        pub fn with_request<V: Into<crate::model::UpdateDataAssetRequest>>(mut self, v: V) -> Self {
10561            self.0.request = v.into();
10562            self
10563        }
10564
10565        /// Sets all the options, replacing any prior values.
10566        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10567            self.0.options = v.into();
10568            self
10569        }
10570
10571        /// Sends the request.
10572        ///
10573        /// # Long running operations
10574        ///
10575        /// This starts, but does not poll, a longrunning operation. More information
10576        /// on [update_data_asset][crate::client::DataProductService::update_data_asset].
10577        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10578            (*self.0.stub)
10579                .update_data_asset(self.0.request, self.0.options)
10580                .await
10581                .map(crate::Response::into_body)
10582        }
10583
10584        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_asset`.
10585        pub fn poller(
10586            self,
10587        ) -> impl google_cloud_lro::Poller<crate::model::DataAsset, crate::model::OperationMetadata>
10588        {
10589            type Operation = google_cloud_lro::internal::Operation<
10590                crate::model::DataAsset,
10591                crate::model::OperationMetadata,
10592            >;
10593            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10594            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10595            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
10596            if let Some(ref mut details) = poller_options.tracing {
10597                details.method_name = "google_cloud_dataplex_v1::client::DataProductService::update_data_asset::until_done";
10598            }
10599
10600            let stub = self.0.stub.clone();
10601            let mut options = self.0.options.clone();
10602            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10603            let query = move |name| {
10604                let stub = stub.clone();
10605                let options = options.clone();
10606                async {
10607                    let op = GetOperation::new(stub)
10608                        .set_name(name)
10609                        .with_options(options)
10610                        .send()
10611                        .await?;
10612                    Ok(Operation::new(op))
10613                }
10614            };
10615
10616            let start = move || async {
10617                let op = self.send().await?;
10618                Ok(Operation::new(op))
10619            };
10620
10621            use google_cloud_lro::internal::PollerExt;
10622            {
10623                google_cloud_lro::internal::new_poller(
10624                    polling_error_policy,
10625                    polling_backoff_policy,
10626                    start,
10627                    query,
10628                )
10629            }
10630            .with_options(poller_options)
10631        }
10632
10633        /// Sets the value of [data_asset][crate::model::UpdateDataAssetRequest::data_asset].
10634        ///
10635        /// This is a **required** field for requests.
10636        pub fn set_data_asset<T>(mut self, v: T) -> Self
10637        where
10638            T: std::convert::Into<crate::model::DataAsset>,
10639        {
10640            self.0.request.data_asset = std::option::Option::Some(v.into());
10641            self
10642        }
10643
10644        /// Sets or clears the value of [data_asset][crate::model::UpdateDataAssetRequest::data_asset].
10645        ///
10646        /// This is a **required** field for requests.
10647        pub fn set_or_clear_data_asset<T>(mut self, v: std::option::Option<T>) -> Self
10648        where
10649            T: std::convert::Into<crate::model::DataAsset>,
10650        {
10651            self.0.request.data_asset = v.map(|x| x.into());
10652            self
10653        }
10654
10655        /// Sets the value of [update_mask][crate::model::UpdateDataAssetRequest::update_mask].
10656        pub fn set_update_mask<T>(mut self, v: T) -> Self
10657        where
10658            T: std::convert::Into<wkt::FieldMask>,
10659        {
10660            self.0.request.update_mask = std::option::Option::Some(v.into());
10661            self
10662        }
10663
10664        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAssetRequest::update_mask].
10665        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10666        where
10667            T: std::convert::Into<wkt::FieldMask>,
10668        {
10669            self.0.request.update_mask = v.map(|x| x.into());
10670            self
10671        }
10672
10673        /// Sets the value of [validate_only][crate::model::UpdateDataAssetRequest::validate_only].
10674        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10675            self.0.request.validate_only = v.into();
10676            self
10677        }
10678    }
10679
10680    #[doc(hidden)]
10681    impl crate::RequestBuilder for UpdateDataAsset {
10682        fn request_options(&mut self) -> &mut crate::RequestOptions {
10683            &mut self.0.options
10684        }
10685    }
10686
10687    /// The request builder for [DataProductService::delete_data_asset][crate::client::DataProductService::delete_data_asset] calls.
10688    ///
10689    /// # Example
10690    /// ```
10691    /// # use google_cloud_dataplex_v1::builder::data_product_service::DeleteDataAsset;
10692    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10693    /// use google_cloud_lro::Poller;
10694    ///
10695    /// let builder = prepare_request_builder();
10696    /// let response = builder.poller().until_done().await?;
10697    /// # Ok(()) }
10698    ///
10699    /// fn prepare_request_builder() -> DeleteDataAsset {
10700    ///   # panic!();
10701    ///   // ... details omitted ...
10702    /// }
10703    /// ```
10704    #[derive(Clone, Debug)]
10705    pub struct DeleteDataAsset(RequestBuilder<crate::model::DeleteDataAssetRequest>);
10706
10707    impl DeleteDataAsset {
10708        pub(crate) fn new(
10709            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10710        ) -> Self {
10711            Self(RequestBuilder::new(stub))
10712        }
10713
10714        /// Sets the full request, replacing any prior values.
10715        pub fn with_request<V: Into<crate::model::DeleteDataAssetRequest>>(mut self, v: V) -> Self {
10716            self.0.request = v.into();
10717            self
10718        }
10719
10720        /// Sets all the options, replacing any prior values.
10721        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10722            self.0.options = v.into();
10723            self
10724        }
10725
10726        /// Sends the request.
10727        ///
10728        /// # Long running operations
10729        ///
10730        /// This starts, but does not poll, a longrunning operation. More information
10731        /// on [delete_data_asset][crate::client::DataProductService::delete_data_asset].
10732        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10733            (*self.0.stub)
10734                .delete_data_asset(self.0.request, self.0.options)
10735                .await
10736                .map(crate::Response::into_body)
10737        }
10738
10739        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_asset`.
10740        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
10741            type Operation =
10742                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
10743            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10744            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10745            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
10746            if let Some(ref mut details) = poller_options.tracing {
10747                details.method_name = "google_cloud_dataplex_v1::client::DataProductService::delete_data_asset::until_done";
10748            }
10749
10750            let stub = self.0.stub.clone();
10751            let mut options = self.0.options.clone();
10752            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10753            let query = move |name| {
10754                let stub = stub.clone();
10755                let options = options.clone();
10756                async {
10757                    let op = GetOperation::new(stub)
10758                        .set_name(name)
10759                        .with_options(options)
10760                        .send()
10761                        .await?;
10762                    Ok(Operation::new(op))
10763                }
10764            };
10765
10766            let start = move || async {
10767                let op = self.send().await?;
10768                Ok(Operation::new(op))
10769            };
10770
10771            use google_cloud_lro::internal::PollerExt;
10772            {
10773                google_cloud_lro::internal::new_unit_response_poller(
10774                    polling_error_policy,
10775                    polling_backoff_policy,
10776                    start,
10777                    query,
10778                )
10779            }
10780            .with_options(poller_options)
10781        }
10782
10783        /// Sets the value of [name][crate::model::DeleteDataAssetRequest::name].
10784        ///
10785        /// This is a **required** field for requests.
10786        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10787            self.0.request.name = v.into();
10788            self
10789        }
10790
10791        /// Sets the value of [etag][crate::model::DeleteDataAssetRequest::etag].
10792        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
10793            self.0.request.etag = v.into();
10794            self
10795        }
10796
10797        /// Sets the value of [validate_only][crate::model::DeleteDataAssetRequest::validate_only].
10798        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10799            self.0.request.validate_only = v.into();
10800            self
10801        }
10802    }
10803
10804    #[doc(hidden)]
10805    impl crate::RequestBuilder for DeleteDataAsset {
10806        fn request_options(&mut self) -> &mut crate::RequestOptions {
10807            &mut self.0.options
10808        }
10809    }
10810
10811    /// The request builder for [DataProductService::get_data_asset][crate::client::DataProductService::get_data_asset] calls.
10812    ///
10813    /// # Example
10814    /// ```
10815    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetDataAsset;
10816    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10817    ///
10818    /// let builder = prepare_request_builder();
10819    /// let response = builder.send().await?;
10820    /// # Ok(()) }
10821    ///
10822    /// fn prepare_request_builder() -> GetDataAsset {
10823    ///   # panic!();
10824    ///   // ... details omitted ...
10825    /// }
10826    /// ```
10827    #[derive(Clone, Debug)]
10828    pub struct GetDataAsset(RequestBuilder<crate::model::GetDataAssetRequest>);
10829
10830    impl GetDataAsset {
10831        pub(crate) fn new(
10832            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10833        ) -> Self {
10834            Self(RequestBuilder::new(stub))
10835        }
10836
10837        /// Sets the full request, replacing any prior values.
10838        pub fn with_request<V: Into<crate::model::GetDataAssetRequest>>(mut self, v: V) -> Self {
10839            self.0.request = v.into();
10840            self
10841        }
10842
10843        /// Sets all the options, replacing any prior values.
10844        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10845            self.0.options = v.into();
10846            self
10847        }
10848
10849        /// Sends the request.
10850        pub async fn send(self) -> Result<crate::model::DataAsset> {
10851            (*self.0.stub)
10852                .get_data_asset(self.0.request, self.0.options)
10853                .await
10854                .map(crate::Response::into_body)
10855        }
10856
10857        /// Sets the value of [name][crate::model::GetDataAssetRequest::name].
10858        ///
10859        /// This is a **required** field for requests.
10860        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10861            self.0.request.name = v.into();
10862            self
10863        }
10864    }
10865
10866    #[doc(hidden)]
10867    impl crate::RequestBuilder for GetDataAsset {
10868        fn request_options(&mut self) -> &mut crate::RequestOptions {
10869            &mut self.0.options
10870        }
10871    }
10872
10873    /// The request builder for [DataProductService::list_data_assets][crate::client::DataProductService::list_data_assets] calls.
10874    ///
10875    /// # Example
10876    /// ```
10877    /// # use google_cloud_dataplex_v1::builder::data_product_service::ListDataAssets;
10878    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10879    /// use google_cloud_gax::paginator::ItemPaginator;
10880    ///
10881    /// let builder = prepare_request_builder();
10882    /// let mut items = builder.by_item();
10883    /// while let Some(result) = items.next().await {
10884    ///   let item = result?;
10885    /// }
10886    /// # Ok(()) }
10887    ///
10888    /// fn prepare_request_builder() -> ListDataAssets {
10889    ///   # panic!();
10890    ///   // ... details omitted ...
10891    /// }
10892    /// ```
10893    #[derive(Clone, Debug)]
10894    pub struct ListDataAssets(RequestBuilder<crate::model::ListDataAssetsRequest>);
10895
10896    impl ListDataAssets {
10897        pub(crate) fn new(
10898            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10899        ) -> Self {
10900            Self(RequestBuilder::new(stub))
10901        }
10902
10903        /// Sets the full request, replacing any prior values.
10904        pub fn with_request<V: Into<crate::model::ListDataAssetsRequest>>(mut self, v: V) -> Self {
10905            self.0.request = v.into();
10906            self
10907        }
10908
10909        /// Sets all the options, replacing any prior values.
10910        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10911            self.0.options = v.into();
10912            self
10913        }
10914
10915        /// Sends the request.
10916        pub async fn send(self) -> Result<crate::model::ListDataAssetsResponse> {
10917            (*self.0.stub)
10918                .list_data_assets(self.0.request, self.0.options)
10919                .await
10920                .map(crate::Response::into_body)
10921        }
10922
10923        /// Streams each page in the collection.
10924        pub fn by_page(
10925            self,
10926        ) -> impl google_cloud_gax::paginator::Paginator<
10927            crate::model::ListDataAssetsResponse,
10928            crate::Error,
10929        > {
10930            use std::clone::Clone;
10931            let token = self.0.request.page_token.clone();
10932            let execute = move |token: String| {
10933                let mut builder = self.clone();
10934                builder.0.request = builder.0.request.set_page_token(token);
10935                builder.send()
10936            };
10937            google_cloud_gax::paginator::internal::new_paginator(token, execute)
10938        }
10939
10940        /// Streams each item in the collection.
10941        pub fn by_item(
10942            self,
10943        ) -> impl google_cloud_gax::paginator::ItemPaginator<
10944            crate::model::ListDataAssetsResponse,
10945            crate::Error,
10946        > {
10947            use google_cloud_gax::paginator::Paginator;
10948            self.by_page().items()
10949        }
10950
10951        /// Sets the value of [parent][crate::model::ListDataAssetsRequest::parent].
10952        ///
10953        /// This is a **required** field for requests.
10954        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10955            self.0.request.parent = v.into();
10956            self
10957        }
10958
10959        /// Sets the value of [filter][crate::model::ListDataAssetsRequest::filter].
10960        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10961            self.0.request.filter = v.into();
10962            self
10963        }
10964
10965        /// Sets the value of [order_by][crate::model::ListDataAssetsRequest::order_by].
10966        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
10967            self.0.request.order_by = v.into();
10968            self
10969        }
10970
10971        /// Sets the value of [page_size][crate::model::ListDataAssetsRequest::page_size].
10972        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10973            self.0.request.page_size = v.into();
10974            self
10975        }
10976
10977        /// Sets the value of [page_token][crate::model::ListDataAssetsRequest::page_token].
10978        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10979            self.0.request.page_token = v.into();
10980            self
10981        }
10982    }
10983
10984    #[doc(hidden)]
10985    impl crate::RequestBuilder for ListDataAssets {
10986        fn request_options(&mut self) -> &mut crate::RequestOptions {
10987            &mut self.0.options
10988        }
10989    }
10990
10991    /// The request builder for [DataProductService::list_locations][crate::client::DataProductService::list_locations] calls.
10992    ///
10993    /// # Example
10994    /// ```
10995    /// # use google_cloud_dataplex_v1::builder::data_product_service::ListLocations;
10996    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
10997    /// use google_cloud_gax::paginator::ItemPaginator;
10998    ///
10999    /// let builder = prepare_request_builder();
11000    /// let mut items = builder.by_item();
11001    /// while let Some(result) = items.next().await {
11002    ///   let item = result?;
11003    /// }
11004    /// # Ok(()) }
11005    ///
11006    /// fn prepare_request_builder() -> ListLocations {
11007    ///   # panic!();
11008    ///   // ... details omitted ...
11009    /// }
11010    /// ```
11011    #[derive(Clone, Debug)]
11012    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
11013
11014    impl ListLocations {
11015        pub(crate) fn new(
11016            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11017        ) -> Self {
11018            Self(RequestBuilder::new(stub))
11019        }
11020
11021        /// Sets the full request, replacing any prior values.
11022        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
11023            mut self,
11024            v: V,
11025        ) -> Self {
11026            self.0.request = v.into();
11027            self
11028        }
11029
11030        /// Sets all the options, replacing any prior values.
11031        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11032            self.0.options = v.into();
11033            self
11034        }
11035
11036        /// Sends the request.
11037        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
11038            (*self.0.stub)
11039                .list_locations(self.0.request, self.0.options)
11040                .await
11041                .map(crate::Response::into_body)
11042        }
11043
11044        /// Streams each page in the collection.
11045        pub fn by_page(
11046            self,
11047        ) -> impl google_cloud_gax::paginator::Paginator<
11048            google_cloud_location::model::ListLocationsResponse,
11049            crate::Error,
11050        > {
11051            use std::clone::Clone;
11052            let token = self.0.request.page_token.clone();
11053            let execute = move |token: String| {
11054                let mut builder = self.clone();
11055                builder.0.request = builder.0.request.set_page_token(token);
11056                builder.send()
11057            };
11058            google_cloud_gax::paginator::internal::new_paginator(token, execute)
11059        }
11060
11061        /// Streams each item in the collection.
11062        pub fn by_item(
11063            self,
11064        ) -> impl google_cloud_gax::paginator::ItemPaginator<
11065            google_cloud_location::model::ListLocationsResponse,
11066            crate::Error,
11067        > {
11068            use google_cloud_gax::paginator::Paginator;
11069            self.by_page().items()
11070        }
11071
11072        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
11073        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11074            self.0.request.name = v.into();
11075            self
11076        }
11077
11078        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
11079        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
11080            self.0.request.filter = v.into();
11081            self
11082        }
11083
11084        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
11085        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
11086            self.0.request.page_size = v.into();
11087            self
11088        }
11089
11090        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
11091        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
11092            self.0.request.page_token = v.into();
11093            self
11094        }
11095    }
11096
11097    #[doc(hidden)]
11098    impl crate::RequestBuilder for ListLocations {
11099        fn request_options(&mut self) -> &mut crate::RequestOptions {
11100            &mut self.0.options
11101        }
11102    }
11103
11104    /// The request builder for [DataProductService::get_location][crate::client::DataProductService::get_location] calls.
11105    ///
11106    /// # Example
11107    /// ```
11108    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetLocation;
11109    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11110    ///
11111    /// let builder = prepare_request_builder();
11112    /// let response = builder.send().await?;
11113    /// # Ok(()) }
11114    ///
11115    /// fn prepare_request_builder() -> GetLocation {
11116    ///   # panic!();
11117    ///   // ... details omitted ...
11118    /// }
11119    /// ```
11120    #[derive(Clone, Debug)]
11121    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
11122
11123    impl GetLocation {
11124        pub(crate) fn new(
11125            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11126        ) -> Self {
11127            Self(RequestBuilder::new(stub))
11128        }
11129
11130        /// Sets the full request, replacing any prior values.
11131        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
11132            mut self,
11133            v: V,
11134        ) -> Self {
11135            self.0.request = v.into();
11136            self
11137        }
11138
11139        /// Sets all the options, replacing any prior values.
11140        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11141            self.0.options = v.into();
11142            self
11143        }
11144
11145        /// Sends the request.
11146        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
11147            (*self.0.stub)
11148                .get_location(self.0.request, self.0.options)
11149                .await
11150                .map(crate::Response::into_body)
11151        }
11152
11153        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
11154        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11155            self.0.request.name = v.into();
11156            self
11157        }
11158    }
11159
11160    #[doc(hidden)]
11161    impl crate::RequestBuilder for GetLocation {
11162        fn request_options(&mut self) -> &mut crate::RequestOptions {
11163            &mut self.0.options
11164        }
11165    }
11166
11167    /// The request builder for [DataProductService::set_iam_policy][crate::client::DataProductService::set_iam_policy] calls.
11168    ///
11169    /// # Example
11170    /// ```
11171    /// # use google_cloud_dataplex_v1::builder::data_product_service::SetIamPolicy;
11172    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11173    ///
11174    /// let builder = prepare_request_builder();
11175    /// let response = builder.send().await?;
11176    /// # Ok(()) }
11177    ///
11178    /// fn prepare_request_builder() -> SetIamPolicy {
11179    ///   # panic!();
11180    ///   // ... details omitted ...
11181    /// }
11182    /// ```
11183    #[derive(Clone, Debug)]
11184    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
11185
11186    impl SetIamPolicy {
11187        pub(crate) fn new(
11188            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11189        ) -> Self {
11190            Self(RequestBuilder::new(stub))
11191        }
11192
11193        /// Sets the full request, replacing any prior values.
11194        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
11195            mut self,
11196            v: V,
11197        ) -> Self {
11198            self.0.request = v.into();
11199            self
11200        }
11201
11202        /// Sets all the options, replacing any prior values.
11203        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11204            self.0.options = v.into();
11205            self
11206        }
11207
11208        /// Sends the request.
11209        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
11210            (*self.0.stub)
11211                .set_iam_policy(self.0.request, self.0.options)
11212                .await
11213                .map(crate::Response::into_body)
11214        }
11215
11216        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
11217        ///
11218        /// This is a **required** field for requests.
11219        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
11220            self.0.request.resource = v.into();
11221            self
11222        }
11223
11224        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
11225        ///
11226        /// This is a **required** field for requests.
11227        pub fn set_policy<T>(mut self, v: T) -> Self
11228        where
11229            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
11230        {
11231            self.0.request.policy = std::option::Option::Some(v.into());
11232            self
11233        }
11234
11235        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
11236        ///
11237        /// This is a **required** field for requests.
11238        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
11239        where
11240            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
11241        {
11242            self.0.request.policy = v.map(|x| x.into());
11243            self
11244        }
11245
11246        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
11247        pub fn set_update_mask<T>(mut self, v: T) -> Self
11248        where
11249            T: std::convert::Into<wkt::FieldMask>,
11250        {
11251            self.0.request.update_mask = std::option::Option::Some(v.into());
11252            self
11253        }
11254
11255        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
11256        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
11257        where
11258            T: std::convert::Into<wkt::FieldMask>,
11259        {
11260            self.0.request.update_mask = v.map(|x| x.into());
11261            self
11262        }
11263    }
11264
11265    #[doc(hidden)]
11266    impl crate::RequestBuilder for SetIamPolicy {
11267        fn request_options(&mut self) -> &mut crate::RequestOptions {
11268            &mut self.0.options
11269        }
11270    }
11271
11272    /// The request builder for [DataProductService::get_iam_policy][crate::client::DataProductService::get_iam_policy] calls.
11273    ///
11274    /// # Example
11275    /// ```
11276    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetIamPolicy;
11277    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11278    ///
11279    /// let builder = prepare_request_builder();
11280    /// let response = builder.send().await?;
11281    /// # Ok(()) }
11282    ///
11283    /// fn prepare_request_builder() -> GetIamPolicy {
11284    ///   # panic!();
11285    ///   // ... details omitted ...
11286    /// }
11287    /// ```
11288    #[derive(Clone, Debug)]
11289    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
11290
11291    impl GetIamPolicy {
11292        pub(crate) fn new(
11293            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11294        ) -> Self {
11295            Self(RequestBuilder::new(stub))
11296        }
11297
11298        /// Sets the full request, replacing any prior values.
11299        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
11300            mut self,
11301            v: V,
11302        ) -> Self {
11303            self.0.request = v.into();
11304            self
11305        }
11306
11307        /// Sets all the options, replacing any prior values.
11308        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11309            self.0.options = v.into();
11310            self
11311        }
11312
11313        /// Sends the request.
11314        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
11315            (*self.0.stub)
11316                .get_iam_policy(self.0.request, self.0.options)
11317                .await
11318                .map(crate::Response::into_body)
11319        }
11320
11321        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
11322        ///
11323        /// This is a **required** field for requests.
11324        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
11325            self.0.request.resource = v.into();
11326            self
11327        }
11328
11329        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
11330        pub fn set_options<T>(mut self, v: T) -> Self
11331        where
11332            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
11333        {
11334            self.0.request.options = std::option::Option::Some(v.into());
11335            self
11336        }
11337
11338        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
11339        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
11340        where
11341            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
11342        {
11343            self.0.request.options = v.map(|x| x.into());
11344            self
11345        }
11346    }
11347
11348    #[doc(hidden)]
11349    impl crate::RequestBuilder for GetIamPolicy {
11350        fn request_options(&mut self) -> &mut crate::RequestOptions {
11351            &mut self.0.options
11352        }
11353    }
11354
11355    /// The request builder for [DataProductService::test_iam_permissions][crate::client::DataProductService::test_iam_permissions] calls.
11356    ///
11357    /// # Example
11358    /// ```
11359    /// # use google_cloud_dataplex_v1::builder::data_product_service::TestIamPermissions;
11360    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11361    ///
11362    /// let builder = prepare_request_builder();
11363    /// let response = builder.send().await?;
11364    /// # Ok(()) }
11365    ///
11366    /// fn prepare_request_builder() -> TestIamPermissions {
11367    ///   # panic!();
11368    ///   // ... details omitted ...
11369    /// }
11370    /// ```
11371    #[derive(Clone, Debug)]
11372    pub struct TestIamPermissions(
11373        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
11374    );
11375
11376    impl TestIamPermissions {
11377        pub(crate) fn new(
11378            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11379        ) -> Self {
11380            Self(RequestBuilder::new(stub))
11381        }
11382
11383        /// Sets the full request, replacing any prior values.
11384        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
11385            mut self,
11386            v: V,
11387        ) -> Self {
11388            self.0.request = v.into();
11389            self
11390        }
11391
11392        /// Sets all the options, replacing any prior values.
11393        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11394            self.0.options = v.into();
11395            self
11396        }
11397
11398        /// Sends the request.
11399        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
11400            (*self.0.stub)
11401                .test_iam_permissions(self.0.request, self.0.options)
11402                .await
11403                .map(crate::Response::into_body)
11404        }
11405
11406        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
11407        ///
11408        /// This is a **required** field for requests.
11409        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
11410            self.0.request.resource = v.into();
11411            self
11412        }
11413
11414        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
11415        ///
11416        /// This is a **required** field for requests.
11417        pub fn set_permissions<T, V>(mut self, v: T) -> Self
11418        where
11419            T: std::iter::IntoIterator<Item = V>,
11420            V: std::convert::Into<std::string::String>,
11421        {
11422            use std::iter::Iterator;
11423            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
11424            self
11425        }
11426    }
11427
11428    #[doc(hidden)]
11429    impl crate::RequestBuilder for TestIamPermissions {
11430        fn request_options(&mut self) -> &mut crate::RequestOptions {
11431            &mut self.0.options
11432        }
11433    }
11434
11435    /// The request builder for [DataProductService::list_operations][crate::client::DataProductService::list_operations] calls.
11436    ///
11437    /// # Example
11438    /// ```
11439    /// # use google_cloud_dataplex_v1::builder::data_product_service::ListOperations;
11440    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11441    /// use google_cloud_gax::paginator::ItemPaginator;
11442    ///
11443    /// let builder = prepare_request_builder();
11444    /// let mut items = builder.by_item();
11445    /// while let Some(result) = items.next().await {
11446    ///   let item = result?;
11447    /// }
11448    /// # Ok(()) }
11449    ///
11450    /// fn prepare_request_builder() -> ListOperations {
11451    ///   # panic!();
11452    ///   // ... details omitted ...
11453    /// }
11454    /// ```
11455    #[derive(Clone, Debug)]
11456    pub struct ListOperations(
11457        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
11458    );
11459
11460    impl ListOperations {
11461        pub(crate) fn new(
11462            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11463        ) -> Self {
11464            Self(RequestBuilder::new(stub))
11465        }
11466
11467        /// Sets the full request, replacing any prior values.
11468        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
11469            mut self,
11470            v: V,
11471        ) -> Self {
11472            self.0.request = v.into();
11473            self
11474        }
11475
11476        /// Sets all the options, replacing any prior values.
11477        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11478            self.0.options = v.into();
11479            self
11480        }
11481
11482        /// Sends the request.
11483        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
11484            (*self.0.stub)
11485                .list_operations(self.0.request, self.0.options)
11486                .await
11487                .map(crate::Response::into_body)
11488        }
11489
11490        /// Streams each page in the collection.
11491        pub fn by_page(
11492            self,
11493        ) -> impl google_cloud_gax::paginator::Paginator<
11494            google_cloud_longrunning::model::ListOperationsResponse,
11495            crate::Error,
11496        > {
11497            use std::clone::Clone;
11498            let token = self.0.request.page_token.clone();
11499            let execute = move |token: String| {
11500                let mut builder = self.clone();
11501                builder.0.request = builder.0.request.set_page_token(token);
11502                builder.send()
11503            };
11504            google_cloud_gax::paginator::internal::new_paginator(token, execute)
11505        }
11506
11507        /// Streams each item in the collection.
11508        pub fn by_item(
11509            self,
11510        ) -> impl google_cloud_gax::paginator::ItemPaginator<
11511            google_cloud_longrunning::model::ListOperationsResponse,
11512            crate::Error,
11513        > {
11514            use google_cloud_gax::paginator::Paginator;
11515            self.by_page().items()
11516        }
11517
11518        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
11519        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11520            self.0.request.name = v.into();
11521            self
11522        }
11523
11524        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
11525        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
11526            self.0.request.filter = v.into();
11527            self
11528        }
11529
11530        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
11531        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
11532            self.0.request.page_size = v.into();
11533            self
11534        }
11535
11536        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
11537        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
11538            self.0.request.page_token = v.into();
11539            self
11540        }
11541
11542        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
11543        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
11544            self.0.request.return_partial_success = v.into();
11545            self
11546        }
11547    }
11548
11549    #[doc(hidden)]
11550    impl crate::RequestBuilder for ListOperations {
11551        fn request_options(&mut self) -> &mut crate::RequestOptions {
11552            &mut self.0.options
11553        }
11554    }
11555
11556    /// The request builder for [DataProductService::get_operation][crate::client::DataProductService::get_operation] calls.
11557    ///
11558    /// # Example
11559    /// ```
11560    /// # use google_cloud_dataplex_v1::builder::data_product_service::GetOperation;
11561    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11562    ///
11563    /// let builder = prepare_request_builder();
11564    /// let response = builder.send().await?;
11565    /// # Ok(()) }
11566    ///
11567    /// fn prepare_request_builder() -> GetOperation {
11568    ///   # panic!();
11569    ///   // ... details omitted ...
11570    /// }
11571    /// ```
11572    #[derive(Clone, Debug)]
11573    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
11574
11575    impl GetOperation {
11576        pub(crate) fn new(
11577            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11578        ) -> Self {
11579            Self(RequestBuilder::new(stub))
11580        }
11581
11582        /// Sets the full request, replacing any prior values.
11583        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
11584            mut self,
11585            v: V,
11586        ) -> Self {
11587            self.0.request = v.into();
11588            self
11589        }
11590
11591        /// Sets all the options, replacing any prior values.
11592        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11593            self.0.options = v.into();
11594            self
11595        }
11596
11597        /// Sends the request.
11598        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11599            (*self.0.stub)
11600                .get_operation(self.0.request, self.0.options)
11601                .await
11602                .map(crate::Response::into_body)
11603        }
11604
11605        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
11606        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11607            self.0.request.name = v.into();
11608            self
11609        }
11610    }
11611
11612    #[doc(hidden)]
11613    impl crate::RequestBuilder for GetOperation {
11614        fn request_options(&mut self) -> &mut crate::RequestOptions {
11615            &mut self.0.options
11616        }
11617    }
11618
11619    /// The request builder for [DataProductService::delete_operation][crate::client::DataProductService::delete_operation] calls.
11620    ///
11621    /// # Example
11622    /// ```
11623    /// # use google_cloud_dataplex_v1::builder::data_product_service::DeleteOperation;
11624    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11625    ///
11626    /// let builder = prepare_request_builder();
11627    /// let response = builder.send().await?;
11628    /// # Ok(()) }
11629    ///
11630    /// fn prepare_request_builder() -> DeleteOperation {
11631    ///   # panic!();
11632    ///   // ... details omitted ...
11633    /// }
11634    /// ```
11635    #[derive(Clone, Debug)]
11636    pub struct DeleteOperation(
11637        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
11638    );
11639
11640    impl DeleteOperation {
11641        pub(crate) fn new(
11642            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11643        ) -> Self {
11644            Self(RequestBuilder::new(stub))
11645        }
11646
11647        /// Sets the full request, replacing any prior values.
11648        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
11649            mut self,
11650            v: V,
11651        ) -> Self {
11652            self.0.request = v.into();
11653            self
11654        }
11655
11656        /// Sets all the options, replacing any prior values.
11657        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11658            self.0.options = v.into();
11659            self
11660        }
11661
11662        /// Sends the request.
11663        pub async fn send(self) -> Result<()> {
11664            (*self.0.stub)
11665                .delete_operation(self.0.request, self.0.options)
11666                .await
11667                .map(crate::Response::into_body)
11668        }
11669
11670        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
11671        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11672            self.0.request.name = v.into();
11673            self
11674        }
11675    }
11676
11677    #[doc(hidden)]
11678    impl crate::RequestBuilder for DeleteOperation {
11679        fn request_options(&mut self) -> &mut crate::RequestOptions {
11680            &mut self.0.options
11681        }
11682    }
11683
11684    /// The request builder for [DataProductService::cancel_operation][crate::client::DataProductService::cancel_operation] calls.
11685    ///
11686    /// # Example
11687    /// ```
11688    /// # use google_cloud_dataplex_v1::builder::data_product_service::CancelOperation;
11689    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11690    ///
11691    /// let builder = prepare_request_builder();
11692    /// let response = builder.send().await?;
11693    /// # Ok(()) }
11694    ///
11695    /// fn prepare_request_builder() -> CancelOperation {
11696    ///   # panic!();
11697    ///   // ... details omitted ...
11698    /// }
11699    /// ```
11700    #[derive(Clone, Debug)]
11701    pub struct CancelOperation(
11702        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
11703    );
11704
11705    impl CancelOperation {
11706        pub(crate) fn new(
11707            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11708        ) -> Self {
11709            Self(RequestBuilder::new(stub))
11710        }
11711
11712        /// Sets the full request, replacing any prior values.
11713        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
11714            mut self,
11715            v: V,
11716        ) -> Self {
11717            self.0.request = v.into();
11718            self
11719        }
11720
11721        /// Sets all the options, replacing any prior values.
11722        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11723            self.0.options = v.into();
11724            self
11725        }
11726
11727        /// Sends the request.
11728        pub async fn send(self) -> Result<()> {
11729            (*self.0.stub)
11730                .cancel_operation(self.0.request, self.0.options)
11731                .await
11732                .map(crate::Response::into_body)
11733        }
11734
11735        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
11736        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11737            self.0.request.name = v.into();
11738            self
11739        }
11740    }
11741
11742    #[doc(hidden)]
11743    impl crate::RequestBuilder for CancelOperation {
11744        fn request_options(&mut self) -> &mut crate::RequestOptions {
11745            &mut self.0.options
11746        }
11747    }
11748}
11749
11750/// Request and client builders for [DataTaxonomyService][crate::client::DataTaxonomyService].
11751pub mod data_taxonomy_service {
11752    use crate::Result;
11753
11754    /// A builder for [DataTaxonomyService][crate::client::DataTaxonomyService].
11755    ///
11756    /// ```
11757    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
11758    /// # use google_cloud_dataplex_v1::*;
11759    /// # use builder::data_taxonomy_service::ClientBuilder;
11760    /// # use client::DataTaxonomyService;
11761    /// let builder : ClientBuilder = DataTaxonomyService::builder();
11762    /// let client = builder
11763    ///     .with_endpoint("https://dataplex.googleapis.com")
11764    ///     .build().await?;
11765    /// # Ok(()) }
11766    /// ```
11767    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
11768
11769    pub(crate) mod client {
11770        use super::super::super::client::DataTaxonomyService;
11771        pub struct Factory;
11772        impl crate::ClientFactory for Factory {
11773            type Client = DataTaxonomyService;
11774            type Credentials = gaxi::options::Credentials;
11775            async fn build(
11776                self,
11777                config: gaxi::options::ClientConfig,
11778            ) -> crate::ClientBuilderResult<Self::Client> {
11779                Self::Client::new(config).await
11780            }
11781        }
11782    }
11783
11784    /// Common implementation for [crate::client::DataTaxonomyService] request builders.
11785    #[derive(Clone, Debug)]
11786    pub(crate) struct RequestBuilder<R: std::default::Default> {
11787        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11788        request: R,
11789        options: crate::RequestOptions,
11790    }
11791
11792    impl<R> RequestBuilder<R>
11793    where
11794        R: std::default::Default,
11795    {
11796        pub(crate) fn new(
11797            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11798        ) -> Self {
11799            Self {
11800                stub,
11801                request: R::default(),
11802                options: crate::RequestOptions::default(),
11803            }
11804        }
11805    }
11806
11807    /// The request builder for [DataTaxonomyService::create_data_taxonomy][crate::client::DataTaxonomyService::create_data_taxonomy] calls.
11808    ///
11809    /// # Example
11810    /// ```
11811    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CreateDataTaxonomy;
11812    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11813    /// use google_cloud_lro::Poller;
11814    ///
11815    /// let builder = prepare_request_builder();
11816    /// let response = builder.poller().until_done().await?;
11817    /// # Ok(()) }
11818    ///
11819    /// fn prepare_request_builder() -> CreateDataTaxonomy {
11820    ///   # panic!();
11821    ///   // ... details omitted ...
11822    /// }
11823    /// ```
11824    #[derive(Clone, Debug)]
11825    pub struct CreateDataTaxonomy(RequestBuilder<crate::model::CreateDataTaxonomyRequest>);
11826
11827    impl CreateDataTaxonomy {
11828        pub(crate) fn new(
11829            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11830        ) -> Self {
11831            Self(RequestBuilder::new(stub))
11832        }
11833
11834        /// Sets the full request, replacing any prior values.
11835        pub fn with_request<V: Into<crate::model::CreateDataTaxonomyRequest>>(
11836            mut self,
11837            v: V,
11838        ) -> Self {
11839            self.0.request = v.into();
11840            self
11841        }
11842
11843        /// Sets all the options, replacing any prior values.
11844        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11845            self.0.options = v.into();
11846            self
11847        }
11848
11849        /// Sends the request.
11850        ///
11851        /// # Long running operations
11852        ///
11853        /// This starts, but does not poll, a longrunning operation. More information
11854        /// on [create_data_taxonomy][crate::client::DataTaxonomyService::create_data_taxonomy].
11855        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11856            (*self.0.stub)
11857                .create_data_taxonomy(self.0.request, self.0.options)
11858                .await
11859                .map(crate::Response::into_body)
11860        }
11861
11862        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_taxonomy`.
11863        pub fn poller(
11864            self,
11865        ) -> impl google_cloud_lro::Poller<crate::model::DataTaxonomy, crate::model::OperationMetadata>
11866        {
11867            type Operation = google_cloud_lro::internal::Operation<
11868                crate::model::DataTaxonomy,
11869                crate::model::OperationMetadata,
11870            >;
11871            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11872            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11873            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
11874            if let Some(ref mut details) = poller_options.tracing {
11875                details.method_name = "google_cloud_dataplex_v1::client::DataTaxonomyService::create_data_taxonomy::until_done";
11876            }
11877
11878            let stub = self.0.stub.clone();
11879            let mut options = self.0.options.clone();
11880            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
11881            let query = move |name| {
11882                let stub = stub.clone();
11883                let options = options.clone();
11884                async {
11885                    let op = GetOperation::new(stub)
11886                        .set_name(name)
11887                        .with_options(options)
11888                        .send()
11889                        .await?;
11890                    Ok(Operation::new(op))
11891                }
11892            };
11893
11894            let start = move || async {
11895                let op = self.send().await?;
11896                Ok(Operation::new(op))
11897            };
11898
11899            use google_cloud_lro::internal::PollerExt;
11900            {
11901                google_cloud_lro::internal::new_poller(
11902                    polling_error_policy,
11903                    polling_backoff_policy,
11904                    start,
11905                    query,
11906                )
11907            }
11908            .with_options(poller_options)
11909        }
11910
11911        /// Sets the value of [parent][crate::model::CreateDataTaxonomyRequest::parent].
11912        ///
11913        /// This is a **required** field for requests.
11914        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
11915            self.0.request.parent = v.into();
11916            self
11917        }
11918
11919        /// Sets the value of [data_taxonomy_id][crate::model::CreateDataTaxonomyRequest::data_taxonomy_id].
11920        ///
11921        /// This is a **required** field for requests.
11922        pub fn set_data_taxonomy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
11923            self.0.request.data_taxonomy_id = v.into();
11924            self
11925        }
11926
11927        /// Sets the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
11928        ///
11929        /// This is a **required** field for requests.
11930        pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
11931        where
11932            T: std::convert::Into<crate::model::DataTaxonomy>,
11933        {
11934            self.0.request.data_taxonomy = std::option::Option::Some(v.into());
11935            self
11936        }
11937
11938        /// Sets or clears the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
11939        ///
11940        /// This is a **required** field for requests.
11941        pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
11942        where
11943            T: std::convert::Into<crate::model::DataTaxonomy>,
11944        {
11945            self.0.request.data_taxonomy = v.map(|x| x.into());
11946            self
11947        }
11948
11949        /// Sets the value of [validate_only][crate::model::CreateDataTaxonomyRequest::validate_only].
11950        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
11951            self.0.request.validate_only = v.into();
11952            self
11953        }
11954    }
11955
11956    #[doc(hidden)]
11957    impl crate::RequestBuilder for CreateDataTaxonomy {
11958        fn request_options(&mut self) -> &mut crate::RequestOptions {
11959            &mut self.0.options
11960        }
11961    }
11962
11963    /// The request builder for [DataTaxonomyService::update_data_taxonomy][crate::client::DataTaxonomyService::update_data_taxonomy] calls.
11964    ///
11965    /// # Example
11966    /// ```
11967    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::UpdateDataTaxonomy;
11968    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
11969    /// use google_cloud_lro::Poller;
11970    ///
11971    /// let builder = prepare_request_builder();
11972    /// let response = builder.poller().until_done().await?;
11973    /// # Ok(()) }
11974    ///
11975    /// fn prepare_request_builder() -> UpdateDataTaxonomy {
11976    ///   # panic!();
11977    ///   // ... details omitted ...
11978    /// }
11979    /// ```
11980    #[derive(Clone, Debug)]
11981    pub struct UpdateDataTaxonomy(RequestBuilder<crate::model::UpdateDataTaxonomyRequest>);
11982
11983    impl UpdateDataTaxonomy {
11984        pub(crate) fn new(
11985            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11986        ) -> Self {
11987            Self(RequestBuilder::new(stub))
11988        }
11989
11990        /// Sets the full request, replacing any prior values.
11991        pub fn with_request<V: Into<crate::model::UpdateDataTaxonomyRequest>>(
11992            mut self,
11993            v: V,
11994        ) -> Self {
11995            self.0.request = v.into();
11996            self
11997        }
11998
11999        /// Sets all the options, replacing any prior values.
12000        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12001            self.0.options = v.into();
12002            self
12003        }
12004
12005        /// Sends the request.
12006        ///
12007        /// # Long running operations
12008        ///
12009        /// This starts, but does not poll, a longrunning operation. More information
12010        /// on [update_data_taxonomy][crate::client::DataTaxonomyService::update_data_taxonomy].
12011        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12012            (*self.0.stub)
12013                .update_data_taxonomy(self.0.request, self.0.options)
12014                .await
12015                .map(crate::Response::into_body)
12016        }
12017
12018        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_taxonomy`.
12019        pub fn poller(
12020            self,
12021        ) -> impl google_cloud_lro::Poller<crate::model::DataTaxonomy, crate::model::OperationMetadata>
12022        {
12023            type Operation = google_cloud_lro::internal::Operation<
12024                crate::model::DataTaxonomy,
12025                crate::model::OperationMetadata,
12026            >;
12027            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12028            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12029            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
12030            if let Some(ref mut details) = poller_options.tracing {
12031                details.method_name = "google_cloud_dataplex_v1::client::DataTaxonomyService::update_data_taxonomy::until_done";
12032            }
12033
12034            let stub = self.0.stub.clone();
12035            let mut options = self.0.options.clone();
12036            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12037            let query = move |name| {
12038                let stub = stub.clone();
12039                let options = options.clone();
12040                async {
12041                    let op = GetOperation::new(stub)
12042                        .set_name(name)
12043                        .with_options(options)
12044                        .send()
12045                        .await?;
12046                    Ok(Operation::new(op))
12047                }
12048            };
12049
12050            let start = move || async {
12051                let op = self.send().await?;
12052                Ok(Operation::new(op))
12053            };
12054
12055            use google_cloud_lro::internal::PollerExt;
12056            {
12057                google_cloud_lro::internal::new_poller(
12058                    polling_error_policy,
12059                    polling_backoff_policy,
12060                    start,
12061                    query,
12062                )
12063            }
12064            .with_options(poller_options)
12065        }
12066
12067        /// Sets the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
12068        ///
12069        /// This is a **required** field for requests.
12070        pub fn set_update_mask<T>(mut self, v: T) -> Self
12071        where
12072            T: std::convert::Into<wkt::FieldMask>,
12073        {
12074            self.0.request.update_mask = std::option::Option::Some(v.into());
12075            self
12076        }
12077
12078        /// Sets or clears the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
12079        ///
12080        /// This is a **required** field for requests.
12081        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
12082        where
12083            T: std::convert::Into<wkt::FieldMask>,
12084        {
12085            self.0.request.update_mask = v.map(|x| x.into());
12086            self
12087        }
12088
12089        /// Sets the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
12090        ///
12091        /// This is a **required** field for requests.
12092        pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
12093        where
12094            T: std::convert::Into<crate::model::DataTaxonomy>,
12095        {
12096            self.0.request.data_taxonomy = std::option::Option::Some(v.into());
12097            self
12098        }
12099
12100        /// Sets or clears the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
12101        ///
12102        /// This is a **required** field for requests.
12103        pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
12104        where
12105            T: std::convert::Into<crate::model::DataTaxonomy>,
12106        {
12107            self.0.request.data_taxonomy = v.map(|x| x.into());
12108            self
12109        }
12110
12111        /// Sets the value of [validate_only][crate::model::UpdateDataTaxonomyRequest::validate_only].
12112        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12113            self.0.request.validate_only = v.into();
12114            self
12115        }
12116    }
12117
12118    #[doc(hidden)]
12119    impl crate::RequestBuilder for UpdateDataTaxonomy {
12120        fn request_options(&mut self) -> &mut crate::RequestOptions {
12121            &mut self.0.options
12122        }
12123    }
12124
12125    /// The request builder for [DataTaxonomyService::delete_data_taxonomy][crate::client::DataTaxonomyService::delete_data_taxonomy] calls.
12126    ///
12127    /// # Example
12128    /// ```
12129    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteDataTaxonomy;
12130    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12131    /// use google_cloud_lro::Poller;
12132    ///
12133    /// let builder = prepare_request_builder();
12134    /// let response = builder.poller().until_done().await?;
12135    /// # Ok(()) }
12136    ///
12137    /// fn prepare_request_builder() -> DeleteDataTaxonomy {
12138    ///   # panic!();
12139    ///   // ... details omitted ...
12140    /// }
12141    /// ```
12142    #[derive(Clone, Debug)]
12143    pub struct DeleteDataTaxonomy(RequestBuilder<crate::model::DeleteDataTaxonomyRequest>);
12144
12145    impl DeleteDataTaxonomy {
12146        pub(crate) fn new(
12147            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12148        ) -> Self {
12149            Self(RequestBuilder::new(stub))
12150        }
12151
12152        /// Sets the full request, replacing any prior values.
12153        pub fn with_request<V: Into<crate::model::DeleteDataTaxonomyRequest>>(
12154            mut self,
12155            v: V,
12156        ) -> Self {
12157            self.0.request = v.into();
12158            self
12159        }
12160
12161        /// Sets all the options, replacing any prior values.
12162        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12163            self.0.options = v.into();
12164            self
12165        }
12166
12167        /// Sends the request.
12168        ///
12169        /// # Long running operations
12170        ///
12171        /// This starts, but does not poll, a longrunning operation. More information
12172        /// on [delete_data_taxonomy][crate::client::DataTaxonomyService::delete_data_taxonomy].
12173        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12174            (*self.0.stub)
12175                .delete_data_taxonomy(self.0.request, self.0.options)
12176                .await
12177                .map(crate::Response::into_body)
12178        }
12179
12180        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_taxonomy`.
12181        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
12182            type Operation =
12183                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
12184            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12185            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12186            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
12187            if let Some(ref mut details) = poller_options.tracing {
12188                details.method_name = "google_cloud_dataplex_v1::client::DataTaxonomyService::delete_data_taxonomy::until_done";
12189            }
12190
12191            let stub = self.0.stub.clone();
12192            let mut options = self.0.options.clone();
12193            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12194            let query = move |name| {
12195                let stub = stub.clone();
12196                let options = options.clone();
12197                async {
12198                    let op = GetOperation::new(stub)
12199                        .set_name(name)
12200                        .with_options(options)
12201                        .send()
12202                        .await?;
12203                    Ok(Operation::new(op))
12204                }
12205            };
12206
12207            let start = move || async {
12208                let op = self.send().await?;
12209                Ok(Operation::new(op))
12210            };
12211
12212            use google_cloud_lro::internal::PollerExt;
12213            {
12214                google_cloud_lro::internal::new_unit_response_poller(
12215                    polling_error_policy,
12216                    polling_backoff_policy,
12217                    start,
12218                    query,
12219                )
12220            }
12221            .with_options(poller_options)
12222        }
12223
12224        /// Sets the value of [name][crate::model::DeleteDataTaxonomyRequest::name].
12225        ///
12226        /// This is a **required** field for requests.
12227        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12228            self.0.request.name = v.into();
12229            self
12230        }
12231
12232        /// Sets the value of [etag][crate::model::DeleteDataTaxonomyRequest::etag].
12233        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
12234            self.0.request.etag = v.into();
12235            self
12236        }
12237    }
12238
12239    #[doc(hidden)]
12240    impl crate::RequestBuilder for DeleteDataTaxonomy {
12241        fn request_options(&mut self) -> &mut crate::RequestOptions {
12242            &mut self.0.options
12243        }
12244    }
12245
12246    /// The request builder for [DataTaxonomyService::list_data_taxonomies][crate::client::DataTaxonomyService::list_data_taxonomies] calls.
12247    ///
12248    /// # Example
12249    /// ```
12250    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListDataTaxonomies;
12251    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12252    /// use google_cloud_gax::paginator::ItemPaginator;
12253    ///
12254    /// let builder = prepare_request_builder();
12255    /// let mut items = builder.by_item();
12256    /// while let Some(result) = items.next().await {
12257    ///   let item = result?;
12258    /// }
12259    /// # Ok(()) }
12260    ///
12261    /// fn prepare_request_builder() -> ListDataTaxonomies {
12262    ///   # panic!();
12263    ///   // ... details omitted ...
12264    /// }
12265    /// ```
12266    #[derive(Clone, Debug)]
12267    pub struct ListDataTaxonomies(RequestBuilder<crate::model::ListDataTaxonomiesRequest>);
12268
12269    impl ListDataTaxonomies {
12270        pub(crate) fn new(
12271            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12272        ) -> Self {
12273            Self(RequestBuilder::new(stub))
12274        }
12275
12276        /// Sets the full request, replacing any prior values.
12277        pub fn with_request<V: Into<crate::model::ListDataTaxonomiesRequest>>(
12278            mut self,
12279            v: V,
12280        ) -> Self {
12281            self.0.request = v.into();
12282            self
12283        }
12284
12285        /// Sets all the options, replacing any prior values.
12286        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12287            self.0.options = v.into();
12288            self
12289        }
12290
12291        /// Sends the request.
12292        pub async fn send(self) -> Result<crate::model::ListDataTaxonomiesResponse> {
12293            (*self.0.stub)
12294                .list_data_taxonomies(self.0.request, self.0.options)
12295                .await
12296                .map(crate::Response::into_body)
12297        }
12298
12299        /// Streams each page in the collection.
12300        pub fn by_page(
12301            self,
12302        ) -> impl google_cloud_gax::paginator::Paginator<
12303            crate::model::ListDataTaxonomiesResponse,
12304            crate::Error,
12305        > {
12306            use std::clone::Clone;
12307            let token = self.0.request.page_token.clone();
12308            let execute = move |token: String| {
12309                let mut builder = self.clone();
12310                builder.0.request = builder.0.request.set_page_token(token);
12311                builder.send()
12312            };
12313            google_cloud_gax::paginator::internal::new_paginator(token, execute)
12314        }
12315
12316        /// Streams each item in the collection.
12317        pub fn by_item(
12318            self,
12319        ) -> impl google_cloud_gax::paginator::ItemPaginator<
12320            crate::model::ListDataTaxonomiesResponse,
12321            crate::Error,
12322        > {
12323            use google_cloud_gax::paginator::Paginator;
12324            self.by_page().items()
12325        }
12326
12327        /// Sets the value of [parent][crate::model::ListDataTaxonomiesRequest::parent].
12328        ///
12329        /// This is a **required** field for requests.
12330        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12331            self.0.request.parent = v.into();
12332            self
12333        }
12334
12335        /// Sets the value of [page_size][crate::model::ListDataTaxonomiesRequest::page_size].
12336        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12337            self.0.request.page_size = v.into();
12338            self
12339        }
12340
12341        /// Sets the value of [page_token][crate::model::ListDataTaxonomiesRequest::page_token].
12342        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12343            self.0.request.page_token = v.into();
12344            self
12345        }
12346
12347        /// Sets the value of [filter][crate::model::ListDataTaxonomiesRequest::filter].
12348        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12349            self.0.request.filter = v.into();
12350            self
12351        }
12352
12353        /// Sets the value of [order_by][crate::model::ListDataTaxonomiesRequest::order_by].
12354        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
12355            self.0.request.order_by = v.into();
12356            self
12357        }
12358    }
12359
12360    #[doc(hidden)]
12361    impl crate::RequestBuilder for ListDataTaxonomies {
12362        fn request_options(&mut self) -> &mut crate::RequestOptions {
12363            &mut self.0.options
12364        }
12365    }
12366
12367    /// The request builder for [DataTaxonomyService::get_data_taxonomy][crate::client::DataTaxonomyService::get_data_taxonomy] calls.
12368    ///
12369    /// # Example
12370    /// ```
12371    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetDataTaxonomy;
12372    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12373    ///
12374    /// let builder = prepare_request_builder();
12375    /// let response = builder.send().await?;
12376    /// # Ok(()) }
12377    ///
12378    /// fn prepare_request_builder() -> GetDataTaxonomy {
12379    ///   # panic!();
12380    ///   // ... details omitted ...
12381    /// }
12382    /// ```
12383    #[derive(Clone, Debug)]
12384    pub struct GetDataTaxonomy(RequestBuilder<crate::model::GetDataTaxonomyRequest>);
12385
12386    impl GetDataTaxonomy {
12387        pub(crate) fn new(
12388            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12389        ) -> Self {
12390            Self(RequestBuilder::new(stub))
12391        }
12392
12393        /// Sets the full request, replacing any prior values.
12394        pub fn with_request<V: Into<crate::model::GetDataTaxonomyRequest>>(mut self, v: V) -> Self {
12395            self.0.request = v.into();
12396            self
12397        }
12398
12399        /// Sets all the options, replacing any prior values.
12400        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12401            self.0.options = v.into();
12402            self
12403        }
12404
12405        /// Sends the request.
12406        pub async fn send(self) -> Result<crate::model::DataTaxonomy> {
12407            (*self.0.stub)
12408                .get_data_taxonomy(self.0.request, self.0.options)
12409                .await
12410                .map(crate::Response::into_body)
12411        }
12412
12413        /// Sets the value of [name][crate::model::GetDataTaxonomyRequest::name].
12414        ///
12415        /// This is a **required** field for requests.
12416        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12417            self.0.request.name = v.into();
12418            self
12419        }
12420    }
12421
12422    #[doc(hidden)]
12423    impl crate::RequestBuilder for GetDataTaxonomy {
12424        fn request_options(&mut self) -> &mut crate::RequestOptions {
12425            &mut self.0.options
12426        }
12427    }
12428
12429    /// The request builder for [DataTaxonomyService::create_data_attribute_binding][crate::client::DataTaxonomyService::create_data_attribute_binding] calls.
12430    ///
12431    /// # Example
12432    /// ```
12433    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CreateDataAttributeBinding;
12434    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12435    /// use google_cloud_lro::Poller;
12436    ///
12437    /// let builder = prepare_request_builder();
12438    /// let response = builder.poller().until_done().await?;
12439    /// # Ok(()) }
12440    ///
12441    /// fn prepare_request_builder() -> CreateDataAttributeBinding {
12442    ///   # panic!();
12443    ///   // ... details omitted ...
12444    /// }
12445    /// ```
12446    #[derive(Clone, Debug)]
12447    pub struct CreateDataAttributeBinding(
12448        RequestBuilder<crate::model::CreateDataAttributeBindingRequest>,
12449    );
12450
12451    impl CreateDataAttributeBinding {
12452        pub(crate) fn new(
12453            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12454        ) -> Self {
12455            Self(RequestBuilder::new(stub))
12456        }
12457
12458        /// Sets the full request, replacing any prior values.
12459        pub fn with_request<V: Into<crate::model::CreateDataAttributeBindingRequest>>(
12460            mut self,
12461            v: V,
12462        ) -> Self {
12463            self.0.request = v.into();
12464            self
12465        }
12466
12467        /// Sets all the options, replacing any prior values.
12468        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12469            self.0.options = v.into();
12470            self
12471        }
12472
12473        /// Sends the request.
12474        ///
12475        /// # Long running operations
12476        ///
12477        /// This starts, but does not poll, a longrunning operation. More information
12478        /// on [create_data_attribute_binding][crate::client::DataTaxonomyService::create_data_attribute_binding].
12479        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12480            (*self.0.stub)
12481                .create_data_attribute_binding(self.0.request, self.0.options)
12482                .await
12483                .map(crate::Response::into_body)
12484        }
12485
12486        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_attribute_binding`.
12487        pub fn poller(
12488            self,
12489        ) -> impl google_cloud_lro::Poller<
12490            crate::model::DataAttributeBinding,
12491            crate::model::OperationMetadata,
12492        > {
12493            type Operation = google_cloud_lro::internal::Operation<
12494                crate::model::DataAttributeBinding,
12495                crate::model::OperationMetadata,
12496            >;
12497            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12498            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12499            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
12500            if let Some(ref mut details) = poller_options.tracing {
12501                details.method_name = "google_cloud_dataplex_v1::client::DataTaxonomyService::create_data_attribute_binding::until_done";
12502            }
12503
12504            let stub = self.0.stub.clone();
12505            let mut options = self.0.options.clone();
12506            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12507            let query = move |name| {
12508                let stub = stub.clone();
12509                let options = options.clone();
12510                async {
12511                    let op = GetOperation::new(stub)
12512                        .set_name(name)
12513                        .with_options(options)
12514                        .send()
12515                        .await?;
12516                    Ok(Operation::new(op))
12517                }
12518            };
12519
12520            let start = move || async {
12521                let op = self.send().await?;
12522                Ok(Operation::new(op))
12523            };
12524
12525            use google_cloud_lro::internal::PollerExt;
12526            {
12527                google_cloud_lro::internal::new_poller(
12528                    polling_error_policy,
12529                    polling_backoff_policy,
12530                    start,
12531                    query,
12532                )
12533            }
12534            .with_options(poller_options)
12535        }
12536
12537        /// Sets the value of [parent][crate::model::CreateDataAttributeBindingRequest::parent].
12538        ///
12539        /// This is a **required** field for requests.
12540        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12541            self.0.request.parent = v.into();
12542            self
12543        }
12544
12545        /// Sets the value of [data_attribute_binding_id][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding_id].
12546        ///
12547        /// This is a **required** field for requests.
12548        pub fn set_data_attribute_binding_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
12549            self.0.request.data_attribute_binding_id = v.into();
12550            self
12551        }
12552
12553        /// Sets the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
12554        ///
12555        /// This is a **required** field for requests.
12556        pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
12557        where
12558            T: std::convert::Into<crate::model::DataAttributeBinding>,
12559        {
12560            self.0.request.data_attribute_binding = std::option::Option::Some(v.into());
12561            self
12562        }
12563
12564        /// Sets or clears the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
12565        ///
12566        /// This is a **required** field for requests.
12567        pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
12568        where
12569            T: std::convert::Into<crate::model::DataAttributeBinding>,
12570        {
12571            self.0.request.data_attribute_binding = v.map(|x| x.into());
12572            self
12573        }
12574
12575        /// Sets the value of [validate_only][crate::model::CreateDataAttributeBindingRequest::validate_only].
12576        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12577            self.0.request.validate_only = v.into();
12578            self
12579        }
12580    }
12581
12582    #[doc(hidden)]
12583    impl crate::RequestBuilder for CreateDataAttributeBinding {
12584        fn request_options(&mut self) -> &mut crate::RequestOptions {
12585            &mut self.0.options
12586        }
12587    }
12588
12589    /// The request builder for [DataTaxonomyService::update_data_attribute_binding][crate::client::DataTaxonomyService::update_data_attribute_binding] calls.
12590    ///
12591    /// # Example
12592    /// ```
12593    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::UpdateDataAttributeBinding;
12594    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12595    /// use google_cloud_lro::Poller;
12596    ///
12597    /// let builder = prepare_request_builder();
12598    /// let response = builder.poller().until_done().await?;
12599    /// # Ok(()) }
12600    ///
12601    /// fn prepare_request_builder() -> UpdateDataAttributeBinding {
12602    ///   # panic!();
12603    ///   // ... details omitted ...
12604    /// }
12605    /// ```
12606    #[derive(Clone, Debug)]
12607    pub struct UpdateDataAttributeBinding(
12608        RequestBuilder<crate::model::UpdateDataAttributeBindingRequest>,
12609    );
12610
12611    impl UpdateDataAttributeBinding {
12612        pub(crate) fn new(
12613            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12614        ) -> Self {
12615            Self(RequestBuilder::new(stub))
12616        }
12617
12618        /// Sets the full request, replacing any prior values.
12619        pub fn with_request<V: Into<crate::model::UpdateDataAttributeBindingRequest>>(
12620            mut self,
12621            v: V,
12622        ) -> Self {
12623            self.0.request = v.into();
12624            self
12625        }
12626
12627        /// Sets all the options, replacing any prior values.
12628        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12629            self.0.options = v.into();
12630            self
12631        }
12632
12633        /// Sends the request.
12634        ///
12635        /// # Long running operations
12636        ///
12637        /// This starts, but does not poll, a longrunning operation. More information
12638        /// on [update_data_attribute_binding][crate::client::DataTaxonomyService::update_data_attribute_binding].
12639        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12640            (*self.0.stub)
12641                .update_data_attribute_binding(self.0.request, self.0.options)
12642                .await
12643                .map(crate::Response::into_body)
12644        }
12645
12646        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_attribute_binding`.
12647        pub fn poller(
12648            self,
12649        ) -> impl google_cloud_lro::Poller<
12650            crate::model::DataAttributeBinding,
12651            crate::model::OperationMetadata,
12652        > {
12653            type Operation = google_cloud_lro::internal::Operation<
12654                crate::model::DataAttributeBinding,
12655                crate::model::OperationMetadata,
12656            >;
12657            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12658            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12659            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
12660            if let Some(ref mut details) = poller_options.tracing {
12661                details.method_name = "google_cloud_dataplex_v1::client::DataTaxonomyService::update_data_attribute_binding::until_done";
12662            }
12663
12664            let stub = self.0.stub.clone();
12665            let mut options = self.0.options.clone();
12666            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12667            let query = move |name| {
12668                let stub = stub.clone();
12669                let options = options.clone();
12670                async {
12671                    let op = GetOperation::new(stub)
12672                        .set_name(name)
12673                        .with_options(options)
12674                        .send()
12675                        .await?;
12676                    Ok(Operation::new(op))
12677                }
12678            };
12679
12680            let start = move || async {
12681                let op = self.send().await?;
12682                Ok(Operation::new(op))
12683            };
12684
12685            use google_cloud_lro::internal::PollerExt;
12686            {
12687                google_cloud_lro::internal::new_poller(
12688                    polling_error_policy,
12689                    polling_backoff_policy,
12690                    start,
12691                    query,
12692                )
12693            }
12694            .with_options(poller_options)
12695        }
12696
12697        /// Sets the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
12698        ///
12699        /// This is a **required** field for requests.
12700        pub fn set_update_mask<T>(mut self, v: T) -> Self
12701        where
12702            T: std::convert::Into<wkt::FieldMask>,
12703        {
12704            self.0.request.update_mask = std::option::Option::Some(v.into());
12705            self
12706        }
12707
12708        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
12709        ///
12710        /// This is a **required** field for requests.
12711        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
12712        where
12713            T: std::convert::Into<wkt::FieldMask>,
12714        {
12715            self.0.request.update_mask = v.map(|x| x.into());
12716            self
12717        }
12718
12719        /// Sets the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
12720        ///
12721        /// This is a **required** field for requests.
12722        pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
12723        where
12724            T: std::convert::Into<crate::model::DataAttributeBinding>,
12725        {
12726            self.0.request.data_attribute_binding = std::option::Option::Some(v.into());
12727            self
12728        }
12729
12730        /// Sets or clears the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
12731        ///
12732        /// This is a **required** field for requests.
12733        pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
12734        where
12735            T: std::convert::Into<crate::model::DataAttributeBinding>,
12736        {
12737            self.0.request.data_attribute_binding = v.map(|x| x.into());
12738            self
12739        }
12740
12741        /// Sets the value of [validate_only][crate::model::UpdateDataAttributeBindingRequest::validate_only].
12742        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12743            self.0.request.validate_only = v.into();
12744            self
12745        }
12746    }
12747
12748    #[doc(hidden)]
12749    impl crate::RequestBuilder for UpdateDataAttributeBinding {
12750        fn request_options(&mut self) -> &mut crate::RequestOptions {
12751            &mut self.0.options
12752        }
12753    }
12754
12755    /// The request builder for [DataTaxonomyService::delete_data_attribute_binding][crate::client::DataTaxonomyService::delete_data_attribute_binding] calls.
12756    ///
12757    /// # Example
12758    /// ```
12759    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteDataAttributeBinding;
12760    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12761    /// use google_cloud_lro::Poller;
12762    ///
12763    /// let builder = prepare_request_builder();
12764    /// let response = builder.poller().until_done().await?;
12765    /// # Ok(()) }
12766    ///
12767    /// fn prepare_request_builder() -> DeleteDataAttributeBinding {
12768    ///   # panic!();
12769    ///   // ... details omitted ...
12770    /// }
12771    /// ```
12772    #[derive(Clone, Debug)]
12773    pub struct DeleteDataAttributeBinding(
12774        RequestBuilder<crate::model::DeleteDataAttributeBindingRequest>,
12775    );
12776
12777    impl DeleteDataAttributeBinding {
12778        pub(crate) fn new(
12779            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12780        ) -> Self {
12781            Self(RequestBuilder::new(stub))
12782        }
12783
12784        /// Sets the full request, replacing any prior values.
12785        pub fn with_request<V: Into<crate::model::DeleteDataAttributeBindingRequest>>(
12786            mut self,
12787            v: V,
12788        ) -> Self {
12789            self.0.request = v.into();
12790            self
12791        }
12792
12793        /// Sets all the options, replacing any prior values.
12794        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12795            self.0.options = v.into();
12796            self
12797        }
12798
12799        /// Sends the request.
12800        ///
12801        /// # Long running operations
12802        ///
12803        /// This starts, but does not poll, a longrunning operation. More information
12804        /// on [delete_data_attribute_binding][crate::client::DataTaxonomyService::delete_data_attribute_binding].
12805        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12806            (*self.0.stub)
12807                .delete_data_attribute_binding(self.0.request, self.0.options)
12808                .await
12809                .map(crate::Response::into_body)
12810        }
12811
12812        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_attribute_binding`.
12813        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
12814            type Operation =
12815                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
12816            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12817            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12818            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
12819            if let Some(ref mut details) = poller_options.tracing {
12820                details.method_name = "google_cloud_dataplex_v1::client::DataTaxonomyService::delete_data_attribute_binding::until_done";
12821            }
12822
12823            let stub = self.0.stub.clone();
12824            let mut options = self.0.options.clone();
12825            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12826            let query = move |name| {
12827                let stub = stub.clone();
12828                let options = options.clone();
12829                async {
12830                    let op = GetOperation::new(stub)
12831                        .set_name(name)
12832                        .with_options(options)
12833                        .send()
12834                        .await?;
12835                    Ok(Operation::new(op))
12836                }
12837            };
12838
12839            let start = move || async {
12840                let op = self.send().await?;
12841                Ok(Operation::new(op))
12842            };
12843
12844            use google_cloud_lro::internal::PollerExt;
12845            {
12846                google_cloud_lro::internal::new_unit_response_poller(
12847                    polling_error_policy,
12848                    polling_backoff_policy,
12849                    start,
12850                    query,
12851                )
12852            }
12853            .with_options(poller_options)
12854        }
12855
12856        /// Sets the value of [name][crate::model::DeleteDataAttributeBindingRequest::name].
12857        ///
12858        /// This is a **required** field for requests.
12859        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12860            self.0.request.name = v.into();
12861            self
12862        }
12863
12864        /// Sets the value of [etag][crate::model::DeleteDataAttributeBindingRequest::etag].
12865        ///
12866        /// This is a **required** field for requests.
12867        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
12868            self.0.request.etag = v.into();
12869            self
12870        }
12871    }
12872
12873    #[doc(hidden)]
12874    impl crate::RequestBuilder for DeleteDataAttributeBinding {
12875        fn request_options(&mut self) -> &mut crate::RequestOptions {
12876            &mut self.0.options
12877        }
12878    }
12879
12880    /// The request builder for [DataTaxonomyService::list_data_attribute_bindings][crate::client::DataTaxonomyService::list_data_attribute_bindings] calls.
12881    ///
12882    /// # Example
12883    /// ```
12884    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListDataAttributeBindings;
12885    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
12886    /// use google_cloud_gax::paginator::ItemPaginator;
12887    ///
12888    /// let builder = prepare_request_builder();
12889    /// let mut items = builder.by_item();
12890    /// while let Some(result) = items.next().await {
12891    ///   let item = result?;
12892    /// }
12893    /// # Ok(()) }
12894    ///
12895    /// fn prepare_request_builder() -> ListDataAttributeBindings {
12896    ///   # panic!();
12897    ///   // ... details omitted ...
12898    /// }
12899    /// ```
12900    #[derive(Clone, Debug)]
12901    pub struct ListDataAttributeBindings(
12902        RequestBuilder<crate::model::ListDataAttributeBindingsRequest>,
12903    );
12904
12905    impl ListDataAttributeBindings {
12906        pub(crate) fn new(
12907            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12908        ) -> Self {
12909            Self(RequestBuilder::new(stub))
12910        }
12911
12912        /// Sets the full request, replacing any prior values.
12913        pub fn with_request<V: Into<crate::model::ListDataAttributeBindingsRequest>>(
12914            mut self,
12915            v: V,
12916        ) -> Self {
12917            self.0.request = v.into();
12918            self
12919        }
12920
12921        /// Sets all the options, replacing any prior values.
12922        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12923            self.0.options = v.into();
12924            self
12925        }
12926
12927        /// Sends the request.
12928        pub async fn send(self) -> Result<crate::model::ListDataAttributeBindingsResponse> {
12929            (*self.0.stub)
12930                .list_data_attribute_bindings(self.0.request, self.0.options)
12931                .await
12932                .map(crate::Response::into_body)
12933        }
12934
12935        /// Streams each page in the collection.
12936        pub fn by_page(
12937            self,
12938        ) -> impl google_cloud_gax::paginator::Paginator<
12939            crate::model::ListDataAttributeBindingsResponse,
12940            crate::Error,
12941        > {
12942            use std::clone::Clone;
12943            let token = self.0.request.page_token.clone();
12944            let execute = move |token: String| {
12945                let mut builder = self.clone();
12946                builder.0.request = builder.0.request.set_page_token(token);
12947                builder.send()
12948            };
12949            google_cloud_gax::paginator::internal::new_paginator(token, execute)
12950        }
12951
12952        /// Streams each item in the collection.
12953        pub fn by_item(
12954            self,
12955        ) -> impl google_cloud_gax::paginator::ItemPaginator<
12956            crate::model::ListDataAttributeBindingsResponse,
12957            crate::Error,
12958        > {
12959            use google_cloud_gax::paginator::Paginator;
12960            self.by_page().items()
12961        }
12962
12963        /// Sets the value of [parent][crate::model::ListDataAttributeBindingsRequest::parent].
12964        ///
12965        /// This is a **required** field for requests.
12966        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12967            self.0.request.parent = v.into();
12968            self
12969        }
12970
12971        /// Sets the value of [page_size][crate::model::ListDataAttributeBindingsRequest::page_size].
12972        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12973            self.0.request.page_size = v.into();
12974            self
12975        }
12976
12977        /// Sets the value of [page_token][crate::model::ListDataAttributeBindingsRequest::page_token].
12978        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12979            self.0.request.page_token = v.into();
12980            self
12981        }
12982
12983        /// Sets the value of [filter][crate::model::ListDataAttributeBindingsRequest::filter].
12984        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12985            self.0.request.filter = v.into();
12986            self
12987        }
12988
12989        /// Sets the value of [order_by][crate::model::ListDataAttributeBindingsRequest::order_by].
12990        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
12991            self.0.request.order_by = v.into();
12992            self
12993        }
12994    }
12995
12996    #[doc(hidden)]
12997    impl crate::RequestBuilder for ListDataAttributeBindings {
12998        fn request_options(&mut self) -> &mut crate::RequestOptions {
12999            &mut self.0.options
13000        }
13001    }
13002
13003    /// The request builder for [DataTaxonomyService::get_data_attribute_binding][crate::client::DataTaxonomyService::get_data_attribute_binding] calls.
13004    ///
13005    /// # Example
13006    /// ```
13007    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetDataAttributeBinding;
13008    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13009    ///
13010    /// let builder = prepare_request_builder();
13011    /// let response = builder.send().await?;
13012    /// # Ok(()) }
13013    ///
13014    /// fn prepare_request_builder() -> GetDataAttributeBinding {
13015    ///   # panic!();
13016    ///   // ... details omitted ...
13017    /// }
13018    /// ```
13019    #[derive(Clone, Debug)]
13020    pub struct GetDataAttributeBinding(
13021        RequestBuilder<crate::model::GetDataAttributeBindingRequest>,
13022    );
13023
13024    impl GetDataAttributeBinding {
13025        pub(crate) fn new(
13026            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13027        ) -> Self {
13028            Self(RequestBuilder::new(stub))
13029        }
13030
13031        /// Sets the full request, replacing any prior values.
13032        pub fn with_request<V: Into<crate::model::GetDataAttributeBindingRequest>>(
13033            mut self,
13034            v: V,
13035        ) -> Self {
13036            self.0.request = v.into();
13037            self
13038        }
13039
13040        /// Sets all the options, replacing any prior values.
13041        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13042            self.0.options = v.into();
13043            self
13044        }
13045
13046        /// Sends the request.
13047        pub async fn send(self) -> Result<crate::model::DataAttributeBinding> {
13048            (*self.0.stub)
13049                .get_data_attribute_binding(self.0.request, self.0.options)
13050                .await
13051                .map(crate::Response::into_body)
13052        }
13053
13054        /// Sets the value of [name][crate::model::GetDataAttributeBindingRequest::name].
13055        ///
13056        /// This is a **required** field for requests.
13057        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13058            self.0.request.name = v.into();
13059            self
13060        }
13061    }
13062
13063    #[doc(hidden)]
13064    impl crate::RequestBuilder for GetDataAttributeBinding {
13065        fn request_options(&mut self) -> &mut crate::RequestOptions {
13066            &mut self.0.options
13067        }
13068    }
13069
13070    /// The request builder for [DataTaxonomyService::create_data_attribute][crate::client::DataTaxonomyService::create_data_attribute] calls.
13071    ///
13072    /// # Example
13073    /// ```
13074    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CreateDataAttribute;
13075    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13076    /// use google_cloud_lro::Poller;
13077    ///
13078    /// let builder = prepare_request_builder();
13079    /// let response = builder.poller().until_done().await?;
13080    /// # Ok(()) }
13081    ///
13082    /// fn prepare_request_builder() -> CreateDataAttribute {
13083    ///   # panic!();
13084    ///   // ... details omitted ...
13085    /// }
13086    /// ```
13087    #[derive(Clone, Debug)]
13088    pub struct CreateDataAttribute(RequestBuilder<crate::model::CreateDataAttributeRequest>);
13089
13090    impl CreateDataAttribute {
13091        pub(crate) fn new(
13092            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13093        ) -> Self {
13094            Self(RequestBuilder::new(stub))
13095        }
13096
13097        /// Sets the full request, replacing any prior values.
13098        pub fn with_request<V: Into<crate::model::CreateDataAttributeRequest>>(
13099            mut self,
13100            v: V,
13101        ) -> Self {
13102            self.0.request = v.into();
13103            self
13104        }
13105
13106        /// Sets all the options, replacing any prior values.
13107        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13108            self.0.options = v.into();
13109            self
13110        }
13111
13112        /// Sends the request.
13113        ///
13114        /// # Long running operations
13115        ///
13116        /// This starts, but does not poll, a longrunning operation. More information
13117        /// on [create_data_attribute][crate::client::DataTaxonomyService::create_data_attribute].
13118        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
13119            (*self.0.stub)
13120                .create_data_attribute(self.0.request, self.0.options)
13121                .await
13122                .map(crate::Response::into_body)
13123        }
13124
13125        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_attribute`.
13126        pub fn poller(
13127            self,
13128        ) -> impl google_cloud_lro::Poller<crate::model::DataAttribute, crate::model::OperationMetadata>
13129        {
13130            type Operation = google_cloud_lro::internal::Operation<
13131                crate::model::DataAttribute,
13132                crate::model::OperationMetadata,
13133            >;
13134            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
13135            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
13136            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
13137            if let Some(ref mut details) = poller_options.tracing {
13138                details.method_name = "google_cloud_dataplex_v1::client::DataTaxonomyService::create_data_attribute::until_done";
13139            }
13140
13141            let stub = self.0.stub.clone();
13142            let mut options = self.0.options.clone();
13143            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
13144            let query = move |name| {
13145                let stub = stub.clone();
13146                let options = options.clone();
13147                async {
13148                    let op = GetOperation::new(stub)
13149                        .set_name(name)
13150                        .with_options(options)
13151                        .send()
13152                        .await?;
13153                    Ok(Operation::new(op))
13154                }
13155            };
13156
13157            let start = move || async {
13158                let op = self.send().await?;
13159                Ok(Operation::new(op))
13160            };
13161
13162            use google_cloud_lro::internal::PollerExt;
13163            {
13164                google_cloud_lro::internal::new_poller(
13165                    polling_error_policy,
13166                    polling_backoff_policy,
13167                    start,
13168                    query,
13169                )
13170            }
13171            .with_options(poller_options)
13172        }
13173
13174        /// Sets the value of [parent][crate::model::CreateDataAttributeRequest::parent].
13175        ///
13176        /// This is a **required** field for requests.
13177        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13178            self.0.request.parent = v.into();
13179            self
13180        }
13181
13182        /// Sets the value of [data_attribute_id][crate::model::CreateDataAttributeRequest::data_attribute_id].
13183        ///
13184        /// This is a **required** field for requests.
13185        pub fn set_data_attribute_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
13186            self.0.request.data_attribute_id = v.into();
13187            self
13188        }
13189
13190        /// Sets the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
13191        ///
13192        /// This is a **required** field for requests.
13193        pub fn set_data_attribute<T>(mut self, v: T) -> Self
13194        where
13195            T: std::convert::Into<crate::model::DataAttribute>,
13196        {
13197            self.0.request.data_attribute = std::option::Option::Some(v.into());
13198            self
13199        }
13200
13201        /// Sets or clears the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
13202        ///
13203        /// This is a **required** field for requests.
13204        pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
13205        where
13206            T: std::convert::Into<crate::model::DataAttribute>,
13207        {
13208            self.0.request.data_attribute = v.map(|x| x.into());
13209            self
13210        }
13211
13212        /// Sets the value of [validate_only][crate::model::CreateDataAttributeRequest::validate_only].
13213        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
13214            self.0.request.validate_only = v.into();
13215            self
13216        }
13217    }
13218
13219    #[doc(hidden)]
13220    impl crate::RequestBuilder for CreateDataAttribute {
13221        fn request_options(&mut self) -> &mut crate::RequestOptions {
13222            &mut self.0.options
13223        }
13224    }
13225
13226    /// The request builder for [DataTaxonomyService::update_data_attribute][crate::client::DataTaxonomyService::update_data_attribute] calls.
13227    ///
13228    /// # Example
13229    /// ```
13230    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::UpdateDataAttribute;
13231    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13232    /// use google_cloud_lro::Poller;
13233    ///
13234    /// let builder = prepare_request_builder();
13235    /// let response = builder.poller().until_done().await?;
13236    /// # Ok(()) }
13237    ///
13238    /// fn prepare_request_builder() -> UpdateDataAttribute {
13239    ///   # panic!();
13240    ///   // ... details omitted ...
13241    /// }
13242    /// ```
13243    #[derive(Clone, Debug)]
13244    pub struct UpdateDataAttribute(RequestBuilder<crate::model::UpdateDataAttributeRequest>);
13245
13246    impl UpdateDataAttribute {
13247        pub(crate) fn new(
13248            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13249        ) -> Self {
13250            Self(RequestBuilder::new(stub))
13251        }
13252
13253        /// Sets the full request, replacing any prior values.
13254        pub fn with_request<V: Into<crate::model::UpdateDataAttributeRequest>>(
13255            mut self,
13256            v: V,
13257        ) -> Self {
13258            self.0.request = v.into();
13259            self
13260        }
13261
13262        /// Sets all the options, replacing any prior values.
13263        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13264            self.0.options = v.into();
13265            self
13266        }
13267
13268        /// Sends the request.
13269        ///
13270        /// # Long running operations
13271        ///
13272        /// This starts, but does not poll, a longrunning operation. More information
13273        /// on [update_data_attribute][crate::client::DataTaxonomyService::update_data_attribute].
13274        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
13275            (*self.0.stub)
13276                .update_data_attribute(self.0.request, self.0.options)
13277                .await
13278                .map(crate::Response::into_body)
13279        }
13280
13281        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_attribute`.
13282        pub fn poller(
13283            self,
13284        ) -> impl google_cloud_lro::Poller<crate::model::DataAttribute, crate::model::OperationMetadata>
13285        {
13286            type Operation = google_cloud_lro::internal::Operation<
13287                crate::model::DataAttribute,
13288                crate::model::OperationMetadata,
13289            >;
13290            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
13291            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
13292            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
13293            if let Some(ref mut details) = poller_options.tracing {
13294                details.method_name = "google_cloud_dataplex_v1::client::DataTaxonomyService::update_data_attribute::until_done";
13295            }
13296
13297            let stub = self.0.stub.clone();
13298            let mut options = self.0.options.clone();
13299            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
13300            let query = move |name| {
13301                let stub = stub.clone();
13302                let options = options.clone();
13303                async {
13304                    let op = GetOperation::new(stub)
13305                        .set_name(name)
13306                        .with_options(options)
13307                        .send()
13308                        .await?;
13309                    Ok(Operation::new(op))
13310                }
13311            };
13312
13313            let start = move || async {
13314                let op = self.send().await?;
13315                Ok(Operation::new(op))
13316            };
13317
13318            use google_cloud_lro::internal::PollerExt;
13319            {
13320                google_cloud_lro::internal::new_poller(
13321                    polling_error_policy,
13322                    polling_backoff_policy,
13323                    start,
13324                    query,
13325                )
13326            }
13327            .with_options(poller_options)
13328        }
13329
13330        /// Sets the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
13331        ///
13332        /// This is a **required** field for requests.
13333        pub fn set_update_mask<T>(mut self, v: T) -> Self
13334        where
13335            T: std::convert::Into<wkt::FieldMask>,
13336        {
13337            self.0.request.update_mask = std::option::Option::Some(v.into());
13338            self
13339        }
13340
13341        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
13342        ///
13343        /// This is a **required** field for requests.
13344        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
13345        where
13346            T: std::convert::Into<wkt::FieldMask>,
13347        {
13348            self.0.request.update_mask = v.map(|x| x.into());
13349            self
13350        }
13351
13352        /// Sets the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
13353        ///
13354        /// This is a **required** field for requests.
13355        pub fn set_data_attribute<T>(mut self, v: T) -> Self
13356        where
13357            T: std::convert::Into<crate::model::DataAttribute>,
13358        {
13359            self.0.request.data_attribute = std::option::Option::Some(v.into());
13360            self
13361        }
13362
13363        /// Sets or clears the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
13364        ///
13365        /// This is a **required** field for requests.
13366        pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
13367        where
13368            T: std::convert::Into<crate::model::DataAttribute>,
13369        {
13370            self.0.request.data_attribute = v.map(|x| x.into());
13371            self
13372        }
13373
13374        /// Sets the value of [validate_only][crate::model::UpdateDataAttributeRequest::validate_only].
13375        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
13376            self.0.request.validate_only = v.into();
13377            self
13378        }
13379    }
13380
13381    #[doc(hidden)]
13382    impl crate::RequestBuilder for UpdateDataAttribute {
13383        fn request_options(&mut self) -> &mut crate::RequestOptions {
13384            &mut self.0.options
13385        }
13386    }
13387
13388    /// The request builder for [DataTaxonomyService::delete_data_attribute][crate::client::DataTaxonomyService::delete_data_attribute] calls.
13389    ///
13390    /// # Example
13391    /// ```
13392    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteDataAttribute;
13393    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13394    /// use google_cloud_lro::Poller;
13395    ///
13396    /// let builder = prepare_request_builder();
13397    /// let response = builder.poller().until_done().await?;
13398    /// # Ok(()) }
13399    ///
13400    /// fn prepare_request_builder() -> DeleteDataAttribute {
13401    ///   # panic!();
13402    ///   // ... details omitted ...
13403    /// }
13404    /// ```
13405    #[derive(Clone, Debug)]
13406    pub struct DeleteDataAttribute(RequestBuilder<crate::model::DeleteDataAttributeRequest>);
13407
13408    impl DeleteDataAttribute {
13409        pub(crate) fn new(
13410            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13411        ) -> Self {
13412            Self(RequestBuilder::new(stub))
13413        }
13414
13415        /// Sets the full request, replacing any prior values.
13416        pub fn with_request<V: Into<crate::model::DeleteDataAttributeRequest>>(
13417            mut self,
13418            v: V,
13419        ) -> Self {
13420            self.0.request = v.into();
13421            self
13422        }
13423
13424        /// Sets all the options, replacing any prior values.
13425        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13426            self.0.options = v.into();
13427            self
13428        }
13429
13430        /// Sends the request.
13431        ///
13432        /// # Long running operations
13433        ///
13434        /// This starts, but does not poll, a longrunning operation. More information
13435        /// on [delete_data_attribute][crate::client::DataTaxonomyService::delete_data_attribute].
13436        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
13437            (*self.0.stub)
13438                .delete_data_attribute(self.0.request, self.0.options)
13439                .await
13440                .map(crate::Response::into_body)
13441        }
13442
13443        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_attribute`.
13444        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
13445            type Operation =
13446                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
13447            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
13448            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
13449            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
13450            if let Some(ref mut details) = poller_options.tracing {
13451                details.method_name = "google_cloud_dataplex_v1::client::DataTaxonomyService::delete_data_attribute::until_done";
13452            }
13453
13454            let stub = self.0.stub.clone();
13455            let mut options = self.0.options.clone();
13456            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
13457            let query = move |name| {
13458                let stub = stub.clone();
13459                let options = options.clone();
13460                async {
13461                    let op = GetOperation::new(stub)
13462                        .set_name(name)
13463                        .with_options(options)
13464                        .send()
13465                        .await?;
13466                    Ok(Operation::new(op))
13467                }
13468            };
13469
13470            let start = move || async {
13471                let op = self.send().await?;
13472                Ok(Operation::new(op))
13473            };
13474
13475            use google_cloud_lro::internal::PollerExt;
13476            {
13477                google_cloud_lro::internal::new_unit_response_poller(
13478                    polling_error_policy,
13479                    polling_backoff_policy,
13480                    start,
13481                    query,
13482                )
13483            }
13484            .with_options(poller_options)
13485        }
13486
13487        /// Sets the value of [name][crate::model::DeleteDataAttributeRequest::name].
13488        ///
13489        /// This is a **required** field for requests.
13490        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13491            self.0.request.name = v.into();
13492            self
13493        }
13494
13495        /// Sets the value of [etag][crate::model::DeleteDataAttributeRequest::etag].
13496        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
13497            self.0.request.etag = v.into();
13498            self
13499        }
13500    }
13501
13502    #[doc(hidden)]
13503    impl crate::RequestBuilder for DeleteDataAttribute {
13504        fn request_options(&mut self) -> &mut crate::RequestOptions {
13505            &mut self.0.options
13506        }
13507    }
13508
13509    /// The request builder for [DataTaxonomyService::list_data_attributes][crate::client::DataTaxonomyService::list_data_attributes] calls.
13510    ///
13511    /// # Example
13512    /// ```
13513    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListDataAttributes;
13514    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13515    /// use google_cloud_gax::paginator::ItemPaginator;
13516    ///
13517    /// let builder = prepare_request_builder();
13518    /// let mut items = builder.by_item();
13519    /// while let Some(result) = items.next().await {
13520    ///   let item = result?;
13521    /// }
13522    /// # Ok(()) }
13523    ///
13524    /// fn prepare_request_builder() -> ListDataAttributes {
13525    ///   # panic!();
13526    ///   // ... details omitted ...
13527    /// }
13528    /// ```
13529    #[derive(Clone, Debug)]
13530    pub struct ListDataAttributes(RequestBuilder<crate::model::ListDataAttributesRequest>);
13531
13532    impl ListDataAttributes {
13533        pub(crate) fn new(
13534            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13535        ) -> Self {
13536            Self(RequestBuilder::new(stub))
13537        }
13538
13539        /// Sets the full request, replacing any prior values.
13540        pub fn with_request<V: Into<crate::model::ListDataAttributesRequest>>(
13541            mut self,
13542            v: V,
13543        ) -> Self {
13544            self.0.request = v.into();
13545            self
13546        }
13547
13548        /// Sets all the options, replacing any prior values.
13549        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13550            self.0.options = v.into();
13551            self
13552        }
13553
13554        /// Sends the request.
13555        pub async fn send(self) -> Result<crate::model::ListDataAttributesResponse> {
13556            (*self.0.stub)
13557                .list_data_attributes(self.0.request, self.0.options)
13558                .await
13559                .map(crate::Response::into_body)
13560        }
13561
13562        /// Streams each page in the collection.
13563        pub fn by_page(
13564            self,
13565        ) -> impl google_cloud_gax::paginator::Paginator<
13566            crate::model::ListDataAttributesResponse,
13567            crate::Error,
13568        > {
13569            use std::clone::Clone;
13570            let token = self.0.request.page_token.clone();
13571            let execute = move |token: String| {
13572                let mut builder = self.clone();
13573                builder.0.request = builder.0.request.set_page_token(token);
13574                builder.send()
13575            };
13576            google_cloud_gax::paginator::internal::new_paginator(token, execute)
13577        }
13578
13579        /// Streams each item in the collection.
13580        pub fn by_item(
13581            self,
13582        ) -> impl google_cloud_gax::paginator::ItemPaginator<
13583            crate::model::ListDataAttributesResponse,
13584            crate::Error,
13585        > {
13586            use google_cloud_gax::paginator::Paginator;
13587            self.by_page().items()
13588        }
13589
13590        /// Sets the value of [parent][crate::model::ListDataAttributesRequest::parent].
13591        ///
13592        /// This is a **required** field for requests.
13593        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13594            self.0.request.parent = v.into();
13595            self
13596        }
13597
13598        /// Sets the value of [page_size][crate::model::ListDataAttributesRequest::page_size].
13599        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13600            self.0.request.page_size = v.into();
13601            self
13602        }
13603
13604        /// Sets the value of [page_token][crate::model::ListDataAttributesRequest::page_token].
13605        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13606            self.0.request.page_token = v.into();
13607            self
13608        }
13609
13610        /// Sets the value of [filter][crate::model::ListDataAttributesRequest::filter].
13611        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13612            self.0.request.filter = v.into();
13613            self
13614        }
13615
13616        /// Sets the value of [order_by][crate::model::ListDataAttributesRequest::order_by].
13617        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
13618            self.0.request.order_by = v.into();
13619            self
13620        }
13621    }
13622
13623    #[doc(hidden)]
13624    impl crate::RequestBuilder for ListDataAttributes {
13625        fn request_options(&mut self) -> &mut crate::RequestOptions {
13626            &mut self.0.options
13627        }
13628    }
13629
13630    /// The request builder for [DataTaxonomyService::get_data_attribute][crate::client::DataTaxonomyService::get_data_attribute] calls.
13631    ///
13632    /// # Example
13633    /// ```
13634    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetDataAttribute;
13635    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13636    ///
13637    /// let builder = prepare_request_builder();
13638    /// let response = builder.send().await?;
13639    /// # Ok(()) }
13640    ///
13641    /// fn prepare_request_builder() -> GetDataAttribute {
13642    ///   # panic!();
13643    ///   // ... details omitted ...
13644    /// }
13645    /// ```
13646    #[derive(Clone, Debug)]
13647    pub struct GetDataAttribute(RequestBuilder<crate::model::GetDataAttributeRequest>);
13648
13649    impl GetDataAttribute {
13650        pub(crate) fn new(
13651            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13652        ) -> Self {
13653            Self(RequestBuilder::new(stub))
13654        }
13655
13656        /// Sets the full request, replacing any prior values.
13657        pub fn with_request<V: Into<crate::model::GetDataAttributeRequest>>(
13658            mut self,
13659            v: V,
13660        ) -> Self {
13661            self.0.request = v.into();
13662            self
13663        }
13664
13665        /// Sets all the options, replacing any prior values.
13666        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13667            self.0.options = v.into();
13668            self
13669        }
13670
13671        /// Sends the request.
13672        pub async fn send(self) -> Result<crate::model::DataAttribute> {
13673            (*self.0.stub)
13674                .get_data_attribute(self.0.request, self.0.options)
13675                .await
13676                .map(crate::Response::into_body)
13677        }
13678
13679        /// Sets the value of [name][crate::model::GetDataAttributeRequest::name].
13680        ///
13681        /// This is a **required** field for requests.
13682        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13683            self.0.request.name = v.into();
13684            self
13685        }
13686    }
13687
13688    #[doc(hidden)]
13689    impl crate::RequestBuilder for GetDataAttribute {
13690        fn request_options(&mut self) -> &mut crate::RequestOptions {
13691            &mut self.0.options
13692        }
13693    }
13694
13695    /// The request builder for [DataTaxonomyService::list_locations][crate::client::DataTaxonomyService::list_locations] calls.
13696    ///
13697    /// # Example
13698    /// ```
13699    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListLocations;
13700    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13701    /// use google_cloud_gax::paginator::ItemPaginator;
13702    ///
13703    /// let builder = prepare_request_builder();
13704    /// let mut items = builder.by_item();
13705    /// while let Some(result) = items.next().await {
13706    ///   let item = result?;
13707    /// }
13708    /// # Ok(()) }
13709    ///
13710    /// fn prepare_request_builder() -> ListLocations {
13711    ///   # panic!();
13712    ///   // ... details omitted ...
13713    /// }
13714    /// ```
13715    #[derive(Clone, Debug)]
13716    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
13717
13718    impl ListLocations {
13719        pub(crate) fn new(
13720            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13721        ) -> Self {
13722            Self(RequestBuilder::new(stub))
13723        }
13724
13725        /// Sets the full request, replacing any prior values.
13726        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
13727            mut self,
13728            v: V,
13729        ) -> Self {
13730            self.0.request = v.into();
13731            self
13732        }
13733
13734        /// Sets all the options, replacing any prior values.
13735        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13736            self.0.options = v.into();
13737            self
13738        }
13739
13740        /// Sends the request.
13741        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
13742            (*self.0.stub)
13743                .list_locations(self.0.request, self.0.options)
13744                .await
13745                .map(crate::Response::into_body)
13746        }
13747
13748        /// Streams each page in the collection.
13749        pub fn by_page(
13750            self,
13751        ) -> impl google_cloud_gax::paginator::Paginator<
13752            google_cloud_location::model::ListLocationsResponse,
13753            crate::Error,
13754        > {
13755            use std::clone::Clone;
13756            let token = self.0.request.page_token.clone();
13757            let execute = move |token: String| {
13758                let mut builder = self.clone();
13759                builder.0.request = builder.0.request.set_page_token(token);
13760                builder.send()
13761            };
13762            google_cloud_gax::paginator::internal::new_paginator(token, execute)
13763        }
13764
13765        /// Streams each item in the collection.
13766        pub fn by_item(
13767            self,
13768        ) -> impl google_cloud_gax::paginator::ItemPaginator<
13769            google_cloud_location::model::ListLocationsResponse,
13770            crate::Error,
13771        > {
13772            use google_cloud_gax::paginator::Paginator;
13773            self.by_page().items()
13774        }
13775
13776        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
13777        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13778            self.0.request.name = v.into();
13779            self
13780        }
13781
13782        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
13783        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13784            self.0.request.filter = v.into();
13785            self
13786        }
13787
13788        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
13789        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13790            self.0.request.page_size = v.into();
13791            self
13792        }
13793
13794        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
13795        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13796            self.0.request.page_token = v.into();
13797            self
13798        }
13799    }
13800
13801    #[doc(hidden)]
13802    impl crate::RequestBuilder for ListLocations {
13803        fn request_options(&mut self) -> &mut crate::RequestOptions {
13804            &mut self.0.options
13805        }
13806    }
13807
13808    /// The request builder for [DataTaxonomyService::get_location][crate::client::DataTaxonomyService::get_location] calls.
13809    ///
13810    /// # Example
13811    /// ```
13812    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetLocation;
13813    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13814    ///
13815    /// let builder = prepare_request_builder();
13816    /// let response = builder.send().await?;
13817    /// # Ok(()) }
13818    ///
13819    /// fn prepare_request_builder() -> GetLocation {
13820    ///   # panic!();
13821    ///   // ... details omitted ...
13822    /// }
13823    /// ```
13824    #[derive(Clone, Debug)]
13825    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
13826
13827    impl GetLocation {
13828        pub(crate) fn new(
13829            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13830        ) -> Self {
13831            Self(RequestBuilder::new(stub))
13832        }
13833
13834        /// Sets the full request, replacing any prior values.
13835        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
13836            mut self,
13837            v: V,
13838        ) -> Self {
13839            self.0.request = v.into();
13840            self
13841        }
13842
13843        /// Sets all the options, replacing any prior values.
13844        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13845            self.0.options = v.into();
13846            self
13847        }
13848
13849        /// Sends the request.
13850        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
13851            (*self.0.stub)
13852                .get_location(self.0.request, self.0.options)
13853                .await
13854                .map(crate::Response::into_body)
13855        }
13856
13857        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
13858        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13859            self.0.request.name = v.into();
13860            self
13861        }
13862    }
13863
13864    #[doc(hidden)]
13865    impl crate::RequestBuilder for GetLocation {
13866        fn request_options(&mut self) -> &mut crate::RequestOptions {
13867            &mut self.0.options
13868        }
13869    }
13870
13871    /// The request builder for [DataTaxonomyService::set_iam_policy][crate::client::DataTaxonomyService::set_iam_policy] calls.
13872    ///
13873    /// # Example
13874    /// ```
13875    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::SetIamPolicy;
13876    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13877    ///
13878    /// let builder = prepare_request_builder();
13879    /// let response = builder.send().await?;
13880    /// # Ok(()) }
13881    ///
13882    /// fn prepare_request_builder() -> SetIamPolicy {
13883    ///   # panic!();
13884    ///   // ... details omitted ...
13885    /// }
13886    /// ```
13887    #[derive(Clone, Debug)]
13888    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
13889
13890    impl SetIamPolicy {
13891        pub(crate) fn new(
13892            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13893        ) -> Self {
13894            Self(RequestBuilder::new(stub))
13895        }
13896
13897        /// Sets the full request, replacing any prior values.
13898        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
13899            mut self,
13900            v: V,
13901        ) -> Self {
13902            self.0.request = v.into();
13903            self
13904        }
13905
13906        /// Sets all the options, replacing any prior values.
13907        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13908            self.0.options = v.into();
13909            self
13910        }
13911
13912        /// Sends the request.
13913        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
13914            (*self.0.stub)
13915                .set_iam_policy(self.0.request, self.0.options)
13916                .await
13917                .map(crate::Response::into_body)
13918        }
13919
13920        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
13921        ///
13922        /// This is a **required** field for requests.
13923        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
13924            self.0.request.resource = v.into();
13925            self
13926        }
13927
13928        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
13929        ///
13930        /// This is a **required** field for requests.
13931        pub fn set_policy<T>(mut self, v: T) -> Self
13932        where
13933            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
13934        {
13935            self.0.request.policy = std::option::Option::Some(v.into());
13936            self
13937        }
13938
13939        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
13940        ///
13941        /// This is a **required** field for requests.
13942        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
13943        where
13944            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
13945        {
13946            self.0.request.policy = v.map(|x| x.into());
13947            self
13948        }
13949
13950        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
13951        pub fn set_update_mask<T>(mut self, v: T) -> Self
13952        where
13953            T: std::convert::Into<wkt::FieldMask>,
13954        {
13955            self.0.request.update_mask = std::option::Option::Some(v.into());
13956            self
13957        }
13958
13959        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
13960        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
13961        where
13962            T: std::convert::Into<wkt::FieldMask>,
13963        {
13964            self.0.request.update_mask = v.map(|x| x.into());
13965            self
13966        }
13967    }
13968
13969    #[doc(hidden)]
13970    impl crate::RequestBuilder for SetIamPolicy {
13971        fn request_options(&mut self) -> &mut crate::RequestOptions {
13972            &mut self.0.options
13973        }
13974    }
13975
13976    /// The request builder for [DataTaxonomyService::get_iam_policy][crate::client::DataTaxonomyService::get_iam_policy] calls.
13977    ///
13978    /// # Example
13979    /// ```
13980    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetIamPolicy;
13981    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
13982    ///
13983    /// let builder = prepare_request_builder();
13984    /// let response = builder.send().await?;
13985    /// # Ok(()) }
13986    ///
13987    /// fn prepare_request_builder() -> GetIamPolicy {
13988    ///   # panic!();
13989    ///   // ... details omitted ...
13990    /// }
13991    /// ```
13992    #[derive(Clone, Debug)]
13993    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
13994
13995    impl GetIamPolicy {
13996        pub(crate) fn new(
13997            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13998        ) -> Self {
13999            Self(RequestBuilder::new(stub))
14000        }
14001
14002        /// Sets the full request, replacing any prior values.
14003        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
14004            mut self,
14005            v: V,
14006        ) -> Self {
14007            self.0.request = v.into();
14008            self
14009        }
14010
14011        /// Sets all the options, replacing any prior values.
14012        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14013            self.0.options = v.into();
14014            self
14015        }
14016
14017        /// Sends the request.
14018        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
14019            (*self.0.stub)
14020                .get_iam_policy(self.0.request, self.0.options)
14021                .await
14022                .map(crate::Response::into_body)
14023        }
14024
14025        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
14026        ///
14027        /// This is a **required** field for requests.
14028        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
14029            self.0.request.resource = v.into();
14030            self
14031        }
14032
14033        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
14034        pub fn set_options<T>(mut self, v: T) -> Self
14035        where
14036            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
14037        {
14038            self.0.request.options = std::option::Option::Some(v.into());
14039            self
14040        }
14041
14042        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
14043        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
14044        where
14045            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
14046        {
14047            self.0.request.options = v.map(|x| x.into());
14048            self
14049        }
14050    }
14051
14052    #[doc(hidden)]
14053    impl crate::RequestBuilder for GetIamPolicy {
14054        fn request_options(&mut self) -> &mut crate::RequestOptions {
14055            &mut self.0.options
14056        }
14057    }
14058
14059    /// The request builder for [DataTaxonomyService::test_iam_permissions][crate::client::DataTaxonomyService::test_iam_permissions] calls.
14060    ///
14061    /// # Example
14062    /// ```
14063    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::TestIamPermissions;
14064    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14065    ///
14066    /// let builder = prepare_request_builder();
14067    /// let response = builder.send().await?;
14068    /// # Ok(()) }
14069    ///
14070    /// fn prepare_request_builder() -> TestIamPermissions {
14071    ///   # panic!();
14072    ///   // ... details omitted ...
14073    /// }
14074    /// ```
14075    #[derive(Clone, Debug)]
14076    pub struct TestIamPermissions(
14077        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
14078    );
14079
14080    impl TestIamPermissions {
14081        pub(crate) fn new(
14082            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
14083        ) -> Self {
14084            Self(RequestBuilder::new(stub))
14085        }
14086
14087        /// Sets the full request, replacing any prior values.
14088        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
14089            mut self,
14090            v: V,
14091        ) -> Self {
14092            self.0.request = v.into();
14093            self
14094        }
14095
14096        /// Sets all the options, replacing any prior values.
14097        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14098            self.0.options = v.into();
14099            self
14100        }
14101
14102        /// Sends the request.
14103        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
14104            (*self.0.stub)
14105                .test_iam_permissions(self.0.request, self.0.options)
14106                .await
14107                .map(crate::Response::into_body)
14108        }
14109
14110        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
14111        ///
14112        /// This is a **required** field for requests.
14113        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
14114            self.0.request.resource = v.into();
14115            self
14116        }
14117
14118        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
14119        ///
14120        /// This is a **required** field for requests.
14121        pub fn set_permissions<T, V>(mut self, v: T) -> Self
14122        where
14123            T: std::iter::IntoIterator<Item = V>,
14124            V: std::convert::Into<std::string::String>,
14125        {
14126            use std::iter::Iterator;
14127            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
14128            self
14129        }
14130    }
14131
14132    #[doc(hidden)]
14133    impl crate::RequestBuilder for TestIamPermissions {
14134        fn request_options(&mut self) -> &mut crate::RequestOptions {
14135            &mut self.0.options
14136        }
14137    }
14138
14139    /// The request builder for [DataTaxonomyService::list_operations][crate::client::DataTaxonomyService::list_operations] calls.
14140    ///
14141    /// # Example
14142    /// ```
14143    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::ListOperations;
14144    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14145    /// use google_cloud_gax::paginator::ItemPaginator;
14146    ///
14147    /// let builder = prepare_request_builder();
14148    /// let mut items = builder.by_item();
14149    /// while let Some(result) = items.next().await {
14150    ///   let item = result?;
14151    /// }
14152    /// # Ok(()) }
14153    ///
14154    /// fn prepare_request_builder() -> ListOperations {
14155    ///   # panic!();
14156    ///   // ... details omitted ...
14157    /// }
14158    /// ```
14159    #[derive(Clone, Debug)]
14160    pub struct ListOperations(
14161        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
14162    );
14163
14164    impl ListOperations {
14165        pub(crate) fn new(
14166            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
14167        ) -> Self {
14168            Self(RequestBuilder::new(stub))
14169        }
14170
14171        /// Sets the full request, replacing any prior values.
14172        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
14173            mut self,
14174            v: V,
14175        ) -> Self {
14176            self.0.request = v.into();
14177            self
14178        }
14179
14180        /// Sets all the options, replacing any prior values.
14181        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14182            self.0.options = v.into();
14183            self
14184        }
14185
14186        /// Sends the request.
14187        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
14188            (*self.0.stub)
14189                .list_operations(self.0.request, self.0.options)
14190                .await
14191                .map(crate::Response::into_body)
14192        }
14193
14194        /// Streams each page in the collection.
14195        pub fn by_page(
14196            self,
14197        ) -> impl google_cloud_gax::paginator::Paginator<
14198            google_cloud_longrunning::model::ListOperationsResponse,
14199            crate::Error,
14200        > {
14201            use std::clone::Clone;
14202            let token = self.0.request.page_token.clone();
14203            let execute = move |token: String| {
14204                let mut builder = self.clone();
14205                builder.0.request = builder.0.request.set_page_token(token);
14206                builder.send()
14207            };
14208            google_cloud_gax::paginator::internal::new_paginator(token, execute)
14209        }
14210
14211        /// Streams each item in the collection.
14212        pub fn by_item(
14213            self,
14214        ) -> impl google_cloud_gax::paginator::ItemPaginator<
14215            google_cloud_longrunning::model::ListOperationsResponse,
14216            crate::Error,
14217        > {
14218            use google_cloud_gax::paginator::Paginator;
14219            self.by_page().items()
14220        }
14221
14222        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
14223        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14224            self.0.request.name = v.into();
14225            self
14226        }
14227
14228        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
14229        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
14230            self.0.request.filter = v.into();
14231            self
14232        }
14233
14234        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
14235        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
14236            self.0.request.page_size = v.into();
14237            self
14238        }
14239
14240        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
14241        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
14242            self.0.request.page_token = v.into();
14243            self
14244        }
14245
14246        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
14247        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
14248            self.0.request.return_partial_success = v.into();
14249            self
14250        }
14251    }
14252
14253    #[doc(hidden)]
14254    impl crate::RequestBuilder for ListOperations {
14255        fn request_options(&mut self) -> &mut crate::RequestOptions {
14256            &mut self.0.options
14257        }
14258    }
14259
14260    /// The request builder for [DataTaxonomyService::get_operation][crate::client::DataTaxonomyService::get_operation] calls.
14261    ///
14262    /// # Example
14263    /// ```
14264    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::GetOperation;
14265    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14266    ///
14267    /// let builder = prepare_request_builder();
14268    /// let response = builder.send().await?;
14269    /// # Ok(()) }
14270    ///
14271    /// fn prepare_request_builder() -> GetOperation {
14272    ///   # panic!();
14273    ///   // ... details omitted ...
14274    /// }
14275    /// ```
14276    #[derive(Clone, Debug)]
14277    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
14278
14279    impl GetOperation {
14280        pub(crate) fn new(
14281            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
14282        ) -> Self {
14283            Self(RequestBuilder::new(stub))
14284        }
14285
14286        /// Sets the full request, replacing any prior values.
14287        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
14288            mut self,
14289            v: V,
14290        ) -> Self {
14291            self.0.request = v.into();
14292            self
14293        }
14294
14295        /// Sets all the options, replacing any prior values.
14296        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14297            self.0.options = v.into();
14298            self
14299        }
14300
14301        /// Sends the request.
14302        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14303            (*self.0.stub)
14304                .get_operation(self.0.request, self.0.options)
14305                .await
14306                .map(crate::Response::into_body)
14307        }
14308
14309        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
14310        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14311            self.0.request.name = v.into();
14312            self
14313        }
14314    }
14315
14316    #[doc(hidden)]
14317    impl crate::RequestBuilder for GetOperation {
14318        fn request_options(&mut self) -> &mut crate::RequestOptions {
14319            &mut self.0.options
14320        }
14321    }
14322
14323    /// The request builder for [DataTaxonomyService::delete_operation][crate::client::DataTaxonomyService::delete_operation] calls.
14324    ///
14325    /// # Example
14326    /// ```
14327    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::DeleteOperation;
14328    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14329    ///
14330    /// let builder = prepare_request_builder();
14331    /// let response = builder.send().await?;
14332    /// # Ok(()) }
14333    ///
14334    /// fn prepare_request_builder() -> DeleteOperation {
14335    ///   # panic!();
14336    ///   // ... details omitted ...
14337    /// }
14338    /// ```
14339    #[derive(Clone, Debug)]
14340    pub struct DeleteOperation(
14341        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
14342    );
14343
14344    impl DeleteOperation {
14345        pub(crate) fn new(
14346            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
14347        ) -> Self {
14348            Self(RequestBuilder::new(stub))
14349        }
14350
14351        /// Sets the full request, replacing any prior values.
14352        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
14353            mut self,
14354            v: V,
14355        ) -> Self {
14356            self.0.request = v.into();
14357            self
14358        }
14359
14360        /// Sets all the options, replacing any prior values.
14361        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14362            self.0.options = v.into();
14363            self
14364        }
14365
14366        /// Sends the request.
14367        pub async fn send(self) -> Result<()> {
14368            (*self.0.stub)
14369                .delete_operation(self.0.request, self.0.options)
14370                .await
14371                .map(crate::Response::into_body)
14372        }
14373
14374        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
14375        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14376            self.0.request.name = v.into();
14377            self
14378        }
14379    }
14380
14381    #[doc(hidden)]
14382    impl crate::RequestBuilder for DeleteOperation {
14383        fn request_options(&mut self) -> &mut crate::RequestOptions {
14384            &mut self.0.options
14385        }
14386    }
14387
14388    /// The request builder for [DataTaxonomyService::cancel_operation][crate::client::DataTaxonomyService::cancel_operation] calls.
14389    ///
14390    /// # Example
14391    /// ```
14392    /// # use google_cloud_dataplex_v1::builder::data_taxonomy_service::CancelOperation;
14393    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14394    ///
14395    /// let builder = prepare_request_builder();
14396    /// let response = builder.send().await?;
14397    /// # Ok(()) }
14398    ///
14399    /// fn prepare_request_builder() -> CancelOperation {
14400    ///   # panic!();
14401    ///   // ... details omitted ...
14402    /// }
14403    /// ```
14404    #[derive(Clone, Debug)]
14405    pub struct CancelOperation(
14406        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
14407    );
14408
14409    impl CancelOperation {
14410        pub(crate) fn new(
14411            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
14412        ) -> Self {
14413            Self(RequestBuilder::new(stub))
14414        }
14415
14416        /// Sets the full request, replacing any prior values.
14417        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
14418            mut self,
14419            v: V,
14420        ) -> Self {
14421            self.0.request = v.into();
14422            self
14423        }
14424
14425        /// Sets all the options, replacing any prior values.
14426        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14427            self.0.options = v.into();
14428            self
14429        }
14430
14431        /// Sends the request.
14432        pub async fn send(self) -> Result<()> {
14433            (*self.0.stub)
14434                .cancel_operation(self.0.request, self.0.options)
14435                .await
14436                .map(crate::Response::into_body)
14437        }
14438
14439        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
14440        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14441            self.0.request.name = v.into();
14442            self
14443        }
14444    }
14445
14446    #[doc(hidden)]
14447    impl crate::RequestBuilder for CancelOperation {
14448        fn request_options(&mut self) -> &mut crate::RequestOptions {
14449            &mut self.0.options
14450        }
14451    }
14452}
14453
14454/// Request and client builders for [DataScanService][crate::client::DataScanService].
14455pub mod data_scan_service {
14456    use crate::Result;
14457
14458    /// A builder for [DataScanService][crate::client::DataScanService].
14459    ///
14460    /// ```
14461    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
14462    /// # use google_cloud_dataplex_v1::*;
14463    /// # use builder::data_scan_service::ClientBuilder;
14464    /// # use client::DataScanService;
14465    /// let builder : ClientBuilder = DataScanService::builder();
14466    /// let client = builder
14467    ///     .with_endpoint("https://dataplex.googleapis.com")
14468    ///     .build().await?;
14469    /// # Ok(()) }
14470    /// ```
14471    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
14472
14473    pub(crate) mod client {
14474        use super::super::super::client::DataScanService;
14475        pub struct Factory;
14476        impl crate::ClientFactory for Factory {
14477            type Client = DataScanService;
14478            type Credentials = gaxi::options::Credentials;
14479            async fn build(
14480                self,
14481                config: gaxi::options::ClientConfig,
14482            ) -> crate::ClientBuilderResult<Self::Client> {
14483                Self::Client::new(config).await
14484            }
14485        }
14486    }
14487
14488    /// Common implementation for [crate::client::DataScanService] request builders.
14489    #[derive(Clone, Debug)]
14490    pub(crate) struct RequestBuilder<R: std::default::Default> {
14491        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14492        request: R,
14493        options: crate::RequestOptions,
14494    }
14495
14496    impl<R> RequestBuilder<R>
14497    where
14498        R: std::default::Default,
14499    {
14500        pub(crate) fn new(
14501            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14502        ) -> Self {
14503            Self {
14504                stub,
14505                request: R::default(),
14506                options: crate::RequestOptions::default(),
14507            }
14508        }
14509    }
14510
14511    /// The request builder for [DataScanService::create_data_scan][crate::client::DataScanService::create_data_scan] calls.
14512    ///
14513    /// # Example
14514    /// ```
14515    /// # use google_cloud_dataplex_v1::builder::data_scan_service::CreateDataScan;
14516    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14517    /// use google_cloud_lro::Poller;
14518    ///
14519    /// let builder = prepare_request_builder();
14520    /// let response = builder.poller().until_done().await?;
14521    /// # Ok(()) }
14522    ///
14523    /// fn prepare_request_builder() -> CreateDataScan {
14524    ///   # panic!();
14525    ///   // ... details omitted ...
14526    /// }
14527    /// ```
14528    #[derive(Clone, Debug)]
14529    pub struct CreateDataScan(RequestBuilder<crate::model::CreateDataScanRequest>);
14530
14531    impl CreateDataScan {
14532        pub(crate) fn new(
14533            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14534        ) -> Self {
14535            Self(RequestBuilder::new(stub))
14536        }
14537
14538        /// Sets the full request, replacing any prior values.
14539        pub fn with_request<V: Into<crate::model::CreateDataScanRequest>>(mut self, v: V) -> Self {
14540            self.0.request = v.into();
14541            self
14542        }
14543
14544        /// Sets all the options, replacing any prior values.
14545        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14546            self.0.options = v.into();
14547            self
14548        }
14549
14550        /// Sends the request.
14551        ///
14552        /// # Long running operations
14553        ///
14554        /// This starts, but does not poll, a longrunning operation. More information
14555        /// on [create_data_scan][crate::client::DataScanService::create_data_scan].
14556        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14557            (*self.0.stub)
14558                .create_data_scan(self.0.request, self.0.options)
14559                .await
14560                .map(crate::Response::into_body)
14561        }
14562
14563        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_data_scan`.
14564        pub fn poller(
14565            self,
14566        ) -> impl google_cloud_lro::Poller<crate::model::DataScan, crate::model::OperationMetadata>
14567        {
14568            type Operation = google_cloud_lro::internal::Operation<
14569                crate::model::DataScan,
14570                crate::model::OperationMetadata,
14571            >;
14572            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14573            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14574            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
14575            if let Some(ref mut details) = poller_options.tracing {
14576                details.method_name = "google_cloud_dataplex_v1::client::DataScanService::create_data_scan::until_done";
14577            }
14578
14579            let stub = self.0.stub.clone();
14580            let mut options = self.0.options.clone();
14581            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
14582            let query = move |name| {
14583                let stub = stub.clone();
14584                let options = options.clone();
14585                async {
14586                    let op = GetOperation::new(stub)
14587                        .set_name(name)
14588                        .with_options(options)
14589                        .send()
14590                        .await?;
14591                    Ok(Operation::new(op))
14592                }
14593            };
14594
14595            let start = move || async {
14596                let op = self.send().await?;
14597                Ok(Operation::new(op))
14598            };
14599
14600            use google_cloud_lro::internal::PollerExt;
14601            {
14602                google_cloud_lro::internal::new_poller(
14603                    polling_error_policy,
14604                    polling_backoff_policy,
14605                    start,
14606                    query,
14607                )
14608            }
14609            .with_options(poller_options)
14610        }
14611
14612        /// Sets the value of [parent][crate::model::CreateDataScanRequest::parent].
14613        ///
14614        /// This is a **required** field for requests.
14615        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14616            self.0.request.parent = v.into();
14617            self
14618        }
14619
14620        /// Sets the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
14621        ///
14622        /// This is a **required** field for requests.
14623        pub fn set_data_scan<T>(mut self, v: T) -> Self
14624        where
14625            T: std::convert::Into<crate::model::DataScan>,
14626        {
14627            self.0.request.data_scan = std::option::Option::Some(v.into());
14628            self
14629        }
14630
14631        /// Sets or clears the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
14632        ///
14633        /// This is a **required** field for requests.
14634        pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
14635        where
14636            T: std::convert::Into<crate::model::DataScan>,
14637        {
14638            self.0.request.data_scan = v.map(|x| x.into());
14639            self
14640        }
14641
14642        /// Sets the value of [data_scan_id][crate::model::CreateDataScanRequest::data_scan_id].
14643        pub fn set_data_scan_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
14644            self.0.request.data_scan_id = v.into();
14645            self
14646        }
14647
14648        /// Sets the value of [validate_only][crate::model::CreateDataScanRequest::validate_only].
14649        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
14650            self.0.request.validate_only = v.into();
14651            self
14652        }
14653    }
14654
14655    #[doc(hidden)]
14656    impl crate::RequestBuilder for CreateDataScan {
14657        fn request_options(&mut self) -> &mut crate::RequestOptions {
14658            &mut self.0.options
14659        }
14660    }
14661
14662    /// The request builder for [DataScanService::update_data_scan][crate::client::DataScanService::update_data_scan] calls.
14663    ///
14664    /// # Example
14665    /// ```
14666    /// # use google_cloud_dataplex_v1::builder::data_scan_service::UpdateDataScan;
14667    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14668    /// use google_cloud_lro::Poller;
14669    ///
14670    /// let builder = prepare_request_builder();
14671    /// let response = builder.poller().until_done().await?;
14672    /// # Ok(()) }
14673    ///
14674    /// fn prepare_request_builder() -> UpdateDataScan {
14675    ///   # panic!();
14676    ///   // ... details omitted ...
14677    /// }
14678    /// ```
14679    #[derive(Clone, Debug)]
14680    pub struct UpdateDataScan(RequestBuilder<crate::model::UpdateDataScanRequest>);
14681
14682    impl UpdateDataScan {
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::UpdateDataScanRequest>>(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        ///
14703        /// # Long running operations
14704        ///
14705        /// This starts, but does not poll, a longrunning operation. More information
14706        /// on [update_data_scan][crate::client::DataScanService::update_data_scan].
14707        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14708            (*self.0.stub)
14709                .update_data_scan(self.0.request, self.0.options)
14710                .await
14711                .map(crate::Response::into_body)
14712        }
14713
14714        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_data_scan`.
14715        pub fn poller(
14716            self,
14717        ) -> impl google_cloud_lro::Poller<crate::model::DataScan, crate::model::OperationMetadata>
14718        {
14719            type Operation = google_cloud_lro::internal::Operation<
14720                crate::model::DataScan,
14721                crate::model::OperationMetadata,
14722            >;
14723            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14724            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14725            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
14726            if let Some(ref mut details) = poller_options.tracing {
14727                details.method_name = "google_cloud_dataplex_v1::client::DataScanService::update_data_scan::until_done";
14728            }
14729
14730            let stub = self.0.stub.clone();
14731            let mut options = self.0.options.clone();
14732            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
14733            let query = move |name| {
14734                let stub = stub.clone();
14735                let options = options.clone();
14736                async {
14737                    let op = GetOperation::new(stub)
14738                        .set_name(name)
14739                        .with_options(options)
14740                        .send()
14741                        .await?;
14742                    Ok(Operation::new(op))
14743                }
14744            };
14745
14746            let start = move || async {
14747                let op = self.send().await?;
14748                Ok(Operation::new(op))
14749            };
14750
14751            use google_cloud_lro::internal::PollerExt;
14752            {
14753                google_cloud_lro::internal::new_poller(
14754                    polling_error_policy,
14755                    polling_backoff_policy,
14756                    start,
14757                    query,
14758                )
14759            }
14760            .with_options(poller_options)
14761        }
14762
14763        /// Sets the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
14764        ///
14765        /// This is a **required** field for requests.
14766        pub fn set_data_scan<T>(mut self, v: T) -> Self
14767        where
14768            T: std::convert::Into<crate::model::DataScan>,
14769        {
14770            self.0.request.data_scan = std::option::Option::Some(v.into());
14771            self
14772        }
14773
14774        /// Sets or clears the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
14775        ///
14776        /// This is a **required** field for requests.
14777        pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
14778        where
14779            T: std::convert::Into<crate::model::DataScan>,
14780        {
14781            self.0.request.data_scan = v.map(|x| x.into());
14782            self
14783        }
14784
14785        /// Sets the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
14786        pub fn set_update_mask<T>(mut self, v: T) -> Self
14787        where
14788            T: std::convert::Into<wkt::FieldMask>,
14789        {
14790            self.0.request.update_mask = std::option::Option::Some(v.into());
14791            self
14792        }
14793
14794        /// Sets or clears the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
14795        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
14796        where
14797            T: std::convert::Into<wkt::FieldMask>,
14798        {
14799            self.0.request.update_mask = v.map(|x| x.into());
14800            self
14801        }
14802
14803        /// Sets the value of [validate_only][crate::model::UpdateDataScanRequest::validate_only].
14804        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
14805            self.0.request.validate_only = v.into();
14806            self
14807        }
14808    }
14809
14810    #[doc(hidden)]
14811    impl crate::RequestBuilder for UpdateDataScan {
14812        fn request_options(&mut self) -> &mut crate::RequestOptions {
14813            &mut self.0.options
14814        }
14815    }
14816
14817    /// The request builder for [DataScanService::delete_data_scan][crate::client::DataScanService::delete_data_scan] calls.
14818    ///
14819    /// # Example
14820    /// ```
14821    /// # use google_cloud_dataplex_v1::builder::data_scan_service::DeleteDataScan;
14822    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14823    /// use google_cloud_lro::Poller;
14824    ///
14825    /// let builder = prepare_request_builder();
14826    /// let response = builder.poller().until_done().await?;
14827    /// # Ok(()) }
14828    ///
14829    /// fn prepare_request_builder() -> DeleteDataScan {
14830    ///   # panic!();
14831    ///   // ... details omitted ...
14832    /// }
14833    /// ```
14834    #[derive(Clone, Debug)]
14835    pub struct DeleteDataScan(RequestBuilder<crate::model::DeleteDataScanRequest>);
14836
14837    impl DeleteDataScan {
14838        pub(crate) fn new(
14839            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14840        ) -> Self {
14841            Self(RequestBuilder::new(stub))
14842        }
14843
14844        /// Sets the full request, replacing any prior values.
14845        pub fn with_request<V: Into<crate::model::DeleteDataScanRequest>>(mut self, v: V) -> Self {
14846            self.0.request = v.into();
14847            self
14848        }
14849
14850        /// Sets all the options, replacing any prior values.
14851        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14852            self.0.options = v.into();
14853            self
14854        }
14855
14856        /// Sends the request.
14857        ///
14858        /// # Long running operations
14859        ///
14860        /// This starts, but does not poll, a longrunning operation. More information
14861        /// on [delete_data_scan][crate::client::DataScanService::delete_data_scan].
14862        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14863            (*self.0.stub)
14864                .delete_data_scan(self.0.request, self.0.options)
14865                .await
14866                .map(crate::Response::into_body)
14867        }
14868
14869        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_data_scan`.
14870        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
14871            type Operation =
14872                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
14873            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14874            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14875            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
14876            if let Some(ref mut details) = poller_options.tracing {
14877                details.method_name = "google_cloud_dataplex_v1::client::DataScanService::delete_data_scan::until_done";
14878            }
14879
14880            let stub = self.0.stub.clone();
14881            let mut options = self.0.options.clone();
14882            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
14883            let query = move |name| {
14884                let stub = stub.clone();
14885                let options = options.clone();
14886                async {
14887                    let op = GetOperation::new(stub)
14888                        .set_name(name)
14889                        .with_options(options)
14890                        .send()
14891                        .await?;
14892                    Ok(Operation::new(op))
14893                }
14894            };
14895
14896            let start = move || async {
14897                let op = self.send().await?;
14898                Ok(Operation::new(op))
14899            };
14900
14901            use google_cloud_lro::internal::PollerExt;
14902            {
14903                google_cloud_lro::internal::new_unit_response_poller(
14904                    polling_error_policy,
14905                    polling_backoff_policy,
14906                    start,
14907                    query,
14908                )
14909            }
14910            .with_options(poller_options)
14911        }
14912
14913        /// Sets the value of [name][crate::model::DeleteDataScanRequest::name].
14914        ///
14915        /// This is a **required** field for requests.
14916        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14917            self.0.request.name = v.into();
14918            self
14919        }
14920
14921        /// Sets the value of [force][crate::model::DeleteDataScanRequest::force].
14922        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
14923            self.0.request.force = v.into();
14924            self
14925        }
14926    }
14927
14928    #[doc(hidden)]
14929    impl crate::RequestBuilder for DeleteDataScan {
14930        fn request_options(&mut self) -> &mut crate::RequestOptions {
14931            &mut self.0.options
14932        }
14933    }
14934
14935    /// The request builder for [DataScanService::get_data_scan][crate::client::DataScanService::get_data_scan] calls.
14936    ///
14937    /// # Example
14938    /// ```
14939    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetDataScan;
14940    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
14941    ///
14942    /// let builder = prepare_request_builder();
14943    /// let response = builder.send().await?;
14944    /// # Ok(()) }
14945    ///
14946    /// fn prepare_request_builder() -> GetDataScan {
14947    ///   # panic!();
14948    ///   // ... details omitted ...
14949    /// }
14950    /// ```
14951    #[derive(Clone, Debug)]
14952    pub struct GetDataScan(RequestBuilder<crate::model::GetDataScanRequest>);
14953
14954    impl GetDataScan {
14955        pub(crate) fn new(
14956            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14957        ) -> Self {
14958            Self(RequestBuilder::new(stub))
14959        }
14960
14961        /// Sets the full request, replacing any prior values.
14962        pub fn with_request<V: Into<crate::model::GetDataScanRequest>>(mut self, v: V) -> Self {
14963            self.0.request = v.into();
14964            self
14965        }
14966
14967        /// Sets all the options, replacing any prior values.
14968        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14969            self.0.options = v.into();
14970            self
14971        }
14972
14973        /// Sends the request.
14974        pub async fn send(self) -> Result<crate::model::DataScan> {
14975            (*self.0.stub)
14976                .get_data_scan(self.0.request, self.0.options)
14977                .await
14978                .map(crate::Response::into_body)
14979        }
14980
14981        /// Sets the value of [name][crate::model::GetDataScanRequest::name].
14982        ///
14983        /// This is a **required** field for requests.
14984        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14985            self.0.request.name = v.into();
14986            self
14987        }
14988
14989        /// Sets the value of [view][crate::model::GetDataScanRequest::view].
14990        pub fn set_view<T: Into<crate::model::get_data_scan_request::DataScanView>>(
14991            mut self,
14992            v: T,
14993        ) -> Self {
14994            self.0.request.view = v.into();
14995            self
14996        }
14997    }
14998
14999    #[doc(hidden)]
15000    impl crate::RequestBuilder for GetDataScan {
15001        fn request_options(&mut self) -> &mut crate::RequestOptions {
15002            &mut self.0.options
15003        }
15004    }
15005
15006    /// The request builder for [DataScanService::list_data_scans][crate::client::DataScanService::list_data_scans] calls.
15007    ///
15008    /// # Example
15009    /// ```
15010    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListDataScans;
15011    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15012    /// use google_cloud_gax::paginator::ItemPaginator;
15013    ///
15014    /// let builder = prepare_request_builder();
15015    /// let mut items = builder.by_item();
15016    /// while let Some(result) = items.next().await {
15017    ///   let item = result?;
15018    /// }
15019    /// # Ok(()) }
15020    ///
15021    /// fn prepare_request_builder() -> ListDataScans {
15022    ///   # panic!();
15023    ///   // ... details omitted ...
15024    /// }
15025    /// ```
15026    #[derive(Clone, Debug)]
15027    pub struct ListDataScans(RequestBuilder<crate::model::ListDataScansRequest>);
15028
15029    impl ListDataScans {
15030        pub(crate) fn new(
15031            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15032        ) -> Self {
15033            Self(RequestBuilder::new(stub))
15034        }
15035
15036        /// Sets the full request, replacing any prior values.
15037        pub fn with_request<V: Into<crate::model::ListDataScansRequest>>(mut self, v: V) -> Self {
15038            self.0.request = v.into();
15039            self
15040        }
15041
15042        /// Sets all the options, replacing any prior values.
15043        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15044            self.0.options = v.into();
15045            self
15046        }
15047
15048        /// Sends the request.
15049        pub async fn send(self) -> Result<crate::model::ListDataScansResponse> {
15050            (*self.0.stub)
15051                .list_data_scans(self.0.request, self.0.options)
15052                .await
15053                .map(crate::Response::into_body)
15054        }
15055
15056        /// Streams each page in the collection.
15057        pub fn by_page(
15058            self,
15059        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListDataScansResponse, crate::Error>
15060        {
15061            use std::clone::Clone;
15062            let token = self.0.request.page_token.clone();
15063            let execute = move |token: String| {
15064                let mut builder = self.clone();
15065                builder.0.request = builder.0.request.set_page_token(token);
15066                builder.send()
15067            };
15068            google_cloud_gax::paginator::internal::new_paginator(token, execute)
15069        }
15070
15071        /// Streams each item in the collection.
15072        pub fn by_item(
15073            self,
15074        ) -> impl google_cloud_gax::paginator::ItemPaginator<
15075            crate::model::ListDataScansResponse,
15076            crate::Error,
15077        > {
15078            use google_cloud_gax::paginator::Paginator;
15079            self.by_page().items()
15080        }
15081
15082        /// Sets the value of [parent][crate::model::ListDataScansRequest::parent].
15083        ///
15084        /// This is a **required** field for requests.
15085        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15086            self.0.request.parent = v.into();
15087            self
15088        }
15089
15090        /// Sets the value of [page_size][crate::model::ListDataScansRequest::page_size].
15091        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15092            self.0.request.page_size = v.into();
15093            self
15094        }
15095
15096        /// Sets the value of [page_token][crate::model::ListDataScansRequest::page_token].
15097        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15098            self.0.request.page_token = v.into();
15099            self
15100        }
15101
15102        /// Sets the value of [filter][crate::model::ListDataScansRequest::filter].
15103        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15104            self.0.request.filter = v.into();
15105            self
15106        }
15107
15108        /// Sets the value of [order_by][crate::model::ListDataScansRequest::order_by].
15109        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
15110            self.0.request.order_by = v.into();
15111            self
15112        }
15113    }
15114
15115    #[doc(hidden)]
15116    impl crate::RequestBuilder for ListDataScans {
15117        fn request_options(&mut self) -> &mut crate::RequestOptions {
15118            &mut self.0.options
15119        }
15120    }
15121
15122    /// The request builder for [DataScanService::run_data_scan][crate::client::DataScanService::run_data_scan] calls.
15123    ///
15124    /// # Example
15125    /// ```
15126    /// # use google_cloud_dataplex_v1::builder::data_scan_service::RunDataScan;
15127    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15128    ///
15129    /// let builder = prepare_request_builder();
15130    /// let response = builder.send().await?;
15131    /// # Ok(()) }
15132    ///
15133    /// fn prepare_request_builder() -> RunDataScan {
15134    ///   # panic!();
15135    ///   // ... details omitted ...
15136    /// }
15137    /// ```
15138    #[derive(Clone, Debug)]
15139    pub struct RunDataScan(RequestBuilder<crate::model::RunDataScanRequest>);
15140
15141    impl RunDataScan {
15142        pub(crate) fn new(
15143            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15144        ) -> Self {
15145            Self(RequestBuilder::new(stub))
15146        }
15147
15148        /// Sets the full request, replacing any prior values.
15149        pub fn with_request<V: Into<crate::model::RunDataScanRequest>>(mut self, v: V) -> Self {
15150            self.0.request = v.into();
15151            self
15152        }
15153
15154        /// Sets all the options, replacing any prior values.
15155        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15156            self.0.options = v.into();
15157            self
15158        }
15159
15160        /// Sends the request.
15161        pub async fn send(self) -> Result<crate::model::RunDataScanResponse> {
15162            (*self.0.stub)
15163                .run_data_scan(self.0.request, self.0.options)
15164                .await
15165                .map(crate::Response::into_body)
15166        }
15167
15168        /// Sets the value of [name][crate::model::RunDataScanRequest::name].
15169        ///
15170        /// This is a **required** field for requests.
15171        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15172            self.0.request.name = v.into();
15173            self
15174        }
15175    }
15176
15177    #[doc(hidden)]
15178    impl crate::RequestBuilder for RunDataScan {
15179        fn request_options(&mut self) -> &mut crate::RequestOptions {
15180            &mut self.0.options
15181        }
15182    }
15183
15184    /// The request builder for [DataScanService::get_data_scan_job][crate::client::DataScanService::get_data_scan_job] calls.
15185    ///
15186    /// # Example
15187    /// ```
15188    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetDataScanJob;
15189    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15190    ///
15191    /// let builder = prepare_request_builder();
15192    /// let response = builder.send().await?;
15193    /// # Ok(()) }
15194    ///
15195    /// fn prepare_request_builder() -> GetDataScanJob {
15196    ///   # panic!();
15197    ///   // ... details omitted ...
15198    /// }
15199    /// ```
15200    #[derive(Clone, Debug)]
15201    pub struct GetDataScanJob(RequestBuilder<crate::model::GetDataScanJobRequest>);
15202
15203    impl GetDataScanJob {
15204        pub(crate) fn new(
15205            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15206        ) -> Self {
15207            Self(RequestBuilder::new(stub))
15208        }
15209
15210        /// Sets the full request, replacing any prior values.
15211        pub fn with_request<V: Into<crate::model::GetDataScanJobRequest>>(mut self, v: V) -> Self {
15212            self.0.request = v.into();
15213            self
15214        }
15215
15216        /// Sets all the options, replacing any prior values.
15217        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15218            self.0.options = v.into();
15219            self
15220        }
15221
15222        /// Sends the request.
15223        pub async fn send(self) -> Result<crate::model::DataScanJob> {
15224            (*self.0.stub)
15225                .get_data_scan_job(self.0.request, self.0.options)
15226                .await
15227                .map(crate::Response::into_body)
15228        }
15229
15230        /// Sets the value of [name][crate::model::GetDataScanJobRequest::name].
15231        ///
15232        /// This is a **required** field for requests.
15233        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15234            self.0.request.name = v.into();
15235            self
15236        }
15237
15238        /// Sets the value of [view][crate::model::GetDataScanJobRequest::view].
15239        pub fn set_view<T: Into<crate::model::get_data_scan_job_request::DataScanJobView>>(
15240            mut self,
15241            v: T,
15242        ) -> Self {
15243            self.0.request.view = v.into();
15244            self
15245        }
15246    }
15247
15248    #[doc(hidden)]
15249    impl crate::RequestBuilder for GetDataScanJob {
15250        fn request_options(&mut self) -> &mut crate::RequestOptions {
15251            &mut self.0.options
15252        }
15253    }
15254
15255    /// The request builder for [DataScanService::list_data_scan_jobs][crate::client::DataScanService::list_data_scan_jobs] calls.
15256    ///
15257    /// # Example
15258    /// ```
15259    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListDataScanJobs;
15260    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15261    /// use google_cloud_gax::paginator::ItemPaginator;
15262    ///
15263    /// let builder = prepare_request_builder();
15264    /// let mut items = builder.by_item();
15265    /// while let Some(result) = items.next().await {
15266    ///   let item = result?;
15267    /// }
15268    /// # Ok(()) }
15269    ///
15270    /// fn prepare_request_builder() -> ListDataScanJobs {
15271    ///   # panic!();
15272    ///   // ... details omitted ...
15273    /// }
15274    /// ```
15275    #[derive(Clone, Debug)]
15276    pub struct ListDataScanJobs(RequestBuilder<crate::model::ListDataScanJobsRequest>);
15277
15278    impl ListDataScanJobs {
15279        pub(crate) fn new(
15280            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15281        ) -> Self {
15282            Self(RequestBuilder::new(stub))
15283        }
15284
15285        /// Sets the full request, replacing any prior values.
15286        pub fn with_request<V: Into<crate::model::ListDataScanJobsRequest>>(
15287            mut self,
15288            v: V,
15289        ) -> Self {
15290            self.0.request = v.into();
15291            self
15292        }
15293
15294        /// Sets all the options, replacing any prior values.
15295        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15296            self.0.options = v.into();
15297            self
15298        }
15299
15300        /// Sends the request.
15301        pub async fn send(self) -> Result<crate::model::ListDataScanJobsResponse> {
15302            (*self.0.stub)
15303                .list_data_scan_jobs(self.0.request, self.0.options)
15304                .await
15305                .map(crate::Response::into_body)
15306        }
15307
15308        /// Streams each page in the collection.
15309        pub fn by_page(
15310            self,
15311        ) -> impl google_cloud_gax::paginator::Paginator<
15312            crate::model::ListDataScanJobsResponse,
15313            crate::Error,
15314        > {
15315            use std::clone::Clone;
15316            let token = self.0.request.page_token.clone();
15317            let execute = move |token: String| {
15318                let mut builder = self.clone();
15319                builder.0.request = builder.0.request.set_page_token(token);
15320                builder.send()
15321            };
15322            google_cloud_gax::paginator::internal::new_paginator(token, execute)
15323        }
15324
15325        /// Streams each item in the collection.
15326        pub fn by_item(
15327            self,
15328        ) -> impl google_cloud_gax::paginator::ItemPaginator<
15329            crate::model::ListDataScanJobsResponse,
15330            crate::Error,
15331        > {
15332            use google_cloud_gax::paginator::Paginator;
15333            self.by_page().items()
15334        }
15335
15336        /// Sets the value of [parent][crate::model::ListDataScanJobsRequest::parent].
15337        ///
15338        /// This is a **required** field for requests.
15339        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15340            self.0.request.parent = v.into();
15341            self
15342        }
15343
15344        /// Sets the value of [page_size][crate::model::ListDataScanJobsRequest::page_size].
15345        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15346            self.0.request.page_size = v.into();
15347            self
15348        }
15349
15350        /// Sets the value of [page_token][crate::model::ListDataScanJobsRequest::page_token].
15351        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15352            self.0.request.page_token = v.into();
15353            self
15354        }
15355
15356        /// Sets the value of [filter][crate::model::ListDataScanJobsRequest::filter].
15357        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15358            self.0.request.filter = v.into();
15359            self
15360        }
15361    }
15362
15363    #[doc(hidden)]
15364    impl crate::RequestBuilder for ListDataScanJobs {
15365        fn request_options(&mut self) -> &mut crate::RequestOptions {
15366            &mut self.0.options
15367        }
15368    }
15369
15370    /// The request builder for [DataScanService::cancel_data_scan_job][crate::client::DataScanService::cancel_data_scan_job] calls.
15371    ///
15372    /// # Example
15373    /// ```
15374    /// # use google_cloud_dataplex_v1::builder::data_scan_service::CancelDataScanJob;
15375    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15376    ///
15377    /// let builder = prepare_request_builder();
15378    /// let response = builder.send().await?;
15379    /// # Ok(()) }
15380    ///
15381    /// fn prepare_request_builder() -> CancelDataScanJob {
15382    ///   # panic!();
15383    ///   // ... details omitted ...
15384    /// }
15385    /// ```
15386    #[derive(Clone, Debug)]
15387    pub struct CancelDataScanJob(RequestBuilder<crate::model::CancelDataScanJobRequest>);
15388
15389    impl CancelDataScanJob {
15390        pub(crate) fn new(
15391            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15392        ) -> Self {
15393            Self(RequestBuilder::new(stub))
15394        }
15395
15396        /// Sets the full request, replacing any prior values.
15397        pub fn with_request<V: Into<crate::model::CancelDataScanJobRequest>>(
15398            mut self,
15399            v: V,
15400        ) -> Self {
15401            self.0.request = v.into();
15402            self
15403        }
15404
15405        /// Sets all the options, replacing any prior values.
15406        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15407            self.0.options = v.into();
15408            self
15409        }
15410
15411        /// Sends the request.
15412        pub async fn send(self) -> Result<crate::model::CancelDataScanJobResponse> {
15413            (*self.0.stub)
15414                .cancel_data_scan_job(self.0.request, self.0.options)
15415                .await
15416                .map(crate::Response::into_body)
15417        }
15418
15419        /// Sets the value of [name][crate::model::CancelDataScanJobRequest::name].
15420        ///
15421        /// This is a **required** field for requests.
15422        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15423            self.0.request.name = v.into();
15424            self
15425        }
15426    }
15427
15428    #[doc(hidden)]
15429    impl crate::RequestBuilder for CancelDataScanJob {
15430        fn request_options(&mut self) -> &mut crate::RequestOptions {
15431            &mut self.0.options
15432        }
15433    }
15434
15435    /// The request builder for [DataScanService::generate_data_quality_rules][crate::client::DataScanService::generate_data_quality_rules] calls.
15436    ///
15437    /// # Example
15438    /// ```
15439    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GenerateDataQualityRules;
15440    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15441    ///
15442    /// let builder = prepare_request_builder();
15443    /// let response = builder.send().await?;
15444    /// # Ok(()) }
15445    ///
15446    /// fn prepare_request_builder() -> GenerateDataQualityRules {
15447    ///   # panic!();
15448    ///   // ... details omitted ...
15449    /// }
15450    /// ```
15451    #[derive(Clone, Debug)]
15452    pub struct GenerateDataQualityRules(
15453        RequestBuilder<crate::model::GenerateDataQualityRulesRequest>,
15454    );
15455
15456    impl GenerateDataQualityRules {
15457        pub(crate) fn new(
15458            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15459        ) -> Self {
15460            Self(RequestBuilder::new(stub))
15461        }
15462
15463        /// Sets the full request, replacing any prior values.
15464        pub fn with_request<V: Into<crate::model::GenerateDataQualityRulesRequest>>(
15465            mut self,
15466            v: V,
15467        ) -> Self {
15468            self.0.request = v.into();
15469            self
15470        }
15471
15472        /// Sets all the options, replacing any prior values.
15473        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15474            self.0.options = v.into();
15475            self
15476        }
15477
15478        /// Sends the request.
15479        pub async fn send(self) -> Result<crate::model::GenerateDataQualityRulesResponse> {
15480            (*self.0.stub)
15481                .generate_data_quality_rules(self.0.request, self.0.options)
15482                .await
15483                .map(crate::Response::into_body)
15484        }
15485
15486        /// Sets the value of [name][crate::model::GenerateDataQualityRulesRequest::name].
15487        ///
15488        /// This is a **required** field for requests.
15489        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15490            self.0.request.name = v.into();
15491            self
15492        }
15493    }
15494
15495    #[doc(hidden)]
15496    impl crate::RequestBuilder for GenerateDataQualityRules {
15497        fn request_options(&mut self) -> &mut crate::RequestOptions {
15498            &mut self.0.options
15499        }
15500    }
15501
15502    /// The request builder for [DataScanService::list_locations][crate::client::DataScanService::list_locations] calls.
15503    ///
15504    /// # Example
15505    /// ```
15506    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListLocations;
15507    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15508    /// use google_cloud_gax::paginator::ItemPaginator;
15509    ///
15510    /// let builder = prepare_request_builder();
15511    /// let mut items = builder.by_item();
15512    /// while let Some(result) = items.next().await {
15513    ///   let item = result?;
15514    /// }
15515    /// # Ok(()) }
15516    ///
15517    /// fn prepare_request_builder() -> ListLocations {
15518    ///   # panic!();
15519    ///   // ... details omitted ...
15520    /// }
15521    /// ```
15522    #[derive(Clone, Debug)]
15523    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
15524
15525    impl ListLocations {
15526        pub(crate) fn new(
15527            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15528        ) -> Self {
15529            Self(RequestBuilder::new(stub))
15530        }
15531
15532        /// Sets the full request, replacing any prior values.
15533        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
15534            mut self,
15535            v: V,
15536        ) -> Self {
15537            self.0.request = v.into();
15538            self
15539        }
15540
15541        /// Sets all the options, replacing any prior values.
15542        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15543            self.0.options = v.into();
15544            self
15545        }
15546
15547        /// Sends the request.
15548        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
15549            (*self.0.stub)
15550                .list_locations(self.0.request, self.0.options)
15551                .await
15552                .map(crate::Response::into_body)
15553        }
15554
15555        /// Streams each page in the collection.
15556        pub fn by_page(
15557            self,
15558        ) -> impl google_cloud_gax::paginator::Paginator<
15559            google_cloud_location::model::ListLocationsResponse,
15560            crate::Error,
15561        > {
15562            use std::clone::Clone;
15563            let token = self.0.request.page_token.clone();
15564            let execute = move |token: String| {
15565                let mut builder = self.clone();
15566                builder.0.request = builder.0.request.set_page_token(token);
15567                builder.send()
15568            };
15569            google_cloud_gax::paginator::internal::new_paginator(token, execute)
15570        }
15571
15572        /// Streams each item in the collection.
15573        pub fn by_item(
15574            self,
15575        ) -> impl google_cloud_gax::paginator::ItemPaginator<
15576            google_cloud_location::model::ListLocationsResponse,
15577            crate::Error,
15578        > {
15579            use google_cloud_gax::paginator::Paginator;
15580            self.by_page().items()
15581        }
15582
15583        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
15584        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15585            self.0.request.name = v.into();
15586            self
15587        }
15588
15589        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
15590        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15591            self.0.request.filter = v.into();
15592            self
15593        }
15594
15595        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
15596        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15597            self.0.request.page_size = v.into();
15598            self
15599        }
15600
15601        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
15602        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15603            self.0.request.page_token = v.into();
15604            self
15605        }
15606    }
15607
15608    #[doc(hidden)]
15609    impl crate::RequestBuilder for ListLocations {
15610        fn request_options(&mut self) -> &mut crate::RequestOptions {
15611            &mut self.0.options
15612        }
15613    }
15614
15615    /// The request builder for [DataScanService::get_location][crate::client::DataScanService::get_location] calls.
15616    ///
15617    /// # Example
15618    /// ```
15619    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetLocation;
15620    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15621    ///
15622    /// let builder = prepare_request_builder();
15623    /// let response = builder.send().await?;
15624    /// # Ok(()) }
15625    ///
15626    /// fn prepare_request_builder() -> GetLocation {
15627    ///   # panic!();
15628    ///   // ... details omitted ...
15629    /// }
15630    /// ```
15631    #[derive(Clone, Debug)]
15632    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
15633
15634    impl GetLocation {
15635        pub(crate) fn new(
15636            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15637        ) -> Self {
15638            Self(RequestBuilder::new(stub))
15639        }
15640
15641        /// Sets the full request, replacing any prior values.
15642        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
15643            mut self,
15644            v: V,
15645        ) -> Self {
15646            self.0.request = v.into();
15647            self
15648        }
15649
15650        /// Sets all the options, replacing any prior values.
15651        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15652            self.0.options = v.into();
15653            self
15654        }
15655
15656        /// Sends the request.
15657        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
15658            (*self.0.stub)
15659                .get_location(self.0.request, self.0.options)
15660                .await
15661                .map(crate::Response::into_body)
15662        }
15663
15664        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
15665        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15666            self.0.request.name = v.into();
15667            self
15668        }
15669    }
15670
15671    #[doc(hidden)]
15672    impl crate::RequestBuilder for GetLocation {
15673        fn request_options(&mut self) -> &mut crate::RequestOptions {
15674            &mut self.0.options
15675        }
15676    }
15677
15678    /// The request builder for [DataScanService::set_iam_policy][crate::client::DataScanService::set_iam_policy] calls.
15679    ///
15680    /// # Example
15681    /// ```
15682    /// # use google_cloud_dataplex_v1::builder::data_scan_service::SetIamPolicy;
15683    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15684    ///
15685    /// let builder = prepare_request_builder();
15686    /// let response = builder.send().await?;
15687    /// # Ok(()) }
15688    ///
15689    /// fn prepare_request_builder() -> SetIamPolicy {
15690    ///   # panic!();
15691    ///   // ... details omitted ...
15692    /// }
15693    /// ```
15694    #[derive(Clone, Debug)]
15695    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
15696
15697    impl SetIamPolicy {
15698        pub(crate) fn new(
15699            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15700        ) -> Self {
15701            Self(RequestBuilder::new(stub))
15702        }
15703
15704        /// Sets the full request, replacing any prior values.
15705        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
15706            mut self,
15707            v: V,
15708        ) -> Self {
15709            self.0.request = v.into();
15710            self
15711        }
15712
15713        /// Sets all the options, replacing any prior values.
15714        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15715            self.0.options = v.into();
15716            self
15717        }
15718
15719        /// Sends the request.
15720        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
15721            (*self.0.stub)
15722                .set_iam_policy(self.0.request, self.0.options)
15723                .await
15724                .map(crate::Response::into_body)
15725        }
15726
15727        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
15728        ///
15729        /// This is a **required** field for requests.
15730        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
15731            self.0.request.resource = v.into();
15732            self
15733        }
15734
15735        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
15736        ///
15737        /// This is a **required** field for requests.
15738        pub fn set_policy<T>(mut self, v: T) -> Self
15739        where
15740            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
15741        {
15742            self.0.request.policy = std::option::Option::Some(v.into());
15743            self
15744        }
15745
15746        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
15747        ///
15748        /// This is a **required** field for requests.
15749        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
15750        where
15751            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
15752        {
15753            self.0.request.policy = v.map(|x| x.into());
15754            self
15755        }
15756
15757        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
15758        pub fn set_update_mask<T>(mut self, v: T) -> Self
15759        where
15760            T: std::convert::Into<wkt::FieldMask>,
15761        {
15762            self.0.request.update_mask = std::option::Option::Some(v.into());
15763            self
15764        }
15765
15766        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
15767        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15768        where
15769            T: std::convert::Into<wkt::FieldMask>,
15770        {
15771            self.0.request.update_mask = v.map(|x| x.into());
15772            self
15773        }
15774    }
15775
15776    #[doc(hidden)]
15777    impl crate::RequestBuilder for SetIamPolicy {
15778        fn request_options(&mut self) -> &mut crate::RequestOptions {
15779            &mut self.0.options
15780        }
15781    }
15782
15783    /// The request builder for [DataScanService::get_iam_policy][crate::client::DataScanService::get_iam_policy] calls.
15784    ///
15785    /// # Example
15786    /// ```
15787    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetIamPolicy;
15788    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15789    ///
15790    /// let builder = prepare_request_builder();
15791    /// let response = builder.send().await?;
15792    /// # Ok(()) }
15793    ///
15794    /// fn prepare_request_builder() -> GetIamPolicy {
15795    ///   # panic!();
15796    ///   // ... details omitted ...
15797    /// }
15798    /// ```
15799    #[derive(Clone, Debug)]
15800    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
15801
15802    impl GetIamPolicy {
15803        pub(crate) fn new(
15804            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15805        ) -> Self {
15806            Self(RequestBuilder::new(stub))
15807        }
15808
15809        /// Sets the full request, replacing any prior values.
15810        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
15811            mut self,
15812            v: V,
15813        ) -> Self {
15814            self.0.request = v.into();
15815            self
15816        }
15817
15818        /// Sets all the options, replacing any prior values.
15819        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15820            self.0.options = v.into();
15821            self
15822        }
15823
15824        /// Sends the request.
15825        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
15826            (*self.0.stub)
15827                .get_iam_policy(self.0.request, self.0.options)
15828                .await
15829                .map(crate::Response::into_body)
15830        }
15831
15832        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
15833        ///
15834        /// This is a **required** field for requests.
15835        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
15836            self.0.request.resource = v.into();
15837            self
15838        }
15839
15840        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
15841        pub fn set_options<T>(mut self, v: T) -> Self
15842        where
15843            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
15844        {
15845            self.0.request.options = std::option::Option::Some(v.into());
15846            self
15847        }
15848
15849        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
15850        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
15851        where
15852            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
15853        {
15854            self.0.request.options = v.map(|x| x.into());
15855            self
15856        }
15857    }
15858
15859    #[doc(hidden)]
15860    impl crate::RequestBuilder for GetIamPolicy {
15861        fn request_options(&mut self) -> &mut crate::RequestOptions {
15862            &mut self.0.options
15863        }
15864    }
15865
15866    /// The request builder for [DataScanService::test_iam_permissions][crate::client::DataScanService::test_iam_permissions] calls.
15867    ///
15868    /// # Example
15869    /// ```
15870    /// # use google_cloud_dataplex_v1::builder::data_scan_service::TestIamPermissions;
15871    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15872    ///
15873    /// let builder = prepare_request_builder();
15874    /// let response = builder.send().await?;
15875    /// # Ok(()) }
15876    ///
15877    /// fn prepare_request_builder() -> TestIamPermissions {
15878    ///   # panic!();
15879    ///   // ... details omitted ...
15880    /// }
15881    /// ```
15882    #[derive(Clone, Debug)]
15883    pub struct TestIamPermissions(
15884        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
15885    );
15886
15887    impl TestIamPermissions {
15888        pub(crate) fn new(
15889            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15890        ) -> Self {
15891            Self(RequestBuilder::new(stub))
15892        }
15893
15894        /// Sets the full request, replacing any prior values.
15895        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
15896            mut self,
15897            v: V,
15898        ) -> Self {
15899            self.0.request = v.into();
15900            self
15901        }
15902
15903        /// Sets all the options, replacing any prior values.
15904        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15905            self.0.options = v.into();
15906            self
15907        }
15908
15909        /// Sends the request.
15910        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
15911            (*self.0.stub)
15912                .test_iam_permissions(self.0.request, self.0.options)
15913                .await
15914                .map(crate::Response::into_body)
15915        }
15916
15917        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
15918        ///
15919        /// This is a **required** field for requests.
15920        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
15921            self.0.request.resource = v.into();
15922            self
15923        }
15924
15925        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
15926        ///
15927        /// This is a **required** field for requests.
15928        pub fn set_permissions<T, V>(mut self, v: T) -> Self
15929        where
15930            T: std::iter::IntoIterator<Item = V>,
15931            V: std::convert::Into<std::string::String>,
15932        {
15933            use std::iter::Iterator;
15934            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
15935            self
15936        }
15937    }
15938
15939    #[doc(hidden)]
15940    impl crate::RequestBuilder for TestIamPermissions {
15941        fn request_options(&mut self) -> &mut crate::RequestOptions {
15942            &mut self.0.options
15943        }
15944    }
15945
15946    /// The request builder for [DataScanService::list_operations][crate::client::DataScanService::list_operations] calls.
15947    ///
15948    /// # Example
15949    /// ```
15950    /// # use google_cloud_dataplex_v1::builder::data_scan_service::ListOperations;
15951    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
15952    /// use google_cloud_gax::paginator::ItemPaginator;
15953    ///
15954    /// let builder = prepare_request_builder();
15955    /// let mut items = builder.by_item();
15956    /// while let Some(result) = items.next().await {
15957    ///   let item = result?;
15958    /// }
15959    /// # Ok(()) }
15960    ///
15961    /// fn prepare_request_builder() -> ListOperations {
15962    ///   # panic!();
15963    ///   // ... details omitted ...
15964    /// }
15965    /// ```
15966    #[derive(Clone, Debug)]
15967    pub struct ListOperations(
15968        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
15969    );
15970
15971    impl ListOperations {
15972        pub(crate) fn new(
15973            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15974        ) -> Self {
15975            Self(RequestBuilder::new(stub))
15976        }
15977
15978        /// Sets the full request, replacing any prior values.
15979        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
15980            mut self,
15981            v: V,
15982        ) -> Self {
15983            self.0.request = v.into();
15984            self
15985        }
15986
15987        /// Sets all the options, replacing any prior values.
15988        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15989            self.0.options = v.into();
15990            self
15991        }
15992
15993        /// Sends the request.
15994        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
15995            (*self.0.stub)
15996                .list_operations(self.0.request, self.0.options)
15997                .await
15998                .map(crate::Response::into_body)
15999        }
16000
16001        /// Streams each page in the collection.
16002        pub fn by_page(
16003            self,
16004        ) -> impl google_cloud_gax::paginator::Paginator<
16005            google_cloud_longrunning::model::ListOperationsResponse,
16006            crate::Error,
16007        > {
16008            use std::clone::Clone;
16009            let token = self.0.request.page_token.clone();
16010            let execute = move |token: String| {
16011                let mut builder = self.clone();
16012                builder.0.request = builder.0.request.set_page_token(token);
16013                builder.send()
16014            };
16015            google_cloud_gax::paginator::internal::new_paginator(token, execute)
16016        }
16017
16018        /// Streams each item in the collection.
16019        pub fn by_item(
16020            self,
16021        ) -> impl google_cloud_gax::paginator::ItemPaginator<
16022            google_cloud_longrunning::model::ListOperationsResponse,
16023            crate::Error,
16024        > {
16025            use google_cloud_gax::paginator::Paginator;
16026            self.by_page().items()
16027        }
16028
16029        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
16030        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16031            self.0.request.name = v.into();
16032            self
16033        }
16034
16035        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
16036        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16037            self.0.request.filter = v.into();
16038            self
16039        }
16040
16041        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
16042        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16043            self.0.request.page_size = v.into();
16044            self
16045        }
16046
16047        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
16048        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16049            self.0.request.page_token = v.into();
16050            self
16051        }
16052
16053        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
16054        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
16055            self.0.request.return_partial_success = v.into();
16056            self
16057        }
16058    }
16059
16060    #[doc(hidden)]
16061    impl crate::RequestBuilder for ListOperations {
16062        fn request_options(&mut self) -> &mut crate::RequestOptions {
16063            &mut self.0.options
16064        }
16065    }
16066
16067    /// The request builder for [DataScanService::get_operation][crate::client::DataScanService::get_operation] calls.
16068    ///
16069    /// # Example
16070    /// ```
16071    /// # use google_cloud_dataplex_v1::builder::data_scan_service::GetOperation;
16072    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16073    ///
16074    /// let builder = prepare_request_builder();
16075    /// let response = builder.send().await?;
16076    /// # Ok(()) }
16077    ///
16078    /// fn prepare_request_builder() -> GetOperation {
16079    ///   # panic!();
16080    ///   // ... details omitted ...
16081    /// }
16082    /// ```
16083    #[derive(Clone, Debug)]
16084    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
16085
16086    impl GetOperation {
16087        pub(crate) fn new(
16088            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
16089        ) -> Self {
16090            Self(RequestBuilder::new(stub))
16091        }
16092
16093        /// Sets the full request, replacing any prior values.
16094        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
16095            mut self,
16096            v: V,
16097        ) -> Self {
16098            self.0.request = v.into();
16099            self
16100        }
16101
16102        /// Sets all the options, replacing any prior values.
16103        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16104            self.0.options = v.into();
16105            self
16106        }
16107
16108        /// Sends the request.
16109        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
16110            (*self.0.stub)
16111                .get_operation(self.0.request, self.0.options)
16112                .await
16113                .map(crate::Response::into_body)
16114        }
16115
16116        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
16117        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16118            self.0.request.name = v.into();
16119            self
16120        }
16121    }
16122
16123    #[doc(hidden)]
16124    impl crate::RequestBuilder for GetOperation {
16125        fn request_options(&mut self) -> &mut crate::RequestOptions {
16126            &mut self.0.options
16127        }
16128    }
16129
16130    /// The request builder for [DataScanService::delete_operation][crate::client::DataScanService::delete_operation] calls.
16131    ///
16132    /// # Example
16133    /// ```
16134    /// # use google_cloud_dataplex_v1::builder::data_scan_service::DeleteOperation;
16135    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16136    ///
16137    /// let builder = prepare_request_builder();
16138    /// let response = builder.send().await?;
16139    /// # Ok(()) }
16140    ///
16141    /// fn prepare_request_builder() -> DeleteOperation {
16142    ///   # panic!();
16143    ///   // ... details omitted ...
16144    /// }
16145    /// ```
16146    #[derive(Clone, Debug)]
16147    pub struct DeleteOperation(
16148        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
16149    );
16150
16151    impl DeleteOperation {
16152        pub(crate) fn new(
16153            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
16154        ) -> Self {
16155            Self(RequestBuilder::new(stub))
16156        }
16157
16158        /// Sets the full request, replacing any prior values.
16159        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
16160            mut self,
16161            v: V,
16162        ) -> Self {
16163            self.0.request = v.into();
16164            self
16165        }
16166
16167        /// Sets all the options, replacing any prior values.
16168        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16169            self.0.options = v.into();
16170            self
16171        }
16172
16173        /// Sends the request.
16174        pub async fn send(self) -> Result<()> {
16175            (*self.0.stub)
16176                .delete_operation(self.0.request, self.0.options)
16177                .await
16178                .map(crate::Response::into_body)
16179        }
16180
16181        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
16182        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16183            self.0.request.name = v.into();
16184            self
16185        }
16186    }
16187
16188    #[doc(hidden)]
16189    impl crate::RequestBuilder for DeleteOperation {
16190        fn request_options(&mut self) -> &mut crate::RequestOptions {
16191            &mut self.0.options
16192        }
16193    }
16194
16195    /// The request builder for [DataScanService::cancel_operation][crate::client::DataScanService::cancel_operation] calls.
16196    ///
16197    /// # Example
16198    /// ```
16199    /// # use google_cloud_dataplex_v1::builder::data_scan_service::CancelOperation;
16200    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16201    ///
16202    /// let builder = prepare_request_builder();
16203    /// let response = builder.send().await?;
16204    /// # Ok(()) }
16205    ///
16206    /// fn prepare_request_builder() -> CancelOperation {
16207    ///   # panic!();
16208    ///   // ... details omitted ...
16209    /// }
16210    /// ```
16211    #[derive(Clone, Debug)]
16212    pub struct CancelOperation(
16213        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
16214    );
16215
16216    impl CancelOperation {
16217        pub(crate) fn new(
16218            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
16219        ) -> Self {
16220            Self(RequestBuilder::new(stub))
16221        }
16222
16223        /// Sets the full request, replacing any prior values.
16224        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
16225            mut self,
16226            v: V,
16227        ) -> Self {
16228            self.0.request = v.into();
16229            self
16230        }
16231
16232        /// Sets all the options, replacing any prior values.
16233        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16234            self.0.options = v.into();
16235            self
16236        }
16237
16238        /// Sends the request.
16239        pub async fn send(self) -> Result<()> {
16240            (*self.0.stub)
16241                .cancel_operation(self.0.request, self.0.options)
16242                .await
16243                .map(crate::Response::into_body)
16244        }
16245
16246        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
16247        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16248            self.0.request.name = v.into();
16249            self
16250        }
16251    }
16252
16253    #[doc(hidden)]
16254    impl crate::RequestBuilder for CancelOperation {
16255        fn request_options(&mut self) -> &mut crate::RequestOptions {
16256            &mut self.0.options
16257        }
16258    }
16259}
16260
16261/// Request and client builders for [MetadataService][crate::client::MetadataService].
16262pub mod metadata_service {
16263    use crate::Result;
16264
16265    /// A builder for [MetadataService][crate::client::MetadataService].
16266    ///
16267    /// ```
16268    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
16269    /// # use google_cloud_dataplex_v1::*;
16270    /// # use builder::metadata_service::ClientBuilder;
16271    /// # use client::MetadataService;
16272    /// let builder : ClientBuilder = MetadataService::builder();
16273    /// let client = builder
16274    ///     .with_endpoint("https://dataplex.googleapis.com")
16275    ///     .build().await?;
16276    /// # Ok(()) }
16277    /// ```
16278    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
16279
16280    pub(crate) mod client {
16281        use super::super::super::client::MetadataService;
16282        pub struct Factory;
16283        impl crate::ClientFactory for Factory {
16284            type Client = MetadataService;
16285            type Credentials = gaxi::options::Credentials;
16286            async fn build(
16287                self,
16288                config: gaxi::options::ClientConfig,
16289            ) -> crate::ClientBuilderResult<Self::Client> {
16290                Self::Client::new(config).await
16291            }
16292        }
16293    }
16294
16295    /// Common implementation for [crate::client::MetadataService] request builders.
16296    #[derive(Clone, Debug)]
16297    pub(crate) struct RequestBuilder<R: std::default::Default> {
16298        stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16299        request: R,
16300        options: crate::RequestOptions,
16301    }
16302
16303    impl<R> RequestBuilder<R>
16304    where
16305        R: std::default::Default,
16306    {
16307        pub(crate) fn new(
16308            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16309        ) -> Self {
16310            Self {
16311                stub,
16312                request: R::default(),
16313                options: crate::RequestOptions::default(),
16314            }
16315        }
16316    }
16317
16318    /// The request builder for [MetadataService::create_entity][crate::client::MetadataService::create_entity] calls.
16319    ///
16320    /// # Example
16321    /// ```
16322    /// # use google_cloud_dataplex_v1::builder::metadata_service::CreateEntity;
16323    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16324    ///
16325    /// let builder = prepare_request_builder();
16326    /// let response = builder.send().await?;
16327    /// # Ok(()) }
16328    ///
16329    /// fn prepare_request_builder() -> CreateEntity {
16330    ///   # panic!();
16331    ///   // ... details omitted ...
16332    /// }
16333    /// ```
16334    #[derive(Clone, Debug)]
16335    pub struct CreateEntity(RequestBuilder<crate::model::CreateEntityRequest>);
16336
16337    impl CreateEntity {
16338        pub(crate) fn new(
16339            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16340        ) -> Self {
16341            Self(RequestBuilder::new(stub))
16342        }
16343
16344        /// Sets the full request, replacing any prior values.
16345        pub fn with_request<V: Into<crate::model::CreateEntityRequest>>(mut self, v: V) -> Self {
16346            self.0.request = v.into();
16347            self
16348        }
16349
16350        /// Sets all the options, replacing any prior values.
16351        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16352            self.0.options = v.into();
16353            self
16354        }
16355
16356        /// Sends the request.
16357        pub async fn send(self) -> Result<crate::model::Entity> {
16358            (*self.0.stub)
16359                .create_entity(self.0.request, self.0.options)
16360                .await
16361                .map(crate::Response::into_body)
16362        }
16363
16364        /// Sets the value of [parent][crate::model::CreateEntityRequest::parent].
16365        ///
16366        /// This is a **required** field for requests.
16367        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16368            self.0.request.parent = v.into();
16369            self
16370        }
16371
16372        /// Sets the value of [entity][crate::model::CreateEntityRequest::entity].
16373        ///
16374        /// This is a **required** field for requests.
16375        pub fn set_entity<T>(mut self, v: T) -> Self
16376        where
16377            T: std::convert::Into<crate::model::Entity>,
16378        {
16379            self.0.request.entity = std::option::Option::Some(v.into());
16380            self
16381        }
16382
16383        /// Sets or clears the value of [entity][crate::model::CreateEntityRequest::entity].
16384        ///
16385        /// This is a **required** field for requests.
16386        pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
16387        where
16388            T: std::convert::Into<crate::model::Entity>,
16389        {
16390            self.0.request.entity = v.map(|x| x.into());
16391            self
16392        }
16393
16394        /// Sets the value of [validate_only][crate::model::CreateEntityRequest::validate_only].
16395        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16396            self.0.request.validate_only = v.into();
16397            self
16398        }
16399    }
16400
16401    #[doc(hidden)]
16402    impl crate::RequestBuilder for CreateEntity {
16403        fn request_options(&mut self) -> &mut crate::RequestOptions {
16404            &mut self.0.options
16405        }
16406    }
16407
16408    /// The request builder for [MetadataService::update_entity][crate::client::MetadataService::update_entity] calls.
16409    ///
16410    /// # Example
16411    /// ```
16412    /// # use google_cloud_dataplex_v1::builder::metadata_service::UpdateEntity;
16413    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16414    ///
16415    /// let builder = prepare_request_builder();
16416    /// let response = builder.send().await?;
16417    /// # Ok(()) }
16418    ///
16419    /// fn prepare_request_builder() -> UpdateEntity {
16420    ///   # panic!();
16421    ///   // ... details omitted ...
16422    /// }
16423    /// ```
16424    #[derive(Clone, Debug)]
16425    pub struct UpdateEntity(RequestBuilder<crate::model::UpdateEntityRequest>);
16426
16427    impl UpdateEntity {
16428        pub(crate) fn new(
16429            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16430        ) -> Self {
16431            Self(RequestBuilder::new(stub))
16432        }
16433
16434        /// Sets the full request, replacing any prior values.
16435        pub fn with_request<V: Into<crate::model::UpdateEntityRequest>>(mut self, v: V) -> Self {
16436            self.0.request = v.into();
16437            self
16438        }
16439
16440        /// Sets all the options, replacing any prior values.
16441        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16442            self.0.options = v.into();
16443            self
16444        }
16445
16446        /// Sends the request.
16447        pub async fn send(self) -> Result<crate::model::Entity> {
16448            (*self.0.stub)
16449                .update_entity(self.0.request, self.0.options)
16450                .await
16451                .map(crate::Response::into_body)
16452        }
16453
16454        /// Sets the value of [entity][crate::model::UpdateEntityRequest::entity].
16455        ///
16456        /// This is a **required** field for requests.
16457        pub fn set_entity<T>(mut self, v: T) -> Self
16458        where
16459            T: std::convert::Into<crate::model::Entity>,
16460        {
16461            self.0.request.entity = std::option::Option::Some(v.into());
16462            self
16463        }
16464
16465        /// Sets or clears the value of [entity][crate::model::UpdateEntityRequest::entity].
16466        ///
16467        /// This is a **required** field for requests.
16468        pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
16469        where
16470            T: std::convert::Into<crate::model::Entity>,
16471        {
16472            self.0.request.entity = v.map(|x| x.into());
16473            self
16474        }
16475
16476        /// Sets the value of [validate_only][crate::model::UpdateEntityRequest::validate_only].
16477        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16478            self.0.request.validate_only = v.into();
16479            self
16480        }
16481    }
16482
16483    #[doc(hidden)]
16484    impl crate::RequestBuilder for UpdateEntity {
16485        fn request_options(&mut self) -> &mut crate::RequestOptions {
16486            &mut self.0.options
16487        }
16488    }
16489
16490    /// The request builder for [MetadataService::delete_entity][crate::client::MetadataService::delete_entity] calls.
16491    ///
16492    /// # Example
16493    /// ```
16494    /// # use google_cloud_dataplex_v1::builder::metadata_service::DeleteEntity;
16495    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16496    ///
16497    /// let builder = prepare_request_builder();
16498    /// let response = builder.send().await?;
16499    /// # Ok(()) }
16500    ///
16501    /// fn prepare_request_builder() -> DeleteEntity {
16502    ///   # panic!();
16503    ///   // ... details omitted ...
16504    /// }
16505    /// ```
16506    #[derive(Clone, Debug)]
16507    pub struct DeleteEntity(RequestBuilder<crate::model::DeleteEntityRequest>);
16508
16509    impl DeleteEntity {
16510        pub(crate) fn new(
16511            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16512        ) -> Self {
16513            Self(RequestBuilder::new(stub))
16514        }
16515
16516        /// Sets the full request, replacing any prior values.
16517        pub fn with_request<V: Into<crate::model::DeleteEntityRequest>>(mut self, v: V) -> Self {
16518            self.0.request = v.into();
16519            self
16520        }
16521
16522        /// Sets all the options, replacing any prior values.
16523        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16524            self.0.options = v.into();
16525            self
16526        }
16527
16528        /// Sends the request.
16529        pub async fn send(self) -> Result<()> {
16530            (*self.0.stub)
16531                .delete_entity(self.0.request, self.0.options)
16532                .await
16533                .map(crate::Response::into_body)
16534        }
16535
16536        /// Sets the value of [name][crate::model::DeleteEntityRequest::name].
16537        ///
16538        /// This is a **required** field for requests.
16539        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16540            self.0.request.name = v.into();
16541            self
16542        }
16543
16544        /// Sets the value of [etag][crate::model::DeleteEntityRequest::etag].
16545        ///
16546        /// This is a **required** field for requests.
16547        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
16548            self.0.request.etag = v.into();
16549            self
16550        }
16551    }
16552
16553    #[doc(hidden)]
16554    impl crate::RequestBuilder for DeleteEntity {
16555        fn request_options(&mut self) -> &mut crate::RequestOptions {
16556            &mut self.0.options
16557        }
16558    }
16559
16560    /// The request builder for [MetadataService::get_entity][crate::client::MetadataService::get_entity] calls.
16561    ///
16562    /// # Example
16563    /// ```
16564    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetEntity;
16565    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16566    ///
16567    /// let builder = prepare_request_builder();
16568    /// let response = builder.send().await?;
16569    /// # Ok(()) }
16570    ///
16571    /// fn prepare_request_builder() -> GetEntity {
16572    ///   # panic!();
16573    ///   // ... details omitted ...
16574    /// }
16575    /// ```
16576    #[derive(Clone, Debug)]
16577    pub struct GetEntity(RequestBuilder<crate::model::GetEntityRequest>);
16578
16579    impl GetEntity {
16580        pub(crate) fn new(
16581            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16582        ) -> Self {
16583            Self(RequestBuilder::new(stub))
16584        }
16585
16586        /// Sets the full request, replacing any prior values.
16587        pub fn with_request<V: Into<crate::model::GetEntityRequest>>(mut self, v: V) -> Self {
16588            self.0.request = v.into();
16589            self
16590        }
16591
16592        /// Sets all the options, replacing any prior values.
16593        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16594            self.0.options = v.into();
16595            self
16596        }
16597
16598        /// Sends the request.
16599        pub async fn send(self) -> Result<crate::model::Entity> {
16600            (*self.0.stub)
16601                .get_entity(self.0.request, self.0.options)
16602                .await
16603                .map(crate::Response::into_body)
16604        }
16605
16606        /// Sets the value of [name][crate::model::GetEntityRequest::name].
16607        ///
16608        /// This is a **required** field for requests.
16609        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16610            self.0.request.name = v.into();
16611            self
16612        }
16613
16614        /// Sets the value of [view][crate::model::GetEntityRequest::view].
16615        pub fn set_view<T: Into<crate::model::get_entity_request::EntityView>>(
16616            mut self,
16617            v: T,
16618        ) -> Self {
16619            self.0.request.view = v.into();
16620            self
16621        }
16622    }
16623
16624    #[doc(hidden)]
16625    impl crate::RequestBuilder for GetEntity {
16626        fn request_options(&mut self) -> &mut crate::RequestOptions {
16627            &mut self.0.options
16628        }
16629    }
16630
16631    /// The request builder for [MetadataService::list_entities][crate::client::MetadataService::list_entities] calls.
16632    ///
16633    /// # Example
16634    /// ```
16635    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListEntities;
16636    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16637    /// use google_cloud_gax::paginator::ItemPaginator;
16638    ///
16639    /// let builder = prepare_request_builder();
16640    /// let mut items = builder.by_item();
16641    /// while let Some(result) = items.next().await {
16642    ///   let item = result?;
16643    /// }
16644    /// # Ok(()) }
16645    ///
16646    /// fn prepare_request_builder() -> ListEntities {
16647    ///   # panic!();
16648    ///   // ... details omitted ...
16649    /// }
16650    /// ```
16651    #[derive(Clone, Debug)]
16652    pub struct ListEntities(RequestBuilder<crate::model::ListEntitiesRequest>);
16653
16654    impl ListEntities {
16655        pub(crate) fn new(
16656            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16657        ) -> Self {
16658            Self(RequestBuilder::new(stub))
16659        }
16660
16661        /// Sets the full request, replacing any prior values.
16662        pub fn with_request<V: Into<crate::model::ListEntitiesRequest>>(mut self, v: V) -> Self {
16663            self.0.request = v.into();
16664            self
16665        }
16666
16667        /// Sets all the options, replacing any prior values.
16668        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16669            self.0.options = v.into();
16670            self
16671        }
16672
16673        /// Sends the request.
16674        pub async fn send(self) -> Result<crate::model::ListEntitiesResponse> {
16675            (*self.0.stub)
16676                .list_entities(self.0.request, self.0.options)
16677                .await
16678                .map(crate::Response::into_body)
16679        }
16680
16681        /// Streams each page in the collection.
16682        pub fn by_page(
16683            self,
16684        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListEntitiesResponse, crate::Error>
16685        {
16686            use std::clone::Clone;
16687            let token = self.0.request.page_token.clone();
16688            let execute = move |token: String| {
16689                let mut builder = self.clone();
16690                builder.0.request = builder.0.request.set_page_token(token);
16691                builder.send()
16692            };
16693            google_cloud_gax::paginator::internal::new_paginator(token, execute)
16694        }
16695
16696        /// Streams each item in the collection.
16697        pub fn by_item(
16698            self,
16699        ) -> impl google_cloud_gax::paginator::ItemPaginator<
16700            crate::model::ListEntitiesResponse,
16701            crate::Error,
16702        > {
16703            use google_cloud_gax::paginator::Paginator;
16704            self.by_page().items()
16705        }
16706
16707        /// Sets the value of [parent][crate::model::ListEntitiesRequest::parent].
16708        ///
16709        /// This is a **required** field for requests.
16710        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16711            self.0.request.parent = v.into();
16712            self
16713        }
16714
16715        /// Sets the value of [view][crate::model::ListEntitiesRequest::view].
16716        ///
16717        /// This is a **required** field for requests.
16718        pub fn set_view<T: Into<crate::model::list_entities_request::EntityView>>(
16719            mut self,
16720            v: T,
16721        ) -> Self {
16722            self.0.request.view = v.into();
16723            self
16724        }
16725
16726        /// Sets the value of [page_size][crate::model::ListEntitiesRequest::page_size].
16727        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16728            self.0.request.page_size = v.into();
16729            self
16730        }
16731
16732        /// Sets the value of [page_token][crate::model::ListEntitiesRequest::page_token].
16733        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16734            self.0.request.page_token = v.into();
16735            self
16736        }
16737
16738        /// Sets the value of [filter][crate::model::ListEntitiesRequest::filter].
16739        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16740            self.0.request.filter = v.into();
16741            self
16742        }
16743    }
16744
16745    #[doc(hidden)]
16746    impl crate::RequestBuilder for ListEntities {
16747        fn request_options(&mut self) -> &mut crate::RequestOptions {
16748            &mut self.0.options
16749        }
16750    }
16751
16752    /// The request builder for [MetadataService::create_partition][crate::client::MetadataService::create_partition] calls.
16753    ///
16754    /// # Example
16755    /// ```
16756    /// # use google_cloud_dataplex_v1::builder::metadata_service::CreatePartition;
16757    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16758    ///
16759    /// let builder = prepare_request_builder();
16760    /// let response = builder.send().await?;
16761    /// # Ok(()) }
16762    ///
16763    /// fn prepare_request_builder() -> CreatePartition {
16764    ///   # panic!();
16765    ///   // ... details omitted ...
16766    /// }
16767    /// ```
16768    #[derive(Clone, Debug)]
16769    pub struct CreatePartition(RequestBuilder<crate::model::CreatePartitionRequest>);
16770
16771    impl CreatePartition {
16772        pub(crate) fn new(
16773            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16774        ) -> Self {
16775            Self(RequestBuilder::new(stub))
16776        }
16777
16778        /// Sets the full request, replacing any prior values.
16779        pub fn with_request<V: Into<crate::model::CreatePartitionRequest>>(mut self, v: V) -> Self {
16780            self.0.request = v.into();
16781            self
16782        }
16783
16784        /// Sets all the options, replacing any prior values.
16785        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16786            self.0.options = v.into();
16787            self
16788        }
16789
16790        /// Sends the request.
16791        pub async fn send(self) -> Result<crate::model::Partition> {
16792            (*self.0.stub)
16793                .create_partition(self.0.request, self.0.options)
16794                .await
16795                .map(crate::Response::into_body)
16796        }
16797
16798        /// Sets the value of [parent][crate::model::CreatePartitionRequest::parent].
16799        ///
16800        /// This is a **required** field for requests.
16801        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16802            self.0.request.parent = v.into();
16803            self
16804        }
16805
16806        /// Sets the value of [partition][crate::model::CreatePartitionRequest::partition].
16807        ///
16808        /// This is a **required** field for requests.
16809        pub fn set_partition<T>(mut self, v: T) -> Self
16810        where
16811            T: std::convert::Into<crate::model::Partition>,
16812        {
16813            self.0.request.partition = std::option::Option::Some(v.into());
16814            self
16815        }
16816
16817        /// Sets or clears the value of [partition][crate::model::CreatePartitionRequest::partition].
16818        ///
16819        /// This is a **required** field for requests.
16820        pub fn set_or_clear_partition<T>(mut self, v: std::option::Option<T>) -> Self
16821        where
16822            T: std::convert::Into<crate::model::Partition>,
16823        {
16824            self.0.request.partition = v.map(|x| x.into());
16825            self
16826        }
16827
16828        /// Sets the value of [validate_only][crate::model::CreatePartitionRequest::validate_only].
16829        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16830            self.0.request.validate_only = v.into();
16831            self
16832        }
16833    }
16834
16835    #[doc(hidden)]
16836    impl crate::RequestBuilder for CreatePartition {
16837        fn request_options(&mut self) -> &mut crate::RequestOptions {
16838            &mut self.0.options
16839        }
16840    }
16841
16842    /// The request builder for [MetadataService::delete_partition][crate::client::MetadataService::delete_partition] calls.
16843    ///
16844    /// # Example
16845    /// ```
16846    /// # use google_cloud_dataplex_v1::builder::metadata_service::DeletePartition;
16847    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16848    ///
16849    /// let builder = prepare_request_builder();
16850    /// let response = builder.send().await?;
16851    /// # Ok(()) }
16852    ///
16853    /// fn prepare_request_builder() -> DeletePartition {
16854    ///   # panic!();
16855    ///   // ... details omitted ...
16856    /// }
16857    /// ```
16858    #[derive(Clone, Debug)]
16859    pub struct DeletePartition(RequestBuilder<crate::model::DeletePartitionRequest>);
16860
16861    impl DeletePartition {
16862        pub(crate) fn new(
16863            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16864        ) -> Self {
16865            Self(RequestBuilder::new(stub))
16866        }
16867
16868        /// Sets the full request, replacing any prior values.
16869        pub fn with_request<V: Into<crate::model::DeletePartitionRequest>>(mut self, v: V) -> Self {
16870            self.0.request = v.into();
16871            self
16872        }
16873
16874        /// Sets all the options, replacing any prior values.
16875        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16876            self.0.options = v.into();
16877            self
16878        }
16879
16880        /// Sends the request.
16881        pub async fn send(self) -> Result<()> {
16882            (*self.0.stub)
16883                .delete_partition(self.0.request, self.0.options)
16884                .await
16885                .map(crate::Response::into_body)
16886        }
16887
16888        /// Sets the value of [name][crate::model::DeletePartitionRequest::name].
16889        ///
16890        /// This is a **required** field for requests.
16891        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16892            self.0.request.name = v.into();
16893            self
16894        }
16895
16896        /// Sets the value of [etag][crate::model::DeletePartitionRequest::etag].
16897        #[deprecated]
16898        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
16899            self.0.request.etag = v.into();
16900            self
16901        }
16902    }
16903
16904    #[doc(hidden)]
16905    impl crate::RequestBuilder for DeletePartition {
16906        fn request_options(&mut self) -> &mut crate::RequestOptions {
16907            &mut self.0.options
16908        }
16909    }
16910
16911    /// The request builder for [MetadataService::get_partition][crate::client::MetadataService::get_partition] calls.
16912    ///
16913    /// # Example
16914    /// ```
16915    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetPartition;
16916    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16917    ///
16918    /// let builder = prepare_request_builder();
16919    /// let response = builder.send().await?;
16920    /// # Ok(()) }
16921    ///
16922    /// fn prepare_request_builder() -> GetPartition {
16923    ///   # panic!();
16924    ///   // ... details omitted ...
16925    /// }
16926    /// ```
16927    #[derive(Clone, Debug)]
16928    pub struct GetPartition(RequestBuilder<crate::model::GetPartitionRequest>);
16929
16930    impl GetPartition {
16931        pub(crate) fn new(
16932            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16933        ) -> Self {
16934            Self(RequestBuilder::new(stub))
16935        }
16936
16937        /// Sets the full request, replacing any prior values.
16938        pub fn with_request<V: Into<crate::model::GetPartitionRequest>>(mut self, v: V) -> Self {
16939            self.0.request = v.into();
16940            self
16941        }
16942
16943        /// Sets all the options, replacing any prior values.
16944        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16945            self.0.options = v.into();
16946            self
16947        }
16948
16949        /// Sends the request.
16950        pub async fn send(self) -> Result<crate::model::Partition> {
16951            (*self.0.stub)
16952                .get_partition(self.0.request, self.0.options)
16953                .await
16954                .map(crate::Response::into_body)
16955        }
16956
16957        /// Sets the value of [name][crate::model::GetPartitionRequest::name].
16958        ///
16959        /// This is a **required** field for requests.
16960        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16961            self.0.request.name = v.into();
16962            self
16963        }
16964    }
16965
16966    #[doc(hidden)]
16967    impl crate::RequestBuilder for GetPartition {
16968        fn request_options(&mut self) -> &mut crate::RequestOptions {
16969            &mut self.0.options
16970        }
16971    }
16972
16973    /// The request builder for [MetadataService::list_partitions][crate::client::MetadataService::list_partitions] calls.
16974    ///
16975    /// # Example
16976    /// ```
16977    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListPartitions;
16978    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
16979    /// use google_cloud_gax::paginator::ItemPaginator;
16980    ///
16981    /// let builder = prepare_request_builder();
16982    /// let mut items = builder.by_item();
16983    /// while let Some(result) = items.next().await {
16984    ///   let item = result?;
16985    /// }
16986    /// # Ok(()) }
16987    ///
16988    /// fn prepare_request_builder() -> ListPartitions {
16989    ///   # panic!();
16990    ///   // ... details omitted ...
16991    /// }
16992    /// ```
16993    #[derive(Clone, Debug)]
16994    pub struct ListPartitions(RequestBuilder<crate::model::ListPartitionsRequest>);
16995
16996    impl ListPartitions {
16997        pub(crate) fn new(
16998            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16999        ) -> Self {
17000            Self(RequestBuilder::new(stub))
17001        }
17002
17003        /// Sets the full request, replacing any prior values.
17004        pub fn with_request<V: Into<crate::model::ListPartitionsRequest>>(mut self, v: V) -> Self {
17005            self.0.request = v.into();
17006            self
17007        }
17008
17009        /// Sets all the options, replacing any prior values.
17010        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17011            self.0.options = v.into();
17012            self
17013        }
17014
17015        /// Sends the request.
17016        pub async fn send(self) -> Result<crate::model::ListPartitionsResponse> {
17017            (*self.0.stub)
17018                .list_partitions(self.0.request, self.0.options)
17019                .await
17020                .map(crate::Response::into_body)
17021        }
17022
17023        /// Streams each page in the collection.
17024        pub fn by_page(
17025            self,
17026        ) -> impl google_cloud_gax::paginator::Paginator<
17027            crate::model::ListPartitionsResponse,
17028            crate::Error,
17029        > {
17030            use std::clone::Clone;
17031            let token = self.0.request.page_token.clone();
17032            let execute = move |token: String| {
17033                let mut builder = self.clone();
17034                builder.0.request = builder.0.request.set_page_token(token);
17035                builder.send()
17036            };
17037            google_cloud_gax::paginator::internal::new_paginator(token, execute)
17038        }
17039
17040        /// Streams each item in the collection.
17041        pub fn by_item(
17042            self,
17043        ) -> impl google_cloud_gax::paginator::ItemPaginator<
17044            crate::model::ListPartitionsResponse,
17045            crate::Error,
17046        > {
17047            use google_cloud_gax::paginator::Paginator;
17048            self.by_page().items()
17049        }
17050
17051        /// Sets the value of [parent][crate::model::ListPartitionsRequest::parent].
17052        ///
17053        /// This is a **required** field for requests.
17054        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
17055            self.0.request.parent = v.into();
17056            self
17057        }
17058
17059        /// Sets the value of [page_size][crate::model::ListPartitionsRequest::page_size].
17060        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17061            self.0.request.page_size = v.into();
17062            self
17063        }
17064
17065        /// Sets the value of [page_token][crate::model::ListPartitionsRequest::page_token].
17066        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17067            self.0.request.page_token = v.into();
17068            self
17069        }
17070
17071        /// Sets the value of [filter][crate::model::ListPartitionsRequest::filter].
17072        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
17073            self.0.request.filter = v.into();
17074            self
17075        }
17076    }
17077
17078    #[doc(hidden)]
17079    impl crate::RequestBuilder for ListPartitions {
17080        fn request_options(&mut self) -> &mut crate::RequestOptions {
17081            &mut self.0.options
17082        }
17083    }
17084
17085    /// The request builder for [MetadataService::list_locations][crate::client::MetadataService::list_locations] calls.
17086    ///
17087    /// # Example
17088    /// ```
17089    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListLocations;
17090    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17091    /// use google_cloud_gax::paginator::ItemPaginator;
17092    ///
17093    /// let builder = prepare_request_builder();
17094    /// let mut items = builder.by_item();
17095    /// while let Some(result) = items.next().await {
17096    ///   let item = result?;
17097    /// }
17098    /// # Ok(()) }
17099    ///
17100    /// fn prepare_request_builder() -> ListLocations {
17101    ///   # panic!();
17102    ///   // ... details omitted ...
17103    /// }
17104    /// ```
17105    #[derive(Clone, Debug)]
17106    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
17107
17108    impl ListLocations {
17109        pub(crate) fn new(
17110            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17111        ) -> Self {
17112            Self(RequestBuilder::new(stub))
17113        }
17114
17115        /// Sets the full request, replacing any prior values.
17116        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
17117            mut self,
17118            v: V,
17119        ) -> Self {
17120            self.0.request = v.into();
17121            self
17122        }
17123
17124        /// Sets all the options, replacing any prior values.
17125        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17126            self.0.options = v.into();
17127            self
17128        }
17129
17130        /// Sends the request.
17131        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
17132            (*self.0.stub)
17133                .list_locations(self.0.request, self.0.options)
17134                .await
17135                .map(crate::Response::into_body)
17136        }
17137
17138        /// Streams each page in the collection.
17139        pub fn by_page(
17140            self,
17141        ) -> impl google_cloud_gax::paginator::Paginator<
17142            google_cloud_location::model::ListLocationsResponse,
17143            crate::Error,
17144        > {
17145            use std::clone::Clone;
17146            let token = self.0.request.page_token.clone();
17147            let execute = move |token: String| {
17148                let mut builder = self.clone();
17149                builder.0.request = builder.0.request.set_page_token(token);
17150                builder.send()
17151            };
17152            google_cloud_gax::paginator::internal::new_paginator(token, execute)
17153        }
17154
17155        /// Streams each item in the collection.
17156        pub fn by_item(
17157            self,
17158        ) -> impl google_cloud_gax::paginator::ItemPaginator<
17159            google_cloud_location::model::ListLocationsResponse,
17160            crate::Error,
17161        > {
17162            use google_cloud_gax::paginator::Paginator;
17163            self.by_page().items()
17164        }
17165
17166        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
17167        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17168            self.0.request.name = v.into();
17169            self
17170        }
17171
17172        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
17173        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
17174            self.0.request.filter = v.into();
17175            self
17176        }
17177
17178        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
17179        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17180            self.0.request.page_size = v.into();
17181            self
17182        }
17183
17184        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
17185        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17186            self.0.request.page_token = v.into();
17187            self
17188        }
17189    }
17190
17191    #[doc(hidden)]
17192    impl crate::RequestBuilder for ListLocations {
17193        fn request_options(&mut self) -> &mut crate::RequestOptions {
17194            &mut self.0.options
17195        }
17196    }
17197
17198    /// The request builder for [MetadataService::get_location][crate::client::MetadataService::get_location] calls.
17199    ///
17200    /// # Example
17201    /// ```
17202    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetLocation;
17203    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17204    ///
17205    /// let builder = prepare_request_builder();
17206    /// let response = builder.send().await?;
17207    /// # Ok(()) }
17208    ///
17209    /// fn prepare_request_builder() -> GetLocation {
17210    ///   # panic!();
17211    ///   // ... details omitted ...
17212    /// }
17213    /// ```
17214    #[derive(Clone, Debug)]
17215    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
17216
17217    impl GetLocation {
17218        pub(crate) fn new(
17219            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17220        ) -> Self {
17221            Self(RequestBuilder::new(stub))
17222        }
17223
17224        /// Sets the full request, replacing any prior values.
17225        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
17226            mut self,
17227            v: V,
17228        ) -> Self {
17229            self.0.request = v.into();
17230            self
17231        }
17232
17233        /// Sets all the options, replacing any prior values.
17234        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17235            self.0.options = v.into();
17236            self
17237        }
17238
17239        /// Sends the request.
17240        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
17241            (*self.0.stub)
17242                .get_location(self.0.request, self.0.options)
17243                .await
17244                .map(crate::Response::into_body)
17245        }
17246
17247        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
17248        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17249            self.0.request.name = v.into();
17250            self
17251        }
17252    }
17253
17254    #[doc(hidden)]
17255    impl crate::RequestBuilder for GetLocation {
17256        fn request_options(&mut self) -> &mut crate::RequestOptions {
17257            &mut self.0.options
17258        }
17259    }
17260
17261    /// The request builder for [MetadataService::set_iam_policy][crate::client::MetadataService::set_iam_policy] calls.
17262    ///
17263    /// # Example
17264    /// ```
17265    /// # use google_cloud_dataplex_v1::builder::metadata_service::SetIamPolicy;
17266    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17267    ///
17268    /// let builder = prepare_request_builder();
17269    /// let response = builder.send().await?;
17270    /// # Ok(()) }
17271    ///
17272    /// fn prepare_request_builder() -> SetIamPolicy {
17273    ///   # panic!();
17274    ///   // ... details omitted ...
17275    /// }
17276    /// ```
17277    #[derive(Clone, Debug)]
17278    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
17279
17280    impl SetIamPolicy {
17281        pub(crate) fn new(
17282            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17283        ) -> Self {
17284            Self(RequestBuilder::new(stub))
17285        }
17286
17287        /// Sets the full request, replacing any prior values.
17288        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
17289            mut self,
17290            v: V,
17291        ) -> Self {
17292            self.0.request = v.into();
17293            self
17294        }
17295
17296        /// Sets all the options, replacing any prior values.
17297        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17298            self.0.options = v.into();
17299            self
17300        }
17301
17302        /// Sends the request.
17303        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
17304            (*self.0.stub)
17305                .set_iam_policy(self.0.request, self.0.options)
17306                .await
17307                .map(crate::Response::into_body)
17308        }
17309
17310        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
17311        ///
17312        /// This is a **required** field for requests.
17313        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
17314            self.0.request.resource = v.into();
17315            self
17316        }
17317
17318        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
17319        ///
17320        /// This is a **required** field for requests.
17321        pub fn set_policy<T>(mut self, v: T) -> Self
17322        where
17323            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
17324        {
17325            self.0.request.policy = std::option::Option::Some(v.into());
17326            self
17327        }
17328
17329        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
17330        ///
17331        /// This is a **required** field for requests.
17332        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
17333        where
17334            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
17335        {
17336            self.0.request.policy = v.map(|x| x.into());
17337            self
17338        }
17339
17340        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
17341        pub fn set_update_mask<T>(mut self, v: T) -> Self
17342        where
17343            T: std::convert::Into<wkt::FieldMask>,
17344        {
17345            self.0.request.update_mask = std::option::Option::Some(v.into());
17346            self
17347        }
17348
17349        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
17350        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
17351        where
17352            T: std::convert::Into<wkt::FieldMask>,
17353        {
17354            self.0.request.update_mask = v.map(|x| x.into());
17355            self
17356        }
17357    }
17358
17359    #[doc(hidden)]
17360    impl crate::RequestBuilder for SetIamPolicy {
17361        fn request_options(&mut self) -> &mut crate::RequestOptions {
17362            &mut self.0.options
17363        }
17364    }
17365
17366    /// The request builder for [MetadataService::get_iam_policy][crate::client::MetadataService::get_iam_policy] calls.
17367    ///
17368    /// # Example
17369    /// ```
17370    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetIamPolicy;
17371    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17372    ///
17373    /// let builder = prepare_request_builder();
17374    /// let response = builder.send().await?;
17375    /// # Ok(()) }
17376    ///
17377    /// fn prepare_request_builder() -> GetIamPolicy {
17378    ///   # panic!();
17379    ///   // ... details omitted ...
17380    /// }
17381    /// ```
17382    #[derive(Clone, Debug)]
17383    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
17384
17385    impl GetIamPolicy {
17386        pub(crate) fn new(
17387            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17388        ) -> Self {
17389            Self(RequestBuilder::new(stub))
17390        }
17391
17392        /// Sets the full request, replacing any prior values.
17393        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
17394            mut self,
17395            v: V,
17396        ) -> Self {
17397            self.0.request = v.into();
17398            self
17399        }
17400
17401        /// Sets all the options, replacing any prior values.
17402        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17403            self.0.options = v.into();
17404            self
17405        }
17406
17407        /// Sends the request.
17408        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
17409            (*self.0.stub)
17410                .get_iam_policy(self.0.request, self.0.options)
17411                .await
17412                .map(crate::Response::into_body)
17413        }
17414
17415        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
17416        ///
17417        /// This is a **required** field for requests.
17418        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
17419            self.0.request.resource = v.into();
17420            self
17421        }
17422
17423        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
17424        pub fn set_options<T>(mut self, v: T) -> Self
17425        where
17426            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
17427        {
17428            self.0.request.options = std::option::Option::Some(v.into());
17429            self
17430        }
17431
17432        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
17433        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
17434        where
17435            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
17436        {
17437            self.0.request.options = v.map(|x| x.into());
17438            self
17439        }
17440    }
17441
17442    #[doc(hidden)]
17443    impl crate::RequestBuilder for GetIamPolicy {
17444        fn request_options(&mut self) -> &mut crate::RequestOptions {
17445            &mut self.0.options
17446        }
17447    }
17448
17449    /// The request builder for [MetadataService::test_iam_permissions][crate::client::MetadataService::test_iam_permissions] calls.
17450    ///
17451    /// # Example
17452    /// ```
17453    /// # use google_cloud_dataplex_v1::builder::metadata_service::TestIamPermissions;
17454    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17455    ///
17456    /// let builder = prepare_request_builder();
17457    /// let response = builder.send().await?;
17458    /// # Ok(()) }
17459    ///
17460    /// fn prepare_request_builder() -> TestIamPermissions {
17461    ///   # panic!();
17462    ///   // ... details omitted ...
17463    /// }
17464    /// ```
17465    #[derive(Clone, Debug)]
17466    pub struct TestIamPermissions(
17467        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
17468    );
17469
17470    impl TestIamPermissions {
17471        pub(crate) fn new(
17472            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17473        ) -> Self {
17474            Self(RequestBuilder::new(stub))
17475        }
17476
17477        /// Sets the full request, replacing any prior values.
17478        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
17479            mut self,
17480            v: V,
17481        ) -> Self {
17482            self.0.request = v.into();
17483            self
17484        }
17485
17486        /// Sets all the options, replacing any prior values.
17487        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17488            self.0.options = v.into();
17489            self
17490        }
17491
17492        /// Sends the request.
17493        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
17494            (*self.0.stub)
17495                .test_iam_permissions(self.0.request, self.0.options)
17496                .await
17497                .map(crate::Response::into_body)
17498        }
17499
17500        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
17501        ///
17502        /// This is a **required** field for requests.
17503        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
17504            self.0.request.resource = v.into();
17505            self
17506        }
17507
17508        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
17509        ///
17510        /// This is a **required** field for requests.
17511        pub fn set_permissions<T, V>(mut self, v: T) -> Self
17512        where
17513            T: std::iter::IntoIterator<Item = V>,
17514            V: std::convert::Into<std::string::String>,
17515        {
17516            use std::iter::Iterator;
17517            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
17518            self
17519        }
17520    }
17521
17522    #[doc(hidden)]
17523    impl crate::RequestBuilder for TestIamPermissions {
17524        fn request_options(&mut self) -> &mut crate::RequestOptions {
17525            &mut self.0.options
17526        }
17527    }
17528
17529    /// The request builder for [MetadataService::list_operations][crate::client::MetadataService::list_operations] calls.
17530    ///
17531    /// # Example
17532    /// ```
17533    /// # use google_cloud_dataplex_v1::builder::metadata_service::ListOperations;
17534    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17535    /// use google_cloud_gax::paginator::ItemPaginator;
17536    ///
17537    /// let builder = prepare_request_builder();
17538    /// let mut items = builder.by_item();
17539    /// while let Some(result) = items.next().await {
17540    ///   let item = result?;
17541    /// }
17542    /// # Ok(()) }
17543    ///
17544    /// fn prepare_request_builder() -> ListOperations {
17545    ///   # panic!();
17546    ///   // ... details omitted ...
17547    /// }
17548    /// ```
17549    #[derive(Clone, Debug)]
17550    pub struct ListOperations(
17551        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
17552    );
17553
17554    impl ListOperations {
17555        pub(crate) fn new(
17556            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17557        ) -> Self {
17558            Self(RequestBuilder::new(stub))
17559        }
17560
17561        /// Sets the full request, replacing any prior values.
17562        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
17563            mut self,
17564            v: V,
17565        ) -> Self {
17566            self.0.request = v.into();
17567            self
17568        }
17569
17570        /// Sets all the options, replacing any prior values.
17571        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17572            self.0.options = v.into();
17573            self
17574        }
17575
17576        /// Sends the request.
17577        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
17578            (*self.0.stub)
17579                .list_operations(self.0.request, self.0.options)
17580                .await
17581                .map(crate::Response::into_body)
17582        }
17583
17584        /// Streams each page in the collection.
17585        pub fn by_page(
17586            self,
17587        ) -> impl google_cloud_gax::paginator::Paginator<
17588            google_cloud_longrunning::model::ListOperationsResponse,
17589            crate::Error,
17590        > {
17591            use std::clone::Clone;
17592            let token = self.0.request.page_token.clone();
17593            let execute = move |token: String| {
17594                let mut builder = self.clone();
17595                builder.0.request = builder.0.request.set_page_token(token);
17596                builder.send()
17597            };
17598            google_cloud_gax::paginator::internal::new_paginator(token, execute)
17599        }
17600
17601        /// Streams each item in the collection.
17602        pub fn by_item(
17603            self,
17604        ) -> impl google_cloud_gax::paginator::ItemPaginator<
17605            google_cloud_longrunning::model::ListOperationsResponse,
17606            crate::Error,
17607        > {
17608            use google_cloud_gax::paginator::Paginator;
17609            self.by_page().items()
17610        }
17611
17612        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
17613        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17614            self.0.request.name = v.into();
17615            self
17616        }
17617
17618        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
17619        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
17620            self.0.request.filter = v.into();
17621            self
17622        }
17623
17624        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
17625        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17626            self.0.request.page_size = v.into();
17627            self
17628        }
17629
17630        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
17631        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17632            self.0.request.page_token = v.into();
17633            self
17634        }
17635
17636        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
17637        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
17638            self.0.request.return_partial_success = v.into();
17639            self
17640        }
17641    }
17642
17643    #[doc(hidden)]
17644    impl crate::RequestBuilder for ListOperations {
17645        fn request_options(&mut self) -> &mut crate::RequestOptions {
17646            &mut self.0.options
17647        }
17648    }
17649
17650    /// The request builder for [MetadataService::get_operation][crate::client::MetadataService::get_operation] calls.
17651    ///
17652    /// # Example
17653    /// ```
17654    /// # use google_cloud_dataplex_v1::builder::metadata_service::GetOperation;
17655    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17656    ///
17657    /// let builder = prepare_request_builder();
17658    /// let response = builder.send().await?;
17659    /// # Ok(()) }
17660    ///
17661    /// fn prepare_request_builder() -> GetOperation {
17662    ///   # panic!();
17663    ///   // ... details omitted ...
17664    /// }
17665    /// ```
17666    #[derive(Clone, Debug)]
17667    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
17668
17669    impl GetOperation {
17670        pub(crate) fn new(
17671            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17672        ) -> Self {
17673            Self(RequestBuilder::new(stub))
17674        }
17675
17676        /// Sets the full request, replacing any prior values.
17677        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
17678            mut self,
17679            v: V,
17680        ) -> Self {
17681            self.0.request = v.into();
17682            self
17683        }
17684
17685        /// Sets all the options, replacing any prior values.
17686        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17687            self.0.options = v.into();
17688            self
17689        }
17690
17691        /// Sends the request.
17692        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17693            (*self.0.stub)
17694                .get_operation(self.0.request, self.0.options)
17695                .await
17696                .map(crate::Response::into_body)
17697        }
17698
17699        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
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 GetOperation {
17708        fn request_options(&mut self) -> &mut crate::RequestOptions {
17709            &mut self.0.options
17710        }
17711    }
17712
17713    /// The request builder for [MetadataService::delete_operation][crate::client::MetadataService::delete_operation] calls.
17714    ///
17715    /// # Example
17716    /// ```
17717    /// # use google_cloud_dataplex_v1::builder::metadata_service::DeleteOperation;
17718    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17719    ///
17720    /// let builder = prepare_request_builder();
17721    /// let response = builder.send().await?;
17722    /// # Ok(()) }
17723    ///
17724    /// fn prepare_request_builder() -> DeleteOperation {
17725    ///   # panic!();
17726    ///   // ... details omitted ...
17727    /// }
17728    /// ```
17729    #[derive(Clone, Debug)]
17730    pub struct DeleteOperation(
17731        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
17732    );
17733
17734    impl DeleteOperation {
17735        pub(crate) fn new(
17736            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17737        ) -> Self {
17738            Self(RequestBuilder::new(stub))
17739        }
17740
17741        /// Sets the full request, replacing any prior values.
17742        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
17743            mut self,
17744            v: V,
17745        ) -> Self {
17746            self.0.request = v.into();
17747            self
17748        }
17749
17750        /// Sets all the options, replacing any prior values.
17751        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17752            self.0.options = v.into();
17753            self
17754        }
17755
17756        /// Sends the request.
17757        pub async fn send(self) -> Result<()> {
17758            (*self.0.stub)
17759                .delete_operation(self.0.request, self.0.options)
17760                .await
17761                .map(crate::Response::into_body)
17762        }
17763
17764        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
17765        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17766            self.0.request.name = v.into();
17767            self
17768        }
17769    }
17770
17771    #[doc(hidden)]
17772    impl crate::RequestBuilder for DeleteOperation {
17773        fn request_options(&mut self) -> &mut crate::RequestOptions {
17774            &mut self.0.options
17775        }
17776    }
17777
17778    /// The request builder for [MetadataService::cancel_operation][crate::client::MetadataService::cancel_operation] calls.
17779    ///
17780    /// # Example
17781    /// ```
17782    /// # use google_cloud_dataplex_v1::builder::metadata_service::CancelOperation;
17783    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17784    ///
17785    /// let builder = prepare_request_builder();
17786    /// let response = builder.send().await?;
17787    /// # Ok(()) }
17788    ///
17789    /// fn prepare_request_builder() -> CancelOperation {
17790    ///   # panic!();
17791    ///   // ... details omitted ...
17792    /// }
17793    /// ```
17794    #[derive(Clone, Debug)]
17795    pub struct CancelOperation(
17796        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
17797    );
17798
17799    impl CancelOperation {
17800        pub(crate) fn new(
17801            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17802        ) -> Self {
17803            Self(RequestBuilder::new(stub))
17804        }
17805
17806        /// Sets the full request, replacing any prior values.
17807        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
17808            mut self,
17809            v: V,
17810        ) -> Self {
17811            self.0.request = v.into();
17812            self
17813        }
17814
17815        /// Sets all the options, replacing any prior values.
17816        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17817            self.0.options = v.into();
17818            self
17819        }
17820
17821        /// Sends the request.
17822        pub async fn send(self) -> Result<()> {
17823            (*self.0.stub)
17824                .cancel_operation(self.0.request, self.0.options)
17825                .await
17826                .map(crate::Response::into_body)
17827        }
17828
17829        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
17830        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17831            self.0.request.name = v.into();
17832            self
17833        }
17834    }
17835
17836    #[doc(hidden)]
17837    impl crate::RequestBuilder for CancelOperation {
17838        fn request_options(&mut self) -> &mut crate::RequestOptions {
17839            &mut self.0.options
17840        }
17841    }
17842}
17843
17844/// Request and client builders for [DataplexService][crate::client::DataplexService].
17845pub mod dataplex_service {
17846    use crate::Result;
17847
17848    /// A builder for [DataplexService][crate::client::DataplexService].
17849    ///
17850    /// ```
17851    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
17852    /// # use google_cloud_dataplex_v1::*;
17853    /// # use builder::dataplex_service::ClientBuilder;
17854    /// # use client::DataplexService;
17855    /// let builder : ClientBuilder = DataplexService::builder();
17856    /// let client = builder
17857    ///     .with_endpoint("https://dataplex.googleapis.com")
17858    ///     .build().await?;
17859    /// # Ok(()) }
17860    /// ```
17861    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
17862
17863    pub(crate) mod client {
17864        use super::super::super::client::DataplexService;
17865        pub struct Factory;
17866        impl crate::ClientFactory for Factory {
17867            type Client = DataplexService;
17868            type Credentials = gaxi::options::Credentials;
17869            async fn build(
17870                self,
17871                config: gaxi::options::ClientConfig,
17872            ) -> crate::ClientBuilderResult<Self::Client> {
17873                Self::Client::new(config).await
17874            }
17875        }
17876    }
17877
17878    /// Common implementation for [crate::client::DataplexService] request builders.
17879    #[derive(Clone, Debug)]
17880    pub(crate) struct RequestBuilder<R: std::default::Default> {
17881        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17882        request: R,
17883        options: crate::RequestOptions,
17884    }
17885
17886    impl<R> RequestBuilder<R>
17887    where
17888        R: std::default::Default,
17889    {
17890        pub(crate) fn new(
17891            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17892        ) -> Self {
17893            Self {
17894                stub,
17895                request: R::default(),
17896                options: crate::RequestOptions::default(),
17897            }
17898        }
17899    }
17900
17901    /// The request builder for [DataplexService::create_lake][crate::client::DataplexService::create_lake] calls.
17902    ///
17903    /// # Example
17904    /// ```
17905    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateLake;
17906    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
17907    /// use google_cloud_lro::Poller;
17908    ///
17909    /// let builder = prepare_request_builder();
17910    /// let response = builder.poller().until_done().await?;
17911    /// # Ok(()) }
17912    ///
17913    /// fn prepare_request_builder() -> CreateLake {
17914    ///   # panic!();
17915    ///   // ... details omitted ...
17916    /// }
17917    /// ```
17918    #[derive(Clone, Debug)]
17919    pub struct CreateLake(RequestBuilder<crate::model::CreateLakeRequest>);
17920
17921    impl CreateLake {
17922        pub(crate) fn new(
17923            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17924        ) -> Self {
17925            Self(RequestBuilder::new(stub))
17926        }
17927
17928        /// Sets the full request, replacing any prior values.
17929        pub fn with_request<V: Into<crate::model::CreateLakeRequest>>(mut self, v: V) -> Self {
17930            self.0.request = v.into();
17931            self
17932        }
17933
17934        /// Sets all the options, replacing any prior values.
17935        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17936            self.0.options = v.into();
17937            self
17938        }
17939
17940        /// Sends the request.
17941        ///
17942        /// # Long running operations
17943        ///
17944        /// This starts, but does not poll, a longrunning operation. More information
17945        /// on [create_lake][crate::client::DataplexService::create_lake].
17946        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17947            (*self.0.stub)
17948                .create_lake(self.0.request, self.0.options)
17949                .await
17950                .map(crate::Response::into_body)
17951        }
17952
17953        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_lake`.
17954        pub fn poller(
17955            self,
17956        ) -> impl google_cloud_lro::Poller<crate::model::Lake, crate::model::OperationMetadata>
17957        {
17958            type Operation = google_cloud_lro::internal::Operation<
17959                crate::model::Lake,
17960                crate::model::OperationMetadata,
17961            >;
17962            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17963            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17964            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
17965            if let Some(ref mut details) = poller_options.tracing {
17966                details.method_name =
17967                    "google_cloud_dataplex_v1::client::DataplexService::create_lake::until_done";
17968            }
17969
17970            let stub = self.0.stub.clone();
17971            let mut options = self.0.options.clone();
17972            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
17973            let query = move |name| {
17974                let stub = stub.clone();
17975                let options = options.clone();
17976                async {
17977                    let op = GetOperation::new(stub)
17978                        .set_name(name)
17979                        .with_options(options)
17980                        .send()
17981                        .await?;
17982                    Ok(Operation::new(op))
17983                }
17984            };
17985
17986            let start = move || async {
17987                let op = self.send().await?;
17988                Ok(Operation::new(op))
17989            };
17990
17991            use google_cloud_lro::internal::PollerExt;
17992            {
17993                google_cloud_lro::internal::new_poller(
17994                    polling_error_policy,
17995                    polling_backoff_policy,
17996                    start,
17997                    query,
17998                )
17999            }
18000            .with_options(poller_options)
18001        }
18002
18003        /// Sets the value of [parent][crate::model::CreateLakeRequest::parent].
18004        ///
18005        /// This is a **required** field for requests.
18006        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18007            self.0.request.parent = v.into();
18008            self
18009        }
18010
18011        /// Sets the value of [lake_id][crate::model::CreateLakeRequest::lake_id].
18012        ///
18013        /// This is a **required** field for requests.
18014        pub fn set_lake_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
18015            self.0.request.lake_id = v.into();
18016            self
18017        }
18018
18019        /// Sets the value of [lake][crate::model::CreateLakeRequest::lake].
18020        ///
18021        /// This is a **required** field for requests.
18022        pub fn set_lake<T>(mut self, v: T) -> Self
18023        where
18024            T: std::convert::Into<crate::model::Lake>,
18025        {
18026            self.0.request.lake = std::option::Option::Some(v.into());
18027            self
18028        }
18029
18030        /// Sets or clears the value of [lake][crate::model::CreateLakeRequest::lake].
18031        ///
18032        /// This is a **required** field for requests.
18033        pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
18034        where
18035            T: std::convert::Into<crate::model::Lake>,
18036        {
18037            self.0.request.lake = v.map(|x| x.into());
18038            self
18039        }
18040
18041        /// Sets the value of [validate_only][crate::model::CreateLakeRequest::validate_only].
18042        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18043            self.0.request.validate_only = v.into();
18044            self
18045        }
18046    }
18047
18048    #[doc(hidden)]
18049    impl crate::RequestBuilder for CreateLake {
18050        fn request_options(&mut self) -> &mut crate::RequestOptions {
18051            &mut self.0.options
18052        }
18053    }
18054
18055    /// The request builder for [DataplexService::update_lake][crate::client::DataplexService::update_lake] calls.
18056    ///
18057    /// # Example
18058    /// ```
18059    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateLake;
18060    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18061    /// use google_cloud_lro::Poller;
18062    ///
18063    /// let builder = prepare_request_builder();
18064    /// let response = builder.poller().until_done().await?;
18065    /// # Ok(()) }
18066    ///
18067    /// fn prepare_request_builder() -> UpdateLake {
18068    ///   # panic!();
18069    ///   // ... details omitted ...
18070    /// }
18071    /// ```
18072    #[derive(Clone, Debug)]
18073    pub struct UpdateLake(RequestBuilder<crate::model::UpdateLakeRequest>);
18074
18075    impl UpdateLake {
18076        pub(crate) fn new(
18077            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18078        ) -> Self {
18079            Self(RequestBuilder::new(stub))
18080        }
18081
18082        /// Sets the full request, replacing any prior values.
18083        pub fn with_request<V: Into<crate::model::UpdateLakeRequest>>(mut self, v: V) -> Self {
18084            self.0.request = v.into();
18085            self
18086        }
18087
18088        /// Sets all the options, replacing any prior values.
18089        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18090            self.0.options = v.into();
18091            self
18092        }
18093
18094        /// Sends the request.
18095        ///
18096        /// # Long running operations
18097        ///
18098        /// This starts, but does not poll, a longrunning operation. More information
18099        /// on [update_lake][crate::client::DataplexService::update_lake].
18100        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18101            (*self.0.stub)
18102                .update_lake(self.0.request, self.0.options)
18103                .await
18104                .map(crate::Response::into_body)
18105        }
18106
18107        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_lake`.
18108        pub fn poller(
18109            self,
18110        ) -> impl google_cloud_lro::Poller<crate::model::Lake, crate::model::OperationMetadata>
18111        {
18112            type Operation = google_cloud_lro::internal::Operation<
18113                crate::model::Lake,
18114                crate::model::OperationMetadata,
18115            >;
18116            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18117            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18118            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
18119            if let Some(ref mut details) = poller_options.tracing {
18120                details.method_name =
18121                    "google_cloud_dataplex_v1::client::DataplexService::update_lake::until_done";
18122            }
18123
18124            let stub = self.0.stub.clone();
18125            let mut options = self.0.options.clone();
18126            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18127            let query = move |name| {
18128                let stub = stub.clone();
18129                let options = options.clone();
18130                async {
18131                    let op = GetOperation::new(stub)
18132                        .set_name(name)
18133                        .with_options(options)
18134                        .send()
18135                        .await?;
18136                    Ok(Operation::new(op))
18137                }
18138            };
18139
18140            let start = move || async {
18141                let op = self.send().await?;
18142                Ok(Operation::new(op))
18143            };
18144
18145            use google_cloud_lro::internal::PollerExt;
18146            {
18147                google_cloud_lro::internal::new_poller(
18148                    polling_error_policy,
18149                    polling_backoff_policy,
18150                    start,
18151                    query,
18152                )
18153            }
18154            .with_options(poller_options)
18155        }
18156
18157        /// Sets the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
18158        ///
18159        /// This is a **required** field for requests.
18160        pub fn set_update_mask<T>(mut self, v: T) -> Self
18161        where
18162            T: std::convert::Into<wkt::FieldMask>,
18163        {
18164            self.0.request.update_mask = std::option::Option::Some(v.into());
18165            self
18166        }
18167
18168        /// Sets or clears the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
18169        ///
18170        /// This is a **required** field for requests.
18171        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
18172        where
18173            T: std::convert::Into<wkt::FieldMask>,
18174        {
18175            self.0.request.update_mask = v.map(|x| x.into());
18176            self
18177        }
18178
18179        /// Sets the value of [lake][crate::model::UpdateLakeRequest::lake].
18180        ///
18181        /// This is a **required** field for requests.
18182        pub fn set_lake<T>(mut self, v: T) -> Self
18183        where
18184            T: std::convert::Into<crate::model::Lake>,
18185        {
18186            self.0.request.lake = std::option::Option::Some(v.into());
18187            self
18188        }
18189
18190        /// Sets or clears the value of [lake][crate::model::UpdateLakeRequest::lake].
18191        ///
18192        /// This is a **required** field for requests.
18193        pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
18194        where
18195            T: std::convert::Into<crate::model::Lake>,
18196        {
18197            self.0.request.lake = v.map(|x| x.into());
18198            self
18199        }
18200
18201        /// Sets the value of [validate_only][crate::model::UpdateLakeRequest::validate_only].
18202        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18203            self.0.request.validate_only = v.into();
18204            self
18205        }
18206    }
18207
18208    #[doc(hidden)]
18209    impl crate::RequestBuilder for UpdateLake {
18210        fn request_options(&mut self) -> &mut crate::RequestOptions {
18211            &mut self.0.options
18212        }
18213    }
18214
18215    /// The request builder for [DataplexService::delete_lake][crate::client::DataplexService::delete_lake] calls.
18216    ///
18217    /// # Example
18218    /// ```
18219    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteLake;
18220    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18221    /// use google_cloud_lro::Poller;
18222    ///
18223    /// let builder = prepare_request_builder();
18224    /// let response = builder.poller().until_done().await?;
18225    /// # Ok(()) }
18226    ///
18227    /// fn prepare_request_builder() -> DeleteLake {
18228    ///   # panic!();
18229    ///   // ... details omitted ...
18230    /// }
18231    /// ```
18232    #[derive(Clone, Debug)]
18233    pub struct DeleteLake(RequestBuilder<crate::model::DeleteLakeRequest>);
18234
18235    impl DeleteLake {
18236        pub(crate) fn new(
18237            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18238        ) -> Self {
18239            Self(RequestBuilder::new(stub))
18240        }
18241
18242        /// Sets the full request, replacing any prior values.
18243        pub fn with_request<V: Into<crate::model::DeleteLakeRequest>>(mut self, v: V) -> Self {
18244            self.0.request = v.into();
18245            self
18246        }
18247
18248        /// Sets all the options, replacing any prior values.
18249        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18250            self.0.options = v.into();
18251            self
18252        }
18253
18254        /// Sends the request.
18255        ///
18256        /// # Long running operations
18257        ///
18258        /// This starts, but does not poll, a longrunning operation. More information
18259        /// on [delete_lake][crate::client::DataplexService::delete_lake].
18260        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18261            (*self.0.stub)
18262                .delete_lake(self.0.request, self.0.options)
18263                .await
18264                .map(crate::Response::into_body)
18265        }
18266
18267        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_lake`.
18268        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
18269            type Operation =
18270                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
18271            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18272            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18273            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
18274            if let Some(ref mut details) = poller_options.tracing {
18275                details.method_name =
18276                    "google_cloud_dataplex_v1::client::DataplexService::delete_lake::until_done";
18277            }
18278
18279            let stub = self.0.stub.clone();
18280            let mut options = self.0.options.clone();
18281            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18282            let query = move |name| {
18283                let stub = stub.clone();
18284                let options = options.clone();
18285                async {
18286                    let op = GetOperation::new(stub)
18287                        .set_name(name)
18288                        .with_options(options)
18289                        .send()
18290                        .await?;
18291                    Ok(Operation::new(op))
18292                }
18293            };
18294
18295            let start = move || async {
18296                let op = self.send().await?;
18297                Ok(Operation::new(op))
18298            };
18299
18300            use google_cloud_lro::internal::PollerExt;
18301            {
18302                google_cloud_lro::internal::new_unit_response_poller(
18303                    polling_error_policy,
18304                    polling_backoff_policy,
18305                    start,
18306                    query,
18307                )
18308            }
18309            .with_options(poller_options)
18310        }
18311
18312        /// Sets the value of [name][crate::model::DeleteLakeRequest::name].
18313        ///
18314        /// This is a **required** field for requests.
18315        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18316            self.0.request.name = v.into();
18317            self
18318        }
18319    }
18320
18321    #[doc(hidden)]
18322    impl crate::RequestBuilder for DeleteLake {
18323        fn request_options(&mut self) -> &mut crate::RequestOptions {
18324            &mut self.0.options
18325        }
18326    }
18327
18328    /// The request builder for [DataplexService::list_lakes][crate::client::DataplexService::list_lakes] calls.
18329    ///
18330    /// # Example
18331    /// ```
18332    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListLakes;
18333    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18334    /// use google_cloud_gax::paginator::ItemPaginator;
18335    ///
18336    /// let builder = prepare_request_builder();
18337    /// let mut items = builder.by_item();
18338    /// while let Some(result) = items.next().await {
18339    ///   let item = result?;
18340    /// }
18341    /// # Ok(()) }
18342    ///
18343    /// fn prepare_request_builder() -> ListLakes {
18344    ///   # panic!();
18345    ///   // ... details omitted ...
18346    /// }
18347    /// ```
18348    #[derive(Clone, Debug)]
18349    pub struct ListLakes(RequestBuilder<crate::model::ListLakesRequest>);
18350
18351    impl ListLakes {
18352        pub(crate) fn new(
18353            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18354        ) -> Self {
18355            Self(RequestBuilder::new(stub))
18356        }
18357
18358        /// Sets the full request, replacing any prior values.
18359        pub fn with_request<V: Into<crate::model::ListLakesRequest>>(mut self, v: V) -> Self {
18360            self.0.request = v.into();
18361            self
18362        }
18363
18364        /// Sets all the options, replacing any prior values.
18365        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18366            self.0.options = v.into();
18367            self
18368        }
18369
18370        /// Sends the request.
18371        pub async fn send(self) -> Result<crate::model::ListLakesResponse> {
18372            (*self.0.stub)
18373                .list_lakes(self.0.request, self.0.options)
18374                .await
18375                .map(crate::Response::into_body)
18376        }
18377
18378        /// Streams each page in the collection.
18379        pub fn by_page(
18380            self,
18381        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListLakesResponse, crate::Error>
18382        {
18383            use std::clone::Clone;
18384            let token = self.0.request.page_token.clone();
18385            let execute = move |token: String| {
18386                let mut builder = self.clone();
18387                builder.0.request = builder.0.request.set_page_token(token);
18388                builder.send()
18389            };
18390            google_cloud_gax::paginator::internal::new_paginator(token, execute)
18391        }
18392
18393        /// Streams each item in the collection.
18394        pub fn by_item(
18395            self,
18396        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListLakesResponse, crate::Error>
18397        {
18398            use google_cloud_gax::paginator::Paginator;
18399            self.by_page().items()
18400        }
18401
18402        /// Sets the value of [parent][crate::model::ListLakesRequest::parent].
18403        ///
18404        /// This is a **required** field for requests.
18405        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18406            self.0.request.parent = v.into();
18407            self
18408        }
18409
18410        /// Sets the value of [page_size][crate::model::ListLakesRequest::page_size].
18411        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18412            self.0.request.page_size = v.into();
18413            self
18414        }
18415
18416        /// Sets the value of [page_token][crate::model::ListLakesRequest::page_token].
18417        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18418            self.0.request.page_token = v.into();
18419            self
18420        }
18421
18422        /// Sets the value of [filter][crate::model::ListLakesRequest::filter].
18423        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
18424            self.0.request.filter = v.into();
18425            self
18426        }
18427
18428        /// Sets the value of [order_by][crate::model::ListLakesRequest::order_by].
18429        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
18430            self.0.request.order_by = v.into();
18431            self
18432        }
18433    }
18434
18435    #[doc(hidden)]
18436    impl crate::RequestBuilder for ListLakes {
18437        fn request_options(&mut self) -> &mut crate::RequestOptions {
18438            &mut self.0.options
18439        }
18440    }
18441
18442    /// The request builder for [DataplexService::get_lake][crate::client::DataplexService::get_lake] calls.
18443    ///
18444    /// # Example
18445    /// ```
18446    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetLake;
18447    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18448    ///
18449    /// let builder = prepare_request_builder();
18450    /// let response = builder.send().await?;
18451    /// # Ok(()) }
18452    ///
18453    /// fn prepare_request_builder() -> GetLake {
18454    ///   # panic!();
18455    ///   // ... details omitted ...
18456    /// }
18457    /// ```
18458    #[derive(Clone, Debug)]
18459    pub struct GetLake(RequestBuilder<crate::model::GetLakeRequest>);
18460
18461    impl GetLake {
18462        pub(crate) fn new(
18463            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18464        ) -> Self {
18465            Self(RequestBuilder::new(stub))
18466        }
18467
18468        /// Sets the full request, replacing any prior values.
18469        pub fn with_request<V: Into<crate::model::GetLakeRequest>>(mut self, v: V) -> Self {
18470            self.0.request = v.into();
18471            self
18472        }
18473
18474        /// Sets all the options, replacing any prior values.
18475        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18476            self.0.options = v.into();
18477            self
18478        }
18479
18480        /// Sends the request.
18481        pub async fn send(self) -> Result<crate::model::Lake> {
18482            (*self.0.stub)
18483                .get_lake(self.0.request, self.0.options)
18484                .await
18485                .map(crate::Response::into_body)
18486        }
18487
18488        /// Sets the value of [name][crate::model::GetLakeRequest::name].
18489        ///
18490        /// This is a **required** field for requests.
18491        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18492            self.0.request.name = v.into();
18493            self
18494        }
18495    }
18496
18497    #[doc(hidden)]
18498    impl crate::RequestBuilder for GetLake {
18499        fn request_options(&mut self) -> &mut crate::RequestOptions {
18500            &mut self.0.options
18501        }
18502    }
18503
18504    /// The request builder for [DataplexService::list_lake_actions][crate::client::DataplexService::list_lake_actions] calls.
18505    ///
18506    /// # Example
18507    /// ```
18508    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListLakeActions;
18509    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18510    /// use google_cloud_gax::paginator::ItemPaginator;
18511    ///
18512    /// let builder = prepare_request_builder();
18513    /// let mut items = builder.by_item();
18514    /// while let Some(result) = items.next().await {
18515    ///   let item = result?;
18516    /// }
18517    /// # Ok(()) }
18518    ///
18519    /// fn prepare_request_builder() -> ListLakeActions {
18520    ///   # panic!();
18521    ///   // ... details omitted ...
18522    /// }
18523    /// ```
18524    #[derive(Clone, Debug)]
18525    pub struct ListLakeActions(RequestBuilder<crate::model::ListLakeActionsRequest>);
18526
18527    impl ListLakeActions {
18528        pub(crate) fn new(
18529            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18530        ) -> Self {
18531            Self(RequestBuilder::new(stub))
18532        }
18533
18534        /// Sets the full request, replacing any prior values.
18535        pub fn with_request<V: Into<crate::model::ListLakeActionsRequest>>(mut self, v: V) -> Self {
18536            self.0.request = v.into();
18537            self
18538        }
18539
18540        /// Sets all the options, replacing any prior values.
18541        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18542            self.0.options = v.into();
18543            self
18544        }
18545
18546        /// Sends the request.
18547        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
18548            (*self.0.stub)
18549                .list_lake_actions(self.0.request, self.0.options)
18550                .await
18551                .map(crate::Response::into_body)
18552        }
18553
18554        /// Streams each page in the collection.
18555        pub fn by_page(
18556            self,
18557        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListActionsResponse, crate::Error>
18558        {
18559            use std::clone::Clone;
18560            let token = self.0.request.page_token.clone();
18561            let execute = move |token: String| {
18562                let mut builder = self.clone();
18563                builder.0.request = builder.0.request.set_page_token(token);
18564                builder.send()
18565            };
18566            google_cloud_gax::paginator::internal::new_paginator(token, execute)
18567        }
18568
18569        /// Streams each item in the collection.
18570        pub fn by_item(
18571            self,
18572        ) -> impl google_cloud_gax::paginator::ItemPaginator<
18573            crate::model::ListActionsResponse,
18574            crate::Error,
18575        > {
18576            use google_cloud_gax::paginator::Paginator;
18577            self.by_page().items()
18578        }
18579
18580        /// Sets the value of [parent][crate::model::ListLakeActionsRequest::parent].
18581        ///
18582        /// This is a **required** field for requests.
18583        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18584            self.0.request.parent = v.into();
18585            self
18586        }
18587
18588        /// Sets the value of [page_size][crate::model::ListLakeActionsRequest::page_size].
18589        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18590            self.0.request.page_size = v.into();
18591            self
18592        }
18593
18594        /// Sets the value of [page_token][crate::model::ListLakeActionsRequest::page_token].
18595        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18596            self.0.request.page_token = v.into();
18597            self
18598        }
18599    }
18600
18601    #[doc(hidden)]
18602    impl crate::RequestBuilder for ListLakeActions {
18603        fn request_options(&mut self) -> &mut crate::RequestOptions {
18604            &mut self.0.options
18605        }
18606    }
18607
18608    /// The request builder for [DataplexService::create_zone][crate::client::DataplexService::create_zone] calls.
18609    ///
18610    /// # Example
18611    /// ```
18612    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateZone;
18613    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18614    /// use google_cloud_lro::Poller;
18615    ///
18616    /// let builder = prepare_request_builder();
18617    /// let response = builder.poller().until_done().await?;
18618    /// # Ok(()) }
18619    ///
18620    /// fn prepare_request_builder() -> CreateZone {
18621    ///   # panic!();
18622    ///   // ... details omitted ...
18623    /// }
18624    /// ```
18625    #[derive(Clone, Debug)]
18626    pub struct CreateZone(RequestBuilder<crate::model::CreateZoneRequest>);
18627
18628    impl CreateZone {
18629        pub(crate) fn new(
18630            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18631        ) -> Self {
18632            Self(RequestBuilder::new(stub))
18633        }
18634
18635        /// Sets the full request, replacing any prior values.
18636        pub fn with_request<V: Into<crate::model::CreateZoneRequest>>(mut self, v: V) -> Self {
18637            self.0.request = v.into();
18638            self
18639        }
18640
18641        /// Sets all the options, replacing any prior values.
18642        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18643            self.0.options = v.into();
18644            self
18645        }
18646
18647        /// Sends the request.
18648        ///
18649        /// # Long running operations
18650        ///
18651        /// This starts, but does not poll, a longrunning operation. More information
18652        /// on [create_zone][crate::client::DataplexService::create_zone].
18653        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18654            (*self.0.stub)
18655                .create_zone(self.0.request, self.0.options)
18656                .await
18657                .map(crate::Response::into_body)
18658        }
18659
18660        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_zone`.
18661        pub fn poller(
18662            self,
18663        ) -> impl google_cloud_lro::Poller<crate::model::Zone, crate::model::OperationMetadata>
18664        {
18665            type Operation = google_cloud_lro::internal::Operation<
18666                crate::model::Zone,
18667                crate::model::OperationMetadata,
18668            >;
18669            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18670            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18671            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
18672            if let Some(ref mut details) = poller_options.tracing {
18673                details.method_name =
18674                    "google_cloud_dataplex_v1::client::DataplexService::create_zone::until_done";
18675            }
18676
18677            let stub = self.0.stub.clone();
18678            let mut options = self.0.options.clone();
18679            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18680            let query = move |name| {
18681                let stub = stub.clone();
18682                let options = options.clone();
18683                async {
18684                    let op = GetOperation::new(stub)
18685                        .set_name(name)
18686                        .with_options(options)
18687                        .send()
18688                        .await?;
18689                    Ok(Operation::new(op))
18690                }
18691            };
18692
18693            let start = move || async {
18694                let op = self.send().await?;
18695                Ok(Operation::new(op))
18696            };
18697
18698            use google_cloud_lro::internal::PollerExt;
18699            {
18700                google_cloud_lro::internal::new_poller(
18701                    polling_error_policy,
18702                    polling_backoff_policy,
18703                    start,
18704                    query,
18705                )
18706            }
18707            .with_options(poller_options)
18708        }
18709
18710        /// Sets the value of [parent][crate::model::CreateZoneRequest::parent].
18711        ///
18712        /// This is a **required** field for requests.
18713        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18714            self.0.request.parent = v.into();
18715            self
18716        }
18717
18718        /// Sets the value of [zone_id][crate::model::CreateZoneRequest::zone_id].
18719        ///
18720        /// This is a **required** field for requests.
18721        pub fn set_zone_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
18722            self.0.request.zone_id = v.into();
18723            self
18724        }
18725
18726        /// Sets the value of [zone][crate::model::CreateZoneRequest::zone].
18727        ///
18728        /// This is a **required** field for requests.
18729        pub fn set_zone<T>(mut self, v: T) -> Self
18730        where
18731            T: std::convert::Into<crate::model::Zone>,
18732        {
18733            self.0.request.zone = std::option::Option::Some(v.into());
18734            self
18735        }
18736
18737        /// Sets or clears the value of [zone][crate::model::CreateZoneRequest::zone].
18738        ///
18739        /// This is a **required** field for requests.
18740        pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
18741        where
18742            T: std::convert::Into<crate::model::Zone>,
18743        {
18744            self.0.request.zone = v.map(|x| x.into());
18745            self
18746        }
18747
18748        /// Sets the value of [validate_only][crate::model::CreateZoneRequest::validate_only].
18749        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18750            self.0.request.validate_only = v.into();
18751            self
18752        }
18753    }
18754
18755    #[doc(hidden)]
18756    impl crate::RequestBuilder for CreateZone {
18757        fn request_options(&mut self) -> &mut crate::RequestOptions {
18758            &mut self.0.options
18759        }
18760    }
18761
18762    /// The request builder for [DataplexService::update_zone][crate::client::DataplexService::update_zone] calls.
18763    ///
18764    /// # Example
18765    /// ```
18766    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateZone;
18767    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18768    /// use google_cloud_lro::Poller;
18769    ///
18770    /// let builder = prepare_request_builder();
18771    /// let response = builder.poller().until_done().await?;
18772    /// # Ok(()) }
18773    ///
18774    /// fn prepare_request_builder() -> UpdateZone {
18775    ///   # panic!();
18776    ///   // ... details omitted ...
18777    /// }
18778    /// ```
18779    #[derive(Clone, Debug)]
18780    pub struct UpdateZone(RequestBuilder<crate::model::UpdateZoneRequest>);
18781
18782    impl UpdateZone {
18783        pub(crate) fn new(
18784            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18785        ) -> Self {
18786            Self(RequestBuilder::new(stub))
18787        }
18788
18789        /// Sets the full request, replacing any prior values.
18790        pub fn with_request<V: Into<crate::model::UpdateZoneRequest>>(mut self, v: V) -> Self {
18791            self.0.request = v.into();
18792            self
18793        }
18794
18795        /// Sets all the options, replacing any prior values.
18796        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18797            self.0.options = v.into();
18798            self
18799        }
18800
18801        /// Sends the request.
18802        ///
18803        /// # Long running operations
18804        ///
18805        /// This starts, but does not poll, a longrunning operation. More information
18806        /// on [update_zone][crate::client::DataplexService::update_zone].
18807        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18808            (*self.0.stub)
18809                .update_zone(self.0.request, self.0.options)
18810                .await
18811                .map(crate::Response::into_body)
18812        }
18813
18814        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_zone`.
18815        pub fn poller(
18816            self,
18817        ) -> impl google_cloud_lro::Poller<crate::model::Zone, crate::model::OperationMetadata>
18818        {
18819            type Operation = google_cloud_lro::internal::Operation<
18820                crate::model::Zone,
18821                crate::model::OperationMetadata,
18822            >;
18823            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18824            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18825            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
18826            if let Some(ref mut details) = poller_options.tracing {
18827                details.method_name =
18828                    "google_cloud_dataplex_v1::client::DataplexService::update_zone::until_done";
18829            }
18830
18831            let stub = self.0.stub.clone();
18832            let mut options = self.0.options.clone();
18833            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18834            let query = move |name| {
18835                let stub = stub.clone();
18836                let options = options.clone();
18837                async {
18838                    let op = GetOperation::new(stub)
18839                        .set_name(name)
18840                        .with_options(options)
18841                        .send()
18842                        .await?;
18843                    Ok(Operation::new(op))
18844                }
18845            };
18846
18847            let start = move || async {
18848                let op = self.send().await?;
18849                Ok(Operation::new(op))
18850            };
18851
18852            use google_cloud_lro::internal::PollerExt;
18853            {
18854                google_cloud_lro::internal::new_poller(
18855                    polling_error_policy,
18856                    polling_backoff_policy,
18857                    start,
18858                    query,
18859                )
18860            }
18861            .with_options(poller_options)
18862        }
18863
18864        /// Sets the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
18865        ///
18866        /// This is a **required** field for requests.
18867        pub fn set_update_mask<T>(mut self, v: T) -> Self
18868        where
18869            T: std::convert::Into<wkt::FieldMask>,
18870        {
18871            self.0.request.update_mask = std::option::Option::Some(v.into());
18872            self
18873        }
18874
18875        /// Sets or clears the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
18876        ///
18877        /// This is a **required** field for requests.
18878        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
18879        where
18880            T: std::convert::Into<wkt::FieldMask>,
18881        {
18882            self.0.request.update_mask = v.map(|x| x.into());
18883            self
18884        }
18885
18886        /// Sets the value of [zone][crate::model::UpdateZoneRequest::zone].
18887        ///
18888        /// This is a **required** field for requests.
18889        pub fn set_zone<T>(mut self, v: T) -> Self
18890        where
18891            T: std::convert::Into<crate::model::Zone>,
18892        {
18893            self.0.request.zone = std::option::Option::Some(v.into());
18894            self
18895        }
18896
18897        /// Sets or clears the value of [zone][crate::model::UpdateZoneRequest::zone].
18898        ///
18899        /// This is a **required** field for requests.
18900        pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
18901        where
18902            T: std::convert::Into<crate::model::Zone>,
18903        {
18904            self.0.request.zone = v.map(|x| x.into());
18905            self
18906        }
18907
18908        /// Sets the value of [validate_only][crate::model::UpdateZoneRequest::validate_only].
18909        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18910            self.0.request.validate_only = v.into();
18911            self
18912        }
18913    }
18914
18915    #[doc(hidden)]
18916    impl crate::RequestBuilder for UpdateZone {
18917        fn request_options(&mut self) -> &mut crate::RequestOptions {
18918            &mut self.0.options
18919        }
18920    }
18921
18922    /// The request builder for [DataplexService::delete_zone][crate::client::DataplexService::delete_zone] calls.
18923    ///
18924    /// # Example
18925    /// ```
18926    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteZone;
18927    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
18928    /// use google_cloud_lro::Poller;
18929    ///
18930    /// let builder = prepare_request_builder();
18931    /// let response = builder.poller().until_done().await?;
18932    /// # Ok(()) }
18933    ///
18934    /// fn prepare_request_builder() -> DeleteZone {
18935    ///   # panic!();
18936    ///   // ... details omitted ...
18937    /// }
18938    /// ```
18939    #[derive(Clone, Debug)]
18940    pub struct DeleteZone(RequestBuilder<crate::model::DeleteZoneRequest>);
18941
18942    impl DeleteZone {
18943        pub(crate) fn new(
18944            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18945        ) -> Self {
18946            Self(RequestBuilder::new(stub))
18947        }
18948
18949        /// Sets the full request, replacing any prior values.
18950        pub fn with_request<V: Into<crate::model::DeleteZoneRequest>>(mut self, v: V) -> Self {
18951            self.0.request = v.into();
18952            self
18953        }
18954
18955        /// Sets all the options, replacing any prior values.
18956        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18957            self.0.options = v.into();
18958            self
18959        }
18960
18961        /// Sends the request.
18962        ///
18963        /// # Long running operations
18964        ///
18965        /// This starts, but does not poll, a longrunning operation. More information
18966        /// on [delete_zone][crate::client::DataplexService::delete_zone].
18967        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18968            (*self.0.stub)
18969                .delete_zone(self.0.request, self.0.options)
18970                .await
18971                .map(crate::Response::into_body)
18972        }
18973
18974        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_zone`.
18975        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
18976            type Operation =
18977                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
18978            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18979            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18980            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
18981            if let Some(ref mut details) = poller_options.tracing {
18982                details.method_name =
18983                    "google_cloud_dataplex_v1::client::DataplexService::delete_zone::until_done";
18984            }
18985
18986            let stub = self.0.stub.clone();
18987            let mut options = self.0.options.clone();
18988            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18989            let query = move |name| {
18990                let stub = stub.clone();
18991                let options = options.clone();
18992                async {
18993                    let op = GetOperation::new(stub)
18994                        .set_name(name)
18995                        .with_options(options)
18996                        .send()
18997                        .await?;
18998                    Ok(Operation::new(op))
18999                }
19000            };
19001
19002            let start = move || async {
19003                let op = self.send().await?;
19004                Ok(Operation::new(op))
19005            };
19006
19007            use google_cloud_lro::internal::PollerExt;
19008            {
19009                google_cloud_lro::internal::new_unit_response_poller(
19010                    polling_error_policy,
19011                    polling_backoff_policy,
19012                    start,
19013                    query,
19014                )
19015            }
19016            .with_options(poller_options)
19017        }
19018
19019        /// Sets the value of [name][crate::model::DeleteZoneRequest::name].
19020        ///
19021        /// This is a **required** field for requests.
19022        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19023            self.0.request.name = v.into();
19024            self
19025        }
19026    }
19027
19028    #[doc(hidden)]
19029    impl crate::RequestBuilder for DeleteZone {
19030        fn request_options(&mut self) -> &mut crate::RequestOptions {
19031            &mut self.0.options
19032        }
19033    }
19034
19035    /// The request builder for [DataplexService::list_zones][crate::client::DataplexService::list_zones] calls.
19036    ///
19037    /// # Example
19038    /// ```
19039    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListZones;
19040    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19041    /// use google_cloud_gax::paginator::ItemPaginator;
19042    ///
19043    /// let builder = prepare_request_builder();
19044    /// let mut items = builder.by_item();
19045    /// while let Some(result) = items.next().await {
19046    ///   let item = result?;
19047    /// }
19048    /// # Ok(()) }
19049    ///
19050    /// fn prepare_request_builder() -> ListZones {
19051    ///   # panic!();
19052    ///   // ... details omitted ...
19053    /// }
19054    /// ```
19055    #[derive(Clone, Debug)]
19056    pub struct ListZones(RequestBuilder<crate::model::ListZonesRequest>);
19057
19058    impl ListZones {
19059        pub(crate) fn new(
19060            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19061        ) -> Self {
19062            Self(RequestBuilder::new(stub))
19063        }
19064
19065        /// Sets the full request, replacing any prior values.
19066        pub fn with_request<V: Into<crate::model::ListZonesRequest>>(mut self, v: V) -> Self {
19067            self.0.request = v.into();
19068            self
19069        }
19070
19071        /// Sets all the options, replacing any prior values.
19072        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19073            self.0.options = v.into();
19074            self
19075        }
19076
19077        /// Sends the request.
19078        pub async fn send(self) -> Result<crate::model::ListZonesResponse> {
19079            (*self.0.stub)
19080                .list_zones(self.0.request, self.0.options)
19081                .await
19082                .map(crate::Response::into_body)
19083        }
19084
19085        /// Streams each page in the collection.
19086        pub fn by_page(
19087            self,
19088        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListZonesResponse, crate::Error>
19089        {
19090            use std::clone::Clone;
19091            let token = self.0.request.page_token.clone();
19092            let execute = move |token: String| {
19093                let mut builder = self.clone();
19094                builder.0.request = builder.0.request.set_page_token(token);
19095                builder.send()
19096            };
19097            google_cloud_gax::paginator::internal::new_paginator(token, execute)
19098        }
19099
19100        /// Streams each item in the collection.
19101        pub fn by_item(
19102            self,
19103        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListZonesResponse, crate::Error>
19104        {
19105            use google_cloud_gax::paginator::Paginator;
19106            self.by_page().items()
19107        }
19108
19109        /// Sets the value of [parent][crate::model::ListZonesRequest::parent].
19110        ///
19111        /// This is a **required** field for requests.
19112        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19113            self.0.request.parent = v.into();
19114            self
19115        }
19116
19117        /// Sets the value of [page_size][crate::model::ListZonesRequest::page_size].
19118        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
19119            self.0.request.page_size = v.into();
19120            self
19121        }
19122
19123        /// Sets the value of [page_token][crate::model::ListZonesRequest::page_token].
19124        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
19125            self.0.request.page_token = v.into();
19126            self
19127        }
19128
19129        /// Sets the value of [filter][crate::model::ListZonesRequest::filter].
19130        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
19131            self.0.request.filter = v.into();
19132            self
19133        }
19134
19135        /// Sets the value of [order_by][crate::model::ListZonesRequest::order_by].
19136        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
19137            self.0.request.order_by = v.into();
19138            self
19139        }
19140    }
19141
19142    #[doc(hidden)]
19143    impl crate::RequestBuilder for ListZones {
19144        fn request_options(&mut self) -> &mut crate::RequestOptions {
19145            &mut self.0.options
19146        }
19147    }
19148
19149    /// The request builder for [DataplexService::get_zone][crate::client::DataplexService::get_zone] calls.
19150    ///
19151    /// # Example
19152    /// ```
19153    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetZone;
19154    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19155    ///
19156    /// let builder = prepare_request_builder();
19157    /// let response = builder.send().await?;
19158    /// # Ok(()) }
19159    ///
19160    /// fn prepare_request_builder() -> GetZone {
19161    ///   # panic!();
19162    ///   // ... details omitted ...
19163    /// }
19164    /// ```
19165    #[derive(Clone, Debug)]
19166    pub struct GetZone(RequestBuilder<crate::model::GetZoneRequest>);
19167
19168    impl GetZone {
19169        pub(crate) fn new(
19170            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19171        ) -> Self {
19172            Self(RequestBuilder::new(stub))
19173        }
19174
19175        /// Sets the full request, replacing any prior values.
19176        pub fn with_request<V: Into<crate::model::GetZoneRequest>>(mut self, v: V) -> Self {
19177            self.0.request = v.into();
19178            self
19179        }
19180
19181        /// Sets all the options, replacing any prior values.
19182        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19183            self.0.options = v.into();
19184            self
19185        }
19186
19187        /// Sends the request.
19188        pub async fn send(self) -> Result<crate::model::Zone> {
19189            (*self.0.stub)
19190                .get_zone(self.0.request, self.0.options)
19191                .await
19192                .map(crate::Response::into_body)
19193        }
19194
19195        /// Sets the value of [name][crate::model::GetZoneRequest::name].
19196        ///
19197        /// This is a **required** field for requests.
19198        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19199            self.0.request.name = v.into();
19200            self
19201        }
19202    }
19203
19204    #[doc(hidden)]
19205    impl crate::RequestBuilder for GetZone {
19206        fn request_options(&mut self) -> &mut crate::RequestOptions {
19207            &mut self.0.options
19208        }
19209    }
19210
19211    /// The request builder for [DataplexService::list_zone_actions][crate::client::DataplexService::list_zone_actions] calls.
19212    ///
19213    /// # Example
19214    /// ```
19215    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListZoneActions;
19216    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19217    /// use google_cloud_gax::paginator::ItemPaginator;
19218    ///
19219    /// let builder = prepare_request_builder();
19220    /// let mut items = builder.by_item();
19221    /// while let Some(result) = items.next().await {
19222    ///   let item = result?;
19223    /// }
19224    /// # Ok(()) }
19225    ///
19226    /// fn prepare_request_builder() -> ListZoneActions {
19227    ///   # panic!();
19228    ///   // ... details omitted ...
19229    /// }
19230    /// ```
19231    #[derive(Clone, Debug)]
19232    pub struct ListZoneActions(RequestBuilder<crate::model::ListZoneActionsRequest>);
19233
19234    impl ListZoneActions {
19235        pub(crate) fn new(
19236            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19237        ) -> Self {
19238            Self(RequestBuilder::new(stub))
19239        }
19240
19241        /// Sets the full request, replacing any prior values.
19242        pub fn with_request<V: Into<crate::model::ListZoneActionsRequest>>(mut self, v: V) -> Self {
19243            self.0.request = v.into();
19244            self
19245        }
19246
19247        /// Sets all the options, replacing any prior values.
19248        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19249            self.0.options = v.into();
19250            self
19251        }
19252
19253        /// Sends the request.
19254        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
19255            (*self.0.stub)
19256                .list_zone_actions(self.0.request, self.0.options)
19257                .await
19258                .map(crate::Response::into_body)
19259        }
19260
19261        /// Streams each page in the collection.
19262        pub fn by_page(
19263            self,
19264        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListActionsResponse, crate::Error>
19265        {
19266            use std::clone::Clone;
19267            let token = self.0.request.page_token.clone();
19268            let execute = move |token: String| {
19269                let mut builder = self.clone();
19270                builder.0.request = builder.0.request.set_page_token(token);
19271                builder.send()
19272            };
19273            google_cloud_gax::paginator::internal::new_paginator(token, execute)
19274        }
19275
19276        /// Streams each item in the collection.
19277        pub fn by_item(
19278            self,
19279        ) -> impl google_cloud_gax::paginator::ItemPaginator<
19280            crate::model::ListActionsResponse,
19281            crate::Error,
19282        > {
19283            use google_cloud_gax::paginator::Paginator;
19284            self.by_page().items()
19285        }
19286
19287        /// Sets the value of [parent][crate::model::ListZoneActionsRequest::parent].
19288        ///
19289        /// This is a **required** field for requests.
19290        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19291            self.0.request.parent = v.into();
19292            self
19293        }
19294
19295        /// Sets the value of [page_size][crate::model::ListZoneActionsRequest::page_size].
19296        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
19297            self.0.request.page_size = v.into();
19298            self
19299        }
19300
19301        /// Sets the value of [page_token][crate::model::ListZoneActionsRequest::page_token].
19302        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
19303            self.0.request.page_token = v.into();
19304            self
19305        }
19306    }
19307
19308    #[doc(hidden)]
19309    impl crate::RequestBuilder for ListZoneActions {
19310        fn request_options(&mut self) -> &mut crate::RequestOptions {
19311            &mut self.0.options
19312        }
19313    }
19314
19315    /// The request builder for [DataplexService::create_asset][crate::client::DataplexService::create_asset] calls.
19316    ///
19317    /// # Example
19318    /// ```
19319    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateAsset;
19320    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19321    /// use google_cloud_lro::Poller;
19322    ///
19323    /// let builder = prepare_request_builder();
19324    /// let response = builder.poller().until_done().await?;
19325    /// # Ok(()) }
19326    ///
19327    /// fn prepare_request_builder() -> CreateAsset {
19328    ///   # panic!();
19329    ///   // ... details omitted ...
19330    /// }
19331    /// ```
19332    #[derive(Clone, Debug)]
19333    pub struct CreateAsset(RequestBuilder<crate::model::CreateAssetRequest>);
19334
19335    impl CreateAsset {
19336        pub(crate) fn new(
19337            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19338        ) -> Self {
19339            Self(RequestBuilder::new(stub))
19340        }
19341
19342        /// Sets the full request, replacing any prior values.
19343        pub fn with_request<V: Into<crate::model::CreateAssetRequest>>(mut self, v: V) -> Self {
19344            self.0.request = v.into();
19345            self
19346        }
19347
19348        /// Sets all the options, replacing any prior values.
19349        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19350            self.0.options = v.into();
19351            self
19352        }
19353
19354        /// Sends the request.
19355        ///
19356        /// # Long running operations
19357        ///
19358        /// This starts, but does not poll, a longrunning operation. More information
19359        /// on [create_asset][crate::client::DataplexService::create_asset].
19360        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19361            (*self.0.stub)
19362                .create_asset(self.0.request, self.0.options)
19363                .await
19364                .map(crate::Response::into_body)
19365        }
19366
19367        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_asset`.
19368        pub fn poller(
19369            self,
19370        ) -> impl google_cloud_lro::Poller<crate::model::Asset, crate::model::OperationMetadata>
19371        {
19372            type Operation = google_cloud_lro::internal::Operation<
19373                crate::model::Asset,
19374                crate::model::OperationMetadata,
19375            >;
19376            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19377            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19378            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
19379            if let Some(ref mut details) = poller_options.tracing {
19380                details.method_name =
19381                    "google_cloud_dataplex_v1::client::DataplexService::create_asset::until_done";
19382            }
19383
19384            let stub = self.0.stub.clone();
19385            let mut options = self.0.options.clone();
19386            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19387            let query = move |name| {
19388                let stub = stub.clone();
19389                let options = options.clone();
19390                async {
19391                    let op = GetOperation::new(stub)
19392                        .set_name(name)
19393                        .with_options(options)
19394                        .send()
19395                        .await?;
19396                    Ok(Operation::new(op))
19397                }
19398            };
19399
19400            let start = move || async {
19401                let op = self.send().await?;
19402                Ok(Operation::new(op))
19403            };
19404
19405            use google_cloud_lro::internal::PollerExt;
19406            {
19407                google_cloud_lro::internal::new_poller(
19408                    polling_error_policy,
19409                    polling_backoff_policy,
19410                    start,
19411                    query,
19412                )
19413            }
19414            .with_options(poller_options)
19415        }
19416
19417        /// Sets the value of [parent][crate::model::CreateAssetRequest::parent].
19418        ///
19419        /// This is a **required** field for requests.
19420        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19421            self.0.request.parent = v.into();
19422            self
19423        }
19424
19425        /// Sets the value of [asset_id][crate::model::CreateAssetRequest::asset_id].
19426        ///
19427        /// This is a **required** field for requests.
19428        pub fn set_asset_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
19429            self.0.request.asset_id = v.into();
19430            self
19431        }
19432
19433        /// Sets the value of [asset][crate::model::CreateAssetRequest::asset].
19434        ///
19435        /// This is a **required** field for requests.
19436        pub fn set_asset<T>(mut self, v: T) -> Self
19437        where
19438            T: std::convert::Into<crate::model::Asset>,
19439        {
19440            self.0.request.asset = std::option::Option::Some(v.into());
19441            self
19442        }
19443
19444        /// Sets or clears the value of [asset][crate::model::CreateAssetRequest::asset].
19445        ///
19446        /// This is a **required** field for requests.
19447        pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
19448        where
19449            T: std::convert::Into<crate::model::Asset>,
19450        {
19451            self.0.request.asset = v.map(|x| x.into());
19452            self
19453        }
19454
19455        /// Sets the value of [validate_only][crate::model::CreateAssetRequest::validate_only].
19456        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
19457            self.0.request.validate_only = v.into();
19458            self
19459        }
19460    }
19461
19462    #[doc(hidden)]
19463    impl crate::RequestBuilder for CreateAsset {
19464        fn request_options(&mut self) -> &mut crate::RequestOptions {
19465            &mut self.0.options
19466        }
19467    }
19468
19469    /// The request builder for [DataplexService::update_asset][crate::client::DataplexService::update_asset] calls.
19470    ///
19471    /// # Example
19472    /// ```
19473    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateAsset;
19474    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19475    /// use google_cloud_lro::Poller;
19476    ///
19477    /// let builder = prepare_request_builder();
19478    /// let response = builder.poller().until_done().await?;
19479    /// # Ok(()) }
19480    ///
19481    /// fn prepare_request_builder() -> UpdateAsset {
19482    ///   # panic!();
19483    ///   // ... details omitted ...
19484    /// }
19485    /// ```
19486    #[derive(Clone, Debug)]
19487    pub struct UpdateAsset(RequestBuilder<crate::model::UpdateAssetRequest>);
19488
19489    impl UpdateAsset {
19490        pub(crate) fn new(
19491            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19492        ) -> Self {
19493            Self(RequestBuilder::new(stub))
19494        }
19495
19496        /// Sets the full request, replacing any prior values.
19497        pub fn with_request<V: Into<crate::model::UpdateAssetRequest>>(mut self, v: V) -> Self {
19498            self.0.request = v.into();
19499            self
19500        }
19501
19502        /// Sets all the options, replacing any prior values.
19503        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19504            self.0.options = v.into();
19505            self
19506        }
19507
19508        /// Sends the request.
19509        ///
19510        /// # Long running operations
19511        ///
19512        /// This starts, but does not poll, a longrunning operation. More information
19513        /// on [update_asset][crate::client::DataplexService::update_asset].
19514        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19515            (*self.0.stub)
19516                .update_asset(self.0.request, self.0.options)
19517                .await
19518                .map(crate::Response::into_body)
19519        }
19520
19521        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_asset`.
19522        pub fn poller(
19523            self,
19524        ) -> impl google_cloud_lro::Poller<crate::model::Asset, crate::model::OperationMetadata>
19525        {
19526            type Operation = google_cloud_lro::internal::Operation<
19527                crate::model::Asset,
19528                crate::model::OperationMetadata,
19529            >;
19530            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19531            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19532            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
19533            if let Some(ref mut details) = poller_options.tracing {
19534                details.method_name =
19535                    "google_cloud_dataplex_v1::client::DataplexService::update_asset::until_done";
19536            }
19537
19538            let stub = self.0.stub.clone();
19539            let mut options = self.0.options.clone();
19540            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19541            let query = move |name| {
19542                let stub = stub.clone();
19543                let options = options.clone();
19544                async {
19545                    let op = GetOperation::new(stub)
19546                        .set_name(name)
19547                        .with_options(options)
19548                        .send()
19549                        .await?;
19550                    Ok(Operation::new(op))
19551                }
19552            };
19553
19554            let start = move || async {
19555                let op = self.send().await?;
19556                Ok(Operation::new(op))
19557            };
19558
19559            use google_cloud_lro::internal::PollerExt;
19560            {
19561                google_cloud_lro::internal::new_poller(
19562                    polling_error_policy,
19563                    polling_backoff_policy,
19564                    start,
19565                    query,
19566                )
19567            }
19568            .with_options(poller_options)
19569        }
19570
19571        /// Sets the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
19572        ///
19573        /// This is a **required** field for requests.
19574        pub fn set_update_mask<T>(mut self, v: T) -> Self
19575        where
19576            T: std::convert::Into<wkt::FieldMask>,
19577        {
19578            self.0.request.update_mask = std::option::Option::Some(v.into());
19579            self
19580        }
19581
19582        /// Sets or clears the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
19583        ///
19584        /// This is a **required** field for requests.
19585        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
19586        where
19587            T: std::convert::Into<wkt::FieldMask>,
19588        {
19589            self.0.request.update_mask = v.map(|x| x.into());
19590            self
19591        }
19592
19593        /// Sets the value of [asset][crate::model::UpdateAssetRequest::asset].
19594        ///
19595        /// This is a **required** field for requests.
19596        pub fn set_asset<T>(mut self, v: T) -> Self
19597        where
19598            T: std::convert::Into<crate::model::Asset>,
19599        {
19600            self.0.request.asset = std::option::Option::Some(v.into());
19601            self
19602        }
19603
19604        /// Sets or clears the value of [asset][crate::model::UpdateAssetRequest::asset].
19605        ///
19606        /// This is a **required** field for requests.
19607        pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
19608        where
19609            T: std::convert::Into<crate::model::Asset>,
19610        {
19611            self.0.request.asset = v.map(|x| x.into());
19612            self
19613        }
19614
19615        /// Sets the value of [validate_only][crate::model::UpdateAssetRequest::validate_only].
19616        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
19617            self.0.request.validate_only = v.into();
19618            self
19619        }
19620    }
19621
19622    #[doc(hidden)]
19623    impl crate::RequestBuilder for UpdateAsset {
19624        fn request_options(&mut self) -> &mut crate::RequestOptions {
19625            &mut self.0.options
19626        }
19627    }
19628
19629    /// The request builder for [DataplexService::delete_asset][crate::client::DataplexService::delete_asset] calls.
19630    ///
19631    /// # Example
19632    /// ```
19633    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteAsset;
19634    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19635    /// use google_cloud_lro::Poller;
19636    ///
19637    /// let builder = prepare_request_builder();
19638    /// let response = builder.poller().until_done().await?;
19639    /// # Ok(()) }
19640    ///
19641    /// fn prepare_request_builder() -> DeleteAsset {
19642    ///   # panic!();
19643    ///   // ... details omitted ...
19644    /// }
19645    /// ```
19646    #[derive(Clone, Debug)]
19647    pub struct DeleteAsset(RequestBuilder<crate::model::DeleteAssetRequest>);
19648
19649    impl DeleteAsset {
19650        pub(crate) fn new(
19651            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19652        ) -> Self {
19653            Self(RequestBuilder::new(stub))
19654        }
19655
19656        /// Sets the full request, replacing any prior values.
19657        pub fn with_request<V: Into<crate::model::DeleteAssetRequest>>(mut self, v: V) -> Self {
19658            self.0.request = v.into();
19659            self
19660        }
19661
19662        /// Sets all the options, replacing any prior values.
19663        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19664            self.0.options = v.into();
19665            self
19666        }
19667
19668        /// Sends the request.
19669        ///
19670        /// # Long running operations
19671        ///
19672        /// This starts, but does not poll, a longrunning operation. More information
19673        /// on [delete_asset][crate::client::DataplexService::delete_asset].
19674        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19675            (*self.0.stub)
19676                .delete_asset(self.0.request, self.0.options)
19677                .await
19678                .map(crate::Response::into_body)
19679        }
19680
19681        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_asset`.
19682        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
19683            type Operation =
19684                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
19685            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19686            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19687            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
19688            if let Some(ref mut details) = poller_options.tracing {
19689                details.method_name =
19690                    "google_cloud_dataplex_v1::client::DataplexService::delete_asset::until_done";
19691            }
19692
19693            let stub = self.0.stub.clone();
19694            let mut options = self.0.options.clone();
19695            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19696            let query = move |name| {
19697                let stub = stub.clone();
19698                let options = options.clone();
19699                async {
19700                    let op = GetOperation::new(stub)
19701                        .set_name(name)
19702                        .with_options(options)
19703                        .send()
19704                        .await?;
19705                    Ok(Operation::new(op))
19706                }
19707            };
19708
19709            let start = move || async {
19710                let op = self.send().await?;
19711                Ok(Operation::new(op))
19712            };
19713
19714            use google_cloud_lro::internal::PollerExt;
19715            {
19716                google_cloud_lro::internal::new_unit_response_poller(
19717                    polling_error_policy,
19718                    polling_backoff_policy,
19719                    start,
19720                    query,
19721                )
19722            }
19723            .with_options(poller_options)
19724        }
19725
19726        /// Sets the value of [name][crate::model::DeleteAssetRequest::name].
19727        ///
19728        /// This is a **required** field for requests.
19729        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19730            self.0.request.name = v.into();
19731            self
19732        }
19733    }
19734
19735    #[doc(hidden)]
19736    impl crate::RequestBuilder for DeleteAsset {
19737        fn request_options(&mut self) -> &mut crate::RequestOptions {
19738            &mut self.0.options
19739        }
19740    }
19741
19742    /// The request builder for [DataplexService::list_assets][crate::client::DataplexService::list_assets] calls.
19743    ///
19744    /// # Example
19745    /// ```
19746    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListAssets;
19747    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19748    /// use google_cloud_gax::paginator::ItemPaginator;
19749    ///
19750    /// let builder = prepare_request_builder();
19751    /// let mut items = builder.by_item();
19752    /// while let Some(result) = items.next().await {
19753    ///   let item = result?;
19754    /// }
19755    /// # Ok(()) }
19756    ///
19757    /// fn prepare_request_builder() -> ListAssets {
19758    ///   # panic!();
19759    ///   // ... details omitted ...
19760    /// }
19761    /// ```
19762    #[derive(Clone, Debug)]
19763    pub struct ListAssets(RequestBuilder<crate::model::ListAssetsRequest>);
19764
19765    impl ListAssets {
19766        pub(crate) fn new(
19767            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19768        ) -> Self {
19769            Self(RequestBuilder::new(stub))
19770        }
19771
19772        /// Sets the full request, replacing any prior values.
19773        pub fn with_request<V: Into<crate::model::ListAssetsRequest>>(mut self, v: V) -> Self {
19774            self.0.request = v.into();
19775            self
19776        }
19777
19778        /// Sets all the options, replacing any prior values.
19779        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19780            self.0.options = v.into();
19781            self
19782        }
19783
19784        /// Sends the request.
19785        pub async fn send(self) -> Result<crate::model::ListAssetsResponse> {
19786            (*self.0.stub)
19787                .list_assets(self.0.request, self.0.options)
19788                .await
19789                .map(crate::Response::into_body)
19790        }
19791
19792        /// Streams each page in the collection.
19793        pub fn by_page(
19794            self,
19795        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListAssetsResponse, crate::Error>
19796        {
19797            use std::clone::Clone;
19798            let token = self.0.request.page_token.clone();
19799            let execute = move |token: String| {
19800                let mut builder = self.clone();
19801                builder.0.request = builder.0.request.set_page_token(token);
19802                builder.send()
19803            };
19804            google_cloud_gax::paginator::internal::new_paginator(token, execute)
19805        }
19806
19807        /// Streams each item in the collection.
19808        pub fn by_item(
19809            self,
19810        ) -> impl google_cloud_gax::paginator::ItemPaginator<
19811            crate::model::ListAssetsResponse,
19812            crate::Error,
19813        > {
19814            use google_cloud_gax::paginator::Paginator;
19815            self.by_page().items()
19816        }
19817
19818        /// Sets the value of [parent][crate::model::ListAssetsRequest::parent].
19819        ///
19820        /// This is a **required** field for requests.
19821        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19822            self.0.request.parent = v.into();
19823            self
19824        }
19825
19826        /// Sets the value of [page_size][crate::model::ListAssetsRequest::page_size].
19827        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
19828            self.0.request.page_size = v.into();
19829            self
19830        }
19831
19832        /// Sets the value of [page_token][crate::model::ListAssetsRequest::page_token].
19833        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
19834            self.0.request.page_token = v.into();
19835            self
19836        }
19837
19838        /// Sets the value of [filter][crate::model::ListAssetsRequest::filter].
19839        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
19840            self.0.request.filter = v.into();
19841            self
19842        }
19843
19844        /// Sets the value of [order_by][crate::model::ListAssetsRequest::order_by].
19845        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
19846            self.0.request.order_by = v.into();
19847            self
19848        }
19849    }
19850
19851    #[doc(hidden)]
19852    impl crate::RequestBuilder for ListAssets {
19853        fn request_options(&mut self) -> &mut crate::RequestOptions {
19854            &mut self.0.options
19855        }
19856    }
19857
19858    /// The request builder for [DataplexService::get_asset][crate::client::DataplexService::get_asset] calls.
19859    ///
19860    /// # Example
19861    /// ```
19862    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetAsset;
19863    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19864    ///
19865    /// let builder = prepare_request_builder();
19866    /// let response = builder.send().await?;
19867    /// # Ok(()) }
19868    ///
19869    /// fn prepare_request_builder() -> GetAsset {
19870    ///   # panic!();
19871    ///   // ... details omitted ...
19872    /// }
19873    /// ```
19874    #[derive(Clone, Debug)]
19875    pub struct GetAsset(RequestBuilder<crate::model::GetAssetRequest>);
19876
19877    impl GetAsset {
19878        pub(crate) fn new(
19879            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19880        ) -> Self {
19881            Self(RequestBuilder::new(stub))
19882        }
19883
19884        /// Sets the full request, replacing any prior values.
19885        pub fn with_request<V: Into<crate::model::GetAssetRequest>>(mut self, v: V) -> Self {
19886            self.0.request = v.into();
19887            self
19888        }
19889
19890        /// Sets all the options, replacing any prior values.
19891        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19892            self.0.options = v.into();
19893            self
19894        }
19895
19896        /// Sends the request.
19897        pub async fn send(self) -> Result<crate::model::Asset> {
19898            (*self.0.stub)
19899                .get_asset(self.0.request, self.0.options)
19900                .await
19901                .map(crate::Response::into_body)
19902        }
19903
19904        /// Sets the value of [name][crate::model::GetAssetRequest::name].
19905        ///
19906        /// This is a **required** field for requests.
19907        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19908            self.0.request.name = v.into();
19909            self
19910        }
19911    }
19912
19913    #[doc(hidden)]
19914    impl crate::RequestBuilder for GetAsset {
19915        fn request_options(&mut self) -> &mut crate::RequestOptions {
19916            &mut self.0.options
19917        }
19918    }
19919
19920    /// The request builder for [DataplexService::list_asset_actions][crate::client::DataplexService::list_asset_actions] calls.
19921    ///
19922    /// # Example
19923    /// ```
19924    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListAssetActions;
19925    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
19926    /// use google_cloud_gax::paginator::ItemPaginator;
19927    ///
19928    /// let builder = prepare_request_builder();
19929    /// let mut items = builder.by_item();
19930    /// while let Some(result) = items.next().await {
19931    ///   let item = result?;
19932    /// }
19933    /// # Ok(()) }
19934    ///
19935    /// fn prepare_request_builder() -> ListAssetActions {
19936    ///   # panic!();
19937    ///   // ... details omitted ...
19938    /// }
19939    /// ```
19940    #[derive(Clone, Debug)]
19941    pub struct ListAssetActions(RequestBuilder<crate::model::ListAssetActionsRequest>);
19942
19943    impl ListAssetActions {
19944        pub(crate) fn new(
19945            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19946        ) -> Self {
19947            Self(RequestBuilder::new(stub))
19948        }
19949
19950        /// Sets the full request, replacing any prior values.
19951        pub fn with_request<V: Into<crate::model::ListAssetActionsRequest>>(
19952            mut self,
19953            v: V,
19954        ) -> Self {
19955            self.0.request = v.into();
19956            self
19957        }
19958
19959        /// Sets all the options, replacing any prior values.
19960        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19961            self.0.options = v.into();
19962            self
19963        }
19964
19965        /// Sends the request.
19966        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
19967            (*self.0.stub)
19968                .list_asset_actions(self.0.request, self.0.options)
19969                .await
19970                .map(crate::Response::into_body)
19971        }
19972
19973        /// Streams each page in the collection.
19974        pub fn by_page(
19975            self,
19976        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListActionsResponse, crate::Error>
19977        {
19978            use std::clone::Clone;
19979            let token = self.0.request.page_token.clone();
19980            let execute = move |token: String| {
19981                let mut builder = self.clone();
19982                builder.0.request = builder.0.request.set_page_token(token);
19983                builder.send()
19984            };
19985            google_cloud_gax::paginator::internal::new_paginator(token, execute)
19986        }
19987
19988        /// Streams each item in the collection.
19989        pub fn by_item(
19990            self,
19991        ) -> impl google_cloud_gax::paginator::ItemPaginator<
19992            crate::model::ListActionsResponse,
19993            crate::Error,
19994        > {
19995            use google_cloud_gax::paginator::Paginator;
19996            self.by_page().items()
19997        }
19998
19999        /// Sets the value of [parent][crate::model::ListAssetActionsRequest::parent].
20000        ///
20001        /// This is a **required** field for requests.
20002        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
20003            self.0.request.parent = v.into();
20004            self
20005        }
20006
20007        /// Sets the value of [page_size][crate::model::ListAssetActionsRequest::page_size].
20008        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
20009            self.0.request.page_size = v.into();
20010            self
20011        }
20012
20013        /// Sets the value of [page_token][crate::model::ListAssetActionsRequest::page_token].
20014        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
20015            self.0.request.page_token = v.into();
20016            self
20017        }
20018    }
20019
20020    #[doc(hidden)]
20021    impl crate::RequestBuilder for ListAssetActions {
20022        fn request_options(&mut self) -> &mut crate::RequestOptions {
20023            &mut self.0.options
20024        }
20025    }
20026
20027    /// The request builder for [DataplexService::create_task][crate::client::DataplexService::create_task] calls.
20028    ///
20029    /// # Example
20030    /// ```
20031    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CreateTask;
20032    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20033    /// use google_cloud_lro::Poller;
20034    ///
20035    /// let builder = prepare_request_builder();
20036    /// let response = builder.poller().until_done().await?;
20037    /// # Ok(()) }
20038    ///
20039    /// fn prepare_request_builder() -> CreateTask {
20040    ///   # panic!();
20041    ///   // ... details omitted ...
20042    /// }
20043    /// ```
20044    #[derive(Clone, Debug)]
20045    pub struct CreateTask(RequestBuilder<crate::model::CreateTaskRequest>);
20046
20047    impl CreateTask {
20048        pub(crate) fn new(
20049            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20050        ) -> Self {
20051            Self(RequestBuilder::new(stub))
20052        }
20053
20054        /// Sets the full request, replacing any prior values.
20055        pub fn with_request<V: Into<crate::model::CreateTaskRequest>>(mut self, v: V) -> Self {
20056            self.0.request = v.into();
20057            self
20058        }
20059
20060        /// Sets all the options, replacing any prior values.
20061        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20062            self.0.options = v.into();
20063            self
20064        }
20065
20066        /// Sends the request.
20067        ///
20068        /// # Long running operations
20069        ///
20070        /// This starts, but does not poll, a longrunning operation. More information
20071        /// on [create_task][crate::client::DataplexService::create_task].
20072        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
20073            (*self.0.stub)
20074                .create_task(self.0.request, self.0.options)
20075                .await
20076                .map(crate::Response::into_body)
20077        }
20078
20079        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_task`.
20080        pub fn poller(
20081            self,
20082        ) -> impl google_cloud_lro::Poller<crate::model::Task, crate::model::OperationMetadata>
20083        {
20084            type Operation = google_cloud_lro::internal::Operation<
20085                crate::model::Task,
20086                crate::model::OperationMetadata,
20087            >;
20088            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
20089            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
20090            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
20091            if let Some(ref mut details) = poller_options.tracing {
20092                details.method_name =
20093                    "google_cloud_dataplex_v1::client::DataplexService::create_task::until_done";
20094            }
20095
20096            let stub = self.0.stub.clone();
20097            let mut options = self.0.options.clone();
20098            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
20099            let query = move |name| {
20100                let stub = stub.clone();
20101                let options = options.clone();
20102                async {
20103                    let op = GetOperation::new(stub)
20104                        .set_name(name)
20105                        .with_options(options)
20106                        .send()
20107                        .await?;
20108                    Ok(Operation::new(op))
20109                }
20110            };
20111
20112            let start = move || async {
20113                let op = self.send().await?;
20114                Ok(Operation::new(op))
20115            };
20116
20117            use google_cloud_lro::internal::PollerExt;
20118            {
20119                google_cloud_lro::internal::new_poller(
20120                    polling_error_policy,
20121                    polling_backoff_policy,
20122                    start,
20123                    query,
20124                )
20125            }
20126            .with_options(poller_options)
20127        }
20128
20129        /// Sets the value of [parent][crate::model::CreateTaskRequest::parent].
20130        ///
20131        /// This is a **required** field for requests.
20132        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
20133            self.0.request.parent = v.into();
20134            self
20135        }
20136
20137        /// Sets the value of [task_id][crate::model::CreateTaskRequest::task_id].
20138        ///
20139        /// This is a **required** field for requests.
20140        pub fn set_task_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
20141            self.0.request.task_id = v.into();
20142            self
20143        }
20144
20145        /// Sets the value of [task][crate::model::CreateTaskRequest::task].
20146        ///
20147        /// This is a **required** field for requests.
20148        pub fn set_task<T>(mut self, v: T) -> Self
20149        where
20150            T: std::convert::Into<crate::model::Task>,
20151        {
20152            self.0.request.task = std::option::Option::Some(v.into());
20153            self
20154        }
20155
20156        /// Sets or clears the value of [task][crate::model::CreateTaskRequest::task].
20157        ///
20158        /// This is a **required** field for requests.
20159        pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
20160        where
20161            T: std::convert::Into<crate::model::Task>,
20162        {
20163            self.0.request.task = v.map(|x| x.into());
20164            self
20165        }
20166
20167        /// Sets the value of [validate_only][crate::model::CreateTaskRequest::validate_only].
20168        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
20169            self.0.request.validate_only = v.into();
20170            self
20171        }
20172    }
20173
20174    #[doc(hidden)]
20175    impl crate::RequestBuilder for CreateTask {
20176        fn request_options(&mut self) -> &mut crate::RequestOptions {
20177            &mut self.0.options
20178        }
20179    }
20180
20181    /// The request builder for [DataplexService::update_task][crate::client::DataplexService::update_task] calls.
20182    ///
20183    /// # Example
20184    /// ```
20185    /// # use google_cloud_dataplex_v1::builder::dataplex_service::UpdateTask;
20186    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20187    /// use google_cloud_lro::Poller;
20188    ///
20189    /// let builder = prepare_request_builder();
20190    /// let response = builder.poller().until_done().await?;
20191    /// # Ok(()) }
20192    ///
20193    /// fn prepare_request_builder() -> UpdateTask {
20194    ///   # panic!();
20195    ///   // ... details omitted ...
20196    /// }
20197    /// ```
20198    #[derive(Clone, Debug)]
20199    pub struct UpdateTask(RequestBuilder<crate::model::UpdateTaskRequest>);
20200
20201    impl UpdateTask {
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::UpdateTaskRequest>>(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        ///
20222        /// # Long running operations
20223        ///
20224        /// This starts, but does not poll, a longrunning operation. More information
20225        /// on [update_task][crate::client::DataplexService::update_task].
20226        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
20227            (*self.0.stub)
20228                .update_task(self.0.request, self.0.options)
20229                .await
20230                .map(crate::Response::into_body)
20231        }
20232
20233        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_task`.
20234        pub fn poller(
20235            self,
20236        ) -> impl google_cloud_lro::Poller<crate::model::Task, crate::model::OperationMetadata>
20237        {
20238            type Operation = google_cloud_lro::internal::Operation<
20239                crate::model::Task,
20240                crate::model::OperationMetadata,
20241            >;
20242            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
20243            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
20244            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
20245            if let Some(ref mut details) = poller_options.tracing {
20246                details.method_name =
20247                    "google_cloud_dataplex_v1::client::DataplexService::update_task::until_done";
20248            }
20249
20250            let stub = self.0.stub.clone();
20251            let mut options = self.0.options.clone();
20252            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
20253            let query = move |name| {
20254                let stub = stub.clone();
20255                let options = options.clone();
20256                async {
20257                    let op = GetOperation::new(stub)
20258                        .set_name(name)
20259                        .with_options(options)
20260                        .send()
20261                        .await?;
20262                    Ok(Operation::new(op))
20263                }
20264            };
20265
20266            let start = move || async {
20267                let op = self.send().await?;
20268                Ok(Operation::new(op))
20269            };
20270
20271            use google_cloud_lro::internal::PollerExt;
20272            {
20273                google_cloud_lro::internal::new_poller(
20274                    polling_error_policy,
20275                    polling_backoff_policy,
20276                    start,
20277                    query,
20278                )
20279            }
20280            .with_options(poller_options)
20281        }
20282
20283        /// Sets the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
20284        ///
20285        /// This is a **required** field for requests.
20286        pub fn set_update_mask<T>(mut self, v: T) -> Self
20287        where
20288            T: std::convert::Into<wkt::FieldMask>,
20289        {
20290            self.0.request.update_mask = std::option::Option::Some(v.into());
20291            self
20292        }
20293
20294        /// Sets or clears the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
20295        ///
20296        /// This is a **required** field for requests.
20297        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
20298        where
20299            T: std::convert::Into<wkt::FieldMask>,
20300        {
20301            self.0.request.update_mask = v.map(|x| x.into());
20302            self
20303        }
20304
20305        /// Sets the value of [task][crate::model::UpdateTaskRequest::task].
20306        ///
20307        /// This is a **required** field for requests.
20308        pub fn set_task<T>(mut self, v: T) -> Self
20309        where
20310            T: std::convert::Into<crate::model::Task>,
20311        {
20312            self.0.request.task = std::option::Option::Some(v.into());
20313            self
20314        }
20315
20316        /// Sets or clears the value of [task][crate::model::UpdateTaskRequest::task].
20317        ///
20318        /// This is a **required** field for requests.
20319        pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
20320        where
20321            T: std::convert::Into<crate::model::Task>,
20322        {
20323            self.0.request.task = v.map(|x| x.into());
20324            self
20325        }
20326
20327        /// Sets the value of [validate_only][crate::model::UpdateTaskRequest::validate_only].
20328        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
20329            self.0.request.validate_only = v.into();
20330            self
20331        }
20332    }
20333
20334    #[doc(hidden)]
20335    impl crate::RequestBuilder for UpdateTask {
20336        fn request_options(&mut self) -> &mut crate::RequestOptions {
20337            &mut self.0.options
20338        }
20339    }
20340
20341    /// The request builder for [DataplexService::delete_task][crate::client::DataplexService::delete_task] calls.
20342    ///
20343    /// # Example
20344    /// ```
20345    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteTask;
20346    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20347    /// use google_cloud_lro::Poller;
20348    ///
20349    /// let builder = prepare_request_builder();
20350    /// let response = builder.poller().until_done().await?;
20351    /// # Ok(()) }
20352    ///
20353    /// fn prepare_request_builder() -> DeleteTask {
20354    ///   # panic!();
20355    ///   // ... details omitted ...
20356    /// }
20357    /// ```
20358    #[derive(Clone, Debug)]
20359    pub struct DeleteTask(RequestBuilder<crate::model::DeleteTaskRequest>);
20360
20361    impl DeleteTask {
20362        pub(crate) fn new(
20363            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20364        ) -> Self {
20365            Self(RequestBuilder::new(stub))
20366        }
20367
20368        /// Sets the full request, replacing any prior values.
20369        pub fn with_request<V: Into<crate::model::DeleteTaskRequest>>(mut self, v: V) -> Self {
20370            self.0.request = v.into();
20371            self
20372        }
20373
20374        /// Sets all the options, replacing any prior values.
20375        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20376            self.0.options = v.into();
20377            self
20378        }
20379
20380        /// Sends the request.
20381        ///
20382        /// # Long running operations
20383        ///
20384        /// This starts, but does not poll, a longrunning operation. More information
20385        /// on [delete_task][crate::client::DataplexService::delete_task].
20386        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
20387            (*self.0.stub)
20388                .delete_task(self.0.request, self.0.options)
20389                .await
20390                .map(crate::Response::into_body)
20391        }
20392
20393        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_task`.
20394        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
20395            type Operation =
20396                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
20397            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
20398            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
20399            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
20400            if let Some(ref mut details) = poller_options.tracing {
20401                details.method_name =
20402                    "google_cloud_dataplex_v1::client::DataplexService::delete_task::until_done";
20403            }
20404
20405            let stub = self.0.stub.clone();
20406            let mut options = self.0.options.clone();
20407            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
20408            let query = move |name| {
20409                let stub = stub.clone();
20410                let options = options.clone();
20411                async {
20412                    let op = GetOperation::new(stub)
20413                        .set_name(name)
20414                        .with_options(options)
20415                        .send()
20416                        .await?;
20417                    Ok(Operation::new(op))
20418                }
20419            };
20420
20421            let start = move || async {
20422                let op = self.send().await?;
20423                Ok(Operation::new(op))
20424            };
20425
20426            use google_cloud_lro::internal::PollerExt;
20427            {
20428                google_cloud_lro::internal::new_unit_response_poller(
20429                    polling_error_policy,
20430                    polling_backoff_policy,
20431                    start,
20432                    query,
20433                )
20434            }
20435            .with_options(poller_options)
20436        }
20437
20438        /// Sets the value of [name][crate::model::DeleteTaskRequest::name].
20439        ///
20440        /// This is a **required** field for requests.
20441        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20442            self.0.request.name = v.into();
20443            self
20444        }
20445    }
20446
20447    #[doc(hidden)]
20448    impl crate::RequestBuilder for DeleteTask {
20449        fn request_options(&mut self) -> &mut crate::RequestOptions {
20450            &mut self.0.options
20451        }
20452    }
20453
20454    /// The request builder for [DataplexService::list_tasks][crate::client::DataplexService::list_tasks] calls.
20455    ///
20456    /// # Example
20457    /// ```
20458    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListTasks;
20459    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20460    /// use google_cloud_gax::paginator::ItemPaginator;
20461    ///
20462    /// let builder = prepare_request_builder();
20463    /// let mut items = builder.by_item();
20464    /// while let Some(result) = items.next().await {
20465    ///   let item = result?;
20466    /// }
20467    /// # Ok(()) }
20468    ///
20469    /// fn prepare_request_builder() -> ListTasks {
20470    ///   # panic!();
20471    ///   // ... details omitted ...
20472    /// }
20473    /// ```
20474    #[derive(Clone, Debug)]
20475    pub struct ListTasks(RequestBuilder<crate::model::ListTasksRequest>);
20476
20477    impl ListTasks {
20478        pub(crate) fn new(
20479            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20480        ) -> Self {
20481            Self(RequestBuilder::new(stub))
20482        }
20483
20484        /// Sets the full request, replacing any prior values.
20485        pub fn with_request<V: Into<crate::model::ListTasksRequest>>(mut self, v: V) -> Self {
20486            self.0.request = v.into();
20487            self
20488        }
20489
20490        /// Sets all the options, replacing any prior values.
20491        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20492            self.0.options = v.into();
20493            self
20494        }
20495
20496        /// Sends the request.
20497        pub async fn send(self) -> Result<crate::model::ListTasksResponse> {
20498            (*self.0.stub)
20499                .list_tasks(self.0.request, self.0.options)
20500                .await
20501                .map(crate::Response::into_body)
20502        }
20503
20504        /// Streams each page in the collection.
20505        pub fn by_page(
20506            self,
20507        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListTasksResponse, crate::Error>
20508        {
20509            use std::clone::Clone;
20510            let token = self.0.request.page_token.clone();
20511            let execute = move |token: String| {
20512                let mut builder = self.clone();
20513                builder.0.request = builder.0.request.set_page_token(token);
20514                builder.send()
20515            };
20516            google_cloud_gax::paginator::internal::new_paginator(token, execute)
20517        }
20518
20519        /// Streams each item in the collection.
20520        pub fn by_item(
20521            self,
20522        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListTasksResponse, crate::Error>
20523        {
20524            use google_cloud_gax::paginator::Paginator;
20525            self.by_page().items()
20526        }
20527
20528        /// Sets the value of [parent][crate::model::ListTasksRequest::parent].
20529        ///
20530        /// This is a **required** field for requests.
20531        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
20532            self.0.request.parent = v.into();
20533            self
20534        }
20535
20536        /// Sets the value of [page_size][crate::model::ListTasksRequest::page_size].
20537        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
20538            self.0.request.page_size = v.into();
20539            self
20540        }
20541
20542        /// Sets the value of [page_token][crate::model::ListTasksRequest::page_token].
20543        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
20544            self.0.request.page_token = v.into();
20545            self
20546        }
20547
20548        /// Sets the value of [filter][crate::model::ListTasksRequest::filter].
20549        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
20550            self.0.request.filter = v.into();
20551            self
20552        }
20553
20554        /// Sets the value of [order_by][crate::model::ListTasksRequest::order_by].
20555        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
20556            self.0.request.order_by = v.into();
20557            self
20558        }
20559    }
20560
20561    #[doc(hidden)]
20562    impl crate::RequestBuilder for ListTasks {
20563        fn request_options(&mut self) -> &mut crate::RequestOptions {
20564            &mut self.0.options
20565        }
20566    }
20567
20568    /// The request builder for [DataplexService::get_task][crate::client::DataplexService::get_task] calls.
20569    ///
20570    /// # Example
20571    /// ```
20572    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetTask;
20573    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20574    ///
20575    /// let builder = prepare_request_builder();
20576    /// let response = builder.send().await?;
20577    /// # Ok(()) }
20578    ///
20579    /// fn prepare_request_builder() -> GetTask {
20580    ///   # panic!();
20581    ///   // ... details omitted ...
20582    /// }
20583    /// ```
20584    #[derive(Clone, Debug)]
20585    pub struct GetTask(RequestBuilder<crate::model::GetTaskRequest>);
20586
20587    impl GetTask {
20588        pub(crate) fn new(
20589            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20590        ) -> Self {
20591            Self(RequestBuilder::new(stub))
20592        }
20593
20594        /// Sets the full request, replacing any prior values.
20595        pub fn with_request<V: Into<crate::model::GetTaskRequest>>(mut self, v: V) -> Self {
20596            self.0.request = v.into();
20597            self
20598        }
20599
20600        /// Sets all the options, replacing any prior values.
20601        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20602            self.0.options = v.into();
20603            self
20604        }
20605
20606        /// Sends the request.
20607        pub async fn send(self) -> Result<crate::model::Task> {
20608            (*self.0.stub)
20609                .get_task(self.0.request, self.0.options)
20610                .await
20611                .map(crate::Response::into_body)
20612        }
20613
20614        /// Sets the value of [name][crate::model::GetTaskRequest::name].
20615        ///
20616        /// This is a **required** field for requests.
20617        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20618            self.0.request.name = v.into();
20619            self
20620        }
20621    }
20622
20623    #[doc(hidden)]
20624    impl crate::RequestBuilder for GetTask {
20625        fn request_options(&mut self) -> &mut crate::RequestOptions {
20626            &mut self.0.options
20627        }
20628    }
20629
20630    /// The request builder for [DataplexService::list_jobs][crate::client::DataplexService::list_jobs] calls.
20631    ///
20632    /// # Example
20633    /// ```
20634    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListJobs;
20635    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20636    /// use google_cloud_gax::paginator::ItemPaginator;
20637    ///
20638    /// let builder = prepare_request_builder();
20639    /// let mut items = builder.by_item();
20640    /// while let Some(result) = items.next().await {
20641    ///   let item = result?;
20642    /// }
20643    /// # Ok(()) }
20644    ///
20645    /// fn prepare_request_builder() -> ListJobs {
20646    ///   # panic!();
20647    ///   // ... details omitted ...
20648    /// }
20649    /// ```
20650    #[derive(Clone, Debug)]
20651    pub struct ListJobs(RequestBuilder<crate::model::ListJobsRequest>);
20652
20653    impl ListJobs {
20654        pub(crate) fn new(
20655            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20656        ) -> Self {
20657            Self(RequestBuilder::new(stub))
20658        }
20659
20660        /// Sets the full request, replacing any prior values.
20661        pub fn with_request<V: Into<crate::model::ListJobsRequest>>(mut self, v: V) -> Self {
20662            self.0.request = v.into();
20663            self
20664        }
20665
20666        /// Sets all the options, replacing any prior values.
20667        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20668            self.0.options = v.into();
20669            self
20670        }
20671
20672        /// Sends the request.
20673        pub async fn send(self) -> Result<crate::model::ListJobsResponse> {
20674            (*self.0.stub)
20675                .list_jobs(self.0.request, self.0.options)
20676                .await
20677                .map(crate::Response::into_body)
20678        }
20679
20680        /// Streams each page in the collection.
20681        pub fn by_page(
20682            self,
20683        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListJobsResponse, crate::Error>
20684        {
20685            use std::clone::Clone;
20686            let token = self.0.request.page_token.clone();
20687            let execute = move |token: String| {
20688                let mut builder = self.clone();
20689                builder.0.request = builder.0.request.set_page_token(token);
20690                builder.send()
20691            };
20692            google_cloud_gax::paginator::internal::new_paginator(token, execute)
20693        }
20694
20695        /// Streams each item in the collection.
20696        pub fn by_item(
20697            self,
20698        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListJobsResponse, crate::Error>
20699        {
20700            use google_cloud_gax::paginator::Paginator;
20701            self.by_page().items()
20702        }
20703
20704        /// Sets the value of [parent][crate::model::ListJobsRequest::parent].
20705        ///
20706        /// This is a **required** field for requests.
20707        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
20708            self.0.request.parent = v.into();
20709            self
20710        }
20711
20712        /// Sets the value of [page_size][crate::model::ListJobsRequest::page_size].
20713        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
20714            self.0.request.page_size = v.into();
20715            self
20716        }
20717
20718        /// Sets the value of [page_token][crate::model::ListJobsRequest::page_token].
20719        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
20720            self.0.request.page_token = v.into();
20721            self
20722        }
20723    }
20724
20725    #[doc(hidden)]
20726    impl crate::RequestBuilder for ListJobs {
20727        fn request_options(&mut self) -> &mut crate::RequestOptions {
20728            &mut self.0.options
20729        }
20730    }
20731
20732    /// The request builder for [DataplexService::run_task][crate::client::DataplexService::run_task] calls.
20733    ///
20734    /// # Example
20735    /// ```
20736    /// # use google_cloud_dataplex_v1::builder::dataplex_service::RunTask;
20737    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20738    ///
20739    /// let builder = prepare_request_builder();
20740    /// let response = builder.send().await?;
20741    /// # Ok(()) }
20742    ///
20743    /// fn prepare_request_builder() -> RunTask {
20744    ///   # panic!();
20745    ///   // ... details omitted ...
20746    /// }
20747    /// ```
20748    #[derive(Clone, Debug)]
20749    pub struct RunTask(RequestBuilder<crate::model::RunTaskRequest>);
20750
20751    impl RunTask {
20752        pub(crate) fn new(
20753            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20754        ) -> Self {
20755            Self(RequestBuilder::new(stub))
20756        }
20757
20758        /// Sets the full request, replacing any prior values.
20759        pub fn with_request<V: Into<crate::model::RunTaskRequest>>(mut self, v: V) -> Self {
20760            self.0.request = v.into();
20761            self
20762        }
20763
20764        /// Sets all the options, replacing any prior values.
20765        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20766            self.0.options = v.into();
20767            self
20768        }
20769
20770        /// Sends the request.
20771        pub async fn send(self) -> Result<crate::model::RunTaskResponse> {
20772            (*self.0.stub)
20773                .run_task(self.0.request, self.0.options)
20774                .await
20775                .map(crate::Response::into_body)
20776        }
20777
20778        /// Sets the value of [name][crate::model::RunTaskRequest::name].
20779        ///
20780        /// This is a **required** field for requests.
20781        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20782            self.0.request.name = v.into();
20783            self
20784        }
20785
20786        /// Sets the value of [labels][crate::model::RunTaskRequest::labels].
20787        pub fn set_labels<T, K, V>(mut self, v: T) -> Self
20788        where
20789            T: std::iter::IntoIterator<Item = (K, V)>,
20790            K: std::convert::Into<std::string::String>,
20791            V: std::convert::Into<std::string::String>,
20792        {
20793            self.0.request.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
20794            self
20795        }
20796
20797        /// Sets the value of [args][crate::model::RunTaskRequest::args].
20798        pub fn set_args<T, K, V>(mut self, v: T) -> Self
20799        where
20800            T: std::iter::IntoIterator<Item = (K, V)>,
20801            K: std::convert::Into<std::string::String>,
20802            V: std::convert::Into<std::string::String>,
20803        {
20804            self.0.request.args = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
20805            self
20806        }
20807    }
20808
20809    #[doc(hidden)]
20810    impl crate::RequestBuilder for RunTask {
20811        fn request_options(&mut self) -> &mut crate::RequestOptions {
20812            &mut self.0.options
20813        }
20814    }
20815
20816    /// The request builder for [DataplexService::get_job][crate::client::DataplexService::get_job] calls.
20817    ///
20818    /// # Example
20819    /// ```
20820    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetJob;
20821    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20822    ///
20823    /// let builder = prepare_request_builder();
20824    /// let response = builder.send().await?;
20825    /// # Ok(()) }
20826    ///
20827    /// fn prepare_request_builder() -> GetJob {
20828    ///   # panic!();
20829    ///   // ... details omitted ...
20830    /// }
20831    /// ```
20832    #[derive(Clone, Debug)]
20833    pub struct GetJob(RequestBuilder<crate::model::GetJobRequest>);
20834
20835    impl GetJob {
20836        pub(crate) fn new(
20837            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20838        ) -> Self {
20839            Self(RequestBuilder::new(stub))
20840        }
20841
20842        /// Sets the full request, replacing any prior values.
20843        pub fn with_request<V: Into<crate::model::GetJobRequest>>(mut self, v: V) -> Self {
20844            self.0.request = v.into();
20845            self
20846        }
20847
20848        /// Sets all the options, replacing any prior values.
20849        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20850            self.0.options = v.into();
20851            self
20852        }
20853
20854        /// Sends the request.
20855        pub async fn send(self) -> Result<crate::model::Job> {
20856            (*self.0.stub)
20857                .get_job(self.0.request, self.0.options)
20858                .await
20859                .map(crate::Response::into_body)
20860        }
20861
20862        /// Sets the value of [name][crate::model::GetJobRequest::name].
20863        ///
20864        /// This is a **required** field for requests.
20865        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20866            self.0.request.name = v.into();
20867            self
20868        }
20869    }
20870
20871    #[doc(hidden)]
20872    impl crate::RequestBuilder for GetJob {
20873        fn request_options(&mut self) -> &mut crate::RequestOptions {
20874            &mut self.0.options
20875        }
20876    }
20877
20878    /// The request builder for [DataplexService::cancel_job][crate::client::DataplexService::cancel_job] calls.
20879    ///
20880    /// # Example
20881    /// ```
20882    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CancelJob;
20883    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20884    ///
20885    /// let builder = prepare_request_builder();
20886    /// let response = builder.send().await?;
20887    /// # Ok(()) }
20888    ///
20889    /// fn prepare_request_builder() -> CancelJob {
20890    ///   # panic!();
20891    ///   // ... details omitted ...
20892    /// }
20893    /// ```
20894    #[derive(Clone, Debug)]
20895    pub struct CancelJob(RequestBuilder<crate::model::CancelJobRequest>);
20896
20897    impl CancelJob {
20898        pub(crate) fn new(
20899            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20900        ) -> Self {
20901            Self(RequestBuilder::new(stub))
20902        }
20903
20904        /// Sets the full request, replacing any prior values.
20905        pub fn with_request<V: Into<crate::model::CancelJobRequest>>(mut self, v: V) -> Self {
20906            self.0.request = v.into();
20907            self
20908        }
20909
20910        /// Sets all the options, replacing any prior values.
20911        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20912            self.0.options = v.into();
20913            self
20914        }
20915
20916        /// Sends the request.
20917        pub async fn send(self) -> Result<()> {
20918            (*self.0.stub)
20919                .cancel_job(self.0.request, self.0.options)
20920                .await
20921                .map(crate::Response::into_body)
20922        }
20923
20924        /// Sets the value of [name][crate::model::CancelJobRequest::name].
20925        ///
20926        /// This is a **required** field for requests.
20927        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20928            self.0.request.name = v.into();
20929            self
20930        }
20931    }
20932
20933    #[doc(hidden)]
20934    impl crate::RequestBuilder for CancelJob {
20935        fn request_options(&mut self) -> &mut crate::RequestOptions {
20936            &mut self.0.options
20937        }
20938    }
20939
20940    /// The request builder for [DataplexService::list_locations][crate::client::DataplexService::list_locations] calls.
20941    ///
20942    /// # Example
20943    /// ```
20944    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListLocations;
20945    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
20946    /// use google_cloud_gax::paginator::ItemPaginator;
20947    ///
20948    /// let builder = prepare_request_builder();
20949    /// let mut items = builder.by_item();
20950    /// while let Some(result) = items.next().await {
20951    ///   let item = result?;
20952    /// }
20953    /// # Ok(()) }
20954    ///
20955    /// fn prepare_request_builder() -> ListLocations {
20956    ///   # panic!();
20957    ///   // ... details omitted ...
20958    /// }
20959    /// ```
20960    #[derive(Clone, Debug)]
20961    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
20962
20963    impl ListLocations {
20964        pub(crate) fn new(
20965            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20966        ) -> Self {
20967            Self(RequestBuilder::new(stub))
20968        }
20969
20970        /// Sets the full request, replacing any prior values.
20971        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
20972            mut self,
20973            v: V,
20974        ) -> Self {
20975            self.0.request = v.into();
20976            self
20977        }
20978
20979        /// Sets all the options, replacing any prior values.
20980        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20981            self.0.options = v.into();
20982            self
20983        }
20984
20985        /// Sends the request.
20986        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
20987            (*self.0.stub)
20988                .list_locations(self.0.request, self.0.options)
20989                .await
20990                .map(crate::Response::into_body)
20991        }
20992
20993        /// Streams each page in the collection.
20994        pub fn by_page(
20995            self,
20996        ) -> impl google_cloud_gax::paginator::Paginator<
20997            google_cloud_location::model::ListLocationsResponse,
20998            crate::Error,
20999        > {
21000            use std::clone::Clone;
21001            let token = self.0.request.page_token.clone();
21002            let execute = move |token: String| {
21003                let mut builder = self.clone();
21004                builder.0.request = builder.0.request.set_page_token(token);
21005                builder.send()
21006            };
21007            google_cloud_gax::paginator::internal::new_paginator(token, execute)
21008        }
21009
21010        /// Streams each item in the collection.
21011        pub fn by_item(
21012            self,
21013        ) -> impl google_cloud_gax::paginator::ItemPaginator<
21014            google_cloud_location::model::ListLocationsResponse,
21015            crate::Error,
21016        > {
21017            use google_cloud_gax::paginator::Paginator;
21018            self.by_page().items()
21019        }
21020
21021        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
21022        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
21023            self.0.request.name = v.into();
21024            self
21025        }
21026
21027        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
21028        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
21029            self.0.request.filter = v.into();
21030            self
21031        }
21032
21033        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
21034        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
21035            self.0.request.page_size = v.into();
21036            self
21037        }
21038
21039        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
21040        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
21041            self.0.request.page_token = v.into();
21042            self
21043        }
21044    }
21045
21046    #[doc(hidden)]
21047    impl crate::RequestBuilder for ListLocations {
21048        fn request_options(&mut self) -> &mut crate::RequestOptions {
21049            &mut self.0.options
21050        }
21051    }
21052
21053    /// The request builder for [DataplexService::get_location][crate::client::DataplexService::get_location] calls.
21054    ///
21055    /// # Example
21056    /// ```
21057    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetLocation;
21058    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
21059    ///
21060    /// let builder = prepare_request_builder();
21061    /// let response = builder.send().await?;
21062    /// # Ok(()) }
21063    ///
21064    /// fn prepare_request_builder() -> GetLocation {
21065    ///   # panic!();
21066    ///   // ... details omitted ...
21067    /// }
21068    /// ```
21069    #[derive(Clone, Debug)]
21070    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
21071
21072    impl GetLocation {
21073        pub(crate) fn new(
21074            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21075        ) -> Self {
21076            Self(RequestBuilder::new(stub))
21077        }
21078
21079        /// Sets the full request, replacing any prior values.
21080        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
21081            mut self,
21082            v: V,
21083        ) -> Self {
21084            self.0.request = v.into();
21085            self
21086        }
21087
21088        /// Sets all the options, replacing any prior values.
21089        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21090            self.0.options = v.into();
21091            self
21092        }
21093
21094        /// Sends the request.
21095        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
21096            (*self.0.stub)
21097                .get_location(self.0.request, self.0.options)
21098                .await
21099                .map(crate::Response::into_body)
21100        }
21101
21102        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
21103        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
21104            self.0.request.name = v.into();
21105            self
21106        }
21107    }
21108
21109    #[doc(hidden)]
21110    impl crate::RequestBuilder for GetLocation {
21111        fn request_options(&mut self) -> &mut crate::RequestOptions {
21112            &mut self.0.options
21113        }
21114    }
21115
21116    /// The request builder for [DataplexService::set_iam_policy][crate::client::DataplexService::set_iam_policy] calls.
21117    ///
21118    /// # Example
21119    /// ```
21120    /// # use google_cloud_dataplex_v1::builder::dataplex_service::SetIamPolicy;
21121    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
21122    ///
21123    /// let builder = prepare_request_builder();
21124    /// let response = builder.send().await?;
21125    /// # Ok(()) }
21126    ///
21127    /// fn prepare_request_builder() -> SetIamPolicy {
21128    ///   # panic!();
21129    ///   // ... details omitted ...
21130    /// }
21131    /// ```
21132    #[derive(Clone, Debug)]
21133    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
21134
21135    impl SetIamPolicy {
21136        pub(crate) fn new(
21137            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21138        ) -> Self {
21139            Self(RequestBuilder::new(stub))
21140        }
21141
21142        /// Sets the full request, replacing any prior values.
21143        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
21144            mut self,
21145            v: V,
21146        ) -> Self {
21147            self.0.request = v.into();
21148            self
21149        }
21150
21151        /// Sets all the options, replacing any prior values.
21152        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21153            self.0.options = v.into();
21154            self
21155        }
21156
21157        /// Sends the request.
21158        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
21159            (*self.0.stub)
21160                .set_iam_policy(self.0.request, self.0.options)
21161                .await
21162                .map(crate::Response::into_body)
21163        }
21164
21165        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
21166        ///
21167        /// This is a **required** field for requests.
21168        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
21169            self.0.request.resource = v.into();
21170            self
21171        }
21172
21173        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
21174        ///
21175        /// This is a **required** field for requests.
21176        pub fn set_policy<T>(mut self, v: T) -> Self
21177        where
21178            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
21179        {
21180            self.0.request.policy = std::option::Option::Some(v.into());
21181            self
21182        }
21183
21184        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
21185        ///
21186        /// This is a **required** field for requests.
21187        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
21188        where
21189            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
21190        {
21191            self.0.request.policy = v.map(|x| x.into());
21192            self
21193        }
21194
21195        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
21196        pub fn set_update_mask<T>(mut self, v: T) -> Self
21197        where
21198            T: std::convert::Into<wkt::FieldMask>,
21199        {
21200            self.0.request.update_mask = std::option::Option::Some(v.into());
21201            self
21202        }
21203
21204        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
21205        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21206        where
21207            T: std::convert::Into<wkt::FieldMask>,
21208        {
21209            self.0.request.update_mask = v.map(|x| x.into());
21210            self
21211        }
21212    }
21213
21214    #[doc(hidden)]
21215    impl crate::RequestBuilder for SetIamPolicy {
21216        fn request_options(&mut self) -> &mut crate::RequestOptions {
21217            &mut self.0.options
21218        }
21219    }
21220
21221    /// The request builder for [DataplexService::get_iam_policy][crate::client::DataplexService::get_iam_policy] calls.
21222    ///
21223    /// # Example
21224    /// ```
21225    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetIamPolicy;
21226    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
21227    ///
21228    /// let builder = prepare_request_builder();
21229    /// let response = builder.send().await?;
21230    /// # Ok(()) }
21231    ///
21232    /// fn prepare_request_builder() -> GetIamPolicy {
21233    ///   # panic!();
21234    ///   // ... details omitted ...
21235    /// }
21236    /// ```
21237    #[derive(Clone, Debug)]
21238    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
21239
21240    impl GetIamPolicy {
21241        pub(crate) fn new(
21242            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21243        ) -> Self {
21244            Self(RequestBuilder::new(stub))
21245        }
21246
21247        /// Sets the full request, replacing any prior values.
21248        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
21249            mut self,
21250            v: V,
21251        ) -> Self {
21252            self.0.request = v.into();
21253            self
21254        }
21255
21256        /// Sets all the options, replacing any prior values.
21257        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21258            self.0.options = v.into();
21259            self
21260        }
21261
21262        /// Sends the request.
21263        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
21264            (*self.0.stub)
21265                .get_iam_policy(self.0.request, self.0.options)
21266                .await
21267                .map(crate::Response::into_body)
21268        }
21269
21270        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
21271        ///
21272        /// This is a **required** field for requests.
21273        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
21274            self.0.request.resource = v.into();
21275            self
21276        }
21277
21278        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
21279        pub fn set_options<T>(mut self, v: T) -> Self
21280        where
21281            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
21282        {
21283            self.0.request.options = std::option::Option::Some(v.into());
21284            self
21285        }
21286
21287        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
21288        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
21289        where
21290            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
21291        {
21292            self.0.request.options = v.map(|x| x.into());
21293            self
21294        }
21295    }
21296
21297    #[doc(hidden)]
21298    impl crate::RequestBuilder for GetIamPolicy {
21299        fn request_options(&mut self) -> &mut crate::RequestOptions {
21300            &mut self.0.options
21301        }
21302    }
21303
21304    /// The request builder for [DataplexService::test_iam_permissions][crate::client::DataplexService::test_iam_permissions] calls.
21305    ///
21306    /// # Example
21307    /// ```
21308    /// # use google_cloud_dataplex_v1::builder::dataplex_service::TestIamPermissions;
21309    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
21310    ///
21311    /// let builder = prepare_request_builder();
21312    /// let response = builder.send().await?;
21313    /// # Ok(()) }
21314    ///
21315    /// fn prepare_request_builder() -> TestIamPermissions {
21316    ///   # panic!();
21317    ///   // ... details omitted ...
21318    /// }
21319    /// ```
21320    #[derive(Clone, Debug)]
21321    pub struct TestIamPermissions(
21322        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
21323    );
21324
21325    impl TestIamPermissions {
21326        pub(crate) fn new(
21327            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21328        ) -> Self {
21329            Self(RequestBuilder::new(stub))
21330        }
21331
21332        /// Sets the full request, replacing any prior values.
21333        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
21334            mut self,
21335            v: V,
21336        ) -> Self {
21337            self.0.request = v.into();
21338            self
21339        }
21340
21341        /// Sets all the options, replacing any prior values.
21342        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21343            self.0.options = v.into();
21344            self
21345        }
21346
21347        /// Sends the request.
21348        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
21349            (*self.0.stub)
21350                .test_iam_permissions(self.0.request, self.0.options)
21351                .await
21352                .map(crate::Response::into_body)
21353        }
21354
21355        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
21356        ///
21357        /// This is a **required** field for requests.
21358        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
21359            self.0.request.resource = v.into();
21360            self
21361        }
21362
21363        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
21364        ///
21365        /// This is a **required** field for requests.
21366        pub fn set_permissions<T, V>(mut self, v: T) -> Self
21367        where
21368            T: std::iter::IntoIterator<Item = V>,
21369            V: std::convert::Into<std::string::String>,
21370        {
21371            use std::iter::Iterator;
21372            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
21373            self
21374        }
21375    }
21376
21377    #[doc(hidden)]
21378    impl crate::RequestBuilder for TestIamPermissions {
21379        fn request_options(&mut self) -> &mut crate::RequestOptions {
21380            &mut self.0.options
21381        }
21382    }
21383
21384    /// The request builder for [DataplexService::list_operations][crate::client::DataplexService::list_operations] calls.
21385    ///
21386    /// # Example
21387    /// ```
21388    /// # use google_cloud_dataplex_v1::builder::dataplex_service::ListOperations;
21389    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
21390    /// use google_cloud_gax::paginator::ItemPaginator;
21391    ///
21392    /// let builder = prepare_request_builder();
21393    /// let mut items = builder.by_item();
21394    /// while let Some(result) = items.next().await {
21395    ///   let item = result?;
21396    /// }
21397    /// # Ok(()) }
21398    ///
21399    /// fn prepare_request_builder() -> ListOperations {
21400    ///   # panic!();
21401    ///   // ... details omitted ...
21402    /// }
21403    /// ```
21404    #[derive(Clone, Debug)]
21405    pub struct ListOperations(
21406        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
21407    );
21408
21409    impl ListOperations {
21410        pub(crate) fn new(
21411            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21412        ) -> Self {
21413            Self(RequestBuilder::new(stub))
21414        }
21415
21416        /// Sets the full request, replacing any prior values.
21417        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
21418            mut self,
21419            v: V,
21420        ) -> Self {
21421            self.0.request = v.into();
21422            self
21423        }
21424
21425        /// Sets all the options, replacing any prior values.
21426        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21427            self.0.options = v.into();
21428            self
21429        }
21430
21431        /// Sends the request.
21432        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
21433            (*self.0.stub)
21434                .list_operations(self.0.request, self.0.options)
21435                .await
21436                .map(crate::Response::into_body)
21437        }
21438
21439        /// Streams each page in the collection.
21440        pub fn by_page(
21441            self,
21442        ) -> impl google_cloud_gax::paginator::Paginator<
21443            google_cloud_longrunning::model::ListOperationsResponse,
21444            crate::Error,
21445        > {
21446            use std::clone::Clone;
21447            let token = self.0.request.page_token.clone();
21448            let execute = move |token: String| {
21449                let mut builder = self.clone();
21450                builder.0.request = builder.0.request.set_page_token(token);
21451                builder.send()
21452            };
21453            google_cloud_gax::paginator::internal::new_paginator(token, execute)
21454        }
21455
21456        /// Streams each item in the collection.
21457        pub fn by_item(
21458            self,
21459        ) -> impl google_cloud_gax::paginator::ItemPaginator<
21460            google_cloud_longrunning::model::ListOperationsResponse,
21461            crate::Error,
21462        > {
21463            use google_cloud_gax::paginator::Paginator;
21464            self.by_page().items()
21465        }
21466
21467        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
21468        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
21469            self.0.request.name = v.into();
21470            self
21471        }
21472
21473        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
21474        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
21475            self.0.request.filter = v.into();
21476            self
21477        }
21478
21479        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
21480        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
21481            self.0.request.page_size = v.into();
21482            self
21483        }
21484
21485        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
21486        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
21487            self.0.request.page_token = v.into();
21488            self
21489        }
21490
21491        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
21492        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
21493            self.0.request.return_partial_success = v.into();
21494            self
21495        }
21496    }
21497
21498    #[doc(hidden)]
21499    impl crate::RequestBuilder for ListOperations {
21500        fn request_options(&mut self) -> &mut crate::RequestOptions {
21501            &mut self.0.options
21502        }
21503    }
21504
21505    /// The request builder for [DataplexService::get_operation][crate::client::DataplexService::get_operation] calls.
21506    ///
21507    /// # Example
21508    /// ```
21509    /// # use google_cloud_dataplex_v1::builder::dataplex_service::GetOperation;
21510    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
21511    ///
21512    /// let builder = prepare_request_builder();
21513    /// let response = builder.send().await?;
21514    /// # Ok(()) }
21515    ///
21516    /// fn prepare_request_builder() -> GetOperation {
21517    ///   # panic!();
21518    ///   // ... details omitted ...
21519    /// }
21520    /// ```
21521    #[derive(Clone, Debug)]
21522    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
21523
21524    impl GetOperation {
21525        pub(crate) fn new(
21526            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21527        ) -> Self {
21528            Self(RequestBuilder::new(stub))
21529        }
21530
21531        /// Sets the full request, replacing any prior values.
21532        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
21533            mut self,
21534            v: V,
21535        ) -> Self {
21536            self.0.request = v.into();
21537            self
21538        }
21539
21540        /// Sets all the options, replacing any prior values.
21541        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21542            self.0.options = v.into();
21543            self
21544        }
21545
21546        /// Sends the request.
21547        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
21548            (*self.0.stub)
21549                .get_operation(self.0.request, self.0.options)
21550                .await
21551                .map(crate::Response::into_body)
21552        }
21553
21554        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
21555        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
21556            self.0.request.name = v.into();
21557            self
21558        }
21559    }
21560
21561    #[doc(hidden)]
21562    impl crate::RequestBuilder for GetOperation {
21563        fn request_options(&mut self) -> &mut crate::RequestOptions {
21564            &mut self.0.options
21565        }
21566    }
21567
21568    /// The request builder for [DataplexService::delete_operation][crate::client::DataplexService::delete_operation] calls.
21569    ///
21570    /// # Example
21571    /// ```
21572    /// # use google_cloud_dataplex_v1::builder::dataplex_service::DeleteOperation;
21573    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
21574    ///
21575    /// let builder = prepare_request_builder();
21576    /// let response = builder.send().await?;
21577    /// # Ok(()) }
21578    ///
21579    /// fn prepare_request_builder() -> DeleteOperation {
21580    ///   # panic!();
21581    ///   // ... details omitted ...
21582    /// }
21583    /// ```
21584    #[derive(Clone, Debug)]
21585    pub struct DeleteOperation(
21586        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
21587    );
21588
21589    impl DeleteOperation {
21590        pub(crate) fn new(
21591            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21592        ) -> Self {
21593            Self(RequestBuilder::new(stub))
21594        }
21595
21596        /// Sets the full request, replacing any prior values.
21597        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
21598            mut self,
21599            v: V,
21600        ) -> Self {
21601            self.0.request = v.into();
21602            self
21603        }
21604
21605        /// Sets all the options, replacing any prior values.
21606        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21607            self.0.options = v.into();
21608            self
21609        }
21610
21611        /// Sends the request.
21612        pub async fn send(self) -> Result<()> {
21613            (*self.0.stub)
21614                .delete_operation(self.0.request, self.0.options)
21615                .await
21616                .map(crate::Response::into_body)
21617        }
21618
21619        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
21620        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
21621            self.0.request.name = v.into();
21622            self
21623        }
21624    }
21625
21626    #[doc(hidden)]
21627    impl crate::RequestBuilder for DeleteOperation {
21628        fn request_options(&mut self) -> &mut crate::RequestOptions {
21629            &mut self.0.options
21630        }
21631    }
21632
21633    /// The request builder for [DataplexService::cancel_operation][crate::client::DataplexService::cancel_operation] calls.
21634    ///
21635    /// # Example
21636    /// ```
21637    /// # use google_cloud_dataplex_v1::builder::dataplex_service::CancelOperation;
21638    /// # async fn sample() -> google_cloud_dataplex_v1::Result<()> {
21639    ///
21640    /// let builder = prepare_request_builder();
21641    /// let response = builder.send().await?;
21642    /// # Ok(()) }
21643    ///
21644    /// fn prepare_request_builder() -> CancelOperation {
21645    ///   # panic!();
21646    ///   // ... details omitted ...
21647    /// }
21648    /// ```
21649    #[derive(Clone, Debug)]
21650    pub struct CancelOperation(
21651        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
21652    );
21653
21654    impl CancelOperation {
21655        pub(crate) fn new(
21656            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21657        ) -> Self {
21658            Self(RequestBuilder::new(stub))
21659        }
21660
21661        /// Sets the full request, replacing any prior values.
21662        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
21663            mut self,
21664            v: V,
21665        ) -> Self {
21666            self.0.request = v.into();
21667            self
21668        }
21669
21670        /// Sets all the options, replacing any prior values.
21671        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21672            self.0.options = v.into();
21673            self
21674        }
21675
21676        /// Sends the request.
21677        pub async fn send(self) -> Result<()> {
21678            (*self.0.stub)
21679                .cancel_operation(self.0.request, self.0.options)
21680                .await
21681                .map(crate::Response::into_body)
21682        }
21683
21684        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
21685        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
21686            self.0.request.name = v.into();
21687            self
21688        }
21689    }
21690
21691    #[doc(hidden)]
21692    impl crate::RequestBuilder for CancelOperation {
21693        fn request_options(&mut self) -> &mut crate::RequestOptions {
21694            &mut self.0.options
21695        }
21696    }
21697}