google_cloud_dataplex_v1/
builder.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17pub mod catalog_service {
18    use crate::Result;
19
20    /// A builder for [CatalogService][crate::client::CatalogService].
21    ///
22    /// ```
23    /// # tokio_test::block_on(async {
24    /// # use google_cloud_dataplex_v1::*;
25    /// # use builder::catalog_service::ClientBuilder;
26    /// # use client::CatalogService;
27    /// let builder : ClientBuilder = CatalogService::builder();
28    /// let client = builder
29    ///     .with_endpoint("https://dataplex.googleapis.com")
30    ///     .build().await?;
31    /// # gax::client_builder::Result::<()>::Ok(()) });
32    /// ```
33    pub type ClientBuilder =
34        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36    pub(crate) mod client {
37        use super::super::super::client::CatalogService;
38        pub struct Factory;
39        impl gax::client_builder::internal::ClientFactory for Factory {
40            type Client = CatalogService;
41            type Credentials = gaxi::options::Credentials;
42            async fn build(
43                self,
44                config: gaxi::options::ClientConfig,
45            ) -> gax::client_builder::Result<Self::Client> {
46                Self::Client::new(config).await
47            }
48        }
49    }
50
51    /// Common implementation for [crate::client::CatalogService] 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::CatalogService>,
55        request: R,
56        options: gax::options::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::CatalogService>,
65        ) -> Self {
66            Self {
67                stub,
68                request: R::default(),
69                options: gax::options::RequestOptions::default(),
70            }
71        }
72    }
73
74    /// The request builder for [CatalogService::create_entry_type][crate::client::CatalogService::create_entry_type] calls.
75    ///
76    /// # Example
77    /// ```no_run
78    /// # use google_cloud_dataplex_v1::builder;
79    /// use builder::catalog_service::CreateEntryType;
80    /// # tokio_test::block_on(async {
81    /// use lro::Poller;
82    ///
83    /// let builder = prepare_request_builder();
84    /// let response = builder.poller().until_done().await?;
85    /// # gax::Result::<()>::Ok(()) });
86    ///
87    /// fn prepare_request_builder() -> CreateEntryType {
88    ///   # panic!();
89    ///   // ... details omitted ...
90    /// }
91    /// ```
92    #[derive(Clone, Debug)]
93    pub struct CreateEntryType(RequestBuilder<crate::model::CreateEntryTypeRequest>);
94
95    impl CreateEntryType {
96        pub(crate) fn new(
97            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
98        ) -> Self {
99            Self(RequestBuilder::new(stub))
100        }
101
102        /// Sets the full request, replacing any prior values.
103        pub fn with_request<V: Into<crate::model::CreateEntryTypeRequest>>(mut self, v: V) -> Self {
104            self.0.request = v.into();
105            self
106        }
107
108        /// Sets all the options, replacing any prior values.
109        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
110            self.0.options = v.into();
111            self
112        }
113
114        /// Sends the request.
115        ///
116        /// # Long running operations
117        ///
118        /// This starts, but does not poll, a longrunning operation. More information
119        /// on [create_entry_type][crate::client::CatalogService::create_entry_type].
120        pub async fn send(self) -> Result<longrunning::model::Operation> {
121            (*self.0.stub)
122                .create_entry_type(self.0.request, self.0.options)
123                .await
124                .map(gax::response::Response::into_body)
125        }
126
127        /// Creates a [Poller][lro::Poller] to work with `create_entry_type`.
128        pub fn poller(
129            self,
130        ) -> impl lro::Poller<crate::model::EntryType, crate::model::OperationMetadata> {
131            type Operation =
132                lro::internal::Operation<crate::model::EntryType, crate::model::OperationMetadata>;
133            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
134            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
135
136            let stub = self.0.stub.clone();
137            let mut options = self.0.options.clone();
138            options.set_retry_policy(gax::retry_policy::NeverRetry);
139            let query = move |name| {
140                let stub = stub.clone();
141                let options = options.clone();
142                async {
143                    let op = GetOperation::new(stub)
144                        .set_name(name)
145                        .with_options(options)
146                        .send()
147                        .await?;
148                    Ok(Operation::new(op))
149                }
150            };
151
152            let start = move || async {
153                let op = self.send().await?;
154                Ok(Operation::new(op))
155            };
156
157            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
158        }
159
160        /// Sets the value of [parent][crate::model::CreateEntryTypeRequest::parent].
161        ///
162        /// This is a **required** field for requests.
163        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
164            self.0.request.parent = v.into();
165            self
166        }
167
168        /// Sets the value of [entry_type_id][crate::model::CreateEntryTypeRequest::entry_type_id].
169        ///
170        /// This is a **required** field for requests.
171        pub fn set_entry_type_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
172            self.0.request.entry_type_id = v.into();
173            self
174        }
175
176        /// Sets the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
177        ///
178        /// This is a **required** field for requests.
179        pub fn set_entry_type<T>(mut self, v: T) -> Self
180        where
181            T: std::convert::Into<crate::model::EntryType>,
182        {
183            self.0.request.entry_type = std::option::Option::Some(v.into());
184            self
185        }
186
187        /// Sets or clears the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
188        ///
189        /// This is a **required** field for requests.
190        pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
191        where
192            T: std::convert::Into<crate::model::EntryType>,
193        {
194            self.0.request.entry_type = v.map(|x| x.into());
195            self
196        }
197
198        /// Sets the value of [validate_only][crate::model::CreateEntryTypeRequest::validate_only].
199        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
200            self.0.request.validate_only = v.into();
201            self
202        }
203    }
204
205    #[doc(hidden)]
206    impl gax::options::internal::RequestBuilder for CreateEntryType {
207        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
208            &mut self.0.options
209        }
210    }
211
212    /// The request builder for [CatalogService::update_entry_type][crate::client::CatalogService::update_entry_type] calls.
213    ///
214    /// # Example
215    /// ```no_run
216    /// # use google_cloud_dataplex_v1::builder;
217    /// use builder::catalog_service::UpdateEntryType;
218    /// # tokio_test::block_on(async {
219    /// use lro::Poller;
220    ///
221    /// let builder = prepare_request_builder();
222    /// let response = builder.poller().until_done().await?;
223    /// # gax::Result::<()>::Ok(()) });
224    ///
225    /// fn prepare_request_builder() -> UpdateEntryType {
226    ///   # panic!();
227    ///   // ... details omitted ...
228    /// }
229    /// ```
230    #[derive(Clone, Debug)]
231    pub struct UpdateEntryType(RequestBuilder<crate::model::UpdateEntryTypeRequest>);
232
233    impl UpdateEntryType {
234        pub(crate) fn new(
235            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
236        ) -> Self {
237            Self(RequestBuilder::new(stub))
238        }
239
240        /// Sets the full request, replacing any prior values.
241        pub fn with_request<V: Into<crate::model::UpdateEntryTypeRequest>>(mut self, v: V) -> Self {
242            self.0.request = v.into();
243            self
244        }
245
246        /// Sets all the options, replacing any prior values.
247        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
248            self.0.options = v.into();
249            self
250        }
251
252        /// Sends the request.
253        ///
254        /// # Long running operations
255        ///
256        /// This starts, but does not poll, a longrunning operation. More information
257        /// on [update_entry_type][crate::client::CatalogService::update_entry_type].
258        pub async fn send(self) -> Result<longrunning::model::Operation> {
259            (*self.0.stub)
260                .update_entry_type(self.0.request, self.0.options)
261                .await
262                .map(gax::response::Response::into_body)
263        }
264
265        /// Creates a [Poller][lro::Poller] to work with `update_entry_type`.
266        pub fn poller(
267            self,
268        ) -> impl lro::Poller<crate::model::EntryType, crate::model::OperationMetadata> {
269            type Operation =
270                lro::internal::Operation<crate::model::EntryType, crate::model::OperationMetadata>;
271            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
272            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
273
274            let stub = self.0.stub.clone();
275            let mut options = self.0.options.clone();
276            options.set_retry_policy(gax::retry_policy::NeverRetry);
277            let query = move |name| {
278                let stub = stub.clone();
279                let options = options.clone();
280                async {
281                    let op = GetOperation::new(stub)
282                        .set_name(name)
283                        .with_options(options)
284                        .send()
285                        .await?;
286                    Ok(Operation::new(op))
287                }
288            };
289
290            let start = move || async {
291                let op = self.send().await?;
292                Ok(Operation::new(op))
293            };
294
295            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
296        }
297
298        /// Sets the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
299        ///
300        /// This is a **required** field for requests.
301        pub fn set_entry_type<T>(mut self, v: T) -> Self
302        where
303            T: std::convert::Into<crate::model::EntryType>,
304        {
305            self.0.request.entry_type = std::option::Option::Some(v.into());
306            self
307        }
308
309        /// Sets or clears the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
310        ///
311        /// This is a **required** field for requests.
312        pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
313        where
314            T: std::convert::Into<crate::model::EntryType>,
315        {
316            self.0.request.entry_type = v.map(|x| x.into());
317            self
318        }
319
320        /// Sets the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
321        ///
322        /// This is a **required** field for requests.
323        pub fn set_update_mask<T>(mut self, v: T) -> Self
324        where
325            T: std::convert::Into<wkt::FieldMask>,
326        {
327            self.0.request.update_mask = std::option::Option::Some(v.into());
328            self
329        }
330
331        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
332        ///
333        /// This is a **required** field for requests.
334        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
335        where
336            T: std::convert::Into<wkt::FieldMask>,
337        {
338            self.0.request.update_mask = v.map(|x| x.into());
339            self
340        }
341
342        /// Sets the value of [validate_only][crate::model::UpdateEntryTypeRequest::validate_only].
343        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
344            self.0.request.validate_only = v.into();
345            self
346        }
347    }
348
349    #[doc(hidden)]
350    impl gax::options::internal::RequestBuilder for UpdateEntryType {
351        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
352            &mut self.0.options
353        }
354    }
355
356    /// The request builder for [CatalogService::delete_entry_type][crate::client::CatalogService::delete_entry_type] calls.
357    ///
358    /// # Example
359    /// ```no_run
360    /// # use google_cloud_dataplex_v1::builder;
361    /// use builder::catalog_service::DeleteEntryType;
362    /// # tokio_test::block_on(async {
363    /// use lro::Poller;
364    ///
365    /// let builder = prepare_request_builder();
366    /// let response = builder.poller().until_done().await?;
367    /// # gax::Result::<()>::Ok(()) });
368    ///
369    /// fn prepare_request_builder() -> DeleteEntryType {
370    ///   # panic!();
371    ///   // ... details omitted ...
372    /// }
373    /// ```
374    #[derive(Clone, Debug)]
375    pub struct DeleteEntryType(RequestBuilder<crate::model::DeleteEntryTypeRequest>);
376
377    impl DeleteEntryType {
378        pub(crate) fn new(
379            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
380        ) -> Self {
381            Self(RequestBuilder::new(stub))
382        }
383
384        /// Sets the full request, replacing any prior values.
385        pub fn with_request<V: Into<crate::model::DeleteEntryTypeRequest>>(mut self, v: V) -> Self {
386            self.0.request = v.into();
387            self
388        }
389
390        /// Sets all the options, replacing any prior values.
391        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
392            self.0.options = v.into();
393            self
394        }
395
396        /// Sends the request.
397        ///
398        /// # Long running operations
399        ///
400        /// This starts, but does not poll, a longrunning operation. More information
401        /// on [delete_entry_type][crate::client::CatalogService::delete_entry_type].
402        pub async fn send(self) -> Result<longrunning::model::Operation> {
403            (*self.0.stub)
404                .delete_entry_type(self.0.request, self.0.options)
405                .await
406                .map(gax::response::Response::into_body)
407        }
408
409        /// Creates a [Poller][lro::Poller] to work with `delete_entry_type`.
410        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
411            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
412            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
413            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
414
415            let stub = self.0.stub.clone();
416            let mut options = self.0.options.clone();
417            options.set_retry_policy(gax::retry_policy::NeverRetry);
418            let query = move |name| {
419                let stub = stub.clone();
420                let options = options.clone();
421                async {
422                    let op = GetOperation::new(stub)
423                        .set_name(name)
424                        .with_options(options)
425                        .send()
426                        .await?;
427                    Ok(Operation::new(op))
428                }
429            };
430
431            let start = move || async {
432                let op = self.send().await?;
433                Ok(Operation::new(op))
434            };
435
436            lro::internal::new_unit_response_poller(
437                polling_error_policy,
438                polling_backoff_policy,
439                start,
440                query,
441            )
442        }
443
444        /// Sets the value of [name][crate::model::DeleteEntryTypeRequest::name].
445        ///
446        /// This is a **required** field for requests.
447        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
448            self.0.request.name = v.into();
449            self
450        }
451
452        /// Sets the value of [etag][crate::model::DeleteEntryTypeRequest::etag].
453        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
454            self.0.request.etag = v.into();
455            self
456        }
457    }
458
459    #[doc(hidden)]
460    impl gax::options::internal::RequestBuilder for DeleteEntryType {
461        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
462            &mut self.0.options
463        }
464    }
465
466    /// The request builder for [CatalogService::list_entry_types][crate::client::CatalogService::list_entry_types] calls.
467    ///
468    /// # Example
469    /// ```no_run
470    /// # use google_cloud_dataplex_v1::builder;
471    /// use builder::catalog_service::ListEntryTypes;
472    /// # tokio_test::block_on(async {
473    /// use gax::paginator::ItemPaginator;
474    ///
475    /// let builder = prepare_request_builder();
476    /// let mut items = builder.by_item();
477    /// while let Some(result) = items.next().await {
478    ///   let item = result?;
479    /// }
480    /// # gax::Result::<()>::Ok(()) });
481    ///
482    /// fn prepare_request_builder() -> ListEntryTypes {
483    ///   # panic!();
484    ///   // ... details omitted ...
485    /// }
486    /// ```
487    #[derive(Clone, Debug)]
488    pub struct ListEntryTypes(RequestBuilder<crate::model::ListEntryTypesRequest>);
489
490    impl ListEntryTypes {
491        pub(crate) fn new(
492            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
493        ) -> Self {
494            Self(RequestBuilder::new(stub))
495        }
496
497        /// Sets the full request, replacing any prior values.
498        pub fn with_request<V: Into<crate::model::ListEntryTypesRequest>>(mut self, v: V) -> Self {
499            self.0.request = v.into();
500            self
501        }
502
503        /// Sets all the options, replacing any prior values.
504        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
505            self.0.options = v.into();
506            self
507        }
508
509        /// Sends the request.
510        pub async fn send(self) -> Result<crate::model::ListEntryTypesResponse> {
511            (*self.0.stub)
512                .list_entry_types(self.0.request, self.0.options)
513                .await
514                .map(gax::response::Response::into_body)
515        }
516
517        /// Streams each page in the collection.
518        pub fn by_page(
519            self,
520        ) -> impl gax::paginator::Paginator<crate::model::ListEntryTypesResponse, gax::error::Error>
521        {
522            use std::clone::Clone;
523            let token = self.0.request.page_token.clone();
524            let execute = move |token: String| {
525                let mut builder = self.clone();
526                builder.0.request = builder.0.request.set_page_token(token);
527                builder.send()
528            };
529            gax::paginator::internal::new_paginator(token, execute)
530        }
531
532        /// Streams each item in the collection.
533        pub fn by_item(
534            self,
535        ) -> impl gax::paginator::ItemPaginator<crate::model::ListEntryTypesResponse, gax::error::Error>
536        {
537            use gax::paginator::Paginator;
538            self.by_page().items()
539        }
540
541        /// Sets the value of [parent][crate::model::ListEntryTypesRequest::parent].
542        ///
543        /// This is a **required** field for requests.
544        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
545            self.0.request.parent = v.into();
546            self
547        }
548
549        /// Sets the value of [page_size][crate::model::ListEntryTypesRequest::page_size].
550        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
551            self.0.request.page_size = v.into();
552            self
553        }
554
555        /// Sets the value of [page_token][crate::model::ListEntryTypesRequest::page_token].
556        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
557            self.0.request.page_token = v.into();
558            self
559        }
560
561        /// Sets the value of [filter][crate::model::ListEntryTypesRequest::filter].
562        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
563            self.0.request.filter = v.into();
564            self
565        }
566
567        /// Sets the value of [order_by][crate::model::ListEntryTypesRequest::order_by].
568        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
569            self.0.request.order_by = v.into();
570            self
571        }
572    }
573
574    #[doc(hidden)]
575    impl gax::options::internal::RequestBuilder for ListEntryTypes {
576        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
577            &mut self.0.options
578        }
579    }
580
581    /// The request builder for [CatalogService::get_entry_type][crate::client::CatalogService::get_entry_type] calls.
582    ///
583    /// # Example
584    /// ```no_run
585    /// # use google_cloud_dataplex_v1::builder;
586    /// use builder::catalog_service::GetEntryType;
587    /// # tokio_test::block_on(async {
588    ///
589    /// let builder = prepare_request_builder();
590    /// let response = builder.send().await?;
591    /// # gax::Result::<()>::Ok(()) });
592    ///
593    /// fn prepare_request_builder() -> GetEntryType {
594    ///   # panic!();
595    ///   // ... details omitted ...
596    /// }
597    /// ```
598    #[derive(Clone, Debug)]
599    pub struct GetEntryType(RequestBuilder<crate::model::GetEntryTypeRequest>);
600
601    impl GetEntryType {
602        pub(crate) fn new(
603            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
604        ) -> Self {
605            Self(RequestBuilder::new(stub))
606        }
607
608        /// Sets the full request, replacing any prior values.
609        pub fn with_request<V: Into<crate::model::GetEntryTypeRequest>>(mut self, v: V) -> Self {
610            self.0.request = v.into();
611            self
612        }
613
614        /// Sets all the options, replacing any prior values.
615        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
616            self.0.options = v.into();
617            self
618        }
619
620        /// Sends the request.
621        pub async fn send(self) -> Result<crate::model::EntryType> {
622            (*self.0.stub)
623                .get_entry_type(self.0.request, self.0.options)
624                .await
625                .map(gax::response::Response::into_body)
626        }
627
628        /// Sets the value of [name][crate::model::GetEntryTypeRequest::name].
629        ///
630        /// This is a **required** field for requests.
631        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
632            self.0.request.name = v.into();
633            self
634        }
635    }
636
637    #[doc(hidden)]
638    impl gax::options::internal::RequestBuilder for GetEntryType {
639        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
640            &mut self.0.options
641        }
642    }
643
644    /// The request builder for [CatalogService::create_aspect_type][crate::client::CatalogService::create_aspect_type] calls.
645    ///
646    /// # Example
647    /// ```no_run
648    /// # use google_cloud_dataplex_v1::builder;
649    /// use builder::catalog_service::CreateAspectType;
650    /// # tokio_test::block_on(async {
651    /// use lro::Poller;
652    ///
653    /// let builder = prepare_request_builder();
654    /// let response = builder.poller().until_done().await?;
655    /// # gax::Result::<()>::Ok(()) });
656    ///
657    /// fn prepare_request_builder() -> CreateAspectType {
658    ///   # panic!();
659    ///   // ... details omitted ...
660    /// }
661    /// ```
662    #[derive(Clone, Debug)]
663    pub struct CreateAspectType(RequestBuilder<crate::model::CreateAspectTypeRequest>);
664
665    impl CreateAspectType {
666        pub(crate) fn new(
667            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
668        ) -> Self {
669            Self(RequestBuilder::new(stub))
670        }
671
672        /// Sets the full request, replacing any prior values.
673        pub fn with_request<V: Into<crate::model::CreateAspectTypeRequest>>(
674            mut self,
675            v: V,
676        ) -> Self {
677            self.0.request = v.into();
678            self
679        }
680
681        /// Sets all the options, replacing any prior values.
682        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
683            self.0.options = v.into();
684            self
685        }
686
687        /// Sends the request.
688        ///
689        /// # Long running operations
690        ///
691        /// This starts, but does not poll, a longrunning operation. More information
692        /// on [create_aspect_type][crate::client::CatalogService::create_aspect_type].
693        pub async fn send(self) -> Result<longrunning::model::Operation> {
694            (*self.0.stub)
695                .create_aspect_type(self.0.request, self.0.options)
696                .await
697                .map(gax::response::Response::into_body)
698        }
699
700        /// Creates a [Poller][lro::Poller] to work with `create_aspect_type`.
701        pub fn poller(
702            self,
703        ) -> impl lro::Poller<crate::model::AspectType, crate::model::OperationMetadata> {
704            type Operation =
705                lro::internal::Operation<crate::model::AspectType, crate::model::OperationMetadata>;
706            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
707            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
708
709            let stub = self.0.stub.clone();
710            let mut options = self.0.options.clone();
711            options.set_retry_policy(gax::retry_policy::NeverRetry);
712            let query = move |name| {
713                let stub = stub.clone();
714                let options = options.clone();
715                async {
716                    let op = GetOperation::new(stub)
717                        .set_name(name)
718                        .with_options(options)
719                        .send()
720                        .await?;
721                    Ok(Operation::new(op))
722                }
723            };
724
725            let start = move || async {
726                let op = self.send().await?;
727                Ok(Operation::new(op))
728            };
729
730            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
731        }
732
733        /// Sets the value of [parent][crate::model::CreateAspectTypeRequest::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 [aspect_type_id][crate::model::CreateAspectTypeRequest::aspect_type_id].
742        ///
743        /// This is a **required** field for requests.
744        pub fn set_aspect_type_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
745            self.0.request.aspect_type_id = v.into();
746            self
747        }
748
749        /// Sets the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
750        ///
751        /// This is a **required** field for requests.
752        pub fn set_aspect_type<T>(mut self, v: T) -> Self
753        where
754            T: std::convert::Into<crate::model::AspectType>,
755        {
756            self.0.request.aspect_type = std::option::Option::Some(v.into());
757            self
758        }
759
760        /// Sets or clears the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
761        ///
762        /// This is a **required** field for requests.
763        pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
764        where
765            T: std::convert::Into<crate::model::AspectType>,
766        {
767            self.0.request.aspect_type = v.map(|x| x.into());
768            self
769        }
770
771        /// Sets the value of [validate_only][crate::model::CreateAspectTypeRequest::validate_only].
772        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
773            self.0.request.validate_only = v.into();
774            self
775        }
776    }
777
778    #[doc(hidden)]
779    impl gax::options::internal::RequestBuilder for CreateAspectType {
780        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
781            &mut self.0.options
782        }
783    }
784
785    /// The request builder for [CatalogService::update_aspect_type][crate::client::CatalogService::update_aspect_type] calls.
786    ///
787    /// # Example
788    /// ```no_run
789    /// # use google_cloud_dataplex_v1::builder;
790    /// use builder::catalog_service::UpdateAspectType;
791    /// # tokio_test::block_on(async {
792    /// use lro::Poller;
793    ///
794    /// let builder = prepare_request_builder();
795    /// let response = builder.poller().until_done().await?;
796    /// # gax::Result::<()>::Ok(()) });
797    ///
798    /// fn prepare_request_builder() -> UpdateAspectType {
799    ///   # panic!();
800    ///   // ... details omitted ...
801    /// }
802    /// ```
803    #[derive(Clone, Debug)]
804    pub struct UpdateAspectType(RequestBuilder<crate::model::UpdateAspectTypeRequest>);
805
806    impl UpdateAspectType {
807        pub(crate) fn new(
808            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
809        ) -> Self {
810            Self(RequestBuilder::new(stub))
811        }
812
813        /// Sets the full request, replacing any prior values.
814        pub fn with_request<V: Into<crate::model::UpdateAspectTypeRequest>>(
815            mut self,
816            v: V,
817        ) -> Self {
818            self.0.request = v.into();
819            self
820        }
821
822        /// Sets all the options, replacing any prior values.
823        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
824            self.0.options = v.into();
825            self
826        }
827
828        /// Sends the request.
829        ///
830        /// # Long running operations
831        ///
832        /// This starts, but does not poll, a longrunning operation. More information
833        /// on [update_aspect_type][crate::client::CatalogService::update_aspect_type].
834        pub async fn send(self) -> Result<longrunning::model::Operation> {
835            (*self.0.stub)
836                .update_aspect_type(self.0.request, self.0.options)
837                .await
838                .map(gax::response::Response::into_body)
839        }
840
841        /// Creates a [Poller][lro::Poller] to work with `update_aspect_type`.
842        pub fn poller(
843            self,
844        ) -> impl lro::Poller<crate::model::AspectType, crate::model::OperationMetadata> {
845            type Operation =
846                lro::internal::Operation<crate::model::AspectType, crate::model::OperationMetadata>;
847            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
848            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
849
850            let stub = self.0.stub.clone();
851            let mut options = self.0.options.clone();
852            options.set_retry_policy(gax::retry_policy::NeverRetry);
853            let query = move |name| {
854                let stub = stub.clone();
855                let options = options.clone();
856                async {
857                    let op = GetOperation::new(stub)
858                        .set_name(name)
859                        .with_options(options)
860                        .send()
861                        .await?;
862                    Ok(Operation::new(op))
863                }
864            };
865
866            let start = move || async {
867                let op = self.send().await?;
868                Ok(Operation::new(op))
869            };
870
871            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
872        }
873
874        /// Sets the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
875        ///
876        /// This is a **required** field for requests.
877        pub fn set_aspect_type<T>(mut self, v: T) -> Self
878        where
879            T: std::convert::Into<crate::model::AspectType>,
880        {
881            self.0.request.aspect_type = std::option::Option::Some(v.into());
882            self
883        }
884
885        /// Sets or clears the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
886        ///
887        /// This is a **required** field for requests.
888        pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
889        where
890            T: std::convert::Into<crate::model::AspectType>,
891        {
892            self.0.request.aspect_type = v.map(|x| x.into());
893            self
894        }
895
896        /// Sets the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
897        ///
898        /// This is a **required** field for requests.
899        pub fn set_update_mask<T>(mut self, v: T) -> Self
900        where
901            T: std::convert::Into<wkt::FieldMask>,
902        {
903            self.0.request.update_mask = std::option::Option::Some(v.into());
904            self
905        }
906
907        /// Sets or clears the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
908        ///
909        /// This is a **required** field for requests.
910        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
911        where
912            T: std::convert::Into<wkt::FieldMask>,
913        {
914            self.0.request.update_mask = v.map(|x| x.into());
915            self
916        }
917
918        /// Sets the value of [validate_only][crate::model::UpdateAspectTypeRequest::validate_only].
919        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
920            self.0.request.validate_only = v.into();
921            self
922        }
923    }
924
925    #[doc(hidden)]
926    impl gax::options::internal::RequestBuilder for UpdateAspectType {
927        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
928            &mut self.0.options
929        }
930    }
931
932    /// The request builder for [CatalogService::delete_aspect_type][crate::client::CatalogService::delete_aspect_type] calls.
933    ///
934    /// # Example
935    /// ```no_run
936    /// # use google_cloud_dataplex_v1::builder;
937    /// use builder::catalog_service::DeleteAspectType;
938    /// # tokio_test::block_on(async {
939    /// use lro::Poller;
940    ///
941    /// let builder = prepare_request_builder();
942    /// let response = builder.poller().until_done().await?;
943    /// # gax::Result::<()>::Ok(()) });
944    ///
945    /// fn prepare_request_builder() -> DeleteAspectType {
946    ///   # panic!();
947    ///   // ... details omitted ...
948    /// }
949    /// ```
950    #[derive(Clone, Debug)]
951    pub struct DeleteAspectType(RequestBuilder<crate::model::DeleteAspectTypeRequest>);
952
953    impl DeleteAspectType {
954        pub(crate) fn new(
955            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
956        ) -> Self {
957            Self(RequestBuilder::new(stub))
958        }
959
960        /// Sets the full request, replacing any prior values.
961        pub fn with_request<V: Into<crate::model::DeleteAspectTypeRequest>>(
962            mut self,
963            v: V,
964        ) -> Self {
965            self.0.request = v.into();
966            self
967        }
968
969        /// Sets all the options, replacing any prior values.
970        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
971            self.0.options = v.into();
972            self
973        }
974
975        /// Sends the request.
976        ///
977        /// # Long running operations
978        ///
979        /// This starts, but does not poll, a longrunning operation. More information
980        /// on [delete_aspect_type][crate::client::CatalogService::delete_aspect_type].
981        pub async fn send(self) -> Result<longrunning::model::Operation> {
982            (*self.0.stub)
983                .delete_aspect_type(self.0.request, self.0.options)
984                .await
985                .map(gax::response::Response::into_body)
986        }
987
988        /// Creates a [Poller][lro::Poller] to work with `delete_aspect_type`.
989        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
990            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
991            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
992            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
993
994            let stub = self.0.stub.clone();
995            let mut options = self.0.options.clone();
996            options.set_retry_policy(gax::retry_policy::NeverRetry);
997            let query = move |name| {
998                let stub = stub.clone();
999                let options = options.clone();
1000                async {
1001                    let op = GetOperation::new(stub)
1002                        .set_name(name)
1003                        .with_options(options)
1004                        .send()
1005                        .await?;
1006                    Ok(Operation::new(op))
1007                }
1008            };
1009
1010            let start = move || async {
1011                let op = self.send().await?;
1012                Ok(Operation::new(op))
1013            };
1014
1015            lro::internal::new_unit_response_poller(
1016                polling_error_policy,
1017                polling_backoff_policy,
1018                start,
1019                query,
1020            )
1021        }
1022
1023        /// Sets the value of [name][crate::model::DeleteAspectTypeRequest::name].
1024        ///
1025        /// This is a **required** field for requests.
1026        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1027            self.0.request.name = v.into();
1028            self
1029        }
1030
1031        /// Sets the value of [etag][crate::model::DeleteAspectTypeRequest::etag].
1032        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
1033            self.0.request.etag = v.into();
1034            self
1035        }
1036    }
1037
1038    #[doc(hidden)]
1039    impl gax::options::internal::RequestBuilder for DeleteAspectType {
1040        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1041            &mut self.0.options
1042        }
1043    }
1044
1045    /// The request builder for [CatalogService::list_aspect_types][crate::client::CatalogService::list_aspect_types] calls.
1046    ///
1047    /// # Example
1048    /// ```no_run
1049    /// # use google_cloud_dataplex_v1::builder;
1050    /// use builder::catalog_service::ListAspectTypes;
1051    /// # tokio_test::block_on(async {
1052    /// use gax::paginator::ItemPaginator;
1053    ///
1054    /// let builder = prepare_request_builder();
1055    /// let mut items = builder.by_item();
1056    /// while let Some(result) = items.next().await {
1057    ///   let item = result?;
1058    /// }
1059    /// # gax::Result::<()>::Ok(()) });
1060    ///
1061    /// fn prepare_request_builder() -> ListAspectTypes {
1062    ///   # panic!();
1063    ///   // ... details omitted ...
1064    /// }
1065    /// ```
1066    #[derive(Clone, Debug)]
1067    pub struct ListAspectTypes(RequestBuilder<crate::model::ListAspectTypesRequest>);
1068
1069    impl ListAspectTypes {
1070        pub(crate) fn new(
1071            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
1072        ) -> Self {
1073            Self(RequestBuilder::new(stub))
1074        }
1075
1076        /// Sets the full request, replacing any prior values.
1077        pub fn with_request<V: Into<crate::model::ListAspectTypesRequest>>(mut self, v: V) -> Self {
1078            self.0.request = v.into();
1079            self
1080        }
1081
1082        /// Sets all the options, replacing any prior values.
1083        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1084            self.0.options = v.into();
1085            self
1086        }
1087
1088        /// Sends the request.
1089        pub async fn send(self) -> Result<crate::model::ListAspectTypesResponse> {
1090            (*self.0.stub)
1091                .list_aspect_types(self.0.request, self.0.options)
1092                .await
1093                .map(gax::response::Response::into_body)
1094        }
1095
1096        /// Streams each page in the collection.
1097        pub fn by_page(
1098            self,
1099        ) -> impl gax::paginator::Paginator<crate::model::ListAspectTypesResponse, gax::error::Error>
1100        {
1101            use std::clone::Clone;
1102            let token = self.0.request.page_token.clone();
1103            let execute = move |token: String| {
1104                let mut builder = self.clone();
1105                builder.0.request = builder.0.request.set_page_token(token);
1106                builder.send()
1107            };
1108            gax::paginator::internal::new_paginator(token, execute)
1109        }
1110
1111        /// Streams each item in the collection.
1112        pub fn by_item(
1113            self,
1114        ) -> impl gax::paginator::ItemPaginator<crate::model::ListAspectTypesResponse, gax::error::Error>
1115        {
1116            use gax::paginator::Paginator;
1117            self.by_page().items()
1118        }
1119
1120        /// Sets the value of [parent][crate::model::ListAspectTypesRequest::parent].
1121        ///
1122        /// This is a **required** field for requests.
1123        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1124            self.0.request.parent = v.into();
1125            self
1126        }
1127
1128        /// Sets the value of [page_size][crate::model::ListAspectTypesRequest::page_size].
1129        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1130            self.0.request.page_size = v.into();
1131            self
1132        }
1133
1134        /// Sets the value of [page_token][crate::model::ListAspectTypesRequest::page_token].
1135        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1136            self.0.request.page_token = v.into();
1137            self
1138        }
1139
1140        /// Sets the value of [filter][crate::model::ListAspectTypesRequest::filter].
1141        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1142            self.0.request.filter = v.into();
1143            self
1144        }
1145
1146        /// Sets the value of [order_by][crate::model::ListAspectTypesRequest::order_by].
1147        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1148            self.0.request.order_by = v.into();
1149            self
1150        }
1151    }
1152
1153    #[doc(hidden)]
1154    impl gax::options::internal::RequestBuilder for ListAspectTypes {
1155        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1156            &mut self.0.options
1157        }
1158    }
1159
1160    /// The request builder for [CatalogService::get_aspect_type][crate::client::CatalogService::get_aspect_type] calls.
1161    ///
1162    /// # Example
1163    /// ```no_run
1164    /// # use google_cloud_dataplex_v1::builder;
1165    /// use builder::catalog_service::GetAspectType;
1166    /// # tokio_test::block_on(async {
1167    ///
1168    /// let builder = prepare_request_builder();
1169    /// let response = builder.send().await?;
1170    /// # gax::Result::<()>::Ok(()) });
1171    ///
1172    /// fn prepare_request_builder() -> GetAspectType {
1173    ///   # panic!();
1174    ///   // ... details omitted ...
1175    /// }
1176    /// ```
1177    #[derive(Clone, Debug)]
1178    pub struct GetAspectType(RequestBuilder<crate::model::GetAspectTypeRequest>);
1179
1180    impl GetAspectType {
1181        pub(crate) fn new(
1182            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
1183        ) -> Self {
1184            Self(RequestBuilder::new(stub))
1185        }
1186
1187        /// Sets the full request, replacing any prior values.
1188        pub fn with_request<V: Into<crate::model::GetAspectTypeRequest>>(mut self, v: V) -> Self {
1189            self.0.request = v.into();
1190            self
1191        }
1192
1193        /// Sets all the options, replacing any prior values.
1194        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1195            self.0.options = v.into();
1196            self
1197        }
1198
1199        /// Sends the request.
1200        pub async fn send(self) -> Result<crate::model::AspectType> {
1201            (*self.0.stub)
1202                .get_aspect_type(self.0.request, self.0.options)
1203                .await
1204                .map(gax::response::Response::into_body)
1205        }
1206
1207        /// Sets the value of [name][crate::model::GetAspectTypeRequest::name].
1208        ///
1209        /// This is a **required** field for requests.
1210        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1211            self.0.request.name = v.into();
1212            self
1213        }
1214    }
1215
1216    #[doc(hidden)]
1217    impl gax::options::internal::RequestBuilder for GetAspectType {
1218        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1219            &mut self.0.options
1220        }
1221    }
1222
1223    /// The request builder for [CatalogService::create_entry_group][crate::client::CatalogService::create_entry_group] calls.
1224    ///
1225    /// # Example
1226    /// ```no_run
1227    /// # use google_cloud_dataplex_v1::builder;
1228    /// use builder::catalog_service::CreateEntryGroup;
1229    /// # tokio_test::block_on(async {
1230    /// use lro::Poller;
1231    ///
1232    /// let builder = prepare_request_builder();
1233    /// let response = builder.poller().until_done().await?;
1234    /// # gax::Result::<()>::Ok(()) });
1235    ///
1236    /// fn prepare_request_builder() -> CreateEntryGroup {
1237    ///   # panic!();
1238    ///   // ... details omitted ...
1239    /// }
1240    /// ```
1241    #[derive(Clone, Debug)]
1242    pub struct CreateEntryGroup(RequestBuilder<crate::model::CreateEntryGroupRequest>);
1243
1244    impl CreateEntryGroup {
1245        pub(crate) fn new(
1246            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
1247        ) -> Self {
1248            Self(RequestBuilder::new(stub))
1249        }
1250
1251        /// Sets the full request, replacing any prior values.
1252        pub fn with_request<V: Into<crate::model::CreateEntryGroupRequest>>(
1253            mut self,
1254            v: V,
1255        ) -> Self {
1256            self.0.request = v.into();
1257            self
1258        }
1259
1260        /// Sets all the options, replacing any prior values.
1261        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1262            self.0.options = v.into();
1263            self
1264        }
1265
1266        /// Sends the request.
1267        ///
1268        /// # Long running operations
1269        ///
1270        /// This starts, but does not poll, a longrunning operation. More information
1271        /// on [create_entry_group][crate::client::CatalogService::create_entry_group].
1272        pub async fn send(self) -> Result<longrunning::model::Operation> {
1273            (*self.0.stub)
1274                .create_entry_group(self.0.request, self.0.options)
1275                .await
1276                .map(gax::response::Response::into_body)
1277        }
1278
1279        /// Creates a [Poller][lro::Poller] to work with `create_entry_group`.
1280        pub fn poller(
1281            self,
1282        ) -> impl lro::Poller<crate::model::EntryGroup, crate::model::OperationMetadata> {
1283            type Operation =
1284                lro::internal::Operation<crate::model::EntryGroup, crate::model::OperationMetadata>;
1285            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1286            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1287
1288            let stub = self.0.stub.clone();
1289            let mut options = self.0.options.clone();
1290            options.set_retry_policy(gax::retry_policy::NeverRetry);
1291            let query = move |name| {
1292                let stub = stub.clone();
1293                let options = options.clone();
1294                async {
1295                    let op = GetOperation::new(stub)
1296                        .set_name(name)
1297                        .with_options(options)
1298                        .send()
1299                        .await?;
1300                    Ok(Operation::new(op))
1301                }
1302            };
1303
1304            let start = move || async {
1305                let op = self.send().await?;
1306                Ok(Operation::new(op))
1307            };
1308
1309            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1310        }
1311
1312        /// Sets the value of [parent][crate::model::CreateEntryGroupRequest::parent].
1313        ///
1314        /// This is a **required** field for requests.
1315        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1316            self.0.request.parent = v.into();
1317            self
1318        }
1319
1320        /// Sets the value of [entry_group_id][crate::model::CreateEntryGroupRequest::entry_group_id].
1321        ///
1322        /// This is a **required** field for requests.
1323        pub fn set_entry_group_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1324            self.0.request.entry_group_id = v.into();
1325            self
1326        }
1327
1328        /// Sets the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
1329        ///
1330        /// This is a **required** field for requests.
1331        pub fn set_entry_group<T>(mut self, v: T) -> Self
1332        where
1333            T: std::convert::Into<crate::model::EntryGroup>,
1334        {
1335            self.0.request.entry_group = std::option::Option::Some(v.into());
1336            self
1337        }
1338
1339        /// Sets or clears the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
1340        ///
1341        /// This is a **required** field for requests.
1342        pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
1343        where
1344            T: std::convert::Into<crate::model::EntryGroup>,
1345        {
1346            self.0.request.entry_group = v.map(|x| x.into());
1347            self
1348        }
1349
1350        /// Sets the value of [validate_only][crate::model::CreateEntryGroupRequest::validate_only].
1351        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1352            self.0.request.validate_only = v.into();
1353            self
1354        }
1355    }
1356
1357    #[doc(hidden)]
1358    impl gax::options::internal::RequestBuilder for CreateEntryGroup {
1359        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1360            &mut self.0.options
1361        }
1362    }
1363
1364    /// The request builder for [CatalogService::update_entry_group][crate::client::CatalogService::update_entry_group] calls.
1365    ///
1366    /// # Example
1367    /// ```no_run
1368    /// # use google_cloud_dataplex_v1::builder;
1369    /// use builder::catalog_service::UpdateEntryGroup;
1370    /// # tokio_test::block_on(async {
1371    /// use lro::Poller;
1372    ///
1373    /// let builder = prepare_request_builder();
1374    /// let response = builder.poller().until_done().await?;
1375    /// # gax::Result::<()>::Ok(()) });
1376    ///
1377    /// fn prepare_request_builder() -> UpdateEntryGroup {
1378    ///   # panic!();
1379    ///   // ... details omitted ...
1380    /// }
1381    /// ```
1382    #[derive(Clone, Debug)]
1383    pub struct UpdateEntryGroup(RequestBuilder<crate::model::UpdateEntryGroupRequest>);
1384
1385    impl UpdateEntryGroup {
1386        pub(crate) fn new(
1387            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
1388        ) -> Self {
1389            Self(RequestBuilder::new(stub))
1390        }
1391
1392        /// Sets the full request, replacing any prior values.
1393        pub fn with_request<V: Into<crate::model::UpdateEntryGroupRequest>>(
1394            mut self,
1395            v: V,
1396        ) -> Self {
1397            self.0.request = v.into();
1398            self
1399        }
1400
1401        /// Sets all the options, replacing any prior values.
1402        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1403            self.0.options = v.into();
1404            self
1405        }
1406
1407        /// Sends the request.
1408        ///
1409        /// # Long running operations
1410        ///
1411        /// This starts, but does not poll, a longrunning operation. More information
1412        /// on [update_entry_group][crate::client::CatalogService::update_entry_group].
1413        pub async fn send(self) -> Result<longrunning::model::Operation> {
1414            (*self.0.stub)
1415                .update_entry_group(self.0.request, self.0.options)
1416                .await
1417                .map(gax::response::Response::into_body)
1418        }
1419
1420        /// Creates a [Poller][lro::Poller] to work with `update_entry_group`.
1421        pub fn poller(
1422            self,
1423        ) -> impl lro::Poller<crate::model::EntryGroup, crate::model::OperationMetadata> {
1424            type Operation =
1425                lro::internal::Operation<crate::model::EntryGroup, crate::model::OperationMetadata>;
1426            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1427            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1428
1429            let stub = self.0.stub.clone();
1430            let mut options = self.0.options.clone();
1431            options.set_retry_policy(gax::retry_policy::NeverRetry);
1432            let query = move |name| {
1433                let stub = stub.clone();
1434                let options = options.clone();
1435                async {
1436                    let op = GetOperation::new(stub)
1437                        .set_name(name)
1438                        .with_options(options)
1439                        .send()
1440                        .await?;
1441                    Ok(Operation::new(op))
1442                }
1443            };
1444
1445            let start = move || async {
1446                let op = self.send().await?;
1447                Ok(Operation::new(op))
1448            };
1449
1450            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1451        }
1452
1453        /// Sets the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
1454        ///
1455        /// This is a **required** field for requests.
1456        pub fn set_entry_group<T>(mut self, v: T) -> Self
1457        where
1458            T: std::convert::Into<crate::model::EntryGroup>,
1459        {
1460            self.0.request.entry_group = std::option::Option::Some(v.into());
1461            self
1462        }
1463
1464        /// Sets or clears the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
1465        ///
1466        /// This is a **required** field for requests.
1467        pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
1468        where
1469            T: std::convert::Into<crate::model::EntryGroup>,
1470        {
1471            self.0.request.entry_group = v.map(|x| x.into());
1472            self
1473        }
1474
1475        /// Sets the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
1476        ///
1477        /// This is a **required** field for requests.
1478        pub fn set_update_mask<T>(mut self, v: T) -> Self
1479        where
1480            T: std::convert::Into<wkt::FieldMask>,
1481        {
1482            self.0.request.update_mask = std::option::Option::Some(v.into());
1483            self
1484        }
1485
1486        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
1487        ///
1488        /// This is a **required** field for requests.
1489        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1490        where
1491            T: std::convert::Into<wkt::FieldMask>,
1492        {
1493            self.0.request.update_mask = v.map(|x| x.into());
1494            self
1495        }
1496
1497        /// Sets the value of [validate_only][crate::model::UpdateEntryGroupRequest::validate_only].
1498        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1499            self.0.request.validate_only = v.into();
1500            self
1501        }
1502    }
1503
1504    #[doc(hidden)]
1505    impl gax::options::internal::RequestBuilder for UpdateEntryGroup {
1506        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1507            &mut self.0.options
1508        }
1509    }
1510
1511    /// The request builder for [CatalogService::delete_entry_group][crate::client::CatalogService::delete_entry_group] calls.
1512    ///
1513    /// # Example
1514    /// ```no_run
1515    /// # use google_cloud_dataplex_v1::builder;
1516    /// use builder::catalog_service::DeleteEntryGroup;
1517    /// # tokio_test::block_on(async {
1518    /// use lro::Poller;
1519    ///
1520    /// let builder = prepare_request_builder();
1521    /// let response = builder.poller().until_done().await?;
1522    /// # gax::Result::<()>::Ok(()) });
1523    ///
1524    /// fn prepare_request_builder() -> DeleteEntryGroup {
1525    ///   # panic!();
1526    ///   // ... details omitted ...
1527    /// }
1528    /// ```
1529    #[derive(Clone, Debug)]
1530    pub struct DeleteEntryGroup(RequestBuilder<crate::model::DeleteEntryGroupRequest>);
1531
1532    impl DeleteEntryGroup {
1533        pub(crate) fn new(
1534            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
1535        ) -> Self {
1536            Self(RequestBuilder::new(stub))
1537        }
1538
1539        /// Sets the full request, replacing any prior values.
1540        pub fn with_request<V: Into<crate::model::DeleteEntryGroupRequest>>(
1541            mut self,
1542            v: V,
1543        ) -> Self {
1544            self.0.request = v.into();
1545            self
1546        }
1547
1548        /// Sets all the options, replacing any prior values.
1549        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1550            self.0.options = v.into();
1551            self
1552        }
1553
1554        /// Sends the request.
1555        ///
1556        /// # Long running operations
1557        ///
1558        /// This starts, but does not poll, a longrunning operation. More information
1559        /// on [delete_entry_group][crate::client::CatalogService::delete_entry_group].
1560        pub async fn send(self) -> Result<longrunning::model::Operation> {
1561            (*self.0.stub)
1562                .delete_entry_group(self.0.request, self.0.options)
1563                .await
1564                .map(gax::response::Response::into_body)
1565        }
1566
1567        /// Creates a [Poller][lro::Poller] to work with `delete_entry_group`.
1568        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
1569            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1570            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1571            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1572
1573            let stub = self.0.stub.clone();
1574            let mut options = self.0.options.clone();
1575            options.set_retry_policy(gax::retry_policy::NeverRetry);
1576            let query = move |name| {
1577                let stub = stub.clone();
1578                let options = options.clone();
1579                async {
1580                    let op = GetOperation::new(stub)
1581                        .set_name(name)
1582                        .with_options(options)
1583                        .send()
1584                        .await?;
1585                    Ok(Operation::new(op))
1586                }
1587            };
1588
1589            let start = move || async {
1590                let op = self.send().await?;
1591                Ok(Operation::new(op))
1592            };
1593
1594            lro::internal::new_unit_response_poller(
1595                polling_error_policy,
1596                polling_backoff_policy,
1597                start,
1598                query,
1599            )
1600        }
1601
1602        /// Sets the value of [name][crate::model::DeleteEntryGroupRequest::name].
1603        ///
1604        /// This is a **required** field for requests.
1605        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1606            self.0.request.name = v.into();
1607            self
1608        }
1609
1610        /// Sets the value of [etag][crate::model::DeleteEntryGroupRequest::etag].
1611        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
1612            self.0.request.etag = v.into();
1613            self
1614        }
1615    }
1616
1617    #[doc(hidden)]
1618    impl gax::options::internal::RequestBuilder for DeleteEntryGroup {
1619        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1620            &mut self.0.options
1621        }
1622    }
1623
1624    /// The request builder for [CatalogService::list_entry_groups][crate::client::CatalogService::list_entry_groups] calls.
1625    ///
1626    /// # Example
1627    /// ```no_run
1628    /// # use google_cloud_dataplex_v1::builder;
1629    /// use builder::catalog_service::ListEntryGroups;
1630    /// # tokio_test::block_on(async {
1631    /// use gax::paginator::ItemPaginator;
1632    ///
1633    /// let builder = prepare_request_builder();
1634    /// let mut items = builder.by_item();
1635    /// while let Some(result) = items.next().await {
1636    ///   let item = result?;
1637    /// }
1638    /// # gax::Result::<()>::Ok(()) });
1639    ///
1640    /// fn prepare_request_builder() -> ListEntryGroups {
1641    ///   # panic!();
1642    ///   // ... details omitted ...
1643    /// }
1644    /// ```
1645    #[derive(Clone, Debug)]
1646    pub struct ListEntryGroups(RequestBuilder<crate::model::ListEntryGroupsRequest>);
1647
1648    impl ListEntryGroups {
1649        pub(crate) fn new(
1650            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
1651        ) -> Self {
1652            Self(RequestBuilder::new(stub))
1653        }
1654
1655        /// Sets the full request, replacing any prior values.
1656        pub fn with_request<V: Into<crate::model::ListEntryGroupsRequest>>(mut self, v: V) -> Self {
1657            self.0.request = v.into();
1658            self
1659        }
1660
1661        /// Sets all the options, replacing any prior values.
1662        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1663            self.0.options = v.into();
1664            self
1665        }
1666
1667        /// Sends the request.
1668        pub async fn send(self) -> Result<crate::model::ListEntryGroupsResponse> {
1669            (*self.0.stub)
1670                .list_entry_groups(self.0.request, self.0.options)
1671                .await
1672                .map(gax::response::Response::into_body)
1673        }
1674
1675        /// Streams each page in the collection.
1676        pub fn by_page(
1677            self,
1678        ) -> impl gax::paginator::Paginator<crate::model::ListEntryGroupsResponse, gax::error::Error>
1679        {
1680            use std::clone::Clone;
1681            let token = self.0.request.page_token.clone();
1682            let execute = move |token: String| {
1683                let mut builder = self.clone();
1684                builder.0.request = builder.0.request.set_page_token(token);
1685                builder.send()
1686            };
1687            gax::paginator::internal::new_paginator(token, execute)
1688        }
1689
1690        /// Streams each item in the collection.
1691        pub fn by_item(
1692            self,
1693        ) -> impl gax::paginator::ItemPaginator<crate::model::ListEntryGroupsResponse, gax::error::Error>
1694        {
1695            use gax::paginator::Paginator;
1696            self.by_page().items()
1697        }
1698
1699        /// Sets the value of [parent][crate::model::ListEntryGroupsRequest::parent].
1700        ///
1701        /// This is a **required** field for requests.
1702        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1703            self.0.request.parent = v.into();
1704            self
1705        }
1706
1707        /// Sets the value of [page_size][crate::model::ListEntryGroupsRequest::page_size].
1708        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1709            self.0.request.page_size = v.into();
1710            self
1711        }
1712
1713        /// Sets the value of [page_token][crate::model::ListEntryGroupsRequest::page_token].
1714        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1715            self.0.request.page_token = v.into();
1716            self
1717        }
1718
1719        /// Sets the value of [filter][crate::model::ListEntryGroupsRequest::filter].
1720        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1721            self.0.request.filter = v.into();
1722            self
1723        }
1724
1725        /// Sets the value of [order_by][crate::model::ListEntryGroupsRequest::order_by].
1726        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1727            self.0.request.order_by = v.into();
1728            self
1729        }
1730    }
1731
1732    #[doc(hidden)]
1733    impl gax::options::internal::RequestBuilder for ListEntryGroups {
1734        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1735            &mut self.0.options
1736        }
1737    }
1738
1739    /// The request builder for [CatalogService::get_entry_group][crate::client::CatalogService::get_entry_group] calls.
1740    ///
1741    /// # Example
1742    /// ```no_run
1743    /// # use google_cloud_dataplex_v1::builder;
1744    /// use builder::catalog_service::GetEntryGroup;
1745    /// # tokio_test::block_on(async {
1746    ///
1747    /// let builder = prepare_request_builder();
1748    /// let response = builder.send().await?;
1749    /// # gax::Result::<()>::Ok(()) });
1750    ///
1751    /// fn prepare_request_builder() -> GetEntryGroup {
1752    ///   # panic!();
1753    ///   // ... details omitted ...
1754    /// }
1755    /// ```
1756    #[derive(Clone, Debug)]
1757    pub struct GetEntryGroup(RequestBuilder<crate::model::GetEntryGroupRequest>);
1758
1759    impl GetEntryGroup {
1760        pub(crate) fn new(
1761            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
1762        ) -> Self {
1763            Self(RequestBuilder::new(stub))
1764        }
1765
1766        /// Sets the full request, replacing any prior values.
1767        pub fn with_request<V: Into<crate::model::GetEntryGroupRequest>>(mut self, v: V) -> Self {
1768            self.0.request = v.into();
1769            self
1770        }
1771
1772        /// Sets all the options, replacing any prior values.
1773        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1774            self.0.options = v.into();
1775            self
1776        }
1777
1778        /// Sends the request.
1779        pub async fn send(self) -> Result<crate::model::EntryGroup> {
1780            (*self.0.stub)
1781                .get_entry_group(self.0.request, self.0.options)
1782                .await
1783                .map(gax::response::Response::into_body)
1784        }
1785
1786        /// Sets the value of [name][crate::model::GetEntryGroupRequest::name].
1787        ///
1788        /// This is a **required** field for requests.
1789        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1790            self.0.request.name = v.into();
1791            self
1792        }
1793    }
1794
1795    #[doc(hidden)]
1796    impl gax::options::internal::RequestBuilder for GetEntryGroup {
1797        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1798            &mut self.0.options
1799        }
1800    }
1801
1802    /// The request builder for [CatalogService::create_entry][crate::client::CatalogService::create_entry] calls.
1803    ///
1804    /// # Example
1805    /// ```no_run
1806    /// # use google_cloud_dataplex_v1::builder;
1807    /// use builder::catalog_service::CreateEntry;
1808    /// # tokio_test::block_on(async {
1809    ///
1810    /// let builder = prepare_request_builder();
1811    /// let response = builder.send().await?;
1812    /// # gax::Result::<()>::Ok(()) });
1813    ///
1814    /// fn prepare_request_builder() -> CreateEntry {
1815    ///   # panic!();
1816    ///   // ... details omitted ...
1817    /// }
1818    /// ```
1819    #[derive(Clone, Debug)]
1820    pub struct CreateEntry(RequestBuilder<crate::model::CreateEntryRequest>);
1821
1822    impl CreateEntry {
1823        pub(crate) fn new(
1824            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
1825        ) -> Self {
1826            Self(RequestBuilder::new(stub))
1827        }
1828
1829        /// Sets the full request, replacing any prior values.
1830        pub fn with_request<V: Into<crate::model::CreateEntryRequest>>(mut self, v: V) -> Self {
1831            self.0.request = v.into();
1832            self
1833        }
1834
1835        /// Sets all the options, replacing any prior values.
1836        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1837            self.0.options = v.into();
1838            self
1839        }
1840
1841        /// Sends the request.
1842        pub async fn send(self) -> Result<crate::model::Entry> {
1843            (*self.0.stub)
1844                .create_entry(self.0.request, self.0.options)
1845                .await
1846                .map(gax::response::Response::into_body)
1847        }
1848
1849        /// Sets the value of [parent][crate::model::CreateEntryRequest::parent].
1850        ///
1851        /// This is a **required** field for requests.
1852        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1853            self.0.request.parent = v.into();
1854            self
1855        }
1856
1857        /// Sets the value of [entry_id][crate::model::CreateEntryRequest::entry_id].
1858        ///
1859        /// This is a **required** field for requests.
1860        pub fn set_entry_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1861            self.0.request.entry_id = v.into();
1862            self
1863        }
1864
1865        /// Sets the value of [entry][crate::model::CreateEntryRequest::entry].
1866        ///
1867        /// This is a **required** field for requests.
1868        pub fn set_entry<T>(mut self, v: T) -> Self
1869        where
1870            T: std::convert::Into<crate::model::Entry>,
1871        {
1872            self.0.request.entry = std::option::Option::Some(v.into());
1873            self
1874        }
1875
1876        /// Sets or clears the value of [entry][crate::model::CreateEntryRequest::entry].
1877        ///
1878        /// This is a **required** field for requests.
1879        pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
1880        where
1881            T: std::convert::Into<crate::model::Entry>,
1882        {
1883            self.0.request.entry = v.map(|x| x.into());
1884            self
1885        }
1886    }
1887
1888    #[doc(hidden)]
1889    impl gax::options::internal::RequestBuilder for CreateEntry {
1890        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1891            &mut self.0.options
1892        }
1893    }
1894
1895    /// The request builder for [CatalogService::update_entry][crate::client::CatalogService::update_entry] calls.
1896    ///
1897    /// # Example
1898    /// ```no_run
1899    /// # use google_cloud_dataplex_v1::builder;
1900    /// use builder::catalog_service::UpdateEntry;
1901    /// # tokio_test::block_on(async {
1902    ///
1903    /// let builder = prepare_request_builder();
1904    /// let response = builder.send().await?;
1905    /// # gax::Result::<()>::Ok(()) });
1906    ///
1907    /// fn prepare_request_builder() -> UpdateEntry {
1908    ///   # panic!();
1909    ///   // ... details omitted ...
1910    /// }
1911    /// ```
1912    #[derive(Clone, Debug)]
1913    pub struct UpdateEntry(RequestBuilder<crate::model::UpdateEntryRequest>);
1914
1915    impl UpdateEntry {
1916        pub(crate) fn new(
1917            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
1918        ) -> Self {
1919            Self(RequestBuilder::new(stub))
1920        }
1921
1922        /// Sets the full request, replacing any prior values.
1923        pub fn with_request<V: Into<crate::model::UpdateEntryRequest>>(mut self, v: V) -> Self {
1924            self.0.request = v.into();
1925            self
1926        }
1927
1928        /// Sets all the options, replacing any prior values.
1929        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1930            self.0.options = v.into();
1931            self
1932        }
1933
1934        /// Sends the request.
1935        pub async fn send(self) -> Result<crate::model::Entry> {
1936            (*self.0.stub)
1937                .update_entry(self.0.request, self.0.options)
1938                .await
1939                .map(gax::response::Response::into_body)
1940        }
1941
1942        /// Sets the value of [entry][crate::model::UpdateEntryRequest::entry].
1943        ///
1944        /// This is a **required** field for requests.
1945        pub fn set_entry<T>(mut self, v: T) -> Self
1946        where
1947            T: std::convert::Into<crate::model::Entry>,
1948        {
1949            self.0.request.entry = std::option::Option::Some(v.into());
1950            self
1951        }
1952
1953        /// Sets or clears the value of [entry][crate::model::UpdateEntryRequest::entry].
1954        ///
1955        /// This is a **required** field for requests.
1956        pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
1957        where
1958            T: std::convert::Into<crate::model::Entry>,
1959        {
1960            self.0.request.entry = v.map(|x| x.into());
1961            self
1962        }
1963
1964        /// Sets the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
1965        pub fn set_update_mask<T>(mut self, v: T) -> Self
1966        where
1967            T: std::convert::Into<wkt::FieldMask>,
1968        {
1969            self.0.request.update_mask = std::option::Option::Some(v.into());
1970            self
1971        }
1972
1973        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
1974        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1975        where
1976            T: std::convert::Into<wkt::FieldMask>,
1977        {
1978            self.0.request.update_mask = v.map(|x| x.into());
1979            self
1980        }
1981
1982        /// Sets the value of [allow_missing][crate::model::UpdateEntryRequest::allow_missing].
1983        pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
1984            self.0.request.allow_missing = v.into();
1985            self
1986        }
1987
1988        /// Sets the value of [delete_missing_aspects][crate::model::UpdateEntryRequest::delete_missing_aspects].
1989        pub fn set_delete_missing_aspects<T: Into<bool>>(mut self, v: T) -> Self {
1990            self.0.request.delete_missing_aspects = v.into();
1991            self
1992        }
1993
1994        /// Sets the value of [aspect_keys][crate::model::UpdateEntryRequest::aspect_keys].
1995        pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
1996        where
1997            T: std::iter::IntoIterator<Item = V>,
1998            V: std::convert::Into<std::string::String>,
1999        {
2000            use std::iter::Iterator;
2001            self.0.request.aspect_keys = v.into_iter().map(|i| i.into()).collect();
2002            self
2003        }
2004    }
2005
2006    #[doc(hidden)]
2007    impl gax::options::internal::RequestBuilder for UpdateEntry {
2008        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2009            &mut self.0.options
2010        }
2011    }
2012
2013    /// The request builder for [CatalogService::delete_entry][crate::client::CatalogService::delete_entry] calls.
2014    ///
2015    /// # Example
2016    /// ```no_run
2017    /// # use google_cloud_dataplex_v1::builder;
2018    /// use builder::catalog_service::DeleteEntry;
2019    /// # tokio_test::block_on(async {
2020    ///
2021    /// let builder = prepare_request_builder();
2022    /// let response = builder.send().await?;
2023    /// # gax::Result::<()>::Ok(()) });
2024    ///
2025    /// fn prepare_request_builder() -> DeleteEntry {
2026    ///   # panic!();
2027    ///   // ... details omitted ...
2028    /// }
2029    /// ```
2030    #[derive(Clone, Debug)]
2031    pub struct DeleteEntry(RequestBuilder<crate::model::DeleteEntryRequest>);
2032
2033    impl DeleteEntry {
2034        pub(crate) fn new(
2035            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2036        ) -> Self {
2037            Self(RequestBuilder::new(stub))
2038        }
2039
2040        /// Sets the full request, replacing any prior values.
2041        pub fn with_request<V: Into<crate::model::DeleteEntryRequest>>(mut self, v: V) -> Self {
2042            self.0.request = v.into();
2043            self
2044        }
2045
2046        /// Sets all the options, replacing any prior values.
2047        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2048            self.0.options = v.into();
2049            self
2050        }
2051
2052        /// Sends the request.
2053        pub async fn send(self) -> Result<crate::model::Entry> {
2054            (*self.0.stub)
2055                .delete_entry(self.0.request, self.0.options)
2056                .await
2057                .map(gax::response::Response::into_body)
2058        }
2059
2060        /// Sets the value of [name][crate::model::DeleteEntryRequest::name].
2061        ///
2062        /// This is a **required** field for requests.
2063        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2064            self.0.request.name = v.into();
2065            self
2066        }
2067    }
2068
2069    #[doc(hidden)]
2070    impl gax::options::internal::RequestBuilder for DeleteEntry {
2071        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2072            &mut self.0.options
2073        }
2074    }
2075
2076    /// The request builder for [CatalogService::list_entries][crate::client::CatalogService::list_entries] calls.
2077    ///
2078    /// # Example
2079    /// ```no_run
2080    /// # use google_cloud_dataplex_v1::builder;
2081    /// use builder::catalog_service::ListEntries;
2082    /// # tokio_test::block_on(async {
2083    /// use gax::paginator::ItemPaginator;
2084    ///
2085    /// let builder = prepare_request_builder();
2086    /// let mut items = builder.by_item();
2087    /// while let Some(result) = items.next().await {
2088    ///   let item = result?;
2089    /// }
2090    /// # gax::Result::<()>::Ok(()) });
2091    ///
2092    /// fn prepare_request_builder() -> ListEntries {
2093    ///   # panic!();
2094    ///   // ... details omitted ...
2095    /// }
2096    /// ```
2097    #[derive(Clone, Debug)]
2098    pub struct ListEntries(RequestBuilder<crate::model::ListEntriesRequest>);
2099
2100    impl ListEntries {
2101        pub(crate) fn new(
2102            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2103        ) -> Self {
2104            Self(RequestBuilder::new(stub))
2105        }
2106
2107        /// Sets the full request, replacing any prior values.
2108        pub fn with_request<V: Into<crate::model::ListEntriesRequest>>(mut self, v: V) -> Self {
2109            self.0.request = v.into();
2110            self
2111        }
2112
2113        /// Sets all the options, replacing any prior values.
2114        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2115            self.0.options = v.into();
2116            self
2117        }
2118
2119        /// Sends the request.
2120        pub async fn send(self) -> Result<crate::model::ListEntriesResponse> {
2121            (*self.0.stub)
2122                .list_entries(self.0.request, self.0.options)
2123                .await
2124                .map(gax::response::Response::into_body)
2125        }
2126
2127        /// Streams each page in the collection.
2128        pub fn by_page(
2129            self,
2130        ) -> impl gax::paginator::Paginator<crate::model::ListEntriesResponse, gax::error::Error>
2131        {
2132            use std::clone::Clone;
2133            let token = self.0.request.page_token.clone();
2134            let execute = move |token: String| {
2135                let mut builder = self.clone();
2136                builder.0.request = builder.0.request.set_page_token(token);
2137                builder.send()
2138            };
2139            gax::paginator::internal::new_paginator(token, execute)
2140        }
2141
2142        /// Streams each item in the collection.
2143        pub fn by_item(
2144            self,
2145        ) -> impl gax::paginator::ItemPaginator<crate::model::ListEntriesResponse, gax::error::Error>
2146        {
2147            use gax::paginator::Paginator;
2148            self.by_page().items()
2149        }
2150
2151        /// Sets the value of [parent][crate::model::ListEntriesRequest::parent].
2152        ///
2153        /// This is a **required** field for requests.
2154        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2155            self.0.request.parent = v.into();
2156            self
2157        }
2158
2159        /// Sets the value of [page_size][crate::model::ListEntriesRequest::page_size].
2160        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2161            self.0.request.page_size = v.into();
2162            self
2163        }
2164
2165        /// Sets the value of [page_token][crate::model::ListEntriesRequest::page_token].
2166        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2167            self.0.request.page_token = v.into();
2168            self
2169        }
2170
2171        /// Sets the value of [filter][crate::model::ListEntriesRequest::filter].
2172        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2173            self.0.request.filter = v.into();
2174            self
2175        }
2176    }
2177
2178    #[doc(hidden)]
2179    impl gax::options::internal::RequestBuilder for ListEntries {
2180        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2181            &mut self.0.options
2182        }
2183    }
2184
2185    /// The request builder for [CatalogService::get_entry][crate::client::CatalogService::get_entry] calls.
2186    ///
2187    /// # Example
2188    /// ```no_run
2189    /// # use google_cloud_dataplex_v1::builder;
2190    /// use builder::catalog_service::GetEntry;
2191    /// # tokio_test::block_on(async {
2192    ///
2193    /// let builder = prepare_request_builder();
2194    /// let response = builder.send().await?;
2195    /// # gax::Result::<()>::Ok(()) });
2196    ///
2197    /// fn prepare_request_builder() -> GetEntry {
2198    ///   # panic!();
2199    ///   // ... details omitted ...
2200    /// }
2201    /// ```
2202    #[derive(Clone, Debug)]
2203    pub struct GetEntry(RequestBuilder<crate::model::GetEntryRequest>);
2204
2205    impl GetEntry {
2206        pub(crate) fn new(
2207            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2208        ) -> Self {
2209            Self(RequestBuilder::new(stub))
2210        }
2211
2212        /// Sets the full request, replacing any prior values.
2213        pub fn with_request<V: Into<crate::model::GetEntryRequest>>(mut self, v: V) -> Self {
2214            self.0.request = v.into();
2215            self
2216        }
2217
2218        /// Sets all the options, replacing any prior values.
2219        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2220            self.0.options = v.into();
2221            self
2222        }
2223
2224        /// Sends the request.
2225        pub async fn send(self) -> Result<crate::model::Entry> {
2226            (*self.0.stub)
2227                .get_entry(self.0.request, self.0.options)
2228                .await
2229                .map(gax::response::Response::into_body)
2230        }
2231
2232        /// Sets the value of [name][crate::model::GetEntryRequest::name].
2233        ///
2234        /// This is a **required** field for requests.
2235        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2236            self.0.request.name = v.into();
2237            self
2238        }
2239
2240        /// Sets the value of [view][crate::model::GetEntryRequest::view].
2241        pub fn set_view<T: Into<crate::model::EntryView>>(mut self, v: T) -> Self {
2242            self.0.request.view = v.into();
2243            self
2244        }
2245
2246        /// Sets the value of [aspect_types][crate::model::GetEntryRequest::aspect_types].
2247        pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
2248        where
2249            T: std::iter::IntoIterator<Item = V>,
2250            V: std::convert::Into<std::string::String>,
2251        {
2252            use std::iter::Iterator;
2253            self.0.request.aspect_types = v.into_iter().map(|i| i.into()).collect();
2254            self
2255        }
2256
2257        /// Sets the value of [paths][crate::model::GetEntryRequest::paths].
2258        pub fn set_paths<T, V>(mut self, v: T) -> Self
2259        where
2260            T: std::iter::IntoIterator<Item = V>,
2261            V: std::convert::Into<std::string::String>,
2262        {
2263            use std::iter::Iterator;
2264            self.0.request.paths = v.into_iter().map(|i| i.into()).collect();
2265            self
2266        }
2267    }
2268
2269    #[doc(hidden)]
2270    impl gax::options::internal::RequestBuilder for GetEntry {
2271        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2272            &mut self.0.options
2273        }
2274    }
2275
2276    /// The request builder for [CatalogService::lookup_entry][crate::client::CatalogService::lookup_entry] calls.
2277    ///
2278    /// # Example
2279    /// ```no_run
2280    /// # use google_cloud_dataplex_v1::builder;
2281    /// use builder::catalog_service::LookupEntry;
2282    /// # tokio_test::block_on(async {
2283    ///
2284    /// let builder = prepare_request_builder();
2285    /// let response = builder.send().await?;
2286    /// # gax::Result::<()>::Ok(()) });
2287    ///
2288    /// fn prepare_request_builder() -> LookupEntry {
2289    ///   # panic!();
2290    ///   // ... details omitted ...
2291    /// }
2292    /// ```
2293    #[derive(Clone, Debug)]
2294    pub struct LookupEntry(RequestBuilder<crate::model::LookupEntryRequest>);
2295
2296    impl LookupEntry {
2297        pub(crate) fn new(
2298            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2299        ) -> Self {
2300            Self(RequestBuilder::new(stub))
2301        }
2302
2303        /// Sets the full request, replacing any prior values.
2304        pub fn with_request<V: Into<crate::model::LookupEntryRequest>>(mut self, v: V) -> Self {
2305            self.0.request = v.into();
2306            self
2307        }
2308
2309        /// Sets all the options, replacing any prior values.
2310        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2311            self.0.options = v.into();
2312            self
2313        }
2314
2315        /// Sends the request.
2316        pub async fn send(self) -> Result<crate::model::Entry> {
2317            (*self.0.stub)
2318                .lookup_entry(self.0.request, self.0.options)
2319                .await
2320                .map(gax::response::Response::into_body)
2321        }
2322
2323        /// Sets the value of [name][crate::model::LookupEntryRequest::name].
2324        ///
2325        /// This is a **required** field for requests.
2326        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2327            self.0.request.name = v.into();
2328            self
2329        }
2330
2331        /// Sets the value of [view][crate::model::LookupEntryRequest::view].
2332        pub fn set_view<T: Into<crate::model::EntryView>>(mut self, v: T) -> Self {
2333            self.0.request.view = v.into();
2334            self
2335        }
2336
2337        /// Sets the value of [aspect_types][crate::model::LookupEntryRequest::aspect_types].
2338        pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
2339        where
2340            T: std::iter::IntoIterator<Item = V>,
2341            V: std::convert::Into<std::string::String>,
2342        {
2343            use std::iter::Iterator;
2344            self.0.request.aspect_types = v.into_iter().map(|i| i.into()).collect();
2345            self
2346        }
2347
2348        /// Sets the value of [paths][crate::model::LookupEntryRequest::paths].
2349        pub fn set_paths<T, V>(mut self, v: T) -> Self
2350        where
2351            T: std::iter::IntoIterator<Item = V>,
2352            V: std::convert::Into<std::string::String>,
2353        {
2354            use std::iter::Iterator;
2355            self.0.request.paths = v.into_iter().map(|i| i.into()).collect();
2356            self
2357        }
2358
2359        /// Sets the value of [entry][crate::model::LookupEntryRequest::entry].
2360        ///
2361        /// This is a **required** field for requests.
2362        pub fn set_entry<T: Into<std::string::String>>(mut self, v: T) -> Self {
2363            self.0.request.entry = v.into();
2364            self
2365        }
2366    }
2367
2368    #[doc(hidden)]
2369    impl gax::options::internal::RequestBuilder for LookupEntry {
2370        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2371            &mut self.0.options
2372        }
2373    }
2374
2375    /// The request builder for [CatalogService::search_entries][crate::client::CatalogService::search_entries] calls.
2376    ///
2377    /// # Example
2378    /// ```no_run
2379    /// # use google_cloud_dataplex_v1::builder;
2380    /// use builder::catalog_service::SearchEntries;
2381    /// # tokio_test::block_on(async {
2382    /// use gax::paginator::ItemPaginator;
2383    ///
2384    /// let builder = prepare_request_builder();
2385    /// let mut items = builder.by_item();
2386    /// while let Some(result) = items.next().await {
2387    ///   let item = result?;
2388    /// }
2389    /// # gax::Result::<()>::Ok(()) });
2390    ///
2391    /// fn prepare_request_builder() -> SearchEntries {
2392    ///   # panic!();
2393    ///   // ... details omitted ...
2394    /// }
2395    /// ```
2396    #[derive(Clone, Debug)]
2397    pub struct SearchEntries(RequestBuilder<crate::model::SearchEntriesRequest>);
2398
2399    impl SearchEntries {
2400        pub(crate) fn new(
2401            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2402        ) -> Self {
2403            Self(RequestBuilder::new(stub))
2404        }
2405
2406        /// Sets the full request, replacing any prior values.
2407        pub fn with_request<V: Into<crate::model::SearchEntriesRequest>>(mut self, v: V) -> Self {
2408            self.0.request = v.into();
2409            self
2410        }
2411
2412        /// Sets all the options, replacing any prior values.
2413        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2414            self.0.options = v.into();
2415            self
2416        }
2417
2418        /// Sends the request.
2419        pub async fn send(self) -> Result<crate::model::SearchEntriesResponse> {
2420            (*self.0.stub)
2421                .search_entries(self.0.request, self.0.options)
2422                .await
2423                .map(gax::response::Response::into_body)
2424        }
2425
2426        /// Streams each page in the collection.
2427        pub fn by_page(
2428            self,
2429        ) -> impl gax::paginator::Paginator<crate::model::SearchEntriesResponse, gax::error::Error>
2430        {
2431            use std::clone::Clone;
2432            let token = self.0.request.page_token.clone();
2433            let execute = move |token: String| {
2434                let mut builder = self.clone();
2435                builder.0.request = builder.0.request.set_page_token(token);
2436                builder.send()
2437            };
2438            gax::paginator::internal::new_paginator(token, execute)
2439        }
2440
2441        /// Streams each item in the collection.
2442        pub fn by_item(
2443            self,
2444        ) -> impl gax::paginator::ItemPaginator<crate::model::SearchEntriesResponse, gax::error::Error>
2445        {
2446            use gax::paginator::Paginator;
2447            self.by_page().items()
2448        }
2449
2450        /// Sets the value of [name][crate::model::SearchEntriesRequest::name].
2451        ///
2452        /// This is a **required** field for requests.
2453        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2454            self.0.request.name = v.into();
2455            self
2456        }
2457
2458        /// Sets the value of [query][crate::model::SearchEntriesRequest::query].
2459        ///
2460        /// This is a **required** field for requests.
2461        pub fn set_query<T: Into<std::string::String>>(mut self, v: T) -> Self {
2462            self.0.request.query = v.into();
2463            self
2464        }
2465
2466        /// Sets the value of [page_size][crate::model::SearchEntriesRequest::page_size].
2467        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2468            self.0.request.page_size = v.into();
2469            self
2470        }
2471
2472        /// Sets the value of [page_token][crate::model::SearchEntriesRequest::page_token].
2473        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2474            self.0.request.page_token = v.into();
2475            self
2476        }
2477
2478        /// Sets the value of [order_by][crate::model::SearchEntriesRequest::order_by].
2479        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2480            self.0.request.order_by = v.into();
2481            self
2482        }
2483
2484        /// Sets the value of [scope][crate::model::SearchEntriesRequest::scope].
2485        pub fn set_scope<T: Into<std::string::String>>(mut self, v: T) -> Self {
2486            self.0.request.scope = v.into();
2487            self
2488        }
2489
2490        /// Sets the value of [semantic_search][crate::model::SearchEntriesRequest::semantic_search].
2491        pub fn set_semantic_search<T: Into<bool>>(mut self, v: T) -> Self {
2492            self.0.request.semantic_search = v.into();
2493            self
2494        }
2495    }
2496
2497    #[doc(hidden)]
2498    impl gax::options::internal::RequestBuilder for SearchEntries {
2499        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2500            &mut self.0.options
2501        }
2502    }
2503
2504    /// The request builder for [CatalogService::create_metadata_job][crate::client::CatalogService::create_metadata_job] calls.
2505    ///
2506    /// # Example
2507    /// ```no_run
2508    /// # use google_cloud_dataplex_v1::builder;
2509    /// use builder::catalog_service::CreateMetadataJob;
2510    /// # tokio_test::block_on(async {
2511    /// use lro::Poller;
2512    ///
2513    /// let builder = prepare_request_builder();
2514    /// let response = builder.poller().until_done().await?;
2515    /// # gax::Result::<()>::Ok(()) });
2516    ///
2517    /// fn prepare_request_builder() -> CreateMetadataJob {
2518    ///   # panic!();
2519    ///   // ... details omitted ...
2520    /// }
2521    /// ```
2522    #[derive(Clone, Debug)]
2523    pub struct CreateMetadataJob(RequestBuilder<crate::model::CreateMetadataJobRequest>);
2524
2525    impl CreateMetadataJob {
2526        pub(crate) fn new(
2527            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2528        ) -> Self {
2529            Self(RequestBuilder::new(stub))
2530        }
2531
2532        /// Sets the full request, replacing any prior values.
2533        pub fn with_request<V: Into<crate::model::CreateMetadataJobRequest>>(
2534            mut self,
2535            v: V,
2536        ) -> Self {
2537            self.0.request = v.into();
2538            self
2539        }
2540
2541        /// Sets all the options, replacing any prior values.
2542        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2543            self.0.options = v.into();
2544            self
2545        }
2546
2547        /// Sends the request.
2548        ///
2549        /// # Long running operations
2550        ///
2551        /// This starts, but does not poll, a longrunning operation. More information
2552        /// on [create_metadata_job][crate::client::CatalogService::create_metadata_job].
2553        pub async fn send(self) -> Result<longrunning::model::Operation> {
2554            (*self.0.stub)
2555                .create_metadata_job(self.0.request, self.0.options)
2556                .await
2557                .map(gax::response::Response::into_body)
2558        }
2559
2560        /// Creates a [Poller][lro::Poller] to work with `create_metadata_job`.
2561        pub fn poller(
2562            self,
2563        ) -> impl lro::Poller<crate::model::MetadataJob, crate::model::OperationMetadata> {
2564            type Operation = lro::internal::Operation<
2565                crate::model::MetadataJob,
2566                crate::model::OperationMetadata,
2567            >;
2568            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2569            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2570
2571            let stub = self.0.stub.clone();
2572            let mut options = self.0.options.clone();
2573            options.set_retry_policy(gax::retry_policy::NeverRetry);
2574            let query = move |name| {
2575                let stub = stub.clone();
2576                let options = options.clone();
2577                async {
2578                    let op = GetOperation::new(stub)
2579                        .set_name(name)
2580                        .with_options(options)
2581                        .send()
2582                        .await?;
2583                    Ok(Operation::new(op))
2584                }
2585            };
2586
2587            let start = move || async {
2588                let op = self.send().await?;
2589                Ok(Operation::new(op))
2590            };
2591
2592            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2593        }
2594
2595        /// Sets the value of [parent][crate::model::CreateMetadataJobRequest::parent].
2596        ///
2597        /// This is a **required** field for requests.
2598        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2599            self.0.request.parent = v.into();
2600            self
2601        }
2602
2603        /// Sets the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
2604        ///
2605        /// This is a **required** field for requests.
2606        pub fn set_metadata_job<T>(mut self, v: T) -> Self
2607        where
2608            T: std::convert::Into<crate::model::MetadataJob>,
2609        {
2610            self.0.request.metadata_job = std::option::Option::Some(v.into());
2611            self
2612        }
2613
2614        /// Sets or clears the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
2615        ///
2616        /// This is a **required** field for requests.
2617        pub fn set_or_clear_metadata_job<T>(mut self, v: std::option::Option<T>) -> Self
2618        where
2619            T: std::convert::Into<crate::model::MetadataJob>,
2620        {
2621            self.0.request.metadata_job = v.map(|x| x.into());
2622            self
2623        }
2624
2625        /// Sets the value of [metadata_job_id][crate::model::CreateMetadataJobRequest::metadata_job_id].
2626        pub fn set_metadata_job_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2627            self.0.request.metadata_job_id = v.into();
2628            self
2629        }
2630
2631        /// Sets the value of [validate_only][crate::model::CreateMetadataJobRequest::validate_only].
2632        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2633            self.0.request.validate_only = v.into();
2634            self
2635        }
2636    }
2637
2638    #[doc(hidden)]
2639    impl gax::options::internal::RequestBuilder for CreateMetadataJob {
2640        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2641            &mut self.0.options
2642        }
2643    }
2644
2645    /// The request builder for [CatalogService::get_metadata_job][crate::client::CatalogService::get_metadata_job] calls.
2646    ///
2647    /// # Example
2648    /// ```no_run
2649    /// # use google_cloud_dataplex_v1::builder;
2650    /// use builder::catalog_service::GetMetadataJob;
2651    /// # tokio_test::block_on(async {
2652    ///
2653    /// let builder = prepare_request_builder();
2654    /// let response = builder.send().await?;
2655    /// # gax::Result::<()>::Ok(()) });
2656    ///
2657    /// fn prepare_request_builder() -> GetMetadataJob {
2658    ///   # panic!();
2659    ///   // ... details omitted ...
2660    /// }
2661    /// ```
2662    #[derive(Clone, Debug)]
2663    pub struct GetMetadataJob(RequestBuilder<crate::model::GetMetadataJobRequest>);
2664
2665    impl GetMetadataJob {
2666        pub(crate) fn new(
2667            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2668        ) -> Self {
2669            Self(RequestBuilder::new(stub))
2670        }
2671
2672        /// Sets the full request, replacing any prior values.
2673        pub fn with_request<V: Into<crate::model::GetMetadataJobRequest>>(mut self, v: V) -> Self {
2674            self.0.request = v.into();
2675            self
2676        }
2677
2678        /// Sets all the options, replacing any prior values.
2679        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2680            self.0.options = v.into();
2681            self
2682        }
2683
2684        /// Sends the request.
2685        pub async fn send(self) -> Result<crate::model::MetadataJob> {
2686            (*self.0.stub)
2687                .get_metadata_job(self.0.request, self.0.options)
2688                .await
2689                .map(gax::response::Response::into_body)
2690        }
2691
2692        /// Sets the value of [name][crate::model::GetMetadataJobRequest::name].
2693        ///
2694        /// This is a **required** field for requests.
2695        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2696            self.0.request.name = v.into();
2697            self
2698        }
2699    }
2700
2701    #[doc(hidden)]
2702    impl gax::options::internal::RequestBuilder for GetMetadataJob {
2703        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2704            &mut self.0.options
2705        }
2706    }
2707
2708    /// The request builder for [CatalogService::list_metadata_jobs][crate::client::CatalogService::list_metadata_jobs] calls.
2709    ///
2710    /// # Example
2711    /// ```no_run
2712    /// # use google_cloud_dataplex_v1::builder;
2713    /// use builder::catalog_service::ListMetadataJobs;
2714    /// # tokio_test::block_on(async {
2715    /// use gax::paginator::ItemPaginator;
2716    ///
2717    /// let builder = prepare_request_builder();
2718    /// let mut items = builder.by_item();
2719    /// while let Some(result) = items.next().await {
2720    ///   let item = result?;
2721    /// }
2722    /// # gax::Result::<()>::Ok(()) });
2723    ///
2724    /// fn prepare_request_builder() -> ListMetadataJobs {
2725    ///   # panic!();
2726    ///   // ... details omitted ...
2727    /// }
2728    /// ```
2729    #[derive(Clone, Debug)]
2730    pub struct ListMetadataJobs(RequestBuilder<crate::model::ListMetadataJobsRequest>);
2731
2732    impl ListMetadataJobs {
2733        pub(crate) fn new(
2734            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2735        ) -> Self {
2736            Self(RequestBuilder::new(stub))
2737        }
2738
2739        /// Sets the full request, replacing any prior values.
2740        pub fn with_request<V: Into<crate::model::ListMetadataJobsRequest>>(
2741            mut self,
2742            v: V,
2743        ) -> Self {
2744            self.0.request = v.into();
2745            self
2746        }
2747
2748        /// Sets all the options, replacing any prior values.
2749        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2750            self.0.options = v.into();
2751            self
2752        }
2753
2754        /// Sends the request.
2755        pub async fn send(self) -> Result<crate::model::ListMetadataJobsResponse> {
2756            (*self.0.stub)
2757                .list_metadata_jobs(self.0.request, self.0.options)
2758                .await
2759                .map(gax::response::Response::into_body)
2760        }
2761
2762        /// Streams each page in the collection.
2763        pub fn by_page(
2764            self,
2765        ) -> impl gax::paginator::Paginator<crate::model::ListMetadataJobsResponse, gax::error::Error>
2766        {
2767            use std::clone::Clone;
2768            let token = self.0.request.page_token.clone();
2769            let execute = move |token: String| {
2770                let mut builder = self.clone();
2771                builder.0.request = builder.0.request.set_page_token(token);
2772                builder.send()
2773            };
2774            gax::paginator::internal::new_paginator(token, execute)
2775        }
2776
2777        /// Streams each item in the collection.
2778        pub fn by_item(
2779            self,
2780        ) -> impl gax::paginator::ItemPaginator<crate::model::ListMetadataJobsResponse, gax::error::Error>
2781        {
2782            use gax::paginator::Paginator;
2783            self.by_page().items()
2784        }
2785
2786        /// Sets the value of [parent][crate::model::ListMetadataJobsRequest::parent].
2787        ///
2788        /// This is a **required** field for requests.
2789        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2790            self.0.request.parent = v.into();
2791            self
2792        }
2793
2794        /// Sets the value of [page_size][crate::model::ListMetadataJobsRequest::page_size].
2795        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2796            self.0.request.page_size = v.into();
2797            self
2798        }
2799
2800        /// Sets the value of [page_token][crate::model::ListMetadataJobsRequest::page_token].
2801        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2802            self.0.request.page_token = v.into();
2803            self
2804        }
2805
2806        /// Sets the value of [filter][crate::model::ListMetadataJobsRequest::filter].
2807        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2808            self.0.request.filter = v.into();
2809            self
2810        }
2811
2812        /// Sets the value of [order_by][crate::model::ListMetadataJobsRequest::order_by].
2813        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2814            self.0.request.order_by = v.into();
2815            self
2816        }
2817    }
2818
2819    #[doc(hidden)]
2820    impl gax::options::internal::RequestBuilder for ListMetadataJobs {
2821        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2822            &mut self.0.options
2823        }
2824    }
2825
2826    /// The request builder for [CatalogService::cancel_metadata_job][crate::client::CatalogService::cancel_metadata_job] calls.
2827    ///
2828    /// # Example
2829    /// ```no_run
2830    /// # use google_cloud_dataplex_v1::builder;
2831    /// use builder::catalog_service::CancelMetadataJob;
2832    /// # tokio_test::block_on(async {
2833    ///
2834    /// let builder = prepare_request_builder();
2835    /// let response = builder.send().await?;
2836    /// # gax::Result::<()>::Ok(()) });
2837    ///
2838    /// fn prepare_request_builder() -> CancelMetadataJob {
2839    ///   # panic!();
2840    ///   // ... details omitted ...
2841    /// }
2842    /// ```
2843    #[derive(Clone, Debug)]
2844    pub struct CancelMetadataJob(RequestBuilder<crate::model::CancelMetadataJobRequest>);
2845
2846    impl CancelMetadataJob {
2847        pub(crate) fn new(
2848            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2849        ) -> Self {
2850            Self(RequestBuilder::new(stub))
2851        }
2852
2853        /// Sets the full request, replacing any prior values.
2854        pub fn with_request<V: Into<crate::model::CancelMetadataJobRequest>>(
2855            mut self,
2856            v: V,
2857        ) -> Self {
2858            self.0.request = v.into();
2859            self
2860        }
2861
2862        /// Sets all the options, replacing any prior values.
2863        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2864            self.0.options = v.into();
2865            self
2866        }
2867
2868        /// Sends the request.
2869        pub async fn send(self) -> Result<()> {
2870            (*self.0.stub)
2871                .cancel_metadata_job(self.0.request, self.0.options)
2872                .await
2873                .map(gax::response::Response::into_body)
2874        }
2875
2876        /// Sets the value of [name][crate::model::CancelMetadataJobRequest::name].
2877        ///
2878        /// This is a **required** field for requests.
2879        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2880            self.0.request.name = v.into();
2881            self
2882        }
2883    }
2884
2885    #[doc(hidden)]
2886    impl gax::options::internal::RequestBuilder for CancelMetadataJob {
2887        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2888            &mut self.0.options
2889        }
2890    }
2891
2892    /// The request builder for [CatalogService::list_locations][crate::client::CatalogService::list_locations] calls.
2893    ///
2894    /// # Example
2895    /// ```no_run
2896    /// # use google_cloud_dataplex_v1::builder;
2897    /// use builder::catalog_service::ListLocations;
2898    /// # tokio_test::block_on(async {
2899    /// use gax::paginator::ItemPaginator;
2900    ///
2901    /// let builder = prepare_request_builder();
2902    /// let mut items = builder.by_item();
2903    /// while let Some(result) = items.next().await {
2904    ///   let item = result?;
2905    /// }
2906    /// # gax::Result::<()>::Ok(()) });
2907    ///
2908    /// fn prepare_request_builder() -> ListLocations {
2909    ///   # panic!();
2910    ///   // ... details omitted ...
2911    /// }
2912    /// ```
2913    #[derive(Clone, Debug)]
2914    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
2915
2916    impl ListLocations {
2917        pub(crate) fn new(
2918            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2919        ) -> Self {
2920            Self(RequestBuilder::new(stub))
2921        }
2922
2923        /// Sets the full request, replacing any prior values.
2924        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
2925            mut self,
2926            v: V,
2927        ) -> Self {
2928            self.0.request = v.into();
2929            self
2930        }
2931
2932        /// Sets all the options, replacing any prior values.
2933        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2934            self.0.options = v.into();
2935            self
2936        }
2937
2938        /// Sends the request.
2939        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
2940            (*self.0.stub)
2941                .list_locations(self.0.request, self.0.options)
2942                .await
2943                .map(gax::response::Response::into_body)
2944        }
2945
2946        /// Streams each page in the collection.
2947        pub fn by_page(
2948            self,
2949        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
2950        {
2951            use std::clone::Clone;
2952            let token = self.0.request.page_token.clone();
2953            let execute = move |token: String| {
2954                let mut builder = self.clone();
2955                builder.0.request = builder.0.request.set_page_token(token);
2956                builder.send()
2957            };
2958            gax::paginator::internal::new_paginator(token, execute)
2959        }
2960
2961        /// Streams each item in the collection.
2962        pub fn by_item(
2963            self,
2964        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
2965        {
2966            use gax::paginator::Paginator;
2967            self.by_page().items()
2968        }
2969
2970        /// Sets the value of [name][location::model::ListLocationsRequest::name].
2971        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2972            self.0.request.name = v.into();
2973            self
2974        }
2975
2976        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
2977        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2978            self.0.request.filter = v.into();
2979            self
2980        }
2981
2982        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
2983        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2984            self.0.request.page_size = v.into();
2985            self
2986        }
2987
2988        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
2989        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2990            self.0.request.page_token = v.into();
2991            self
2992        }
2993    }
2994
2995    #[doc(hidden)]
2996    impl gax::options::internal::RequestBuilder for ListLocations {
2997        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2998            &mut self.0.options
2999        }
3000    }
3001
3002    /// The request builder for [CatalogService::get_location][crate::client::CatalogService::get_location] calls.
3003    ///
3004    /// # Example
3005    /// ```no_run
3006    /// # use google_cloud_dataplex_v1::builder;
3007    /// use builder::catalog_service::GetLocation;
3008    /// # tokio_test::block_on(async {
3009    ///
3010    /// let builder = prepare_request_builder();
3011    /// let response = builder.send().await?;
3012    /// # gax::Result::<()>::Ok(()) });
3013    ///
3014    /// fn prepare_request_builder() -> GetLocation {
3015    ///   # panic!();
3016    ///   // ... details omitted ...
3017    /// }
3018    /// ```
3019    #[derive(Clone, Debug)]
3020    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
3021
3022    impl GetLocation {
3023        pub(crate) fn new(
3024            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3025        ) -> Self {
3026            Self(RequestBuilder::new(stub))
3027        }
3028
3029        /// Sets the full request, replacing any prior values.
3030        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
3031            self.0.request = v.into();
3032            self
3033        }
3034
3035        /// Sets all the options, replacing any prior values.
3036        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3037            self.0.options = v.into();
3038            self
3039        }
3040
3041        /// Sends the request.
3042        pub async fn send(self) -> Result<location::model::Location> {
3043            (*self.0.stub)
3044                .get_location(self.0.request, self.0.options)
3045                .await
3046                .map(gax::response::Response::into_body)
3047        }
3048
3049        /// Sets the value of [name][location::model::GetLocationRequest::name].
3050        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3051            self.0.request.name = v.into();
3052            self
3053        }
3054    }
3055
3056    #[doc(hidden)]
3057    impl gax::options::internal::RequestBuilder for GetLocation {
3058        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3059            &mut self.0.options
3060        }
3061    }
3062
3063    /// The request builder for [CatalogService::set_iam_policy][crate::client::CatalogService::set_iam_policy] calls.
3064    ///
3065    /// # Example
3066    /// ```no_run
3067    /// # use google_cloud_dataplex_v1::builder;
3068    /// use builder::catalog_service::SetIamPolicy;
3069    /// # tokio_test::block_on(async {
3070    ///
3071    /// let builder = prepare_request_builder();
3072    /// let response = builder.send().await?;
3073    /// # gax::Result::<()>::Ok(()) });
3074    ///
3075    /// fn prepare_request_builder() -> SetIamPolicy {
3076    ///   # panic!();
3077    ///   // ... details omitted ...
3078    /// }
3079    /// ```
3080    #[derive(Clone, Debug)]
3081    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
3082
3083    impl SetIamPolicy {
3084        pub(crate) fn new(
3085            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3086        ) -> Self {
3087            Self(RequestBuilder::new(stub))
3088        }
3089
3090        /// Sets the full request, replacing any prior values.
3091        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
3092            self.0.request = v.into();
3093            self
3094        }
3095
3096        /// Sets all the options, replacing any prior values.
3097        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3098            self.0.options = v.into();
3099            self
3100        }
3101
3102        /// Sends the request.
3103        pub async fn send(self) -> Result<iam_v1::model::Policy> {
3104            (*self.0.stub)
3105                .set_iam_policy(self.0.request, self.0.options)
3106                .await
3107                .map(gax::response::Response::into_body)
3108        }
3109
3110        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
3111        ///
3112        /// This is a **required** field for requests.
3113        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
3114            self.0.request.resource = v.into();
3115            self
3116        }
3117
3118        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
3119        ///
3120        /// This is a **required** field for requests.
3121        pub fn set_policy<T>(mut self, v: T) -> Self
3122        where
3123            T: std::convert::Into<iam_v1::model::Policy>,
3124        {
3125            self.0.request.policy = std::option::Option::Some(v.into());
3126            self
3127        }
3128
3129        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
3130        ///
3131        /// This is a **required** field for requests.
3132        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
3133        where
3134            T: std::convert::Into<iam_v1::model::Policy>,
3135        {
3136            self.0.request.policy = v.map(|x| x.into());
3137            self
3138        }
3139
3140        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
3141        pub fn set_update_mask<T>(mut self, v: T) -> Self
3142        where
3143            T: std::convert::Into<wkt::FieldMask>,
3144        {
3145            self.0.request.update_mask = std::option::Option::Some(v.into());
3146            self
3147        }
3148
3149        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
3150        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3151        where
3152            T: std::convert::Into<wkt::FieldMask>,
3153        {
3154            self.0.request.update_mask = v.map(|x| x.into());
3155            self
3156        }
3157    }
3158
3159    #[doc(hidden)]
3160    impl gax::options::internal::RequestBuilder for SetIamPolicy {
3161        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3162            &mut self.0.options
3163        }
3164    }
3165
3166    /// The request builder for [CatalogService::get_iam_policy][crate::client::CatalogService::get_iam_policy] calls.
3167    ///
3168    /// # Example
3169    /// ```no_run
3170    /// # use google_cloud_dataplex_v1::builder;
3171    /// use builder::catalog_service::GetIamPolicy;
3172    /// # tokio_test::block_on(async {
3173    ///
3174    /// let builder = prepare_request_builder();
3175    /// let response = builder.send().await?;
3176    /// # gax::Result::<()>::Ok(()) });
3177    ///
3178    /// fn prepare_request_builder() -> GetIamPolicy {
3179    ///   # panic!();
3180    ///   // ... details omitted ...
3181    /// }
3182    /// ```
3183    #[derive(Clone, Debug)]
3184    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
3185
3186    impl GetIamPolicy {
3187        pub(crate) fn new(
3188            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3189        ) -> Self {
3190            Self(RequestBuilder::new(stub))
3191        }
3192
3193        /// Sets the full request, replacing any prior values.
3194        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
3195            self.0.request = v.into();
3196            self
3197        }
3198
3199        /// Sets all the options, replacing any prior values.
3200        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3201            self.0.options = v.into();
3202            self
3203        }
3204
3205        /// Sends the request.
3206        pub async fn send(self) -> Result<iam_v1::model::Policy> {
3207            (*self.0.stub)
3208                .get_iam_policy(self.0.request, self.0.options)
3209                .await
3210                .map(gax::response::Response::into_body)
3211        }
3212
3213        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
3214        ///
3215        /// This is a **required** field for requests.
3216        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
3217            self.0.request.resource = v.into();
3218            self
3219        }
3220
3221        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
3222        pub fn set_options<T>(mut self, v: T) -> Self
3223        where
3224            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
3225        {
3226            self.0.request.options = std::option::Option::Some(v.into());
3227            self
3228        }
3229
3230        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
3231        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
3232        where
3233            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
3234        {
3235            self.0.request.options = v.map(|x| x.into());
3236            self
3237        }
3238    }
3239
3240    #[doc(hidden)]
3241    impl gax::options::internal::RequestBuilder for GetIamPolicy {
3242        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3243            &mut self.0.options
3244        }
3245    }
3246
3247    /// The request builder for [CatalogService::test_iam_permissions][crate::client::CatalogService::test_iam_permissions] calls.
3248    ///
3249    /// # Example
3250    /// ```no_run
3251    /// # use google_cloud_dataplex_v1::builder;
3252    /// use builder::catalog_service::TestIamPermissions;
3253    /// # tokio_test::block_on(async {
3254    ///
3255    /// let builder = prepare_request_builder();
3256    /// let response = builder.send().await?;
3257    /// # gax::Result::<()>::Ok(()) });
3258    ///
3259    /// fn prepare_request_builder() -> TestIamPermissions {
3260    ///   # panic!();
3261    ///   // ... details omitted ...
3262    /// }
3263    /// ```
3264    #[derive(Clone, Debug)]
3265    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
3266
3267    impl TestIamPermissions {
3268        pub(crate) fn new(
3269            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3270        ) -> Self {
3271            Self(RequestBuilder::new(stub))
3272        }
3273
3274        /// Sets the full request, replacing any prior values.
3275        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
3276            mut self,
3277            v: V,
3278        ) -> Self {
3279            self.0.request = v.into();
3280            self
3281        }
3282
3283        /// Sets all the options, replacing any prior values.
3284        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3285            self.0.options = v.into();
3286            self
3287        }
3288
3289        /// Sends the request.
3290        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
3291            (*self.0.stub)
3292                .test_iam_permissions(self.0.request, self.0.options)
3293                .await
3294                .map(gax::response::Response::into_body)
3295        }
3296
3297        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
3298        ///
3299        /// This is a **required** field for requests.
3300        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
3301            self.0.request.resource = v.into();
3302            self
3303        }
3304
3305        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
3306        ///
3307        /// This is a **required** field for requests.
3308        pub fn set_permissions<T, V>(mut self, v: T) -> Self
3309        where
3310            T: std::iter::IntoIterator<Item = V>,
3311            V: std::convert::Into<std::string::String>,
3312        {
3313            use std::iter::Iterator;
3314            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
3315            self
3316        }
3317    }
3318
3319    #[doc(hidden)]
3320    impl gax::options::internal::RequestBuilder for TestIamPermissions {
3321        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3322            &mut self.0.options
3323        }
3324    }
3325
3326    /// The request builder for [CatalogService::list_operations][crate::client::CatalogService::list_operations] calls.
3327    ///
3328    /// # Example
3329    /// ```no_run
3330    /// # use google_cloud_dataplex_v1::builder;
3331    /// use builder::catalog_service::ListOperations;
3332    /// # tokio_test::block_on(async {
3333    /// use gax::paginator::ItemPaginator;
3334    ///
3335    /// let builder = prepare_request_builder();
3336    /// let mut items = builder.by_item();
3337    /// while let Some(result) = items.next().await {
3338    ///   let item = result?;
3339    /// }
3340    /// # gax::Result::<()>::Ok(()) });
3341    ///
3342    /// fn prepare_request_builder() -> ListOperations {
3343    ///   # panic!();
3344    ///   // ... details omitted ...
3345    /// }
3346    /// ```
3347    #[derive(Clone, Debug)]
3348    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
3349
3350    impl ListOperations {
3351        pub(crate) fn new(
3352            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3353        ) -> Self {
3354            Self(RequestBuilder::new(stub))
3355        }
3356
3357        /// Sets the full request, replacing any prior values.
3358        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
3359            mut self,
3360            v: V,
3361        ) -> Self {
3362            self.0.request = v.into();
3363            self
3364        }
3365
3366        /// Sets all the options, replacing any prior values.
3367        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3368            self.0.options = v.into();
3369            self
3370        }
3371
3372        /// Sends the request.
3373        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
3374            (*self.0.stub)
3375                .list_operations(self.0.request, self.0.options)
3376                .await
3377                .map(gax::response::Response::into_body)
3378        }
3379
3380        /// Streams each page in the collection.
3381        pub fn by_page(
3382            self,
3383        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
3384        {
3385            use std::clone::Clone;
3386            let token = self.0.request.page_token.clone();
3387            let execute = move |token: String| {
3388                let mut builder = self.clone();
3389                builder.0.request = builder.0.request.set_page_token(token);
3390                builder.send()
3391            };
3392            gax::paginator::internal::new_paginator(token, execute)
3393        }
3394
3395        /// Streams each item in the collection.
3396        pub fn by_item(
3397            self,
3398        ) -> impl gax::paginator::ItemPaginator<
3399            longrunning::model::ListOperationsResponse,
3400            gax::error::Error,
3401        > {
3402            use gax::paginator::Paginator;
3403            self.by_page().items()
3404        }
3405
3406        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
3407        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3408            self.0.request.name = v.into();
3409            self
3410        }
3411
3412        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
3413        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3414            self.0.request.filter = v.into();
3415            self
3416        }
3417
3418        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
3419        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3420            self.0.request.page_size = v.into();
3421            self
3422        }
3423
3424        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
3425        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3426            self.0.request.page_token = v.into();
3427            self
3428        }
3429    }
3430
3431    #[doc(hidden)]
3432    impl gax::options::internal::RequestBuilder for ListOperations {
3433        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3434            &mut self.0.options
3435        }
3436    }
3437
3438    /// The request builder for [CatalogService::get_operation][crate::client::CatalogService::get_operation] calls.
3439    ///
3440    /// # Example
3441    /// ```no_run
3442    /// # use google_cloud_dataplex_v1::builder;
3443    /// use builder::catalog_service::GetOperation;
3444    /// # tokio_test::block_on(async {
3445    ///
3446    /// let builder = prepare_request_builder();
3447    /// let response = builder.send().await?;
3448    /// # gax::Result::<()>::Ok(()) });
3449    ///
3450    /// fn prepare_request_builder() -> GetOperation {
3451    ///   # panic!();
3452    ///   // ... details omitted ...
3453    /// }
3454    /// ```
3455    #[derive(Clone, Debug)]
3456    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
3457
3458    impl GetOperation {
3459        pub(crate) fn new(
3460            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3461        ) -> Self {
3462            Self(RequestBuilder::new(stub))
3463        }
3464
3465        /// Sets the full request, replacing any prior values.
3466        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
3467            mut self,
3468            v: V,
3469        ) -> Self {
3470            self.0.request = v.into();
3471            self
3472        }
3473
3474        /// Sets all the options, replacing any prior values.
3475        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3476            self.0.options = v.into();
3477            self
3478        }
3479
3480        /// Sends the request.
3481        pub async fn send(self) -> Result<longrunning::model::Operation> {
3482            (*self.0.stub)
3483                .get_operation(self.0.request, self.0.options)
3484                .await
3485                .map(gax::response::Response::into_body)
3486        }
3487
3488        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
3489        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3490            self.0.request.name = v.into();
3491            self
3492        }
3493    }
3494
3495    #[doc(hidden)]
3496    impl gax::options::internal::RequestBuilder for GetOperation {
3497        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3498            &mut self.0.options
3499        }
3500    }
3501
3502    /// The request builder for [CatalogService::delete_operation][crate::client::CatalogService::delete_operation] calls.
3503    ///
3504    /// # Example
3505    /// ```no_run
3506    /// # use google_cloud_dataplex_v1::builder;
3507    /// use builder::catalog_service::DeleteOperation;
3508    /// # tokio_test::block_on(async {
3509    ///
3510    /// let builder = prepare_request_builder();
3511    /// let response = builder.send().await?;
3512    /// # gax::Result::<()>::Ok(()) });
3513    ///
3514    /// fn prepare_request_builder() -> DeleteOperation {
3515    ///   # panic!();
3516    ///   // ... details omitted ...
3517    /// }
3518    /// ```
3519    #[derive(Clone, Debug)]
3520    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
3521
3522    impl DeleteOperation {
3523        pub(crate) fn new(
3524            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3525        ) -> Self {
3526            Self(RequestBuilder::new(stub))
3527        }
3528
3529        /// Sets the full request, replacing any prior values.
3530        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
3531            mut self,
3532            v: V,
3533        ) -> Self {
3534            self.0.request = v.into();
3535            self
3536        }
3537
3538        /// Sets all the options, replacing any prior values.
3539        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3540            self.0.options = v.into();
3541            self
3542        }
3543
3544        /// Sends the request.
3545        pub async fn send(self) -> Result<()> {
3546            (*self.0.stub)
3547                .delete_operation(self.0.request, self.0.options)
3548                .await
3549                .map(gax::response::Response::into_body)
3550        }
3551
3552        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
3553        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3554            self.0.request.name = v.into();
3555            self
3556        }
3557    }
3558
3559    #[doc(hidden)]
3560    impl gax::options::internal::RequestBuilder for DeleteOperation {
3561        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3562            &mut self.0.options
3563        }
3564    }
3565
3566    /// The request builder for [CatalogService::cancel_operation][crate::client::CatalogService::cancel_operation] calls.
3567    ///
3568    /// # Example
3569    /// ```no_run
3570    /// # use google_cloud_dataplex_v1::builder;
3571    /// use builder::catalog_service::CancelOperation;
3572    /// # tokio_test::block_on(async {
3573    ///
3574    /// let builder = prepare_request_builder();
3575    /// let response = builder.send().await?;
3576    /// # gax::Result::<()>::Ok(()) });
3577    ///
3578    /// fn prepare_request_builder() -> CancelOperation {
3579    ///   # panic!();
3580    ///   // ... details omitted ...
3581    /// }
3582    /// ```
3583    #[derive(Clone, Debug)]
3584    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
3585
3586    impl CancelOperation {
3587        pub(crate) fn new(
3588            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3589        ) -> Self {
3590            Self(RequestBuilder::new(stub))
3591        }
3592
3593        /// Sets the full request, replacing any prior values.
3594        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
3595            mut self,
3596            v: V,
3597        ) -> Self {
3598            self.0.request = v.into();
3599            self
3600        }
3601
3602        /// Sets all the options, replacing any prior values.
3603        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3604            self.0.options = v.into();
3605            self
3606        }
3607
3608        /// Sends the request.
3609        pub async fn send(self) -> Result<()> {
3610            (*self.0.stub)
3611                .cancel_operation(self.0.request, self.0.options)
3612                .await
3613                .map(gax::response::Response::into_body)
3614        }
3615
3616        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
3617        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3618            self.0.request.name = v.into();
3619            self
3620        }
3621    }
3622
3623    #[doc(hidden)]
3624    impl gax::options::internal::RequestBuilder for CancelOperation {
3625        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3626            &mut self.0.options
3627        }
3628    }
3629}
3630
3631pub mod cmek_service {
3632    use crate::Result;
3633
3634    /// A builder for [CmekService][crate::client::CmekService].
3635    ///
3636    /// ```
3637    /// # tokio_test::block_on(async {
3638    /// # use google_cloud_dataplex_v1::*;
3639    /// # use builder::cmek_service::ClientBuilder;
3640    /// # use client::CmekService;
3641    /// let builder : ClientBuilder = CmekService::builder();
3642    /// let client = builder
3643    ///     .with_endpoint("https://dataplex.googleapis.com")
3644    ///     .build().await?;
3645    /// # gax::client_builder::Result::<()>::Ok(()) });
3646    /// ```
3647    pub type ClientBuilder =
3648        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
3649
3650    pub(crate) mod client {
3651        use super::super::super::client::CmekService;
3652        pub struct Factory;
3653        impl gax::client_builder::internal::ClientFactory for Factory {
3654            type Client = CmekService;
3655            type Credentials = gaxi::options::Credentials;
3656            async fn build(
3657                self,
3658                config: gaxi::options::ClientConfig,
3659            ) -> gax::client_builder::Result<Self::Client> {
3660                Self::Client::new(config).await
3661            }
3662        }
3663    }
3664
3665    /// Common implementation for [crate::client::CmekService] request builders.
3666    #[derive(Clone, Debug)]
3667    pub(crate) struct RequestBuilder<R: std::default::Default> {
3668        stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
3669        request: R,
3670        options: gax::options::RequestOptions,
3671    }
3672
3673    impl<R> RequestBuilder<R>
3674    where
3675        R: std::default::Default,
3676    {
3677        pub(crate) fn new(
3678            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
3679        ) -> Self {
3680            Self {
3681                stub,
3682                request: R::default(),
3683                options: gax::options::RequestOptions::default(),
3684            }
3685        }
3686    }
3687
3688    /// The request builder for [CmekService::create_encryption_config][crate::client::CmekService::create_encryption_config] calls.
3689    ///
3690    /// # Example
3691    /// ```no_run
3692    /// # use google_cloud_dataplex_v1::builder;
3693    /// use builder::cmek_service::CreateEncryptionConfig;
3694    /// # tokio_test::block_on(async {
3695    /// use lro::Poller;
3696    ///
3697    /// let builder = prepare_request_builder();
3698    /// let response = builder.poller().until_done().await?;
3699    /// # gax::Result::<()>::Ok(()) });
3700    ///
3701    /// fn prepare_request_builder() -> CreateEncryptionConfig {
3702    ///   # panic!();
3703    ///   // ... details omitted ...
3704    /// }
3705    /// ```
3706    #[derive(Clone, Debug)]
3707    pub struct CreateEncryptionConfig(RequestBuilder<crate::model::CreateEncryptionConfigRequest>);
3708
3709    impl CreateEncryptionConfig {
3710        pub(crate) fn new(
3711            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
3712        ) -> Self {
3713            Self(RequestBuilder::new(stub))
3714        }
3715
3716        /// Sets the full request, replacing any prior values.
3717        pub fn with_request<V: Into<crate::model::CreateEncryptionConfigRequest>>(
3718            mut self,
3719            v: V,
3720        ) -> Self {
3721            self.0.request = v.into();
3722            self
3723        }
3724
3725        /// Sets all the options, replacing any prior values.
3726        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3727            self.0.options = v.into();
3728            self
3729        }
3730
3731        /// Sends the request.
3732        ///
3733        /// # Long running operations
3734        ///
3735        /// This starts, but does not poll, a longrunning operation. More information
3736        /// on [create_encryption_config][crate::client::CmekService::create_encryption_config].
3737        pub async fn send(self) -> Result<longrunning::model::Operation> {
3738            (*self.0.stub)
3739                .create_encryption_config(self.0.request, self.0.options)
3740                .await
3741                .map(gax::response::Response::into_body)
3742        }
3743
3744        /// Creates a [Poller][lro::Poller] to work with `create_encryption_config`.
3745        pub fn poller(
3746            self,
3747        ) -> impl lro::Poller<crate::model::EncryptionConfig, crate::model::OperationMetadata>
3748        {
3749            type Operation = lro::internal::Operation<
3750                crate::model::EncryptionConfig,
3751                crate::model::OperationMetadata,
3752            >;
3753            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3754            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3755
3756            let stub = self.0.stub.clone();
3757            let mut options = self.0.options.clone();
3758            options.set_retry_policy(gax::retry_policy::NeverRetry);
3759            let query = move |name| {
3760                let stub = stub.clone();
3761                let options = options.clone();
3762                async {
3763                    let op = GetOperation::new(stub)
3764                        .set_name(name)
3765                        .with_options(options)
3766                        .send()
3767                        .await?;
3768                    Ok(Operation::new(op))
3769                }
3770            };
3771
3772            let start = move || async {
3773                let op = self.send().await?;
3774                Ok(Operation::new(op))
3775            };
3776
3777            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3778        }
3779
3780        /// Sets the value of [parent][crate::model::CreateEncryptionConfigRequest::parent].
3781        ///
3782        /// This is a **required** field for requests.
3783        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3784            self.0.request.parent = v.into();
3785            self
3786        }
3787
3788        /// Sets the value of [encryption_config_id][crate::model::CreateEncryptionConfigRequest::encryption_config_id].
3789        ///
3790        /// This is a **required** field for requests.
3791        pub fn set_encryption_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3792            self.0.request.encryption_config_id = v.into();
3793            self
3794        }
3795
3796        /// Sets the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
3797        ///
3798        /// This is a **required** field for requests.
3799        pub fn set_encryption_config<T>(mut self, v: T) -> Self
3800        where
3801            T: std::convert::Into<crate::model::EncryptionConfig>,
3802        {
3803            self.0.request.encryption_config = std::option::Option::Some(v.into());
3804            self
3805        }
3806
3807        /// Sets or clears the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
3808        ///
3809        /// This is a **required** field for requests.
3810        pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
3811        where
3812            T: std::convert::Into<crate::model::EncryptionConfig>,
3813        {
3814            self.0.request.encryption_config = v.map(|x| x.into());
3815            self
3816        }
3817    }
3818
3819    #[doc(hidden)]
3820    impl gax::options::internal::RequestBuilder for CreateEncryptionConfig {
3821        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3822            &mut self.0.options
3823        }
3824    }
3825
3826    /// The request builder for [CmekService::update_encryption_config][crate::client::CmekService::update_encryption_config] calls.
3827    ///
3828    /// # Example
3829    /// ```no_run
3830    /// # use google_cloud_dataplex_v1::builder;
3831    /// use builder::cmek_service::UpdateEncryptionConfig;
3832    /// # tokio_test::block_on(async {
3833    /// use lro::Poller;
3834    ///
3835    /// let builder = prepare_request_builder();
3836    /// let response = builder.poller().until_done().await?;
3837    /// # gax::Result::<()>::Ok(()) });
3838    ///
3839    /// fn prepare_request_builder() -> UpdateEncryptionConfig {
3840    ///   # panic!();
3841    ///   // ... details omitted ...
3842    /// }
3843    /// ```
3844    #[derive(Clone, Debug)]
3845    pub struct UpdateEncryptionConfig(RequestBuilder<crate::model::UpdateEncryptionConfigRequest>);
3846
3847    impl UpdateEncryptionConfig {
3848        pub(crate) fn new(
3849            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
3850        ) -> Self {
3851            Self(RequestBuilder::new(stub))
3852        }
3853
3854        /// Sets the full request, replacing any prior values.
3855        pub fn with_request<V: Into<crate::model::UpdateEncryptionConfigRequest>>(
3856            mut self,
3857            v: V,
3858        ) -> Self {
3859            self.0.request = v.into();
3860            self
3861        }
3862
3863        /// Sets all the options, replacing any prior values.
3864        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3865            self.0.options = v.into();
3866            self
3867        }
3868
3869        /// Sends the request.
3870        ///
3871        /// # Long running operations
3872        ///
3873        /// This starts, but does not poll, a longrunning operation. More information
3874        /// on [update_encryption_config][crate::client::CmekService::update_encryption_config].
3875        pub async fn send(self) -> Result<longrunning::model::Operation> {
3876            (*self.0.stub)
3877                .update_encryption_config(self.0.request, self.0.options)
3878                .await
3879                .map(gax::response::Response::into_body)
3880        }
3881
3882        /// Creates a [Poller][lro::Poller] to work with `update_encryption_config`.
3883        pub fn poller(
3884            self,
3885        ) -> impl lro::Poller<crate::model::EncryptionConfig, crate::model::OperationMetadata>
3886        {
3887            type Operation = lro::internal::Operation<
3888                crate::model::EncryptionConfig,
3889                crate::model::OperationMetadata,
3890            >;
3891            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3892            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3893
3894            let stub = self.0.stub.clone();
3895            let mut options = self.0.options.clone();
3896            options.set_retry_policy(gax::retry_policy::NeverRetry);
3897            let query = move |name| {
3898                let stub = stub.clone();
3899                let options = options.clone();
3900                async {
3901                    let op = GetOperation::new(stub)
3902                        .set_name(name)
3903                        .with_options(options)
3904                        .send()
3905                        .await?;
3906                    Ok(Operation::new(op))
3907                }
3908            };
3909
3910            let start = move || async {
3911                let op = self.send().await?;
3912                Ok(Operation::new(op))
3913            };
3914
3915            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3916        }
3917
3918        /// Sets the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
3919        ///
3920        /// This is a **required** field for requests.
3921        pub fn set_encryption_config<T>(mut self, v: T) -> Self
3922        where
3923            T: std::convert::Into<crate::model::EncryptionConfig>,
3924        {
3925            self.0.request.encryption_config = std::option::Option::Some(v.into());
3926            self
3927        }
3928
3929        /// Sets or clears the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
3930        ///
3931        /// This is a **required** field for requests.
3932        pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
3933        where
3934            T: std::convert::Into<crate::model::EncryptionConfig>,
3935        {
3936            self.0.request.encryption_config = v.map(|x| x.into());
3937            self
3938        }
3939
3940        /// Sets the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
3941        pub fn set_update_mask<T>(mut self, v: T) -> Self
3942        where
3943            T: std::convert::Into<wkt::FieldMask>,
3944        {
3945            self.0.request.update_mask = std::option::Option::Some(v.into());
3946            self
3947        }
3948
3949        /// Sets or clears the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
3950        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3951        where
3952            T: std::convert::Into<wkt::FieldMask>,
3953        {
3954            self.0.request.update_mask = v.map(|x| x.into());
3955            self
3956        }
3957    }
3958
3959    #[doc(hidden)]
3960    impl gax::options::internal::RequestBuilder for UpdateEncryptionConfig {
3961        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3962            &mut self.0.options
3963        }
3964    }
3965
3966    /// The request builder for [CmekService::delete_encryption_config][crate::client::CmekService::delete_encryption_config] calls.
3967    ///
3968    /// # Example
3969    /// ```no_run
3970    /// # use google_cloud_dataplex_v1::builder;
3971    /// use builder::cmek_service::DeleteEncryptionConfig;
3972    /// # tokio_test::block_on(async {
3973    /// use lro::Poller;
3974    ///
3975    /// let builder = prepare_request_builder();
3976    /// let response = builder.poller().until_done().await?;
3977    /// # gax::Result::<()>::Ok(()) });
3978    ///
3979    /// fn prepare_request_builder() -> DeleteEncryptionConfig {
3980    ///   # panic!();
3981    ///   // ... details omitted ...
3982    /// }
3983    /// ```
3984    #[derive(Clone, Debug)]
3985    pub struct DeleteEncryptionConfig(RequestBuilder<crate::model::DeleteEncryptionConfigRequest>);
3986
3987    impl DeleteEncryptionConfig {
3988        pub(crate) fn new(
3989            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
3990        ) -> Self {
3991            Self(RequestBuilder::new(stub))
3992        }
3993
3994        /// Sets the full request, replacing any prior values.
3995        pub fn with_request<V: Into<crate::model::DeleteEncryptionConfigRequest>>(
3996            mut self,
3997            v: V,
3998        ) -> Self {
3999            self.0.request = v.into();
4000            self
4001        }
4002
4003        /// Sets all the options, replacing any prior values.
4004        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4005            self.0.options = v.into();
4006            self
4007        }
4008
4009        /// Sends the request.
4010        ///
4011        /// # Long running operations
4012        ///
4013        /// This starts, but does not poll, a longrunning operation. More information
4014        /// on [delete_encryption_config][crate::client::CmekService::delete_encryption_config].
4015        pub async fn send(self) -> Result<longrunning::model::Operation> {
4016            (*self.0.stub)
4017                .delete_encryption_config(self.0.request, self.0.options)
4018                .await
4019                .map(gax::response::Response::into_body)
4020        }
4021
4022        /// Creates a [Poller][lro::Poller] to work with `delete_encryption_config`.
4023        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
4024            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
4025            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4026            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4027
4028            let stub = self.0.stub.clone();
4029            let mut options = self.0.options.clone();
4030            options.set_retry_policy(gax::retry_policy::NeverRetry);
4031            let query = move |name| {
4032                let stub = stub.clone();
4033                let options = options.clone();
4034                async {
4035                    let op = GetOperation::new(stub)
4036                        .set_name(name)
4037                        .with_options(options)
4038                        .send()
4039                        .await?;
4040                    Ok(Operation::new(op))
4041                }
4042            };
4043
4044            let start = move || async {
4045                let op = self.send().await?;
4046                Ok(Operation::new(op))
4047            };
4048
4049            lro::internal::new_unit_response_poller(
4050                polling_error_policy,
4051                polling_backoff_policy,
4052                start,
4053                query,
4054            )
4055        }
4056
4057        /// Sets the value of [name][crate::model::DeleteEncryptionConfigRequest::name].
4058        ///
4059        /// This is a **required** field for requests.
4060        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4061            self.0.request.name = v.into();
4062            self
4063        }
4064
4065        /// Sets the value of [etag][crate::model::DeleteEncryptionConfigRequest::etag].
4066        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
4067            self.0.request.etag = v.into();
4068            self
4069        }
4070    }
4071
4072    #[doc(hidden)]
4073    impl gax::options::internal::RequestBuilder for DeleteEncryptionConfig {
4074        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4075            &mut self.0.options
4076        }
4077    }
4078
4079    /// The request builder for [CmekService::list_encryption_configs][crate::client::CmekService::list_encryption_configs] calls.
4080    ///
4081    /// # Example
4082    /// ```no_run
4083    /// # use google_cloud_dataplex_v1::builder;
4084    /// use builder::cmek_service::ListEncryptionConfigs;
4085    /// # tokio_test::block_on(async {
4086    /// use gax::paginator::ItemPaginator;
4087    ///
4088    /// let builder = prepare_request_builder();
4089    /// let mut items = builder.by_item();
4090    /// while let Some(result) = items.next().await {
4091    ///   let item = result?;
4092    /// }
4093    /// # gax::Result::<()>::Ok(()) });
4094    ///
4095    /// fn prepare_request_builder() -> ListEncryptionConfigs {
4096    ///   # panic!();
4097    ///   // ... details omitted ...
4098    /// }
4099    /// ```
4100    #[derive(Clone, Debug)]
4101    pub struct ListEncryptionConfigs(RequestBuilder<crate::model::ListEncryptionConfigsRequest>);
4102
4103    impl ListEncryptionConfigs {
4104        pub(crate) fn new(
4105            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
4106        ) -> Self {
4107            Self(RequestBuilder::new(stub))
4108        }
4109
4110        /// Sets the full request, replacing any prior values.
4111        pub fn with_request<V: Into<crate::model::ListEncryptionConfigsRequest>>(
4112            mut self,
4113            v: V,
4114        ) -> Self {
4115            self.0.request = v.into();
4116            self
4117        }
4118
4119        /// Sets all the options, replacing any prior values.
4120        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4121            self.0.options = v.into();
4122            self
4123        }
4124
4125        /// Sends the request.
4126        pub async fn send(self) -> Result<crate::model::ListEncryptionConfigsResponse> {
4127            (*self.0.stub)
4128                .list_encryption_configs(self.0.request, self.0.options)
4129                .await
4130                .map(gax::response::Response::into_body)
4131        }
4132
4133        /// Streams each page in the collection.
4134        pub fn by_page(
4135            self,
4136        ) -> impl gax::paginator::Paginator<crate::model::ListEncryptionConfigsResponse, gax::error::Error>
4137        {
4138            use std::clone::Clone;
4139            let token = self.0.request.page_token.clone();
4140            let execute = move |token: String| {
4141                let mut builder = self.clone();
4142                builder.0.request = builder.0.request.set_page_token(token);
4143                builder.send()
4144            };
4145            gax::paginator::internal::new_paginator(token, execute)
4146        }
4147
4148        /// Streams each item in the collection.
4149        pub fn by_item(
4150            self,
4151        ) -> impl gax::paginator::ItemPaginator<
4152            crate::model::ListEncryptionConfigsResponse,
4153            gax::error::Error,
4154        > {
4155            use gax::paginator::Paginator;
4156            self.by_page().items()
4157        }
4158
4159        /// Sets the value of [parent][crate::model::ListEncryptionConfigsRequest::parent].
4160        ///
4161        /// This is a **required** field for requests.
4162        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4163            self.0.request.parent = v.into();
4164            self
4165        }
4166
4167        /// Sets the value of [page_size][crate::model::ListEncryptionConfigsRequest::page_size].
4168        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4169            self.0.request.page_size = v.into();
4170            self
4171        }
4172
4173        /// Sets the value of [page_token][crate::model::ListEncryptionConfigsRequest::page_token].
4174        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4175            self.0.request.page_token = v.into();
4176            self
4177        }
4178
4179        /// Sets the value of [filter][crate::model::ListEncryptionConfigsRequest::filter].
4180        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4181            self.0.request.filter = v.into();
4182            self
4183        }
4184
4185        /// Sets the value of [order_by][crate::model::ListEncryptionConfigsRequest::order_by].
4186        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4187            self.0.request.order_by = v.into();
4188            self
4189        }
4190    }
4191
4192    #[doc(hidden)]
4193    impl gax::options::internal::RequestBuilder for ListEncryptionConfigs {
4194        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4195            &mut self.0.options
4196        }
4197    }
4198
4199    /// The request builder for [CmekService::get_encryption_config][crate::client::CmekService::get_encryption_config] calls.
4200    ///
4201    /// # Example
4202    /// ```no_run
4203    /// # use google_cloud_dataplex_v1::builder;
4204    /// use builder::cmek_service::GetEncryptionConfig;
4205    /// # tokio_test::block_on(async {
4206    ///
4207    /// let builder = prepare_request_builder();
4208    /// let response = builder.send().await?;
4209    /// # gax::Result::<()>::Ok(()) });
4210    ///
4211    /// fn prepare_request_builder() -> GetEncryptionConfig {
4212    ///   # panic!();
4213    ///   // ... details omitted ...
4214    /// }
4215    /// ```
4216    #[derive(Clone, Debug)]
4217    pub struct GetEncryptionConfig(RequestBuilder<crate::model::GetEncryptionConfigRequest>);
4218
4219    impl GetEncryptionConfig {
4220        pub(crate) fn new(
4221            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
4222        ) -> Self {
4223            Self(RequestBuilder::new(stub))
4224        }
4225
4226        /// Sets the full request, replacing any prior values.
4227        pub fn with_request<V: Into<crate::model::GetEncryptionConfigRequest>>(
4228            mut self,
4229            v: V,
4230        ) -> Self {
4231            self.0.request = v.into();
4232            self
4233        }
4234
4235        /// Sets all the options, replacing any prior values.
4236        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4237            self.0.options = v.into();
4238            self
4239        }
4240
4241        /// Sends the request.
4242        pub async fn send(self) -> Result<crate::model::EncryptionConfig> {
4243            (*self.0.stub)
4244                .get_encryption_config(self.0.request, self.0.options)
4245                .await
4246                .map(gax::response::Response::into_body)
4247        }
4248
4249        /// Sets the value of [name][crate::model::GetEncryptionConfigRequest::name].
4250        ///
4251        /// This is a **required** field for requests.
4252        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4253            self.0.request.name = v.into();
4254            self
4255        }
4256    }
4257
4258    #[doc(hidden)]
4259    impl gax::options::internal::RequestBuilder for GetEncryptionConfig {
4260        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4261            &mut self.0.options
4262        }
4263    }
4264
4265    /// The request builder for [CmekService::list_locations][crate::client::CmekService::list_locations] calls.
4266    ///
4267    /// # Example
4268    /// ```no_run
4269    /// # use google_cloud_dataplex_v1::builder;
4270    /// use builder::cmek_service::ListLocations;
4271    /// # tokio_test::block_on(async {
4272    /// use gax::paginator::ItemPaginator;
4273    ///
4274    /// let builder = prepare_request_builder();
4275    /// let mut items = builder.by_item();
4276    /// while let Some(result) = items.next().await {
4277    ///   let item = result?;
4278    /// }
4279    /// # gax::Result::<()>::Ok(()) });
4280    ///
4281    /// fn prepare_request_builder() -> ListLocations {
4282    ///   # panic!();
4283    ///   // ... details omitted ...
4284    /// }
4285    /// ```
4286    #[derive(Clone, Debug)]
4287    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
4288
4289    impl ListLocations {
4290        pub(crate) fn new(
4291            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
4292        ) -> Self {
4293            Self(RequestBuilder::new(stub))
4294        }
4295
4296        /// Sets the full request, replacing any prior values.
4297        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
4298            mut self,
4299            v: V,
4300        ) -> Self {
4301            self.0.request = v.into();
4302            self
4303        }
4304
4305        /// Sets all the options, replacing any prior values.
4306        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4307            self.0.options = v.into();
4308            self
4309        }
4310
4311        /// Sends the request.
4312        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
4313            (*self.0.stub)
4314                .list_locations(self.0.request, self.0.options)
4315                .await
4316                .map(gax::response::Response::into_body)
4317        }
4318
4319        /// Streams each page in the collection.
4320        pub fn by_page(
4321            self,
4322        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
4323        {
4324            use std::clone::Clone;
4325            let token = self.0.request.page_token.clone();
4326            let execute = move |token: String| {
4327                let mut builder = self.clone();
4328                builder.0.request = builder.0.request.set_page_token(token);
4329                builder.send()
4330            };
4331            gax::paginator::internal::new_paginator(token, execute)
4332        }
4333
4334        /// Streams each item in the collection.
4335        pub fn by_item(
4336            self,
4337        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
4338        {
4339            use gax::paginator::Paginator;
4340            self.by_page().items()
4341        }
4342
4343        /// Sets the value of [name][location::model::ListLocationsRequest::name].
4344        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4345            self.0.request.name = v.into();
4346            self
4347        }
4348
4349        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
4350        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4351            self.0.request.filter = v.into();
4352            self
4353        }
4354
4355        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
4356        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4357            self.0.request.page_size = v.into();
4358            self
4359        }
4360
4361        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
4362        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4363            self.0.request.page_token = v.into();
4364            self
4365        }
4366    }
4367
4368    #[doc(hidden)]
4369    impl gax::options::internal::RequestBuilder for ListLocations {
4370        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4371            &mut self.0.options
4372        }
4373    }
4374
4375    /// The request builder for [CmekService::get_location][crate::client::CmekService::get_location] calls.
4376    ///
4377    /// # Example
4378    /// ```no_run
4379    /// # use google_cloud_dataplex_v1::builder;
4380    /// use builder::cmek_service::GetLocation;
4381    /// # tokio_test::block_on(async {
4382    ///
4383    /// let builder = prepare_request_builder();
4384    /// let response = builder.send().await?;
4385    /// # gax::Result::<()>::Ok(()) });
4386    ///
4387    /// fn prepare_request_builder() -> GetLocation {
4388    ///   # panic!();
4389    ///   // ... details omitted ...
4390    /// }
4391    /// ```
4392    #[derive(Clone, Debug)]
4393    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
4394
4395    impl GetLocation {
4396        pub(crate) fn new(
4397            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
4398        ) -> Self {
4399            Self(RequestBuilder::new(stub))
4400        }
4401
4402        /// Sets the full request, replacing any prior values.
4403        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
4404            self.0.request = v.into();
4405            self
4406        }
4407
4408        /// Sets all the options, replacing any prior values.
4409        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4410            self.0.options = v.into();
4411            self
4412        }
4413
4414        /// Sends the request.
4415        pub async fn send(self) -> Result<location::model::Location> {
4416            (*self.0.stub)
4417                .get_location(self.0.request, self.0.options)
4418                .await
4419                .map(gax::response::Response::into_body)
4420        }
4421
4422        /// Sets the value of [name][location::model::GetLocationRequest::name].
4423        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4424            self.0.request.name = v.into();
4425            self
4426        }
4427    }
4428
4429    #[doc(hidden)]
4430    impl gax::options::internal::RequestBuilder for GetLocation {
4431        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4432            &mut self.0.options
4433        }
4434    }
4435
4436    /// The request builder for [CmekService::set_iam_policy][crate::client::CmekService::set_iam_policy] calls.
4437    ///
4438    /// # Example
4439    /// ```no_run
4440    /// # use google_cloud_dataplex_v1::builder;
4441    /// use builder::cmek_service::SetIamPolicy;
4442    /// # tokio_test::block_on(async {
4443    ///
4444    /// let builder = prepare_request_builder();
4445    /// let response = builder.send().await?;
4446    /// # gax::Result::<()>::Ok(()) });
4447    ///
4448    /// fn prepare_request_builder() -> SetIamPolicy {
4449    ///   # panic!();
4450    ///   // ... details omitted ...
4451    /// }
4452    /// ```
4453    #[derive(Clone, Debug)]
4454    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
4455
4456    impl SetIamPolicy {
4457        pub(crate) fn new(
4458            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
4459        ) -> Self {
4460            Self(RequestBuilder::new(stub))
4461        }
4462
4463        /// Sets the full request, replacing any prior values.
4464        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
4465            self.0.request = v.into();
4466            self
4467        }
4468
4469        /// Sets all the options, replacing any prior values.
4470        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4471            self.0.options = v.into();
4472            self
4473        }
4474
4475        /// Sends the request.
4476        pub async fn send(self) -> Result<iam_v1::model::Policy> {
4477            (*self.0.stub)
4478                .set_iam_policy(self.0.request, self.0.options)
4479                .await
4480                .map(gax::response::Response::into_body)
4481        }
4482
4483        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
4484        ///
4485        /// This is a **required** field for requests.
4486        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
4487            self.0.request.resource = v.into();
4488            self
4489        }
4490
4491        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
4492        ///
4493        /// This is a **required** field for requests.
4494        pub fn set_policy<T>(mut self, v: T) -> Self
4495        where
4496            T: std::convert::Into<iam_v1::model::Policy>,
4497        {
4498            self.0.request.policy = std::option::Option::Some(v.into());
4499            self
4500        }
4501
4502        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
4503        ///
4504        /// This is a **required** field for requests.
4505        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
4506        where
4507            T: std::convert::Into<iam_v1::model::Policy>,
4508        {
4509            self.0.request.policy = v.map(|x| x.into());
4510            self
4511        }
4512
4513        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
4514        pub fn set_update_mask<T>(mut self, v: T) -> Self
4515        where
4516            T: std::convert::Into<wkt::FieldMask>,
4517        {
4518            self.0.request.update_mask = std::option::Option::Some(v.into());
4519            self
4520        }
4521
4522        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
4523        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4524        where
4525            T: std::convert::Into<wkt::FieldMask>,
4526        {
4527            self.0.request.update_mask = v.map(|x| x.into());
4528            self
4529        }
4530    }
4531
4532    #[doc(hidden)]
4533    impl gax::options::internal::RequestBuilder for SetIamPolicy {
4534        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4535            &mut self.0.options
4536        }
4537    }
4538
4539    /// The request builder for [CmekService::get_iam_policy][crate::client::CmekService::get_iam_policy] calls.
4540    ///
4541    /// # Example
4542    /// ```no_run
4543    /// # use google_cloud_dataplex_v1::builder;
4544    /// use builder::cmek_service::GetIamPolicy;
4545    /// # tokio_test::block_on(async {
4546    ///
4547    /// let builder = prepare_request_builder();
4548    /// let response = builder.send().await?;
4549    /// # gax::Result::<()>::Ok(()) });
4550    ///
4551    /// fn prepare_request_builder() -> GetIamPolicy {
4552    ///   # panic!();
4553    ///   // ... details omitted ...
4554    /// }
4555    /// ```
4556    #[derive(Clone, Debug)]
4557    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
4558
4559    impl GetIamPolicy {
4560        pub(crate) fn new(
4561            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
4562        ) -> Self {
4563            Self(RequestBuilder::new(stub))
4564        }
4565
4566        /// Sets the full request, replacing any prior values.
4567        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
4568            self.0.request = v.into();
4569            self
4570        }
4571
4572        /// Sets all the options, replacing any prior values.
4573        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4574            self.0.options = v.into();
4575            self
4576        }
4577
4578        /// Sends the request.
4579        pub async fn send(self) -> Result<iam_v1::model::Policy> {
4580            (*self.0.stub)
4581                .get_iam_policy(self.0.request, self.0.options)
4582                .await
4583                .map(gax::response::Response::into_body)
4584        }
4585
4586        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
4587        ///
4588        /// This is a **required** field for requests.
4589        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
4590            self.0.request.resource = v.into();
4591            self
4592        }
4593
4594        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
4595        pub fn set_options<T>(mut self, v: T) -> Self
4596        where
4597            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
4598        {
4599            self.0.request.options = std::option::Option::Some(v.into());
4600            self
4601        }
4602
4603        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
4604        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
4605        where
4606            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
4607        {
4608            self.0.request.options = v.map(|x| x.into());
4609            self
4610        }
4611    }
4612
4613    #[doc(hidden)]
4614    impl gax::options::internal::RequestBuilder for GetIamPolicy {
4615        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4616            &mut self.0.options
4617        }
4618    }
4619
4620    /// The request builder for [CmekService::test_iam_permissions][crate::client::CmekService::test_iam_permissions] calls.
4621    ///
4622    /// # Example
4623    /// ```no_run
4624    /// # use google_cloud_dataplex_v1::builder;
4625    /// use builder::cmek_service::TestIamPermissions;
4626    /// # tokio_test::block_on(async {
4627    ///
4628    /// let builder = prepare_request_builder();
4629    /// let response = builder.send().await?;
4630    /// # gax::Result::<()>::Ok(()) });
4631    ///
4632    /// fn prepare_request_builder() -> TestIamPermissions {
4633    ///   # panic!();
4634    ///   // ... details omitted ...
4635    /// }
4636    /// ```
4637    #[derive(Clone, Debug)]
4638    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
4639
4640    impl TestIamPermissions {
4641        pub(crate) fn new(
4642            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
4643        ) -> Self {
4644            Self(RequestBuilder::new(stub))
4645        }
4646
4647        /// Sets the full request, replacing any prior values.
4648        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
4649            mut self,
4650            v: V,
4651        ) -> Self {
4652            self.0.request = v.into();
4653            self
4654        }
4655
4656        /// Sets all the options, replacing any prior values.
4657        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4658            self.0.options = v.into();
4659            self
4660        }
4661
4662        /// Sends the request.
4663        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
4664            (*self.0.stub)
4665                .test_iam_permissions(self.0.request, self.0.options)
4666                .await
4667                .map(gax::response::Response::into_body)
4668        }
4669
4670        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
4671        ///
4672        /// This is a **required** field for requests.
4673        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
4674            self.0.request.resource = v.into();
4675            self
4676        }
4677
4678        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
4679        ///
4680        /// This is a **required** field for requests.
4681        pub fn set_permissions<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.permissions = v.into_iter().map(|i| i.into()).collect();
4688            self
4689        }
4690    }
4691
4692    #[doc(hidden)]
4693    impl gax::options::internal::RequestBuilder for TestIamPermissions {
4694        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4695            &mut self.0.options
4696        }
4697    }
4698
4699    /// The request builder for [CmekService::list_operations][crate::client::CmekService::list_operations] calls.
4700    ///
4701    /// # Example
4702    /// ```no_run
4703    /// # use google_cloud_dataplex_v1::builder;
4704    /// use builder::cmek_service::ListOperations;
4705    /// # tokio_test::block_on(async {
4706    /// use gax::paginator::ItemPaginator;
4707    ///
4708    /// let builder = prepare_request_builder();
4709    /// let mut items = builder.by_item();
4710    /// while let Some(result) = items.next().await {
4711    ///   let item = result?;
4712    /// }
4713    /// # gax::Result::<()>::Ok(()) });
4714    ///
4715    /// fn prepare_request_builder() -> ListOperations {
4716    ///   # panic!();
4717    ///   // ... details omitted ...
4718    /// }
4719    /// ```
4720    #[derive(Clone, Debug)]
4721    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
4722
4723    impl ListOperations {
4724        pub(crate) fn new(
4725            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
4726        ) -> Self {
4727            Self(RequestBuilder::new(stub))
4728        }
4729
4730        /// Sets the full request, replacing any prior values.
4731        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
4732            mut self,
4733            v: V,
4734        ) -> Self {
4735            self.0.request = v.into();
4736            self
4737        }
4738
4739        /// Sets all the options, replacing any prior values.
4740        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4741            self.0.options = v.into();
4742            self
4743        }
4744
4745        /// Sends the request.
4746        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
4747            (*self.0.stub)
4748                .list_operations(self.0.request, self.0.options)
4749                .await
4750                .map(gax::response::Response::into_body)
4751        }
4752
4753        /// Streams each page in the collection.
4754        pub fn by_page(
4755            self,
4756        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
4757        {
4758            use std::clone::Clone;
4759            let token = self.0.request.page_token.clone();
4760            let execute = move |token: String| {
4761                let mut builder = self.clone();
4762                builder.0.request = builder.0.request.set_page_token(token);
4763                builder.send()
4764            };
4765            gax::paginator::internal::new_paginator(token, execute)
4766        }
4767
4768        /// Streams each item in the collection.
4769        pub fn by_item(
4770            self,
4771        ) -> impl gax::paginator::ItemPaginator<
4772            longrunning::model::ListOperationsResponse,
4773            gax::error::Error,
4774        > {
4775            use gax::paginator::Paginator;
4776            self.by_page().items()
4777        }
4778
4779        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
4780        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4781            self.0.request.name = v.into();
4782            self
4783        }
4784
4785        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
4786        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4787            self.0.request.filter = v.into();
4788            self
4789        }
4790
4791        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
4792        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4793            self.0.request.page_size = v.into();
4794            self
4795        }
4796
4797        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
4798        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4799            self.0.request.page_token = v.into();
4800            self
4801        }
4802    }
4803
4804    #[doc(hidden)]
4805    impl gax::options::internal::RequestBuilder for ListOperations {
4806        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4807            &mut self.0.options
4808        }
4809    }
4810
4811    /// The request builder for [CmekService::get_operation][crate::client::CmekService::get_operation] calls.
4812    ///
4813    /// # Example
4814    /// ```no_run
4815    /// # use google_cloud_dataplex_v1::builder;
4816    /// use builder::cmek_service::GetOperation;
4817    /// # tokio_test::block_on(async {
4818    ///
4819    /// let builder = prepare_request_builder();
4820    /// let response = builder.send().await?;
4821    /// # gax::Result::<()>::Ok(()) });
4822    ///
4823    /// fn prepare_request_builder() -> GetOperation {
4824    ///   # panic!();
4825    ///   // ... details omitted ...
4826    /// }
4827    /// ```
4828    #[derive(Clone, Debug)]
4829    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
4830
4831    impl GetOperation {
4832        pub(crate) fn new(
4833            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
4834        ) -> Self {
4835            Self(RequestBuilder::new(stub))
4836        }
4837
4838        /// Sets the full request, replacing any prior values.
4839        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
4840            mut self,
4841            v: V,
4842        ) -> Self {
4843            self.0.request = v.into();
4844            self
4845        }
4846
4847        /// Sets all the options, replacing any prior values.
4848        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4849            self.0.options = v.into();
4850            self
4851        }
4852
4853        /// Sends the request.
4854        pub async fn send(self) -> Result<longrunning::model::Operation> {
4855            (*self.0.stub)
4856                .get_operation(self.0.request, self.0.options)
4857                .await
4858                .map(gax::response::Response::into_body)
4859        }
4860
4861        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
4862        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4863            self.0.request.name = v.into();
4864            self
4865        }
4866    }
4867
4868    #[doc(hidden)]
4869    impl gax::options::internal::RequestBuilder for GetOperation {
4870        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4871            &mut self.0.options
4872        }
4873    }
4874
4875    /// The request builder for [CmekService::delete_operation][crate::client::CmekService::delete_operation] calls.
4876    ///
4877    /// # Example
4878    /// ```no_run
4879    /// # use google_cloud_dataplex_v1::builder;
4880    /// use builder::cmek_service::DeleteOperation;
4881    /// # tokio_test::block_on(async {
4882    ///
4883    /// let builder = prepare_request_builder();
4884    /// let response = builder.send().await?;
4885    /// # gax::Result::<()>::Ok(()) });
4886    ///
4887    /// fn prepare_request_builder() -> DeleteOperation {
4888    ///   # panic!();
4889    ///   // ... details omitted ...
4890    /// }
4891    /// ```
4892    #[derive(Clone, Debug)]
4893    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
4894
4895    impl DeleteOperation {
4896        pub(crate) fn new(
4897            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
4898        ) -> Self {
4899            Self(RequestBuilder::new(stub))
4900        }
4901
4902        /// Sets the full request, replacing any prior values.
4903        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
4904            mut self,
4905            v: V,
4906        ) -> Self {
4907            self.0.request = v.into();
4908            self
4909        }
4910
4911        /// Sets all the options, replacing any prior values.
4912        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4913            self.0.options = v.into();
4914            self
4915        }
4916
4917        /// Sends the request.
4918        pub async fn send(self) -> Result<()> {
4919            (*self.0.stub)
4920                .delete_operation(self.0.request, self.0.options)
4921                .await
4922                .map(gax::response::Response::into_body)
4923        }
4924
4925        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
4926        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4927            self.0.request.name = v.into();
4928            self
4929        }
4930    }
4931
4932    #[doc(hidden)]
4933    impl gax::options::internal::RequestBuilder for DeleteOperation {
4934        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4935            &mut self.0.options
4936        }
4937    }
4938
4939    /// The request builder for [CmekService::cancel_operation][crate::client::CmekService::cancel_operation] calls.
4940    ///
4941    /// # Example
4942    /// ```no_run
4943    /// # use google_cloud_dataplex_v1::builder;
4944    /// use builder::cmek_service::CancelOperation;
4945    /// # tokio_test::block_on(async {
4946    ///
4947    /// let builder = prepare_request_builder();
4948    /// let response = builder.send().await?;
4949    /// # gax::Result::<()>::Ok(()) });
4950    ///
4951    /// fn prepare_request_builder() -> CancelOperation {
4952    ///   # panic!();
4953    ///   // ... details omitted ...
4954    /// }
4955    /// ```
4956    #[derive(Clone, Debug)]
4957    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
4958
4959    impl CancelOperation {
4960        pub(crate) fn new(
4961            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
4962        ) -> Self {
4963            Self(RequestBuilder::new(stub))
4964        }
4965
4966        /// Sets the full request, replacing any prior values.
4967        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
4968            mut self,
4969            v: V,
4970        ) -> Self {
4971            self.0.request = v.into();
4972            self
4973        }
4974
4975        /// Sets all the options, replacing any prior values.
4976        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4977            self.0.options = v.into();
4978            self
4979        }
4980
4981        /// Sends the request.
4982        pub async fn send(self) -> Result<()> {
4983            (*self.0.stub)
4984                .cancel_operation(self.0.request, self.0.options)
4985                .await
4986                .map(gax::response::Response::into_body)
4987        }
4988
4989        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
4990        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4991            self.0.request.name = v.into();
4992            self
4993        }
4994    }
4995
4996    #[doc(hidden)]
4997    impl gax::options::internal::RequestBuilder for CancelOperation {
4998        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4999            &mut self.0.options
5000        }
5001    }
5002}
5003
5004pub mod content_service {
5005    use crate::Result;
5006
5007    /// A builder for [ContentService][crate::client::ContentService].
5008    ///
5009    /// ```
5010    /// # tokio_test::block_on(async {
5011    /// # use google_cloud_dataplex_v1::*;
5012    /// # use builder::content_service::ClientBuilder;
5013    /// # use client::ContentService;
5014    /// let builder : ClientBuilder = ContentService::builder();
5015    /// let client = builder
5016    ///     .with_endpoint("https://dataplex.googleapis.com")
5017    ///     .build().await?;
5018    /// # gax::client_builder::Result::<()>::Ok(()) });
5019    /// ```
5020    pub type ClientBuilder =
5021        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
5022
5023    pub(crate) mod client {
5024        use super::super::super::client::ContentService;
5025        pub struct Factory;
5026        impl gax::client_builder::internal::ClientFactory for Factory {
5027            type Client = ContentService;
5028            type Credentials = gaxi::options::Credentials;
5029            async fn build(
5030                self,
5031                config: gaxi::options::ClientConfig,
5032            ) -> gax::client_builder::Result<Self::Client> {
5033                Self::Client::new(config).await
5034            }
5035        }
5036    }
5037
5038    /// Common implementation for [crate::client::ContentService] request builders.
5039    #[derive(Clone, Debug)]
5040    pub(crate) struct RequestBuilder<R: std::default::Default> {
5041        stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
5042        request: R,
5043        options: gax::options::RequestOptions,
5044    }
5045
5046    impl<R> RequestBuilder<R>
5047    where
5048        R: std::default::Default,
5049    {
5050        pub(crate) fn new(
5051            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
5052        ) -> Self {
5053            Self {
5054                stub,
5055                request: R::default(),
5056                options: gax::options::RequestOptions::default(),
5057            }
5058        }
5059    }
5060
5061    /// The request builder for [ContentService::create_content][crate::client::ContentService::create_content] calls.
5062    ///
5063    /// # Example
5064    /// ```no_run
5065    /// # use google_cloud_dataplex_v1::builder;
5066    /// use builder::content_service::CreateContent;
5067    /// # tokio_test::block_on(async {
5068    ///
5069    /// let builder = prepare_request_builder();
5070    /// let response = builder.send().await?;
5071    /// # gax::Result::<()>::Ok(()) });
5072    ///
5073    /// fn prepare_request_builder() -> CreateContent {
5074    ///   # panic!();
5075    ///   // ... details omitted ...
5076    /// }
5077    /// ```
5078    #[derive(Clone, Debug)]
5079    pub struct CreateContent(RequestBuilder<crate::model::CreateContentRequest>);
5080
5081    impl CreateContent {
5082        pub(crate) fn new(
5083            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
5084        ) -> Self {
5085            Self(RequestBuilder::new(stub))
5086        }
5087
5088        /// Sets the full request, replacing any prior values.
5089        pub fn with_request<V: Into<crate::model::CreateContentRequest>>(mut self, v: V) -> Self {
5090            self.0.request = v.into();
5091            self
5092        }
5093
5094        /// Sets all the options, replacing any prior values.
5095        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5096            self.0.options = v.into();
5097            self
5098        }
5099
5100        /// Sends the request.
5101        pub async fn send(self) -> Result<crate::model::Content> {
5102            (*self.0.stub)
5103                .create_content(self.0.request, self.0.options)
5104                .await
5105                .map(gax::response::Response::into_body)
5106        }
5107
5108        /// Sets the value of [parent][crate::model::CreateContentRequest::parent].
5109        ///
5110        /// This is a **required** field for requests.
5111        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5112            self.0.request.parent = v.into();
5113            self
5114        }
5115
5116        /// Sets the value of [content][crate::model::CreateContentRequest::content].
5117        ///
5118        /// This is a **required** field for requests.
5119        pub fn set_content<T>(mut self, v: T) -> Self
5120        where
5121            T: std::convert::Into<crate::model::Content>,
5122        {
5123            self.0.request.content = std::option::Option::Some(v.into());
5124            self
5125        }
5126
5127        /// Sets or clears the value of [content][crate::model::CreateContentRequest::content].
5128        ///
5129        /// This is a **required** field for requests.
5130        pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
5131        where
5132            T: std::convert::Into<crate::model::Content>,
5133        {
5134            self.0.request.content = v.map(|x| x.into());
5135            self
5136        }
5137
5138        /// Sets the value of [validate_only][crate::model::CreateContentRequest::validate_only].
5139        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
5140            self.0.request.validate_only = v.into();
5141            self
5142        }
5143    }
5144
5145    #[doc(hidden)]
5146    impl gax::options::internal::RequestBuilder for CreateContent {
5147        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5148            &mut self.0.options
5149        }
5150    }
5151
5152    /// The request builder for [ContentService::update_content][crate::client::ContentService::update_content] calls.
5153    ///
5154    /// # Example
5155    /// ```no_run
5156    /// # use google_cloud_dataplex_v1::builder;
5157    /// use builder::content_service::UpdateContent;
5158    /// # tokio_test::block_on(async {
5159    ///
5160    /// let builder = prepare_request_builder();
5161    /// let response = builder.send().await?;
5162    /// # gax::Result::<()>::Ok(()) });
5163    ///
5164    /// fn prepare_request_builder() -> UpdateContent {
5165    ///   # panic!();
5166    ///   // ... details omitted ...
5167    /// }
5168    /// ```
5169    #[derive(Clone, Debug)]
5170    pub struct UpdateContent(RequestBuilder<crate::model::UpdateContentRequest>);
5171
5172    impl UpdateContent {
5173        pub(crate) fn new(
5174            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
5175        ) -> Self {
5176            Self(RequestBuilder::new(stub))
5177        }
5178
5179        /// Sets the full request, replacing any prior values.
5180        pub fn with_request<V: Into<crate::model::UpdateContentRequest>>(mut self, v: V) -> Self {
5181            self.0.request = v.into();
5182            self
5183        }
5184
5185        /// Sets all the options, replacing any prior values.
5186        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5187            self.0.options = v.into();
5188            self
5189        }
5190
5191        /// Sends the request.
5192        pub async fn send(self) -> Result<crate::model::Content> {
5193            (*self.0.stub)
5194                .update_content(self.0.request, self.0.options)
5195                .await
5196                .map(gax::response::Response::into_body)
5197        }
5198
5199        /// Sets the value of [update_mask][crate::model::UpdateContentRequest::update_mask].
5200        ///
5201        /// This is a **required** field for requests.
5202        pub fn set_update_mask<T>(mut self, v: T) -> Self
5203        where
5204            T: std::convert::Into<wkt::FieldMask>,
5205        {
5206            self.0.request.update_mask = std::option::Option::Some(v.into());
5207            self
5208        }
5209
5210        /// Sets or clears the value of [update_mask][crate::model::UpdateContentRequest::update_mask].
5211        ///
5212        /// This is a **required** field for requests.
5213        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5214        where
5215            T: std::convert::Into<wkt::FieldMask>,
5216        {
5217            self.0.request.update_mask = v.map(|x| x.into());
5218            self
5219        }
5220
5221        /// Sets the value of [content][crate::model::UpdateContentRequest::content].
5222        ///
5223        /// This is a **required** field for requests.
5224        pub fn set_content<T>(mut self, v: T) -> Self
5225        where
5226            T: std::convert::Into<crate::model::Content>,
5227        {
5228            self.0.request.content = std::option::Option::Some(v.into());
5229            self
5230        }
5231
5232        /// Sets or clears the value of [content][crate::model::UpdateContentRequest::content].
5233        ///
5234        /// This is a **required** field for requests.
5235        pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
5236        where
5237            T: std::convert::Into<crate::model::Content>,
5238        {
5239            self.0.request.content = v.map(|x| x.into());
5240            self
5241        }
5242
5243        /// Sets the value of [validate_only][crate::model::UpdateContentRequest::validate_only].
5244        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
5245            self.0.request.validate_only = v.into();
5246            self
5247        }
5248    }
5249
5250    #[doc(hidden)]
5251    impl gax::options::internal::RequestBuilder for UpdateContent {
5252        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5253            &mut self.0.options
5254        }
5255    }
5256
5257    /// The request builder for [ContentService::delete_content][crate::client::ContentService::delete_content] calls.
5258    ///
5259    /// # Example
5260    /// ```no_run
5261    /// # use google_cloud_dataplex_v1::builder;
5262    /// use builder::content_service::DeleteContent;
5263    /// # tokio_test::block_on(async {
5264    ///
5265    /// let builder = prepare_request_builder();
5266    /// let response = builder.send().await?;
5267    /// # gax::Result::<()>::Ok(()) });
5268    ///
5269    /// fn prepare_request_builder() -> DeleteContent {
5270    ///   # panic!();
5271    ///   // ... details omitted ...
5272    /// }
5273    /// ```
5274    #[derive(Clone, Debug)]
5275    pub struct DeleteContent(RequestBuilder<crate::model::DeleteContentRequest>);
5276
5277    impl DeleteContent {
5278        pub(crate) fn new(
5279            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
5280        ) -> Self {
5281            Self(RequestBuilder::new(stub))
5282        }
5283
5284        /// Sets the full request, replacing any prior values.
5285        pub fn with_request<V: Into<crate::model::DeleteContentRequest>>(mut self, v: V) -> Self {
5286            self.0.request = v.into();
5287            self
5288        }
5289
5290        /// Sets all the options, replacing any prior values.
5291        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5292            self.0.options = v.into();
5293            self
5294        }
5295
5296        /// Sends the request.
5297        pub async fn send(self) -> Result<()> {
5298            (*self.0.stub)
5299                .delete_content(self.0.request, self.0.options)
5300                .await
5301                .map(gax::response::Response::into_body)
5302        }
5303
5304        /// Sets the value of [name][crate::model::DeleteContentRequest::name].
5305        ///
5306        /// This is a **required** field for requests.
5307        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5308            self.0.request.name = v.into();
5309            self
5310        }
5311    }
5312
5313    #[doc(hidden)]
5314    impl gax::options::internal::RequestBuilder for DeleteContent {
5315        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5316            &mut self.0.options
5317        }
5318    }
5319
5320    /// The request builder for [ContentService::get_content][crate::client::ContentService::get_content] calls.
5321    ///
5322    /// # Example
5323    /// ```no_run
5324    /// # use google_cloud_dataplex_v1::builder;
5325    /// use builder::content_service::GetContent;
5326    /// # tokio_test::block_on(async {
5327    ///
5328    /// let builder = prepare_request_builder();
5329    /// let response = builder.send().await?;
5330    /// # gax::Result::<()>::Ok(()) });
5331    ///
5332    /// fn prepare_request_builder() -> GetContent {
5333    ///   # panic!();
5334    ///   // ... details omitted ...
5335    /// }
5336    /// ```
5337    #[derive(Clone, Debug)]
5338    pub struct GetContent(RequestBuilder<crate::model::GetContentRequest>);
5339
5340    impl GetContent {
5341        pub(crate) fn new(
5342            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
5343        ) -> Self {
5344            Self(RequestBuilder::new(stub))
5345        }
5346
5347        /// Sets the full request, replacing any prior values.
5348        pub fn with_request<V: Into<crate::model::GetContentRequest>>(mut self, v: V) -> Self {
5349            self.0.request = v.into();
5350            self
5351        }
5352
5353        /// Sets all the options, replacing any prior values.
5354        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5355            self.0.options = v.into();
5356            self
5357        }
5358
5359        /// Sends the request.
5360        pub async fn send(self) -> Result<crate::model::Content> {
5361            (*self.0.stub)
5362                .get_content(self.0.request, self.0.options)
5363                .await
5364                .map(gax::response::Response::into_body)
5365        }
5366
5367        /// Sets the value of [name][crate::model::GetContentRequest::name].
5368        ///
5369        /// This is a **required** field for requests.
5370        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5371            self.0.request.name = v.into();
5372            self
5373        }
5374
5375        /// Sets the value of [view][crate::model::GetContentRequest::view].
5376        pub fn set_view<T: Into<crate::model::get_content_request::ContentView>>(
5377            mut self,
5378            v: T,
5379        ) -> Self {
5380            self.0.request.view = v.into();
5381            self
5382        }
5383    }
5384
5385    #[doc(hidden)]
5386    impl gax::options::internal::RequestBuilder for GetContent {
5387        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5388            &mut self.0.options
5389        }
5390    }
5391
5392    /// The request builder for [ContentService::get_iam_policy][crate::client::ContentService::get_iam_policy] calls.
5393    ///
5394    /// # Example
5395    /// ```no_run
5396    /// # use google_cloud_dataplex_v1::builder;
5397    /// use builder::content_service::GetIamPolicy;
5398    /// # tokio_test::block_on(async {
5399    ///
5400    /// let builder = prepare_request_builder();
5401    /// let response = builder.send().await?;
5402    /// # gax::Result::<()>::Ok(()) });
5403    ///
5404    /// fn prepare_request_builder() -> GetIamPolicy {
5405    ///   # panic!();
5406    ///   // ... details omitted ...
5407    /// }
5408    /// ```
5409    #[derive(Clone, Debug)]
5410    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
5411
5412    impl GetIamPolicy {
5413        pub(crate) fn new(
5414            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
5415        ) -> Self {
5416            Self(RequestBuilder::new(stub))
5417        }
5418
5419        /// Sets the full request, replacing any prior values.
5420        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
5421            self.0.request = v.into();
5422            self
5423        }
5424
5425        /// Sets all the options, replacing any prior values.
5426        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5427            self.0.options = v.into();
5428            self
5429        }
5430
5431        /// Sends the request.
5432        pub async fn send(self) -> Result<iam_v1::model::Policy> {
5433            (*self.0.stub)
5434                .get_iam_policy(self.0.request, self.0.options)
5435                .await
5436                .map(gax::response::Response::into_body)
5437        }
5438
5439        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
5440        ///
5441        /// This is a **required** field for requests.
5442        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
5443            self.0.request.resource = v.into();
5444            self
5445        }
5446
5447        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
5448        pub fn set_options<T>(mut self, v: T) -> Self
5449        where
5450            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
5451        {
5452            self.0.request.options = std::option::Option::Some(v.into());
5453            self
5454        }
5455
5456        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
5457        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
5458        where
5459            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
5460        {
5461            self.0.request.options = v.map(|x| x.into());
5462            self
5463        }
5464    }
5465
5466    #[doc(hidden)]
5467    impl gax::options::internal::RequestBuilder for GetIamPolicy {
5468        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5469            &mut self.0.options
5470        }
5471    }
5472
5473    /// The request builder for [ContentService::set_iam_policy][crate::client::ContentService::set_iam_policy] calls.
5474    ///
5475    /// # Example
5476    /// ```no_run
5477    /// # use google_cloud_dataplex_v1::builder;
5478    /// use builder::content_service::SetIamPolicy;
5479    /// # tokio_test::block_on(async {
5480    ///
5481    /// let builder = prepare_request_builder();
5482    /// let response = builder.send().await?;
5483    /// # gax::Result::<()>::Ok(()) });
5484    ///
5485    /// fn prepare_request_builder() -> SetIamPolicy {
5486    ///   # panic!();
5487    ///   // ... details omitted ...
5488    /// }
5489    /// ```
5490    #[derive(Clone, Debug)]
5491    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
5492
5493    impl SetIamPolicy {
5494        pub(crate) fn new(
5495            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
5496        ) -> Self {
5497            Self(RequestBuilder::new(stub))
5498        }
5499
5500        /// Sets the full request, replacing any prior values.
5501        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
5502            self.0.request = v.into();
5503            self
5504        }
5505
5506        /// Sets all the options, replacing any prior values.
5507        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5508            self.0.options = v.into();
5509            self
5510        }
5511
5512        /// Sends the request.
5513        pub async fn send(self) -> Result<iam_v1::model::Policy> {
5514            (*self.0.stub)
5515                .set_iam_policy(self.0.request, self.0.options)
5516                .await
5517                .map(gax::response::Response::into_body)
5518        }
5519
5520        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
5521        ///
5522        /// This is a **required** field for requests.
5523        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
5524            self.0.request.resource = v.into();
5525            self
5526        }
5527
5528        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
5529        ///
5530        /// This is a **required** field for requests.
5531        pub fn set_policy<T>(mut self, v: T) -> Self
5532        where
5533            T: std::convert::Into<iam_v1::model::Policy>,
5534        {
5535            self.0.request.policy = std::option::Option::Some(v.into());
5536            self
5537        }
5538
5539        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
5540        ///
5541        /// This is a **required** field for requests.
5542        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
5543        where
5544            T: std::convert::Into<iam_v1::model::Policy>,
5545        {
5546            self.0.request.policy = v.map(|x| x.into());
5547            self
5548        }
5549
5550        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
5551        pub fn set_update_mask<T>(mut self, v: T) -> Self
5552        where
5553            T: std::convert::Into<wkt::FieldMask>,
5554        {
5555            self.0.request.update_mask = std::option::Option::Some(v.into());
5556            self
5557        }
5558
5559        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
5560        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5561        where
5562            T: std::convert::Into<wkt::FieldMask>,
5563        {
5564            self.0.request.update_mask = v.map(|x| x.into());
5565            self
5566        }
5567    }
5568
5569    #[doc(hidden)]
5570    impl gax::options::internal::RequestBuilder for SetIamPolicy {
5571        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5572            &mut self.0.options
5573        }
5574    }
5575
5576    /// The request builder for [ContentService::test_iam_permissions][crate::client::ContentService::test_iam_permissions] calls.
5577    ///
5578    /// # Example
5579    /// ```no_run
5580    /// # use google_cloud_dataplex_v1::builder;
5581    /// use builder::content_service::TestIamPermissions;
5582    /// # tokio_test::block_on(async {
5583    ///
5584    /// let builder = prepare_request_builder();
5585    /// let response = builder.send().await?;
5586    /// # gax::Result::<()>::Ok(()) });
5587    ///
5588    /// fn prepare_request_builder() -> TestIamPermissions {
5589    ///   # panic!();
5590    ///   // ... details omitted ...
5591    /// }
5592    /// ```
5593    #[derive(Clone, Debug)]
5594    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
5595
5596    impl TestIamPermissions {
5597        pub(crate) fn new(
5598            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
5599        ) -> Self {
5600            Self(RequestBuilder::new(stub))
5601        }
5602
5603        /// Sets the full request, replacing any prior values.
5604        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
5605            mut self,
5606            v: V,
5607        ) -> Self {
5608            self.0.request = v.into();
5609            self
5610        }
5611
5612        /// Sets all the options, replacing any prior values.
5613        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5614            self.0.options = v.into();
5615            self
5616        }
5617
5618        /// Sends the request.
5619        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
5620            (*self.0.stub)
5621                .test_iam_permissions(self.0.request, self.0.options)
5622                .await
5623                .map(gax::response::Response::into_body)
5624        }
5625
5626        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
5627        ///
5628        /// This is a **required** field for requests.
5629        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
5630            self.0.request.resource = v.into();
5631            self
5632        }
5633
5634        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
5635        ///
5636        /// This is a **required** field for requests.
5637        pub fn set_permissions<T, V>(mut self, v: T) -> Self
5638        where
5639            T: std::iter::IntoIterator<Item = V>,
5640            V: std::convert::Into<std::string::String>,
5641        {
5642            use std::iter::Iterator;
5643            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
5644            self
5645        }
5646    }
5647
5648    #[doc(hidden)]
5649    impl gax::options::internal::RequestBuilder for TestIamPermissions {
5650        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5651            &mut self.0.options
5652        }
5653    }
5654
5655    /// The request builder for [ContentService::list_content][crate::client::ContentService::list_content] calls.
5656    ///
5657    /// # Example
5658    /// ```no_run
5659    /// # use google_cloud_dataplex_v1::builder;
5660    /// use builder::content_service::ListContent;
5661    /// # tokio_test::block_on(async {
5662    /// use gax::paginator::ItemPaginator;
5663    ///
5664    /// let builder = prepare_request_builder();
5665    /// let mut items = builder.by_item();
5666    /// while let Some(result) = items.next().await {
5667    ///   let item = result?;
5668    /// }
5669    /// # gax::Result::<()>::Ok(()) });
5670    ///
5671    /// fn prepare_request_builder() -> ListContent {
5672    ///   # panic!();
5673    ///   // ... details omitted ...
5674    /// }
5675    /// ```
5676    #[derive(Clone, Debug)]
5677    pub struct ListContent(RequestBuilder<crate::model::ListContentRequest>);
5678
5679    impl ListContent {
5680        pub(crate) fn new(
5681            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
5682        ) -> Self {
5683            Self(RequestBuilder::new(stub))
5684        }
5685
5686        /// Sets the full request, replacing any prior values.
5687        pub fn with_request<V: Into<crate::model::ListContentRequest>>(mut self, v: V) -> Self {
5688            self.0.request = v.into();
5689            self
5690        }
5691
5692        /// Sets all the options, replacing any prior values.
5693        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5694            self.0.options = v.into();
5695            self
5696        }
5697
5698        /// Sends the request.
5699        pub async fn send(self) -> Result<crate::model::ListContentResponse> {
5700            (*self.0.stub)
5701                .list_content(self.0.request, self.0.options)
5702                .await
5703                .map(gax::response::Response::into_body)
5704        }
5705
5706        /// Streams each page in the collection.
5707        pub fn by_page(
5708            self,
5709        ) -> impl gax::paginator::Paginator<crate::model::ListContentResponse, gax::error::Error>
5710        {
5711            use std::clone::Clone;
5712            let token = self.0.request.page_token.clone();
5713            let execute = move |token: String| {
5714                let mut builder = self.clone();
5715                builder.0.request = builder.0.request.set_page_token(token);
5716                builder.send()
5717            };
5718            gax::paginator::internal::new_paginator(token, execute)
5719        }
5720
5721        /// Streams each item in the collection.
5722        pub fn by_item(
5723            self,
5724        ) -> impl gax::paginator::ItemPaginator<crate::model::ListContentResponse, gax::error::Error>
5725        {
5726            use gax::paginator::Paginator;
5727            self.by_page().items()
5728        }
5729
5730        /// Sets the value of [parent][crate::model::ListContentRequest::parent].
5731        ///
5732        /// This is a **required** field for requests.
5733        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5734            self.0.request.parent = v.into();
5735            self
5736        }
5737
5738        /// Sets the value of [page_size][crate::model::ListContentRequest::page_size].
5739        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5740            self.0.request.page_size = v.into();
5741            self
5742        }
5743
5744        /// Sets the value of [page_token][crate::model::ListContentRequest::page_token].
5745        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5746            self.0.request.page_token = v.into();
5747            self
5748        }
5749
5750        /// Sets the value of [filter][crate::model::ListContentRequest::filter].
5751        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5752            self.0.request.filter = v.into();
5753            self
5754        }
5755    }
5756
5757    #[doc(hidden)]
5758    impl gax::options::internal::RequestBuilder for ListContent {
5759        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5760            &mut self.0.options
5761        }
5762    }
5763
5764    /// The request builder for [ContentService::list_locations][crate::client::ContentService::list_locations] calls.
5765    ///
5766    /// # Example
5767    /// ```no_run
5768    /// # use google_cloud_dataplex_v1::builder;
5769    /// use builder::content_service::ListLocations;
5770    /// # tokio_test::block_on(async {
5771    /// use gax::paginator::ItemPaginator;
5772    ///
5773    /// let builder = prepare_request_builder();
5774    /// let mut items = builder.by_item();
5775    /// while let Some(result) = items.next().await {
5776    ///   let item = result?;
5777    /// }
5778    /// # gax::Result::<()>::Ok(()) });
5779    ///
5780    /// fn prepare_request_builder() -> ListLocations {
5781    ///   # panic!();
5782    ///   // ... details omitted ...
5783    /// }
5784    /// ```
5785    #[derive(Clone, Debug)]
5786    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
5787
5788    impl ListLocations {
5789        pub(crate) fn new(
5790            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
5791        ) -> Self {
5792            Self(RequestBuilder::new(stub))
5793        }
5794
5795        /// Sets the full request, replacing any prior values.
5796        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
5797            mut self,
5798            v: V,
5799        ) -> Self {
5800            self.0.request = v.into();
5801            self
5802        }
5803
5804        /// Sets all the options, replacing any prior values.
5805        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5806            self.0.options = v.into();
5807            self
5808        }
5809
5810        /// Sends the request.
5811        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
5812            (*self.0.stub)
5813                .list_locations(self.0.request, self.0.options)
5814                .await
5815                .map(gax::response::Response::into_body)
5816        }
5817
5818        /// Streams each page in the collection.
5819        pub fn by_page(
5820            self,
5821        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
5822        {
5823            use std::clone::Clone;
5824            let token = self.0.request.page_token.clone();
5825            let execute = move |token: String| {
5826                let mut builder = self.clone();
5827                builder.0.request = builder.0.request.set_page_token(token);
5828                builder.send()
5829            };
5830            gax::paginator::internal::new_paginator(token, execute)
5831        }
5832
5833        /// Streams each item in the collection.
5834        pub fn by_item(
5835            self,
5836        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
5837        {
5838            use gax::paginator::Paginator;
5839            self.by_page().items()
5840        }
5841
5842        /// Sets the value of [name][location::model::ListLocationsRequest::name].
5843        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5844            self.0.request.name = v.into();
5845            self
5846        }
5847
5848        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
5849        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5850            self.0.request.filter = v.into();
5851            self
5852        }
5853
5854        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
5855        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5856            self.0.request.page_size = v.into();
5857            self
5858        }
5859
5860        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
5861        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5862            self.0.request.page_token = v.into();
5863            self
5864        }
5865    }
5866
5867    #[doc(hidden)]
5868    impl gax::options::internal::RequestBuilder for ListLocations {
5869        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5870            &mut self.0.options
5871        }
5872    }
5873
5874    /// The request builder for [ContentService::get_location][crate::client::ContentService::get_location] calls.
5875    ///
5876    /// # Example
5877    /// ```no_run
5878    /// # use google_cloud_dataplex_v1::builder;
5879    /// use builder::content_service::GetLocation;
5880    /// # tokio_test::block_on(async {
5881    ///
5882    /// let builder = prepare_request_builder();
5883    /// let response = builder.send().await?;
5884    /// # gax::Result::<()>::Ok(()) });
5885    ///
5886    /// fn prepare_request_builder() -> GetLocation {
5887    ///   # panic!();
5888    ///   // ... details omitted ...
5889    /// }
5890    /// ```
5891    #[derive(Clone, Debug)]
5892    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
5893
5894    impl GetLocation {
5895        pub(crate) fn new(
5896            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
5897        ) -> Self {
5898            Self(RequestBuilder::new(stub))
5899        }
5900
5901        /// Sets the full request, replacing any prior values.
5902        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
5903            self.0.request = v.into();
5904            self
5905        }
5906
5907        /// Sets all the options, replacing any prior values.
5908        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5909            self.0.options = v.into();
5910            self
5911        }
5912
5913        /// Sends the request.
5914        pub async fn send(self) -> Result<location::model::Location> {
5915            (*self.0.stub)
5916                .get_location(self.0.request, self.0.options)
5917                .await
5918                .map(gax::response::Response::into_body)
5919        }
5920
5921        /// Sets the value of [name][location::model::GetLocationRequest::name].
5922        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5923            self.0.request.name = v.into();
5924            self
5925        }
5926    }
5927
5928    #[doc(hidden)]
5929    impl gax::options::internal::RequestBuilder for GetLocation {
5930        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5931            &mut self.0.options
5932        }
5933    }
5934
5935    /// The request builder for [ContentService::list_operations][crate::client::ContentService::list_operations] calls.
5936    ///
5937    /// # Example
5938    /// ```no_run
5939    /// # use google_cloud_dataplex_v1::builder;
5940    /// use builder::content_service::ListOperations;
5941    /// # tokio_test::block_on(async {
5942    /// use gax::paginator::ItemPaginator;
5943    ///
5944    /// let builder = prepare_request_builder();
5945    /// let mut items = builder.by_item();
5946    /// while let Some(result) = items.next().await {
5947    ///   let item = result?;
5948    /// }
5949    /// # gax::Result::<()>::Ok(()) });
5950    ///
5951    /// fn prepare_request_builder() -> ListOperations {
5952    ///   # panic!();
5953    ///   // ... details omitted ...
5954    /// }
5955    /// ```
5956    #[derive(Clone, Debug)]
5957    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
5958
5959    impl ListOperations {
5960        pub(crate) fn new(
5961            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
5962        ) -> Self {
5963            Self(RequestBuilder::new(stub))
5964        }
5965
5966        /// Sets the full request, replacing any prior values.
5967        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
5968            mut self,
5969            v: V,
5970        ) -> Self {
5971            self.0.request = v.into();
5972            self
5973        }
5974
5975        /// Sets all the options, replacing any prior values.
5976        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5977            self.0.options = v.into();
5978            self
5979        }
5980
5981        /// Sends the request.
5982        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
5983            (*self.0.stub)
5984                .list_operations(self.0.request, self.0.options)
5985                .await
5986                .map(gax::response::Response::into_body)
5987        }
5988
5989        /// Streams each page in the collection.
5990        pub fn by_page(
5991            self,
5992        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
5993        {
5994            use std::clone::Clone;
5995            let token = self.0.request.page_token.clone();
5996            let execute = move |token: String| {
5997                let mut builder = self.clone();
5998                builder.0.request = builder.0.request.set_page_token(token);
5999                builder.send()
6000            };
6001            gax::paginator::internal::new_paginator(token, execute)
6002        }
6003
6004        /// Streams each item in the collection.
6005        pub fn by_item(
6006            self,
6007        ) -> impl gax::paginator::ItemPaginator<
6008            longrunning::model::ListOperationsResponse,
6009            gax::error::Error,
6010        > {
6011            use gax::paginator::Paginator;
6012            self.by_page().items()
6013        }
6014
6015        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
6016        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6017            self.0.request.name = v.into();
6018            self
6019        }
6020
6021        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
6022        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6023            self.0.request.filter = v.into();
6024            self
6025        }
6026
6027        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
6028        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6029            self.0.request.page_size = v.into();
6030            self
6031        }
6032
6033        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
6034        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6035            self.0.request.page_token = v.into();
6036            self
6037        }
6038    }
6039
6040    #[doc(hidden)]
6041    impl gax::options::internal::RequestBuilder for ListOperations {
6042        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6043            &mut self.0.options
6044        }
6045    }
6046
6047    /// The request builder for [ContentService::get_operation][crate::client::ContentService::get_operation] calls.
6048    ///
6049    /// # Example
6050    /// ```no_run
6051    /// # use google_cloud_dataplex_v1::builder;
6052    /// use builder::content_service::GetOperation;
6053    /// # tokio_test::block_on(async {
6054    ///
6055    /// let builder = prepare_request_builder();
6056    /// let response = builder.send().await?;
6057    /// # gax::Result::<()>::Ok(()) });
6058    ///
6059    /// fn prepare_request_builder() -> GetOperation {
6060    ///   # panic!();
6061    ///   // ... details omitted ...
6062    /// }
6063    /// ```
6064    #[derive(Clone, Debug)]
6065    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
6066
6067    impl GetOperation {
6068        pub(crate) fn new(
6069            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
6070        ) -> Self {
6071            Self(RequestBuilder::new(stub))
6072        }
6073
6074        /// Sets the full request, replacing any prior values.
6075        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
6076            mut self,
6077            v: V,
6078        ) -> Self {
6079            self.0.request = v.into();
6080            self
6081        }
6082
6083        /// Sets all the options, replacing any prior values.
6084        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6085            self.0.options = v.into();
6086            self
6087        }
6088
6089        /// Sends the request.
6090        pub async fn send(self) -> Result<longrunning::model::Operation> {
6091            (*self.0.stub)
6092                .get_operation(self.0.request, self.0.options)
6093                .await
6094                .map(gax::response::Response::into_body)
6095        }
6096
6097        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
6098        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6099            self.0.request.name = v.into();
6100            self
6101        }
6102    }
6103
6104    #[doc(hidden)]
6105    impl gax::options::internal::RequestBuilder for GetOperation {
6106        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6107            &mut self.0.options
6108        }
6109    }
6110
6111    /// The request builder for [ContentService::delete_operation][crate::client::ContentService::delete_operation] calls.
6112    ///
6113    /// # Example
6114    /// ```no_run
6115    /// # use google_cloud_dataplex_v1::builder;
6116    /// use builder::content_service::DeleteOperation;
6117    /// # tokio_test::block_on(async {
6118    ///
6119    /// let builder = prepare_request_builder();
6120    /// let response = builder.send().await?;
6121    /// # gax::Result::<()>::Ok(()) });
6122    ///
6123    /// fn prepare_request_builder() -> DeleteOperation {
6124    ///   # panic!();
6125    ///   // ... details omitted ...
6126    /// }
6127    /// ```
6128    #[derive(Clone, Debug)]
6129    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
6130
6131    impl DeleteOperation {
6132        pub(crate) fn new(
6133            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
6134        ) -> Self {
6135            Self(RequestBuilder::new(stub))
6136        }
6137
6138        /// Sets the full request, replacing any prior values.
6139        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
6140            mut self,
6141            v: V,
6142        ) -> Self {
6143            self.0.request = v.into();
6144            self
6145        }
6146
6147        /// Sets all the options, replacing any prior values.
6148        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6149            self.0.options = v.into();
6150            self
6151        }
6152
6153        /// Sends the request.
6154        pub async fn send(self) -> Result<()> {
6155            (*self.0.stub)
6156                .delete_operation(self.0.request, self.0.options)
6157                .await
6158                .map(gax::response::Response::into_body)
6159        }
6160
6161        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
6162        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6163            self.0.request.name = v.into();
6164            self
6165        }
6166    }
6167
6168    #[doc(hidden)]
6169    impl gax::options::internal::RequestBuilder for DeleteOperation {
6170        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6171            &mut self.0.options
6172        }
6173    }
6174
6175    /// The request builder for [ContentService::cancel_operation][crate::client::ContentService::cancel_operation] calls.
6176    ///
6177    /// # Example
6178    /// ```no_run
6179    /// # use google_cloud_dataplex_v1::builder;
6180    /// use builder::content_service::CancelOperation;
6181    /// # tokio_test::block_on(async {
6182    ///
6183    /// let builder = prepare_request_builder();
6184    /// let response = builder.send().await?;
6185    /// # gax::Result::<()>::Ok(()) });
6186    ///
6187    /// fn prepare_request_builder() -> CancelOperation {
6188    ///   # panic!();
6189    ///   // ... details omitted ...
6190    /// }
6191    /// ```
6192    #[derive(Clone, Debug)]
6193    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
6194
6195    impl CancelOperation {
6196        pub(crate) fn new(
6197            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
6198        ) -> Self {
6199            Self(RequestBuilder::new(stub))
6200        }
6201
6202        /// Sets the full request, replacing any prior values.
6203        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
6204            mut self,
6205            v: V,
6206        ) -> Self {
6207            self.0.request = v.into();
6208            self
6209        }
6210
6211        /// Sets all the options, replacing any prior values.
6212        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6213            self.0.options = v.into();
6214            self
6215        }
6216
6217        /// Sends the request.
6218        pub async fn send(self) -> Result<()> {
6219            (*self.0.stub)
6220                .cancel_operation(self.0.request, self.0.options)
6221                .await
6222                .map(gax::response::Response::into_body)
6223        }
6224
6225        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
6226        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6227            self.0.request.name = v.into();
6228            self
6229        }
6230    }
6231
6232    #[doc(hidden)]
6233    impl gax::options::internal::RequestBuilder for CancelOperation {
6234        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6235            &mut self.0.options
6236        }
6237    }
6238}
6239
6240pub mod data_taxonomy_service {
6241    use crate::Result;
6242
6243    /// A builder for [DataTaxonomyService][crate::client::DataTaxonomyService].
6244    ///
6245    /// ```
6246    /// # tokio_test::block_on(async {
6247    /// # use google_cloud_dataplex_v1::*;
6248    /// # use builder::data_taxonomy_service::ClientBuilder;
6249    /// # use client::DataTaxonomyService;
6250    /// let builder : ClientBuilder = DataTaxonomyService::builder();
6251    /// let client = builder
6252    ///     .with_endpoint("https://dataplex.googleapis.com")
6253    ///     .build().await?;
6254    /// # gax::client_builder::Result::<()>::Ok(()) });
6255    /// ```
6256    pub type ClientBuilder =
6257        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
6258
6259    pub(crate) mod client {
6260        use super::super::super::client::DataTaxonomyService;
6261        pub struct Factory;
6262        impl gax::client_builder::internal::ClientFactory for Factory {
6263            type Client = DataTaxonomyService;
6264            type Credentials = gaxi::options::Credentials;
6265            async fn build(
6266                self,
6267                config: gaxi::options::ClientConfig,
6268            ) -> gax::client_builder::Result<Self::Client> {
6269                Self::Client::new(config).await
6270            }
6271        }
6272    }
6273
6274    /// Common implementation for [crate::client::DataTaxonomyService] request builders.
6275    #[derive(Clone, Debug)]
6276    pub(crate) struct RequestBuilder<R: std::default::Default> {
6277        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
6278        request: R,
6279        options: gax::options::RequestOptions,
6280    }
6281
6282    impl<R> RequestBuilder<R>
6283    where
6284        R: std::default::Default,
6285    {
6286        pub(crate) fn new(
6287            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
6288        ) -> Self {
6289            Self {
6290                stub,
6291                request: R::default(),
6292                options: gax::options::RequestOptions::default(),
6293            }
6294        }
6295    }
6296
6297    /// The request builder for [DataTaxonomyService::create_data_taxonomy][crate::client::DataTaxonomyService::create_data_taxonomy] calls.
6298    ///
6299    /// # Example
6300    /// ```no_run
6301    /// # use google_cloud_dataplex_v1::builder;
6302    /// use builder::data_taxonomy_service::CreateDataTaxonomy;
6303    /// # tokio_test::block_on(async {
6304    /// use lro::Poller;
6305    ///
6306    /// let builder = prepare_request_builder();
6307    /// let response = builder.poller().until_done().await?;
6308    /// # gax::Result::<()>::Ok(()) });
6309    ///
6310    /// fn prepare_request_builder() -> CreateDataTaxonomy {
6311    ///   # panic!();
6312    ///   // ... details omitted ...
6313    /// }
6314    /// ```
6315    #[derive(Clone, Debug)]
6316    pub struct CreateDataTaxonomy(RequestBuilder<crate::model::CreateDataTaxonomyRequest>);
6317
6318    impl CreateDataTaxonomy {
6319        pub(crate) fn new(
6320            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
6321        ) -> Self {
6322            Self(RequestBuilder::new(stub))
6323        }
6324
6325        /// Sets the full request, replacing any prior values.
6326        pub fn with_request<V: Into<crate::model::CreateDataTaxonomyRequest>>(
6327            mut self,
6328            v: V,
6329        ) -> Self {
6330            self.0.request = v.into();
6331            self
6332        }
6333
6334        /// Sets all the options, replacing any prior values.
6335        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6336            self.0.options = v.into();
6337            self
6338        }
6339
6340        /// Sends the request.
6341        ///
6342        /// # Long running operations
6343        ///
6344        /// This starts, but does not poll, a longrunning operation. More information
6345        /// on [create_data_taxonomy][crate::client::DataTaxonomyService::create_data_taxonomy].
6346        pub async fn send(self) -> Result<longrunning::model::Operation> {
6347            (*self.0.stub)
6348                .create_data_taxonomy(self.0.request, self.0.options)
6349                .await
6350                .map(gax::response::Response::into_body)
6351        }
6352
6353        /// Creates a [Poller][lro::Poller] to work with `create_data_taxonomy`.
6354        pub fn poller(
6355            self,
6356        ) -> impl lro::Poller<crate::model::DataTaxonomy, crate::model::OperationMetadata> {
6357            type Operation = lro::internal::Operation<
6358                crate::model::DataTaxonomy,
6359                crate::model::OperationMetadata,
6360            >;
6361            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6362            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6363
6364            let stub = self.0.stub.clone();
6365            let mut options = self.0.options.clone();
6366            options.set_retry_policy(gax::retry_policy::NeverRetry);
6367            let query = move |name| {
6368                let stub = stub.clone();
6369                let options = options.clone();
6370                async {
6371                    let op = GetOperation::new(stub)
6372                        .set_name(name)
6373                        .with_options(options)
6374                        .send()
6375                        .await?;
6376                    Ok(Operation::new(op))
6377                }
6378            };
6379
6380            let start = move || async {
6381                let op = self.send().await?;
6382                Ok(Operation::new(op))
6383            };
6384
6385            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6386        }
6387
6388        /// Sets the value of [parent][crate::model::CreateDataTaxonomyRequest::parent].
6389        ///
6390        /// This is a **required** field for requests.
6391        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6392            self.0.request.parent = v.into();
6393            self
6394        }
6395
6396        /// Sets the value of [data_taxonomy_id][crate::model::CreateDataTaxonomyRequest::data_taxonomy_id].
6397        ///
6398        /// This is a **required** field for requests.
6399        pub fn set_data_taxonomy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6400            self.0.request.data_taxonomy_id = v.into();
6401            self
6402        }
6403
6404        /// Sets the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
6405        ///
6406        /// This is a **required** field for requests.
6407        pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
6408        where
6409            T: std::convert::Into<crate::model::DataTaxonomy>,
6410        {
6411            self.0.request.data_taxonomy = std::option::Option::Some(v.into());
6412            self
6413        }
6414
6415        /// Sets or clears the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
6416        ///
6417        /// This is a **required** field for requests.
6418        pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
6419        where
6420            T: std::convert::Into<crate::model::DataTaxonomy>,
6421        {
6422            self.0.request.data_taxonomy = v.map(|x| x.into());
6423            self
6424        }
6425
6426        /// Sets the value of [validate_only][crate::model::CreateDataTaxonomyRequest::validate_only].
6427        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
6428            self.0.request.validate_only = v.into();
6429            self
6430        }
6431    }
6432
6433    #[doc(hidden)]
6434    impl gax::options::internal::RequestBuilder for CreateDataTaxonomy {
6435        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6436            &mut self.0.options
6437        }
6438    }
6439
6440    /// The request builder for [DataTaxonomyService::update_data_taxonomy][crate::client::DataTaxonomyService::update_data_taxonomy] calls.
6441    ///
6442    /// # Example
6443    /// ```no_run
6444    /// # use google_cloud_dataplex_v1::builder;
6445    /// use builder::data_taxonomy_service::UpdateDataTaxonomy;
6446    /// # tokio_test::block_on(async {
6447    /// use lro::Poller;
6448    ///
6449    /// let builder = prepare_request_builder();
6450    /// let response = builder.poller().until_done().await?;
6451    /// # gax::Result::<()>::Ok(()) });
6452    ///
6453    /// fn prepare_request_builder() -> UpdateDataTaxonomy {
6454    ///   # panic!();
6455    ///   // ... details omitted ...
6456    /// }
6457    /// ```
6458    #[derive(Clone, Debug)]
6459    pub struct UpdateDataTaxonomy(RequestBuilder<crate::model::UpdateDataTaxonomyRequest>);
6460
6461    impl UpdateDataTaxonomy {
6462        pub(crate) fn new(
6463            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
6464        ) -> Self {
6465            Self(RequestBuilder::new(stub))
6466        }
6467
6468        /// Sets the full request, replacing any prior values.
6469        pub fn with_request<V: Into<crate::model::UpdateDataTaxonomyRequest>>(
6470            mut self,
6471            v: V,
6472        ) -> Self {
6473            self.0.request = v.into();
6474            self
6475        }
6476
6477        /// Sets all the options, replacing any prior values.
6478        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6479            self.0.options = v.into();
6480            self
6481        }
6482
6483        /// Sends the request.
6484        ///
6485        /// # Long running operations
6486        ///
6487        /// This starts, but does not poll, a longrunning operation. More information
6488        /// on [update_data_taxonomy][crate::client::DataTaxonomyService::update_data_taxonomy].
6489        pub async fn send(self) -> Result<longrunning::model::Operation> {
6490            (*self.0.stub)
6491                .update_data_taxonomy(self.0.request, self.0.options)
6492                .await
6493                .map(gax::response::Response::into_body)
6494        }
6495
6496        /// Creates a [Poller][lro::Poller] to work with `update_data_taxonomy`.
6497        pub fn poller(
6498            self,
6499        ) -> impl lro::Poller<crate::model::DataTaxonomy, crate::model::OperationMetadata> {
6500            type Operation = lro::internal::Operation<
6501                crate::model::DataTaxonomy,
6502                crate::model::OperationMetadata,
6503            >;
6504            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6505            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6506
6507            let stub = self.0.stub.clone();
6508            let mut options = self.0.options.clone();
6509            options.set_retry_policy(gax::retry_policy::NeverRetry);
6510            let query = move |name| {
6511                let stub = stub.clone();
6512                let options = options.clone();
6513                async {
6514                    let op = GetOperation::new(stub)
6515                        .set_name(name)
6516                        .with_options(options)
6517                        .send()
6518                        .await?;
6519                    Ok(Operation::new(op))
6520                }
6521            };
6522
6523            let start = move || async {
6524                let op = self.send().await?;
6525                Ok(Operation::new(op))
6526            };
6527
6528            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6529        }
6530
6531        /// Sets the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
6532        ///
6533        /// This is a **required** field for requests.
6534        pub fn set_update_mask<T>(mut self, v: T) -> Self
6535        where
6536            T: std::convert::Into<wkt::FieldMask>,
6537        {
6538            self.0.request.update_mask = std::option::Option::Some(v.into());
6539            self
6540        }
6541
6542        /// Sets or clears the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
6543        ///
6544        /// This is a **required** field for requests.
6545        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6546        where
6547            T: std::convert::Into<wkt::FieldMask>,
6548        {
6549            self.0.request.update_mask = v.map(|x| x.into());
6550            self
6551        }
6552
6553        /// Sets the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
6554        ///
6555        /// This is a **required** field for requests.
6556        pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
6557        where
6558            T: std::convert::Into<crate::model::DataTaxonomy>,
6559        {
6560            self.0.request.data_taxonomy = std::option::Option::Some(v.into());
6561            self
6562        }
6563
6564        /// Sets or clears the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
6565        ///
6566        /// This is a **required** field for requests.
6567        pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
6568        where
6569            T: std::convert::Into<crate::model::DataTaxonomy>,
6570        {
6571            self.0.request.data_taxonomy = v.map(|x| x.into());
6572            self
6573        }
6574
6575        /// Sets the value of [validate_only][crate::model::UpdateDataTaxonomyRequest::validate_only].
6576        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
6577            self.0.request.validate_only = v.into();
6578            self
6579        }
6580    }
6581
6582    #[doc(hidden)]
6583    impl gax::options::internal::RequestBuilder for UpdateDataTaxonomy {
6584        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6585            &mut self.0.options
6586        }
6587    }
6588
6589    /// The request builder for [DataTaxonomyService::delete_data_taxonomy][crate::client::DataTaxonomyService::delete_data_taxonomy] calls.
6590    ///
6591    /// # Example
6592    /// ```no_run
6593    /// # use google_cloud_dataplex_v1::builder;
6594    /// use builder::data_taxonomy_service::DeleteDataTaxonomy;
6595    /// # tokio_test::block_on(async {
6596    /// use lro::Poller;
6597    ///
6598    /// let builder = prepare_request_builder();
6599    /// let response = builder.poller().until_done().await?;
6600    /// # gax::Result::<()>::Ok(()) });
6601    ///
6602    /// fn prepare_request_builder() -> DeleteDataTaxonomy {
6603    ///   # panic!();
6604    ///   // ... details omitted ...
6605    /// }
6606    /// ```
6607    #[derive(Clone, Debug)]
6608    pub struct DeleteDataTaxonomy(RequestBuilder<crate::model::DeleteDataTaxonomyRequest>);
6609
6610    impl DeleteDataTaxonomy {
6611        pub(crate) fn new(
6612            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
6613        ) -> Self {
6614            Self(RequestBuilder::new(stub))
6615        }
6616
6617        /// Sets the full request, replacing any prior values.
6618        pub fn with_request<V: Into<crate::model::DeleteDataTaxonomyRequest>>(
6619            mut self,
6620            v: V,
6621        ) -> Self {
6622            self.0.request = v.into();
6623            self
6624        }
6625
6626        /// Sets all the options, replacing any prior values.
6627        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6628            self.0.options = v.into();
6629            self
6630        }
6631
6632        /// Sends the request.
6633        ///
6634        /// # Long running operations
6635        ///
6636        /// This starts, but does not poll, a longrunning operation. More information
6637        /// on [delete_data_taxonomy][crate::client::DataTaxonomyService::delete_data_taxonomy].
6638        pub async fn send(self) -> Result<longrunning::model::Operation> {
6639            (*self.0.stub)
6640                .delete_data_taxonomy(self.0.request, self.0.options)
6641                .await
6642                .map(gax::response::Response::into_body)
6643        }
6644
6645        /// Creates a [Poller][lro::Poller] to work with `delete_data_taxonomy`.
6646        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
6647            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6648            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6649            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6650
6651            let stub = self.0.stub.clone();
6652            let mut options = self.0.options.clone();
6653            options.set_retry_policy(gax::retry_policy::NeverRetry);
6654            let query = move |name| {
6655                let stub = stub.clone();
6656                let options = options.clone();
6657                async {
6658                    let op = GetOperation::new(stub)
6659                        .set_name(name)
6660                        .with_options(options)
6661                        .send()
6662                        .await?;
6663                    Ok(Operation::new(op))
6664                }
6665            };
6666
6667            let start = move || async {
6668                let op = self.send().await?;
6669                Ok(Operation::new(op))
6670            };
6671
6672            lro::internal::new_unit_response_poller(
6673                polling_error_policy,
6674                polling_backoff_policy,
6675                start,
6676                query,
6677            )
6678        }
6679
6680        /// Sets the value of [name][crate::model::DeleteDataTaxonomyRequest::name].
6681        ///
6682        /// This is a **required** field for requests.
6683        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6684            self.0.request.name = v.into();
6685            self
6686        }
6687
6688        /// Sets the value of [etag][crate::model::DeleteDataTaxonomyRequest::etag].
6689        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
6690            self.0.request.etag = v.into();
6691            self
6692        }
6693    }
6694
6695    #[doc(hidden)]
6696    impl gax::options::internal::RequestBuilder for DeleteDataTaxonomy {
6697        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6698            &mut self.0.options
6699        }
6700    }
6701
6702    /// The request builder for [DataTaxonomyService::list_data_taxonomies][crate::client::DataTaxonomyService::list_data_taxonomies] calls.
6703    ///
6704    /// # Example
6705    /// ```no_run
6706    /// # use google_cloud_dataplex_v1::builder;
6707    /// use builder::data_taxonomy_service::ListDataTaxonomies;
6708    /// # tokio_test::block_on(async {
6709    /// use gax::paginator::ItemPaginator;
6710    ///
6711    /// let builder = prepare_request_builder();
6712    /// let mut items = builder.by_item();
6713    /// while let Some(result) = items.next().await {
6714    ///   let item = result?;
6715    /// }
6716    /// # gax::Result::<()>::Ok(()) });
6717    ///
6718    /// fn prepare_request_builder() -> ListDataTaxonomies {
6719    ///   # panic!();
6720    ///   // ... details omitted ...
6721    /// }
6722    /// ```
6723    #[derive(Clone, Debug)]
6724    pub struct ListDataTaxonomies(RequestBuilder<crate::model::ListDataTaxonomiesRequest>);
6725
6726    impl ListDataTaxonomies {
6727        pub(crate) fn new(
6728            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
6729        ) -> Self {
6730            Self(RequestBuilder::new(stub))
6731        }
6732
6733        /// Sets the full request, replacing any prior values.
6734        pub fn with_request<V: Into<crate::model::ListDataTaxonomiesRequest>>(
6735            mut self,
6736            v: V,
6737        ) -> Self {
6738            self.0.request = v.into();
6739            self
6740        }
6741
6742        /// Sets all the options, replacing any prior values.
6743        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6744            self.0.options = v.into();
6745            self
6746        }
6747
6748        /// Sends the request.
6749        pub async fn send(self) -> Result<crate::model::ListDataTaxonomiesResponse> {
6750            (*self.0.stub)
6751                .list_data_taxonomies(self.0.request, self.0.options)
6752                .await
6753                .map(gax::response::Response::into_body)
6754        }
6755
6756        /// Streams each page in the collection.
6757        pub fn by_page(
6758            self,
6759        ) -> impl gax::paginator::Paginator<crate::model::ListDataTaxonomiesResponse, gax::error::Error>
6760        {
6761            use std::clone::Clone;
6762            let token = self.0.request.page_token.clone();
6763            let execute = move |token: String| {
6764                let mut builder = self.clone();
6765                builder.0.request = builder.0.request.set_page_token(token);
6766                builder.send()
6767            };
6768            gax::paginator::internal::new_paginator(token, execute)
6769        }
6770
6771        /// Streams each item in the collection.
6772        pub fn by_item(
6773            self,
6774        ) -> impl gax::paginator::ItemPaginator<
6775            crate::model::ListDataTaxonomiesResponse,
6776            gax::error::Error,
6777        > {
6778            use gax::paginator::Paginator;
6779            self.by_page().items()
6780        }
6781
6782        /// Sets the value of [parent][crate::model::ListDataTaxonomiesRequest::parent].
6783        ///
6784        /// This is a **required** field for requests.
6785        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6786            self.0.request.parent = v.into();
6787            self
6788        }
6789
6790        /// Sets the value of [page_size][crate::model::ListDataTaxonomiesRequest::page_size].
6791        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6792            self.0.request.page_size = v.into();
6793            self
6794        }
6795
6796        /// Sets the value of [page_token][crate::model::ListDataTaxonomiesRequest::page_token].
6797        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6798            self.0.request.page_token = v.into();
6799            self
6800        }
6801
6802        /// Sets the value of [filter][crate::model::ListDataTaxonomiesRequest::filter].
6803        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6804            self.0.request.filter = v.into();
6805            self
6806        }
6807
6808        /// Sets the value of [order_by][crate::model::ListDataTaxonomiesRequest::order_by].
6809        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6810            self.0.request.order_by = v.into();
6811            self
6812        }
6813    }
6814
6815    #[doc(hidden)]
6816    impl gax::options::internal::RequestBuilder for ListDataTaxonomies {
6817        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6818            &mut self.0.options
6819        }
6820    }
6821
6822    /// The request builder for [DataTaxonomyService::get_data_taxonomy][crate::client::DataTaxonomyService::get_data_taxonomy] calls.
6823    ///
6824    /// # Example
6825    /// ```no_run
6826    /// # use google_cloud_dataplex_v1::builder;
6827    /// use builder::data_taxonomy_service::GetDataTaxonomy;
6828    /// # tokio_test::block_on(async {
6829    ///
6830    /// let builder = prepare_request_builder();
6831    /// let response = builder.send().await?;
6832    /// # gax::Result::<()>::Ok(()) });
6833    ///
6834    /// fn prepare_request_builder() -> GetDataTaxonomy {
6835    ///   # panic!();
6836    ///   // ... details omitted ...
6837    /// }
6838    /// ```
6839    #[derive(Clone, Debug)]
6840    pub struct GetDataTaxonomy(RequestBuilder<crate::model::GetDataTaxonomyRequest>);
6841
6842    impl GetDataTaxonomy {
6843        pub(crate) fn new(
6844            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
6845        ) -> Self {
6846            Self(RequestBuilder::new(stub))
6847        }
6848
6849        /// Sets the full request, replacing any prior values.
6850        pub fn with_request<V: Into<crate::model::GetDataTaxonomyRequest>>(mut self, v: V) -> Self {
6851            self.0.request = v.into();
6852            self
6853        }
6854
6855        /// Sets all the options, replacing any prior values.
6856        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6857            self.0.options = v.into();
6858            self
6859        }
6860
6861        /// Sends the request.
6862        pub async fn send(self) -> Result<crate::model::DataTaxonomy> {
6863            (*self.0.stub)
6864                .get_data_taxonomy(self.0.request, self.0.options)
6865                .await
6866                .map(gax::response::Response::into_body)
6867        }
6868
6869        /// Sets the value of [name][crate::model::GetDataTaxonomyRequest::name].
6870        ///
6871        /// This is a **required** field for requests.
6872        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6873            self.0.request.name = v.into();
6874            self
6875        }
6876    }
6877
6878    #[doc(hidden)]
6879    impl gax::options::internal::RequestBuilder for GetDataTaxonomy {
6880        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6881            &mut self.0.options
6882        }
6883    }
6884
6885    /// The request builder for [DataTaxonomyService::create_data_attribute_binding][crate::client::DataTaxonomyService::create_data_attribute_binding] calls.
6886    ///
6887    /// # Example
6888    /// ```no_run
6889    /// # use google_cloud_dataplex_v1::builder;
6890    /// use builder::data_taxonomy_service::CreateDataAttributeBinding;
6891    /// # tokio_test::block_on(async {
6892    /// use lro::Poller;
6893    ///
6894    /// let builder = prepare_request_builder();
6895    /// let response = builder.poller().until_done().await?;
6896    /// # gax::Result::<()>::Ok(()) });
6897    ///
6898    /// fn prepare_request_builder() -> CreateDataAttributeBinding {
6899    ///   # panic!();
6900    ///   // ... details omitted ...
6901    /// }
6902    /// ```
6903    #[derive(Clone, Debug)]
6904    pub struct CreateDataAttributeBinding(
6905        RequestBuilder<crate::model::CreateDataAttributeBindingRequest>,
6906    );
6907
6908    impl CreateDataAttributeBinding {
6909        pub(crate) fn new(
6910            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
6911        ) -> Self {
6912            Self(RequestBuilder::new(stub))
6913        }
6914
6915        /// Sets the full request, replacing any prior values.
6916        pub fn with_request<V: Into<crate::model::CreateDataAttributeBindingRequest>>(
6917            mut self,
6918            v: V,
6919        ) -> Self {
6920            self.0.request = v.into();
6921            self
6922        }
6923
6924        /// Sets all the options, replacing any prior values.
6925        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6926            self.0.options = v.into();
6927            self
6928        }
6929
6930        /// Sends the request.
6931        ///
6932        /// # Long running operations
6933        ///
6934        /// This starts, but does not poll, a longrunning operation. More information
6935        /// on [create_data_attribute_binding][crate::client::DataTaxonomyService::create_data_attribute_binding].
6936        pub async fn send(self) -> Result<longrunning::model::Operation> {
6937            (*self.0.stub)
6938                .create_data_attribute_binding(self.0.request, self.0.options)
6939                .await
6940                .map(gax::response::Response::into_body)
6941        }
6942
6943        /// Creates a [Poller][lro::Poller] to work with `create_data_attribute_binding`.
6944        pub fn poller(
6945            self,
6946        ) -> impl lro::Poller<crate::model::DataAttributeBinding, crate::model::OperationMetadata>
6947        {
6948            type Operation = lro::internal::Operation<
6949                crate::model::DataAttributeBinding,
6950                crate::model::OperationMetadata,
6951            >;
6952            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6953            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6954
6955            let stub = self.0.stub.clone();
6956            let mut options = self.0.options.clone();
6957            options.set_retry_policy(gax::retry_policy::NeverRetry);
6958            let query = move |name| {
6959                let stub = stub.clone();
6960                let options = options.clone();
6961                async {
6962                    let op = GetOperation::new(stub)
6963                        .set_name(name)
6964                        .with_options(options)
6965                        .send()
6966                        .await?;
6967                    Ok(Operation::new(op))
6968                }
6969            };
6970
6971            let start = move || async {
6972                let op = self.send().await?;
6973                Ok(Operation::new(op))
6974            };
6975
6976            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6977        }
6978
6979        /// Sets the value of [parent][crate::model::CreateDataAttributeBindingRequest::parent].
6980        ///
6981        /// This is a **required** field for requests.
6982        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6983            self.0.request.parent = v.into();
6984            self
6985        }
6986
6987        /// Sets the value of [data_attribute_binding_id][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding_id].
6988        ///
6989        /// This is a **required** field for requests.
6990        pub fn set_data_attribute_binding_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6991            self.0.request.data_attribute_binding_id = v.into();
6992            self
6993        }
6994
6995        /// Sets the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
6996        ///
6997        /// This is a **required** field for requests.
6998        pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
6999        where
7000            T: std::convert::Into<crate::model::DataAttributeBinding>,
7001        {
7002            self.0.request.data_attribute_binding = std::option::Option::Some(v.into());
7003            self
7004        }
7005
7006        /// Sets or clears the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
7007        ///
7008        /// This is a **required** field for requests.
7009        pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
7010        where
7011            T: std::convert::Into<crate::model::DataAttributeBinding>,
7012        {
7013            self.0.request.data_attribute_binding = v.map(|x| x.into());
7014            self
7015        }
7016
7017        /// Sets the value of [validate_only][crate::model::CreateDataAttributeBindingRequest::validate_only].
7018        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
7019            self.0.request.validate_only = v.into();
7020            self
7021        }
7022    }
7023
7024    #[doc(hidden)]
7025    impl gax::options::internal::RequestBuilder for CreateDataAttributeBinding {
7026        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7027            &mut self.0.options
7028        }
7029    }
7030
7031    /// The request builder for [DataTaxonomyService::update_data_attribute_binding][crate::client::DataTaxonomyService::update_data_attribute_binding] calls.
7032    ///
7033    /// # Example
7034    /// ```no_run
7035    /// # use google_cloud_dataplex_v1::builder;
7036    /// use builder::data_taxonomy_service::UpdateDataAttributeBinding;
7037    /// # tokio_test::block_on(async {
7038    /// use lro::Poller;
7039    ///
7040    /// let builder = prepare_request_builder();
7041    /// let response = builder.poller().until_done().await?;
7042    /// # gax::Result::<()>::Ok(()) });
7043    ///
7044    /// fn prepare_request_builder() -> UpdateDataAttributeBinding {
7045    ///   # panic!();
7046    ///   // ... details omitted ...
7047    /// }
7048    /// ```
7049    #[derive(Clone, Debug)]
7050    pub struct UpdateDataAttributeBinding(
7051        RequestBuilder<crate::model::UpdateDataAttributeBindingRequest>,
7052    );
7053
7054    impl UpdateDataAttributeBinding {
7055        pub(crate) fn new(
7056            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
7057        ) -> Self {
7058            Self(RequestBuilder::new(stub))
7059        }
7060
7061        /// Sets the full request, replacing any prior values.
7062        pub fn with_request<V: Into<crate::model::UpdateDataAttributeBindingRequest>>(
7063            mut self,
7064            v: V,
7065        ) -> Self {
7066            self.0.request = v.into();
7067            self
7068        }
7069
7070        /// Sets all the options, replacing any prior values.
7071        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7072            self.0.options = v.into();
7073            self
7074        }
7075
7076        /// Sends the request.
7077        ///
7078        /// # Long running operations
7079        ///
7080        /// This starts, but does not poll, a longrunning operation. More information
7081        /// on [update_data_attribute_binding][crate::client::DataTaxonomyService::update_data_attribute_binding].
7082        pub async fn send(self) -> Result<longrunning::model::Operation> {
7083            (*self.0.stub)
7084                .update_data_attribute_binding(self.0.request, self.0.options)
7085                .await
7086                .map(gax::response::Response::into_body)
7087        }
7088
7089        /// Creates a [Poller][lro::Poller] to work with `update_data_attribute_binding`.
7090        pub fn poller(
7091            self,
7092        ) -> impl lro::Poller<crate::model::DataAttributeBinding, crate::model::OperationMetadata>
7093        {
7094            type Operation = lro::internal::Operation<
7095                crate::model::DataAttributeBinding,
7096                crate::model::OperationMetadata,
7097            >;
7098            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7099            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7100
7101            let stub = self.0.stub.clone();
7102            let mut options = self.0.options.clone();
7103            options.set_retry_policy(gax::retry_policy::NeverRetry);
7104            let query = move |name| {
7105                let stub = stub.clone();
7106                let options = options.clone();
7107                async {
7108                    let op = GetOperation::new(stub)
7109                        .set_name(name)
7110                        .with_options(options)
7111                        .send()
7112                        .await?;
7113                    Ok(Operation::new(op))
7114                }
7115            };
7116
7117            let start = move || async {
7118                let op = self.send().await?;
7119                Ok(Operation::new(op))
7120            };
7121
7122            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
7123        }
7124
7125        /// Sets the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
7126        ///
7127        /// This is a **required** field for requests.
7128        pub fn set_update_mask<T>(mut self, v: T) -> Self
7129        where
7130            T: std::convert::Into<wkt::FieldMask>,
7131        {
7132            self.0.request.update_mask = std::option::Option::Some(v.into());
7133            self
7134        }
7135
7136        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
7137        ///
7138        /// This is a **required** field for requests.
7139        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7140        where
7141            T: std::convert::Into<wkt::FieldMask>,
7142        {
7143            self.0.request.update_mask = v.map(|x| x.into());
7144            self
7145        }
7146
7147        /// Sets the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
7148        ///
7149        /// This is a **required** field for requests.
7150        pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
7151        where
7152            T: std::convert::Into<crate::model::DataAttributeBinding>,
7153        {
7154            self.0.request.data_attribute_binding = std::option::Option::Some(v.into());
7155            self
7156        }
7157
7158        /// Sets or clears the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
7159        ///
7160        /// This is a **required** field for requests.
7161        pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
7162        where
7163            T: std::convert::Into<crate::model::DataAttributeBinding>,
7164        {
7165            self.0.request.data_attribute_binding = v.map(|x| x.into());
7166            self
7167        }
7168
7169        /// Sets the value of [validate_only][crate::model::UpdateDataAttributeBindingRequest::validate_only].
7170        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
7171            self.0.request.validate_only = v.into();
7172            self
7173        }
7174    }
7175
7176    #[doc(hidden)]
7177    impl gax::options::internal::RequestBuilder for UpdateDataAttributeBinding {
7178        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7179            &mut self.0.options
7180        }
7181    }
7182
7183    /// The request builder for [DataTaxonomyService::delete_data_attribute_binding][crate::client::DataTaxonomyService::delete_data_attribute_binding] calls.
7184    ///
7185    /// # Example
7186    /// ```no_run
7187    /// # use google_cloud_dataplex_v1::builder;
7188    /// use builder::data_taxonomy_service::DeleteDataAttributeBinding;
7189    /// # tokio_test::block_on(async {
7190    /// use lro::Poller;
7191    ///
7192    /// let builder = prepare_request_builder();
7193    /// let response = builder.poller().until_done().await?;
7194    /// # gax::Result::<()>::Ok(()) });
7195    ///
7196    /// fn prepare_request_builder() -> DeleteDataAttributeBinding {
7197    ///   # panic!();
7198    ///   // ... details omitted ...
7199    /// }
7200    /// ```
7201    #[derive(Clone, Debug)]
7202    pub struct DeleteDataAttributeBinding(
7203        RequestBuilder<crate::model::DeleteDataAttributeBindingRequest>,
7204    );
7205
7206    impl DeleteDataAttributeBinding {
7207        pub(crate) fn new(
7208            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
7209        ) -> Self {
7210            Self(RequestBuilder::new(stub))
7211        }
7212
7213        /// Sets the full request, replacing any prior values.
7214        pub fn with_request<V: Into<crate::model::DeleteDataAttributeBindingRequest>>(
7215            mut self,
7216            v: V,
7217        ) -> Self {
7218            self.0.request = v.into();
7219            self
7220        }
7221
7222        /// Sets all the options, replacing any prior values.
7223        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7224            self.0.options = v.into();
7225            self
7226        }
7227
7228        /// Sends the request.
7229        ///
7230        /// # Long running operations
7231        ///
7232        /// This starts, but does not poll, a longrunning operation. More information
7233        /// on [delete_data_attribute_binding][crate::client::DataTaxonomyService::delete_data_attribute_binding].
7234        pub async fn send(self) -> Result<longrunning::model::Operation> {
7235            (*self.0.stub)
7236                .delete_data_attribute_binding(self.0.request, self.0.options)
7237                .await
7238                .map(gax::response::Response::into_body)
7239        }
7240
7241        /// Creates a [Poller][lro::Poller] to work with `delete_data_attribute_binding`.
7242        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
7243            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7244            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7245            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7246
7247            let stub = self.0.stub.clone();
7248            let mut options = self.0.options.clone();
7249            options.set_retry_policy(gax::retry_policy::NeverRetry);
7250            let query = move |name| {
7251                let stub = stub.clone();
7252                let options = options.clone();
7253                async {
7254                    let op = GetOperation::new(stub)
7255                        .set_name(name)
7256                        .with_options(options)
7257                        .send()
7258                        .await?;
7259                    Ok(Operation::new(op))
7260                }
7261            };
7262
7263            let start = move || async {
7264                let op = self.send().await?;
7265                Ok(Operation::new(op))
7266            };
7267
7268            lro::internal::new_unit_response_poller(
7269                polling_error_policy,
7270                polling_backoff_policy,
7271                start,
7272                query,
7273            )
7274        }
7275
7276        /// Sets the value of [name][crate::model::DeleteDataAttributeBindingRequest::name].
7277        ///
7278        /// This is a **required** field for requests.
7279        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7280            self.0.request.name = v.into();
7281            self
7282        }
7283
7284        /// Sets the value of [etag][crate::model::DeleteDataAttributeBindingRequest::etag].
7285        ///
7286        /// This is a **required** field for requests.
7287        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
7288            self.0.request.etag = v.into();
7289            self
7290        }
7291    }
7292
7293    #[doc(hidden)]
7294    impl gax::options::internal::RequestBuilder for DeleteDataAttributeBinding {
7295        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7296            &mut self.0.options
7297        }
7298    }
7299
7300    /// The request builder for [DataTaxonomyService::list_data_attribute_bindings][crate::client::DataTaxonomyService::list_data_attribute_bindings] calls.
7301    ///
7302    /// # Example
7303    /// ```no_run
7304    /// # use google_cloud_dataplex_v1::builder;
7305    /// use builder::data_taxonomy_service::ListDataAttributeBindings;
7306    /// # tokio_test::block_on(async {
7307    /// use gax::paginator::ItemPaginator;
7308    ///
7309    /// let builder = prepare_request_builder();
7310    /// let mut items = builder.by_item();
7311    /// while let Some(result) = items.next().await {
7312    ///   let item = result?;
7313    /// }
7314    /// # gax::Result::<()>::Ok(()) });
7315    ///
7316    /// fn prepare_request_builder() -> ListDataAttributeBindings {
7317    ///   # panic!();
7318    ///   // ... details omitted ...
7319    /// }
7320    /// ```
7321    #[derive(Clone, Debug)]
7322    pub struct ListDataAttributeBindings(
7323        RequestBuilder<crate::model::ListDataAttributeBindingsRequest>,
7324    );
7325
7326    impl ListDataAttributeBindings {
7327        pub(crate) fn new(
7328            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
7329        ) -> Self {
7330            Self(RequestBuilder::new(stub))
7331        }
7332
7333        /// Sets the full request, replacing any prior values.
7334        pub fn with_request<V: Into<crate::model::ListDataAttributeBindingsRequest>>(
7335            mut self,
7336            v: V,
7337        ) -> Self {
7338            self.0.request = v.into();
7339            self
7340        }
7341
7342        /// Sets all the options, replacing any prior values.
7343        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7344            self.0.options = v.into();
7345            self
7346        }
7347
7348        /// Sends the request.
7349        pub async fn send(self) -> Result<crate::model::ListDataAttributeBindingsResponse> {
7350            (*self.0.stub)
7351                .list_data_attribute_bindings(self.0.request, self.0.options)
7352                .await
7353                .map(gax::response::Response::into_body)
7354        }
7355
7356        /// Streams each page in the collection.
7357        pub fn by_page(
7358            self,
7359        ) -> impl gax::paginator::Paginator<
7360            crate::model::ListDataAttributeBindingsResponse,
7361            gax::error::Error,
7362        > {
7363            use std::clone::Clone;
7364            let token = self.0.request.page_token.clone();
7365            let execute = move |token: String| {
7366                let mut builder = self.clone();
7367                builder.0.request = builder.0.request.set_page_token(token);
7368                builder.send()
7369            };
7370            gax::paginator::internal::new_paginator(token, execute)
7371        }
7372
7373        /// Streams each item in the collection.
7374        pub fn by_item(
7375            self,
7376        ) -> impl gax::paginator::ItemPaginator<
7377            crate::model::ListDataAttributeBindingsResponse,
7378            gax::error::Error,
7379        > {
7380            use gax::paginator::Paginator;
7381            self.by_page().items()
7382        }
7383
7384        /// Sets the value of [parent][crate::model::ListDataAttributeBindingsRequest::parent].
7385        ///
7386        /// This is a **required** field for requests.
7387        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7388            self.0.request.parent = v.into();
7389            self
7390        }
7391
7392        /// Sets the value of [page_size][crate::model::ListDataAttributeBindingsRequest::page_size].
7393        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7394            self.0.request.page_size = v.into();
7395            self
7396        }
7397
7398        /// Sets the value of [page_token][crate::model::ListDataAttributeBindingsRequest::page_token].
7399        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7400            self.0.request.page_token = v.into();
7401            self
7402        }
7403
7404        /// Sets the value of [filter][crate::model::ListDataAttributeBindingsRequest::filter].
7405        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7406            self.0.request.filter = v.into();
7407            self
7408        }
7409
7410        /// Sets the value of [order_by][crate::model::ListDataAttributeBindingsRequest::order_by].
7411        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7412            self.0.request.order_by = v.into();
7413            self
7414        }
7415    }
7416
7417    #[doc(hidden)]
7418    impl gax::options::internal::RequestBuilder for ListDataAttributeBindings {
7419        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7420            &mut self.0.options
7421        }
7422    }
7423
7424    /// The request builder for [DataTaxonomyService::get_data_attribute_binding][crate::client::DataTaxonomyService::get_data_attribute_binding] calls.
7425    ///
7426    /// # Example
7427    /// ```no_run
7428    /// # use google_cloud_dataplex_v1::builder;
7429    /// use builder::data_taxonomy_service::GetDataAttributeBinding;
7430    /// # tokio_test::block_on(async {
7431    ///
7432    /// let builder = prepare_request_builder();
7433    /// let response = builder.send().await?;
7434    /// # gax::Result::<()>::Ok(()) });
7435    ///
7436    /// fn prepare_request_builder() -> GetDataAttributeBinding {
7437    ///   # panic!();
7438    ///   // ... details omitted ...
7439    /// }
7440    /// ```
7441    #[derive(Clone, Debug)]
7442    pub struct GetDataAttributeBinding(
7443        RequestBuilder<crate::model::GetDataAttributeBindingRequest>,
7444    );
7445
7446    impl GetDataAttributeBinding {
7447        pub(crate) fn new(
7448            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
7449        ) -> Self {
7450            Self(RequestBuilder::new(stub))
7451        }
7452
7453        /// Sets the full request, replacing any prior values.
7454        pub fn with_request<V: Into<crate::model::GetDataAttributeBindingRequest>>(
7455            mut self,
7456            v: V,
7457        ) -> Self {
7458            self.0.request = v.into();
7459            self
7460        }
7461
7462        /// Sets all the options, replacing any prior values.
7463        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7464            self.0.options = v.into();
7465            self
7466        }
7467
7468        /// Sends the request.
7469        pub async fn send(self) -> Result<crate::model::DataAttributeBinding> {
7470            (*self.0.stub)
7471                .get_data_attribute_binding(self.0.request, self.0.options)
7472                .await
7473                .map(gax::response::Response::into_body)
7474        }
7475
7476        /// Sets the value of [name][crate::model::GetDataAttributeBindingRequest::name].
7477        ///
7478        /// This is a **required** field for requests.
7479        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7480            self.0.request.name = v.into();
7481            self
7482        }
7483    }
7484
7485    #[doc(hidden)]
7486    impl gax::options::internal::RequestBuilder for GetDataAttributeBinding {
7487        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7488            &mut self.0.options
7489        }
7490    }
7491
7492    /// The request builder for [DataTaxonomyService::create_data_attribute][crate::client::DataTaxonomyService::create_data_attribute] calls.
7493    ///
7494    /// # Example
7495    /// ```no_run
7496    /// # use google_cloud_dataplex_v1::builder;
7497    /// use builder::data_taxonomy_service::CreateDataAttribute;
7498    /// # tokio_test::block_on(async {
7499    /// use lro::Poller;
7500    ///
7501    /// let builder = prepare_request_builder();
7502    /// let response = builder.poller().until_done().await?;
7503    /// # gax::Result::<()>::Ok(()) });
7504    ///
7505    /// fn prepare_request_builder() -> CreateDataAttribute {
7506    ///   # panic!();
7507    ///   // ... details omitted ...
7508    /// }
7509    /// ```
7510    #[derive(Clone, Debug)]
7511    pub struct CreateDataAttribute(RequestBuilder<crate::model::CreateDataAttributeRequest>);
7512
7513    impl CreateDataAttribute {
7514        pub(crate) fn new(
7515            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
7516        ) -> Self {
7517            Self(RequestBuilder::new(stub))
7518        }
7519
7520        /// Sets the full request, replacing any prior values.
7521        pub fn with_request<V: Into<crate::model::CreateDataAttributeRequest>>(
7522            mut self,
7523            v: V,
7524        ) -> Self {
7525            self.0.request = v.into();
7526            self
7527        }
7528
7529        /// Sets all the options, replacing any prior values.
7530        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7531            self.0.options = v.into();
7532            self
7533        }
7534
7535        /// Sends the request.
7536        ///
7537        /// # Long running operations
7538        ///
7539        /// This starts, but does not poll, a longrunning operation. More information
7540        /// on [create_data_attribute][crate::client::DataTaxonomyService::create_data_attribute].
7541        pub async fn send(self) -> Result<longrunning::model::Operation> {
7542            (*self.0.stub)
7543                .create_data_attribute(self.0.request, self.0.options)
7544                .await
7545                .map(gax::response::Response::into_body)
7546        }
7547
7548        /// Creates a [Poller][lro::Poller] to work with `create_data_attribute`.
7549        pub fn poller(
7550            self,
7551        ) -> impl lro::Poller<crate::model::DataAttribute, crate::model::OperationMetadata>
7552        {
7553            type Operation = lro::internal::Operation<
7554                crate::model::DataAttribute,
7555                crate::model::OperationMetadata,
7556            >;
7557            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7558            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7559
7560            let stub = self.0.stub.clone();
7561            let mut options = self.0.options.clone();
7562            options.set_retry_policy(gax::retry_policy::NeverRetry);
7563            let query = move |name| {
7564                let stub = stub.clone();
7565                let options = options.clone();
7566                async {
7567                    let op = GetOperation::new(stub)
7568                        .set_name(name)
7569                        .with_options(options)
7570                        .send()
7571                        .await?;
7572                    Ok(Operation::new(op))
7573                }
7574            };
7575
7576            let start = move || async {
7577                let op = self.send().await?;
7578                Ok(Operation::new(op))
7579            };
7580
7581            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
7582        }
7583
7584        /// Sets the value of [parent][crate::model::CreateDataAttributeRequest::parent].
7585        ///
7586        /// This is a **required** field for requests.
7587        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7588            self.0.request.parent = v.into();
7589            self
7590        }
7591
7592        /// Sets the value of [data_attribute_id][crate::model::CreateDataAttributeRequest::data_attribute_id].
7593        ///
7594        /// This is a **required** field for requests.
7595        pub fn set_data_attribute_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7596            self.0.request.data_attribute_id = v.into();
7597            self
7598        }
7599
7600        /// Sets the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
7601        ///
7602        /// This is a **required** field for requests.
7603        pub fn set_data_attribute<T>(mut self, v: T) -> Self
7604        where
7605            T: std::convert::Into<crate::model::DataAttribute>,
7606        {
7607            self.0.request.data_attribute = std::option::Option::Some(v.into());
7608            self
7609        }
7610
7611        /// Sets or clears the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
7612        ///
7613        /// This is a **required** field for requests.
7614        pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
7615        where
7616            T: std::convert::Into<crate::model::DataAttribute>,
7617        {
7618            self.0.request.data_attribute = v.map(|x| x.into());
7619            self
7620        }
7621
7622        /// Sets the value of [validate_only][crate::model::CreateDataAttributeRequest::validate_only].
7623        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
7624            self.0.request.validate_only = v.into();
7625            self
7626        }
7627    }
7628
7629    #[doc(hidden)]
7630    impl gax::options::internal::RequestBuilder for CreateDataAttribute {
7631        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7632            &mut self.0.options
7633        }
7634    }
7635
7636    /// The request builder for [DataTaxonomyService::update_data_attribute][crate::client::DataTaxonomyService::update_data_attribute] calls.
7637    ///
7638    /// # Example
7639    /// ```no_run
7640    /// # use google_cloud_dataplex_v1::builder;
7641    /// use builder::data_taxonomy_service::UpdateDataAttribute;
7642    /// # tokio_test::block_on(async {
7643    /// use lro::Poller;
7644    ///
7645    /// let builder = prepare_request_builder();
7646    /// let response = builder.poller().until_done().await?;
7647    /// # gax::Result::<()>::Ok(()) });
7648    ///
7649    /// fn prepare_request_builder() -> UpdateDataAttribute {
7650    ///   # panic!();
7651    ///   // ... details omitted ...
7652    /// }
7653    /// ```
7654    #[derive(Clone, Debug)]
7655    pub struct UpdateDataAttribute(RequestBuilder<crate::model::UpdateDataAttributeRequest>);
7656
7657    impl UpdateDataAttribute {
7658        pub(crate) fn new(
7659            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
7660        ) -> Self {
7661            Self(RequestBuilder::new(stub))
7662        }
7663
7664        /// Sets the full request, replacing any prior values.
7665        pub fn with_request<V: Into<crate::model::UpdateDataAttributeRequest>>(
7666            mut self,
7667            v: V,
7668        ) -> Self {
7669            self.0.request = v.into();
7670            self
7671        }
7672
7673        /// Sets all the options, replacing any prior values.
7674        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7675            self.0.options = v.into();
7676            self
7677        }
7678
7679        /// Sends the request.
7680        ///
7681        /// # Long running operations
7682        ///
7683        /// This starts, but does not poll, a longrunning operation. More information
7684        /// on [update_data_attribute][crate::client::DataTaxonomyService::update_data_attribute].
7685        pub async fn send(self) -> Result<longrunning::model::Operation> {
7686            (*self.0.stub)
7687                .update_data_attribute(self.0.request, self.0.options)
7688                .await
7689                .map(gax::response::Response::into_body)
7690        }
7691
7692        /// Creates a [Poller][lro::Poller] to work with `update_data_attribute`.
7693        pub fn poller(
7694            self,
7695        ) -> impl lro::Poller<crate::model::DataAttribute, crate::model::OperationMetadata>
7696        {
7697            type Operation = lro::internal::Operation<
7698                crate::model::DataAttribute,
7699                crate::model::OperationMetadata,
7700            >;
7701            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7702            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7703
7704            let stub = self.0.stub.clone();
7705            let mut options = self.0.options.clone();
7706            options.set_retry_policy(gax::retry_policy::NeverRetry);
7707            let query = move |name| {
7708                let stub = stub.clone();
7709                let options = options.clone();
7710                async {
7711                    let op = GetOperation::new(stub)
7712                        .set_name(name)
7713                        .with_options(options)
7714                        .send()
7715                        .await?;
7716                    Ok(Operation::new(op))
7717                }
7718            };
7719
7720            let start = move || async {
7721                let op = self.send().await?;
7722                Ok(Operation::new(op))
7723            };
7724
7725            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
7726        }
7727
7728        /// Sets the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
7729        ///
7730        /// This is a **required** field for requests.
7731        pub fn set_update_mask<T>(mut self, v: T) -> Self
7732        where
7733            T: std::convert::Into<wkt::FieldMask>,
7734        {
7735            self.0.request.update_mask = std::option::Option::Some(v.into());
7736            self
7737        }
7738
7739        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
7740        ///
7741        /// This is a **required** field for requests.
7742        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7743        where
7744            T: std::convert::Into<wkt::FieldMask>,
7745        {
7746            self.0.request.update_mask = v.map(|x| x.into());
7747            self
7748        }
7749
7750        /// Sets the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
7751        ///
7752        /// This is a **required** field for requests.
7753        pub fn set_data_attribute<T>(mut self, v: T) -> Self
7754        where
7755            T: std::convert::Into<crate::model::DataAttribute>,
7756        {
7757            self.0.request.data_attribute = std::option::Option::Some(v.into());
7758            self
7759        }
7760
7761        /// Sets or clears the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
7762        ///
7763        /// This is a **required** field for requests.
7764        pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
7765        where
7766            T: std::convert::Into<crate::model::DataAttribute>,
7767        {
7768            self.0.request.data_attribute = v.map(|x| x.into());
7769            self
7770        }
7771
7772        /// Sets the value of [validate_only][crate::model::UpdateDataAttributeRequest::validate_only].
7773        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
7774            self.0.request.validate_only = v.into();
7775            self
7776        }
7777    }
7778
7779    #[doc(hidden)]
7780    impl gax::options::internal::RequestBuilder for UpdateDataAttribute {
7781        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7782            &mut self.0.options
7783        }
7784    }
7785
7786    /// The request builder for [DataTaxonomyService::delete_data_attribute][crate::client::DataTaxonomyService::delete_data_attribute] calls.
7787    ///
7788    /// # Example
7789    /// ```no_run
7790    /// # use google_cloud_dataplex_v1::builder;
7791    /// use builder::data_taxonomy_service::DeleteDataAttribute;
7792    /// # tokio_test::block_on(async {
7793    /// use lro::Poller;
7794    ///
7795    /// let builder = prepare_request_builder();
7796    /// let response = builder.poller().until_done().await?;
7797    /// # gax::Result::<()>::Ok(()) });
7798    ///
7799    /// fn prepare_request_builder() -> DeleteDataAttribute {
7800    ///   # panic!();
7801    ///   // ... details omitted ...
7802    /// }
7803    /// ```
7804    #[derive(Clone, Debug)]
7805    pub struct DeleteDataAttribute(RequestBuilder<crate::model::DeleteDataAttributeRequest>);
7806
7807    impl DeleteDataAttribute {
7808        pub(crate) fn new(
7809            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
7810        ) -> Self {
7811            Self(RequestBuilder::new(stub))
7812        }
7813
7814        /// Sets the full request, replacing any prior values.
7815        pub fn with_request<V: Into<crate::model::DeleteDataAttributeRequest>>(
7816            mut self,
7817            v: V,
7818        ) -> Self {
7819            self.0.request = v.into();
7820            self
7821        }
7822
7823        /// Sets all the options, replacing any prior values.
7824        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7825            self.0.options = v.into();
7826            self
7827        }
7828
7829        /// Sends the request.
7830        ///
7831        /// # Long running operations
7832        ///
7833        /// This starts, but does not poll, a longrunning operation. More information
7834        /// on [delete_data_attribute][crate::client::DataTaxonomyService::delete_data_attribute].
7835        pub async fn send(self) -> Result<longrunning::model::Operation> {
7836            (*self.0.stub)
7837                .delete_data_attribute(self.0.request, self.0.options)
7838                .await
7839                .map(gax::response::Response::into_body)
7840        }
7841
7842        /// Creates a [Poller][lro::Poller] to work with `delete_data_attribute`.
7843        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
7844            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7845            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7846            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7847
7848            let stub = self.0.stub.clone();
7849            let mut options = self.0.options.clone();
7850            options.set_retry_policy(gax::retry_policy::NeverRetry);
7851            let query = move |name| {
7852                let stub = stub.clone();
7853                let options = options.clone();
7854                async {
7855                    let op = GetOperation::new(stub)
7856                        .set_name(name)
7857                        .with_options(options)
7858                        .send()
7859                        .await?;
7860                    Ok(Operation::new(op))
7861                }
7862            };
7863
7864            let start = move || async {
7865                let op = self.send().await?;
7866                Ok(Operation::new(op))
7867            };
7868
7869            lro::internal::new_unit_response_poller(
7870                polling_error_policy,
7871                polling_backoff_policy,
7872                start,
7873                query,
7874            )
7875        }
7876
7877        /// Sets the value of [name][crate::model::DeleteDataAttributeRequest::name].
7878        ///
7879        /// This is a **required** field for requests.
7880        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7881            self.0.request.name = v.into();
7882            self
7883        }
7884
7885        /// Sets the value of [etag][crate::model::DeleteDataAttributeRequest::etag].
7886        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
7887            self.0.request.etag = v.into();
7888            self
7889        }
7890    }
7891
7892    #[doc(hidden)]
7893    impl gax::options::internal::RequestBuilder for DeleteDataAttribute {
7894        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7895            &mut self.0.options
7896        }
7897    }
7898
7899    /// The request builder for [DataTaxonomyService::list_data_attributes][crate::client::DataTaxonomyService::list_data_attributes] calls.
7900    ///
7901    /// # Example
7902    /// ```no_run
7903    /// # use google_cloud_dataplex_v1::builder;
7904    /// use builder::data_taxonomy_service::ListDataAttributes;
7905    /// # tokio_test::block_on(async {
7906    /// use gax::paginator::ItemPaginator;
7907    ///
7908    /// let builder = prepare_request_builder();
7909    /// let mut items = builder.by_item();
7910    /// while let Some(result) = items.next().await {
7911    ///   let item = result?;
7912    /// }
7913    /// # gax::Result::<()>::Ok(()) });
7914    ///
7915    /// fn prepare_request_builder() -> ListDataAttributes {
7916    ///   # panic!();
7917    ///   // ... details omitted ...
7918    /// }
7919    /// ```
7920    #[derive(Clone, Debug)]
7921    pub struct ListDataAttributes(RequestBuilder<crate::model::ListDataAttributesRequest>);
7922
7923    impl ListDataAttributes {
7924        pub(crate) fn new(
7925            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
7926        ) -> Self {
7927            Self(RequestBuilder::new(stub))
7928        }
7929
7930        /// Sets the full request, replacing any prior values.
7931        pub fn with_request<V: Into<crate::model::ListDataAttributesRequest>>(
7932            mut self,
7933            v: V,
7934        ) -> Self {
7935            self.0.request = v.into();
7936            self
7937        }
7938
7939        /// Sets all the options, replacing any prior values.
7940        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7941            self.0.options = v.into();
7942            self
7943        }
7944
7945        /// Sends the request.
7946        pub async fn send(self) -> Result<crate::model::ListDataAttributesResponse> {
7947            (*self.0.stub)
7948                .list_data_attributes(self.0.request, self.0.options)
7949                .await
7950                .map(gax::response::Response::into_body)
7951        }
7952
7953        /// Streams each page in the collection.
7954        pub fn by_page(
7955            self,
7956        ) -> impl gax::paginator::Paginator<crate::model::ListDataAttributesResponse, gax::error::Error>
7957        {
7958            use std::clone::Clone;
7959            let token = self.0.request.page_token.clone();
7960            let execute = move |token: String| {
7961                let mut builder = self.clone();
7962                builder.0.request = builder.0.request.set_page_token(token);
7963                builder.send()
7964            };
7965            gax::paginator::internal::new_paginator(token, execute)
7966        }
7967
7968        /// Streams each item in the collection.
7969        pub fn by_item(
7970            self,
7971        ) -> impl gax::paginator::ItemPaginator<
7972            crate::model::ListDataAttributesResponse,
7973            gax::error::Error,
7974        > {
7975            use gax::paginator::Paginator;
7976            self.by_page().items()
7977        }
7978
7979        /// Sets the value of [parent][crate::model::ListDataAttributesRequest::parent].
7980        ///
7981        /// This is a **required** field for requests.
7982        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7983            self.0.request.parent = v.into();
7984            self
7985        }
7986
7987        /// Sets the value of [page_size][crate::model::ListDataAttributesRequest::page_size].
7988        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7989            self.0.request.page_size = v.into();
7990            self
7991        }
7992
7993        /// Sets the value of [page_token][crate::model::ListDataAttributesRequest::page_token].
7994        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7995            self.0.request.page_token = v.into();
7996            self
7997        }
7998
7999        /// Sets the value of [filter][crate::model::ListDataAttributesRequest::filter].
8000        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8001            self.0.request.filter = v.into();
8002            self
8003        }
8004
8005        /// Sets the value of [order_by][crate::model::ListDataAttributesRequest::order_by].
8006        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
8007            self.0.request.order_by = v.into();
8008            self
8009        }
8010    }
8011
8012    #[doc(hidden)]
8013    impl gax::options::internal::RequestBuilder for ListDataAttributes {
8014        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8015            &mut self.0.options
8016        }
8017    }
8018
8019    /// The request builder for [DataTaxonomyService::get_data_attribute][crate::client::DataTaxonomyService::get_data_attribute] calls.
8020    ///
8021    /// # Example
8022    /// ```no_run
8023    /// # use google_cloud_dataplex_v1::builder;
8024    /// use builder::data_taxonomy_service::GetDataAttribute;
8025    /// # tokio_test::block_on(async {
8026    ///
8027    /// let builder = prepare_request_builder();
8028    /// let response = builder.send().await?;
8029    /// # gax::Result::<()>::Ok(()) });
8030    ///
8031    /// fn prepare_request_builder() -> GetDataAttribute {
8032    ///   # panic!();
8033    ///   // ... details omitted ...
8034    /// }
8035    /// ```
8036    #[derive(Clone, Debug)]
8037    pub struct GetDataAttribute(RequestBuilder<crate::model::GetDataAttributeRequest>);
8038
8039    impl GetDataAttribute {
8040        pub(crate) fn new(
8041            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8042        ) -> Self {
8043            Self(RequestBuilder::new(stub))
8044        }
8045
8046        /// Sets the full request, replacing any prior values.
8047        pub fn with_request<V: Into<crate::model::GetDataAttributeRequest>>(
8048            mut self,
8049            v: V,
8050        ) -> Self {
8051            self.0.request = v.into();
8052            self
8053        }
8054
8055        /// Sets all the options, replacing any prior values.
8056        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8057            self.0.options = v.into();
8058            self
8059        }
8060
8061        /// Sends the request.
8062        pub async fn send(self) -> Result<crate::model::DataAttribute> {
8063            (*self.0.stub)
8064                .get_data_attribute(self.0.request, self.0.options)
8065                .await
8066                .map(gax::response::Response::into_body)
8067        }
8068
8069        /// Sets the value of [name][crate::model::GetDataAttributeRequest::name].
8070        ///
8071        /// This is a **required** field for requests.
8072        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8073            self.0.request.name = v.into();
8074            self
8075        }
8076    }
8077
8078    #[doc(hidden)]
8079    impl gax::options::internal::RequestBuilder for GetDataAttribute {
8080        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8081            &mut self.0.options
8082        }
8083    }
8084
8085    /// The request builder for [DataTaxonomyService::list_locations][crate::client::DataTaxonomyService::list_locations] calls.
8086    ///
8087    /// # Example
8088    /// ```no_run
8089    /// # use google_cloud_dataplex_v1::builder;
8090    /// use builder::data_taxonomy_service::ListLocations;
8091    /// # tokio_test::block_on(async {
8092    /// use gax::paginator::ItemPaginator;
8093    ///
8094    /// let builder = prepare_request_builder();
8095    /// let mut items = builder.by_item();
8096    /// while let Some(result) = items.next().await {
8097    ///   let item = result?;
8098    /// }
8099    /// # gax::Result::<()>::Ok(()) });
8100    ///
8101    /// fn prepare_request_builder() -> ListLocations {
8102    ///   # panic!();
8103    ///   // ... details omitted ...
8104    /// }
8105    /// ```
8106    #[derive(Clone, Debug)]
8107    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
8108
8109    impl ListLocations {
8110        pub(crate) fn new(
8111            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8112        ) -> Self {
8113            Self(RequestBuilder::new(stub))
8114        }
8115
8116        /// Sets the full request, replacing any prior values.
8117        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
8118            mut self,
8119            v: V,
8120        ) -> Self {
8121            self.0.request = v.into();
8122            self
8123        }
8124
8125        /// Sets all the options, replacing any prior values.
8126        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8127            self.0.options = v.into();
8128            self
8129        }
8130
8131        /// Sends the request.
8132        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
8133            (*self.0.stub)
8134                .list_locations(self.0.request, self.0.options)
8135                .await
8136                .map(gax::response::Response::into_body)
8137        }
8138
8139        /// Streams each page in the collection.
8140        pub fn by_page(
8141            self,
8142        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
8143        {
8144            use std::clone::Clone;
8145            let token = self.0.request.page_token.clone();
8146            let execute = move |token: String| {
8147                let mut builder = self.clone();
8148                builder.0.request = builder.0.request.set_page_token(token);
8149                builder.send()
8150            };
8151            gax::paginator::internal::new_paginator(token, execute)
8152        }
8153
8154        /// Streams each item in the collection.
8155        pub fn by_item(
8156            self,
8157        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
8158        {
8159            use gax::paginator::Paginator;
8160            self.by_page().items()
8161        }
8162
8163        /// Sets the value of [name][location::model::ListLocationsRequest::name].
8164        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8165            self.0.request.name = v.into();
8166            self
8167        }
8168
8169        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
8170        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8171            self.0.request.filter = v.into();
8172            self
8173        }
8174
8175        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
8176        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8177            self.0.request.page_size = v.into();
8178            self
8179        }
8180
8181        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
8182        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8183            self.0.request.page_token = v.into();
8184            self
8185        }
8186    }
8187
8188    #[doc(hidden)]
8189    impl gax::options::internal::RequestBuilder for ListLocations {
8190        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8191            &mut self.0.options
8192        }
8193    }
8194
8195    /// The request builder for [DataTaxonomyService::get_location][crate::client::DataTaxonomyService::get_location] calls.
8196    ///
8197    /// # Example
8198    /// ```no_run
8199    /// # use google_cloud_dataplex_v1::builder;
8200    /// use builder::data_taxonomy_service::GetLocation;
8201    /// # tokio_test::block_on(async {
8202    ///
8203    /// let builder = prepare_request_builder();
8204    /// let response = builder.send().await?;
8205    /// # gax::Result::<()>::Ok(()) });
8206    ///
8207    /// fn prepare_request_builder() -> GetLocation {
8208    ///   # panic!();
8209    ///   // ... details omitted ...
8210    /// }
8211    /// ```
8212    #[derive(Clone, Debug)]
8213    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
8214
8215    impl GetLocation {
8216        pub(crate) fn new(
8217            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8218        ) -> Self {
8219            Self(RequestBuilder::new(stub))
8220        }
8221
8222        /// Sets the full request, replacing any prior values.
8223        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
8224            self.0.request = v.into();
8225            self
8226        }
8227
8228        /// Sets all the options, replacing any prior values.
8229        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8230            self.0.options = v.into();
8231            self
8232        }
8233
8234        /// Sends the request.
8235        pub async fn send(self) -> Result<location::model::Location> {
8236            (*self.0.stub)
8237                .get_location(self.0.request, self.0.options)
8238                .await
8239                .map(gax::response::Response::into_body)
8240        }
8241
8242        /// Sets the value of [name][location::model::GetLocationRequest::name].
8243        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8244            self.0.request.name = v.into();
8245            self
8246        }
8247    }
8248
8249    #[doc(hidden)]
8250    impl gax::options::internal::RequestBuilder for GetLocation {
8251        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8252            &mut self.0.options
8253        }
8254    }
8255
8256    /// The request builder for [DataTaxonomyService::set_iam_policy][crate::client::DataTaxonomyService::set_iam_policy] calls.
8257    ///
8258    /// # Example
8259    /// ```no_run
8260    /// # use google_cloud_dataplex_v1::builder;
8261    /// use builder::data_taxonomy_service::SetIamPolicy;
8262    /// # tokio_test::block_on(async {
8263    ///
8264    /// let builder = prepare_request_builder();
8265    /// let response = builder.send().await?;
8266    /// # gax::Result::<()>::Ok(()) });
8267    ///
8268    /// fn prepare_request_builder() -> SetIamPolicy {
8269    ///   # panic!();
8270    ///   // ... details omitted ...
8271    /// }
8272    /// ```
8273    #[derive(Clone, Debug)]
8274    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
8275
8276    impl SetIamPolicy {
8277        pub(crate) fn new(
8278            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8279        ) -> Self {
8280            Self(RequestBuilder::new(stub))
8281        }
8282
8283        /// Sets the full request, replacing any prior values.
8284        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
8285            self.0.request = v.into();
8286            self
8287        }
8288
8289        /// Sets all the options, replacing any prior values.
8290        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8291            self.0.options = v.into();
8292            self
8293        }
8294
8295        /// Sends the request.
8296        pub async fn send(self) -> Result<iam_v1::model::Policy> {
8297            (*self.0.stub)
8298                .set_iam_policy(self.0.request, self.0.options)
8299                .await
8300                .map(gax::response::Response::into_body)
8301        }
8302
8303        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
8304        ///
8305        /// This is a **required** field for requests.
8306        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8307            self.0.request.resource = v.into();
8308            self
8309        }
8310
8311        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
8312        ///
8313        /// This is a **required** field for requests.
8314        pub fn set_policy<T>(mut self, v: T) -> Self
8315        where
8316            T: std::convert::Into<iam_v1::model::Policy>,
8317        {
8318            self.0.request.policy = std::option::Option::Some(v.into());
8319            self
8320        }
8321
8322        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
8323        ///
8324        /// This is a **required** field for requests.
8325        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
8326        where
8327            T: std::convert::Into<iam_v1::model::Policy>,
8328        {
8329            self.0.request.policy = v.map(|x| x.into());
8330            self
8331        }
8332
8333        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
8334        pub fn set_update_mask<T>(mut self, v: T) -> Self
8335        where
8336            T: std::convert::Into<wkt::FieldMask>,
8337        {
8338            self.0.request.update_mask = std::option::Option::Some(v.into());
8339            self
8340        }
8341
8342        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
8343        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8344        where
8345            T: std::convert::Into<wkt::FieldMask>,
8346        {
8347            self.0.request.update_mask = v.map(|x| x.into());
8348            self
8349        }
8350    }
8351
8352    #[doc(hidden)]
8353    impl gax::options::internal::RequestBuilder for SetIamPolicy {
8354        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8355            &mut self.0.options
8356        }
8357    }
8358
8359    /// The request builder for [DataTaxonomyService::get_iam_policy][crate::client::DataTaxonomyService::get_iam_policy] calls.
8360    ///
8361    /// # Example
8362    /// ```no_run
8363    /// # use google_cloud_dataplex_v1::builder;
8364    /// use builder::data_taxonomy_service::GetIamPolicy;
8365    /// # tokio_test::block_on(async {
8366    ///
8367    /// let builder = prepare_request_builder();
8368    /// let response = builder.send().await?;
8369    /// # gax::Result::<()>::Ok(()) });
8370    ///
8371    /// fn prepare_request_builder() -> GetIamPolicy {
8372    ///   # panic!();
8373    ///   // ... details omitted ...
8374    /// }
8375    /// ```
8376    #[derive(Clone, Debug)]
8377    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
8378
8379    impl GetIamPolicy {
8380        pub(crate) fn new(
8381            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8382        ) -> Self {
8383            Self(RequestBuilder::new(stub))
8384        }
8385
8386        /// Sets the full request, replacing any prior values.
8387        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
8388            self.0.request = v.into();
8389            self
8390        }
8391
8392        /// Sets all the options, replacing any prior values.
8393        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8394            self.0.options = v.into();
8395            self
8396        }
8397
8398        /// Sends the request.
8399        pub async fn send(self) -> Result<iam_v1::model::Policy> {
8400            (*self.0.stub)
8401                .get_iam_policy(self.0.request, self.0.options)
8402                .await
8403                .map(gax::response::Response::into_body)
8404        }
8405
8406        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
8407        ///
8408        /// This is a **required** field for requests.
8409        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8410            self.0.request.resource = v.into();
8411            self
8412        }
8413
8414        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
8415        pub fn set_options<T>(mut self, v: T) -> Self
8416        where
8417            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
8418        {
8419            self.0.request.options = std::option::Option::Some(v.into());
8420            self
8421        }
8422
8423        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
8424        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
8425        where
8426            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
8427        {
8428            self.0.request.options = v.map(|x| x.into());
8429            self
8430        }
8431    }
8432
8433    #[doc(hidden)]
8434    impl gax::options::internal::RequestBuilder for GetIamPolicy {
8435        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8436            &mut self.0.options
8437        }
8438    }
8439
8440    /// The request builder for [DataTaxonomyService::test_iam_permissions][crate::client::DataTaxonomyService::test_iam_permissions] calls.
8441    ///
8442    /// # Example
8443    /// ```no_run
8444    /// # use google_cloud_dataplex_v1::builder;
8445    /// use builder::data_taxonomy_service::TestIamPermissions;
8446    /// # tokio_test::block_on(async {
8447    ///
8448    /// let builder = prepare_request_builder();
8449    /// let response = builder.send().await?;
8450    /// # gax::Result::<()>::Ok(()) });
8451    ///
8452    /// fn prepare_request_builder() -> TestIamPermissions {
8453    ///   # panic!();
8454    ///   // ... details omitted ...
8455    /// }
8456    /// ```
8457    #[derive(Clone, Debug)]
8458    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
8459
8460    impl TestIamPermissions {
8461        pub(crate) fn new(
8462            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8463        ) -> Self {
8464            Self(RequestBuilder::new(stub))
8465        }
8466
8467        /// Sets the full request, replacing any prior values.
8468        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
8469            mut self,
8470            v: V,
8471        ) -> Self {
8472            self.0.request = v.into();
8473            self
8474        }
8475
8476        /// Sets all the options, replacing any prior values.
8477        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8478            self.0.options = v.into();
8479            self
8480        }
8481
8482        /// Sends the request.
8483        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
8484            (*self.0.stub)
8485                .test_iam_permissions(self.0.request, self.0.options)
8486                .await
8487                .map(gax::response::Response::into_body)
8488        }
8489
8490        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
8491        ///
8492        /// This is a **required** field for requests.
8493        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8494            self.0.request.resource = v.into();
8495            self
8496        }
8497
8498        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
8499        ///
8500        /// This is a **required** field for requests.
8501        pub fn set_permissions<T, V>(mut self, v: T) -> Self
8502        where
8503            T: std::iter::IntoIterator<Item = V>,
8504            V: std::convert::Into<std::string::String>,
8505        {
8506            use std::iter::Iterator;
8507            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
8508            self
8509        }
8510    }
8511
8512    #[doc(hidden)]
8513    impl gax::options::internal::RequestBuilder for TestIamPermissions {
8514        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8515            &mut self.0.options
8516        }
8517    }
8518
8519    /// The request builder for [DataTaxonomyService::list_operations][crate::client::DataTaxonomyService::list_operations] calls.
8520    ///
8521    /// # Example
8522    /// ```no_run
8523    /// # use google_cloud_dataplex_v1::builder;
8524    /// use builder::data_taxonomy_service::ListOperations;
8525    /// # tokio_test::block_on(async {
8526    /// use gax::paginator::ItemPaginator;
8527    ///
8528    /// let builder = prepare_request_builder();
8529    /// let mut items = builder.by_item();
8530    /// while let Some(result) = items.next().await {
8531    ///   let item = result?;
8532    /// }
8533    /// # gax::Result::<()>::Ok(()) });
8534    ///
8535    /// fn prepare_request_builder() -> ListOperations {
8536    ///   # panic!();
8537    ///   // ... details omitted ...
8538    /// }
8539    /// ```
8540    #[derive(Clone, Debug)]
8541    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
8542
8543    impl ListOperations {
8544        pub(crate) fn new(
8545            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8546        ) -> Self {
8547            Self(RequestBuilder::new(stub))
8548        }
8549
8550        /// Sets the full request, replacing any prior values.
8551        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
8552            mut self,
8553            v: V,
8554        ) -> Self {
8555            self.0.request = v.into();
8556            self
8557        }
8558
8559        /// Sets all the options, replacing any prior values.
8560        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8561            self.0.options = v.into();
8562            self
8563        }
8564
8565        /// Sends the request.
8566        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
8567            (*self.0.stub)
8568                .list_operations(self.0.request, self.0.options)
8569                .await
8570                .map(gax::response::Response::into_body)
8571        }
8572
8573        /// Streams each page in the collection.
8574        pub fn by_page(
8575            self,
8576        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
8577        {
8578            use std::clone::Clone;
8579            let token = self.0.request.page_token.clone();
8580            let execute = move |token: String| {
8581                let mut builder = self.clone();
8582                builder.0.request = builder.0.request.set_page_token(token);
8583                builder.send()
8584            };
8585            gax::paginator::internal::new_paginator(token, execute)
8586        }
8587
8588        /// Streams each item in the collection.
8589        pub fn by_item(
8590            self,
8591        ) -> impl gax::paginator::ItemPaginator<
8592            longrunning::model::ListOperationsResponse,
8593            gax::error::Error,
8594        > {
8595            use gax::paginator::Paginator;
8596            self.by_page().items()
8597        }
8598
8599        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
8600        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8601            self.0.request.name = v.into();
8602            self
8603        }
8604
8605        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
8606        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8607            self.0.request.filter = v.into();
8608            self
8609        }
8610
8611        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
8612        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8613            self.0.request.page_size = v.into();
8614            self
8615        }
8616
8617        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
8618        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8619            self.0.request.page_token = v.into();
8620            self
8621        }
8622    }
8623
8624    #[doc(hidden)]
8625    impl gax::options::internal::RequestBuilder for ListOperations {
8626        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8627            &mut self.0.options
8628        }
8629    }
8630
8631    /// The request builder for [DataTaxonomyService::get_operation][crate::client::DataTaxonomyService::get_operation] calls.
8632    ///
8633    /// # Example
8634    /// ```no_run
8635    /// # use google_cloud_dataplex_v1::builder;
8636    /// use builder::data_taxonomy_service::GetOperation;
8637    /// # tokio_test::block_on(async {
8638    ///
8639    /// let builder = prepare_request_builder();
8640    /// let response = builder.send().await?;
8641    /// # gax::Result::<()>::Ok(()) });
8642    ///
8643    /// fn prepare_request_builder() -> GetOperation {
8644    ///   # panic!();
8645    ///   // ... details omitted ...
8646    /// }
8647    /// ```
8648    #[derive(Clone, Debug)]
8649    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
8650
8651    impl GetOperation {
8652        pub(crate) fn new(
8653            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8654        ) -> Self {
8655            Self(RequestBuilder::new(stub))
8656        }
8657
8658        /// Sets the full request, replacing any prior values.
8659        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
8660            mut self,
8661            v: V,
8662        ) -> Self {
8663            self.0.request = v.into();
8664            self
8665        }
8666
8667        /// Sets all the options, replacing any prior values.
8668        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8669            self.0.options = v.into();
8670            self
8671        }
8672
8673        /// Sends the request.
8674        pub async fn send(self) -> Result<longrunning::model::Operation> {
8675            (*self.0.stub)
8676                .get_operation(self.0.request, self.0.options)
8677                .await
8678                .map(gax::response::Response::into_body)
8679        }
8680
8681        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
8682        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8683            self.0.request.name = v.into();
8684            self
8685        }
8686    }
8687
8688    #[doc(hidden)]
8689    impl gax::options::internal::RequestBuilder for GetOperation {
8690        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8691            &mut self.0.options
8692        }
8693    }
8694
8695    /// The request builder for [DataTaxonomyService::delete_operation][crate::client::DataTaxonomyService::delete_operation] calls.
8696    ///
8697    /// # Example
8698    /// ```no_run
8699    /// # use google_cloud_dataplex_v1::builder;
8700    /// use builder::data_taxonomy_service::DeleteOperation;
8701    /// # tokio_test::block_on(async {
8702    ///
8703    /// let builder = prepare_request_builder();
8704    /// let response = builder.send().await?;
8705    /// # gax::Result::<()>::Ok(()) });
8706    ///
8707    /// fn prepare_request_builder() -> DeleteOperation {
8708    ///   # panic!();
8709    ///   // ... details omitted ...
8710    /// }
8711    /// ```
8712    #[derive(Clone, Debug)]
8713    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
8714
8715    impl DeleteOperation {
8716        pub(crate) fn new(
8717            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8718        ) -> Self {
8719            Self(RequestBuilder::new(stub))
8720        }
8721
8722        /// Sets the full request, replacing any prior values.
8723        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
8724            mut self,
8725            v: V,
8726        ) -> Self {
8727            self.0.request = v.into();
8728            self
8729        }
8730
8731        /// Sets all the options, replacing any prior values.
8732        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8733            self.0.options = v.into();
8734            self
8735        }
8736
8737        /// Sends the request.
8738        pub async fn send(self) -> Result<()> {
8739            (*self.0.stub)
8740                .delete_operation(self.0.request, self.0.options)
8741                .await
8742                .map(gax::response::Response::into_body)
8743        }
8744
8745        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
8746        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8747            self.0.request.name = v.into();
8748            self
8749        }
8750    }
8751
8752    #[doc(hidden)]
8753    impl gax::options::internal::RequestBuilder for DeleteOperation {
8754        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8755            &mut self.0.options
8756        }
8757    }
8758
8759    /// The request builder for [DataTaxonomyService::cancel_operation][crate::client::DataTaxonomyService::cancel_operation] calls.
8760    ///
8761    /// # Example
8762    /// ```no_run
8763    /// # use google_cloud_dataplex_v1::builder;
8764    /// use builder::data_taxonomy_service::CancelOperation;
8765    /// # tokio_test::block_on(async {
8766    ///
8767    /// let builder = prepare_request_builder();
8768    /// let response = builder.send().await?;
8769    /// # gax::Result::<()>::Ok(()) });
8770    ///
8771    /// fn prepare_request_builder() -> CancelOperation {
8772    ///   # panic!();
8773    ///   // ... details omitted ...
8774    /// }
8775    /// ```
8776    #[derive(Clone, Debug)]
8777    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
8778
8779    impl CancelOperation {
8780        pub(crate) fn new(
8781            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8782        ) -> Self {
8783            Self(RequestBuilder::new(stub))
8784        }
8785
8786        /// Sets the full request, replacing any prior values.
8787        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
8788            mut self,
8789            v: V,
8790        ) -> Self {
8791            self.0.request = v.into();
8792            self
8793        }
8794
8795        /// Sets all the options, replacing any prior values.
8796        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8797            self.0.options = v.into();
8798            self
8799        }
8800
8801        /// Sends the request.
8802        pub async fn send(self) -> Result<()> {
8803            (*self.0.stub)
8804                .cancel_operation(self.0.request, self.0.options)
8805                .await
8806                .map(gax::response::Response::into_body)
8807        }
8808
8809        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
8810        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8811            self.0.request.name = v.into();
8812            self
8813        }
8814    }
8815
8816    #[doc(hidden)]
8817    impl gax::options::internal::RequestBuilder for CancelOperation {
8818        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8819            &mut self.0.options
8820        }
8821    }
8822}
8823
8824pub mod data_scan_service {
8825    use crate::Result;
8826
8827    /// A builder for [DataScanService][crate::client::DataScanService].
8828    ///
8829    /// ```
8830    /// # tokio_test::block_on(async {
8831    /// # use google_cloud_dataplex_v1::*;
8832    /// # use builder::data_scan_service::ClientBuilder;
8833    /// # use client::DataScanService;
8834    /// let builder : ClientBuilder = DataScanService::builder();
8835    /// let client = builder
8836    ///     .with_endpoint("https://dataplex.googleapis.com")
8837    ///     .build().await?;
8838    /// # gax::client_builder::Result::<()>::Ok(()) });
8839    /// ```
8840    pub type ClientBuilder =
8841        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
8842
8843    pub(crate) mod client {
8844        use super::super::super::client::DataScanService;
8845        pub struct Factory;
8846        impl gax::client_builder::internal::ClientFactory for Factory {
8847            type Client = DataScanService;
8848            type Credentials = gaxi::options::Credentials;
8849            async fn build(
8850                self,
8851                config: gaxi::options::ClientConfig,
8852            ) -> gax::client_builder::Result<Self::Client> {
8853                Self::Client::new(config).await
8854            }
8855        }
8856    }
8857
8858    /// Common implementation for [crate::client::DataScanService] request builders.
8859    #[derive(Clone, Debug)]
8860    pub(crate) struct RequestBuilder<R: std::default::Default> {
8861        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
8862        request: R,
8863        options: gax::options::RequestOptions,
8864    }
8865
8866    impl<R> RequestBuilder<R>
8867    where
8868        R: std::default::Default,
8869    {
8870        pub(crate) fn new(
8871            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
8872        ) -> Self {
8873            Self {
8874                stub,
8875                request: R::default(),
8876                options: gax::options::RequestOptions::default(),
8877            }
8878        }
8879    }
8880
8881    /// The request builder for [DataScanService::create_data_scan][crate::client::DataScanService::create_data_scan] calls.
8882    ///
8883    /// # Example
8884    /// ```no_run
8885    /// # use google_cloud_dataplex_v1::builder;
8886    /// use builder::data_scan_service::CreateDataScan;
8887    /// # tokio_test::block_on(async {
8888    /// use lro::Poller;
8889    ///
8890    /// let builder = prepare_request_builder();
8891    /// let response = builder.poller().until_done().await?;
8892    /// # gax::Result::<()>::Ok(()) });
8893    ///
8894    /// fn prepare_request_builder() -> CreateDataScan {
8895    ///   # panic!();
8896    ///   // ... details omitted ...
8897    /// }
8898    /// ```
8899    #[derive(Clone, Debug)]
8900    pub struct CreateDataScan(RequestBuilder<crate::model::CreateDataScanRequest>);
8901
8902    impl CreateDataScan {
8903        pub(crate) fn new(
8904            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
8905        ) -> Self {
8906            Self(RequestBuilder::new(stub))
8907        }
8908
8909        /// Sets the full request, replacing any prior values.
8910        pub fn with_request<V: Into<crate::model::CreateDataScanRequest>>(mut self, v: V) -> Self {
8911            self.0.request = v.into();
8912            self
8913        }
8914
8915        /// Sets all the options, replacing any prior values.
8916        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8917            self.0.options = v.into();
8918            self
8919        }
8920
8921        /// Sends the request.
8922        ///
8923        /// # Long running operations
8924        ///
8925        /// This starts, but does not poll, a longrunning operation. More information
8926        /// on [create_data_scan][crate::client::DataScanService::create_data_scan].
8927        pub async fn send(self) -> Result<longrunning::model::Operation> {
8928            (*self.0.stub)
8929                .create_data_scan(self.0.request, self.0.options)
8930                .await
8931                .map(gax::response::Response::into_body)
8932        }
8933
8934        /// Creates a [Poller][lro::Poller] to work with `create_data_scan`.
8935        pub fn poller(
8936            self,
8937        ) -> impl lro::Poller<crate::model::DataScan, crate::model::OperationMetadata> {
8938            type Operation =
8939                lro::internal::Operation<crate::model::DataScan, crate::model::OperationMetadata>;
8940            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8941            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8942
8943            let stub = self.0.stub.clone();
8944            let mut options = self.0.options.clone();
8945            options.set_retry_policy(gax::retry_policy::NeverRetry);
8946            let query = move |name| {
8947                let stub = stub.clone();
8948                let options = options.clone();
8949                async {
8950                    let op = GetOperation::new(stub)
8951                        .set_name(name)
8952                        .with_options(options)
8953                        .send()
8954                        .await?;
8955                    Ok(Operation::new(op))
8956                }
8957            };
8958
8959            let start = move || async {
8960                let op = self.send().await?;
8961                Ok(Operation::new(op))
8962            };
8963
8964            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
8965        }
8966
8967        /// Sets the value of [parent][crate::model::CreateDataScanRequest::parent].
8968        ///
8969        /// This is a **required** field for requests.
8970        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
8971            self.0.request.parent = v.into();
8972            self
8973        }
8974
8975        /// Sets the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
8976        ///
8977        /// This is a **required** field for requests.
8978        pub fn set_data_scan<T>(mut self, v: T) -> Self
8979        where
8980            T: std::convert::Into<crate::model::DataScan>,
8981        {
8982            self.0.request.data_scan = std::option::Option::Some(v.into());
8983            self
8984        }
8985
8986        /// Sets or clears the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
8987        ///
8988        /// This is a **required** field for requests.
8989        pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
8990        where
8991            T: std::convert::Into<crate::model::DataScan>,
8992        {
8993            self.0.request.data_scan = v.map(|x| x.into());
8994            self
8995        }
8996
8997        /// Sets the value of [data_scan_id][crate::model::CreateDataScanRequest::data_scan_id].
8998        ///
8999        /// This is a **required** field for requests.
9000        pub fn set_data_scan_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
9001            self.0.request.data_scan_id = v.into();
9002            self
9003        }
9004
9005        /// Sets the value of [validate_only][crate::model::CreateDataScanRequest::validate_only].
9006        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9007            self.0.request.validate_only = v.into();
9008            self
9009        }
9010    }
9011
9012    #[doc(hidden)]
9013    impl gax::options::internal::RequestBuilder for CreateDataScan {
9014        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9015            &mut self.0.options
9016        }
9017    }
9018
9019    /// The request builder for [DataScanService::update_data_scan][crate::client::DataScanService::update_data_scan] calls.
9020    ///
9021    /// # Example
9022    /// ```no_run
9023    /// # use google_cloud_dataplex_v1::builder;
9024    /// use builder::data_scan_service::UpdateDataScan;
9025    /// # tokio_test::block_on(async {
9026    /// use lro::Poller;
9027    ///
9028    /// let builder = prepare_request_builder();
9029    /// let response = builder.poller().until_done().await?;
9030    /// # gax::Result::<()>::Ok(()) });
9031    ///
9032    /// fn prepare_request_builder() -> UpdateDataScan {
9033    ///   # panic!();
9034    ///   // ... details omitted ...
9035    /// }
9036    /// ```
9037    #[derive(Clone, Debug)]
9038    pub struct UpdateDataScan(RequestBuilder<crate::model::UpdateDataScanRequest>);
9039
9040    impl UpdateDataScan {
9041        pub(crate) fn new(
9042            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
9043        ) -> Self {
9044            Self(RequestBuilder::new(stub))
9045        }
9046
9047        /// Sets the full request, replacing any prior values.
9048        pub fn with_request<V: Into<crate::model::UpdateDataScanRequest>>(mut self, v: V) -> Self {
9049            self.0.request = v.into();
9050            self
9051        }
9052
9053        /// Sets all the options, replacing any prior values.
9054        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9055            self.0.options = v.into();
9056            self
9057        }
9058
9059        /// Sends the request.
9060        ///
9061        /// # Long running operations
9062        ///
9063        /// This starts, but does not poll, a longrunning operation. More information
9064        /// on [update_data_scan][crate::client::DataScanService::update_data_scan].
9065        pub async fn send(self) -> Result<longrunning::model::Operation> {
9066            (*self.0.stub)
9067                .update_data_scan(self.0.request, self.0.options)
9068                .await
9069                .map(gax::response::Response::into_body)
9070        }
9071
9072        /// Creates a [Poller][lro::Poller] to work with `update_data_scan`.
9073        pub fn poller(
9074            self,
9075        ) -> impl lro::Poller<crate::model::DataScan, crate::model::OperationMetadata> {
9076            type Operation =
9077                lro::internal::Operation<crate::model::DataScan, crate::model::OperationMetadata>;
9078            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9079            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9080
9081            let stub = self.0.stub.clone();
9082            let mut options = self.0.options.clone();
9083            options.set_retry_policy(gax::retry_policy::NeverRetry);
9084            let query = move |name| {
9085                let stub = stub.clone();
9086                let options = options.clone();
9087                async {
9088                    let op = GetOperation::new(stub)
9089                        .set_name(name)
9090                        .with_options(options)
9091                        .send()
9092                        .await?;
9093                    Ok(Operation::new(op))
9094                }
9095            };
9096
9097            let start = move || async {
9098                let op = self.send().await?;
9099                Ok(Operation::new(op))
9100            };
9101
9102            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
9103        }
9104
9105        /// Sets the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
9106        ///
9107        /// This is a **required** field for requests.
9108        pub fn set_data_scan<T>(mut self, v: T) -> Self
9109        where
9110            T: std::convert::Into<crate::model::DataScan>,
9111        {
9112            self.0.request.data_scan = std::option::Option::Some(v.into());
9113            self
9114        }
9115
9116        /// Sets or clears the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
9117        ///
9118        /// This is a **required** field for requests.
9119        pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
9120        where
9121            T: std::convert::Into<crate::model::DataScan>,
9122        {
9123            self.0.request.data_scan = v.map(|x| x.into());
9124            self
9125        }
9126
9127        /// Sets the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
9128        pub fn set_update_mask<T>(mut self, v: T) -> Self
9129        where
9130            T: std::convert::Into<wkt::FieldMask>,
9131        {
9132            self.0.request.update_mask = std::option::Option::Some(v.into());
9133            self
9134        }
9135
9136        /// Sets or clears the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
9137        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9138        where
9139            T: std::convert::Into<wkt::FieldMask>,
9140        {
9141            self.0.request.update_mask = v.map(|x| x.into());
9142            self
9143        }
9144
9145        /// Sets the value of [validate_only][crate::model::UpdateDataScanRequest::validate_only].
9146        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9147            self.0.request.validate_only = v.into();
9148            self
9149        }
9150    }
9151
9152    #[doc(hidden)]
9153    impl gax::options::internal::RequestBuilder for UpdateDataScan {
9154        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9155            &mut self.0.options
9156        }
9157    }
9158
9159    /// The request builder for [DataScanService::delete_data_scan][crate::client::DataScanService::delete_data_scan] calls.
9160    ///
9161    /// # Example
9162    /// ```no_run
9163    /// # use google_cloud_dataplex_v1::builder;
9164    /// use builder::data_scan_service::DeleteDataScan;
9165    /// # tokio_test::block_on(async {
9166    /// use lro::Poller;
9167    ///
9168    /// let builder = prepare_request_builder();
9169    /// let response = builder.poller().until_done().await?;
9170    /// # gax::Result::<()>::Ok(()) });
9171    ///
9172    /// fn prepare_request_builder() -> DeleteDataScan {
9173    ///   # panic!();
9174    ///   // ... details omitted ...
9175    /// }
9176    /// ```
9177    #[derive(Clone, Debug)]
9178    pub struct DeleteDataScan(RequestBuilder<crate::model::DeleteDataScanRequest>);
9179
9180    impl DeleteDataScan {
9181        pub(crate) fn new(
9182            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
9183        ) -> Self {
9184            Self(RequestBuilder::new(stub))
9185        }
9186
9187        /// Sets the full request, replacing any prior values.
9188        pub fn with_request<V: Into<crate::model::DeleteDataScanRequest>>(mut self, v: V) -> Self {
9189            self.0.request = v.into();
9190            self
9191        }
9192
9193        /// Sets all the options, replacing any prior values.
9194        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9195            self.0.options = v.into();
9196            self
9197        }
9198
9199        /// Sends the request.
9200        ///
9201        /// # Long running operations
9202        ///
9203        /// This starts, but does not poll, a longrunning operation. More information
9204        /// on [delete_data_scan][crate::client::DataScanService::delete_data_scan].
9205        pub async fn send(self) -> Result<longrunning::model::Operation> {
9206            (*self.0.stub)
9207                .delete_data_scan(self.0.request, self.0.options)
9208                .await
9209                .map(gax::response::Response::into_body)
9210        }
9211
9212        /// Creates a [Poller][lro::Poller] to work with `delete_data_scan`.
9213        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
9214            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
9215            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9216            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9217
9218            let stub = self.0.stub.clone();
9219            let mut options = self.0.options.clone();
9220            options.set_retry_policy(gax::retry_policy::NeverRetry);
9221            let query = move |name| {
9222                let stub = stub.clone();
9223                let options = options.clone();
9224                async {
9225                    let op = GetOperation::new(stub)
9226                        .set_name(name)
9227                        .with_options(options)
9228                        .send()
9229                        .await?;
9230                    Ok(Operation::new(op))
9231                }
9232            };
9233
9234            let start = move || async {
9235                let op = self.send().await?;
9236                Ok(Operation::new(op))
9237            };
9238
9239            lro::internal::new_unit_response_poller(
9240                polling_error_policy,
9241                polling_backoff_policy,
9242                start,
9243                query,
9244            )
9245        }
9246
9247        /// Sets the value of [name][crate::model::DeleteDataScanRequest::name].
9248        ///
9249        /// This is a **required** field for requests.
9250        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9251            self.0.request.name = v.into();
9252            self
9253        }
9254
9255        /// Sets the value of [force][crate::model::DeleteDataScanRequest::force].
9256        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
9257            self.0.request.force = v.into();
9258            self
9259        }
9260    }
9261
9262    #[doc(hidden)]
9263    impl gax::options::internal::RequestBuilder for DeleteDataScan {
9264        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9265            &mut self.0.options
9266        }
9267    }
9268
9269    /// The request builder for [DataScanService::get_data_scan][crate::client::DataScanService::get_data_scan] calls.
9270    ///
9271    /// # Example
9272    /// ```no_run
9273    /// # use google_cloud_dataplex_v1::builder;
9274    /// use builder::data_scan_service::GetDataScan;
9275    /// # tokio_test::block_on(async {
9276    ///
9277    /// let builder = prepare_request_builder();
9278    /// let response = builder.send().await?;
9279    /// # gax::Result::<()>::Ok(()) });
9280    ///
9281    /// fn prepare_request_builder() -> GetDataScan {
9282    ///   # panic!();
9283    ///   // ... details omitted ...
9284    /// }
9285    /// ```
9286    #[derive(Clone, Debug)]
9287    pub struct GetDataScan(RequestBuilder<crate::model::GetDataScanRequest>);
9288
9289    impl GetDataScan {
9290        pub(crate) fn new(
9291            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
9292        ) -> Self {
9293            Self(RequestBuilder::new(stub))
9294        }
9295
9296        /// Sets the full request, replacing any prior values.
9297        pub fn with_request<V: Into<crate::model::GetDataScanRequest>>(mut self, v: V) -> Self {
9298            self.0.request = v.into();
9299            self
9300        }
9301
9302        /// Sets all the options, replacing any prior values.
9303        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9304            self.0.options = v.into();
9305            self
9306        }
9307
9308        /// Sends the request.
9309        pub async fn send(self) -> Result<crate::model::DataScan> {
9310            (*self.0.stub)
9311                .get_data_scan(self.0.request, self.0.options)
9312                .await
9313                .map(gax::response::Response::into_body)
9314        }
9315
9316        /// Sets the value of [name][crate::model::GetDataScanRequest::name].
9317        ///
9318        /// This is a **required** field for requests.
9319        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9320            self.0.request.name = v.into();
9321            self
9322        }
9323
9324        /// Sets the value of [view][crate::model::GetDataScanRequest::view].
9325        pub fn set_view<T: Into<crate::model::get_data_scan_request::DataScanView>>(
9326            mut self,
9327            v: T,
9328        ) -> Self {
9329            self.0.request.view = v.into();
9330            self
9331        }
9332    }
9333
9334    #[doc(hidden)]
9335    impl gax::options::internal::RequestBuilder for GetDataScan {
9336        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9337            &mut self.0.options
9338        }
9339    }
9340
9341    /// The request builder for [DataScanService::list_data_scans][crate::client::DataScanService::list_data_scans] calls.
9342    ///
9343    /// # Example
9344    /// ```no_run
9345    /// # use google_cloud_dataplex_v1::builder;
9346    /// use builder::data_scan_service::ListDataScans;
9347    /// # tokio_test::block_on(async {
9348    /// use gax::paginator::ItemPaginator;
9349    ///
9350    /// let builder = prepare_request_builder();
9351    /// let mut items = builder.by_item();
9352    /// while let Some(result) = items.next().await {
9353    ///   let item = result?;
9354    /// }
9355    /// # gax::Result::<()>::Ok(()) });
9356    ///
9357    /// fn prepare_request_builder() -> ListDataScans {
9358    ///   # panic!();
9359    ///   // ... details omitted ...
9360    /// }
9361    /// ```
9362    #[derive(Clone, Debug)]
9363    pub struct ListDataScans(RequestBuilder<crate::model::ListDataScansRequest>);
9364
9365    impl ListDataScans {
9366        pub(crate) fn new(
9367            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
9368        ) -> Self {
9369            Self(RequestBuilder::new(stub))
9370        }
9371
9372        /// Sets the full request, replacing any prior values.
9373        pub fn with_request<V: Into<crate::model::ListDataScansRequest>>(mut self, v: V) -> Self {
9374            self.0.request = v.into();
9375            self
9376        }
9377
9378        /// Sets all the options, replacing any prior values.
9379        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9380            self.0.options = v.into();
9381            self
9382        }
9383
9384        /// Sends the request.
9385        pub async fn send(self) -> Result<crate::model::ListDataScansResponse> {
9386            (*self.0.stub)
9387                .list_data_scans(self.0.request, self.0.options)
9388                .await
9389                .map(gax::response::Response::into_body)
9390        }
9391
9392        /// Streams each page in the collection.
9393        pub fn by_page(
9394            self,
9395        ) -> impl gax::paginator::Paginator<crate::model::ListDataScansResponse, gax::error::Error>
9396        {
9397            use std::clone::Clone;
9398            let token = self.0.request.page_token.clone();
9399            let execute = move |token: String| {
9400                let mut builder = self.clone();
9401                builder.0.request = builder.0.request.set_page_token(token);
9402                builder.send()
9403            };
9404            gax::paginator::internal::new_paginator(token, execute)
9405        }
9406
9407        /// Streams each item in the collection.
9408        pub fn by_item(
9409            self,
9410        ) -> impl gax::paginator::ItemPaginator<crate::model::ListDataScansResponse, gax::error::Error>
9411        {
9412            use gax::paginator::Paginator;
9413            self.by_page().items()
9414        }
9415
9416        /// Sets the value of [parent][crate::model::ListDataScansRequest::parent].
9417        ///
9418        /// This is a **required** field for requests.
9419        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9420            self.0.request.parent = v.into();
9421            self
9422        }
9423
9424        /// Sets the value of [page_size][crate::model::ListDataScansRequest::page_size].
9425        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9426            self.0.request.page_size = v.into();
9427            self
9428        }
9429
9430        /// Sets the value of [page_token][crate::model::ListDataScansRequest::page_token].
9431        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9432            self.0.request.page_token = v.into();
9433            self
9434        }
9435
9436        /// Sets the value of [filter][crate::model::ListDataScansRequest::filter].
9437        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9438            self.0.request.filter = v.into();
9439            self
9440        }
9441
9442        /// Sets the value of [order_by][crate::model::ListDataScansRequest::order_by].
9443        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
9444            self.0.request.order_by = v.into();
9445            self
9446        }
9447    }
9448
9449    #[doc(hidden)]
9450    impl gax::options::internal::RequestBuilder for ListDataScans {
9451        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9452            &mut self.0.options
9453        }
9454    }
9455
9456    /// The request builder for [DataScanService::run_data_scan][crate::client::DataScanService::run_data_scan] calls.
9457    ///
9458    /// # Example
9459    /// ```no_run
9460    /// # use google_cloud_dataplex_v1::builder;
9461    /// use builder::data_scan_service::RunDataScan;
9462    /// # tokio_test::block_on(async {
9463    ///
9464    /// let builder = prepare_request_builder();
9465    /// let response = builder.send().await?;
9466    /// # gax::Result::<()>::Ok(()) });
9467    ///
9468    /// fn prepare_request_builder() -> RunDataScan {
9469    ///   # panic!();
9470    ///   // ... details omitted ...
9471    /// }
9472    /// ```
9473    #[derive(Clone, Debug)]
9474    pub struct RunDataScan(RequestBuilder<crate::model::RunDataScanRequest>);
9475
9476    impl RunDataScan {
9477        pub(crate) fn new(
9478            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
9479        ) -> Self {
9480            Self(RequestBuilder::new(stub))
9481        }
9482
9483        /// Sets the full request, replacing any prior values.
9484        pub fn with_request<V: Into<crate::model::RunDataScanRequest>>(mut self, v: V) -> Self {
9485            self.0.request = v.into();
9486            self
9487        }
9488
9489        /// Sets all the options, replacing any prior values.
9490        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9491            self.0.options = v.into();
9492            self
9493        }
9494
9495        /// Sends the request.
9496        pub async fn send(self) -> Result<crate::model::RunDataScanResponse> {
9497            (*self.0.stub)
9498                .run_data_scan(self.0.request, self.0.options)
9499                .await
9500                .map(gax::response::Response::into_body)
9501        }
9502
9503        /// Sets the value of [name][crate::model::RunDataScanRequest::name].
9504        ///
9505        /// This is a **required** field for requests.
9506        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9507            self.0.request.name = v.into();
9508            self
9509        }
9510    }
9511
9512    #[doc(hidden)]
9513    impl gax::options::internal::RequestBuilder for RunDataScan {
9514        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9515            &mut self.0.options
9516        }
9517    }
9518
9519    /// The request builder for [DataScanService::get_data_scan_job][crate::client::DataScanService::get_data_scan_job] calls.
9520    ///
9521    /// # Example
9522    /// ```no_run
9523    /// # use google_cloud_dataplex_v1::builder;
9524    /// use builder::data_scan_service::GetDataScanJob;
9525    /// # tokio_test::block_on(async {
9526    ///
9527    /// let builder = prepare_request_builder();
9528    /// let response = builder.send().await?;
9529    /// # gax::Result::<()>::Ok(()) });
9530    ///
9531    /// fn prepare_request_builder() -> GetDataScanJob {
9532    ///   # panic!();
9533    ///   // ... details omitted ...
9534    /// }
9535    /// ```
9536    #[derive(Clone, Debug)]
9537    pub struct GetDataScanJob(RequestBuilder<crate::model::GetDataScanJobRequest>);
9538
9539    impl GetDataScanJob {
9540        pub(crate) fn new(
9541            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
9542        ) -> Self {
9543            Self(RequestBuilder::new(stub))
9544        }
9545
9546        /// Sets the full request, replacing any prior values.
9547        pub fn with_request<V: Into<crate::model::GetDataScanJobRequest>>(mut self, v: V) -> Self {
9548            self.0.request = v.into();
9549            self
9550        }
9551
9552        /// Sets all the options, replacing any prior values.
9553        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9554            self.0.options = v.into();
9555            self
9556        }
9557
9558        /// Sends the request.
9559        pub async fn send(self) -> Result<crate::model::DataScanJob> {
9560            (*self.0.stub)
9561                .get_data_scan_job(self.0.request, self.0.options)
9562                .await
9563                .map(gax::response::Response::into_body)
9564        }
9565
9566        /// Sets the value of [name][crate::model::GetDataScanJobRequest::name].
9567        ///
9568        /// This is a **required** field for requests.
9569        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9570            self.0.request.name = v.into();
9571            self
9572        }
9573
9574        /// Sets the value of [view][crate::model::GetDataScanJobRequest::view].
9575        pub fn set_view<T: Into<crate::model::get_data_scan_job_request::DataScanJobView>>(
9576            mut self,
9577            v: T,
9578        ) -> Self {
9579            self.0.request.view = v.into();
9580            self
9581        }
9582    }
9583
9584    #[doc(hidden)]
9585    impl gax::options::internal::RequestBuilder for GetDataScanJob {
9586        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9587            &mut self.0.options
9588        }
9589    }
9590
9591    /// The request builder for [DataScanService::list_data_scan_jobs][crate::client::DataScanService::list_data_scan_jobs] calls.
9592    ///
9593    /// # Example
9594    /// ```no_run
9595    /// # use google_cloud_dataplex_v1::builder;
9596    /// use builder::data_scan_service::ListDataScanJobs;
9597    /// # tokio_test::block_on(async {
9598    /// use gax::paginator::ItemPaginator;
9599    ///
9600    /// let builder = prepare_request_builder();
9601    /// let mut items = builder.by_item();
9602    /// while let Some(result) = items.next().await {
9603    ///   let item = result?;
9604    /// }
9605    /// # gax::Result::<()>::Ok(()) });
9606    ///
9607    /// fn prepare_request_builder() -> ListDataScanJobs {
9608    ///   # panic!();
9609    ///   // ... details omitted ...
9610    /// }
9611    /// ```
9612    #[derive(Clone, Debug)]
9613    pub struct ListDataScanJobs(RequestBuilder<crate::model::ListDataScanJobsRequest>);
9614
9615    impl ListDataScanJobs {
9616        pub(crate) fn new(
9617            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
9618        ) -> Self {
9619            Self(RequestBuilder::new(stub))
9620        }
9621
9622        /// Sets the full request, replacing any prior values.
9623        pub fn with_request<V: Into<crate::model::ListDataScanJobsRequest>>(
9624            mut self,
9625            v: V,
9626        ) -> Self {
9627            self.0.request = v.into();
9628            self
9629        }
9630
9631        /// Sets all the options, replacing any prior values.
9632        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9633            self.0.options = v.into();
9634            self
9635        }
9636
9637        /// Sends the request.
9638        pub async fn send(self) -> Result<crate::model::ListDataScanJobsResponse> {
9639            (*self.0.stub)
9640                .list_data_scan_jobs(self.0.request, self.0.options)
9641                .await
9642                .map(gax::response::Response::into_body)
9643        }
9644
9645        /// Streams each page in the collection.
9646        pub fn by_page(
9647            self,
9648        ) -> impl gax::paginator::Paginator<crate::model::ListDataScanJobsResponse, gax::error::Error>
9649        {
9650            use std::clone::Clone;
9651            let token = self.0.request.page_token.clone();
9652            let execute = move |token: String| {
9653                let mut builder = self.clone();
9654                builder.0.request = builder.0.request.set_page_token(token);
9655                builder.send()
9656            };
9657            gax::paginator::internal::new_paginator(token, execute)
9658        }
9659
9660        /// Streams each item in the collection.
9661        pub fn by_item(
9662            self,
9663        ) -> impl gax::paginator::ItemPaginator<crate::model::ListDataScanJobsResponse, gax::error::Error>
9664        {
9665            use gax::paginator::Paginator;
9666            self.by_page().items()
9667        }
9668
9669        /// Sets the value of [parent][crate::model::ListDataScanJobsRequest::parent].
9670        ///
9671        /// This is a **required** field for requests.
9672        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9673            self.0.request.parent = v.into();
9674            self
9675        }
9676
9677        /// Sets the value of [page_size][crate::model::ListDataScanJobsRequest::page_size].
9678        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9679            self.0.request.page_size = v.into();
9680            self
9681        }
9682
9683        /// Sets the value of [page_token][crate::model::ListDataScanJobsRequest::page_token].
9684        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9685            self.0.request.page_token = v.into();
9686            self
9687        }
9688
9689        /// Sets the value of [filter][crate::model::ListDataScanJobsRequest::filter].
9690        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9691            self.0.request.filter = v.into();
9692            self
9693        }
9694    }
9695
9696    #[doc(hidden)]
9697    impl gax::options::internal::RequestBuilder for ListDataScanJobs {
9698        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9699            &mut self.0.options
9700        }
9701    }
9702
9703    /// The request builder for [DataScanService::generate_data_quality_rules][crate::client::DataScanService::generate_data_quality_rules] calls.
9704    ///
9705    /// # Example
9706    /// ```no_run
9707    /// # use google_cloud_dataplex_v1::builder;
9708    /// use builder::data_scan_service::GenerateDataQualityRules;
9709    /// # tokio_test::block_on(async {
9710    ///
9711    /// let builder = prepare_request_builder();
9712    /// let response = builder.send().await?;
9713    /// # gax::Result::<()>::Ok(()) });
9714    ///
9715    /// fn prepare_request_builder() -> GenerateDataQualityRules {
9716    ///   # panic!();
9717    ///   // ... details omitted ...
9718    /// }
9719    /// ```
9720    #[derive(Clone, Debug)]
9721    pub struct GenerateDataQualityRules(
9722        RequestBuilder<crate::model::GenerateDataQualityRulesRequest>,
9723    );
9724
9725    impl GenerateDataQualityRules {
9726        pub(crate) fn new(
9727            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
9728        ) -> Self {
9729            Self(RequestBuilder::new(stub))
9730        }
9731
9732        /// Sets the full request, replacing any prior values.
9733        pub fn with_request<V: Into<crate::model::GenerateDataQualityRulesRequest>>(
9734            mut self,
9735            v: V,
9736        ) -> Self {
9737            self.0.request = v.into();
9738            self
9739        }
9740
9741        /// Sets all the options, replacing any prior values.
9742        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9743            self.0.options = v.into();
9744            self
9745        }
9746
9747        /// Sends the request.
9748        pub async fn send(self) -> Result<crate::model::GenerateDataQualityRulesResponse> {
9749            (*self.0.stub)
9750                .generate_data_quality_rules(self.0.request, self.0.options)
9751                .await
9752                .map(gax::response::Response::into_body)
9753        }
9754
9755        /// Sets the value of [name][crate::model::GenerateDataQualityRulesRequest::name].
9756        ///
9757        /// This is a **required** field for requests.
9758        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9759            self.0.request.name = v.into();
9760            self
9761        }
9762    }
9763
9764    #[doc(hidden)]
9765    impl gax::options::internal::RequestBuilder for GenerateDataQualityRules {
9766        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9767            &mut self.0.options
9768        }
9769    }
9770
9771    /// The request builder for [DataScanService::list_locations][crate::client::DataScanService::list_locations] calls.
9772    ///
9773    /// # Example
9774    /// ```no_run
9775    /// # use google_cloud_dataplex_v1::builder;
9776    /// use builder::data_scan_service::ListLocations;
9777    /// # tokio_test::block_on(async {
9778    /// use gax::paginator::ItemPaginator;
9779    ///
9780    /// let builder = prepare_request_builder();
9781    /// let mut items = builder.by_item();
9782    /// while let Some(result) = items.next().await {
9783    ///   let item = result?;
9784    /// }
9785    /// # gax::Result::<()>::Ok(()) });
9786    ///
9787    /// fn prepare_request_builder() -> ListLocations {
9788    ///   # panic!();
9789    ///   // ... details omitted ...
9790    /// }
9791    /// ```
9792    #[derive(Clone, Debug)]
9793    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
9794
9795    impl ListLocations {
9796        pub(crate) fn new(
9797            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
9798        ) -> Self {
9799            Self(RequestBuilder::new(stub))
9800        }
9801
9802        /// Sets the full request, replacing any prior values.
9803        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
9804            mut self,
9805            v: V,
9806        ) -> Self {
9807            self.0.request = v.into();
9808            self
9809        }
9810
9811        /// Sets all the options, replacing any prior values.
9812        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9813            self.0.options = v.into();
9814            self
9815        }
9816
9817        /// Sends the request.
9818        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
9819            (*self.0.stub)
9820                .list_locations(self.0.request, self.0.options)
9821                .await
9822                .map(gax::response::Response::into_body)
9823        }
9824
9825        /// Streams each page in the collection.
9826        pub fn by_page(
9827            self,
9828        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
9829        {
9830            use std::clone::Clone;
9831            let token = self.0.request.page_token.clone();
9832            let execute = move |token: String| {
9833                let mut builder = self.clone();
9834                builder.0.request = builder.0.request.set_page_token(token);
9835                builder.send()
9836            };
9837            gax::paginator::internal::new_paginator(token, execute)
9838        }
9839
9840        /// Streams each item in the collection.
9841        pub fn by_item(
9842            self,
9843        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
9844        {
9845            use gax::paginator::Paginator;
9846            self.by_page().items()
9847        }
9848
9849        /// Sets the value of [name][location::model::ListLocationsRequest::name].
9850        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9851            self.0.request.name = v.into();
9852            self
9853        }
9854
9855        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
9856        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9857            self.0.request.filter = v.into();
9858            self
9859        }
9860
9861        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
9862        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9863            self.0.request.page_size = v.into();
9864            self
9865        }
9866
9867        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
9868        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9869            self.0.request.page_token = v.into();
9870            self
9871        }
9872    }
9873
9874    #[doc(hidden)]
9875    impl gax::options::internal::RequestBuilder for ListLocations {
9876        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9877            &mut self.0.options
9878        }
9879    }
9880
9881    /// The request builder for [DataScanService::get_location][crate::client::DataScanService::get_location] calls.
9882    ///
9883    /// # Example
9884    /// ```no_run
9885    /// # use google_cloud_dataplex_v1::builder;
9886    /// use builder::data_scan_service::GetLocation;
9887    /// # tokio_test::block_on(async {
9888    ///
9889    /// let builder = prepare_request_builder();
9890    /// let response = builder.send().await?;
9891    /// # gax::Result::<()>::Ok(()) });
9892    ///
9893    /// fn prepare_request_builder() -> GetLocation {
9894    ///   # panic!();
9895    ///   // ... details omitted ...
9896    /// }
9897    /// ```
9898    #[derive(Clone, Debug)]
9899    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
9900
9901    impl GetLocation {
9902        pub(crate) fn new(
9903            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
9904        ) -> Self {
9905            Self(RequestBuilder::new(stub))
9906        }
9907
9908        /// Sets the full request, replacing any prior values.
9909        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
9910            self.0.request = v.into();
9911            self
9912        }
9913
9914        /// Sets all the options, replacing any prior values.
9915        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9916            self.0.options = v.into();
9917            self
9918        }
9919
9920        /// Sends the request.
9921        pub async fn send(self) -> Result<location::model::Location> {
9922            (*self.0.stub)
9923                .get_location(self.0.request, self.0.options)
9924                .await
9925                .map(gax::response::Response::into_body)
9926        }
9927
9928        /// Sets the value of [name][location::model::GetLocationRequest::name].
9929        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9930            self.0.request.name = v.into();
9931            self
9932        }
9933    }
9934
9935    #[doc(hidden)]
9936    impl gax::options::internal::RequestBuilder for GetLocation {
9937        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9938            &mut self.0.options
9939        }
9940    }
9941
9942    /// The request builder for [DataScanService::set_iam_policy][crate::client::DataScanService::set_iam_policy] calls.
9943    ///
9944    /// # Example
9945    /// ```no_run
9946    /// # use google_cloud_dataplex_v1::builder;
9947    /// use builder::data_scan_service::SetIamPolicy;
9948    /// # tokio_test::block_on(async {
9949    ///
9950    /// let builder = prepare_request_builder();
9951    /// let response = builder.send().await?;
9952    /// # gax::Result::<()>::Ok(()) });
9953    ///
9954    /// fn prepare_request_builder() -> SetIamPolicy {
9955    ///   # panic!();
9956    ///   // ... details omitted ...
9957    /// }
9958    /// ```
9959    #[derive(Clone, Debug)]
9960    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
9961
9962    impl SetIamPolicy {
9963        pub(crate) fn new(
9964            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
9965        ) -> Self {
9966            Self(RequestBuilder::new(stub))
9967        }
9968
9969        /// Sets the full request, replacing any prior values.
9970        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
9971            self.0.request = v.into();
9972            self
9973        }
9974
9975        /// Sets all the options, replacing any prior values.
9976        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9977            self.0.options = v.into();
9978            self
9979        }
9980
9981        /// Sends the request.
9982        pub async fn send(self) -> Result<iam_v1::model::Policy> {
9983            (*self.0.stub)
9984                .set_iam_policy(self.0.request, self.0.options)
9985                .await
9986                .map(gax::response::Response::into_body)
9987        }
9988
9989        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
9990        ///
9991        /// This is a **required** field for requests.
9992        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
9993            self.0.request.resource = v.into();
9994            self
9995        }
9996
9997        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
9998        ///
9999        /// This is a **required** field for requests.
10000        pub fn set_policy<T>(mut self, v: T) -> Self
10001        where
10002            T: std::convert::Into<iam_v1::model::Policy>,
10003        {
10004            self.0.request.policy = std::option::Option::Some(v.into());
10005            self
10006        }
10007
10008        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
10009        ///
10010        /// This is a **required** field for requests.
10011        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
10012        where
10013            T: std::convert::Into<iam_v1::model::Policy>,
10014        {
10015            self.0.request.policy = v.map(|x| x.into());
10016            self
10017        }
10018
10019        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
10020        pub fn set_update_mask<T>(mut self, v: T) -> Self
10021        where
10022            T: std::convert::Into<wkt::FieldMask>,
10023        {
10024            self.0.request.update_mask = std::option::Option::Some(v.into());
10025            self
10026        }
10027
10028        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
10029        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10030        where
10031            T: std::convert::Into<wkt::FieldMask>,
10032        {
10033            self.0.request.update_mask = v.map(|x| x.into());
10034            self
10035        }
10036    }
10037
10038    #[doc(hidden)]
10039    impl gax::options::internal::RequestBuilder for SetIamPolicy {
10040        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10041            &mut self.0.options
10042        }
10043    }
10044
10045    /// The request builder for [DataScanService::get_iam_policy][crate::client::DataScanService::get_iam_policy] calls.
10046    ///
10047    /// # Example
10048    /// ```no_run
10049    /// # use google_cloud_dataplex_v1::builder;
10050    /// use builder::data_scan_service::GetIamPolicy;
10051    /// # tokio_test::block_on(async {
10052    ///
10053    /// let builder = prepare_request_builder();
10054    /// let response = builder.send().await?;
10055    /// # gax::Result::<()>::Ok(()) });
10056    ///
10057    /// fn prepare_request_builder() -> GetIamPolicy {
10058    ///   # panic!();
10059    ///   // ... details omitted ...
10060    /// }
10061    /// ```
10062    #[derive(Clone, Debug)]
10063    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
10064
10065    impl GetIamPolicy {
10066        pub(crate) fn new(
10067            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
10068        ) -> Self {
10069            Self(RequestBuilder::new(stub))
10070        }
10071
10072        /// Sets the full request, replacing any prior values.
10073        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
10074            self.0.request = v.into();
10075            self
10076        }
10077
10078        /// Sets all the options, replacing any prior values.
10079        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10080            self.0.options = v.into();
10081            self
10082        }
10083
10084        /// Sends the request.
10085        pub async fn send(self) -> Result<iam_v1::model::Policy> {
10086            (*self.0.stub)
10087                .get_iam_policy(self.0.request, self.0.options)
10088                .await
10089                .map(gax::response::Response::into_body)
10090        }
10091
10092        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
10093        ///
10094        /// This is a **required** field for requests.
10095        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
10096            self.0.request.resource = v.into();
10097            self
10098        }
10099
10100        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
10101        pub fn set_options<T>(mut self, v: T) -> Self
10102        where
10103            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
10104        {
10105            self.0.request.options = std::option::Option::Some(v.into());
10106            self
10107        }
10108
10109        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
10110        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
10111        where
10112            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
10113        {
10114            self.0.request.options = v.map(|x| x.into());
10115            self
10116        }
10117    }
10118
10119    #[doc(hidden)]
10120    impl gax::options::internal::RequestBuilder for GetIamPolicy {
10121        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10122            &mut self.0.options
10123        }
10124    }
10125
10126    /// The request builder for [DataScanService::test_iam_permissions][crate::client::DataScanService::test_iam_permissions] calls.
10127    ///
10128    /// # Example
10129    /// ```no_run
10130    /// # use google_cloud_dataplex_v1::builder;
10131    /// use builder::data_scan_service::TestIamPermissions;
10132    /// # tokio_test::block_on(async {
10133    ///
10134    /// let builder = prepare_request_builder();
10135    /// let response = builder.send().await?;
10136    /// # gax::Result::<()>::Ok(()) });
10137    ///
10138    /// fn prepare_request_builder() -> TestIamPermissions {
10139    ///   # panic!();
10140    ///   // ... details omitted ...
10141    /// }
10142    /// ```
10143    #[derive(Clone, Debug)]
10144    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
10145
10146    impl TestIamPermissions {
10147        pub(crate) fn new(
10148            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
10149        ) -> Self {
10150            Self(RequestBuilder::new(stub))
10151        }
10152
10153        /// Sets the full request, replacing any prior values.
10154        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
10155            mut self,
10156            v: V,
10157        ) -> Self {
10158            self.0.request = v.into();
10159            self
10160        }
10161
10162        /// Sets all the options, replacing any prior values.
10163        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10164            self.0.options = v.into();
10165            self
10166        }
10167
10168        /// Sends the request.
10169        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
10170            (*self.0.stub)
10171                .test_iam_permissions(self.0.request, self.0.options)
10172                .await
10173                .map(gax::response::Response::into_body)
10174        }
10175
10176        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
10177        ///
10178        /// This is a **required** field for requests.
10179        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
10180            self.0.request.resource = v.into();
10181            self
10182        }
10183
10184        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
10185        ///
10186        /// This is a **required** field for requests.
10187        pub fn set_permissions<T, V>(mut self, v: T) -> Self
10188        where
10189            T: std::iter::IntoIterator<Item = V>,
10190            V: std::convert::Into<std::string::String>,
10191        {
10192            use std::iter::Iterator;
10193            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
10194            self
10195        }
10196    }
10197
10198    #[doc(hidden)]
10199    impl gax::options::internal::RequestBuilder for TestIamPermissions {
10200        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10201            &mut self.0.options
10202        }
10203    }
10204
10205    /// The request builder for [DataScanService::list_operations][crate::client::DataScanService::list_operations] calls.
10206    ///
10207    /// # Example
10208    /// ```no_run
10209    /// # use google_cloud_dataplex_v1::builder;
10210    /// use builder::data_scan_service::ListOperations;
10211    /// # tokio_test::block_on(async {
10212    /// use gax::paginator::ItemPaginator;
10213    ///
10214    /// let builder = prepare_request_builder();
10215    /// let mut items = builder.by_item();
10216    /// while let Some(result) = items.next().await {
10217    ///   let item = result?;
10218    /// }
10219    /// # gax::Result::<()>::Ok(()) });
10220    ///
10221    /// fn prepare_request_builder() -> ListOperations {
10222    ///   # panic!();
10223    ///   // ... details omitted ...
10224    /// }
10225    /// ```
10226    #[derive(Clone, Debug)]
10227    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
10228
10229    impl ListOperations {
10230        pub(crate) fn new(
10231            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
10232        ) -> Self {
10233            Self(RequestBuilder::new(stub))
10234        }
10235
10236        /// Sets the full request, replacing any prior values.
10237        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
10238            mut self,
10239            v: V,
10240        ) -> Self {
10241            self.0.request = v.into();
10242            self
10243        }
10244
10245        /// Sets all the options, replacing any prior values.
10246        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10247            self.0.options = v.into();
10248            self
10249        }
10250
10251        /// Sends the request.
10252        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
10253            (*self.0.stub)
10254                .list_operations(self.0.request, self.0.options)
10255                .await
10256                .map(gax::response::Response::into_body)
10257        }
10258
10259        /// Streams each page in the collection.
10260        pub fn by_page(
10261            self,
10262        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
10263        {
10264            use std::clone::Clone;
10265            let token = self.0.request.page_token.clone();
10266            let execute = move |token: String| {
10267                let mut builder = self.clone();
10268                builder.0.request = builder.0.request.set_page_token(token);
10269                builder.send()
10270            };
10271            gax::paginator::internal::new_paginator(token, execute)
10272        }
10273
10274        /// Streams each item in the collection.
10275        pub fn by_item(
10276            self,
10277        ) -> impl gax::paginator::ItemPaginator<
10278            longrunning::model::ListOperationsResponse,
10279            gax::error::Error,
10280        > {
10281            use gax::paginator::Paginator;
10282            self.by_page().items()
10283        }
10284
10285        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
10286        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10287            self.0.request.name = v.into();
10288            self
10289        }
10290
10291        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
10292        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10293            self.0.request.filter = v.into();
10294            self
10295        }
10296
10297        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
10298        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10299            self.0.request.page_size = v.into();
10300            self
10301        }
10302
10303        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
10304        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10305            self.0.request.page_token = v.into();
10306            self
10307        }
10308    }
10309
10310    #[doc(hidden)]
10311    impl gax::options::internal::RequestBuilder for ListOperations {
10312        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10313            &mut self.0.options
10314        }
10315    }
10316
10317    /// The request builder for [DataScanService::get_operation][crate::client::DataScanService::get_operation] calls.
10318    ///
10319    /// # Example
10320    /// ```no_run
10321    /// # use google_cloud_dataplex_v1::builder;
10322    /// use builder::data_scan_service::GetOperation;
10323    /// # tokio_test::block_on(async {
10324    ///
10325    /// let builder = prepare_request_builder();
10326    /// let response = builder.send().await?;
10327    /// # gax::Result::<()>::Ok(()) });
10328    ///
10329    /// fn prepare_request_builder() -> GetOperation {
10330    ///   # panic!();
10331    ///   // ... details omitted ...
10332    /// }
10333    /// ```
10334    #[derive(Clone, Debug)]
10335    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
10336
10337    impl GetOperation {
10338        pub(crate) fn new(
10339            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
10340        ) -> Self {
10341            Self(RequestBuilder::new(stub))
10342        }
10343
10344        /// Sets the full request, replacing any prior values.
10345        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
10346            mut self,
10347            v: V,
10348        ) -> Self {
10349            self.0.request = v.into();
10350            self
10351        }
10352
10353        /// Sets all the options, replacing any prior values.
10354        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10355            self.0.options = v.into();
10356            self
10357        }
10358
10359        /// Sends the request.
10360        pub async fn send(self) -> Result<longrunning::model::Operation> {
10361            (*self.0.stub)
10362                .get_operation(self.0.request, self.0.options)
10363                .await
10364                .map(gax::response::Response::into_body)
10365        }
10366
10367        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
10368        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10369            self.0.request.name = v.into();
10370            self
10371        }
10372    }
10373
10374    #[doc(hidden)]
10375    impl gax::options::internal::RequestBuilder for GetOperation {
10376        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10377            &mut self.0.options
10378        }
10379    }
10380
10381    /// The request builder for [DataScanService::delete_operation][crate::client::DataScanService::delete_operation] calls.
10382    ///
10383    /// # Example
10384    /// ```no_run
10385    /// # use google_cloud_dataplex_v1::builder;
10386    /// use builder::data_scan_service::DeleteOperation;
10387    /// # tokio_test::block_on(async {
10388    ///
10389    /// let builder = prepare_request_builder();
10390    /// let response = builder.send().await?;
10391    /// # gax::Result::<()>::Ok(()) });
10392    ///
10393    /// fn prepare_request_builder() -> DeleteOperation {
10394    ///   # panic!();
10395    ///   // ... details omitted ...
10396    /// }
10397    /// ```
10398    #[derive(Clone, Debug)]
10399    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
10400
10401    impl DeleteOperation {
10402        pub(crate) fn new(
10403            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
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<longrunning::model::DeleteOperationRequest>>(
10410            mut self,
10411            v: V,
10412        ) -> Self {
10413            self.0.request = v.into();
10414            self
10415        }
10416
10417        /// Sets all the options, replacing any prior values.
10418        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10419            self.0.options = v.into();
10420            self
10421        }
10422
10423        /// Sends the request.
10424        pub async fn send(self) -> Result<()> {
10425            (*self.0.stub)
10426                .delete_operation(self.0.request, self.0.options)
10427                .await
10428                .map(gax::response::Response::into_body)
10429        }
10430
10431        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
10432        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10433            self.0.request.name = v.into();
10434            self
10435        }
10436    }
10437
10438    #[doc(hidden)]
10439    impl gax::options::internal::RequestBuilder for DeleteOperation {
10440        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10441            &mut self.0.options
10442        }
10443    }
10444
10445    /// The request builder for [DataScanService::cancel_operation][crate::client::DataScanService::cancel_operation] calls.
10446    ///
10447    /// # Example
10448    /// ```no_run
10449    /// # use google_cloud_dataplex_v1::builder;
10450    /// use builder::data_scan_service::CancelOperation;
10451    /// # tokio_test::block_on(async {
10452    ///
10453    /// let builder = prepare_request_builder();
10454    /// let response = builder.send().await?;
10455    /// # gax::Result::<()>::Ok(()) });
10456    ///
10457    /// fn prepare_request_builder() -> CancelOperation {
10458    ///   # panic!();
10459    ///   // ... details omitted ...
10460    /// }
10461    /// ```
10462    #[derive(Clone, Debug)]
10463    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
10464
10465    impl CancelOperation {
10466        pub(crate) fn new(
10467            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
10468        ) -> Self {
10469            Self(RequestBuilder::new(stub))
10470        }
10471
10472        /// Sets the full request, replacing any prior values.
10473        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
10474            mut self,
10475            v: V,
10476        ) -> Self {
10477            self.0.request = v.into();
10478            self
10479        }
10480
10481        /// Sets all the options, replacing any prior values.
10482        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10483            self.0.options = v.into();
10484            self
10485        }
10486
10487        /// Sends the request.
10488        pub async fn send(self) -> Result<()> {
10489            (*self.0.stub)
10490                .cancel_operation(self.0.request, self.0.options)
10491                .await
10492                .map(gax::response::Response::into_body)
10493        }
10494
10495        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
10496        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10497            self.0.request.name = v.into();
10498            self
10499        }
10500    }
10501
10502    #[doc(hidden)]
10503    impl gax::options::internal::RequestBuilder for CancelOperation {
10504        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10505            &mut self.0.options
10506        }
10507    }
10508}
10509
10510pub mod metadata_service {
10511    use crate::Result;
10512
10513    /// A builder for [MetadataService][crate::client::MetadataService].
10514    ///
10515    /// ```
10516    /// # tokio_test::block_on(async {
10517    /// # use google_cloud_dataplex_v1::*;
10518    /// # use builder::metadata_service::ClientBuilder;
10519    /// # use client::MetadataService;
10520    /// let builder : ClientBuilder = MetadataService::builder();
10521    /// let client = builder
10522    ///     .with_endpoint("https://dataplex.googleapis.com")
10523    ///     .build().await?;
10524    /// # gax::client_builder::Result::<()>::Ok(()) });
10525    /// ```
10526    pub type ClientBuilder =
10527        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
10528
10529    pub(crate) mod client {
10530        use super::super::super::client::MetadataService;
10531        pub struct Factory;
10532        impl gax::client_builder::internal::ClientFactory for Factory {
10533            type Client = MetadataService;
10534            type Credentials = gaxi::options::Credentials;
10535            async fn build(
10536                self,
10537                config: gaxi::options::ClientConfig,
10538            ) -> gax::client_builder::Result<Self::Client> {
10539                Self::Client::new(config).await
10540            }
10541        }
10542    }
10543
10544    /// Common implementation for [crate::client::MetadataService] request builders.
10545    #[derive(Clone, Debug)]
10546    pub(crate) struct RequestBuilder<R: std::default::Default> {
10547        stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
10548        request: R,
10549        options: gax::options::RequestOptions,
10550    }
10551
10552    impl<R> RequestBuilder<R>
10553    where
10554        R: std::default::Default,
10555    {
10556        pub(crate) fn new(
10557            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
10558        ) -> Self {
10559            Self {
10560                stub,
10561                request: R::default(),
10562                options: gax::options::RequestOptions::default(),
10563            }
10564        }
10565    }
10566
10567    /// The request builder for [MetadataService::create_entity][crate::client::MetadataService::create_entity] calls.
10568    ///
10569    /// # Example
10570    /// ```no_run
10571    /// # use google_cloud_dataplex_v1::builder;
10572    /// use builder::metadata_service::CreateEntity;
10573    /// # tokio_test::block_on(async {
10574    ///
10575    /// let builder = prepare_request_builder();
10576    /// let response = builder.send().await?;
10577    /// # gax::Result::<()>::Ok(()) });
10578    ///
10579    /// fn prepare_request_builder() -> CreateEntity {
10580    ///   # panic!();
10581    ///   // ... details omitted ...
10582    /// }
10583    /// ```
10584    #[derive(Clone, Debug)]
10585    pub struct CreateEntity(RequestBuilder<crate::model::CreateEntityRequest>);
10586
10587    impl CreateEntity {
10588        pub(crate) fn new(
10589            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
10590        ) -> Self {
10591            Self(RequestBuilder::new(stub))
10592        }
10593
10594        /// Sets the full request, replacing any prior values.
10595        pub fn with_request<V: Into<crate::model::CreateEntityRequest>>(mut self, v: V) -> Self {
10596            self.0.request = v.into();
10597            self
10598        }
10599
10600        /// Sets all the options, replacing any prior values.
10601        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10602            self.0.options = v.into();
10603            self
10604        }
10605
10606        /// Sends the request.
10607        pub async fn send(self) -> Result<crate::model::Entity> {
10608            (*self.0.stub)
10609                .create_entity(self.0.request, self.0.options)
10610                .await
10611                .map(gax::response::Response::into_body)
10612        }
10613
10614        /// Sets the value of [parent][crate::model::CreateEntityRequest::parent].
10615        ///
10616        /// This is a **required** field for requests.
10617        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10618            self.0.request.parent = v.into();
10619            self
10620        }
10621
10622        /// Sets the value of [entity][crate::model::CreateEntityRequest::entity].
10623        ///
10624        /// This is a **required** field for requests.
10625        pub fn set_entity<T>(mut self, v: T) -> Self
10626        where
10627            T: std::convert::Into<crate::model::Entity>,
10628        {
10629            self.0.request.entity = std::option::Option::Some(v.into());
10630            self
10631        }
10632
10633        /// Sets or clears the value of [entity][crate::model::CreateEntityRequest::entity].
10634        ///
10635        /// This is a **required** field for requests.
10636        pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
10637        where
10638            T: std::convert::Into<crate::model::Entity>,
10639        {
10640            self.0.request.entity = v.map(|x| x.into());
10641            self
10642        }
10643
10644        /// Sets the value of [validate_only][crate::model::CreateEntityRequest::validate_only].
10645        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10646            self.0.request.validate_only = v.into();
10647            self
10648        }
10649    }
10650
10651    #[doc(hidden)]
10652    impl gax::options::internal::RequestBuilder for CreateEntity {
10653        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10654            &mut self.0.options
10655        }
10656    }
10657
10658    /// The request builder for [MetadataService::update_entity][crate::client::MetadataService::update_entity] calls.
10659    ///
10660    /// # Example
10661    /// ```no_run
10662    /// # use google_cloud_dataplex_v1::builder;
10663    /// use builder::metadata_service::UpdateEntity;
10664    /// # tokio_test::block_on(async {
10665    ///
10666    /// let builder = prepare_request_builder();
10667    /// let response = builder.send().await?;
10668    /// # gax::Result::<()>::Ok(()) });
10669    ///
10670    /// fn prepare_request_builder() -> UpdateEntity {
10671    ///   # panic!();
10672    ///   // ... details omitted ...
10673    /// }
10674    /// ```
10675    #[derive(Clone, Debug)]
10676    pub struct UpdateEntity(RequestBuilder<crate::model::UpdateEntityRequest>);
10677
10678    impl UpdateEntity {
10679        pub(crate) fn new(
10680            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
10681        ) -> Self {
10682            Self(RequestBuilder::new(stub))
10683        }
10684
10685        /// Sets the full request, replacing any prior values.
10686        pub fn with_request<V: Into<crate::model::UpdateEntityRequest>>(mut self, v: V) -> Self {
10687            self.0.request = v.into();
10688            self
10689        }
10690
10691        /// Sets all the options, replacing any prior values.
10692        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10693            self.0.options = v.into();
10694            self
10695        }
10696
10697        /// Sends the request.
10698        pub async fn send(self) -> Result<crate::model::Entity> {
10699            (*self.0.stub)
10700                .update_entity(self.0.request, self.0.options)
10701                .await
10702                .map(gax::response::Response::into_body)
10703        }
10704
10705        /// Sets the value of [entity][crate::model::UpdateEntityRequest::entity].
10706        ///
10707        /// This is a **required** field for requests.
10708        pub fn set_entity<T>(mut self, v: T) -> Self
10709        where
10710            T: std::convert::Into<crate::model::Entity>,
10711        {
10712            self.0.request.entity = std::option::Option::Some(v.into());
10713            self
10714        }
10715
10716        /// Sets or clears the value of [entity][crate::model::UpdateEntityRequest::entity].
10717        ///
10718        /// This is a **required** field for requests.
10719        pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
10720        where
10721            T: std::convert::Into<crate::model::Entity>,
10722        {
10723            self.0.request.entity = v.map(|x| x.into());
10724            self
10725        }
10726
10727        /// Sets the value of [validate_only][crate::model::UpdateEntityRequest::validate_only].
10728        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10729            self.0.request.validate_only = v.into();
10730            self
10731        }
10732    }
10733
10734    #[doc(hidden)]
10735    impl gax::options::internal::RequestBuilder for UpdateEntity {
10736        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10737            &mut self.0.options
10738        }
10739    }
10740
10741    /// The request builder for [MetadataService::delete_entity][crate::client::MetadataService::delete_entity] calls.
10742    ///
10743    /// # Example
10744    /// ```no_run
10745    /// # use google_cloud_dataplex_v1::builder;
10746    /// use builder::metadata_service::DeleteEntity;
10747    /// # tokio_test::block_on(async {
10748    ///
10749    /// let builder = prepare_request_builder();
10750    /// let response = builder.send().await?;
10751    /// # gax::Result::<()>::Ok(()) });
10752    ///
10753    /// fn prepare_request_builder() -> DeleteEntity {
10754    ///   # panic!();
10755    ///   // ... details omitted ...
10756    /// }
10757    /// ```
10758    #[derive(Clone, Debug)]
10759    pub struct DeleteEntity(RequestBuilder<crate::model::DeleteEntityRequest>);
10760
10761    impl DeleteEntity {
10762        pub(crate) fn new(
10763            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
10764        ) -> Self {
10765            Self(RequestBuilder::new(stub))
10766        }
10767
10768        /// Sets the full request, replacing any prior values.
10769        pub fn with_request<V: Into<crate::model::DeleteEntityRequest>>(mut self, v: V) -> Self {
10770            self.0.request = v.into();
10771            self
10772        }
10773
10774        /// Sets all the options, replacing any prior values.
10775        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10776            self.0.options = v.into();
10777            self
10778        }
10779
10780        /// Sends the request.
10781        pub async fn send(self) -> Result<()> {
10782            (*self.0.stub)
10783                .delete_entity(self.0.request, self.0.options)
10784                .await
10785                .map(gax::response::Response::into_body)
10786        }
10787
10788        /// Sets the value of [name][crate::model::DeleteEntityRequest::name].
10789        ///
10790        /// This is a **required** field for requests.
10791        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10792            self.0.request.name = v.into();
10793            self
10794        }
10795
10796        /// Sets the value of [etag][crate::model::DeleteEntityRequest::etag].
10797        ///
10798        /// This is a **required** field for requests.
10799        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
10800            self.0.request.etag = v.into();
10801            self
10802        }
10803    }
10804
10805    #[doc(hidden)]
10806    impl gax::options::internal::RequestBuilder for DeleteEntity {
10807        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10808            &mut self.0.options
10809        }
10810    }
10811
10812    /// The request builder for [MetadataService::get_entity][crate::client::MetadataService::get_entity] calls.
10813    ///
10814    /// # Example
10815    /// ```no_run
10816    /// # use google_cloud_dataplex_v1::builder;
10817    /// use builder::metadata_service::GetEntity;
10818    /// # tokio_test::block_on(async {
10819    ///
10820    /// let builder = prepare_request_builder();
10821    /// let response = builder.send().await?;
10822    /// # gax::Result::<()>::Ok(()) });
10823    ///
10824    /// fn prepare_request_builder() -> GetEntity {
10825    ///   # panic!();
10826    ///   // ... details omitted ...
10827    /// }
10828    /// ```
10829    #[derive(Clone, Debug)]
10830    pub struct GetEntity(RequestBuilder<crate::model::GetEntityRequest>);
10831
10832    impl GetEntity {
10833        pub(crate) fn new(
10834            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
10835        ) -> Self {
10836            Self(RequestBuilder::new(stub))
10837        }
10838
10839        /// Sets the full request, replacing any prior values.
10840        pub fn with_request<V: Into<crate::model::GetEntityRequest>>(mut self, v: V) -> Self {
10841            self.0.request = v.into();
10842            self
10843        }
10844
10845        /// Sets all the options, replacing any prior values.
10846        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10847            self.0.options = v.into();
10848            self
10849        }
10850
10851        /// Sends the request.
10852        pub async fn send(self) -> Result<crate::model::Entity> {
10853            (*self.0.stub)
10854                .get_entity(self.0.request, self.0.options)
10855                .await
10856                .map(gax::response::Response::into_body)
10857        }
10858
10859        /// Sets the value of [name][crate::model::GetEntityRequest::name].
10860        ///
10861        /// This is a **required** field for requests.
10862        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10863            self.0.request.name = v.into();
10864            self
10865        }
10866
10867        /// Sets the value of [view][crate::model::GetEntityRequest::view].
10868        pub fn set_view<T: Into<crate::model::get_entity_request::EntityView>>(
10869            mut self,
10870            v: T,
10871        ) -> Self {
10872            self.0.request.view = v.into();
10873            self
10874        }
10875    }
10876
10877    #[doc(hidden)]
10878    impl gax::options::internal::RequestBuilder for GetEntity {
10879        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10880            &mut self.0.options
10881        }
10882    }
10883
10884    /// The request builder for [MetadataService::list_entities][crate::client::MetadataService::list_entities] calls.
10885    ///
10886    /// # Example
10887    /// ```no_run
10888    /// # use google_cloud_dataplex_v1::builder;
10889    /// use builder::metadata_service::ListEntities;
10890    /// # tokio_test::block_on(async {
10891    /// use gax::paginator::ItemPaginator;
10892    ///
10893    /// let builder = prepare_request_builder();
10894    /// let mut items = builder.by_item();
10895    /// while let Some(result) = items.next().await {
10896    ///   let item = result?;
10897    /// }
10898    /// # gax::Result::<()>::Ok(()) });
10899    ///
10900    /// fn prepare_request_builder() -> ListEntities {
10901    ///   # panic!();
10902    ///   // ... details omitted ...
10903    /// }
10904    /// ```
10905    #[derive(Clone, Debug)]
10906    pub struct ListEntities(RequestBuilder<crate::model::ListEntitiesRequest>);
10907
10908    impl ListEntities {
10909        pub(crate) fn new(
10910            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
10911        ) -> Self {
10912            Self(RequestBuilder::new(stub))
10913        }
10914
10915        /// Sets the full request, replacing any prior values.
10916        pub fn with_request<V: Into<crate::model::ListEntitiesRequest>>(mut self, v: V) -> Self {
10917            self.0.request = v.into();
10918            self
10919        }
10920
10921        /// Sets all the options, replacing any prior values.
10922        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10923            self.0.options = v.into();
10924            self
10925        }
10926
10927        /// Sends the request.
10928        pub async fn send(self) -> Result<crate::model::ListEntitiesResponse> {
10929            (*self.0.stub)
10930                .list_entities(self.0.request, self.0.options)
10931                .await
10932                .map(gax::response::Response::into_body)
10933        }
10934
10935        /// Streams each page in the collection.
10936        pub fn by_page(
10937            self,
10938        ) -> impl gax::paginator::Paginator<crate::model::ListEntitiesResponse, gax::error::Error>
10939        {
10940            use std::clone::Clone;
10941            let token = self.0.request.page_token.clone();
10942            let execute = move |token: String| {
10943                let mut builder = self.clone();
10944                builder.0.request = builder.0.request.set_page_token(token);
10945                builder.send()
10946            };
10947            gax::paginator::internal::new_paginator(token, execute)
10948        }
10949
10950        /// Streams each item in the collection.
10951        pub fn by_item(
10952            self,
10953        ) -> impl gax::paginator::ItemPaginator<crate::model::ListEntitiesResponse, gax::error::Error>
10954        {
10955            use gax::paginator::Paginator;
10956            self.by_page().items()
10957        }
10958
10959        /// Sets the value of [parent][crate::model::ListEntitiesRequest::parent].
10960        ///
10961        /// This is a **required** field for requests.
10962        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10963            self.0.request.parent = v.into();
10964            self
10965        }
10966
10967        /// Sets the value of [view][crate::model::ListEntitiesRequest::view].
10968        ///
10969        /// This is a **required** field for requests.
10970        pub fn set_view<T: Into<crate::model::list_entities_request::EntityView>>(
10971            mut self,
10972            v: T,
10973        ) -> Self {
10974            self.0.request.view = v.into();
10975            self
10976        }
10977
10978        /// Sets the value of [page_size][crate::model::ListEntitiesRequest::page_size].
10979        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10980            self.0.request.page_size = v.into();
10981            self
10982        }
10983
10984        /// Sets the value of [page_token][crate::model::ListEntitiesRequest::page_token].
10985        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10986            self.0.request.page_token = v.into();
10987            self
10988        }
10989
10990        /// Sets the value of [filter][crate::model::ListEntitiesRequest::filter].
10991        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10992            self.0.request.filter = v.into();
10993            self
10994        }
10995    }
10996
10997    #[doc(hidden)]
10998    impl gax::options::internal::RequestBuilder for ListEntities {
10999        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11000            &mut self.0.options
11001        }
11002    }
11003
11004    /// The request builder for [MetadataService::create_partition][crate::client::MetadataService::create_partition] calls.
11005    ///
11006    /// # Example
11007    /// ```no_run
11008    /// # use google_cloud_dataplex_v1::builder;
11009    /// use builder::metadata_service::CreatePartition;
11010    /// # tokio_test::block_on(async {
11011    ///
11012    /// let builder = prepare_request_builder();
11013    /// let response = builder.send().await?;
11014    /// # gax::Result::<()>::Ok(()) });
11015    ///
11016    /// fn prepare_request_builder() -> CreatePartition {
11017    ///   # panic!();
11018    ///   // ... details omitted ...
11019    /// }
11020    /// ```
11021    #[derive(Clone, Debug)]
11022    pub struct CreatePartition(RequestBuilder<crate::model::CreatePartitionRequest>);
11023
11024    impl CreatePartition {
11025        pub(crate) fn new(
11026            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
11027        ) -> Self {
11028            Self(RequestBuilder::new(stub))
11029        }
11030
11031        /// Sets the full request, replacing any prior values.
11032        pub fn with_request<V: Into<crate::model::CreatePartitionRequest>>(mut self, v: V) -> Self {
11033            self.0.request = v.into();
11034            self
11035        }
11036
11037        /// Sets all the options, replacing any prior values.
11038        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11039            self.0.options = v.into();
11040            self
11041        }
11042
11043        /// Sends the request.
11044        pub async fn send(self) -> Result<crate::model::Partition> {
11045            (*self.0.stub)
11046                .create_partition(self.0.request, self.0.options)
11047                .await
11048                .map(gax::response::Response::into_body)
11049        }
11050
11051        /// Sets the value of [parent][crate::model::CreatePartitionRequest::parent].
11052        ///
11053        /// This is a **required** field for requests.
11054        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
11055            self.0.request.parent = v.into();
11056            self
11057        }
11058
11059        /// Sets the value of [partition][crate::model::CreatePartitionRequest::partition].
11060        ///
11061        /// This is a **required** field for requests.
11062        pub fn set_partition<T>(mut self, v: T) -> Self
11063        where
11064            T: std::convert::Into<crate::model::Partition>,
11065        {
11066            self.0.request.partition = std::option::Option::Some(v.into());
11067            self
11068        }
11069
11070        /// Sets or clears the value of [partition][crate::model::CreatePartitionRequest::partition].
11071        ///
11072        /// This is a **required** field for requests.
11073        pub fn set_or_clear_partition<T>(mut self, v: std::option::Option<T>) -> Self
11074        where
11075            T: std::convert::Into<crate::model::Partition>,
11076        {
11077            self.0.request.partition = v.map(|x| x.into());
11078            self
11079        }
11080
11081        /// Sets the value of [validate_only][crate::model::CreatePartitionRequest::validate_only].
11082        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
11083            self.0.request.validate_only = v.into();
11084            self
11085        }
11086    }
11087
11088    #[doc(hidden)]
11089    impl gax::options::internal::RequestBuilder for CreatePartition {
11090        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11091            &mut self.0.options
11092        }
11093    }
11094
11095    /// The request builder for [MetadataService::delete_partition][crate::client::MetadataService::delete_partition] calls.
11096    ///
11097    /// # Example
11098    /// ```no_run
11099    /// # use google_cloud_dataplex_v1::builder;
11100    /// use builder::metadata_service::DeletePartition;
11101    /// # tokio_test::block_on(async {
11102    ///
11103    /// let builder = prepare_request_builder();
11104    /// let response = builder.send().await?;
11105    /// # gax::Result::<()>::Ok(()) });
11106    ///
11107    /// fn prepare_request_builder() -> DeletePartition {
11108    ///   # panic!();
11109    ///   // ... details omitted ...
11110    /// }
11111    /// ```
11112    #[derive(Clone, Debug)]
11113    pub struct DeletePartition(RequestBuilder<crate::model::DeletePartitionRequest>);
11114
11115    impl DeletePartition {
11116        pub(crate) fn new(
11117            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
11118        ) -> Self {
11119            Self(RequestBuilder::new(stub))
11120        }
11121
11122        /// Sets the full request, replacing any prior values.
11123        pub fn with_request<V: Into<crate::model::DeletePartitionRequest>>(mut self, v: V) -> Self {
11124            self.0.request = v.into();
11125            self
11126        }
11127
11128        /// Sets all the options, replacing any prior values.
11129        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11130            self.0.options = v.into();
11131            self
11132        }
11133
11134        /// Sends the request.
11135        pub async fn send(self) -> Result<()> {
11136            (*self.0.stub)
11137                .delete_partition(self.0.request, self.0.options)
11138                .await
11139                .map(gax::response::Response::into_body)
11140        }
11141
11142        /// Sets the value of [name][crate::model::DeletePartitionRequest::name].
11143        ///
11144        /// This is a **required** field for requests.
11145        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11146            self.0.request.name = v.into();
11147            self
11148        }
11149
11150        /// Sets the value of [etag][crate::model::DeletePartitionRequest::etag].
11151        #[deprecated]
11152        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
11153            self.0.request.etag = v.into();
11154            self
11155        }
11156    }
11157
11158    #[doc(hidden)]
11159    impl gax::options::internal::RequestBuilder for DeletePartition {
11160        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11161            &mut self.0.options
11162        }
11163    }
11164
11165    /// The request builder for [MetadataService::get_partition][crate::client::MetadataService::get_partition] calls.
11166    ///
11167    /// # Example
11168    /// ```no_run
11169    /// # use google_cloud_dataplex_v1::builder;
11170    /// use builder::metadata_service::GetPartition;
11171    /// # tokio_test::block_on(async {
11172    ///
11173    /// let builder = prepare_request_builder();
11174    /// let response = builder.send().await?;
11175    /// # gax::Result::<()>::Ok(()) });
11176    ///
11177    /// fn prepare_request_builder() -> GetPartition {
11178    ///   # panic!();
11179    ///   // ... details omitted ...
11180    /// }
11181    /// ```
11182    #[derive(Clone, Debug)]
11183    pub struct GetPartition(RequestBuilder<crate::model::GetPartitionRequest>);
11184
11185    impl GetPartition {
11186        pub(crate) fn new(
11187            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
11188        ) -> Self {
11189            Self(RequestBuilder::new(stub))
11190        }
11191
11192        /// Sets the full request, replacing any prior values.
11193        pub fn with_request<V: Into<crate::model::GetPartitionRequest>>(mut self, v: V) -> Self {
11194            self.0.request = v.into();
11195            self
11196        }
11197
11198        /// Sets all the options, replacing any prior values.
11199        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11200            self.0.options = v.into();
11201            self
11202        }
11203
11204        /// Sends the request.
11205        pub async fn send(self) -> Result<crate::model::Partition> {
11206            (*self.0.stub)
11207                .get_partition(self.0.request, self.0.options)
11208                .await
11209                .map(gax::response::Response::into_body)
11210        }
11211
11212        /// Sets the value of [name][crate::model::GetPartitionRequest::name].
11213        ///
11214        /// This is a **required** field for requests.
11215        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11216            self.0.request.name = v.into();
11217            self
11218        }
11219    }
11220
11221    #[doc(hidden)]
11222    impl gax::options::internal::RequestBuilder for GetPartition {
11223        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11224            &mut self.0.options
11225        }
11226    }
11227
11228    /// The request builder for [MetadataService::list_partitions][crate::client::MetadataService::list_partitions] calls.
11229    ///
11230    /// # Example
11231    /// ```no_run
11232    /// # use google_cloud_dataplex_v1::builder;
11233    /// use builder::metadata_service::ListPartitions;
11234    /// # tokio_test::block_on(async {
11235    /// use gax::paginator::ItemPaginator;
11236    ///
11237    /// let builder = prepare_request_builder();
11238    /// let mut items = builder.by_item();
11239    /// while let Some(result) = items.next().await {
11240    ///   let item = result?;
11241    /// }
11242    /// # gax::Result::<()>::Ok(()) });
11243    ///
11244    /// fn prepare_request_builder() -> ListPartitions {
11245    ///   # panic!();
11246    ///   // ... details omitted ...
11247    /// }
11248    /// ```
11249    #[derive(Clone, Debug)]
11250    pub struct ListPartitions(RequestBuilder<crate::model::ListPartitionsRequest>);
11251
11252    impl ListPartitions {
11253        pub(crate) fn new(
11254            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
11255        ) -> Self {
11256            Self(RequestBuilder::new(stub))
11257        }
11258
11259        /// Sets the full request, replacing any prior values.
11260        pub fn with_request<V: Into<crate::model::ListPartitionsRequest>>(mut self, v: V) -> Self {
11261            self.0.request = v.into();
11262            self
11263        }
11264
11265        /// Sets all the options, replacing any prior values.
11266        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11267            self.0.options = v.into();
11268            self
11269        }
11270
11271        /// Sends the request.
11272        pub async fn send(self) -> Result<crate::model::ListPartitionsResponse> {
11273            (*self.0.stub)
11274                .list_partitions(self.0.request, self.0.options)
11275                .await
11276                .map(gax::response::Response::into_body)
11277        }
11278
11279        /// Streams each page in the collection.
11280        pub fn by_page(
11281            self,
11282        ) -> impl gax::paginator::Paginator<crate::model::ListPartitionsResponse, gax::error::Error>
11283        {
11284            use std::clone::Clone;
11285            let token = self.0.request.page_token.clone();
11286            let execute = move |token: String| {
11287                let mut builder = self.clone();
11288                builder.0.request = builder.0.request.set_page_token(token);
11289                builder.send()
11290            };
11291            gax::paginator::internal::new_paginator(token, execute)
11292        }
11293
11294        /// Streams each item in the collection.
11295        pub fn by_item(
11296            self,
11297        ) -> impl gax::paginator::ItemPaginator<crate::model::ListPartitionsResponse, gax::error::Error>
11298        {
11299            use gax::paginator::Paginator;
11300            self.by_page().items()
11301        }
11302
11303        /// Sets the value of [parent][crate::model::ListPartitionsRequest::parent].
11304        ///
11305        /// This is a **required** field for requests.
11306        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
11307            self.0.request.parent = v.into();
11308            self
11309        }
11310
11311        /// Sets the value of [page_size][crate::model::ListPartitionsRequest::page_size].
11312        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
11313            self.0.request.page_size = v.into();
11314            self
11315        }
11316
11317        /// Sets the value of [page_token][crate::model::ListPartitionsRequest::page_token].
11318        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
11319            self.0.request.page_token = v.into();
11320            self
11321        }
11322
11323        /// Sets the value of [filter][crate::model::ListPartitionsRequest::filter].
11324        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
11325            self.0.request.filter = v.into();
11326            self
11327        }
11328    }
11329
11330    #[doc(hidden)]
11331    impl gax::options::internal::RequestBuilder for ListPartitions {
11332        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11333            &mut self.0.options
11334        }
11335    }
11336
11337    /// The request builder for [MetadataService::list_locations][crate::client::MetadataService::list_locations] calls.
11338    ///
11339    /// # Example
11340    /// ```no_run
11341    /// # use google_cloud_dataplex_v1::builder;
11342    /// use builder::metadata_service::ListLocations;
11343    /// # tokio_test::block_on(async {
11344    /// use gax::paginator::ItemPaginator;
11345    ///
11346    /// let builder = prepare_request_builder();
11347    /// let mut items = builder.by_item();
11348    /// while let Some(result) = items.next().await {
11349    ///   let item = result?;
11350    /// }
11351    /// # gax::Result::<()>::Ok(()) });
11352    ///
11353    /// fn prepare_request_builder() -> ListLocations {
11354    ///   # panic!();
11355    ///   // ... details omitted ...
11356    /// }
11357    /// ```
11358    #[derive(Clone, Debug)]
11359    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
11360
11361    impl ListLocations {
11362        pub(crate) fn new(
11363            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
11364        ) -> Self {
11365            Self(RequestBuilder::new(stub))
11366        }
11367
11368        /// Sets the full request, replacing any prior values.
11369        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
11370            mut self,
11371            v: V,
11372        ) -> Self {
11373            self.0.request = v.into();
11374            self
11375        }
11376
11377        /// Sets all the options, replacing any prior values.
11378        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11379            self.0.options = v.into();
11380            self
11381        }
11382
11383        /// Sends the request.
11384        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
11385            (*self.0.stub)
11386                .list_locations(self.0.request, self.0.options)
11387                .await
11388                .map(gax::response::Response::into_body)
11389        }
11390
11391        /// Streams each page in the collection.
11392        pub fn by_page(
11393            self,
11394        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
11395        {
11396            use std::clone::Clone;
11397            let token = self.0.request.page_token.clone();
11398            let execute = move |token: String| {
11399                let mut builder = self.clone();
11400                builder.0.request = builder.0.request.set_page_token(token);
11401                builder.send()
11402            };
11403            gax::paginator::internal::new_paginator(token, execute)
11404        }
11405
11406        /// Streams each item in the collection.
11407        pub fn by_item(
11408            self,
11409        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
11410        {
11411            use gax::paginator::Paginator;
11412            self.by_page().items()
11413        }
11414
11415        /// Sets the value of [name][location::model::ListLocationsRequest::name].
11416        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11417            self.0.request.name = v.into();
11418            self
11419        }
11420
11421        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
11422        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
11423            self.0.request.filter = v.into();
11424            self
11425        }
11426
11427        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
11428        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
11429            self.0.request.page_size = v.into();
11430            self
11431        }
11432
11433        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
11434        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
11435            self.0.request.page_token = v.into();
11436            self
11437        }
11438    }
11439
11440    #[doc(hidden)]
11441    impl gax::options::internal::RequestBuilder for ListLocations {
11442        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11443            &mut self.0.options
11444        }
11445    }
11446
11447    /// The request builder for [MetadataService::get_location][crate::client::MetadataService::get_location] calls.
11448    ///
11449    /// # Example
11450    /// ```no_run
11451    /// # use google_cloud_dataplex_v1::builder;
11452    /// use builder::metadata_service::GetLocation;
11453    /// # tokio_test::block_on(async {
11454    ///
11455    /// let builder = prepare_request_builder();
11456    /// let response = builder.send().await?;
11457    /// # gax::Result::<()>::Ok(()) });
11458    ///
11459    /// fn prepare_request_builder() -> GetLocation {
11460    ///   # panic!();
11461    ///   // ... details omitted ...
11462    /// }
11463    /// ```
11464    #[derive(Clone, Debug)]
11465    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
11466
11467    impl GetLocation {
11468        pub(crate) fn new(
11469            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
11470        ) -> Self {
11471            Self(RequestBuilder::new(stub))
11472        }
11473
11474        /// Sets the full request, replacing any prior values.
11475        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
11476            self.0.request = v.into();
11477            self
11478        }
11479
11480        /// Sets all the options, replacing any prior values.
11481        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11482            self.0.options = v.into();
11483            self
11484        }
11485
11486        /// Sends the request.
11487        pub async fn send(self) -> Result<location::model::Location> {
11488            (*self.0.stub)
11489                .get_location(self.0.request, self.0.options)
11490                .await
11491                .map(gax::response::Response::into_body)
11492        }
11493
11494        /// Sets the value of [name][location::model::GetLocationRequest::name].
11495        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11496            self.0.request.name = v.into();
11497            self
11498        }
11499    }
11500
11501    #[doc(hidden)]
11502    impl gax::options::internal::RequestBuilder for GetLocation {
11503        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11504            &mut self.0.options
11505        }
11506    }
11507
11508    /// The request builder for [MetadataService::set_iam_policy][crate::client::MetadataService::set_iam_policy] calls.
11509    ///
11510    /// # Example
11511    /// ```no_run
11512    /// # use google_cloud_dataplex_v1::builder;
11513    /// use builder::metadata_service::SetIamPolicy;
11514    /// # tokio_test::block_on(async {
11515    ///
11516    /// let builder = prepare_request_builder();
11517    /// let response = builder.send().await?;
11518    /// # gax::Result::<()>::Ok(()) });
11519    ///
11520    /// fn prepare_request_builder() -> SetIamPolicy {
11521    ///   # panic!();
11522    ///   // ... details omitted ...
11523    /// }
11524    /// ```
11525    #[derive(Clone, Debug)]
11526    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
11527
11528    impl SetIamPolicy {
11529        pub(crate) fn new(
11530            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
11531        ) -> Self {
11532            Self(RequestBuilder::new(stub))
11533        }
11534
11535        /// Sets the full request, replacing any prior values.
11536        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
11537            self.0.request = v.into();
11538            self
11539        }
11540
11541        /// Sets all the options, replacing any prior values.
11542        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11543            self.0.options = v.into();
11544            self
11545        }
11546
11547        /// Sends the request.
11548        pub async fn send(self) -> Result<iam_v1::model::Policy> {
11549            (*self.0.stub)
11550                .set_iam_policy(self.0.request, self.0.options)
11551                .await
11552                .map(gax::response::Response::into_body)
11553        }
11554
11555        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
11556        ///
11557        /// This is a **required** field for requests.
11558        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
11559            self.0.request.resource = v.into();
11560            self
11561        }
11562
11563        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
11564        ///
11565        /// This is a **required** field for requests.
11566        pub fn set_policy<T>(mut self, v: T) -> Self
11567        where
11568            T: std::convert::Into<iam_v1::model::Policy>,
11569        {
11570            self.0.request.policy = std::option::Option::Some(v.into());
11571            self
11572        }
11573
11574        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
11575        ///
11576        /// This is a **required** field for requests.
11577        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
11578        where
11579            T: std::convert::Into<iam_v1::model::Policy>,
11580        {
11581            self.0.request.policy = v.map(|x| x.into());
11582            self
11583        }
11584
11585        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
11586        pub fn set_update_mask<T>(mut self, v: T) -> Self
11587        where
11588            T: std::convert::Into<wkt::FieldMask>,
11589        {
11590            self.0.request.update_mask = std::option::Option::Some(v.into());
11591            self
11592        }
11593
11594        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
11595        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
11596        where
11597            T: std::convert::Into<wkt::FieldMask>,
11598        {
11599            self.0.request.update_mask = v.map(|x| x.into());
11600            self
11601        }
11602    }
11603
11604    #[doc(hidden)]
11605    impl gax::options::internal::RequestBuilder for SetIamPolicy {
11606        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11607            &mut self.0.options
11608        }
11609    }
11610
11611    /// The request builder for [MetadataService::get_iam_policy][crate::client::MetadataService::get_iam_policy] calls.
11612    ///
11613    /// # Example
11614    /// ```no_run
11615    /// # use google_cloud_dataplex_v1::builder;
11616    /// use builder::metadata_service::GetIamPolicy;
11617    /// # tokio_test::block_on(async {
11618    ///
11619    /// let builder = prepare_request_builder();
11620    /// let response = builder.send().await?;
11621    /// # gax::Result::<()>::Ok(()) });
11622    ///
11623    /// fn prepare_request_builder() -> GetIamPolicy {
11624    ///   # panic!();
11625    ///   // ... details omitted ...
11626    /// }
11627    /// ```
11628    #[derive(Clone, Debug)]
11629    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
11630
11631    impl GetIamPolicy {
11632        pub(crate) fn new(
11633            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
11634        ) -> Self {
11635            Self(RequestBuilder::new(stub))
11636        }
11637
11638        /// Sets the full request, replacing any prior values.
11639        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
11640            self.0.request = v.into();
11641            self
11642        }
11643
11644        /// Sets all the options, replacing any prior values.
11645        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11646            self.0.options = v.into();
11647            self
11648        }
11649
11650        /// Sends the request.
11651        pub async fn send(self) -> Result<iam_v1::model::Policy> {
11652            (*self.0.stub)
11653                .get_iam_policy(self.0.request, self.0.options)
11654                .await
11655                .map(gax::response::Response::into_body)
11656        }
11657
11658        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
11659        ///
11660        /// This is a **required** field for requests.
11661        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
11662            self.0.request.resource = v.into();
11663            self
11664        }
11665
11666        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
11667        pub fn set_options<T>(mut self, v: T) -> Self
11668        where
11669            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
11670        {
11671            self.0.request.options = std::option::Option::Some(v.into());
11672            self
11673        }
11674
11675        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
11676        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
11677        where
11678            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
11679        {
11680            self.0.request.options = v.map(|x| x.into());
11681            self
11682        }
11683    }
11684
11685    #[doc(hidden)]
11686    impl gax::options::internal::RequestBuilder for GetIamPolicy {
11687        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11688            &mut self.0.options
11689        }
11690    }
11691
11692    /// The request builder for [MetadataService::test_iam_permissions][crate::client::MetadataService::test_iam_permissions] calls.
11693    ///
11694    /// # Example
11695    /// ```no_run
11696    /// # use google_cloud_dataplex_v1::builder;
11697    /// use builder::metadata_service::TestIamPermissions;
11698    /// # tokio_test::block_on(async {
11699    ///
11700    /// let builder = prepare_request_builder();
11701    /// let response = builder.send().await?;
11702    /// # gax::Result::<()>::Ok(()) });
11703    ///
11704    /// fn prepare_request_builder() -> TestIamPermissions {
11705    ///   # panic!();
11706    ///   // ... details omitted ...
11707    /// }
11708    /// ```
11709    #[derive(Clone, Debug)]
11710    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
11711
11712    impl TestIamPermissions {
11713        pub(crate) fn new(
11714            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
11715        ) -> Self {
11716            Self(RequestBuilder::new(stub))
11717        }
11718
11719        /// Sets the full request, replacing any prior values.
11720        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
11721            mut self,
11722            v: V,
11723        ) -> Self {
11724            self.0.request = v.into();
11725            self
11726        }
11727
11728        /// Sets all the options, replacing any prior values.
11729        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11730            self.0.options = v.into();
11731            self
11732        }
11733
11734        /// Sends the request.
11735        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
11736            (*self.0.stub)
11737                .test_iam_permissions(self.0.request, self.0.options)
11738                .await
11739                .map(gax::response::Response::into_body)
11740        }
11741
11742        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
11743        ///
11744        /// This is a **required** field for requests.
11745        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
11746            self.0.request.resource = v.into();
11747            self
11748        }
11749
11750        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
11751        ///
11752        /// This is a **required** field for requests.
11753        pub fn set_permissions<T, V>(mut self, v: T) -> Self
11754        where
11755            T: std::iter::IntoIterator<Item = V>,
11756            V: std::convert::Into<std::string::String>,
11757        {
11758            use std::iter::Iterator;
11759            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
11760            self
11761        }
11762    }
11763
11764    #[doc(hidden)]
11765    impl gax::options::internal::RequestBuilder for TestIamPermissions {
11766        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11767            &mut self.0.options
11768        }
11769    }
11770
11771    /// The request builder for [MetadataService::list_operations][crate::client::MetadataService::list_operations] calls.
11772    ///
11773    /// # Example
11774    /// ```no_run
11775    /// # use google_cloud_dataplex_v1::builder;
11776    /// use builder::metadata_service::ListOperations;
11777    /// # tokio_test::block_on(async {
11778    /// use gax::paginator::ItemPaginator;
11779    ///
11780    /// let builder = prepare_request_builder();
11781    /// let mut items = builder.by_item();
11782    /// while let Some(result) = items.next().await {
11783    ///   let item = result?;
11784    /// }
11785    /// # gax::Result::<()>::Ok(()) });
11786    ///
11787    /// fn prepare_request_builder() -> ListOperations {
11788    ///   # panic!();
11789    ///   // ... details omitted ...
11790    /// }
11791    /// ```
11792    #[derive(Clone, Debug)]
11793    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
11794
11795    impl ListOperations {
11796        pub(crate) fn new(
11797            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
11798        ) -> Self {
11799            Self(RequestBuilder::new(stub))
11800        }
11801
11802        /// Sets the full request, replacing any prior values.
11803        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
11804            mut self,
11805            v: V,
11806        ) -> Self {
11807            self.0.request = v.into();
11808            self
11809        }
11810
11811        /// Sets all the options, replacing any prior values.
11812        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11813            self.0.options = v.into();
11814            self
11815        }
11816
11817        /// Sends the request.
11818        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
11819            (*self.0.stub)
11820                .list_operations(self.0.request, self.0.options)
11821                .await
11822                .map(gax::response::Response::into_body)
11823        }
11824
11825        /// Streams each page in the collection.
11826        pub fn by_page(
11827            self,
11828        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
11829        {
11830            use std::clone::Clone;
11831            let token = self.0.request.page_token.clone();
11832            let execute = move |token: String| {
11833                let mut builder = self.clone();
11834                builder.0.request = builder.0.request.set_page_token(token);
11835                builder.send()
11836            };
11837            gax::paginator::internal::new_paginator(token, execute)
11838        }
11839
11840        /// Streams each item in the collection.
11841        pub fn by_item(
11842            self,
11843        ) -> impl gax::paginator::ItemPaginator<
11844            longrunning::model::ListOperationsResponse,
11845            gax::error::Error,
11846        > {
11847            use gax::paginator::Paginator;
11848            self.by_page().items()
11849        }
11850
11851        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
11852        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11853            self.0.request.name = v.into();
11854            self
11855        }
11856
11857        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
11858        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
11859            self.0.request.filter = v.into();
11860            self
11861        }
11862
11863        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
11864        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
11865            self.0.request.page_size = v.into();
11866            self
11867        }
11868
11869        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
11870        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
11871            self.0.request.page_token = v.into();
11872            self
11873        }
11874    }
11875
11876    #[doc(hidden)]
11877    impl gax::options::internal::RequestBuilder for ListOperations {
11878        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11879            &mut self.0.options
11880        }
11881    }
11882
11883    /// The request builder for [MetadataService::get_operation][crate::client::MetadataService::get_operation] calls.
11884    ///
11885    /// # Example
11886    /// ```no_run
11887    /// # use google_cloud_dataplex_v1::builder;
11888    /// use builder::metadata_service::GetOperation;
11889    /// # tokio_test::block_on(async {
11890    ///
11891    /// let builder = prepare_request_builder();
11892    /// let response = builder.send().await?;
11893    /// # gax::Result::<()>::Ok(()) });
11894    ///
11895    /// fn prepare_request_builder() -> GetOperation {
11896    ///   # panic!();
11897    ///   // ... details omitted ...
11898    /// }
11899    /// ```
11900    #[derive(Clone, Debug)]
11901    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
11902
11903    impl GetOperation {
11904        pub(crate) fn new(
11905            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
11906        ) -> Self {
11907            Self(RequestBuilder::new(stub))
11908        }
11909
11910        /// Sets the full request, replacing any prior values.
11911        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
11912            mut self,
11913            v: V,
11914        ) -> Self {
11915            self.0.request = v.into();
11916            self
11917        }
11918
11919        /// Sets all the options, replacing any prior values.
11920        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11921            self.0.options = v.into();
11922            self
11923        }
11924
11925        /// Sends the request.
11926        pub async fn send(self) -> Result<longrunning::model::Operation> {
11927            (*self.0.stub)
11928                .get_operation(self.0.request, self.0.options)
11929                .await
11930                .map(gax::response::Response::into_body)
11931        }
11932
11933        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
11934        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11935            self.0.request.name = v.into();
11936            self
11937        }
11938    }
11939
11940    #[doc(hidden)]
11941    impl gax::options::internal::RequestBuilder for GetOperation {
11942        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11943            &mut self.0.options
11944        }
11945    }
11946
11947    /// The request builder for [MetadataService::delete_operation][crate::client::MetadataService::delete_operation] calls.
11948    ///
11949    /// # Example
11950    /// ```no_run
11951    /// # use google_cloud_dataplex_v1::builder;
11952    /// use builder::metadata_service::DeleteOperation;
11953    /// # tokio_test::block_on(async {
11954    ///
11955    /// let builder = prepare_request_builder();
11956    /// let response = builder.send().await?;
11957    /// # gax::Result::<()>::Ok(()) });
11958    ///
11959    /// fn prepare_request_builder() -> DeleteOperation {
11960    ///   # panic!();
11961    ///   // ... details omitted ...
11962    /// }
11963    /// ```
11964    #[derive(Clone, Debug)]
11965    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
11966
11967    impl DeleteOperation {
11968        pub(crate) fn new(
11969            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
11970        ) -> Self {
11971            Self(RequestBuilder::new(stub))
11972        }
11973
11974        /// Sets the full request, replacing any prior values.
11975        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
11976            mut self,
11977            v: V,
11978        ) -> Self {
11979            self.0.request = v.into();
11980            self
11981        }
11982
11983        /// Sets all the options, replacing any prior values.
11984        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11985            self.0.options = v.into();
11986            self
11987        }
11988
11989        /// Sends the request.
11990        pub async fn send(self) -> Result<()> {
11991            (*self.0.stub)
11992                .delete_operation(self.0.request, self.0.options)
11993                .await
11994                .map(gax::response::Response::into_body)
11995        }
11996
11997        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
11998        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11999            self.0.request.name = v.into();
12000            self
12001        }
12002    }
12003
12004    #[doc(hidden)]
12005    impl gax::options::internal::RequestBuilder for DeleteOperation {
12006        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12007            &mut self.0.options
12008        }
12009    }
12010
12011    /// The request builder for [MetadataService::cancel_operation][crate::client::MetadataService::cancel_operation] calls.
12012    ///
12013    /// # Example
12014    /// ```no_run
12015    /// # use google_cloud_dataplex_v1::builder;
12016    /// use builder::metadata_service::CancelOperation;
12017    /// # tokio_test::block_on(async {
12018    ///
12019    /// let builder = prepare_request_builder();
12020    /// let response = builder.send().await?;
12021    /// # gax::Result::<()>::Ok(()) });
12022    ///
12023    /// fn prepare_request_builder() -> CancelOperation {
12024    ///   # panic!();
12025    ///   // ... details omitted ...
12026    /// }
12027    /// ```
12028    #[derive(Clone, Debug)]
12029    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
12030
12031    impl CancelOperation {
12032        pub(crate) fn new(
12033            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
12034        ) -> Self {
12035            Self(RequestBuilder::new(stub))
12036        }
12037
12038        /// Sets the full request, replacing any prior values.
12039        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
12040            mut self,
12041            v: V,
12042        ) -> Self {
12043            self.0.request = v.into();
12044            self
12045        }
12046
12047        /// Sets all the options, replacing any prior values.
12048        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12049            self.0.options = v.into();
12050            self
12051        }
12052
12053        /// Sends the request.
12054        pub async fn send(self) -> Result<()> {
12055            (*self.0.stub)
12056                .cancel_operation(self.0.request, self.0.options)
12057                .await
12058                .map(gax::response::Response::into_body)
12059        }
12060
12061        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
12062        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12063            self.0.request.name = v.into();
12064            self
12065        }
12066    }
12067
12068    #[doc(hidden)]
12069    impl gax::options::internal::RequestBuilder for CancelOperation {
12070        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12071            &mut self.0.options
12072        }
12073    }
12074}
12075
12076pub mod dataplex_service {
12077    use crate::Result;
12078
12079    /// A builder for [DataplexService][crate::client::DataplexService].
12080    ///
12081    /// ```
12082    /// # tokio_test::block_on(async {
12083    /// # use google_cloud_dataplex_v1::*;
12084    /// # use builder::dataplex_service::ClientBuilder;
12085    /// # use client::DataplexService;
12086    /// let builder : ClientBuilder = DataplexService::builder();
12087    /// let client = builder
12088    ///     .with_endpoint("https://dataplex.googleapis.com")
12089    ///     .build().await?;
12090    /// # gax::client_builder::Result::<()>::Ok(()) });
12091    /// ```
12092    pub type ClientBuilder =
12093        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
12094
12095    pub(crate) mod client {
12096        use super::super::super::client::DataplexService;
12097        pub struct Factory;
12098        impl gax::client_builder::internal::ClientFactory for Factory {
12099            type Client = DataplexService;
12100            type Credentials = gaxi::options::Credentials;
12101            async fn build(
12102                self,
12103                config: gaxi::options::ClientConfig,
12104            ) -> gax::client_builder::Result<Self::Client> {
12105                Self::Client::new(config).await
12106            }
12107        }
12108    }
12109
12110    /// Common implementation for [crate::client::DataplexService] request builders.
12111    #[derive(Clone, Debug)]
12112    pub(crate) struct RequestBuilder<R: std::default::Default> {
12113        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
12114        request: R,
12115        options: gax::options::RequestOptions,
12116    }
12117
12118    impl<R> RequestBuilder<R>
12119    where
12120        R: std::default::Default,
12121    {
12122        pub(crate) fn new(
12123            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
12124        ) -> Self {
12125            Self {
12126                stub,
12127                request: R::default(),
12128                options: gax::options::RequestOptions::default(),
12129            }
12130        }
12131    }
12132
12133    /// The request builder for [DataplexService::create_lake][crate::client::DataplexService::create_lake] calls.
12134    ///
12135    /// # Example
12136    /// ```no_run
12137    /// # use google_cloud_dataplex_v1::builder;
12138    /// use builder::dataplex_service::CreateLake;
12139    /// # tokio_test::block_on(async {
12140    /// use lro::Poller;
12141    ///
12142    /// let builder = prepare_request_builder();
12143    /// let response = builder.poller().until_done().await?;
12144    /// # gax::Result::<()>::Ok(()) });
12145    ///
12146    /// fn prepare_request_builder() -> CreateLake {
12147    ///   # panic!();
12148    ///   // ... details omitted ...
12149    /// }
12150    /// ```
12151    #[derive(Clone, Debug)]
12152    pub struct CreateLake(RequestBuilder<crate::model::CreateLakeRequest>);
12153
12154    impl CreateLake {
12155        pub(crate) fn new(
12156            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
12157        ) -> Self {
12158            Self(RequestBuilder::new(stub))
12159        }
12160
12161        /// Sets the full request, replacing any prior values.
12162        pub fn with_request<V: Into<crate::model::CreateLakeRequest>>(mut self, v: V) -> Self {
12163            self.0.request = v.into();
12164            self
12165        }
12166
12167        /// Sets all the options, replacing any prior values.
12168        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12169            self.0.options = v.into();
12170            self
12171        }
12172
12173        /// Sends the request.
12174        ///
12175        /// # Long running operations
12176        ///
12177        /// This starts, but does not poll, a longrunning operation. More information
12178        /// on [create_lake][crate::client::DataplexService::create_lake].
12179        pub async fn send(self) -> Result<longrunning::model::Operation> {
12180            (*self.0.stub)
12181                .create_lake(self.0.request, self.0.options)
12182                .await
12183                .map(gax::response::Response::into_body)
12184        }
12185
12186        /// Creates a [Poller][lro::Poller] to work with `create_lake`.
12187        pub fn poller(
12188            self,
12189        ) -> impl lro::Poller<crate::model::Lake, crate::model::OperationMetadata> {
12190            type Operation =
12191                lro::internal::Operation<crate::model::Lake, crate::model::OperationMetadata>;
12192            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12193            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12194
12195            let stub = self.0.stub.clone();
12196            let mut options = self.0.options.clone();
12197            options.set_retry_policy(gax::retry_policy::NeverRetry);
12198            let query = move |name| {
12199                let stub = stub.clone();
12200                let options = options.clone();
12201                async {
12202                    let op = GetOperation::new(stub)
12203                        .set_name(name)
12204                        .with_options(options)
12205                        .send()
12206                        .await?;
12207                    Ok(Operation::new(op))
12208                }
12209            };
12210
12211            let start = move || async {
12212                let op = self.send().await?;
12213                Ok(Operation::new(op))
12214            };
12215
12216            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
12217        }
12218
12219        /// Sets the value of [parent][crate::model::CreateLakeRequest::parent].
12220        ///
12221        /// This is a **required** field for requests.
12222        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12223            self.0.request.parent = v.into();
12224            self
12225        }
12226
12227        /// Sets the value of [lake_id][crate::model::CreateLakeRequest::lake_id].
12228        ///
12229        /// This is a **required** field for requests.
12230        pub fn set_lake_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
12231            self.0.request.lake_id = v.into();
12232            self
12233        }
12234
12235        /// Sets the value of [lake][crate::model::CreateLakeRequest::lake].
12236        ///
12237        /// This is a **required** field for requests.
12238        pub fn set_lake<T>(mut self, v: T) -> Self
12239        where
12240            T: std::convert::Into<crate::model::Lake>,
12241        {
12242            self.0.request.lake = std::option::Option::Some(v.into());
12243            self
12244        }
12245
12246        /// Sets or clears the value of [lake][crate::model::CreateLakeRequest::lake].
12247        ///
12248        /// This is a **required** field for requests.
12249        pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
12250        where
12251            T: std::convert::Into<crate::model::Lake>,
12252        {
12253            self.0.request.lake = v.map(|x| x.into());
12254            self
12255        }
12256
12257        /// Sets the value of [validate_only][crate::model::CreateLakeRequest::validate_only].
12258        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12259            self.0.request.validate_only = v.into();
12260            self
12261        }
12262    }
12263
12264    #[doc(hidden)]
12265    impl gax::options::internal::RequestBuilder for CreateLake {
12266        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12267            &mut self.0.options
12268        }
12269    }
12270
12271    /// The request builder for [DataplexService::update_lake][crate::client::DataplexService::update_lake] calls.
12272    ///
12273    /// # Example
12274    /// ```no_run
12275    /// # use google_cloud_dataplex_v1::builder;
12276    /// use builder::dataplex_service::UpdateLake;
12277    /// # tokio_test::block_on(async {
12278    /// use lro::Poller;
12279    ///
12280    /// let builder = prepare_request_builder();
12281    /// let response = builder.poller().until_done().await?;
12282    /// # gax::Result::<()>::Ok(()) });
12283    ///
12284    /// fn prepare_request_builder() -> UpdateLake {
12285    ///   # panic!();
12286    ///   // ... details omitted ...
12287    /// }
12288    /// ```
12289    #[derive(Clone, Debug)]
12290    pub struct UpdateLake(RequestBuilder<crate::model::UpdateLakeRequest>);
12291
12292    impl UpdateLake {
12293        pub(crate) fn new(
12294            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
12295        ) -> Self {
12296            Self(RequestBuilder::new(stub))
12297        }
12298
12299        /// Sets the full request, replacing any prior values.
12300        pub fn with_request<V: Into<crate::model::UpdateLakeRequest>>(mut self, v: V) -> Self {
12301            self.0.request = v.into();
12302            self
12303        }
12304
12305        /// Sets all the options, replacing any prior values.
12306        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12307            self.0.options = v.into();
12308            self
12309        }
12310
12311        /// Sends the request.
12312        ///
12313        /// # Long running operations
12314        ///
12315        /// This starts, but does not poll, a longrunning operation. More information
12316        /// on [update_lake][crate::client::DataplexService::update_lake].
12317        pub async fn send(self) -> Result<longrunning::model::Operation> {
12318            (*self.0.stub)
12319                .update_lake(self.0.request, self.0.options)
12320                .await
12321                .map(gax::response::Response::into_body)
12322        }
12323
12324        /// Creates a [Poller][lro::Poller] to work with `update_lake`.
12325        pub fn poller(
12326            self,
12327        ) -> impl lro::Poller<crate::model::Lake, crate::model::OperationMetadata> {
12328            type Operation =
12329                lro::internal::Operation<crate::model::Lake, crate::model::OperationMetadata>;
12330            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12331            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12332
12333            let stub = self.0.stub.clone();
12334            let mut options = self.0.options.clone();
12335            options.set_retry_policy(gax::retry_policy::NeverRetry);
12336            let query = move |name| {
12337                let stub = stub.clone();
12338                let options = options.clone();
12339                async {
12340                    let op = GetOperation::new(stub)
12341                        .set_name(name)
12342                        .with_options(options)
12343                        .send()
12344                        .await?;
12345                    Ok(Operation::new(op))
12346                }
12347            };
12348
12349            let start = move || async {
12350                let op = self.send().await?;
12351                Ok(Operation::new(op))
12352            };
12353
12354            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
12355        }
12356
12357        /// Sets the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
12358        ///
12359        /// This is a **required** field for requests.
12360        pub fn set_update_mask<T>(mut self, v: T) -> Self
12361        where
12362            T: std::convert::Into<wkt::FieldMask>,
12363        {
12364            self.0.request.update_mask = std::option::Option::Some(v.into());
12365            self
12366        }
12367
12368        /// Sets or clears the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
12369        ///
12370        /// This is a **required** field for requests.
12371        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
12372        where
12373            T: std::convert::Into<wkt::FieldMask>,
12374        {
12375            self.0.request.update_mask = v.map(|x| x.into());
12376            self
12377        }
12378
12379        /// Sets the value of [lake][crate::model::UpdateLakeRequest::lake].
12380        ///
12381        /// This is a **required** field for requests.
12382        pub fn set_lake<T>(mut self, v: T) -> Self
12383        where
12384            T: std::convert::Into<crate::model::Lake>,
12385        {
12386            self.0.request.lake = std::option::Option::Some(v.into());
12387            self
12388        }
12389
12390        /// Sets or clears the value of [lake][crate::model::UpdateLakeRequest::lake].
12391        ///
12392        /// This is a **required** field for requests.
12393        pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
12394        where
12395            T: std::convert::Into<crate::model::Lake>,
12396        {
12397            self.0.request.lake = v.map(|x| x.into());
12398            self
12399        }
12400
12401        /// Sets the value of [validate_only][crate::model::UpdateLakeRequest::validate_only].
12402        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12403            self.0.request.validate_only = v.into();
12404            self
12405        }
12406    }
12407
12408    #[doc(hidden)]
12409    impl gax::options::internal::RequestBuilder for UpdateLake {
12410        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12411            &mut self.0.options
12412        }
12413    }
12414
12415    /// The request builder for [DataplexService::delete_lake][crate::client::DataplexService::delete_lake] calls.
12416    ///
12417    /// # Example
12418    /// ```no_run
12419    /// # use google_cloud_dataplex_v1::builder;
12420    /// use builder::dataplex_service::DeleteLake;
12421    /// # tokio_test::block_on(async {
12422    /// use lro::Poller;
12423    ///
12424    /// let builder = prepare_request_builder();
12425    /// let response = builder.poller().until_done().await?;
12426    /// # gax::Result::<()>::Ok(()) });
12427    ///
12428    /// fn prepare_request_builder() -> DeleteLake {
12429    ///   # panic!();
12430    ///   // ... details omitted ...
12431    /// }
12432    /// ```
12433    #[derive(Clone, Debug)]
12434    pub struct DeleteLake(RequestBuilder<crate::model::DeleteLakeRequest>);
12435
12436    impl DeleteLake {
12437        pub(crate) fn new(
12438            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
12439        ) -> Self {
12440            Self(RequestBuilder::new(stub))
12441        }
12442
12443        /// Sets the full request, replacing any prior values.
12444        pub fn with_request<V: Into<crate::model::DeleteLakeRequest>>(mut self, v: V) -> Self {
12445            self.0.request = v.into();
12446            self
12447        }
12448
12449        /// Sets all the options, replacing any prior values.
12450        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12451            self.0.options = v.into();
12452            self
12453        }
12454
12455        /// Sends the request.
12456        ///
12457        /// # Long running operations
12458        ///
12459        /// This starts, but does not poll, a longrunning operation. More information
12460        /// on [delete_lake][crate::client::DataplexService::delete_lake].
12461        pub async fn send(self) -> Result<longrunning::model::Operation> {
12462            (*self.0.stub)
12463                .delete_lake(self.0.request, self.0.options)
12464                .await
12465                .map(gax::response::Response::into_body)
12466        }
12467
12468        /// Creates a [Poller][lro::Poller] to work with `delete_lake`.
12469        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
12470            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
12471            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12472            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12473
12474            let stub = self.0.stub.clone();
12475            let mut options = self.0.options.clone();
12476            options.set_retry_policy(gax::retry_policy::NeverRetry);
12477            let query = move |name| {
12478                let stub = stub.clone();
12479                let options = options.clone();
12480                async {
12481                    let op = GetOperation::new(stub)
12482                        .set_name(name)
12483                        .with_options(options)
12484                        .send()
12485                        .await?;
12486                    Ok(Operation::new(op))
12487                }
12488            };
12489
12490            let start = move || async {
12491                let op = self.send().await?;
12492                Ok(Operation::new(op))
12493            };
12494
12495            lro::internal::new_unit_response_poller(
12496                polling_error_policy,
12497                polling_backoff_policy,
12498                start,
12499                query,
12500            )
12501        }
12502
12503        /// Sets the value of [name][crate::model::DeleteLakeRequest::name].
12504        ///
12505        /// This is a **required** field for requests.
12506        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12507            self.0.request.name = v.into();
12508            self
12509        }
12510    }
12511
12512    #[doc(hidden)]
12513    impl gax::options::internal::RequestBuilder for DeleteLake {
12514        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12515            &mut self.0.options
12516        }
12517    }
12518
12519    /// The request builder for [DataplexService::list_lakes][crate::client::DataplexService::list_lakes] calls.
12520    ///
12521    /// # Example
12522    /// ```no_run
12523    /// # use google_cloud_dataplex_v1::builder;
12524    /// use builder::dataplex_service::ListLakes;
12525    /// # tokio_test::block_on(async {
12526    /// use gax::paginator::ItemPaginator;
12527    ///
12528    /// let builder = prepare_request_builder();
12529    /// let mut items = builder.by_item();
12530    /// while let Some(result) = items.next().await {
12531    ///   let item = result?;
12532    /// }
12533    /// # gax::Result::<()>::Ok(()) });
12534    ///
12535    /// fn prepare_request_builder() -> ListLakes {
12536    ///   # panic!();
12537    ///   // ... details omitted ...
12538    /// }
12539    /// ```
12540    #[derive(Clone, Debug)]
12541    pub struct ListLakes(RequestBuilder<crate::model::ListLakesRequest>);
12542
12543    impl ListLakes {
12544        pub(crate) fn new(
12545            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
12546        ) -> Self {
12547            Self(RequestBuilder::new(stub))
12548        }
12549
12550        /// Sets the full request, replacing any prior values.
12551        pub fn with_request<V: Into<crate::model::ListLakesRequest>>(mut self, v: V) -> Self {
12552            self.0.request = v.into();
12553            self
12554        }
12555
12556        /// Sets all the options, replacing any prior values.
12557        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12558            self.0.options = v.into();
12559            self
12560        }
12561
12562        /// Sends the request.
12563        pub async fn send(self) -> Result<crate::model::ListLakesResponse> {
12564            (*self.0.stub)
12565                .list_lakes(self.0.request, self.0.options)
12566                .await
12567                .map(gax::response::Response::into_body)
12568        }
12569
12570        /// Streams each page in the collection.
12571        pub fn by_page(
12572            self,
12573        ) -> impl gax::paginator::Paginator<crate::model::ListLakesResponse, gax::error::Error>
12574        {
12575            use std::clone::Clone;
12576            let token = self.0.request.page_token.clone();
12577            let execute = move |token: String| {
12578                let mut builder = self.clone();
12579                builder.0.request = builder.0.request.set_page_token(token);
12580                builder.send()
12581            };
12582            gax::paginator::internal::new_paginator(token, execute)
12583        }
12584
12585        /// Streams each item in the collection.
12586        pub fn by_item(
12587            self,
12588        ) -> impl gax::paginator::ItemPaginator<crate::model::ListLakesResponse, gax::error::Error>
12589        {
12590            use gax::paginator::Paginator;
12591            self.by_page().items()
12592        }
12593
12594        /// Sets the value of [parent][crate::model::ListLakesRequest::parent].
12595        ///
12596        /// This is a **required** field for requests.
12597        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12598            self.0.request.parent = v.into();
12599            self
12600        }
12601
12602        /// Sets the value of [page_size][crate::model::ListLakesRequest::page_size].
12603        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12604            self.0.request.page_size = v.into();
12605            self
12606        }
12607
12608        /// Sets the value of [page_token][crate::model::ListLakesRequest::page_token].
12609        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12610            self.0.request.page_token = v.into();
12611            self
12612        }
12613
12614        /// Sets the value of [filter][crate::model::ListLakesRequest::filter].
12615        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12616            self.0.request.filter = v.into();
12617            self
12618        }
12619
12620        /// Sets the value of [order_by][crate::model::ListLakesRequest::order_by].
12621        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
12622            self.0.request.order_by = v.into();
12623            self
12624        }
12625    }
12626
12627    #[doc(hidden)]
12628    impl gax::options::internal::RequestBuilder for ListLakes {
12629        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12630            &mut self.0.options
12631        }
12632    }
12633
12634    /// The request builder for [DataplexService::get_lake][crate::client::DataplexService::get_lake] calls.
12635    ///
12636    /// # Example
12637    /// ```no_run
12638    /// # use google_cloud_dataplex_v1::builder;
12639    /// use builder::dataplex_service::GetLake;
12640    /// # tokio_test::block_on(async {
12641    ///
12642    /// let builder = prepare_request_builder();
12643    /// let response = builder.send().await?;
12644    /// # gax::Result::<()>::Ok(()) });
12645    ///
12646    /// fn prepare_request_builder() -> GetLake {
12647    ///   # panic!();
12648    ///   // ... details omitted ...
12649    /// }
12650    /// ```
12651    #[derive(Clone, Debug)]
12652    pub struct GetLake(RequestBuilder<crate::model::GetLakeRequest>);
12653
12654    impl GetLake {
12655        pub(crate) fn new(
12656            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
12657        ) -> Self {
12658            Self(RequestBuilder::new(stub))
12659        }
12660
12661        /// Sets the full request, replacing any prior values.
12662        pub fn with_request<V: Into<crate::model::GetLakeRequest>>(mut self, v: V) -> Self {
12663            self.0.request = v.into();
12664            self
12665        }
12666
12667        /// Sets all the options, replacing any prior values.
12668        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12669            self.0.options = v.into();
12670            self
12671        }
12672
12673        /// Sends the request.
12674        pub async fn send(self) -> Result<crate::model::Lake> {
12675            (*self.0.stub)
12676                .get_lake(self.0.request, self.0.options)
12677                .await
12678                .map(gax::response::Response::into_body)
12679        }
12680
12681        /// Sets the value of [name][crate::model::GetLakeRequest::name].
12682        ///
12683        /// This is a **required** field for requests.
12684        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12685            self.0.request.name = v.into();
12686            self
12687        }
12688    }
12689
12690    #[doc(hidden)]
12691    impl gax::options::internal::RequestBuilder for GetLake {
12692        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12693            &mut self.0.options
12694        }
12695    }
12696
12697    /// The request builder for [DataplexService::list_lake_actions][crate::client::DataplexService::list_lake_actions] calls.
12698    ///
12699    /// # Example
12700    /// ```no_run
12701    /// # use google_cloud_dataplex_v1::builder;
12702    /// use builder::dataplex_service::ListLakeActions;
12703    /// # tokio_test::block_on(async {
12704    /// use gax::paginator::ItemPaginator;
12705    ///
12706    /// let builder = prepare_request_builder();
12707    /// let mut items = builder.by_item();
12708    /// while let Some(result) = items.next().await {
12709    ///   let item = result?;
12710    /// }
12711    /// # gax::Result::<()>::Ok(()) });
12712    ///
12713    /// fn prepare_request_builder() -> ListLakeActions {
12714    ///   # panic!();
12715    ///   // ... details omitted ...
12716    /// }
12717    /// ```
12718    #[derive(Clone, Debug)]
12719    pub struct ListLakeActions(RequestBuilder<crate::model::ListLakeActionsRequest>);
12720
12721    impl ListLakeActions {
12722        pub(crate) fn new(
12723            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
12724        ) -> Self {
12725            Self(RequestBuilder::new(stub))
12726        }
12727
12728        /// Sets the full request, replacing any prior values.
12729        pub fn with_request<V: Into<crate::model::ListLakeActionsRequest>>(mut self, v: V) -> Self {
12730            self.0.request = v.into();
12731            self
12732        }
12733
12734        /// Sets all the options, replacing any prior values.
12735        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12736            self.0.options = v.into();
12737            self
12738        }
12739
12740        /// Sends the request.
12741        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
12742            (*self.0.stub)
12743                .list_lake_actions(self.0.request, self.0.options)
12744                .await
12745                .map(gax::response::Response::into_body)
12746        }
12747
12748        /// Streams each page in the collection.
12749        pub fn by_page(
12750            self,
12751        ) -> impl gax::paginator::Paginator<crate::model::ListActionsResponse, gax::error::Error>
12752        {
12753            use std::clone::Clone;
12754            let token = self.0.request.page_token.clone();
12755            let execute = move |token: String| {
12756                let mut builder = self.clone();
12757                builder.0.request = builder.0.request.set_page_token(token);
12758                builder.send()
12759            };
12760            gax::paginator::internal::new_paginator(token, execute)
12761        }
12762
12763        /// Streams each item in the collection.
12764        pub fn by_item(
12765            self,
12766        ) -> impl gax::paginator::ItemPaginator<crate::model::ListActionsResponse, gax::error::Error>
12767        {
12768            use gax::paginator::Paginator;
12769            self.by_page().items()
12770        }
12771
12772        /// Sets the value of [parent][crate::model::ListLakeActionsRequest::parent].
12773        ///
12774        /// This is a **required** field for requests.
12775        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12776            self.0.request.parent = v.into();
12777            self
12778        }
12779
12780        /// Sets the value of [page_size][crate::model::ListLakeActionsRequest::page_size].
12781        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12782            self.0.request.page_size = v.into();
12783            self
12784        }
12785
12786        /// Sets the value of [page_token][crate::model::ListLakeActionsRequest::page_token].
12787        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12788            self.0.request.page_token = v.into();
12789            self
12790        }
12791    }
12792
12793    #[doc(hidden)]
12794    impl gax::options::internal::RequestBuilder for ListLakeActions {
12795        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12796            &mut self.0.options
12797        }
12798    }
12799
12800    /// The request builder for [DataplexService::create_zone][crate::client::DataplexService::create_zone] calls.
12801    ///
12802    /// # Example
12803    /// ```no_run
12804    /// # use google_cloud_dataplex_v1::builder;
12805    /// use builder::dataplex_service::CreateZone;
12806    /// # tokio_test::block_on(async {
12807    /// use lro::Poller;
12808    ///
12809    /// let builder = prepare_request_builder();
12810    /// let response = builder.poller().until_done().await?;
12811    /// # gax::Result::<()>::Ok(()) });
12812    ///
12813    /// fn prepare_request_builder() -> CreateZone {
12814    ///   # panic!();
12815    ///   // ... details omitted ...
12816    /// }
12817    /// ```
12818    #[derive(Clone, Debug)]
12819    pub struct CreateZone(RequestBuilder<crate::model::CreateZoneRequest>);
12820
12821    impl CreateZone {
12822        pub(crate) fn new(
12823            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
12824        ) -> Self {
12825            Self(RequestBuilder::new(stub))
12826        }
12827
12828        /// Sets the full request, replacing any prior values.
12829        pub fn with_request<V: Into<crate::model::CreateZoneRequest>>(mut self, v: V) -> Self {
12830            self.0.request = v.into();
12831            self
12832        }
12833
12834        /// Sets all the options, replacing any prior values.
12835        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12836            self.0.options = v.into();
12837            self
12838        }
12839
12840        /// Sends the request.
12841        ///
12842        /// # Long running operations
12843        ///
12844        /// This starts, but does not poll, a longrunning operation. More information
12845        /// on [create_zone][crate::client::DataplexService::create_zone].
12846        pub async fn send(self) -> Result<longrunning::model::Operation> {
12847            (*self.0.stub)
12848                .create_zone(self.0.request, self.0.options)
12849                .await
12850                .map(gax::response::Response::into_body)
12851        }
12852
12853        /// Creates a [Poller][lro::Poller] to work with `create_zone`.
12854        pub fn poller(
12855            self,
12856        ) -> impl lro::Poller<crate::model::Zone, crate::model::OperationMetadata> {
12857            type Operation =
12858                lro::internal::Operation<crate::model::Zone, crate::model::OperationMetadata>;
12859            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12860            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12861
12862            let stub = self.0.stub.clone();
12863            let mut options = self.0.options.clone();
12864            options.set_retry_policy(gax::retry_policy::NeverRetry);
12865            let query = move |name| {
12866                let stub = stub.clone();
12867                let options = options.clone();
12868                async {
12869                    let op = GetOperation::new(stub)
12870                        .set_name(name)
12871                        .with_options(options)
12872                        .send()
12873                        .await?;
12874                    Ok(Operation::new(op))
12875                }
12876            };
12877
12878            let start = move || async {
12879                let op = self.send().await?;
12880                Ok(Operation::new(op))
12881            };
12882
12883            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
12884        }
12885
12886        /// Sets the value of [parent][crate::model::CreateZoneRequest::parent].
12887        ///
12888        /// This is a **required** field for requests.
12889        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12890            self.0.request.parent = v.into();
12891            self
12892        }
12893
12894        /// Sets the value of [zone_id][crate::model::CreateZoneRequest::zone_id].
12895        ///
12896        /// This is a **required** field for requests.
12897        pub fn set_zone_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
12898            self.0.request.zone_id = v.into();
12899            self
12900        }
12901
12902        /// Sets the value of [zone][crate::model::CreateZoneRequest::zone].
12903        ///
12904        /// This is a **required** field for requests.
12905        pub fn set_zone<T>(mut self, v: T) -> Self
12906        where
12907            T: std::convert::Into<crate::model::Zone>,
12908        {
12909            self.0.request.zone = std::option::Option::Some(v.into());
12910            self
12911        }
12912
12913        /// Sets or clears the value of [zone][crate::model::CreateZoneRequest::zone].
12914        ///
12915        /// This is a **required** field for requests.
12916        pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
12917        where
12918            T: std::convert::Into<crate::model::Zone>,
12919        {
12920            self.0.request.zone = v.map(|x| x.into());
12921            self
12922        }
12923
12924        /// Sets the value of [validate_only][crate::model::CreateZoneRequest::validate_only].
12925        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12926            self.0.request.validate_only = v.into();
12927            self
12928        }
12929    }
12930
12931    #[doc(hidden)]
12932    impl gax::options::internal::RequestBuilder for CreateZone {
12933        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12934            &mut self.0.options
12935        }
12936    }
12937
12938    /// The request builder for [DataplexService::update_zone][crate::client::DataplexService::update_zone] calls.
12939    ///
12940    /// # Example
12941    /// ```no_run
12942    /// # use google_cloud_dataplex_v1::builder;
12943    /// use builder::dataplex_service::UpdateZone;
12944    /// # tokio_test::block_on(async {
12945    /// use lro::Poller;
12946    ///
12947    /// let builder = prepare_request_builder();
12948    /// let response = builder.poller().until_done().await?;
12949    /// # gax::Result::<()>::Ok(()) });
12950    ///
12951    /// fn prepare_request_builder() -> UpdateZone {
12952    ///   # panic!();
12953    ///   // ... details omitted ...
12954    /// }
12955    /// ```
12956    #[derive(Clone, Debug)]
12957    pub struct UpdateZone(RequestBuilder<crate::model::UpdateZoneRequest>);
12958
12959    impl UpdateZone {
12960        pub(crate) fn new(
12961            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
12962        ) -> Self {
12963            Self(RequestBuilder::new(stub))
12964        }
12965
12966        /// Sets the full request, replacing any prior values.
12967        pub fn with_request<V: Into<crate::model::UpdateZoneRequest>>(mut self, v: V) -> Self {
12968            self.0.request = v.into();
12969            self
12970        }
12971
12972        /// Sets all the options, replacing any prior values.
12973        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12974            self.0.options = v.into();
12975            self
12976        }
12977
12978        /// Sends the request.
12979        ///
12980        /// # Long running operations
12981        ///
12982        /// This starts, but does not poll, a longrunning operation. More information
12983        /// on [update_zone][crate::client::DataplexService::update_zone].
12984        pub async fn send(self) -> Result<longrunning::model::Operation> {
12985            (*self.0.stub)
12986                .update_zone(self.0.request, self.0.options)
12987                .await
12988                .map(gax::response::Response::into_body)
12989        }
12990
12991        /// Creates a [Poller][lro::Poller] to work with `update_zone`.
12992        pub fn poller(
12993            self,
12994        ) -> impl lro::Poller<crate::model::Zone, crate::model::OperationMetadata> {
12995            type Operation =
12996                lro::internal::Operation<crate::model::Zone, crate::model::OperationMetadata>;
12997            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12998            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12999
13000            let stub = self.0.stub.clone();
13001            let mut options = self.0.options.clone();
13002            options.set_retry_policy(gax::retry_policy::NeverRetry);
13003            let query = move |name| {
13004                let stub = stub.clone();
13005                let options = options.clone();
13006                async {
13007                    let op = GetOperation::new(stub)
13008                        .set_name(name)
13009                        .with_options(options)
13010                        .send()
13011                        .await?;
13012                    Ok(Operation::new(op))
13013                }
13014            };
13015
13016            let start = move || async {
13017                let op = self.send().await?;
13018                Ok(Operation::new(op))
13019            };
13020
13021            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
13022        }
13023
13024        /// Sets the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
13025        ///
13026        /// This is a **required** field for requests.
13027        pub fn set_update_mask<T>(mut self, v: T) -> Self
13028        where
13029            T: std::convert::Into<wkt::FieldMask>,
13030        {
13031            self.0.request.update_mask = std::option::Option::Some(v.into());
13032            self
13033        }
13034
13035        /// Sets or clears the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
13036        ///
13037        /// This is a **required** field for requests.
13038        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
13039        where
13040            T: std::convert::Into<wkt::FieldMask>,
13041        {
13042            self.0.request.update_mask = v.map(|x| x.into());
13043            self
13044        }
13045
13046        /// Sets the value of [zone][crate::model::UpdateZoneRequest::zone].
13047        ///
13048        /// This is a **required** field for requests.
13049        pub fn set_zone<T>(mut self, v: T) -> Self
13050        where
13051            T: std::convert::Into<crate::model::Zone>,
13052        {
13053            self.0.request.zone = std::option::Option::Some(v.into());
13054            self
13055        }
13056
13057        /// Sets or clears the value of [zone][crate::model::UpdateZoneRequest::zone].
13058        ///
13059        /// This is a **required** field for requests.
13060        pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
13061        where
13062            T: std::convert::Into<crate::model::Zone>,
13063        {
13064            self.0.request.zone = v.map(|x| x.into());
13065            self
13066        }
13067
13068        /// Sets the value of [validate_only][crate::model::UpdateZoneRequest::validate_only].
13069        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
13070            self.0.request.validate_only = v.into();
13071            self
13072        }
13073    }
13074
13075    #[doc(hidden)]
13076    impl gax::options::internal::RequestBuilder for UpdateZone {
13077        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13078            &mut self.0.options
13079        }
13080    }
13081
13082    /// The request builder for [DataplexService::delete_zone][crate::client::DataplexService::delete_zone] calls.
13083    ///
13084    /// # Example
13085    /// ```no_run
13086    /// # use google_cloud_dataplex_v1::builder;
13087    /// use builder::dataplex_service::DeleteZone;
13088    /// # tokio_test::block_on(async {
13089    /// use lro::Poller;
13090    ///
13091    /// let builder = prepare_request_builder();
13092    /// let response = builder.poller().until_done().await?;
13093    /// # gax::Result::<()>::Ok(()) });
13094    ///
13095    /// fn prepare_request_builder() -> DeleteZone {
13096    ///   # panic!();
13097    ///   // ... details omitted ...
13098    /// }
13099    /// ```
13100    #[derive(Clone, Debug)]
13101    pub struct DeleteZone(RequestBuilder<crate::model::DeleteZoneRequest>);
13102
13103    impl DeleteZone {
13104        pub(crate) fn new(
13105            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
13106        ) -> Self {
13107            Self(RequestBuilder::new(stub))
13108        }
13109
13110        /// Sets the full request, replacing any prior values.
13111        pub fn with_request<V: Into<crate::model::DeleteZoneRequest>>(mut self, v: V) -> Self {
13112            self.0.request = v.into();
13113            self
13114        }
13115
13116        /// Sets all the options, replacing any prior values.
13117        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13118            self.0.options = v.into();
13119            self
13120        }
13121
13122        /// Sends the request.
13123        ///
13124        /// # Long running operations
13125        ///
13126        /// This starts, but does not poll, a longrunning operation. More information
13127        /// on [delete_zone][crate::client::DataplexService::delete_zone].
13128        pub async fn send(self) -> Result<longrunning::model::Operation> {
13129            (*self.0.stub)
13130                .delete_zone(self.0.request, self.0.options)
13131                .await
13132                .map(gax::response::Response::into_body)
13133        }
13134
13135        /// Creates a [Poller][lro::Poller] to work with `delete_zone`.
13136        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
13137            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
13138            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
13139            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
13140
13141            let stub = self.0.stub.clone();
13142            let mut options = self.0.options.clone();
13143            options.set_retry_policy(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            lro::internal::new_unit_response_poller(
13163                polling_error_policy,
13164                polling_backoff_policy,
13165                start,
13166                query,
13167            )
13168        }
13169
13170        /// Sets the value of [name][crate::model::DeleteZoneRequest::name].
13171        ///
13172        /// This is a **required** field for requests.
13173        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13174            self.0.request.name = v.into();
13175            self
13176        }
13177    }
13178
13179    #[doc(hidden)]
13180    impl gax::options::internal::RequestBuilder for DeleteZone {
13181        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13182            &mut self.0.options
13183        }
13184    }
13185
13186    /// The request builder for [DataplexService::list_zones][crate::client::DataplexService::list_zones] calls.
13187    ///
13188    /// # Example
13189    /// ```no_run
13190    /// # use google_cloud_dataplex_v1::builder;
13191    /// use builder::dataplex_service::ListZones;
13192    /// # tokio_test::block_on(async {
13193    /// use gax::paginator::ItemPaginator;
13194    ///
13195    /// let builder = prepare_request_builder();
13196    /// let mut items = builder.by_item();
13197    /// while let Some(result) = items.next().await {
13198    ///   let item = result?;
13199    /// }
13200    /// # gax::Result::<()>::Ok(()) });
13201    ///
13202    /// fn prepare_request_builder() -> ListZones {
13203    ///   # panic!();
13204    ///   // ... details omitted ...
13205    /// }
13206    /// ```
13207    #[derive(Clone, Debug)]
13208    pub struct ListZones(RequestBuilder<crate::model::ListZonesRequest>);
13209
13210    impl ListZones {
13211        pub(crate) fn new(
13212            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
13213        ) -> Self {
13214            Self(RequestBuilder::new(stub))
13215        }
13216
13217        /// Sets the full request, replacing any prior values.
13218        pub fn with_request<V: Into<crate::model::ListZonesRequest>>(mut self, v: V) -> Self {
13219            self.0.request = v.into();
13220            self
13221        }
13222
13223        /// Sets all the options, replacing any prior values.
13224        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13225            self.0.options = v.into();
13226            self
13227        }
13228
13229        /// Sends the request.
13230        pub async fn send(self) -> Result<crate::model::ListZonesResponse> {
13231            (*self.0.stub)
13232                .list_zones(self.0.request, self.0.options)
13233                .await
13234                .map(gax::response::Response::into_body)
13235        }
13236
13237        /// Streams each page in the collection.
13238        pub fn by_page(
13239            self,
13240        ) -> impl gax::paginator::Paginator<crate::model::ListZonesResponse, gax::error::Error>
13241        {
13242            use std::clone::Clone;
13243            let token = self.0.request.page_token.clone();
13244            let execute = move |token: String| {
13245                let mut builder = self.clone();
13246                builder.0.request = builder.0.request.set_page_token(token);
13247                builder.send()
13248            };
13249            gax::paginator::internal::new_paginator(token, execute)
13250        }
13251
13252        /// Streams each item in the collection.
13253        pub fn by_item(
13254            self,
13255        ) -> impl gax::paginator::ItemPaginator<crate::model::ListZonesResponse, gax::error::Error>
13256        {
13257            use gax::paginator::Paginator;
13258            self.by_page().items()
13259        }
13260
13261        /// Sets the value of [parent][crate::model::ListZonesRequest::parent].
13262        ///
13263        /// This is a **required** field for requests.
13264        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13265            self.0.request.parent = v.into();
13266            self
13267        }
13268
13269        /// Sets the value of [page_size][crate::model::ListZonesRequest::page_size].
13270        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13271            self.0.request.page_size = v.into();
13272            self
13273        }
13274
13275        /// Sets the value of [page_token][crate::model::ListZonesRequest::page_token].
13276        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13277            self.0.request.page_token = v.into();
13278            self
13279        }
13280
13281        /// Sets the value of [filter][crate::model::ListZonesRequest::filter].
13282        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13283            self.0.request.filter = v.into();
13284            self
13285        }
13286
13287        /// Sets the value of [order_by][crate::model::ListZonesRequest::order_by].
13288        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
13289            self.0.request.order_by = v.into();
13290            self
13291        }
13292    }
13293
13294    #[doc(hidden)]
13295    impl gax::options::internal::RequestBuilder for ListZones {
13296        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13297            &mut self.0.options
13298        }
13299    }
13300
13301    /// The request builder for [DataplexService::get_zone][crate::client::DataplexService::get_zone] calls.
13302    ///
13303    /// # Example
13304    /// ```no_run
13305    /// # use google_cloud_dataplex_v1::builder;
13306    /// use builder::dataplex_service::GetZone;
13307    /// # tokio_test::block_on(async {
13308    ///
13309    /// let builder = prepare_request_builder();
13310    /// let response = builder.send().await?;
13311    /// # gax::Result::<()>::Ok(()) });
13312    ///
13313    /// fn prepare_request_builder() -> GetZone {
13314    ///   # panic!();
13315    ///   // ... details omitted ...
13316    /// }
13317    /// ```
13318    #[derive(Clone, Debug)]
13319    pub struct GetZone(RequestBuilder<crate::model::GetZoneRequest>);
13320
13321    impl GetZone {
13322        pub(crate) fn new(
13323            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
13324        ) -> Self {
13325            Self(RequestBuilder::new(stub))
13326        }
13327
13328        /// Sets the full request, replacing any prior values.
13329        pub fn with_request<V: Into<crate::model::GetZoneRequest>>(mut self, v: V) -> Self {
13330            self.0.request = v.into();
13331            self
13332        }
13333
13334        /// Sets all the options, replacing any prior values.
13335        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13336            self.0.options = v.into();
13337            self
13338        }
13339
13340        /// Sends the request.
13341        pub async fn send(self) -> Result<crate::model::Zone> {
13342            (*self.0.stub)
13343                .get_zone(self.0.request, self.0.options)
13344                .await
13345                .map(gax::response::Response::into_body)
13346        }
13347
13348        /// Sets the value of [name][crate::model::GetZoneRequest::name].
13349        ///
13350        /// This is a **required** field for requests.
13351        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13352            self.0.request.name = v.into();
13353            self
13354        }
13355    }
13356
13357    #[doc(hidden)]
13358    impl gax::options::internal::RequestBuilder for GetZone {
13359        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13360            &mut self.0.options
13361        }
13362    }
13363
13364    /// The request builder for [DataplexService::list_zone_actions][crate::client::DataplexService::list_zone_actions] calls.
13365    ///
13366    /// # Example
13367    /// ```no_run
13368    /// # use google_cloud_dataplex_v1::builder;
13369    /// use builder::dataplex_service::ListZoneActions;
13370    /// # tokio_test::block_on(async {
13371    /// use gax::paginator::ItemPaginator;
13372    ///
13373    /// let builder = prepare_request_builder();
13374    /// let mut items = builder.by_item();
13375    /// while let Some(result) = items.next().await {
13376    ///   let item = result?;
13377    /// }
13378    /// # gax::Result::<()>::Ok(()) });
13379    ///
13380    /// fn prepare_request_builder() -> ListZoneActions {
13381    ///   # panic!();
13382    ///   // ... details omitted ...
13383    /// }
13384    /// ```
13385    #[derive(Clone, Debug)]
13386    pub struct ListZoneActions(RequestBuilder<crate::model::ListZoneActionsRequest>);
13387
13388    impl ListZoneActions {
13389        pub(crate) fn new(
13390            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
13391        ) -> Self {
13392            Self(RequestBuilder::new(stub))
13393        }
13394
13395        /// Sets the full request, replacing any prior values.
13396        pub fn with_request<V: Into<crate::model::ListZoneActionsRequest>>(mut self, v: V) -> Self {
13397            self.0.request = v.into();
13398            self
13399        }
13400
13401        /// Sets all the options, replacing any prior values.
13402        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13403            self.0.options = v.into();
13404            self
13405        }
13406
13407        /// Sends the request.
13408        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
13409            (*self.0.stub)
13410                .list_zone_actions(self.0.request, self.0.options)
13411                .await
13412                .map(gax::response::Response::into_body)
13413        }
13414
13415        /// Streams each page in the collection.
13416        pub fn by_page(
13417            self,
13418        ) -> impl gax::paginator::Paginator<crate::model::ListActionsResponse, gax::error::Error>
13419        {
13420            use std::clone::Clone;
13421            let token = self.0.request.page_token.clone();
13422            let execute = move |token: String| {
13423                let mut builder = self.clone();
13424                builder.0.request = builder.0.request.set_page_token(token);
13425                builder.send()
13426            };
13427            gax::paginator::internal::new_paginator(token, execute)
13428        }
13429
13430        /// Streams each item in the collection.
13431        pub fn by_item(
13432            self,
13433        ) -> impl gax::paginator::ItemPaginator<crate::model::ListActionsResponse, gax::error::Error>
13434        {
13435            use gax::paginator::Paginator;
13436            self.by_page().items()
13437        }
13438
13439        /// Sets the value of [parent][crate::model::ListZoneActionsRequest::parent].
13440        ///
13441        /// This is a **required** field for requests.
13442        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13443            self.0.request.parent = v.into();
13444            self
13445        }
13446
13447        /// Sets the value of [page_size][crate::model::ListZoneActionsRequest::page_size].
13448        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13449            self.0.request.page_size = v.into();
13450            self
13451        }
13452
13453        /// Sets the value of [page_token][crate::model::ListZoneActionsRequest::page_token].
13454        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13455            self.0.request.page_token = v.into();
13456            self
13457        }
13458    }
13459
13460    #[doc(hidden)]
13461    impl gax::options::internal::RequestBuilder for ListZoneActions {
13462        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13463            &mut self.0.options
13464        }
13465    }
13466
13467    /// The request builder for [DataplexService::create_asset][crate::client::DataplexService::create_asset] calls.
13468    ///
13469    /// # Example
13470    /// ```no_run
13471    /// # use google_cloud_dataplex_v1::builder;
13472    /// use builder::dataplex_service::CreateAsset;
13473    /// # tokio_test::block_on(async {
13474    /// use lro::Poller;
13475    ///
13476    /// let builder = prepare_request_builder();
13477    /// let response = builder.poller().until_done().await?;
13478    /// # gax::Result::<()>::Ok(()) });
13479    ///
13480    /// fn prepare_request_builder() -> CreateAsset {
13481    ///   # panic!();
13482    ///   // ... details omitted ...
13483    /// }
13484    /// ```
13485    #[derive(Clone, Debug)]
13486    pub struct CreateAsset(RequestBuilder<crate::model::CreateAssetRequest>);
13487
13488    impl CreateAsset {
13489        pub(crate) fn new(
13490            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
13491        ) -> Self {
13492            Self(RequestBuilder::new(stub))
13493        }
13494
13495        /// Sets the full request, replacing any prior values.
13496        pub fn with_request<V: Into<crate::model::CreateAssetRequest>>(mut self, v: V) -> Self {
13497            self.0.request = v.into();
13498            self
13499        }
13500
13501        /// Sets all the options, replacing any prior values.
13502        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13503            self.0.options = v.into();
13504            self
13505        }
13506
13507        /// Sends the request.
13508        ///
13509        /// # Long running operations
13510        ///
13511        /// This starts, but does not poll, a longrunning operation. More information
13512        /// on [create_asset][crate::client::DataplexService::create_asset].
13513        pub async fn send(self) -> Result<longrunning::model::Operation> {
13514            (*self.0.stub)
13515                .create_asset(self.0.request, self.0.options)
13516                .await
13517                .map(gax::response::Response::into_body)
13518        }
13519
13520        /// Creates a [Poller][lro::Poller] to work with `create_asset`.
13521        pub fn poller(
13522            self,
13523        ) -> impl lro::Poller<crate::model::Asset, crate::model::OperationMetadata> {
13524            type Operation =
13525                lro::internal::Operation<crate::model::Asset, crate::model::OperationMetadata>;
13526            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
13527            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
13528
13529            let stub = self.0.stub.clone();
13530            let mut options = self.0.options.clone();
13531            options.set_retry_policy(gax::retry_policy::NeverRetry);
13532            let query = move |name| {
13533                let stub = stub.clone();
13534                let options = options.clone();
13535                async {
13536                    let op = GetOperation::new(stub)
13537                        .set_name(name)
13538                        .with_options(options)
13539                        .send()
13540                        .await?;
13541                    Ok(Operation::new(op))
13542                }
13543            };
13544
13545            let start = move || async {
13546                let op = self.send().await?;
13547                Ok(Operation::new(op))
13548            };
13549
13550            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
13551        }
13552
13553        /// Sets the value of [parent][crate::model::CreateAssetRequest::parent].
13554        ///
13555        /// This is a **required** field for requests.
13556        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13557            self.0.request.parent = v.into();
13558            self
13559        }
13560
13561        /// Sets the value of [asset_id][crate::model::CreateAssetRequest::asset_id].
13562        ///
13563        /// This is a **required** field for requests.
13564        pub fn set_asset_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
13565            self.0.request.asset_id = v.into();
13566            self
13567        }
13568
13569        /// Sets the value of [asset][crate::model::CreateAssetRequest::asset].
13570        ///
13571        /// This is a **required** field for requests.
13572        pub fn set_asset<T>(mut self, v: T) -> Self
13573        where
13574            T: std::convert::Into<crate::model::Asset>,
13575        {
13576            self.0.request.asset = std::option::Option::Some(v.into());
13577            self
13578        }
13579
13580        /// Sets or clears the value of [asset][crate::model::CreateAssetRequest::asset].
13581        ///
13582        /// This is a **required** field for requests.
13583        pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
13584        where
13585            T: std::convert::Into<crate::model::Asset>,
13586        {
13587            self.0.request.asset = v.map(|x| x.into());
13588            self
13589        }
13590
13591        /// Sets the value of [validate_only][crate::model::CreateAssetRequest::validate_only].
13592        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
13593            self.0.request.validate_only = v.into();
13594            self
13595        }
13596    }
13597
13598    #[doc(hidden)]
13599    impl gax::options::internal::RequestBuilder for CreateAsset {
13600        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13601            &mut self.0.options
13602        }
13603    }
13604
13605    /// The request builder for [DataplexService::update_asset][crate::client::DataplexService::update_asset] calls.
13606    ///
13607    /// # Example
13608    /// ```no_run
13609    /// # use google_cloud_dataplex_v1::builder;
13610    /// use builder::dataplex_service::UpdateAsset;
13611    /// # tokio_test::block_on(async {
13612    /// use lro::Poller;
13613    ///
13614    /// let builder = prepare_request_builder();
13615    /// let response = builder.poller().until_done().await?;
13616    /// # gax::Result::<()>::Ok(()) });
13617    ///
13618    /// fn prepare_request_builder() -> UpdateAsset {
13619    ///   # panic!();
13620    ///   // ... details omitted ...
13621    /// }
13622    /// ```
13623    #[derive(Clone, Debug)]
13624    pub struct UpdateAsset(RequestBuilder<crate::model::UpdateAssetRequest>);
13625
13626    impl UpdateAsset {
13627        pub(crate) fn new(
13628            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
13629        ) -> Self {
13630            Self(RequestBuilder::new(stub))
13631        }
13632
13633        /// Sets the full request, replacing any prior values.
13634        pub fn with_request<V: Into<crate::model::UpdateAssetRequest>>(mut self, v: V) -> Self {
13635            self.0.request = v.into();
13636            self
13637        }
13638
13639        /// Sets all the options, replacing any prior values.
13640        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13641            self.0.options = v.into();
13642            self
13643        }
13644
13645        /// Sends the request.
13646        ///
13647        /// # Long running operations
13648        ///
13649        /// This starts, but does not poll, a longrunning operation. More information
13650        /// on [update_asset][crate::client::DataplexService::update_asset].
13651        pub async fn send(self) -> Result<longrunning::model::Operation> {
13652            (*self.0.stub)
13653                .update_asset(self.0.request, self.0.options)
13654                .await
13655                .map(gax::response::Response::into_body)
13656        }
13657
13658        /// Creates a [Poller][lro::Poller] to work with `update_asset`.
13659        pub fn poller(
13660            self,
13661        ) -> impl lro::Poller<crate::model::Asset, crate::model::OperationMetadata> {
13662            type Operation =
13663                lro::internal::Operation<crate::model::Asset, crate::model::OperationMetadata>;
13664            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
13665            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
13666
13667            let stub = self.0.stub.clone();
13668            let mut options = self.0.options.clone();
13669            options.set_retry_policy(gax::retry_policy::NeverRetry);
13670            let query = move |name| {
13671                let stub = stub.clone();
13672                let options = options.clone();
13673                async {
13674                    let op = GetOperation::new(stub)
13675                        .set_name(name)
13676                        .with_options(options)
13677                        .send()
13678                        .await?;
13679                    Ok(Operation::new(op))
13680                }
13681            };
13682
13683            let start = move || async {
13684                let op = self.send().await?;
13685                Ok(Operation::new(op))
13686            };
13687
13688            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
13689        }
13690
13691        /// Sets the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
13692        ///
13693        /// This is a **required** field for requests.
13694        pub fn set_update_mask<T>(mut self, v: T) -> Self
13695        where
13696            T: std::convert::Into<wkt::FieldMask>,
13697        {
13698            self.0.request.update_mask = std::option::Option::Some(v.into());
13699            self
13700        }
13701
13702        /// Sets or clears the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
13703        ///
13704        /// This is a **required** field for requests.
13705        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
13706        where
13707            T: std::convert::Into<wkt::FieldMask>,
13708        {
13709            self.0.request.update_mask = v.map(|x| x.into());
13710            self
13711        }
13712
13713        /// Sets the value of [asset][crate::model::UpdateAssetRequest::asset].
13714        ///
13715        /// This is a **required** field for requests.
13716        pub fn set_asset<T>(mut self, v: T) -> Self
13717        where
13718            T: std::convert::Into<crate::model::Asset>,
13719        {
13720            self.0.request.asset = std::option::Option::Some(v.into());
13721            self
13722        }
13723
13724        /// Sets or clears the value of [asset][crate::model::UpdateAssetRequest::asset].
13725        ///
13726        /// This is a **required** field for requests.
13727        pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
13728        where
13729            T: std::convert::Into<crate::model::Asset>,
13730        {
13731            self.0.request.asset = v.map(|x| x.into());
13732            self
13733        }
13734
13735        /// Sets the value of [validate_only][crate::model::UpdateAssetRequest::validate_only].
13736        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
13737            self.0.request.validate_only = v.into();
13738            self
13739        }
13740    }
13741
13742    #[doc(hidden)]
13743    impl gax::options::internal::RequestBuilder for UpdateAsset {
13744        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13745            &mut self.0.options
13746        }
13747    }
13748
13749    /// The request builder for [DataplexService::delete_asset][crate::client::DataplexService::delete_asset] calls.
13750    ///
13751    /// # Example
13752    /// ```no_run
13753    /// # use google_cloud_dataplex_v1::builder;
13754    /// use builder::dataplex_service::DeleteAsset;
13755    /// # tokio_test::block_on(async {
13756    /// use lro::Poller;
13757    ///
13758    /// let builder = prepare_request_builder();
13759    /// let response = builder.poller().until_done().await?;
13760    /// # gax::Result::<()>::Ok(()) });
13761    ///
13762    /// fn prepare_request_builder() -> DeleteAsset {
13763    ///   # panic!();
13764    ///   // ... details omitted ...
13765    /// }
13766    /// ```
13767    #[derive(Clone, Debug)]
13768    pub struct DeleteAsset(RequestBuilder<crate::model::DeleteAssetRequest>);
13769
13770    impl DeleteAsset {
13771        pub(crate) fn new(
13772            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
13773        ) -> Self {
13774            Self(RequestBuilder::new(stub))
13775        }
13776
13777        /// Sets the full request, replacing any prior values.
13778        pub fn with_request<V: Into<crate::model::DeleteAssetRequest>>(mut self, v: V) -> Self {
13779            self.0.request = v.into();
13780            self
13781        }
13782
13783        /// Sets all the options, replacing any prior values.
13784        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13785            self.0.options = v.into();
13786            self
13787        }
13788
13789        /// Sends the request.
13790        ///
13791        /// # Long running operations
13792        ///
13793        /// This starts, but does not poll, a longrunning operation. More information
13794        /// on [delete_asset][crate::client::DataplexService::delete_asset].
13795        pub async fn send(self) -> Result<longrunning::model::Operation> {
13796            (*self.0.stub)
13797                .delete_asset(self.0.request, self.0.options)
13798                .await
13799                .map(gax::response::Response::into_body)
13800        }
13801
13802        /// Creates a [Poller][lro::Poller] to work with `delete_asset`.
13803        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
13804            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
13805            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
13806            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
13807
13808            let stub = self.0.stub.clone();
13809            let mut options = self.0.options.clone();
13810            options.set_retry_policy(gax::retry_policy::NeverRetry);
13811            let query = move |name| {
13812                let stub = stub.clone();
13813                let options = options.clone();
13814                async {
13815                    let op = GetOperation::new(stub)
13816                        .set_name(name)
13817                        .with_options(options)
13818                        .send()
13819                        .await?;
13820                    Ok(Operation::new(op))
13821                }
13822            };
13823
13824            let start = move || async {
13825                let op = self.send().await?;
13826                Ok(Operation::new(op))
13827            };
13828
13829            lro::internal::new_unit_response_poller(
13830                polling_error_policy,
13831                polling_backoff_policy,
13832                start,
13833                query,
13834            )
13835        }
13836
13837        /// Sets the value of [name][crate::model::DeleteAssetRequest::name].
13838        ///
13839        /// This is a **required** field for requests.
13840        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13841            self.0.request.name = v.into();
13842            self
13843        }
13844    }
13845
13846    #[doc(hidden)]
13847    impl gax::options::internal::RequestBuilder for DeleteAsset {
13848        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13849            &mut self.0.options
13850        }
13851    }
13852
13853    /// The request builder for [DataplexService::list_assets][crate::client::DataplexService::list_assets] calls.
13854    ///
13855    /// # Example
13856    /// ```no_run
13857    /// # use google_cloud_dataplex_v1::builder;
13858    /// use builder::dataplex_service::ListAssets;
13859    /// # tokio_test::block_on(async {
13860    /// use gax::paginator::ItemPaginator;
13861    ///
13862    /// let builder = prepare_request_builder();
13863    /// let mut items = builder.by_item();
13864    /// while let Some(result) = items.next().await {
13865    ///   let item = result?;
13866    /// }
13867    /// # gax::Result::<()>::Ok(()) });
13868    ///
13869    /// fn prepare_request_builder() -> ListAssets {
13870    ///   # panic!();
13871    ///   // ... details omitted ...
13872    /// }
13873    /// ```
13874    #[derive(Clone, Debug)]
13875    pub struct ListAssets(RequestBuilder<crate::model::ListAssetsRequest>);
13876
13877    impl ListAssets {
13878        pub(crate) fn new(
13879            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
13880        ) -> Self {
13881            Self(RequestBuilder::new(stub))
13882        }
13883
13884        /// Sets the full request, replacing any prior values.
13885        pub fn with_request<V: Into<crate::model::ListAssetsRequest>>(mut self, v: V) -> Self {
13886            self.0.request = v.into();
13887            self
13888        }
13889
13890        /// Sets all the options, replacing any prior values.
13891        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13892            self.0.options = v.into();
13893            self
13894        }
13895
13896        /// Sends the request.
13897        pub async fn send(self) -> Result<crate::model::ListAssetsResponse> {
13898            (*self.0.stub)
13899                .list_assets(self.0.request, self.0.options)
13900                .await
13901                .map(gax::response::Response::into_body)
13902        }
13903
13904        /// Streams each page in the collection.
13905        pub fn by_page(
13906            self,
13907        ) -> impl gax::paginator::Paginator<crate::model::ListAssetsResponse, gax::error::Error>
13908        {
13909            use std::clone::Clone;
13910            let token = self.0.request.page_token.clone();
13911            let execute = move |token: String| {
13912                let mut builder = self.clone();
13913                builder.0.request = builder.0.request.set_page_token(token);
13914                builder.send()
13915            };
13916            gax::paginator::internal::new_paginator(token, execute)
13917        }
13918
13919        /// Streams each item in the collection.
13920        pub fn by_item(
13921            self,
13922        ) -> impl gax::paginator::ItemPaginator<crate::model::ListAssetsResponse, gax::error::Error>
13923        {
13924            use gax::paginator::Paginator;
13925            self.by_page().items()
13926        }
13927
13928        /// Sets the value of [parent][crate::model::ListAssetsRequest::parent].
13929        ///
13930        /// This is a **required** field for requests.
13931        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13932            self.0.request.parent = v.into();
13933            self
13934        }
13935
13936        /// Sets the value of [page_size][crate::model::ListAssetsRequest::page_size].
13937        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13938            self.0.request.page_size = v.into();
13939            self
13940        }
13941
13942        /// Sets the value of [page_token][crate::model::ListAssetsRequest::page_token].
13943        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13944            self.0.request.page_token = v.into();
13945            self
13946        }
13947
13948        /// Sets the value of [filter][crate::model::ListAssetsRequest::filter].
13949        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13950            self.0.request.filter = v.into();
13951            self
13952        }
13953
13954        /// Sets the value of [order_by][crate::model::ListAssetsRequest::order_by].
13955        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
13956            self.0.request.order_by = v.into();
13957            self
13958        }
13959    }
13960
13961    #[doc(hidden)]
13962    impl gax::options::internal::RequestBuilder for ListAssets {
13963        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13964            &mut self.0.options
13965        }
13966    }
13967
13968    /// The request builder for [DataplexService::get_asset][crate::client::DataplexService::get_asset] calls.
13969    ///
13970    /// # Example
13971    /// ```no_run
13972    /// # use google_cloud_dataplex_v1::builder;
13973    /// use builder::dataplex_service::GetAsset;
13974    /// # tokio_test::block_on(async {
13975    ///
13976    /// let builder = prepare_request_builder();
13977    /// let response = builder.send().await?;
13978    /// # gax::Result::<()>::Ok(()) });
13979    ///
13980    /// fn prepare_request_builder() -> GetAsset {
13981    ///   # panic!();
13982    ///   // ... details omitted ...
13983    /// }
13984    /// ```
13985    #[derive(Clone, Debug)]
13986    pub struct GetAsset(RequestBuilder<crate::model::GetAssetRequest>);
13987
13988    impl GetAsset {
13989        pub(crate) fn new(
13990            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
13991        ) -> Self {
13992            Self(RequestBuilder::new(stub))
13993        }
13994
13995        /// Sets the full request, replacing any prior values.
13996        pub fn with_request<V: Into<crate::model::GetAssetRequest>>(mut self, v: V) -> Self {
13997            self.0.request = v.into();
13998            self
13999        }
14000
14001        /// Sets all the options, replacing any prior values.
14002        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14003            self.0.options = v.into();
14004            self
14005        }
14006
14007        /// Sends the request.
14008        pub async fn send(self) -> Result<crate::model::Asset> {
14009            (*self.0.stub)
14010                .get_asset(self.0.request, self.0.options)
14011                .await
14012                .map(gax::response::Response::into_body)
14013        }
14014
14015        /// Sets the value of [name][crate::model::GetAssetRequest::name].
14016        ///
14017        /// This is a **required** field for requests.
14018        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14019            self.0.request.name = v.into();
14020            self
14021        }
14022    }
14023
14024    #[doc(hidden)]
14025    impl gax::options::internal::RequestBuilder for GetAsset {
14026        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14027            &mut self.0.options
14028        }
14029    }
14030
14031    /// The request builder for [DataplexService::list_asset_actions][crate::client::DataplexService::list_asset_actions] calls.
14032    ///
14033    /// # Example
14034    /// ```no_run
14035    /// # use google_cloud_dataplex_v1::builder;
14036    /// use builder::dataplex_service::ListAssetActions;
14037    /// # tokio_test::block_on(async {
14038    /// use gax::paginator::ItemPaginator;
14039    ///
14040    /// let builder = prepare_request_builder();
14041    /// let mut items = builder.by_item();
14042    /// while let Some(result) = items.next().await {
14043    ///   let item = result?;
14044    /// }
14045    /// # gax::Result::<()>::Ok(()) });
14046    ///
14047    /// fn prepare_request_builder() -> ListAssetActions {
14048    ///   # panic!();
14049    ///   // ... details omitted ...
14050    /// }
14051    /// ```
14052    #[derive(Clone, Debug)]
14053    pub struct ListAssetActions(RequestBuilder<crate::model::ListAssetActionsRequest>);
14054
14055    impl ListAssetActions {
14056        pub(crate) fn new(
14057            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14058        ) -> Self {
14059            Self(RequestBuilder::new(stub))
14060        }
14061
14062        /// Sets the full request, replacing any prior values.
14063        pub fn with_request<V: Into<crate::model::ListAssetActionsRequest>>(
14064            mut self,
14065            v: V,
14066        ) -> Self {
14067            self.0.request = v.into();
14068            self
14069        }
14070
14071        /// Sets all the options, replacing any prior values.
14072        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14073            self.0.options = v.into();
14074            self
14075        }
14076
14077        /// Sends the request.
14078        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
14079            (*self.0.stub)
14080                .list_asset_actions(self.0.request, self.0.options)
14081                .await
14082                .map(gax::response::Response::into_body)
14083        }
14084
14085        /// Streams each page in the collection.
14086        pub fn by_page(
14087            self,
14088        ) -> impl gax::paginator::Paginator<crate::model::ListActionsResponse, gax::error::Error>
14089        {
14090            use std::clone::Clone;
14091            let token = self.0.request.page_token.clone();
14092            let execute = move |token: String| {
14093                let mut builder = self.clone();
14094                builder.0.request = builder.0.request.set_page_token(token);
14095                builder.send()
14096            };
14097            gax::paginator::internal::new_paginator(token, execute)
14098        }
14099
14100        /// Streams each item in the collection.
14101        pub fn by_item(
14102            self,
14103        ) -> impl gax::paginator::ItemPaginator<crate::model::ListActionsResponse, gax::error::Error>
14104        {
14105            use gax::paginator::Paginator;
14106            self.by_page().items()
14107        }
14108
14109        /// Sets the value of [parent][crate::model::ListAssetActionsRequest::parent].
14110        ///
14111        /// This is a **required** field for requests.
14112        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14113            self.0.request.parent = v.into();
14114            self
14115        }
14116
14117        /// Sets the value of [page_size][crate::model::ListAssetActionsRequest::page_size].
14118        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
14119            self.0.request.page_size = v.into();
14120            self
14121        }
14122
14123        /// Sets the value of [page_token][crate::model::ListAssetActionsRequest::page_token].
14124        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
14125            self.0.request.page_token = v.into();
14126            self
14127        }
14128    }
14129
14130    #[doc(hidden)]
14131    impl gax::options::internal::RequestBuilder for ListAssetActions {
14132        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14133            &mut self.0.options
14134        }
14135    }
14136
14137    /// The request builder for [DataplexService::create_task][crate::client::DataplexService::create_task] calls.
14138    ///
14139    /// # Example
14140    /// ```no_run
14141    /// # use google_cloud_dataplex_v1::builder;
14142    /// use builder::dataplex_service::CreateTask;
14143    /// # tokio_test::block_on(async {
14144    /// use lro::Poller;
14145    ///
14146    /// let builder = prepare_request_builder();
14147    /// let response = builder.poller().until_done().await?;
14148    /// # gax::Result::<()>::Ok(()) });
14149    ///
14150    /// fn prepare_request_builder() -> CreateTask {
14151    ///   # panic!();
14152    ///   // ... details omitted ...
14153    /// }
14154    /// ```
14155    #[derive(Clone, Debug)]
14156    pub struct CreateTask(RequestBuilder<crate::model::CreateTaskRequest>);
14157
14158    impl CreateTask {
14159        pub(crate) fn new(
14160            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14161        ) -> Self {
14162            Self(RequestBuilder::new(stub))
14163        }
14164
14165        /// Sets the full request, replacing any prior values.
14166        pub fn with_request<V: Into<crate::model::CreateTaskRequest>>(mut self, v: V) -> Self {
14167            self.0.request = v.into();
14168            self
14169        }
14170
14171        /// Sets all the options, replacing any prior values.
14172        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14173            self.0.options = v.into();
14174            self
14175        }
14176
14177        /// Sends the request.
14178        ///
14179        /// # Long running operations
14180        ///
14181        /// This starts, but does not poll, a longrunning operation. More information
14182        /// on [create_task][crate::client::DataplexService::create_task].
14183        pub async fn send(self) -> Result<longrunning::model::Operation> {
14184            (*self.0.stub)
14185                .create_task(self.0.request, self.0.options)
14186                .await
14187                .map(gax::response::Response::into_body)
14188        }
14189
14190        /// Creates a [Poller][lro::Poller] to work with `create_task`.
14191        pub fn poller(
14192            self,
14193        ) -> impl lro::Poller<crate::model::Task, crate::model::OperationMetadata> {
14194            type Operation =
14195                lro::internal::Operation<crate::model::Task, crate::model::OperationMetadata>;
14196            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14197            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14198
14199            let stub = self.0.stub.clone();
14200            let mut options = self.0.options.clone();
14201            options.set_retry_policy(gax::retry_policy::NeverRetry);
14202            let query = move |name| {
14203                let stub = stub.clone();
14204                let options = options.clone();
14205                async {
14206                    let op = GetOperation::new(stub)
14207                        .set_name(name)
14208                        .with_options(options)
14209                        .send()
14210                        .await?;
14211                    Ok(Operation::new(op))
14212                }
14213            };
14214
14215            let start = move || async {
14216                let op = self.send().await?;
14217                Ok(Operation::new(op))
14218            };
14219
14220            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
14221        }
14222
14223        /// Sets the value of [parent][crate::model::CreateTaskRequest::parent].
14224        ///
14225        /// This is a **required** field for requests.
14226        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14227            self.0.request.parent = v.into();
14228            self
14229        }
14230
14231        /// Sets the value of [task_id][crate::model::CreateTaskRequest::task_id].
14232        ///
14233        /// This is a **required** field for requests.
14234        pub fn set_task_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
14235            self.0.request.task_id = v.into();
14236            self
14237        }
14238
14239        /// Sets the value of [task][crate::model::CreateTaskRequest::task].
14240        ///
14241        /// This is a **required** field for requests.
14242        pub fn set_task<T>(mut self, v: T) -> Self
14243        where
14244            T: std::convert::Into<crate::model::Task>,
14245        {
14246            self.0.request.task = std::option::Option::Some(v.into());
14247            self
14248        }
14249
14250        /// Sets or clears the value of [task][crate::model::CreateTaskRequest::task].
14251        ///
14252        /// This is a **required** field for requests.
14253        pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
14254        where
14255            T: std::convert::Into<crate::model::Task>,
14256        {
14257            self.0.request.task = v.map(|x| x.into());
14258            self
14259        }
14260
14261        /// Sets the value of [validate_only][crate::model::CreateTaskRequest::validate_only].
14262        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
14263            self.0.request.validate_only = v.into();
14264            self
14265        }
14266    }
14267
14268    #[doc(hidden)]
14269    impl gax::options::internal::RequestBuilder for CreateTask {
14270        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14271            &mut self.0.options
14272        }
14273    }
14274
14275    /// The request builder for [DataplexService::update_task][crate::client::DataplexService::update_task] calls.
14276    ///
14277    /// # Example
14278    /// ```no_run
14279    /// # use google_cloud_dataplex_v1::builder;
14280    /// use builder::dataplex_service::UpdateTask;
14281    /// # tokio_test::block_on(async {
14282    /// use lro::Poller;
14283    ///
14284    /// let builder = prepare_request_builder();
14285    /// let response = builder.poller().until_done().await?;
14286    /// # gax::Result::<()>::Ok(()) });
14287    ///
14288    /// fn prepare_request_builder() -> UpdateTask {
14289    ///   # panic!();
14290    ///   // ... details omitted ...
14291    /// }
14292    /// ```
14293    #[derive(Clone, Debug)]
14294    pub struct UpdateTask(RequestBuilder<crate::model::UpdateTaskRequest>);
14295
14296    impl UpdateTask {
14297        pub(crate) fn new(
14298            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14299        ) -> Self {
14300            Self(RequestBuilder::new(stub))
14301        }
14302
14303        /// Sets the full request, replacing any prior values.
14304        pub fn with_request<V: Into<crate::model::UpdateTaskRequest>>(mut self, v: V) -> Self {
14305            self.0.request = v.into();
14306            self
14307        }
14308
14309        /// Sets all the options, replacing any prior values.
14310        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14311            self.0.options = v.into();
14312            self
14313        }
14314
14315        /// Sends the request.
14316        ///
14317        /// # Long running operations
14318        ///
14319        /// This starts, but does not poll, a longrunning operation. More information
14320        /// on [update_task][crate::client::DataplexService::update_task].
14321        pub async fn send(self) -> Result<longrunning::model::Operation> {
14322            (*self.0.stub)
14323                .update_task(self.0.request, self.0.options)
14324                .await
14325                .map(gax::response::Response::into_body)
14326        }
14327
14328        /// Creates a [Poller][lro::Poller] to work with `update_task`.
14329        pub fn poller(
14330            self,
14331        ) -> impl lro::Poller<crate::model::Task, crate::model::OperationMetadata> {
14332            type Operation =
14333                lro::internal::Operation<crate::model::Task, crate::model::OperationMetadata>;
14334            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14335            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14336
14337            let stub = self.0.stub.clone();
14338            let mut options = self.0.options.clone();
14339            options.set_retry_policy(gax::retry_policy::NeverRetry);
14340            let query = move |name| {
14341                let stub = stub.clone();
14342                let options = options.clone();
14343                async {
14344                    let op = GetOperation::new(stub)
14345                        .set_name(name)
14346                        .with_options(options)
14347                        .send()
14348                        .await?;
14349                    Ok(Operation::new(op))
14350                }
14351            };
14352
14353            let start = move || async {
14354                let op = self.send().await?;
14355                Ok(Operation::new(op))
14356            };
14357
14358            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
14359        }
14360
14361        /// Sets the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
14362        ///
14363        /// This is a **required** field for requests.
14364        pub fn set_update_mask<T>(mut self, v: T) -> Self
14365        where
14366            T: std::convert::Into<wkt::FieldMask>,
14367        {
14368            self.0.request.update_mask = std::option::Option::Some(v.into());
14369            self
14370        }
14371
14372        /// Sets or clears the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
14373        ///
14374        /// This is a **required** field for requests.
14375        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
14376        where
14377            T: std::convert::Into<wkt::FieldMask>,
14378        {
14379            self.0.request.update_mask = v.map(|x| x.into());
14380            self
14381        }
14382
14383        /// Sets the value of [task][crate::model::UpdateTaskRequest::task].
14384        ///
14385        /// This is a **required** field for requests.
14386        pub fn set_task<T>(mut self, v: T) -> Self
14387        where
14388            T: std::convert::Into<crate::model::Task>,
14389        {
14390            self.0.request.task = std::option::Option::Some(v.into());
14391            self
14392        }
14393
14394        /// Sets or clears the value of [task][crate::model::UpdateTaskRequest::task].
14395        ///
14396        /// This is a **required** field for requests.
14397        pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
14398        where
14399            T: std::convert::Into<crate::model::Task>,
14400        {
14401            self.0.request.task = v.map(|x| x.into());
14402            self
14403        }
14404
14405        /// Sets the value of [validate_only][crate::model::UpdateTaskRequest::validate_only].
14406        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
14407            self.0.request.validate_only = v.into();
14408            self
14409        }
14410    }
14411
14412    #[doc(hidden)]
14413    impl gax::options::internal::RequestBuilder for UpdateTask {
14414        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14415            &mut self.0.options
14416        }
14417    }
14418
14419    /// The request builder for [DataplexService::delete_task][crate::client::DataplexService::delete_task] calls.
14420    ///
14421    /// # Example
14422    /// ```no_run
14423    /// # use google_cloud_dataplex_v1::builder;
14424    /// use builder::dataplex_service::DeleteTask;
14425    /// # tokio_test::block_on(async {
14426    /// use lro::Poller;
14427    ///
14428    /// let builder = prepare_request_builder();
14429    /// let response = builder.poller().until_done().await?;
14430    /// # gax::Result::<()>::Ok(()) });
14431    ///
14432    /// fn prepare_request_builder() -> DeleteTask {
14433    ///   # panic!();
14434    ///   // ... details omitted ...
14435    /// }
14436    /// ```
14437    #[derive(Clone, Debug)]
14438    pub struct DeleteTask(RequestBuilder<crate::model::DeleteTaskRequest>);
14439
14440    impl DeleteTask {
14441        pub(crate) fn new(
14442            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14443        ) -> Self {
14444            Self(RequestBuilder::new(stub))
14445        }
14446
14447        /// Sets the full request, replacing any prior values.
14448        pub fn with_request<V: Into<crate::model::DeleteTaskRequest>>(mut self, v: V) -> Self {
14449            self.0.request = v.into();
14450            self
14451        }
14452
14453        /// Sets all the options, replacing any prior values.
14454        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14455            self.0.options = v.into();
14456            self
14457        }
14458
14459        /// Sends the request.
14460        ///
14461        /// # Long running operations
14462        ///
14463        /// This starts, but does not poll, a longrunning operation. More information
14464        /// on [delete_task][crate::client::DataplexService::delete_task].
14465        pub async fn send(self) -> Result<longrunning::model::Operation> {
14466            (*self.0.stub)
14467                .delete_task(self.0.request, self.0.options)
14468                .await
14469                .map(gax::response::Response::into_body)
14470        }
14471
14472        /// Creates a [Poller][lro::Poller] to work with `delete_task`.
14473        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
14474            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
14475            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14476            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14477
14478            let stub = self.0.stub.clone();
14479            let mut options = self.0.options.clone();
14480            options.set_retry_policy(gax::retry_policy::NeverRetry);
14481            let query = move |name| {
14482                let stub = stub.clone();
14483                let options = options.clone();
14484                async {
14485                    let op = GetOperation::new(stub)
14486                        .set_name(name)
14487                        .with_options(options)
14488                        .send()
14489                        .await?;
14490                    Ok(Operation::new(op))
14491                }
14492            };
14493
14494            let start = move || async {
14495                let op = self.send().await?;
14496                Ok(Operation::new(op))
14497            };
14498
14499            lro::internal::new_unit_response_poller(
14500                polling_error_policy,
14501                polling_backoff_policy,
14502                start,
14503                query,
14504            )
14505        }
14506
14507        /// Sets the value of [name][crate::model::DeleteTaskRequest::name].
14508        ///
14509        /// This is a **required** field for requests.
14510        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14511            self.0.request.name = v.into();
14512            self
14513        }
14514    }
14515
14516    #[doc(hidden)]
14517    impl gax::options::internal::RequestBuilder for DeleteTask {
14518        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14519            &mut self.0.options
14520        }
14521    }
14522
14523    /// The request builder for [DataplexService::list_tasks][crate::client::DataplexService::list_tasks] calls.
14524    ///
14525    /// # Example
14526    /// ```no_run
14527    /// # use google_cloud_dataplex_v1::builder;
14528    /// use builder::dataplex_service::ListTasks;
14529    /// # tokio_test::block_on(async {
14530    /// use gax::paginator::ItemPaginator;
14531    ///
14532    /// let builder = prepare_request_builder();
14533    /// let mut items = builder.by_item();
14534    /// while let Some(result) = items.next().await {
14535    ///   let item = result?;
14536    /// }
14537    /// # gax::Result::<()>::Ok(()) });
14538    ///
14539    /// fn prepare_request_builder() -> ListTasks {
14540    ///   # panic!();
14541    ///   // ... details omitted ...
14542    /// }
14543    /// ```
14544    #[derive(Clone, Debug)]
14545    pub struct ListTasks(RequestBuilder<crate::model::ListTasksRequest>);
14546
14547    impl ListTasks {
14548        pub(crate) fn new(
14549            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14550        ) -> Self {
14551            Self(RequestBuilder::new(stub))
14552        }
14553
14554        /// Sets the full request, replacing any prior values.
14555        pub fn with_request<V: Into<crate::model::ListTasksRequest>>(mut self, v: V) -> Self {
14556            self.0.request = v.into();
14557            self
14558        }
14559
14560        /// Sets all the options, replacing any prior values.
14561        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14562            self.0.options = v.into();
14563            self
14564        }
14565
14566        /// Sends the request.
14567        pub async fn send(self) -> Result<crate::model::ListTasksResponse> {
14568            (*self.0.stub)
14569                .list_tasks(self.0.request, self.0.options)
14570                .await
14571                .map(gax::response::Response::into_body)
14572        }
14573
14574        /// Streams each page in the collection.
14575        pub fn by_page(
14576            self,
14577        ) -> impl gax::paginator::Paginator<crate::model::ListTasksResponse, gax::error::Error>
14578        {
14579            use std::clone::Clone;
14580            let token = self.0.request.page_token.clone();
14581            let execute = move |token: String| {
14582                let mut builder = self.clone();
14583                builder.0.request = builder.0.request.set_page_token(token);
14584                builder.send()
14585            };
14586            gax::paginator::internal::new_paginator(token, execute)
14587        }
14588
14589        /// Streams each item in the collection.
14590        pub fn by_item(
14591            self,
14592        ) -> impl gax::paginator::ItemPaginator<crate::model::ListTasksResponse, gax::error::Error>
14593        {
14594            use gax::paginator::Paginator;
14595            self.by_page().items()
14596        }
14597
14598        /// Sets the value of [parent][crate::model::ListTasksRequest::parent].
14599        ///
14600        /// This is a **required** field for requests.
14601        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14602            self.0.request.parent = v.into();
14603            self
14604        }
14605
14606        /// Sets the value of [page_size][crate::model::ListTasksRequest::page_size].
14607        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
14608            self.0.request.page_size = v.into();
14609            self
14610        }
14611
14612        /// Sets the value of [page_token][crate::model::ListTasksRequest::page_token].
14613        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
14614            self.0.request.page_token = v.into();
14615            self
14616        }
14617
14618        /// Sets the value of [filter][crate::model::ListTasksRequest::filter].
14619        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
14620            self.0.request.filter = v.into();
14621            self
14622        }
14623
14624        /// Sets the value of [order_by][crate::model::ListTasksRequest::order_by].
14625        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
14626            self.0.request.order_by = v.into();
14627            self
14628        }
14629    }
14630
14631    #[doc(hidden)]
14632    impl gax::options::internal::RequestBuilder for ListTasks {
14633        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14634            &mut self.0.options
14635        }
14636    }
14637
14638    /// The request builder for [DataplexService::get_task][crate::client::DataplexService::get_task] calls.
14639    ///
14640    /// # Example
14641    /// ```no_run
14642    /// # use google_cloud_dataplex_v1::builder;
14643    /// use builder::dataplex_service::GetTask;
14644    /// # tokio_test::block_on(async {
14645    ///
14646    /// let builder = prepare_request_builder();
14647    /// let response = builder.send().await?;
14648    /// # gax::Result::<()>::Ok(()) });
14649    ///
14650    /// fn prepare_request_builder() -> GetTask {
14651    ///   # panic!();
14652    ///   // ... details omitted ...
14653    /// }
14654    /// ```
14655    #[derive(Clone, Debug)]
14656    pub struct GetTask(RequestBuilder<crate::model::GetTaskRequest>);
14657
14658    impl GetTask {
14659        pub(crate) fn new(
14660            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14661        ) -> Self {
14662            Self(RequestBuilder::new(stub))
14663        }
14664
14665        /// Sets the full request, replacing any prior values.
14666        pub fn with_request<V: Into<crate::model::GetTaskRequest>>(mut self, v: V) -> Self {
14667            self.0.request = v.into();
14668            self
14669        }
14670
14671        /// Sets all the options, replacing any prior values.
14672        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14673            self.0.options = v.into();
14674            self
14675        }
14676
14677        /// Sends the request.
14678        pub async fn send(self) -> Result<crate::model::Task> {
14679            (*self.0.stub)
14680                .get_task(self.0.request, self.0.options)
14681                .await
14682                .map(gax::response::Response::into_body)
14683        }
14684
14685        /// Sets the value of [name][crate::model::GetTaskRequest::name].
14686        ///
14687        /// This is a **required** field for requests.
14688        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14689            self.0.request.name = v.into();
14690            self
14691        }
14692    }
14693
14694    #[doc(hidden)]
14695    impl gax::options::internal::RequestBuilder for GetTask {
14696        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14697            &mut self.0.options
14698        }
14699    }
14700
14701    /// The request builder for [DataplexService::list_jobs][crate::client::DataplexService::list_jobs] calls.
14702    ///
14703    /// # Example
14704    /// ```no_run
14705    /// # use google_cloud_dataplex_v1::builder;
14706    /// use builder::dataplex_service::ListJobs;
14707    /// # tokio_test::block_on(async {
14708    /// use gax::paginator::ItemPaginator;
14709    ///
14710    /// let builder = prepare_request_builder();
14711    /// let mut items = builder.by_item();
14712    /// while let Some(result) = items.next().await {
14713    ///   let item = result?;
14714    /// }
14715    /// # gax::Result::<()>::Ok(()) });
14716    ///
14717    /// fn prepare_request_builder() -> ListJobs {
14718    ///   # panic!();
14719    ///   // ... details omitted ...
14720    /// }
14721    /// ```
14722    #[derive(Clone, Debug)]
14723    pub struct ListJobs(RequestBuilder<crate::model::ListJobsRequest>);
14724
14725    impl ListJobs {
14726        pub(crate) fn new(
14727            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14728        ) -> Self {
14729            Self(RequestBuilder::new(stub))
14730        }
14731
14732        /// Sets the full request, replacing any prior values.
14733        pub fn with_request<V: Into<crate::model::ListJobsRequest>>(mut self, v: V) -> Self {
14734            self.0.request = v.into();
14735            self
14736        }
14737
14738        /// Sets all the options, replacing any prior values.
14739        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14740            self.0.options = v.into();
14741            self
14742        }
14743
14744        /// Sends the request.
14745        pub async fn send(self) -> Result<crate::model::ListJobsResponse> {
14746            (*self.0.stub)
14747                .list_jobs(self.0.request, self.0.options)
14748                .await
14749                .map(gax::response::Response::into_body)
14750        }
14751
14752        /// Streams each page in the collection.
14753        pub fn by_page(
14754            self,
14755        ) -> impl gax::paginator::Paginator<crate::model::ListJobsResponse, gax::error::Error>
14756        {
14757            use std::clone::Clone;
14758            let token = self.0.request.page_token.clone();
14759            let execute = move |token: String| {
14760                let mut builder = self.clone();
14761                builder.0.request = builder.0.request.set_page_token(token);
14762                builder.send()
14763            };
14764            gax::paginator::internal::new_paginator(token, execute)
14765        }
14766
14767        /// Streams each item in the collection.
14768        pub fn by_item(
14769            self,
14770        ) -> impl gax::paginator::ItemPaginator<crate::model::ListJobsResponse, gax::error::Error>
14771        {
14772            use gax::paginator::Paginator;
14773            self.by_page().items()
14774        }
14775
14776        /// Sets the value of [parent][crate::model::ListJobsRequest::parent].
14777        ///
14778        /// This is a **required** field for requests.
14779        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14780            self.0.request.parent = v.into();
14781            self
14782        }
14783
14784        /// Sets the value of [page_size][crate::model::ListJobsRequest::page_size].
14785        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
14786            self.0.request.page_size = v.into();
14787            self
14788        }
14789
14790        /// Sets the value of [page_token][crate::model::ListJobsRequest::page_token].
14791        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
14792            self.0.request.page_token = v.into();
14793            self
14794        }
14795    }
14796
14797    #[doc(hidden)]
14798    impl gax::options::internal::RequestBuilder for ListJobs {
14799        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14800            &mut self.0.options
14801        }
14802    }
14803
14804    /// The request builder for [DataplexService::run_task][crate::client::DataplexService::run_task] calls.
14805    ///
14806    /// # Example
14807    /// ```no_run
14808    /// # use google_cloud_dataplex_v1::builder;
14809    /// use builder::dataplex_service::RunTask;
14810    /// # tokio_test::block_on(async {
14811    ///
14812    /// let builder = prepare_request_builder();
14813    /// let response = builder.send().await?;
14814    /// # gax::Result::<()>::Ok(()) });
14815    ///
14816    /// fn prepare_request_builder() -> RunTask {
14817    ///   # panic!();
14818    ///   // ... details omitted ...
14819    /// }
14820    /// ```
14821    #[derive(Clone, Debug)]
14822    pub struct RunTask(RequestBuilder<crate::model::RunTaskRequest>);
14823
14824    impl RunTask {
14825        pub(crate) fn new(
14826            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14827        ) -> Self {
14828            Self(RequestBuilder::new(stub))
14829        }
14830
14831        /// Sets the full request, replacing any prior values.
14832        pub fn with_request<V: Into<crate::model::RunTaskRequest>>(mut self, v: V) -> Self {
14833            self.0.request = v.into();
14834            self
14835        }
14836
14837        /// Sets all the options, replacing any prior values.
14838        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14839            self.0.options = v.into();
14840            self
14841        }
14842
14843        /// Sends the request.
14844        pub async fn send(self) -> Result<crate::model::RunTaskResponse> {
14845            (*self.0.stub)
14846                .run_task(self.0.request, self.0.options)
14847                .await
14848                .map(gax::response::Response::into_body)
14849        }
14850
14851        /// Sets the value of [name][crate::model::RunTaskRequest::name].
14852        ///
14853        /// This is a **required** field for requests.
14854        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14855            self.0.request.name = v.into();
14856            self
14857        }
14858
14859        /// Sets the value of [labels][crate::model::RunTaskRequest::labels].
14860        pub fn set_labels<T, K, V>(mut self, v: T) -> Self
14861        where
14862            T: std::iter::IntoIterator<Item = (K, V)>,
14863            K: std::convert::Into<std::string::String>,
14864            V: std::convert::Into<std::string::String>,
14865        {
14866            self.0.request.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
14867            self
14868        }
14869
14870        /// Sets the value of [args][crate::model::RunTaskRequest::args].
14871        pub fn set_args<T, K, V>(mut self, v: T) -> Self
14872        where
14873            T: std::iter::IntoIterator<Item = (K, V)>,
14874            K: std::convert::Into<std::string::String>,
14875            V: std::convert::Into<std::string::String>,
14876        {
14877            self.0.request.args = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
14878            self
14879        }
14880    }
14881
14882    #[doc(hidden)]
14883    impl gax::options::internal::RequestBuilder for RunTask {
14884        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14885            &mut self.0.options
14886        }
14887    }
14888
14889    /// The request builder for [DataplexService::get_job][crate::client::DataplexService::get_job] calls.
14890    ///
14891    /// # Example
14892    /// ```no_run
14893    /// # use google_cloud_dataplex_v1::builder;
14894    /// use builder::dataplex_service::GetJob;
14895    /// # tokio_test::block_on(async {
14896    ///
14897    /// let builder = prepare_request_builder();
14898    /// let response = builder.send().await?;
14899    /// # gax::Result::<()>::Ok(()) });
14900    ///
14901    /// fn prepare_request_builder() -> GetJob {
14902    ///   # panic!();
14903    ///   // ... details omitted ...
14904    /// }
14905    /// ```
14906    #[derive(Clone, Debug)]
14907    pub struct GetJob(RequestBuilder<crate::model::GetJobRequest>);
14908
14909    impl GetJob {
14910        pub(crate) fn new(
14911            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14912        ) -> Self {
14913            Self(RequestBuilder::new(stub))
14914        }
14915
14916        /// Sets the full request, replacing any prior values.
14917        pub fn with_request<V: Into<crate::model::GetJobRequest>>(mut self, v: V) -> Self {
14918            self.0.request = v.into();
14919            self
14920        }
14921
14922        /// Sets all the options, replacing any prior values.
14923        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14924            self.0.options = v.into();
14925            self
14926        }
14927
14928        /// Sends the request.
14929        pub async fn send(self) -> Result<crate::model::Job> {
14930            (*self.0.stub)
14931                .get_job(self.0.request, self.0.options)
14932                .await
14933                .map(gax::response::Response::into_body)
14934        }
14935
14936        /// Sets the value of [name][crate::model::GetJobRequest::name].
14937        ///
14938        /// This is a **required** field for requests.
14939        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14940            self.0.request.name = v.into();
14941            self
14942        }
14943    }
14944
14945    #[doc(hidden)]
14946    impl gax::options::internal::RequestBuilder for GetJob {
14947        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14948            &mut self.0.options
14949        }
14950    }
14951
14952    /// The request builder for [DataplexService::cancel_job][crate::client::DataplexService::cancel_job] calls.
14953    ///
14954    /// # Example
14955    /// ```no_run
14956    /// # use google_cloud_dataplex_v1::builder;
14957    /// use builder::dataplex_service::CancelJob;
14958    /// # tokio_test::block_on(async {
14959    ///
14960    /// let builder = prepare_request_builder();
14961    /// let response = builder.send().await?;
14962    /// # gax::Result::<()>::Ok(()) });
14963    ///
14964    /// fn prepare_request_builder() -> CancelJob {
14965    ///   # panic!();
14966    ///   // ... details omitted ...
14967    /// }
14968    /// ```
14969    #[derive(Clone, Debug)]
14970    pub struct CancelJob(RequestBuilder<crate::model::CancelJobRequest>);
14971
14972    impl CancelJob {
14973        pub(crate) fn new(
14974            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14975        ) -> Self {
14976            Self(RequestBuilder::new(stub))
14977        }
14978
14979        /// Sets the full request, replacing any prior values.
14980        pub fn with_request<V: Into<crate::model::CancelJobRequest>>(mut self, v: V) -> Self {
14981            self.0.request = v.into();
14982            self
14983        }
14984
14985        /// Sets all the options, replacing any prior values.
14986        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14987            self.0.options = v.into();
14988            self
14989        }
14990
14991        /// Sends the request.
14992        pub async fn send(self) -> Result<()> {
14993            (*self.0.stub)
14994                .cancel_job(self.0.request, self.0.options)
14995                .await
14996                .map(gax::response::Response::into_body)
14997        }
14998
14999        /// Sets the value of [name][crate::model::CancelJobRequest::name].
15000        ///
15001        /// This is a **required** field for requests.
15002        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15003            self.0.request.name = v.into();
15004            self
15005        }
15006    }
15007
15008    #[doc(hidden)]
15009    impl gax::options::internal::RequestBuilder for CancelJob {
15010        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15011            &mut self.0.options
15012        }
15013    }
15014
15015    /// The request builder for [DataplexService::create_environment][crate::client::DataplexService::create_environment] calls.
15016    ///
15017    /// # Example
15018    /// ```no_run
15019    /// # use google_cloud_dataplex_v1::builder;
15020    /// use builder::dataplex_service::CreateEnvironment;
15021    /// # tokio_test::block_on(async {
15022    /// use lro::Poller;
15023    ///
15024    /// let builder = prepare_request_builder();
15025    /// let response = builder.poller().until_done().await?;
15026    /// # gax::Result::<()>::Ok(()) });
15027    ///
15028    /// fn prepare_request_builder() -> CreateEnvironment {
15029    ///   # panic!();
15030    ///   // ... details omitted ...
15031    /// }
15032    /// ```
15033    #[derive(Clone, Debug)]
15034    pub struct CreateEnvironment(RequestBuilder<crate::model::CreateEnvironmentRequest>);
15035
15036    impl CreateEnvironment {
15037        pub(crate) fn new(
15038            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15039        ) -> Self {
15040            Self(RequestBuilder::new(stub))
15041        }
15042
15043        /// Sets the full request, replacing any prior values.
15044        pub fn with_request<V: Into<crate::model::CreateEnvironmentRequest>>(
15045            mut self,
15046            v: V,
15047        ) -> Self {
15048            self.0.request = v.into();
15049            self
15050        }
15051
15052        /// Sets all the options, replacing any prior values.
15053        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15054            self.0.options = v.into();
15055            self
15056        }
15057
15058        /// Sends the request.
15059        ///
15060        /// # Long running operations
15061        ///
15062        /// This starts, but does not poll, a longrunning operation. More information
15063        /// on [create_environment][crate::client::DataplexService::create_environment].
15064        pub async fn send(self) -> Result<longrunning::model::Operation> {
15065            (*self.0.stub)
15066                .create_environment(self.0.request, self.0.options)
15067                .await
15068                .map(gax::response::Response::into_body)
15069        }
15070
15071        /// Creates a [Poller][lro::Poller] to work with `create_environment`.
15072        pub fn poller(
15073            self,
15074        ) -> impl lro::Poller<crate::model::Environment, crate::model::OperationMetadata> {
15075            type Operation = lro::internal::Operation<
15076                crate::model::Environment,
15077                crate::model::OperationMetadata,
15078            >;
15079            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
15080            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
15081
15082            let stub = self.0.stub.clone();
15083            let mut options = self.0.options.clone();
15084            options.set_retry_policy(gax::retry_policy::NeverRetry);
15085            let query = move |name| {
15086                let stub = stub.clone();
15087                let options = options.clone();
15088                async {
15089                    let op = GetOperation::new(stub)
15090                        .set_name(name)
15091                        .with_options(options)
15092                        .send()
15093                        .await?;
15094                    Ok(Operation::new(op))
15095                }
15096            };
15097
15098            let start = move || async {
15099                let op = self.send().await?;
15100                Ok(Operation::new(op))
15101            };
15102
15103            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
15104        }
15105
15106        /// Sets the value of [parent][crate::model::CreateEnvironmentRequest::parent].
15107        ///
15108        /// This is a **required** field for requests.
15109        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15110            self.0.request.parent = v.into();
15111            self
15112        }
15113
15114        /// Sets the value of [environment_id][crate::model::CreateEnvironmentRequest::environment_id].
15115        ///
15116        /// This is a **required** field for requests.
15117        pub fn set_environment_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
15118            self.0.request.environment_id = v.into();
15119            self
15120        }
15121
15122        /// Sets the value of [environment][crate::model::CreateEnvironmentRequest::environment].
15123        ///
15124        /// This is a **required** field for requests.
15125        pub fn set_environment<T>(mut self, v: T) -> Self
15126        where
15127            T: std::convert::Into<crate::model::Environment>,
15128        {
15129            self.0.request.environment = std::option::Option::Some(v.into());
15130            self
15131        }
15132
15133        /// Sets or clears the value of [environment][crate::model::CreateEnvironmentRequest::environment].
15134        ///
15135        /// This is a **required** field for requests.
15136        pub fn set_or_clear_environment<T>(mut self, v: std::option::Option<T>) -> Self
15137        where
15138            T: std::convert::Into<crate::model::Environment>,
15139        {
15140            self.0.request.environment = v.map(|x| x.into());
15141            self
15142        }
15143
15144        /// Sets the value of [validate_only][crate::model::CreateEnvironmentRequest::validate_only].
15145        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
15146            self.0.request.validate_only = v.into();
15147            self
15148        }
15149    }
15150
15151    #[doc(hidden)]
15152    impl gax::options::internal::RequestBuilder for CreateEnvironment {
15153        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15154            &mut self.0.options
15155        }
15156    }
15157
15158    /// The request builder for [DataplexService::update_environment][crate::client::DataplexService::update_environment] calls.
15159    ///
15160    /// # Example
15161    /// ```no_run
15162    /// # use google_cloud_dataplex_v1::builder;
15163    /// use builder::dataplex_service::UpdateEnvironment;
15164    /// # tokio_test::block_on(async {
15165    /// use lro::Poller;
15166    ///
15167    /// let builder = prepare_request_builder();
15168    /// let response = builder.poller().until_done().await?;
15169    /// # gax::Result::<()>::Ok(()) });
15170    ///
15171    /// fn prepare_request_builder() -> UpdateEnvironment {
15172    ///   # panic!();
15173    ///   // ... details omitted ...
15174    /// }
15175    /// ```
15176    #[derive(Clone, Debug)]
15177    pub struct UpdateEnvironment(RequestBuilder<crate::model::UpdateEnvironmentRequest>);
15178
15179    impl UpdateEnvironment {
15180        pub(crate) fn new(
15181            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15182        ) -> Self {
15183            Self(RequestBuilder::new(stub))
15184        }
15185
15186        /// Sets the full request, replacing any prior values.
15187        pub fn with_request<V: Into<crate::model::UpdateEnvironmentRequest>>(
15188            mut self,
15189            v: V,
15190        ) -> Self {
15191            self.0.request = v.into();
15192            self
15193        }
15194
15195        /// Sets all the options, replacing any prior values.
15196        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15197            self.0.options = v.into();
15198            self
15199        }
15200
15201        /// Sends the request.
15202        ///
15203        /// # Long running operations
15204        ///
15205        /// This starts, but does not poll, a longrunning operation. More information
15206        /// on [update_environment][crate::client::DataplexService::update_environment].
15207        pub async fn send(self) -> Result<longrunning::model::Operation> {
15208            (*self.0.stub)
15209                .update_environment(self.0.request, self.0.options)
15210                .await
15211                .map(gax::response::Response::into_body)
15212        }
15213
15214        /// Creates a [Poller][lro::Poller] to work with `update_environment`.
15215        pub fn poller(
15216            self,
15217        ) -> impl lro::Poller<crate::model::Environment, crate::model::OperationMetadata> {
15218            type Operation = lro::internal::Operation<
15219                crate::model::Environment,
15220                crate::model::OperationMetadata,
15221            >;
15222            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
15223            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
15224
15225            let stub = self.0.stub.clone();
15226            let mut options = self.0.options.clone();
15227            options.set_retry_policy(gax::retry_policy::NeverRetry);
15228            let query = move |name| {
15229                let stub = stub.clone();
15230                let options = options.clone();
15231                async {
15232                    let op = GetOperation::new(stub)
15233                        .set_name(name)
15234                        .with_options(options)
15235                        .send()
15236                        .await?;
15237                    Ok(Operation::new(op))
15238                }
15239            };
15240
15241            let start = move || async {
15242                let op = self.send().await?;
15243                Ok(Operation::new(op))
15244            };
15245
15246            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
15247        }
15248
15249        /// Sets the value of [update_mask][crate::model::UpdateEnvironmentRequest::update_mask].
15250        ///
15251        /// This is a **required** field for requests.
15252        pub fn set_update_mask<T>(mut self, v: T) -> Self
15253        where
15254            T: std::convert::Into<wkt::FieldMask>,
15255        {
15256            self.0.request.update_mask = std::option::Option::Some(v.into());
15257            self
15258        }
15259
15260        /// Sets or clears the value of [update_mask][crate::model::UpdateEnvironmentRequest::update_mask].
15261        ///
15262        /// This is a **required** field for requests.
15263        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15264        where
15265            T: std::convert::Into<wkt::FieldMask>,
15266        {
15267            self.0.request.update_mask = v.map(|x| x.into());
15268            self
15269        }
15270
15271        /// Sets the value of [environment][crate::model::UpdateEnvironmentRequest::environment].
15272        ///
15273        /// This is a **required** field for requests.
15274        pub fn set_environment<T>(mut self, v: T) -> Self
15275        where
15276            T: std::convert::Into<crate::model::Environment>,
15277        {
15278            self.0.request.environment = std::option::Option::Some(v.into());
15279            self
15280        }
15281
15282        /// Sets or clears the value of [environment][crate::model::UpdateEnvironmentRequest::environment].
15283        ///
15284        /// This is a **required** field for requests.
15285        pub fn set_or_clear_environment<T>(mut self, v: std::option::Option<T>) -> Self
15286        where
15287            T: std::convert::Into<crate::model::Environment>,
15288        {
15289            self.0.request.environment = v.map(|x| x.into());
15290            self
15291        }
15292
15293        /// Sets the value of [validate_only][crate::model::UpdateEnvironmentRequest::validate_only].
15294        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
15295            self.0.request.validate_only = v.into();
15296            self
15297        }
15298    }
15299
15300    #[doc(hidden)]
15301    impl gax::options::internal::RequestBuilder for UpdateEnvironment {
15302        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15303            &mut self.0.options
15304        }
15305    }
15306
15307    /// The request builder for [DataplexService::delete_environment][crate::client::DataplexService::delete_environment] calls.
15308    ///
15309    /// # Example
15310    /// ```no_run
15311    /// # use google_cloud_dataplex_v1::builder;
15312    /// use builder::dataplex_service::DeleteEnvironment;
15313    /// # tokio_test::block_on(async {
15314    /// use lro::Poller;
15315    ///
15316    /// let builder = prepare_request_builder();
15317    /// let response = builder.poller().until_done().await?;
15318    /// # gax::Result::<()>::Ok(()) });
15319    ///
15320    /// fn prepare_request_builder() -> DeleteEnvironment {
15321    ///   # panic!();
15322    ///   // ... details omitted ...
15323    /// }
15324    /// ```
15325    #[derive(Clone, Debug)]
15326    pub struct DeleteEnvironment(RequestBuilder<crate::model::DeleteEnvironmentRequest>);
15327
15328    impl DeleteEnvironment {
15329        pub(crate) fn new(
15330            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15331        ) -> Self {
15332            Self(RequestBuilder::new(stub))
15333        }
15334
15335        /// Sets the full request, replacing any prior values.
15336        pub fn with_request<V: Into<crate::model::DeleteEnvironmentRequest>>(
15337            mut self,
15338            v: V,
15339        ) -> Self {
15340            self.0.request = v.into();
15341            self
15342        }
15343
15344        /// Sets all the options, replacing any prior values.
15345        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15346            self.0.options = v.into();
15347            self
15348        }
15349
15350        /// Sends the request.
15351        ///
15352        /// # Long running operations
15353        ///
15354        /// This starts, but does not poll, a longrunning operation. More information
15355        /// on [delete_environment][crate::client::DataplexService::delete_environment].
15356        pub async fn send(self) -> Result<longrunning::model::Operation> {
15357            (*self.0.stub)
15358                .delete_environment(self.0.request, self.0.options)
15359                .await
15360                .map(gax::response::Response::into_body)
15361        }
15362
15363        /// Creates a [Poller][lro::Poller] to work with `delete_environment`.
15364        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
15365            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
15366            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
15367            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
15368
15369            let stub = self.0.stub.clone();
15370            let mut options = self.0.options.clone();
15371            options.set_retry_policy(gax::retry_policy::NeverRetry);
15372            let query = move |name| {
15373                let stub = stub.clone();
15374                let options = options.clone();
15375                async {
15376                    let op = GetOperation::new(stub)
15377                        .set_name(name)
15378                        .with_options(options)
15379                        .send()
15380                        .await?;
15381                    Ok(Operation::new(op))
15382                }
15383            };
15384
15385            let start = move || async {
15386                let op = self.send().await?;
15387                Ok(Operation::new(op))
15388            };
15389
15390            lro::internal::new_unit_response_poller(
15391                polling_error_policy,
15392                polling_backoff_policy,
15393                start,
15394                query,
15395            )
15396        }
15397
15398        /// Sets the value of [name][crate::model::DeleteEnvironmentRequest::name].
15399        ///
15400        /// This is a **required** field for requests.
15401        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15402            self.0.request.name = v.into();
15403            self
15404        }
15405    }
15406
15407    #[doc(hidden)]
15408    impl gax::options::internal::RequestBuilder for DeleteEnvironment {
15409        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15410            &mut self.0.options
15411        }
15412    }
15413
15414    /// The request builder for [DataplexService::list_environments][crate::client::DataplexService::list_environments] calls.
15415    ///
15416    /// # Example
15417    /// ```no_run
15418    /// # use google_cloud_dataplex_v1::builder;
15419    /// use builder::dataplex_service::ListEnvironments;
15420    /// # tokio_test::block_on(async {
15421    /// use gax::paginator::ItemPaginator;
15422    ///
15423    /// let builder = prepare_request_builder();
15424    /// let mut items = builder.by_item();
15425    /// while let Some(result) = items.next().await {
15426    ///   let item = result?;
15427    /// }
15428    /// # gax::Result::<()>::Ok(()) });
15429    ///
15430    /// fn prepare_request_builder() -> ListEnvironments {
15431    ///   # panic!();
15432    ///   // ... details omitted ...
15433    /// }
15434    /// ```
15435    #[derive(Clone, Debug)]
15436    pub struct ListEnvironments(RequestBuilder<crate::model::ListEnvironmentsRequest>);
15437
15438    impl ListEnvironments {
15439        pub(crate) fn new(
15440            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15441        ) -> Self {
15442            Self(RequestBuilder::new(stub))
15443        }
15444
15445        /// Sets the full request, replacing any prior values.
15446        pub fn with_request<V: Into<crate::model::ListEnvironmentsRequest>>(
15447            mut self,
15448            v: V,
15449        ) -> Self {
15450            self.0.request = v.into();
15451            self
15452        }
15453
15454        /// Sets all the options, replacing any prior values.
15455        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15456            self.0.options = v.into();
15457            self
15458        }
15459
15460        /// Sends the request.
15461        pub async fn send(self) -> Result<crate::model::ListEnvironmentsResponse> {
15462            (*self.0.stub)
15463                .list_environments(self.0.request, self.0.options)
15464                .await
15465                .map(gax::response::Response::into_body)
15466        }
15467
15468        /// Streams each page in the collection.
15469        pub fn by_page(
15470            self,
15471        ) -> impl gax::paginator::Paginator<crate::model::ListEnvironmentsResponse, gax::error::Error>
15472        {
15473            use std::clone::Clone;
15474            let token = self.0.request.page_token.clone();
15475            let execute = move |token: String| {
15476                let mut builder = self.clone();
15477                builder.0.request = builder.0.request.set_page_token(token);
15478                builder.send()
15479            };
15480            gax::paginator::internal::new_paginator(token, execute)
15481        }
15482
15483        /// Streams each item in the collection.
15484        pub fn by_item(
15485            self,
15486        ) -> impl gax::paginator::ItemPaginator<crate::model::ListEnvironmentsResponse, gax::error::Error>
15487        {
15488            use gax::paginator::Paginator;
15489            self.by_page().items()
15490        }
15491
15492        /// Sets the value of [parent][crate::model::ListEnvironmentsRequest::parent].
15493        ///
15494        /// This is a **required** field for requests.
15495        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15496            self.0.request.parent = v.into();
15497            self
15498        }
15499
15500        /// Sets the value of [page_size][crate::model::ListEnvironmentsRequest::page_size].
15501        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15502            self.0.request.page_size = v.into();
15503            self
15504        }
15505
15506        /// Sets the value of [page_token][crate::model::ListEnvironmentsRequest::page_token].
15507        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15508            self.0.request.page_token = v.into();
15509            self
15510        }
15511
15512        /// Sets the value of [filter][crate::model::ListEnvironmentsRequest::filter].
15513        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15514            self.0.request.filter = v.into();
15515            self
15516        }
15517
15518        /// Sets the value of [order_by][crate::model::ListEnvironmentsRequest::order_by].
15519        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
15520            self.0.request.order_by = v.into();
15521            self
15522        }
15523    }
15524
15525    #[doc(hidden)]
15526    impl gax::options::internal::RequestBuilder for ListEnvironments {
15527        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15528            &mut self.0.options
15529        }
15530    }
15531
15532    /// The request builder for [DataplexService::get_environment][crate::client::DataplexService::get_environment] calls.
15533    ///
15534    /// # Example
15535    /// ```no_run
15536    /// # use google_cloud_dataplex_v1::builder;
15537    /// use builder::dataplex_service::GetEnvironment;
15538    /// # tokio_test::block_on(async {
15539    ///
15540    /// let builder = prepare_request_builder();
15541    /// let response = builder.send().await?;
15542    /// # gax::Result::<()>::Ok(()) });
15543    ///
15544    /// fn prepare_request_builder() -> GetEnvironment {
15545    ///   # panic!();
15546    ///   // ... details omitted ...
15547    /// }
15548    /// ```
15549    #[derive(Clone, Debug)]
15550    pub struct GetEnvironment(RequestBuilder<crate::model::GetEnvironmentRequest>);
15551
15552    impl GetEnvironment {
15553        pub(crate) fn new(
15554            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15555        ) -> Self {
15556            Self(RequestBuilder::new(stub))
15557        }
15558
15559        /// Sets the full request, replacing any prior values.
15560        pub fn with_request<V: Into<crate::model::GetEnvironmentRequest>>(mut self, v: V) -> Self {
15561            self.0.request = v.into();
15562            self
15563        }
15564
15565        /// Sets all the options, replacing any prior values.
15566        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15567            self.0.options = v.into();
15568            self
15569        }
15570
15571        /// Sends the request.
15572        pub async fn send(self) -> Result<crate::model::Environment> {
15573            (*self.0.stub)
15574                .get_environment(self.0.request, self.0.options)
15575                .await
15576                .map(gax::response::Response::into_body)
15577        }
15578
15579        /// Sets the value of [name][crate::model::GetEnvironmentRequest::name].
15580        ///
15581        /// This is a **required** field for requests.
15582        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15583            self.0.request.name = v.into();
15584            self
15585        }
15586    }
15587
15588    #[doc(hidden)]
15589    impl gax::options::internal::RequestBuilder for GetEnvironment {
15590        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15591            &mut self.0.options
15592        }
15593    }
15594
15595    /// The request builder for [DataplexService::list_sessions][crate::client::DataplexService::list_sessions] calls.
15596    ///
15597    /// # Example
15598    /// ```no_run
15599    /// # use google_cloud_dataplex_v1::builder;
15600    /// use builder::dataplex_service::ListSessions;
15601    /// # tokio_test::block_on(async {
15602    /// use gax::paginator::ItemPaginator;
15603    ///
15604    /// let builder = prepare_request_builder();
15605    /// let mut items = builder.by_item();
15606    /// while let Some(result) = items.next().await {
15607    ///   let item = result?;
15608    /// }
15609    /// # gax::Result::<()>::Ok(()) });
15610    ///
15611    /// fn prepare_request_builder() -> ListSessions {
15612    ///   # panic!();
15613    ///   // ... details omitted ...
15614    /// }
15615    /// ```
15616    #[derive(Clone, Debug)]
15617    pub struct ListSessions(RequestBuilder<crate::model::ListSessionsRequest>);
15618
15619    impl ListSessions {
15620        pub(crate) fn new(
15621            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15622        ) -> Self {
15623            Self(RequestBuilder::new(stub))
15624        }
15625
15626        /// Sets the full request, replacing any prior values.
15627        pub fn with_request<V: Into<crate::model::ListSessionsRequest>>(mut self, v: V) -> Self {
15628            self.0.request = v.into();
15629            self
15630        }
15631
15632        /// Sets all the options, replacing any prior values.
15633        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15634            self.0.options = v.into();
15635            self
15636        }
15637
15638        /// Sends the request.
15639        pub async fn send(self) -> Result<crate::model::ListSessionsResponse> {
15640            (*self.0.stub)
15641                .list_sessions(self.0.request, self.0.options)
15642                .await
15643                .map(gax::response::Response::into_body)
15644        }
15645
15646        /// Streams each page in the collection.
15647        pub fn by_page(
15648            self,
15649        ) -> impl gax::paginator::Paginator<crate::model::ListSessionsResponse, gax::error::Error>
15650        {
15651            use std::clone::Clone;
15652            let token = self.0.request.page_token.clone();
15653            let execute = move |token: String| {
15654                let mut builder = self.clone();
15655                builder.0.request = builder.0.request.set_page_token(token);
15656                builder.send()
15657            };
15658            gax::paginator::internal::new_paginator(token, execute)
15659        }
15660
15661        /// Streams each item in the collection.
15662        pub fn by_item(
15663            self,
15664        ) -> impl gax::paginator::ItemPaginator<crate::model::ListSessionsResponse, gax::error::Error>
15665        {
15666            use gax::paginator::Paginator;
15667            self.by_page().items()
15668        }
15669
15670        /// Sets the value of [parent][crate::model::ListSessionsRequest::parent].
15671        ///
15672        /// This is a **required** field for requests.
15673        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15674            self.0.request.parent = v.into();
15675            self
15676        }
15677
15678        /// Sets the value of [page_size][crate::model::ListSessionsRequest::page_size].
15679        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15680            self.0.request.page_size = v.into();
15681            self
15682        }
15683
15684        /// Sets the value of [page_token][crate::model::ListSessionsRequest::page_token].
15685        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15686            self.0.request.page_token = v.into();
15687            self
15688        }
15689
15690        /// Sets the value of [filter][crate::model::ListSessionsRequest::filter].
15691        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15692            self.0.request.filter = v.into();
15693            self
15694        }
15695    }
15696
15697    #[doc(hidden)]
15698    impl gax::options::internal::RequestBuilder for ListSessions {
15699        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15700            &mut self.0.options
15701        }
15702    }
15703
15704    /// The request builder for [DataplexService::list_locations][crate::client::DataplexService::list_locations] calls.
15705    ///
15706    /// # Example
15707    /// ```no_run
15708    /// # use google_cloud_dataplex_v1::builder;
15709    /// use builder::dataplex_service::ListLocations;
15710    /// # tokio_test::block_on(async {
15711    /// use gax::paginator::ItemPaginator;
15712    ///
15713    /// let builder = prepare_request_builder();
15714    /// let mut items = builder.by_item();
15715    /// while let Some(result) = items.next().await {
15716    ///   let item = result?;
15717    /// }
15718    /// # gax::Result::<()>::Ok(()) });
15719    ///
15720    /// fn prepare_request_builder() -> ListLocations {
15721    ///   # panic!();
15722    ///   // ... details omitted ...
15723    /// }
15724    /// ```
15725    #[derive(Clone, Debug)]
15726    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
15727
15728    impl ListLocations {
15729        pub(crate) fn new(
15730            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15731        ) -> Self {
15732            Self(RequestBuilder::new(stub))
15733        }
15734
15735        /// Sets the full request, replacing any prior values.
15736        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
15737            mut self,
15738            v: V,
15739        ) -> Self {
15740            self.0.request = v.into();
15741            self
15742        }
15743
15744        /// Sets all the options, replacing any prior values.
15745        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15746            self.0.options = v.into();
15747            self
15748        }
15749
15750        /// Sends the request.
15751        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
15752            (*self.0.stub)
15753                .list_locations(self.0.request, self.0.options)
15754                .await
15755                .map(gax::response::Response::into_body)
15756        }
15757
15758        /// Streams each page in the collection.
15759        pub fn by_page(
15760            self,
15761        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
15762        {
15763            use std::clone::Clone;
15764            let token = self.0.request.page_token.clone();
15765            let execute = move |token: String| {
15766                let mut builder = self.clone();
15767                builder.0.request = builder.0.request.set_page_token(token);
15768                builder.send()
15769            };
15770            gax::paginator::internal::new_paginator(token, execute)
15771        }
15772
15773        /// Streams each item in the collection.
15774        pub fn by_item(
15775            self,
15776        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
15777        {
15778            use gax::paginator::Paginator;
15779            self.by_page().items()
15780        }
15781
15782        /// Sets the value of [name][location::model::ListLocationsRequest::name].
15783        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15784            self.0.request.name = v.into();
15785            self
15786        }
15787
15788        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
15789        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15790            self.0.request.filter = v.into();
15791            self
15792        }
15793
15794        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
15795        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15796            self.0.request.page_size = v.into();
15797            self
15798        }
15799
15800        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
15801        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15802            self.0.request.page_token = v.into();
15803            self
15804        }
15805    }
15806
15807    #[doc(hidden)]
15808    impl gax::options::internal::RequestBuilder for ListLocations {
15809        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15810            &mut self.0.options
15811        }
15812    }
15813
15814    /// The request builder for [DataplexService::get_location][crate::client::DataplexService::get_location] calls.
15815    ///
15816    /// # Example
15817    /// ```no_run
15818    /// # use google_cloud_dataplex_v1::builder;
15819    /// use builder::dataplex_service::GetLocation;
15820    /// # tokio_test::block_on(async {
15821    ///
15822    /// let builder = prepare_request_builder();
15823    /// let response = builder.send().await?;
15824    /// # gax::Result::<()>::Ok(()) });
15825    ///
15826    /// fn prepare_request_builder() -> GetLocation {
15827    ///   # panic!();
15828    ///   // ... details omitted ...
15829    /// }
15830    /// ```
15831    #[derive(Clone, Debug)]
15832    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
15833
15834    impl GetLocation {
15835        pub(crate) fn new(
15836            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15837        ) -> Self {
15838            Self(RequestBuilder::new(stub))
15839        }
15840
15841        /// Sets the full request, replacing any prior values.
15842        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
15843            self.0.request = v.into();
15844            self
15845        }
15846
15847        /// Sets all the options, replacing any prior values.
15848        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15849            self.0.options = v.into();
15850            self
15851        }
15852
15853        /// Sends the request.
15854        pub async fn send(self) -> Result<location::model::Location> {
15855            (*self.0.stub)
15856                .get_location(self.0.request, self.0.options)
15857                .await
15858                .map(gax::response::Response::into_body)
15859        }
15860
15861        /// Sets the value of [name][location::model::GetLocationRequest::name].
15862        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15863            self.0.request.name = v.into();
15864            self
15865        }
15866    }
15867
15868    #[doc(hidden)]
15869    impl gax::options::internal::RequestBuilder for GetLocation {
15870        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15871            &mut self.0.options
15872        }
15873    }
15874
15875    /// The request builder for [DataplexService::set_iam_policy][crate::client::DataplexService::set_iam_policy] calls.
15876    ///
15877    /// # Example
15878    /// ```no_run
15879    /// # use google_cloud_dataplex_v1::builder;
15880    /// use builder::dataplex_service::SetIamPolicy;
15881    /// # tokio_test::block_on(async {
15882    ///
15883    /// let builder = prepare_request_builder();
15884    /// let response = builder.send().await?;
15885    /// # gax::Result::<()>::Ok(()) });
15886    ///
15887    /// fn prepare_request_builder() -> SetIamPolicy {
15888    ///   # panic!();
15889    ///   // ... details omitted ...
15890    /// }
15891    /// ```
15892    #[derive(Clone, Debug)]
15893    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
15894
15895    impl SetIamPolicy {
15896        pub(crate) fn new(
15897            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15898        ) -> Self {
15899            Self(RequestBuilder::new(stub))
15900        }
15901
15902        /// Sets the full request, replacing any prior values.
15903        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
15904            self.0.request = v.into();
15905            self
15906        }
15907
15908        /// Sets all the options, replacing any prior values.
15909        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15910            self.0.options = v.into();
15911            self
15912        }
15913
15914        /// Sends the request.
15915        pub async fn send(self) -> Result<iam_v1::model::Policy> {
15916            (*self.0.stub)
15917                .set_iam_policy(self.0.request, self.0.options)
15918                .await
15919                .map(gax::response::Response::into_body)
15920        }
15921
15922        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
15923        ///
15924        /// This is a **required** field for requests.
15925        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
15926            self.0.request.resource = v.into();
15927            self
15928        }
15929
15930        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
15931        ///
15932        /// This is a **required** field for requests.
15933        pub fn set_policy<T>(mut self, v: T) -> Self
15934        where
15935            T: std::convert::Into<iam_v1::model::Policy>,
15936        {
15937            self.0.request.policy = std::option::Option::Some(v.into());
15938            self
15939        }
15940
15941        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
15942        ///
15943        /// This is a **required** field for requests.
15944        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
15945        where
15946            T: std::convert::Into<iam_v1::model::Policy>,
15947        {
15948            self.0.request.policy = v.map(|x| x.into());
15949            self
15950        }
15951
15952        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
15953        pub fn set_update_mask<T>(mut self, v: T) -> Self
15954        where
15955            T: std::convert::Into<wkt::FieldMask>,
15956        {
15957            self.0.request.update_mask = std::option::Option::Some(v.into());
15958            self
15959        }
15960
15961        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
15962        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15963        where
15964            T: std::convert::Into<wkt::FieldMask>,
15965        {
15966            self.0.request.update_mask = v.map(|x| x.into());
15967            self
15968        }
15969    }
15970
15971    #[doc(hidden)]
15972    impl gax::options::internal::RequestBuilder for SetIamPolicy {
15973        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15974            &mut self.0.options
15975        }
15976    }
15977
15978    /// The request builder for [DataplexService::get_iam_policy][crate::client::DataplexService::get_iam_policy] calls.
15979    ///
15980    /// # Example
15981    /// ```no_run
15982    /// # use google_cloud_dataplex_v1::builder;
15983    /// use builder::dataplex_service::GetIamPolicy;
15984    /// # tokio_test::block_on(async {
15985    ///
15986    /// let builder = prepare_request_builder();
15987    /// let response = builder.send().await?;
15988    /// # gax::Result::<()>::Ok(()) });
15989    ///
15990    /// fn prepare_request_builder() -> GetIamPolicy {
15991    ///   # panic!();
15992    ///   // ... details omitted ...
15993    /// }
15994    /// ```
15995    #[derive(Clone, Debug)]
15996    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
15997
15998    impl GetIamPolicy {
15999        pub(crate) fn new(
16000            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16001        ) -> Self {
16002            Self(RequestBuilder::new(stub))
16003        }
16004
16005        /// Sets the full request, replacing any prior values.
16006        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
16007            self.0.request = v.into();
16008            self
16009        }
16010
16011        /// Sets all the options, replacing any prior values.
16012        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16013            self.0.options = v.into();
16014            self
16015        }
16016
16017        /// Sends the request.
16018        pub async fn send(self) -> Result<iam_v1::model::Policy> {
16019            (*self.0.stub)
16020                .get_iam_policy(self.0.request, self.0.options)
16021                .await
16022                .map(gax::response::Response::into_body)
16023        }
16024
16025        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
16026        ///
16027        /// This is a **required** field for requests.
16028        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
16029            self.0.request.resource = v.into();
16030            self
16031        }
16032
16033        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
16034        pub fn set_options<T>(mut self, v: T) -> Self
16035        where
16036            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
16037        {
16038            self.0.request.options = std::option::Option::Some(v.into());
16039            self
16040        }
16041
16042        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
16043        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
16044        where
16045            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
16046        {
16047            self.0.request.options = v.map(|x| x.into());
16048            self
16049        }
16050    }
16051
16052    #[doc(hidden)]
16053    impl gax::options::internal::RequestBuilder for GetIamPolicy {
16054        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16055            &mut self.0.options
16056        }
16057    }
16058
16059    /// The request builder for [DataplexService::test_iam_permissions][crate::client::DataplexService::test_iam_permissions] calls.
16060    ///
16061    /// # Example
16062    /// ```no_run
16063    /// # use google_cloud_dataplex_v1::builder;
16064    /// use builder::dataplex_service::TestIamPermissions;
16065    /// # tokio_test::block_on(async {
16066    ///
16067    /// let builder = prepare_request_builder();
16068    /// let response = builder.send().await?;
16069    /// # gax::Result::<()>::Ok(()) });
16070    ///
16071    /// fn prepare_request_builder() -> TestIamPermissions {
16072    ///   # panic!();
16073    ///   // ... details omitted ...
16074    /// }
16075    /// ```
16076    #[derive(Clone, Debug)]
16077    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
16078
16079    impl TestIamPermissions {
16080        pub(crate) fn new(
16081            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16082        ) -> Self {
16083            Self(RequestBuilder::new(stub))
16084        }
16085
16086        /// Sets the full request, replacing any prior values.
16087        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
16088            mut self,
16089            v: V,
16090        ) -> Self {
16091            self.0.request = v.into();
16092            self
16093        }
16094
16095        /// Sets all the options, replacing any prior values.
16096        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16097            self.0.options = v.into();
16098            self
16099        }
16100
16101        /// Sends the request.
16102        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
16103            (*self.0.stub)
16104                .test_iam_permissions(self.0.request, self.0.options)
16105                .await
16106                .map(gax::response::Response::into_body)
16107        }
16108
16109        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
16110        ///
16111        /// This is a **required** field for requests.
16112        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
16113            self.0.request.resource = v.into();
16114            self
16115        }
16116
16117        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
16118        ///
16119        /// This is a **required** field for requests.
16120        pub fn set_permissions<T, V>(mut self, v: T) -> Self
16121        where
16122            T: std::iter::IntoIterator<Item = V>,
16123            V: std::convert::Into<std::string::String>,
16124        {
16125            use std::iter::Iterator;
16126            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
16127            self
16128        }
16129    }
16130
16131    #[doc(hidden)]
16132    impl gax::options::internal::RequestBuilder for TestIamPermissions {
16133        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16134            &mut self.0.options
16135        }
16136    }
16137
16138    /// The request builder for [DataplexService::list_operations][crate::client::DataplexService::list_operations] calls.
16139    ///
16140    /// # Example
16141    /// ```no_run
16142    /// # use google_cloud_dataplex_v1::builder;
16143    /// use builder::dataplex_service::ListOperations;
16144    /// # tokio_test::block_on(async {
16145    /// use gax::paginator::ItemPaginator;
16146    ///
16147    /// let builder = prepare_request_builder();
16148    /// let mut items = builder.by_item();
16149    /// while let Some(result) = items.next().await {
16150    ///   let item = result?;
16151    /// }
16152    /// # gax::Result::<()>::Ok(()) });
16153    ///
16154    /// fn prepare_request_builder() -> ListOperations {
16155    ///   # panic!();
16156    ///   // ... details omitted ...
16157    /// }
16158    /// ```
16159    #[derive(Clone, Debug)]
16160    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
16161
16162    impl ListOperations {
16163        pub(crate) fn new(
16164            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16165        ) -> Self {
16166            Self(RequestBuilder::new(stub))
16167        }
16168
16169        /// Sets the full request, replacing any prior values.
16170        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
16171            mut self,
16172            v: V,
16173        ) -> Self {
16174            self.0.request = v.into();
16175            self
16176        }
16177
16178        /// Sets all the options, replacing any prior values.
16179        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16180            self.0.options = v.into();
16181            self
16182        }
16183
16184        /// Sends the request.
16185        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
16186            (*self.0.stub)
16187                .list_operations(self.0.request, self.0.options)
16188                .await
16189                .map(gax::response::Response::into_body)
16190        }
16191
16192        /// Streams each page in the collection.
16193        pub fn by_page(
16194            self,
16195        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
16196        {
16197            use std::clone::Clone;
16198            let token = self.0.request.page_token.clone();
16199            let execute = move |token: String| {
16200                let mut builder = self.clone();
16201                builder.0.request = builder.0.request.set_page_token(token);
16202                builder.send()
16203            };
16204            gax::paginator::internal::new_paginator(token, execute)
16205        }
16206
16207        /// Streams each item in the collection.
16208        pub fn by_item(
16209            self,
16210        ) -> impl gax::paginator::ItemPaginator<
16211            longrunning::model::ListOperationsResponse,
16212            gax::error::Error,
16213        > {
16214            use gax::paginator::Paginator;
16215            self.by_page().items()
16216        }
16217
16218        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
16219        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16220            self.0.request.name = v.into();
16221            self
16222        }
16223
16224        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
16225        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16226            self.0.request.filter = v.into();
16227            self
16228        }
16229
16230        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
16231        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16232            self.0.request.page_size = v.into();
16233            self
16234        }
16235
16236        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
16237        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16238            self.0.request.page_token = v.into();
16239            self
16240        }
16241    }
16242
16243    #[doc(hidden)]
16244    impl gax::options::internal::RequestBuilder for ListOperations {
16245        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16246            &mut self.0.options
16247        }
16248    }
16249
16250    /// The request builder for [DataplexService::get_operation][crate::client::DataplexService::get_operation] calls.
16251    ///
16252    /// # Example
16253    /// ```no_run
16254    /// # use google_cloud_dataplex_v1::builder;
16255    /// use builder::dataplex_service::GetOperation;
16256    /// # tokio_test::block_on(async {
16257    ///
16258    /// let builder = prepare_request_builder();
16259    /// let response = builder.send().await?;
16260    /// # gax::Result::<()>::Ok(()) });
16261    ///
16262    /// fn prepare_request_builder() -> GetOperation {
16263    ///   # panic!();
16264    ///   // ... details omitted ...
16265    /// }
16266    /// ```
16267    #[derive(Clone, Debug)]
16268    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
16269
16270    impl GetOperation {
16271        pub(crate) fn new(
16272            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16273        ) -> Self {
16274            Self(RequestBuilder::new(stub))
16275        }
16276
16277        /// Sets the full request, replacing any prior values.
16278        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
16279            mut self,
16280            v: V,
16281        ) -> Self {
16282            self.0.request = v.into();
16283            self
16284        }
16285
16286        /// Sets all the options, replacing any prior values.
16287        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16288            self.0.options = v.into();
16289            self
16290        }
16291
16292        /// Sends the request.
16293        pub async fn send(self) -> Result<longrunning::model::Operation> {
16294            (*self.0.stub)
16295                .get_operation(self.0.request, self.0.options)
16296                .await
16297                .map(gax::response::Response::into_body)
16298        }
16299
16300        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
16301        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16302            self.0.request.name = v.into();
16303            self
16304        }
16305    }
16306
16307    #[doc(hidden)]
16308    impl gax::options::internal::RequestBuilder for GetOperation {
16309        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16310            &mut self.0.options
16311        }
16312    }
16313
16314    /// The request builder for [DataplexService::delete_operation][crate::client::DataplexService::delete_operation] calls.
16315    ///
16316    /// # Example
16317    /// ```no_run
16318    /// # use google_cloud_dataplex_v1::builder;
16319    /// use builder::dataplex_service::DeleteOperation;
16320    /// # tokio_test::block_on(async {
16321    ///
16322    /// let builder = prepare_request_builder();
16323    /// let response = builder.send().await?;
16324    /// # gax::Result::<()>::Ok(()) });
16325    ///
16326    /// fn prepare_request_builder() -> DeleteOperation {
16327    ///   # panic!();
16328    ///   // ... details omitted ...
16329    /// }
16330    /// ```
16331    #[derive(Clone, Debug)]
16332    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
16333
16334    impl DeleteOperation {
16335        pub(crate) fn new(
16336            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16337        ) -> Self {
16338            Self(RequestBuilder::new(stub))
16339        }
16340
16341        /// Sets the full request, replacing any prior values.
16342        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
16343            mut self,
16344            v: V,
16345        ) -> 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<gax::options::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<()> {
16358            (*self.0.stub)
16359                .delete_operation(self.0.request, self.0.options)
16360                .await
16361                .map(gax::response::Response::into_body)
16362        }
16363
16364        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
16365        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16366            self.0.request.name = v.into();
16367            self
16368        }
16369    }
16370
16371    #[doc(hidden)]
16372    impl gax::options::internal::RequestBuilder for DeleteOperation {
16373        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16374            &mut self.0.options
16375        }
16376    }
16377
16378    /// The request builder for [DataplexService::cancel_operation][crate::client::DataplexService::cancel_operation] calls.
16379    ///
16380    /// # Example
16381    /// ```no_run
16382    /// # use google_cloud_dataplex_v1::builder;
16383    /// use builder::dataplex_service::CancelOperation;
16384    /// # tokio_test::block_on(async {
16385    ///
16386    /// let builder = prepare_request_builder();
16387    /// let response = builder.send().await?;
16388    /// # gax::Result::<()>::Ok(()) });
16389    ///
16390    /// fn prepare_request_builder() -> CancelOperation {
16391    ///   # panic!();
16392    ///   // ... details omitted ...
16393    /// }
16394    /// ```
16395    #[derive(Clone, Debug)]
16396    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
16397
16398    impl CancelOperation {
16399        pub(crate) fn new(
16400            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16401        ) -> Self {
16402            Self(RequestBuilder::new(stub))
16403        }
16404
16405        /// Sets the full request, replacing any prior values.
16406        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
16407            mut self,
16408            v: V,
16409        ) -> Self {
16410            self.0.request = v.into();
16411            self
16412        }
16413
16414        /// Sets all the options, replacing any prior values.
16415        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16416            self.0.options = v.into();
16417            self
16418        }
16419
16420        /// Sends the request.
16421        pub async fn send(self) -> Result<()> {
16422            (*self.0.stub)
16423                .cancel_operation(self.0.request, self.0.options)
16424                .await
16425                .map(gax::response::Response::into_body)
16426        }
16427
16428        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
16429        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16430            self.0.request.name = v.into();
16431            self
16432        }
16433    }
16434
16435    #[doc(hidden)]
16436    impl gax::options::internal::RequestBuilder for CancelOperation {
16437        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16438            &mut self.0.options
16439        }
16440    }
16441}