google_cloud_config_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 config {
18    use crate::Result;
19
20    /// A builder for [Config][crate::client::Config].
21    ///
22    /// ```
23    /// # async fn sample() -> gax::client_builder::Result<()> {
24    /// # use google_cloud_config_v1::*;
25    /// # use builder::config::ClientBuilder;
26    /// # use client::Config;
27    /// let builder : ClientBuilder = Config::builder();
28    /// let client = builder
29    ///     .with_endpoint("https://config.googleapis.com")
30    ///     .build().await?;
31    /// # 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::Config;
38        pub struct Factory;
39        impl gax::client_builder::internal::ClientFactory for Factory {
40            type Client = Config;
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::Config] 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::Config>,
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(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
64            Self {
65                stub,
66                request: R::default(),
67                options: gax::options::RequestOptions::default(),
68            }
69        }
70    }
71
72    /// The request builder for [Config::list_deployments][crate::client::Config::list_deployments] calls.
73    ///
74    /// # Example
75    /// ```
76    /// # use google_cloud_config_v1::builder::config::ListDeployments;
77    /// # async fn sample() -> gax::Result<()> {
78    /// use gax::paginator::ItemPaginator;
79    ///
80    /// let builder = prepare_request_builder();
81    /// let mut items = builder.by_item();
82    /// while let Some(result) = items.next().await {
83    ///   let item = result?;
84    /// }
85    /// # Ok(()) }
86    ///
87    /// fn prepare_request_builder() -> ListDeployments {
88    ///   # panic!();
89    ///   // ... details omitted ...
90    /// }
91    /// ```
92    #[derive(Clone, Debug)]
93    pub struct ListDeployments(RequestBuilder<crate::model::ListDeploymentsRequest>);
94
95    impl ListDeployments {
96        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
97            Self(RequestBuilder::new(stub))
98        }
99
100        /// Sets the full request, replacing any prior values.
101        pub fn with_request<V: Into<crate::model::ListDeploymentsRequest>>(mut self, v: V) -> Self {
102            self.0.request = v.into();
103            self
104        }
105
106        /// Sets all the options, replacing any prior values.
107        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
108            self.0.options = v.into();
109            self
110        }
111
112        /// Sends the request.
113        pub async fn send(self) -> Result<crate::model::ListDeploymentsResponse> {
114            (*self.0.stub)
115                .list_deployments(self.0.request, self.0.options)
116                .await
117                .map(gax::response::Response::into_body)
118        }
119
120        /// Streams each page in the collection.
121        pub fn by_page(
122            self,
123        ) -> impl gax::paginator::Paginator<crate::model::ListDeploymentsResponse, gax::error::Error>
124        {
125            use std::clone::Clone;
126            let token = self.0.request.page_token.clone();
127            let execute = move |token: String| {
128                let mut builder = self.clone();
129                builder.0.request = builder.0.request.set_page_token(token);
130                builder.send()
131            };
132            gax::paginator::internal::new_paginator(token, execute)
133        }
134
135        /// Streams each item in the collection.
136        pub fn by_item(
137            self,
138        ) -> impl gax::paginator::ItemPaginator<crate::model::ListDeploymentsResponse, gax::error::Error>
139        {
140            use gax::paginator::Paginator;
141            self.by_page().items()
142        }
143
144        /// Sets the value of [parent][crate::model::ListDeploymentsRequest::parent].
145        ///
146        /// This is a **required** field for requests.
147        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
148            self.0.request.parent = v.into();
149            self
150        }
151
152        /// Sets the value of [page_size][crate::model::ListDeploymentsRequest::page_size].
153        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
154            self.0.request.page_size = v.into();
155            self
156        }
157
158        /// Sets the value of [page_token][crate::model::ListDeploymentsRequest::page_token].
159        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
160            self.0.request.page_token = v.into();
161            self
162        }
163
164        /// Sets the value of [filter][crate::model::ListDeploymentsRequest::filter].
165        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
166            self.0.request.filter = v.into();
167            self
168        }
169
170        /// Sets the value of [order_by][crate::model::ListDeploymentsRequest::order_by].
171        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
172            self.0.request.order_by = v.into();
173            self
174        }
175    }
176
177    #[doc(hidden)]
178    impl gax::options::internal::RequestBuilder for ListDeployments {
179        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
180            &mut self.0.options
181        }
182    }
183
184    /// The request builder for [Config::get_deployment][crate::client::Config::get_deployment] calls.
185    ///
186    /// # Example
187    /// ```
188    /// # use google_cloud_config_v1::builder::config::GetDeployment;
189    /// # async fn sample() -> gax::Result<()> {
190    ///
191    /// let builder = prepare_request_builder();
192    /// let response = builder.send().await?;
193    /// # Ok(()) }
194    ///
195    /// fn prepare_request_builder() -> GetDeployment {
196    ///   # panic!();
197    ///   // ... details omitted ...
198    /// }
199    /// ```
200    #[derive(Clone, Debug)]
201    pub struct GetDeployment(RequestBuilder<crate::model::GetDeploymentRequest>);
202
203    impl GetDeployment {
204        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
205            Self(RequestBuilder::new(stub))
206        }
207
208        /// Sets the full request, replacing any prior values.
209        pub fn with_request<V: Into<crate::model::GetDeploymentRequest>>(mut self, v: V) -> Self {
210            self.0.request = v.into();
211            self
212        }
213
214        /// Sets all the options, replacing any prior values.
215        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
216            self.0.options = v.into();
217            self
218        }
219
220        /// Sends the request.
221        pub async fn send(self) -> Result<crate::model::Deployment> {
222            (*self.0.stub)
223                .get_deployment(self.0.request, self.0.options)
224                .await
225                .map(gax::response::Response::into_body)
226        }
227
228        /// Sets the value of [name][crate::model::GetDeploymentRequest::name].
229        ///
230        /// This is a **required** field for requests.
231        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
232            self.0.request.name = v.into();
233            self
234        }
235    }
236
237    #[doc(hidden)]
238    impl gax::options::internal::RequestBuilder for GetDeployment {
239        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
240            &mut self.0.options
241        }
242    }
243
244    /// The request builder for [Config::create_deployment][crate::client::Config::create_deployment] calls.
245    ///
246    /// # Example
247    /// ```
248    /// # use google_cloud_config_v1::builder::config::CreateDeployment;
249    /// # async fn sample() -> gax::Result<()> {
250    /// use lro::Poller;
251    ///
252    /// let builder = prepare_request_builder();
253    /// let response = builder.poller().until_done().await?;
254    /// # Ok(()) }
255    ///
256    /// fn prepare_request_builder() -> CreateDeployment {
257    ///   # panic!();
258    ///   // ... details omitted ...
259    /// }
260    /// ```
261    #[derive(Clone, Debug)]
262    pub struct CreateDeployment(RequestBuilder<crate::model::CreateDeploymentRequest>);
263
264    impl CreateDeployment {
265        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
266            Self(RequestBuilder::new(stub))
267        }
268
269        /// Sets the full request, replacing any prior values.
270        pub fn with_request<V: Into<crate::model::CreateDeploymentRequest>>(
271            mut self,
272            v: V,
273        ) -> Self {
274            self.0.request = v.into();
275            self
276        }
277
278        /// Sets all the options, replacing any prior values.
279        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
280            self.0.options = v.into();
281            self
282        }
283
284        /// Sends the request.
285        ///
286        /// # Long running operations
287        ///
288        /// This starts, but does not poll, a longrunning operation. More information
289        /// on [create_deployment][crate::client::Config::create_deployment].
290        pub async fn send(self) -> Result<longrunning::model::Operation> {
291            (*self.0.stub)
292                .create_deployment(self.0.request, self.0.options)
293                .await
294                .map(gax::response::Response::into_body)
295        }
296
297        /// Creates a [Poller][lro::Poller] to work with `create_deployment`.
298        pub fn poller(
299            self,
300        ) -> impl lro::Poller<crate::model::Deployment, crate::model::OperationMetadata> {
301            type Operation =
302                lro::internal::Operation<crate::model::Deployment, crate::model::OperationMetadata>;
303            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
304            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
305
306            let stub = self.0.stub.clone();
307            let mut options = self.0.options.clone();
308            options.set_retry_policy(gax::retry_policy::NeverRetry);
309            let query = move |name| {
310                let stub = stub.clone();
311                let options = options.clone();
312                async {
313                    let op = GetOperation::new(stub)
314                        .set_name(name)
315                        .with_options(options)
316                        .send()
317                        .await?;
318                    Ok(Operation::new(op))
319                }
320            };
321
322            let start = move || async {
323                let op = self.send().await?;
324                Ok(Operation::new(op))
325            };
326
327            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
328        }
329
330        /// Sets the value of [parent][crate::model::CreateDeploymentRequest::parent].
331        ///
332        /// This is a **required** field for requests.
333        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
334            self.0.request.parent = v.into();
335            self
336        }
337
338        /// Sets the value of [deployment_id][crate::model::CreateDeploymentRequest::deployment_id].
339        ///
340        /// This is a **required** field for requests.
341        pub fn set_deployment_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
342            self.0.request.deployment_id = v.into();
343            self
344        }
345
346        /// Sets the value of [deployment][crate::model::CreateDeploymentRequest::deployment].
347        ///
348        /// This is a **required** field for requests.
349        pub fn set_deployment<T>(mut self, v: T) -> Self
350        where
351            T: std::convert::Into<crate::model::Deployment>,
352        {
353            self.0.request.deployment = std::option::Option::Some(v.into());
354            self
355        }
356
357        /// Sets or clears the value of [deployment][crate::model::CreateDeploymentRequest::deployment].
358        ///
359        /// This is a **required** field for requests.
360        pub fn set_or_clear_deployment<T>(mut self, v: std::option::Option<T>) -> Self
361        where
362            T: std::convert::Into<crate::model::Deployment>,
363        {
364            self.0.request.deployment = v.map(|x| x.into());
365            self
366        }
367
368        /// Sets the value of [request_id][crate::model::CreateDeploymentRequest::request_id].
369        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
370            self.0.request.request_id = v.into();
371            self
372        }
373    }
374
375    #[doc(hidden)]
376    impl gax::options::internal::RequestBuilder for CreateDeployment {
377        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
378            &mut self.0.options
379        }
380    }
381
382    /// The request builder for [Config::update_deployment][crate::client::Config::update_deployment] calls.
383    ///
384    /// # Example
385    /// ```
386    /// # use google_cloud_config_v1::builder::config::UpdateDeployment;
387    /// # async fn sample() -> gax::Result<()> {
388    /// use lro::Poller;
389    ///
390    /// let builder = prepare_request_builder();
391    /// let response = builder.poller().until_done().await?;
392    /// # Ok(()) }
393    ///
394    /// fn prepare_request_builder() -> UpdateDeployment {
395    ///   # panic!();
396    ///   // ... details omitted ...
397    /// }
398    /// ```
399    #[derive(Clone, Debug)]
400    pub struct UpdateDeployment(RequestBuilder<crate::model::UpdateDeploymentRequest>);
401
402    impl UpdateDeployment {
403        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
404            Self(RequestBuilder::new(stub))
405        }
406
407        /// Sets the full request, replacing any prior values.
408        pub fn with_request<V: Into<crate::model::UpdateDeploymentRequest>>(
409            mut self,
410            v: V,
411        ) -> Self {
412            self.0.request = v.into();
413            self
414        }
415
416        /// Sets all the options, replacing any prior values.
417        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
418            self.0.options = v.into();
419            self
420        }
421
422        /// Sends the request.
423        ///
424        /// # Long running operations
425        ///
426        /// This starts, but does not poll, a longrunning operation. More information
427        /// on [update_deployment][crate::client::Config::update_deployment].
428        pub async fn send(self) -> Result<longrunning::model::Operation> {
429            (*self.0.stub)
430                .update_deployment(self.0.request, self.0.options)
431                .await
432                .map(gax::response::Response::into_body)
433        }
434
435        /// Creates a [Poller][lro::Poller] to work with `update_deployment`.
436        pub fn poller(
437            self,
438        ) -> impl lro::Poller<crate::model::Deployment, crate::model::OperationMetadata> {
439            type Operation =
440                lro::internal::Operation<crate::model::Deployment, crate::model::OperationMetadata>;
441            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
442            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
443
444            let stub = self.0.stub.clone();
445            let mut options = self.0.options.clone();
446            options.set_retry_policy(gax::retry_policy::NeverRetry);
447            let query = move |name| {
448                let stub = stub.clone();
449                let options = options.clone();
450                async {
451                    let op = GetOperation::new(stub)
452                        .set_name(name)
453                        .with_options(options)
454                        .send()
455                        .await?;
456                    Ok(Operation::new(op))
457                }
458            };
459
460            let start = move || async {
461                let op = self.send().await?;
462                Ok(Operation::new(op))
463            };
464
465            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
466        }
467
468        /// Sets the value of [update_mask][crate::model::UpdateDeploymentRequest::update_mask].
469        pub fn set_update_mask<T>(mut self, v: T) -> Self
470        where
471            T: std::convert::Into<wkt::FieldMask>,
472        {
473            self.0.request.update_mask = std::option::Option::Some(v.into());
474            self
475        }
476
477        /// Sets or clears the value of [update_mask][crate::model::UpdateDeploymentRequest::update_mask].
478        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
479        where
480            T: std::convert::Into<wkt::FieldMask>,
481        {
482            self.0.request.update_mask = v.map(|x| x.into());
483            self
484        }
485
486        /// Sets the value of [deployment][crate::model::UpdateDeploymentRequest::deployment].
487        ///
488        /// This is a **required** field for requests.
489        pub fn set_deployment<T>(mut self, v: T) -> Self
490        where
491            T: std::convert::Into<crate::model::Deployment>,
492        {
493            self.0.request.deployment = std::option::Option::Some(v.into());
494            self
495        }
496
497        /// Sets or clears the value of [deployment][crate::model::UpdateDeploymentRequest::deployment].
498        ///
499        /// This is a **required** field for requests.
500        pub fn set_or_clear_deployment<T>(mut self, v: std::option::Option<T>) -> Self
501        where
502            T: std::convert::Into<crate::model::Deployment>,
503        {
504            self.0.request.deployment = v.map(|x| x.into());
505            self
506        }
507
508        /// Sets the value of [request_id][crate::model::UpdateDeploymentRequest::request_id].
509        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
510            self.0.request.request_id = v.into();
511            self
512        }
513    }
514
515    #[doc(hidden)]
516    impl gax::options::internal::RequestBuilder for UpdateDeployment {
517        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
518            &mut self.0.options
519        }
520    }
521
522    /// The request builder for [Config::delete_deployment][crate::client::Config::delete_deployment] calls.
523    ///
524    /// # Example
525    /// ```
526    /// # use google_cloud_config_v1::builder::config::DeleteDeployment;
527    /// # async fn sample() -> gax::Result<()> {
528    /// use lro::Poller;
529    ///
530    /// let builder = prepare_request_builder();
531    /// let response = builder.poller().until_done().await?;
532    /// # Ok(()) }
533    ///
534    /// fn prepare_request_builder() -> DeleteDeployment {
535    ///   # panic!();
536    ///   // ... details omitted ...
537    /// }
538    /// ```
539    #[derive(Clone, Debug)]
540    pub struct DeleteDeployment(RequestBuilder<crate::model::DeleteDeploymentRequest>);
541
542    impl DeleteDeployment {
543        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
544            Self(RequestBuilder::new(stub))
545        }
546
547        /// Sets the full request, replacing any prior values.
548        pub fn with_request<V: Into<crate::model::DeleteDeploymentRequest>>(
549            mut self,
550            v: V,
551        ) -> Self {
552            self.0.request = v.into();
553            self
554        }
555
556        /// Sets all the options, replacing any prior values.
557        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
558            self.0.options = v.into();
559            self
560        }
561
562        /// Sends the request.
563        ///
564        /// # Long running operations
565        ///
566        /// This starts, but does not poll, a longrunning operation. More information
567        /// on [delete_deployment][crate::client::Config::delete_deployment].
568        pub async fn send(self) -> Result<longrunning::model::Operation> {
569            (*self.0.stub)
570                .delete_deployment(self.0.request, self.0.options)
571                .await
572                .map(gax::response::Response::into_body)
573        }
574
575        /// Creates a [Poller][lro::Poller] to work with `delete_deployment`.
576        pub fn poller(
577            self,
578        ) -> impl lro::Poller<crate::model::Deployment, crate::model::OperationMetadata> {
579            type Operation =
580                lro::internal::Operation<crate::model::Deployment, crate::model::OperationMetadata>;
581            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
582            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
583
584            let stub = self.0.stub.clone();
585            let mut options = self.0.options.clone();
586            options.set_retry_policy(gax::retry_policy::NeverRetry);
587            let query = move |name| {
588                let stub = stub.clone();
589                let options = options.clone();
590                async {
591                    let op = GetOperation::new(stub)
592                        .set_name(name)
593                        .with_options(options)
594                        .send()
595                        .await?;
596                    Ok(Operation::new(op))
597                }
598            };
599
600            let start = move || async {
601                let op = self.send().await?;
602                Ok(Operation::new(op))
603            };
604
605            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
606        }
607
608        /// Sets the value of [name][crate::model::DeleteDeploymentRequest::name].
609        ///
610        /// This is a **required** field for requests.
611        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
612            self.0.request.name = v.into();
613            self
614        }
615
616        /// Sets the value of [request_id][crate::model::DeleteDeploymentRequest::request_id].
617        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
618            self.0.request.request_id = v.into();
619            self
620        }
621
622        /// Sets the value of [force][crate::model::DeleteDeploymentRequest::force].
623        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
624            self.0.request.force = v.into();
625            self
626        }
627
628        /// Sets the value of [delete_policy][crate::model::DeleteDeploymentRequest::delete_policy].
629        pub fn set_delete_policy<T: Into<crate::model::delete_deployment_request::DeletePolicy>>(
630            mut self,
631            v: T,
632        ) -> Self {
633            self.0.request.delete_policy = v.into();
634            self
635        }
636    }
637
638    #[doc(hidden)]
639    impl gax::options::internal::RequestBuilder for DeleteDeployment {
640        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
641            &mut self.0.options
642        }
643    }
644
645    /// The request builder for [Config::list_revisions][crate::client::Config::list_revisions] calls.
646    ///
647    /// # Example
648    /// ```
649    /// # use google_cloud_config_v1::builder::config::ListRevisions;
650    /// # async fn sample() -> gax::Result<()> {
651    /// use gax::paginator::ItemPaginator;
652    ///
653    /// let builder = prepare_request_builder();
654    /// let mut items = builder.by_item();
655    /// while let Some(result) = items.next().await {
656    ///   let item = result?;
657    /// }
658    /// # Ok(()) }
659    ///
660    /// fn prepare_request_builder() -> ListRevisions {
661    ///   # panic!();
662    ///   // ... details omitted ...
663    /// }
664    /// ```
665    #[derive(Clone, Debug)]
666    pub struct ListRevisions(RequestBuilder<crate::model::ListRevisionsRequest>);
667
668    impl ListRevisions {
669        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
670            Self(RequestBuilder::new(stub))
671        }
672
673        /// Sets the full request, replacing any prior values.
674        pub fn with_request<V: Into<crate::model::ListRevisionsRequest>>(mut self, v: V) -> Self {
675            self.0.request = v.into();
676            self
677        }
678
679        /// Sets all the options, replacing any prior values.
680        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
681            self.0.options = v.into();
682            self
683        }
684
685        /// Sends the request.
686        pub async fn send(self) -> Result<crate::model::ListRevisionsResponse> {
687            (*self.0.stub)
688                .list_revisions(self.0.request, self.0.options)
689                .await
690                .map(gax::response::Response::into_body)
691        }
692
693        /// Streams each page in the collection.
694        pub fn by_page(
695            self,
696        ) -> impl gax::paginator::Paginator<crate::model::ListRevisionsResponse, gax::error::Error>
697        {
698            use std::clone::Clone;
699            let token = self.0.request.page_token.clone();
700            let execute = move |token: String| {
701                let mut builder = self.clone();
702                builder.0.request = builder.0.request.set_page_token(token);
703                builder.send()
704            };
705            gax::paginator::internal::new_paginator(token, execute)
706        }
707
708        /// Streams each item in the collection.
709        pub fn by_item(
710            self,
711        ) -> impl gax::paginator::ItemPaginator<crate::model::ListRevisionsResponse, gax::error::Error>
712        {
713            use gax::paginator::Paginator;
714            self.by_page().items()
715        }
716
717        /// Sets the value of [parent][crate::model::ListRevisionsRequest::parent].
718        ///
719        /// This is a **required** field for requests.
720        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
721            self.0.request.parent = v.into();
722            self
723        }
724
725        /// Sets the value of [page_size][crate::model::ListRevisionsRequest::page_size].
726        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
727            self.0.request.page_size = v.into();
728            self
729        }
730
731        /// Sets the value of [page_token][crate::model::ListRevisionsRequest::page_token].
732        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
733            self.0.request.page_token = v.into();
734            self
735        }
736
737        /// Sets the value of [filter][crate::model::ListRevisionsRequest::filter].
738        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
739            self.0.request.filter = v.into();
740            self
741        }
742
743        /// Sets the value of [order_by][crate::model::ListRevisionsRequest::order_by].
744        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
745            self.0.request.order_by = v.into();
746            self
747        }
748    }
749
750    #[doc(hidden)]
751    impl gax::options::internal::RequestBuilder for ListRevisions {
752        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
753            &mut self.0.options
754        }
755    }
756
757    /// The request builder for [Config::get_revision][crate::client::Config::get_revision] calls.
758    ///
759    /// # Example
760    /// ```
761    /// # use google_cloud_config_v1::builder::config::GetRevision;
762    /// # async fn sample() -> gax::Result<()> {
763    ///
764    /// let builder = prepare_request_builder();
765    /// let response = builder.send().await?;
766    /// # Ok(()) }
767    ///
768    /// fn prepare_request_builder() -> GetRevision {
769    ///   # panic!();
770    ///   // ... details omitted ...
771    /// }
772    /// ```
773    #[derive(Clone, Debug)]
774    pub struct GetRevision(RequestBuilder<crate::model::GetRevisionRequest>);
775
776    impl GetRevision {
777        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
778            Self(RequestBuilder::new(stub))
779        }
780
781        /// Sets the full request, replacing any prior values.
782        pub fn with_request<V: Into<crate::model::GetRevisionRequest>>(mut self, v: V) -> Self {
783            self.0.request = v.into();
784            self
785        }
786
787        /// Sets all the options, replacing any prior values.
788        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
789            self.0.options = v.into();
790            self
791        }
792
793        /// Sends the request.
794        pub async fn send(self) -> Result<crate::model::Revision> {
795            (*self.0.stub)
796                .get_revision(self.0.request, self.0.options)
797                .await
798                .map(gax::response::Response::into_body)
799        }
800
801        /// Sets the value of [name][crate::model::GetRevisionRequest::name].
802        ///
803        /// This is a **required** field for requests.
804        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
805            self.0.request.name = v.into();
806            self
807        }
808    }
809
810    #[doc(hidden)]
811    impl gax::options::internal::RequestBuilder for GetRevision {
812        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
813            &mut self.0.options
814        }
815    }
816
817    /// The request builder for [Config::get_resource][crate::client::Config::get_resource] calls.
818    ///
819    /// # Example
820    /// ```
821    /// # use google_cloud_config_v1::builder::config::GetResource;
822    /// # async fn sample() -> gax::Result<()> {
823    ///
824    /// let builder = prepare_request_builder();
825    /// let response = builder.send().await?;
826    /// # Ok(()) }
827    ///
828    /// fn prepare_request_builder() -> GetResource {
829    ///   # panic!();
830    ///   // ... details omitted ...
831    /// }
832    /// ```
833    #[derive(Clone, Debug)]
834    pub struct GetResource(RequestBuilder<crate::model::GetResourceRequest>);
835
836    impl GetResource {
837        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
838            Self(RequestBuilder::new(stub))
839        }
840
841        /// Sets the full request, replacing any prior values.
842        pub fn with_request<V: Into<crate::model::GetResourceRequest>>(mut self, v: V) -> Self {
843            self.0.request = v.into();
844            self
845        }
846
847        /// Sets all the options, replacing any prior values.
848        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
849            self.0.options = v.into();
850            self
851        }
852
853        /// Sends the request.
854        pub async fn send(self) -> Result<crate::model::Resource> {
855            (*self.0.stub)
856                .get_resource(self.0.request, self.0.options)
857                .await
858                .map(gax::response::Response::into_body)
859        }
860
861        /// Sets the value of [name][crate::model::GetResourceRequest::name].
862        ///
863        /// This is a **required** field for requests.
864        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
865            self.0.request.name = v.into();
866            self
867        }
868    }
869
870    #[doc(hidden)]
871    impl gax::options::internal::RequestBuilder for GetResource {
872        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
873            &mut self.0.options
874        }
875    }
876
877    /// The request builder for [Config::list_resources][crate::client::Config::list_resources] calls.
878    ///
879    /// # Example
880    /// ```
881    /// # use google_cloud_config_v1::builder::config::ListResources;
882    /// # async fn sample() -> gax::Result<()> {
883    /// use gax::paginator::ItemPaginator;
884    ///
885    /// let builder = prepare_request_builder();
886    /// let mut items = builder.by_item();
887    /// while let Some(result) = items.next().await {
888    ///   let item = result?;
889    /// }
890    /// # Ok(()) }
891    ///
892    /// fn prepare_request_builder() -> ListResources {
893    ///   # panic!();
894    ///   // ... details omitted ...
895    /// }
896    /// ```
897    #[derive(Clone, Debug)]
898    pub struct ListResources(RequestBuilder<crate::model::ListResourcesRequest>);
899
900    impl ListResources {
901        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
902            Self(RequestBuilder::new(stub))
903        }
904
905        /// Sets the full request, replacing any prior values.
906        pub fn with_request<V: Into<crate::model::ListResourcesRequest>>(mut self, v: V) -> Self {
907            self.0.request = v.into();
908            self
909        }
910
911        /// Sets all the options, replacing any prior values.
912        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
913            self.0.options = v.into();
914            self
915        }
916
917        /// Sends the request.
918        pub async fn send(self) -> Result<crate::model::ListResourcesResponse> {
919            (*self.0.stub)
920                .list_resources(self.0.request, self.0.options)
921                .await
922                .map(gax::response::Response::into_body)
923        }
924
925        /// Streams each page in the collection.
926        pub fn by_page(
927            self,
928        ) -> impl gax::paginator::Paginator<crate::model::ListResourcesResponse, gax::error::Error>
929        {
930            use std::clone::Clone;
931            let token = self.0.request.page_token.clone();
932            let execute = move |token: String| {
933                let mut builder = self.clone();
934                builder.0.request = builder.0.request.set_page_token(token);
935                builder.send()
936            };
937            gax::paginator::internal::new_paginator(token, execute)
938        }
939
940        /// Streams each item in the collection.
941        pub fn by_item(
942            self,
943        ) -> impl gax::paginator::ItemPaginator<crate::model::ListResourcesResponse, gax::error::Error>
944        {
945            use gax::paginator::Paginator;
946            self.by_page().items()
947        }
948
949        /// Sets the value of [parent][crate::model::ListResourcesRequest::parent].
950        ///
951        /// This is a **required** field for requests.
952        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
953            self.0.request.parent = v.into();
954            self
955        }
956
957        /// Sets the value of [page_size][crate::model::ListResourcesRequest::page_size].
958        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
959            self.0.request.page_size = v.into();
960            self
961        }
962
963        /// Sets the value of [page_token][crate::model::ListResourcesRequest::page_token].
964        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
965            self.0.request.page_token = v.into();
966            self
967        }
968
969        /// Sets the value of [filter][crate::model::ListResourcesRequest::filter].
970        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
971            self.0.request.filter = v.into();
972            self
973        }
974
975        /// Sets the value of [order_by][crate::model::ListResourcesRequest::order_by].
976        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
977            self.0.request.order_by = v.into();
978            self
979        }
980    }
981
982    #[doc(hidden)]
983    impl gax::options::internal::RequestBuilder for ListResources {
984        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
985            &mut self.0.options
986        }
987    }
988
989    /// The request builder for [Config::export_deployment_statefile][crate::client::Config::export_deployment_statefile] calls.
990    ///
991    /// # Example
992    /// ```
993    /// # use google_cloud_config_v1::builder::config::ExportDeploymentStatefile;
994    /// # async fn sample() -> gax::Result<()> {
995    ///
996    /// let builder = prepare_request_builder();
997    /// let response = builder.send().await?;
998    /// # Ok(()) }
999    ///
1000    /// fn prepare_request_builder() -> ExportDeploymentStatefile {
1001    ///   # panic!();
1002    ///   // ... details omitted ...
1003    /// }
1004    /// ```
1005    #[derive(Clone, Debug)]
1006    pub struct ExportDeploymentStatefile(
1007        RequestBuilder<crate::model::ExportDeploymentStatefileRequest>,
1008    );
1009
1010    impl ExportDeploymentStatefile {
1011        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
1012            Self(RequestBuilder::new(stub))
1013        }
1014
1015        /// Sets the full request, replacing any prior values.
1016        pub fn with_request<V: Into<crate::model::ExportDeploymentStatefileRequest>>(
1017            mut self,
1018            v: V,
1019        ) -> Self {
1020            self.0.request = v.into();
1021            self
1022        }
1023
1024        /// Sets all the options, replacing any prior values.
1025        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1026            self.0.options = v.into();
1027            self
1028        }
1029
1030        /// Sends the request.
1031        pub async fn send(self) -> Result<crate::model::Statefile> {
1032            (*self.0.stub)
1033                .export_deployment_statefile(self.0.request, self.0.options)
1034                .await
1035                .map(gax::response::Response::into_body)
1036        }
1037
1038        /// Sets the value of [parent][crate::model::ExportDeploymentStatefileRequest::parent].
1039        ///
1040        /// This is a **required** field for requests.
1041        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1042            self.0.request.parent = v.into();
1043            self
1044        }
1045
1046        /// Sets the value of [draft][crate::model::ExportDeploymentStatefileRequest::draft].
1047        pub fn set_draft<T: Into<bool>>(mut self, v: T) -> Self {
1048            self.0.request.draft = v.into();
1049            self
1050        }
1051    }
1052
1053    #[doc(hidden)]
1054    impl gax::options::internal::RequestBuilder for ExportDeploymentStatefile {
1055        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1056            &mut self.0.options
1057        }
1058    }
1059
1060    /// The request builder for [Config::export_revision_statefile][crate::client::Config::export_revision_statefile] calls.
1061    ///
1062    /// # Example
1063    /// ```
1064    /// # use google_cloud_config_v1::builder::config::ExportRevisionStatefile;
1065    /// # async fn sample() -> gax::Result<()> {
1066    ///
1067    /// let builder = prepare_request_builder();
1068    /// let response = builder.send().await?;
1069    /// # Ok(()) }
1070    ///
1071    /// fn prepare_request_builder() -> ExportRevisionStatefile {
1072    ///   # panic!();
1073    ///   // ... details omitted ...
1074    /// }
1075    /// ```
1076    #[derive(Clone, Debug)]
1077    pub struct ExportRevisionStatefile(
1078        RequestBuilder<crate::model::ExportRevisionStatefileRequest>,
1079    );
1080
1081    impl ExportRevisionStatefile {
1082        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
1083            Self(RequestBuilder::new(stub))
1084        }
1085
1086        /// Sets the full request, replacing any prior values.
1087        pub fn with_request<V: Into<crate::model::ExportRevisionStatefileRequest>>(
1088            mut self,
1089            v: V,
1090        ) -> Self {
1091            self.0.request = v.into();
1092            self
1093        }
1094
1095        /// Sets all the options, replacing any prior values.
1096        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1097            self.0.options = v.into();
1098            self
1099        }
1100
1101        /// Sends the request.
1102        pub async fn send(self) -> Result<crate::model::Statefile> {
1103            (*self.0.stub)
1104                .export_revision_statefile(self.0.request, self.0.options)
1105                .await
1106                .map(gax::response::Response::into_body)
1107        }
1108
1109        /// Sets the value of [parent][crate::model::ExportRevisionStatefileRequest::parent].
1110        ///
1111        /// This is a **required** field for requests.
1112        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1113            self.0.request.parent = v.into();
1114            self
1115        }
1116    }
1117
1118    #[doc(hidden)]
1119    impl gax::options::internal::RequestBuilder for ExportRevisionStatefile {
1120        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1121            &mut self.0.options
1122        }
1123    }
1124
1125    /// The request builder for [Config::import_statefile][crate::client::Config::import_statefile] calls.
1126    ///
1127    /// # Example
1128    /// ```
1129    /// # use google_cloud_config_v1::builder::config::ImportStatefile;
1130    /// # async fn sample() -> gax::Result<()> {
1131    ///
1132    /// let builder = prepare_request_builder();
1133    /// let response = builder.send().await?;
1134    /// # Ok(()) }
1135    ///
1136    /// fn prepare_request_builder() -> ImportStatefile {
1137    ///   # panic!();
1138    ///   // ... details omitted ...
1139    /// }
1140    /// ```
1141    #[derive(Clone, Debug)]
1142    pub struct ImportStatefile(RequestBuilder<crate::model::ImportStatefileRequest>);
1143
1144    impl ImportStatefile {
1145        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
1146            Self(RequestBuilder::new(stub))
1147        }
1148
1149        /// Sets the full request, replacing any prior values.
1150        pub fn with_request<V: Into<crate::model::ImportStatefileRequest>>(mut self, v: V) -> Self {
1151            self.0.request = v.into();
1152            self
1153        }
1154
1155        /// Sets all the options, replacing any prior values.
1156        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1157            self.0.options = v.into();
1158            self
1159        }
1160
1161        /// Sends the request.
1162        pub async fn send(self) -> Result<crate::model::Statefile> {
1163            (*self.0.stub)
1164                .import_statefile(self.0.request, self.0.options)
1165                .await
1166                .map(gax::response::Response::into_body)
1167        }
1168
1169        /// Sets the value of [parent][crate::model::ImportStatefileRequest::parent].
1170        ///
1171        /// This is a **required** field for requests.
1172        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1173            self.0.request.parent = v.into();
1174            self
1175        }
1176
1177        /// Sets the value of [lock_id][crate::model::ImportStatefileRequest::lock_id].
1178        ///
1179        /// This is a **required** field for requests.
1180        pub fn set_lock_id<T: Into<i64>>(mut self, v: T) -> Self {
1181            self.0.request.lock_id = v.into();
1182            self
1183        }
1184
1185        /// Sets the value of [skip_draft][crate::model::ImportStatefileRequest::skip_draft].
1186        pub fn set_skip_draft<T: Into<bool>>(mut self, v: T) -> Self {
1187            self.0.request.skip_draft = v.into();
1188            self
1189        }
1190    }
1191
1192    #[doc(hidden)]
1193    impl gax::options::internal::RequestBuilder for ImportStatefile {
1194        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1195            &mut self.0.options
1196        }
1197    }
1198
1199    /// The request builder for [Config::delete_statefile][crate::client::Config::delete_statefile] calls.
1200    ///
1201    /// # Example
1202    /// ```
1203    /// # use google_cloud_config_v1::builder::config::DeleteStatefile;
1204    /// # async fn sample() -> gax::Result<()> {
1205    ///
1206    /// let builder = prepare_request_builder();
1207    /// let response = builder.send().await?;
1208    /// # Ok(()) }
1209    ///
1210    /// fn prepare_request_builder() -> DeleteStatefile {
1211    ///   # panic!();
1212    ///   // ... details omitted ...
1213    /// }
1214    /// ```
1215    #[derive(Clone, Debug)]
1216    pub struct DeleteStatefile(RequestBuilder<crate::model::DeleteStatefileRequest>);
1217
1218    impl DeleteStatefile {
1219        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
1220            Self(RequestBuilder::new(stub))
1221        }
1222
1223        /// Sets the full request, replacing any prior values.
1224        pub fn with_request<V: Into<crate::model::DeleteStatefileRequest>>(mut self, v: V) -> Self {
1225            self.0.request = v.into();
1226            self
1227        }
1228
1229        /// Sets all the options, replacing any prior values.
1230        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1231            self.0.options = v.into();
1232            self
1233        }
1234
1235        /// Sends the request.
1236        pub async fn send(self) -> Result<()> {
1237            (*self.0.stub)
1238                .delete_statefile(self.0.request, self.0.options)
1239                .await
1240                .map(gax::response::Response::into_body)
1241        }
1242
1243        /// Sets the value of [name][crate::model::DeleteStatefileRequest::name].
1244        ///
1245        /// This is a **required** field for requests.
1246        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1247            self.0.request.name = v.into();
1248            self
1249        }
1250
1251        /// Sets the value of [lock_id][crate::model::DeleteStatefileRequest::lock_id].
1252        ///
1253        /// This is a **required** field for requests.
1254        pub fn set_lock_id<T: Into<i64>>(mut self, v: T) -> Self {
1255            self.0.request.lock_id = v.into();
1256            self
1257        }
1258    }
1259
1260    #[doc(hidden)]
1261    impl gax::options::internal::RequestBuilder for DeleteStatefile {
1262        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1263            &mut self.0.options
1264        }
1265    }
1266
1267    /// The request builder for [Config::lock_deployment][crate::client::Config::lock_deployment] calls.
1268    ///
1269    /// # Example
1270    /// ```
1271    /// # use google_cloud_config_v1::builder::config::LockDeployment;
1272    /// # async fn sample() -> gax::Result<()> {
1273    /// use lro::Poller;
1274    ///
1275    /// let builder = prepare_request_builder();
1276    /// let response = builder.poller().until_done().await?;
1277    /// # Ok(()) }
1278    ///
1279    /// fn prepare_request_builder() -> LockDeployment {
1280    ///   # panic!();
1281    ///   // ... details omitted ...
1282    /// }
1283    /// ```
1284    #[derive(Clone, Debug)]
1285    pub struct LockDeployment(RequestBuilder<crate::model::LockDeploymentRequest>);
1286
1287    impl LockDeployment {
1288        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
1289            Self(RequestBuilder::new(stub))
1290        }
1291
1292        /// Sets the full request, replacing any prior values.
1293        pub fn with_request<V: Into<crate::model::LockDeploymentRequest>>(mut self, v: V) -> Self {
1294            self.0.request = v.into();
1295            self
1296        }
1297
1298        /// Sets all the options, replacing any prior values.
1299        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1300            self.0.options = v.into();
1301            self
1302        }
1303
1304        /// Sends the request.
1305        ///
1306        /// # Long running operations
1307        ///
1308        /// This starts, but does not poll, a longrunning operation. More information
1309        /// on [lock_deployment][crate::client::Config::lock_deployment].
1310        pub async fn send(self) -> Result<longrunning::model::Operation> {
1311            (*self.0.stub)
1312                .lock_deployment(self.0.request, self.0.options)
1313                .await
1314                .map(gax::response::Response::into_body)
1315        }
1316
1317        /// Creates a [Poller][lro::Poller] to work with `lock_deployment`.
1318        pub fn poller(
1319            self,
1320        ) -> impl lro::Poller<crate::model::Deployment, crate::model::OperationMetadata> {
1321            type Operation =
1322                lro::internal::Operation<crate::model::Deployment, crate::model::OperationMetadata>;
1323            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1324            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1325
1326            let stub = self.0.stub.clone();
1327            let mut options = self.0.options.clone();
1328            options.set_retry_policy(gax::retry_policy::NeverRetry);
1329            let query = move |name| {
1330                let stub = stub.clone();
1331                let options = options.clone();
1332                async {
1333                    let op = GetOperation::new(stub)
1334                        .set_name(name)
1335                        .with_options(options)
1336                        .send()
1337                        .await?;
1338                    Ok(Operation::new(op))
1339                }
1340            };
1341
1342            let start = move || async {
1343                let op = self.send().await?;
1344                Ok(Operation::new(op))
1345            };
1346
1347            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1348        }
1349
1350        /// Sets the value of [name][crate::model::LockDeploymentRequest::name].
1351        ///
1352        /// This is a **required** field for requests.
1353        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1354            self.0.request.name = v.into();
1355            self
1356        }
1357    }
1358
1359    #[doc(hidden)]
1360    impl gax::options::internal::RequestBuilder for LockDeployment {
1361        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1362            &mut self.0.options
1363        }
1364    }
1365
1366    /// The request builder for [Config::unlock_deployment][crate::client::Config::unlock_deployment] calls.
1367    ///
1368    /// # Example
1369    /// ```
1370    /// # use google_cloud_config_v1::builder::config::UnlockDeployment;
1371    /// # async fn sample() -> gax::Result<()> {
1372    /// use lro::Poller;
1373    ///
1374    /// let builder = prepare_request_builder();
1375    /// let response = builder.poller().until_done().await?;
1376    /// # Ok(()) }
1377    ///
1378    /// fn prepare_request_builder() -> UnlockDeployment {
1379    ///   # panic!();
1380    ///   // ... details omitted ...
1381    /// }
1382    /// ```
1383    #[derive(Clone, Debug)]
1384    pub struct UnlockDeployment(RequestBuilder<crate::model::UnlockDeploymentRequest>);
1385
1386    impl UnlockDeployment {
1387        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
1388            Self(RequestBuilder::new(stub))
1389        }
1390
1391        /// Sets the full request, replacing any prior values.
1392        pub fn with_request<V: Into<crate::model::UnlockDeploymentRequest>>(
1393            mut self,
1394            v: V,
1395        ) -> Self {
1396            self.0.request = v.into();
1397            self
1398        }
1399
1400        /// Sets all the options, replacing any prior values.
1401        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1402            self.0.options = v.into();
1403            self
1404        }
1405
1406        /// Sends the request.
1407        ///
1408        /// # Long running operations
1409        ///
1410        /// This starts, but does not poll, a longrunning operation. More information
1411        /// on [unlock_deployment][crate::client::Config::unlock_deployment].
1412        pub async fn send(self) -> Result<longrunning::model::Operation> {
1413            (*self.0.stub)
1414                .unlock_deployment(self.0.request, self.0.options)
1415                .await
1416                .map(gax::response::Response::into_body)
1417        }
1418
1419        /// Creates a [Poller][lro::Poller] to work with `unlock_deployment`.
1420        pub fn poller(
1421            self,
1422        ) -> impl lro::Poller<crate::model::Deployment, crate::model::OperationMetadata> {
1423            type Operation =
1424                lro::internal::Operation<crate::model::Deployment, crate::model::OperationMetadata>;
1425            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1426            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1427
1428            let stub = self.0.stub.clone();
1429            let mut options = self.0.options.clone();
1430            options.set_retry_policy(gax::retry_policy::NeverRetry);
1431            let query = move |name| {
1432                let stub = stub.clone();
1433                let options = options.clone();
1434                async {
1435                    let op = GetOperation::new(stub)
1436                        .set_name(name)
1437                        .with_options(options)
1438                        .send()
1439                        .await?;
1440                    Ok(Operation::new(op))
1441                }
1442            };
1443
1444            let start = move || async {
1445                let op = self.send().await?;
1446                Ok(Operation::new(op))
1447            };
1448
1449            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1450        }
1451
1452        /// Sets the value of [name][crate::model::UnlockDeploymentRequest::name].
1453        ///
1454        /// This is a **required** field for requests.
1455        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1456            self.0.request.name = v.into();
1457            self
1458        }
1459
1460        /// Sets the value of [lock_id][crate::model::UnlockDeploymentRequest::lock_id].
1461        ///
1462        /// This is a **required** field for requests.
1463        pub fn set_lock_id<T: Into<i64>>(mut self, v: T) -> Self {
1464            self.0.request.lock_id = v.into();
1465            self
1466        }
1467    }
1468
1469    #[doc(hidden)]
1470    impl gax::options::internal::RequestBuilder for UnlockDeployment {
1471        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1472            &mut self.0.options
1473        }
1474    }
1475
1476    /// The request builder for [Config::export_lock_info][crate::client::Config::export_lock_info] calls.
1477    ///
1478    /// # Example
1479    /// ```
1480    /// # use google_cloud_config_v1::builder::config::ExportLockInfo;
1481    /// # async fn sample() -> gax::Result<()> {
1482    ///
1483    /// let builder = prepare_request_builder();
1484    /// let response = builder.send().await?;
1485    /// # Ok(()) }
1486    ///
1487    /// fn prepare_request_builder() -> ExportLockInfo {
1488    ///   # panic!();
1489    ///   // ... details omitted ...
1490    /// }
1491    /// ```
1492    #[derive(Clone, Debug)]
1493    pub struct ExportLockInfo(RequestBuilder<crate::model::ExportLockInfoRequest>);
1494
1495    impl ExportLockInfo {
1496        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
1497            Self(RequestBuilder::new(stub))
1498        }
1499
1500        /// Sets the full request, replacing any prior values.
1501        pub fn with_request<V: Into<crate::model::ExportLockInfoRequest>>(mut self, v: V) -> Self {
1502            self.0.request = v.into();
1503            self
1504        }
1505
1506        /// Sets all the options, replacing any prior values.
1507        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1508            self.0.options = v.into();
1509            self
1510        }
1511
1512        /// Sends the request.
1513        pub async fn send(self) -> Result<crate::model::LockInfo> {
1514            (*self.0.stub)
1515                .export_lock_info(self.0.request, self.0.options)
1516                .await
1517                .map(gax::response::Response::into_body)
1518        }
1519
1520        /// Sets the value of [name][crate::model::ExportLockInfoRequest::name].
1521        ///
1522        /// This is a **required** field for requests.
1523        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1524            self.0.request.name = v.into();
1525            self
1526        }
1527    }
1528
1529    #[doc(hidden)]
1530    impl gax::options::internal::RequestBuilder for ExportLockInfo {
1531        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1532            &mut self.0.options
1533        }
1534    }
1535
1536    /// The request builder for [Config::create_preview][crate::client::Config::create_preview] calls.
1537    ///
1538    /// # Example
1539    /// ```
1540    /// # use google_cloud_config_v1::builder::config::CreatePreview;
1541    /// # async fn sample() -> gax::Result<()> {
1542    /// use lro::Poller;
1543    ///
1544    /// let builder = prepare_request_builder();
1545    /// let response = builder.poller().until_done().await?;
1546    /// # Ok(()) }
1547    ///
1548    /// fn prepare_request_builder() -> CreatePreview {
1549    ///   # panic!();
1550    ///   // ... details omitted ...
1551    /// }
1552    /// ```
1553    #[derive(Clone, Debug)]
1554    pub struct CreatePreview(RequestBuilder<crate::model::CreatePreviewRequest>);
1555
1556    impl CreatePreview {
1557        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
1558            Self(RequestBuilder::new(stub))
1559        }
1560
1561        /// Sets the full request, replacing any prior values.
1562        pub fn with_request<V: Into<crate::model::CreatePreviewRequest>>(mut self, v: V) -> Self {
1563            self.0.request = v.into();
1564            self
1565        }
1566
1567        /// Sets all the options, replacing any prior values.
1568        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1569            self.0.options = v.into();
1570            self
1571        }
1572
1573        /// Sends the request.
1574        ///
1575        /// # Long running operations
1576        ///
1577        /// This starts, but does not poll, a longrunning operation. More information
1578        /// on [create_preview][crate::client::Config::create_preview].
1579        pub async fn send(self) -> Result<longrunning::model::Operation> {
1580            (*self.0.stub)
1581                .create_preview(self.0.request, self.0.options)
1582                .await
1583                .map(gax::response::Response::into_body)
1584        }
1585
1586        /// Creates a [Poller][lro::Poller] to work with `create_preview`.
1587        pub fn poller(
1588            self,
1589        ) -> impl lro::Poller<crate::model::Preview, crate::model::OperationMetadata> {
1590            type Operation =
1591                lro::internal::Operation<crate::model::Preview, crate::model::OperationMetadata>;
1592            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1593            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1594
1595            let stub = self.0.stub.clone();
1596            let mut options = self.0.options.clone();
1597            options.set_retry_policy(gax::retry_policy::NeverRetry);
1598            let query = move |name| {
1599                let stub = stub.clone();
1600                let options = options.clone();
1601                async {
1602                    let op = GetOperation::new(stub)
1603                        .set_name(name)
1604                        .with_options(options)
1605                        .send()
1606                        .await?;
1607                    Ok(Operation::new(op))
1608                }
1609            };
1610
1611            let start = move || async {
1612                let op = self.send().await?;
1613                Ok(Operation::new(op))
1614            };
1615
1616            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1617        }
1618
1619        /// Sets the value of [parent][crate::model::CreatePreviewRequest::parent].
1620        ///
1621        /// This is a **required** field for requests.
1622        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1623            self.0.request.parent = v.into();
1624            self
1625        }
1626
1627        /// Sets the value of [preview_id][crate::model::CreatePreviewRequest::preview_id].
1628        pub fn set_preview_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1629            self.0.request.preview_id = v.into();
1630            self
1631        }
1632
1633        /// Sets the value of [preview][crate::model::CreatePreviewRequest::preview].
1634        ///
1635        /// This is a **required** field for requests.
1636        pub fn set_preview<T>(mut self, v: T) -> Self
1637        where
1638            T: std::convert::Into<crate::model::Preview>,
1639        {
1640            self.0.request.preview = std::option::Option::Some(v.into());
1641            self
1642        }
1643
1644        /// Sets or clears the value of [preview][crate::model::CreatePreviewRequest::preview].
1645        ///
1646        /// This is a **required** field for requests.
1647        pub fn set_or_clear_preview<T>(mut self, v: std::option::Option<T>) -> Self
1648        where
1649            T: std::convert::Into<crate::model::Preview>,
1650        {
1651            self.0.request.preview = v.map(|x| x.into());
1652            self
1653        }
1654
1655        /// Sets the value of [request_id][crate::model::CreatePreviewRequest::request_id].
1656        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1657            self.0.request.request_id = v.into();
1658            self
1659        }
1660    }
1661
1662    #[doc(hidden)]
1663    impl gax::options::internal::RequestBuilder for CreatePreview {
1664        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1665            &mut self.0.options
1666        }
1667    }
1668
1669    /// The request builder for [Config::get_preview][crate::client::Config::get_preview] calls.
1670    ///
1671    /// # Example
1672    /// ```
1673    /// # use google_cloud_config_v1::builder::config::GetPreview;
1674    /// # async fn sample() -> gax::Result<()> {
1675    ///
1676    /// let builder = prepare_request_builder();
1677    /// let response = builder.send().await?;
1678    /// # Ok(()) }
1679    ///
1680    /// fn prepare_request_builder() -> GetPreview {
1681    ///   # panic!();
1682    ///   // ... details omitted ...
1683    /// }
1684    /// ```
1685    #[derive(Clone, Debug)]
1686    pub struct GetPreview(RequestBuilder<crate::model::GetPreviewRequest>);
1687
1688    impl GetPreview {
1689        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
1690            Self(RequestBuilder::new(stub))
1691        }
1692
1693        /// Sets the full request, replacing any prior values.
1694        pub fn with_request<V: Into<crate::model::GetPreviewRequest>>(mut self, v: V) -> Self {
1695            self.0.request = v.into();
1696            self
1697        }
1698
1699        /// Sets all the options, replacing any prior values.
1700        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1701            self.0.options = v.into();
1702            self
1703        }
1704
1705        /// Sends the request.
1706        pub async fn send(self) -> Result<crate::model::Preview> {
1707            (*self.0.stub)
1708                .get_preview(self.0.request, self.0.options)
1709                .await
1710                .map(gax::response::Response::into_body)
1711        }
1712
1713        /// Sets the value of [name][crate::model::GetPreviewRequest::name].
1714        ///
1715        /// This is a **required** field for requests.
1716        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1717            self.0.request.name = v.into();
1718            self
1719        }
1720    }
1721
1722    #[doc(hidden)]
1723    impl gax::options::internal::RequestBuilder for GetPreview {
1724        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1725            &mut self.0.options
1726        }
1727    }
1728
1729    /// The request builder for [Config::list_previews][crate::client::Config::list_previews] calls.
1730    ///
1731    /// # Example
1732    /// ```
1733    /// # use google_cloud_config_v1::builder::config::ListPreviews;
1734    /// # async fn sample() -> gax::Result<()> {
1735    /// use gax::paginator::ItemPaginator;
1736    ///
1737    /// let builder = prepare_request_builder();
1738    /// let mut items = builder.by_item();
1739    /// while let Some(result) = items.next().await {
1740    ///   let item = result?;
1741    /// }
1742    /// # Ok(()) }
1743    ///
1744    /// fn prepare_request_builder() -> ListPreviews {
1745    ///   # panic!();
1746    ///   // ... details omitted ...
1747    /// }
1748    /// ```
1749    #[derive(Clone, Debug)]
1750    pub struct ListPreviews(RequestBuilder<crate::model::ListPreviewsRequest>);
1751
1752    impl ListPreviews {
1753        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
1754            Self(RequestBuilder::new(stub))
1755        }
1756
1757        /// Sets the full request, replacing any prior values.
1758        pub fn with_request<V: Into<crate::model::ListPreviewsRequest>>(mut self, v: V) -> Self {
1759            self.0.request = v.into();
1760            self
1761        }
1762
1763        /// Sets all the options, replacing any prior values.
1764        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1765            self.0.options = v.into();
1766            self
1767        }
1768
1769        /// Sends the request.
1770        pub async fn send(self) -> Result<crate::model::ListPreviewsResponse> {
1771            (*self.0.stub)
1772                .list_previews(self.0.request, self.0.options)
1773                .await
1774                .map(gax::response::Response::into_body)
1775        }
1776
1777        /// Streams each page in the collection.
1778        pub fn by_page(
1779            self,
1780        ) -> impl gax::paginator::Paginator<crate::model::ListPreviewsResponse, gax::error::Error>
1781        {
1782            use std::clone::Clone;
1783            let token = self.0.request.page_token.clone();
1784            let execute = move |token: String| {
1785                let mut builder = self.clone();
1786                builder.0.request = builder.0.request.set_page_token(token);
1787                builder.send()
1788            };
1789            gax::paginator::internal::new_paginator(token, execute)
1790        }
1791
1792        /// Streams each item in the collection.
1793        pub fn by_item(
1794            self,
1795        ) -> impl gax::paginator::ItemPaginator<crate::model::ListPreviewsResponse, gax::error::Error>
1796        {
1797            use gax::paginator::Paginator;
1798            self.by_page().items()
1799        }
1800
1801        /// Sets the value of [parent][crate::model::ListPreviewsRequest::parent].
1802        ///
1803        /// This is a **required** field for requests.
1804        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1805            self.0.request.parent = v.into();
1806            self
1807        }
1808
1809        /// Sets the value of [page_size][crate::model::ListPreviewsRequest::page_size].
1810        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1811            self.0.request.page_size = v.into();
1812            self
1813        }
1814
1815        /// Sets the value of [page_token][crate::model::ListPreviewsRequest::page_token].
1816        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1817            self.0.request.page_token = v.into();
1818            self
1819        }
1820
1821        /// Sets the value of [filter][crate::model::ListPreviewsRequest::filter].
1822        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1823            self.0.request.filter = v.into();
1824            self
1825        }
1826
1827        /// Sets the value of [order_by][crate::model::ListPreviewsRequest::order_by].
1828        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1829            self.0.request.order_by = v.into();
1830            self
1831        }
1832    }
1833
1834    #[doc(hidden)]
1835    impl gax::options::internal::RequestBuilder for ListPreviews {
1836        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1837            &mut self.0.options
1838        }
1839    }
1840
1841    /// The request builder for [Config::delete_preview][crate::client::Config::delete_preview] calls.
1842    ///
1843    /// # Example
1844    /// ```
1845    /// # use google_cloud_config_v1::builder::config::DeletePreview;
1846    /// # async fn sample() -> gax::Result<()> {
1847    /// use lro::Poller;
1848    ///
1849    /// let builder = prepare_request_builder();
1850    /// let response = builder.poller().until_done().await?;
1851    /// # Ok(()) }
1852    ///
1853    /// fn prepare_request_builder() -> DeletePreview {
1854    ///   # panic!();
1855    ///   // ... details omitted ...
1856    /// }
1857    /// ```
1858    #[derive(Clone, Debug)]
1859    pub struct DeletePreview(RequestBuilder<crate::model::DeletePreviewRequest>);
1860
1861    impl DeletePreview {
1862        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
1863            Self(RequestBuilder::new(stub))
1864        }
1865
1866        /// Sets the full request, replacing any prior values.
1867        pub fn with_request<V: Into<crate::model::DeletePreviewRequest>>(mut self, v: V) -> Self {
1868            self.0.request = v.into();
1869            self
1870        }
1871
1872        /// Sets all the options, replacing any prior values.
1873        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1874            self.0.options = v.into();
1875            self
1876        }
1877
1878        /// Sends the request.
1879        ///
1880        /// # Long running operations
1881        ///
1882        /// This starts, but does not poll, a longrunning operation. More information
1883        /// on [delete_preview][crate::client::Config::delete_preview].
1884        pub async fn send(self) -> Result<longrunning::model::Operation> {
1885            (*self.0.stub)
1886                .delete_preview(self.0.request, self.0.options)
1887                .await
1888                .map(gax::response::Response::into_body)
1889        }
1890
1891        /// Creates a [Poller][lro::Poller] to work with `delete_preview`.
1892        pub fn poller(
1893            self,
1894        ) -> impl lro::Poller<crate::model::Preview, crate::model::OperationMetadata> {
1895            type Operation =
1896                lro::internal::Operation<crate::model::Preview, crate::model::OperationMetadata>;
1897            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1898            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1899
1900            let stub = self.0.stub.clone();
1901            let mut options = self.0.options.clone();
1902            options.set_retry_policy(gax::retry_policy::NeverRetry);
1903            let query = move |name| {
1904                let stub = stub.clone();
1905                let options = options.clone();
1906                async {
1907                    let op = GetOperation::new(stub)
1908                        .set_name(name)
1909                        .with_options(options)
1910                        .send()
1911                        .await?;
1912                    Ok(Operation::new(op))
1913                }
1914            };
1915
1916            let start = move || async {
1917                let op = self.send().await?;
1918                Ok(Operation::new(op))
1919            };
1920
1921            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1922        }
1923
1924        /// Sets the value of [name][crate::model::DeletePreviewRequest::name].
1925        ///
1926        /// This is a **required** field for requests.
1927        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1928            self.0.request.name = v.into();
1929            self
1930        }
1931
1932        /// Sets the value of [request_id][crate::model::DeletePreviewRequest::request_id].
1933        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1934            self.0.request.request_id = v.into();
1935            self
1936        }
1937    }
1938
1939    #[doc(hidden)]
1940    impl gax::options::internal::RequestBuilder for DeletePreview {
1941        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1942            &mut self.0.options
1943        }
1944    }
1945
1946    /// The request builder for [Config::export_preview_result][crate::client::Config::export_preview_result] calls.
1947    ///
1948    /// # Example
1949    /// ```
1950    /// # use google_cloud_config_v1::builder::config::ExportPreviewResult;
1951    /// # async fn sample() -> gax::Result<()> {
1952    ///
1953    /// let builder = prepare_request_builder();
1954    /// let response = builder.send().await?;
1955    /// # Ok(()) }
1956    ///
1957    /// fn prepare_request_builder() -> ExportPreviewResult {
1958    ///   # panic!();
1959    ///   // ... details omitted ...
1960    /// }
1961    /// ```
1962    #[derive(Clone, Debug)]
1963    pub struct ExportPreviewResult(RequestBuilder<crate::model::ExportPreviewResultRequest>);
1964
1965    impl ExportPreviewResult {
1966        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
1967            Self(RequestBuilder::new(stub))
1968        }
1969
1970        /// Sets the full request, replacing any prior values.
1971        pub fn with_request<V: Into<crate::model::ExportPreviewResultRequest>>(
1972            mut self,
1973            v: V,
1974        ) -> Self {
1975            self.0.request = v.into();
1976            self
1977        }
1978
1979        /// Sets all the options, replacing any prior values.
1980        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1981            self.0.options = v.into();
1982            self
1983        }
1984
1985        /// Sends the request.
1986        pub async fn send(self) -> Result<crate::model::ExportPreviewResultResponse> {
1987            (*self.0.stub)
1988                .export_preview_result(self.0.request, self.0.options)
1989                .await
1990                .map(gax::response::Response::into_body)
1991        }
1992
1993        /// Sets the value of [parent][crate::model::ExportPreviewResultRequest::parent].
1994        ///
1995        /// This is a **required** field for requests.
1996        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1997            self.0.request.parent = v.into();
1998            self
1999        }
2000    }
2001
2002    #[doc(hidden)]
2003    impl gax::options::internal::RequestBuilder for ExportPreviewResult {
2004        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2005            &mut self.0.options
2006        }
2007    }
2008
2009    /// The request builder for [Config::list_terraform_versions][crate::client::Config::list_terraform_versions] calls.
2010    ///
2011    /// # Example
2012    /// ```
2013    /// # use google_cloud_config_v1::builder::config::ListTerraformVersions;
2014    /// # async fn sample() -> gax::Result<()> {
2015    /// use gax::paginator::ItemPaginator;
2016    ///
2017    /// let builder = prepare_request_builder();
2018    /// let mut items = builder.by_item();
2019    /// while let Some(result) = items.next().await {
2020    ///   let item = result?;
2021    /// }
2022    /// # Ok(()) }
2023    ///
2024    /// fn prepare_request_builder() -> ListTerraformVersions {
2025    ///   # panic!();
2026    ///   // ... details omitted ...
2027    /// }
2028    /// ```
2029    #[derive(Clone, Debug)]
2030    pub struct ListTerraformVersions(RequestBuilder<crate::model::ListTerraformVersionsRequest>);
2031
2032    impl ListTerraformVersions {
2033        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2034            Self(RequestBuilder::new(stub))
2035        }
2036
2037        /// Sets the full request, replacing any prior values.
2038        pub fn with_request<V: Into<crate::model::ListTerraformVersionsRequest>>(
2039            mut self,
2040            v: V,
2041        ) -> 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::ListTerraformVersionsResponse> {
2054            (*self.0.stub)
2055                .list_terraform_versions(self.0.request, self.0.options)
2056                .await
2057                .map(gax::response::Response::into_body)
2058        }
2059
2060        /// Streams each page in the collection.
2061        pub fn by_page(
2062            self,
2063        ) -> impl gax::paginator::Paginator<crate::model::ListTerraformVersionsResponse, gax::error::Error>
2064        {
2065            use std::clone::Clone;
2066            let token = self.0.request.page_token.clone();
2067            let execute = move |token: String| {
2068                let mut builder = self.clone();
2069                builder.0.request = builder.0.request.set_page_token(token);
2070                builder.send()
2071            };
2072            gax::paginator::internal::new_paginator(token, execute)
2073        }
2074
2075        /// Streams each item in the collection.
2076        pub fn by_item(
2077            self,
2078        ) -> impl gax::paginator::ItemPaginator<
2079            crate::model::ListTerraformVersionsResponse,
2080            gax::error::Error,
2081        > {
2082            use gax::paginator::Paginator;
2083            self.by_page().items()
2084        }
2085
2086        /// Sets the value of [parent][crate::model::ListTerraformVersionsRequest::parent].
2087        ///
2088        /// This is a **required** field for requests.
2089        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2090            self.0.request.parent = v.into();
2091            self
2092        }
2093
2094        /// Sets the value of [page_size][crate::model::ListTerraformVersionsRequest::page_size].
2095        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2096            self.0.request.page_size = v.into();
2097            self
2098        }
2099
2100        /// Sets the value of [page_token][crate::model::ListTerraformVersionsRequest::page_token].
2101        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2102            self.0.request.page_token = v.into();
2103            self
2104        }
2105
2106        /// Sets the value of [filter][crate::model::ListTerraformVersionsRequest::filter].
2107        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2108            self.0.request.filter = v.into();
2109            self
2110        }
2111
2112        /// Sets the value of [order_by][crate::model::ListTerraformVersionsRequest::order_by].
2113        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2114            self.0.request.order_by = v.into();
2115            self
2116        }
2117    }
2118
2119    #[doc(hidden)]
2120    impl gax::options::internal::RequestBuilder for ListTerraformVersions {
2121        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2122            &mut self.0.options
2123        }
2124    }
2125
2126    /// The request builder for [Config::get_terraform_version][crate::client::Config::get_terraform_version] calls.
2127    ///
2128    /// # Example
2129    /// ```
2130    /// # use google_cloud_config_v1::builder::config::GetTerraformVersion;
2131    /// # async fn sample() -> gax::Result<()> {
2132    ///
2133    /// let builder = prepare_request_builder();
2134    /// let response = builder.send().await?;
2135    /// # Ok(()) }
2136    ///
2137    /// fn prepare_request_builder() -> GetTerraformVersion {
2138    ///   # panic!();
2139    ///   // ... details omitted ...
2140    /// }
2141    /// ```
2142    #[derive(Clone, Debug)]
2143    pub struct GetTerraformVersion(RequestBuilder<crate::model::GetTerraformVersionRequest>);
2144
2145    impl GetTerraformVersion {
2146        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2147            Self(RequestBuilder::new(stub))
2148        }
2149
2150        /// Sets the full request, replacing any prior values.
2151        pub fn with_request<V: Into<crate::model::GetTerraformVersionRequest>>(
2152            mut self,
2153            v: V,
2154        ) -> Self {
2155            self.0.request = v.into();
2156            self
2157        }
2158
2159        /// Sets all the options, replacing any prior values.
2160        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2161            self.0.options = v.into();
2162            self
2163        }
2164
2165        /// Sends the request.
2166        pub async fn send(self) -> Result<crate::model::TerraformVersion> {
2167            (*self.0.stub)
2168                .get_terraform_version(self.0.request, self.0.options)
2169                .await
2170                .map(gax::response::Response::into_body)
2171        }
2172
2173        /// Sets the value of [name][crate::model::GetTerraformVersionRequest::name].
2174        ///
2175        /// This is a **required** field for requests.
2176        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2177            self.0.request.name = v.into();
2178            self
2179        }
2180    }
2181
2182    #[doc(hidden)]
2183    impl gax::options::internal::RequestBuilder for GetTerraformVersion {
2184        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2185            &mut self.0.options
2186        }
2187    }
2188
2189    /// The request builder for [Config::list_resource_changes][crate::client::Config::list_resource_changes] calls.
2190    ///
2191    /// # Example
2192    /// ```
2193    /// # use google_cloud_config_v1::builder::config::ListResourceChanges;
2194    /// # async fn sample() -> gax::Result<()> {
2195    /// use gax::paginator::ItemPaginator;
2196    ///
2197    /// let builder = prepare_request_builder();
2198    /// let mut items = builder.by_item();
2199    /// while let Some(result) = items.next().await {
2200    ///   let item = result?;
2201    /// }
2202    /// # Ok(()) }
2203    ///
2204    /// fn prepare_request_builder() -> ListResourceChanges {
2205    ///   # panic!();
2206    ///   // ... details omitted ...
2207    /// }
2208    /// ```
2209    #[derive(Clone, Debug)]
2210    pub struct ListResourceChanges(RequestBuilder<crate::model::ListResourceChangesRequest>);
2211
2212    impl ListResourceChanges {
2213        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2214            Self(RequestBuilder::new(stub))
2215        }
2216
2217        /// Sets the full request, replacing any prior values.
2218        pub fn with_request<V: Into<crate::model::ListResourceChangesRequest>>(
2219            mut self,
2220            v: V,
2221        ) -> Self {
2222            self.0.request = v.into();
2223            self
2224        }
2225
2226        /// Sets all the options, replacing any prior values.
2227        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2228            self.0.options = v.into();
2229            self
2230        }
2231
2232        /// Sends the request.
2233        pub async fn send(self) -> Result<crate::model::ListResourceChangesResponse> {
2234            (*self.0.stub)
2235                .list_resource_changes(self.0.request, self.0.options)
2236                .await
2237                .map(gax::response::Response::into_body)
2238        }
2239
2240        /// Streams each page in the collection.
2241        pub fn by_page(
2242            self,
2243        ) -> impl gax::paginator::Paginator<crate::model::ListResourceChangesResponse, gax::error::Error>
2244        {
2245            use std::clone::Clone;
2246            let token = self.0.request.page_token.clone();
2247            let execute = move |token: String| {
2248                let mut builder = self.clone();
2249                builder.0.request = builder.0.request.set_page_token(token);
2250                builder.send()
2251            };
2252            gax::paginator::internal::new_paginator(token, execute)
2253        }
2254
2255        /// Streams each item in the collection.
2256        pub fn by_item(
2257            self,
2258        ) -> impl gax::paginator::ItemPaginator<
2259            crate::model::ListResourceChangesResponse,
2260            gax::error::Error,
2261        > {
2262            use gax::paginator::Paginator;
2263            self.by_page().items()
2264        }
2265
2266        /// Sets the value of [parent][crate::model::ListResourceChangesRequest::parent].
2267        ///
2268        /// This is a **required** field for requests.
2269        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2270            self.0.request.parent = v.into();
2271            self
2272        }
2273
2274        /// Sets the value of [page_size][crate::model::ListResourceChangesRequest::page_size].
2275        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2276            self.0.request.page_size = v.into();
2277            self
2278        }
2279
2280        /// Sets the value of [page_token][crate::model::ListResourceChangesRequest::page_token].
2281        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2282            self.0.request.page_token = v.into();
2283            self
2284        }
2285
2286        /// Sets the value of [filter][crate::model::ListResourceChangesRequest::filter].
2287        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2288            self.0.request.filter = v.into();
2289            self
2290        }
2291
2292        /// Sets the value of [order_by][crate::model::ListResourceChangesRequest::order_by].
2293        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2294            self.0.request.order_by = v.into();
2295            self
2296        }
2297    }
2298
2299    #[doc(hidden)]
2300    impl gax::options::internal::RequestBuilder for ListResourceChanges {
2301        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2302            &mut self.0.options
2303        }
2304    }
2305
2306    /// The request builder for [Config::get_resource_change][crate::client::Config::get_resource_change] calls.
2307    ///
2308    /// # Example
2309    /// ```
2310    /// # use google_cloud_config_v1::builder::config::GetResourceChange;
2311    /// # async fn sample() -> gax::Result<()> {
2312    ///
2313    /// let builder = prepare_request_builder();
2314    /// let response = builder.send().await?;
2315    /// # Ok(()) }
2316    ///
2317    /// fn prepare_request_builder() -> GetResourceChange {
2318    ///   # panic!();
2319    ///   // ... details omitted ...
2320    /// }
2321    /// ```
2322    #[derive(Clone, Debug)]
2323    pub struct GetResourceChange(RequestBuilder<crate::model::GetResourceChangeRequest>);
2324
2325    impl GetResourceChange {
2326        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2327            Self(RequestBuilder::new(stub))
2328        }
2329
2330        /// Sets the full request, replacing any prior values.
2331        pub fn with_request<V: Into<crate::model::GetResourceChangeRequest>>(
2332            mut self,
2333            v: V,
2334        ) -> Self {
2335            self.0.request = v.into();
2336            self
2337        }
2338
2339        /// Sets all the options, replacing any prior values.
2340        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2341            self.0.options = v.into();
2342            self
2343        }
2344
2345        /// Sends the request.
2346        pub async fn send(self) -> Result<crate::model::ResourceChange> {
2347            (*self.0.stub)
2348                .get_resource_change(self.0.request, self.0.options)
2349                .await
2350                .map(gax::response::Response::into_body)
2351        }
2352
2353        /// Sets the value of [name][crate::model::GetResourceChangeRequest::name].
2354        ///
2355        /// This is a **required** field for requests.
2356        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2357            self.0.request.name = v.into();
2358            self
2359        }
2360    }
2361
2362    #[doc(hidden)]
2363    impl gax::options::internal::RequestBuilder for GetResourceChange {
2364        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2365            &mut self.0.options
2366        }
2367    }
2368
2369    /// The request builder for [Config::list_resource_drifts][crate::client::Config::list_resource_drifts] calls.
2370    ///
2371    /// # Example
2372    /// ```
2373    /// # use google_cloud_config_v1::builder::config::ListResourceDrifts;
2374    /// # async fn sample() -> gax::Result<()> {
2375    /// use gax::paginator::ItemPaginator;
2376    ///
2377    /// let builder = prepare_request_builder();
2378    /// let mut items = builder.by_item();
2379    /// while let Some(result) = items.next().await {
2380    ///   let item = result?;
2381    /// }
2382    /// # Ok(()) }
2383    ///
2384    /// fn prepare_request_builder() -> ListResourceDrifts {
2385    ///   # panic!();
2386    ///   // ... details omitted ...
2387    /// }
2388    /// ```
2389    #[derive(Clone, Debug)]
2390    pub struct ListResourceDrifts(RequestBuilder<crate::model::ListResourceDriftsRequest>);
2391
2392    impl ListResourceDrifts {
2393        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2394            Self(RequestBuilder::new(stub))
2395        }
2396
2397        /// Sets the full request, replacing any prior values.
2398        pub fn with_request<V: Into<crate::model::ListResourceDriftsRequest>>(
2399            mut self,
2400            v: V,
2401        ) -> Self {
2402            self.0.request = v.into();
2403            self
2404        }
2405
2406        /// Sets all the options, replacing any prior values.
2407        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2408            self.0.options = v.into();
2409            self
2410        }
2411
2412        /// Sends the request.
2413        pub async fn send(self) -> Result<crate::model::ListResourceDriftsResponse> {
2414            (*self.0.stub)
2415                .list_resource_drifts(self.0.request, self.0.options)
2416                .await
2417                .map(gax::response::Response::into_body)
2418        }
2419
2420        /// Streams each page in the collection.
2421        pub fn by_page(
2422            self,
2423        ) -> impl gax::paginator::Paginator<crate::model::ListResourceDriftsResponse, gax::error::Error>
2424        {
2425            use std::clone::Clone;
2426            let token = self.0.request.page_token.clone();
2427            let execute = move |token: String| {
2428                let mut builder = self.clone();
2429                builder.0.request = builder.0.request.set_page_token(token);
2430                builder.send()
2431            };
2432            gax::paginator::internal::new_paginator(token, execute)
2433        }
2434
2435        /// Streams each item in the collection.
2436        pub fn by_item(
2437            self,
2438        ) -> impl gax::paginator::ItemPaginator<
2439            crate::model::ListResourceDriftsResponse,
2440            gax::error::Error,
2441        > {
2442            use gax::paginator::Paginator;
2443            self.by_page().items()
2444        }
2445
2446        /// Sets the value of [parent][crate::model::ListResourceDriftsRequest::parent].
2447        ///
2448        /// This is a **required** field for requests.
2449        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2450            self.0.request.parent = v.into();
2451            self
2452        }
2453
2454        /// Sets the value of [page_size][crate::model::ListResourceDriftsRequest::page_size].
2455        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2456            self.0.request.page_size = v.into();
2457            self
2458        }
2459
2460        /// Sets the value of [page_token][crate::model::ListResourceDriftsRequest::page_token].
2461        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2462            self.0.request.page_token = v.into();
2463            self
2464        }
2465
2466        /// Sets the value of [filter][crate::model::ListResourceDriftsRequest::filter].
2467        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2468            self.0.request.filter = v.into();
2469            self
2470        }
2471
2472        /// Sets the value of [order_by][crate::model::ListResourceDriftsRequest::order_by].
2473        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2474            self.0.request.order_by = v.into();
2475            self
2476        }
2477    }
2478
2479    #[doc(hidden)]
2480    impl gax::options::internal::RequestBuilder for ListResourceDrifts {
2481        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2482            &mut self.0.options
2483        }
2484    }
2485
2486    /// The request builder for [Config::get_resource_drift][crate::client::Config::get_resource_drift] calls.
2487    ///
2488    /// # Example
2489    /// ```
2490    /// # use google_cloud_config_v1::builder::config::GetResourceDrift;
2491    /// # async fn sample() -> gax::Result<()> {
2492    ///
2493    /// let builder = prepare_request_builder();
2494    /// let response = builder.send().await?;
2495    /// # Ok(()) }
2496    ///
2497    /// fn prepare_request_builder() -> GetResourceDrift {
2498    ///   # panic!();
2499    ///   // ... details omitted ...
2500    /// }
2501    /// ```
2502    #[derive(Clone, Debug)]
2503    pub struct GetResourceDrift(RequestBuilder<crate::model::GetResourceDriftRequest>);
2504
2505    impl GetResourceDrift {
2506        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2507            Self(RequestBuilder::new(stub))
2508        }
2509
2510        /// Sets the full request, replacing any prior values.
2511        pub fn with_request<V: Into<crate::model::GetResourceDriftRequest>>(
2512            mut self,
2513            v: V,
2514        ) -> Self {
2515            self.0.request = v.into();
2516            self
2517        }
2518
2519        /// Sets all the options, replacing any prior values.
2520        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2521            self.0.options = v.into();
2522            self
2523        }
2524
2525        /// Sends the request.
2526        pub async fn send(self) -> Result<crate::model::ResourceDrift> {
2527            (*self.0.stub)
2528                .get_resource_drift(self.0.request, self.0.options)
2529                .await
2530                .map(gax::response::Response::into_body)
2531        }
2532
2533        /// Sets the value of [name][crate::model::GetResourceDriftRequest::name].
2534        ///
2535        /// This is a **required** field for requests.
2536        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2537            self.0.request.name = v.into();
2538            self
2539        }
2540    }
2541
2542    #[doc(hidden)]
2543    impl gax::options::internal::RequestBuilder for GetResourceDrift {
2544        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2545            &mut self.0.options
2546        }
2547    }
2548
2549    /// The request builder for [Config::get_auto_migration_config][crate::client::Config::get_auto_migration_config] calls.
2550    ///
2551    /// # Example
2552    /// ```
2553    /// # use google_cloud_config_v1::builder::config::GetAutoMigrationConfig;
2554    /// # async fn sample() -> gax::Result<()> {
2555    ///
2556    /// let builder = prepare_request_builder();
2557    /// let response = builder.send().await?;
2558    /// # Ok(()) }
2559    ///
2560    /// fn prepare_request_builder() -> GetAutoMigrationConfig {
2561    ///   # panic!();
2562    ///   // ... details omitted ...
2563    /// }
2564    /// ```
2565    #[derive(Clone, Debug)]
2566    pub struct GetAutoMigrationConfig(RequestBuilder<crate::model::GetAutoMigrationConfigRequest>);
2567
2568    impl GetAutoMigrationConfig {
2569        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2570            Self(RequestBuilder::new(stub))
2571        }
2572
2573        /// Sets the full request, replacing any prior values.
2574        pub fn with_request<V: Into<crate::model::GetAutoMigrationConfigRequest>>(
2575            mut self,
2576            v: V,
2577        ) -> Self {
2578            self.0.request = v.into();
2579            self
2580        }
2581
2582        /// Sets all the options, replacing any prior values.
2583        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2584            self.0.options = v.into();
2585            self
2586        }
2587
2588        /// Sends the request.
2589        pub async fn send(self) -> Result<crate::model::AutoMigrationConfig> {
2590            (*self.0.stub)
2591                .get_auto_migration_config(self.0.request, self.0.options)
2592                .await
2593                .map(gax::response::Response::into_body)
2594        }
2595
2596        /// Sets the value of [name][crate::model::GetAutoMigrationConfigRequest::name].
2597        ///
2598        /// This is a **required** field for requests.
2599        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2600            self.0.request.name = v.into();
2601            self
2602        }
2603    }
2604
2605    #[doc(hidden)]
2606    impl gax::options::internal::RequestBuilder for GetAutoMigrationConfig {
2607        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2608            &mut self.0.options
2609        }
2610    }
2611
2612    /// The request builder for [Config::update_auto_migration_config][crate::client::Config::update_auto_migration_config] calls.
2613    ///
2614    /// # Example
2615    /// ```
2616    /// # use google_cloud_config_v1::builder::config::UpdateAutoMigrationConfig;
2617    /// # async fn sample() -> gax::Result<()> {
2618    /// use lro::Poller;
2619    ///
2620    /// let builder = prepare_request_builder();
2621    /// let response = builder.poller().until_done().await?;
2622    /// # Ok(()) }
2623    ///
2624    /// fn prepare_request_builder() -> UpdateAutoMigrationConfig {
2625    ///   # panic!();
2626    ///   // ... details omitted ...
2627    /// }
2628    /// ```
2629    #[derive(Clone, Debug)]
2630    pub struct UpdateAutoMigrationConfig(
2631        RequestBuilder<crate::model::UpdateAutoMigrationConfigRequest>,
2632    );
2633
2634    impl UpdateAutoMigrationConfig {
2635        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2636            Self(RequestBuilder::new(stub))
2637        }
2638
2639        /// Sets the full request, replacing any prior values.
2640        pub fn with_request<V: Into<crate::model::UpdateAutoMigrationConfigRequest>>(
2641            mut self,
2642            v: V,
2643        ) -> Self {
2644            self.0.request = v.into();
2645            self
2646        }
2647
2648        /// Sets all the options, replacing any prior values.
2649        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2650            self.0.options = v.into();
2651            self
2652        }
2653
2654        /// Sends the request.
2655        ///
2656        /// # Long running operations
2657        ///
2658        /// This starts, but does not poll, a longrunning operation. More information
2659        /// on [update_auto_migration_config][crate::client::Config::update_auto_migration_config].
2660        pub async fn send(self) -> Result<longrunning::model::Operation> {
2661            (*self.0.stub)
2662                .update_auto_migration_config(self.0.request, self.0.options)
2663                .await
2664                .map(gax::response::Response::into_body)
2665        }
2666
2667        /// Creates a [Poller][lro::Poller] to work with `update_auto_migration_config`.
2668        pub fn poller(
2669            self,
2670        ) -> impl lro::Poller<crate::model::AutoMigrationConfig, crate::model::OperationMetadata>
2671        {
2672            type Operation = lro::internal::Operation<
2673                crate::model::AutoMigrationConfig,
2674                crate::model::OperationMetadata,
2675            >;
2676            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2677            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2678
2679            let stub = self.0.stub.clone();
2680            let mut options = self.0.options.clone();
2681            options.set_retry_policy(gax::retry_policy::NeverRetry);
2682            let query = move |name| {
2683                let stub = stub.clone();
2684                let options = options.clone();
2685                async {
2686                    let op = GetOperation::new(stub)
2687                        .set_name(name)
2688                        .with_options(options)
2689                        .send()
2690                        .await?;
2691                    Ok(Operation::new(op))
2692                }
2693            };
2694
2695            let start = move || async {
2696                let op = self.send().await?;
2697                Ok(Operation::new(op))
2698            };
2699
2700            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2701        }
2702
2703        /// Sets the value of [update_mask][crate::model::UpdateAutoMigrationConfigRequest::update_mask].
2704        pub fn set_update_mask<T>(mut self, v: T) -> Self
2705        where
2706            T: std::convert::Into<wkt::FieldMask>,
2707        {
2708            self.0.request.update_mask = std::option::Option::Some(v.into());
2709            self
2710        }
2711
2712        /// Sets or clears the value of [update_mask][crate::model::UpdateAutoMigrationConfigRequest::update_mask].
2713        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2714        where
2715            T: std::convert::Into<wkt::FieldMask>,
2716        {
2717            self.0.request.update_mask = v.map(|x| x.into());
2718            self
2719        }
2720
2721        /// Sets the value of [auto_migration_config][crate::model::UpdateAutoMigrationConfigRequest::auto_migration_config].
2722        ///
2723        /// This is a **required** field for requests.
2724        pub fn set_auto_migration_config<T>(mut self, v: T) -> Self
2725        where
2726            T: std::convert::Into<crate::model::AutoMigrationConfig>,
2727        {
2728            self.0.request.auto_migration_config = std::option::Option::Some(v.into());
2729            self
2730        }
2731
2732        /// Sets or clears the value of [auto_migration_config][crate::model::UpdateAutoMigrationConfigRequest::auto_migration_config].
2733        ///
2734        /// This is a **required** field for requests.
2735        pub fn set_or_clear_auto_migration_config<T>(mut self, v: std::option::Option<T>) -> Self
2736        where
2737            T: std::convert::Into<crate::model::AutoMigrationConfig>,
2738        {
2739            self.0.request.auto_migration_config = v.map(|x| x.into());
2740            self
2741        }
2742    }
2743
2744    #[doc(hidden)]
2745    impl gax::options::internal::RequestBuilder for UpdateAutoMigrationConfig {
2746        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2747            &mut self.0.options
2748        }
2749    }
2750
2751    /// The request builder for [Config::list_locations][crate::client::Config::list_locations] calls.
2752    ///
2753    /// # Example
2754    /// ```
2755    /// # use google_cloud_config_v1::builder::config::ListLocations;
2756    /// # async fn sample() -> gax::Result<()> {
2757    /// use gax::paginator::ItemPaginator;
2758    ///
2759    /// let builder = prepare_request_builder();
2760    /// let mut items = builder.by_item();
2761    /// while let Some(result) = items.next().await {
2762    ///   let item = result?;
2763    /// }
2764    /// # Ok(()) }
2765    ///
2766    /// fn prepare_request_builder() -> ListLocations {
2767    ///   # panic!();
2768    ///   // ... details omitted ...
2769    /// }
2770    /// ```
2771    #[derive(Clone, Debug)]
2772    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
2773
2774    impl ListLocations {
2775        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2776            Self(RequestBuilder::new(stub))
2777        }
2778
2779        /// Sets the full request, replacing any prior values.
2780        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
2781            mut self,
2782            v: V,
2783        ) -> Self {
2784            self.0.request = v.into();
2785            self
2786        }
2787
2788        /// Sets all the options, replacing any prior values.
2789        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2790            self.0.options = v.into();
2791            self
2792        }
2793
2794        /// Sends the request.
2795        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
2796            (*self.0.stub)
2797                .list_locations(self.0.request, self.0.options)
2798                .await
2799                .map(gax::response::Response::into_body)
2800        }
2801
2802        /// Streams each page in the collection.
2803        pub fn by_page(
2804            self,
2805        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
2806        {
2807            use std::clone::Clone;
2808            let token = self.0.request.page_token.clone();
2809            let execute = move |token: String| {
2810                let mut builder = self.clone();
2811                builder.0.request = builder.0.request.set_page_token(token);
2812                builder.send()
2813            };
2814            gax::paginator::internal::new_paginator(token, execute)
2815        }
2816
2817        /// Streams each item in the collection.
2818        pub fn by_item(
2819            self,
2820        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
2821        {
2822            use gax::paginator::Paginator;
2823            self.by_page().items()
2824        }
2825
2826        /// Sets the value of [name][location::model::ListLocationsRequest::name].
2827        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2828            self.0.request.name = v.into();
2829            self
2830        }
2831
2832        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
2833        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2834            self.0.request.filter = v.into();
2835            self
2836        }
2837
2838        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
2839        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2840            self.0.request.page_size = v.into();
2841            self
2842        }
2843
2844        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
2845        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2846            self.0.request.page_token = v.into();
2847            self
2848        }
2849    }
2850
2851    #[doc(hidden)]
2852    impl gax::options::internal::RequestBuilder for ListLocations {
2853        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2854            &mut self.0.options
2855        }
2856    }
2857
2858    /// The request builder for [Config::get_location][crate::client::Config::get_location] calls.
2859    ///
2860    /// # Example
2861    /// ```
2862    /// # use google_cloud_config_v1::builder::config::GetLocation;
2863    /// # async fn sample() -> gax::Result<()> {
2864    ///
2865    /// let builder = prepare_request_builder();
2866    /// let response = builder.send().await?;
2867    /// # Ok(()) }
2868    ///
2869    /// fn prepare_request_builder() -> GetLocation {
2870    ///   # panic!();
2871    ///   // ... details omitted ...
2872    /// }
2873    /// ```
2874    #[derive(Clone, Debug)]
2875    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
2876
2877    impl GetLocation {
2878        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2879            Self(RequestBuilder::new(stub))
2880        }
2881
2882        /// Sets the full request, replacing any prior values.
2883        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
2884            self.0.request = v.into();
2885            self
2886        }
2887
2888        /// Sets all the options, replacing any prior values.
2889        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2890            self.0.options = v.into();
2891            self
2892        }
2893
2894        /// Sends the request.
2895        pub async fn send(self) -> Result<location::model::Location> {
2896            (*self.0.stub)
2897                .get_location(self.0.request, self.0.options)
2898                .await
2899                .map(gax::response::Response::into_body)
2900        }
2901
2902        /// Sets the value of [name][location::model::GetLocationRequest::name].
2903        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2904            self.0.request.name = v.into();
2905            self
2906        }
2907    }
2908
2909    #[doc(hidden)]
2910    impl gax::options::internal::RequestBuilder for GetLocation {
2911        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2912            &mut self.0.options
2913        }
2914    }
2915
2916    /// The request builder for [Config::set_iam_policy][crate::client::Config::set_iam_policy] calls.
2917    ///
2918    /// # Example
2919    /// ```
2920    /// # use google_cloud_config_v1::builder::config::SetIamPolicy;
2921    /// # async fn sample() -> gax::Result<()> {
2922    ///
2923    /// let builder = prepare_request_builder();
2924    /// let response = builder.send().await?;
2925    /// # Ok(()) }
2926    ///
2927    /// fn prepare_request_builder() -> SetIamPolicy {
2928    ///   # panic!();
2929    ///   // ... details omitted ...
2930    /// }
2931    /// ```
2932    #[derive(Clone, Debug)]
2933    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
2934
2935    impl SetIamPolicy {
2936        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2937            Self(RequestBuilder::new(stub))
2938        }
2939
2940        /// Sets the full request, replacing any prior values.
2941        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
2942            self.0.request = v.into();
2943            self
2944        }
2945
2946        /// Sets all the options, replacing any prior values.
2947        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2948            self.0.options = v.into();
2949            self
2950        }
2951
2952        /// Sends the request.
2953        pub async fn send(self) -> Result<iam_v1::model::Policy> {
2954            (*self.0.stub)
2955                .set_iam_policy(self.0.request, self.0.options)
2956                .await
2957                .map(gax::response::Response::into_body)
2958        }
2959
2960        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
2961        ///
2962        /// This is a **required** field for requests.
2963        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
2964            self.0.request.resource = v.into();
2965            self
2966        }
2967
2968        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
2969        ///
2970        /// This is a **required** field for requests.
2971        pub fn set_policy<T>(mut self, v: T) -> Self
2972        where
2973            T: std::convert::Into<iam_v1::model::Policy>,
2974        {
2975            self.0.request.policy = std::option::Option::Some(v.into());
2976            self
2977        }
2978
2979        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
2980        ///
2981        /// This is a **required** field for requests.
2982        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
2983        where
2984            T: std::convert::Into<iam_v1::model::Policy>,
2985        {
2986            self.0.request.policy = v.map(|x| x.into());
2987            self
2988        }
2989
2990        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
2991        pub fn set_update_mask<T>(mut self, v: T) -> Self
2992        where
2993            T: std::convert::Into<wkt::FieldMask>,
2994        {
2995            self.0.request.update_mask = std::option::Option::Some(v.into());
2996            self
2997        }
2998
2999        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
3000        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3001        where
3002            T: std::convert::Into<wkt::FieldMask>,
3003        {
3004            self.0.request.update_mask = v.map(|x| x.into());
3005            self
3006        }
3007    }
3008
3009    #[doc(hidden)]
3010    impl gax::options::internal::RequestBuilder for SetIamPolicy {
3011        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3012            &mut self.0.options
3013        }
3014    }
3015
3016    /// The request builder for [Config::get_iam_policy][crate::client::Config::get_iam_policy] calls.
3017    ///
3018    /// # Example
3019    /// ```
3020    /// # use google_cloud_config_v1::builder::config::GetIamPolicy;
3021    /// # async fn sample() -> gax::Result<()> {
3022    ///
3023    /// let builder = prepare_request_builder();
3024    /// let response = builder.send().await?;
3025    /// # Ok(()) }
3026    ///
3027    /// fn prepare_request_builder() -> GetIamPolicy {
3028    ///   # panic!();
3029    ///   // ... details omitted ...
3030    /// }
3031    /// ```
3032    #[derive(Clone, Debug)]
3033    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
3034
3035    impl GetIamPolicy {
3036        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
3037            Self(RequestBuilder::new(stub))
3038        }
3039
3040        /// Sets the full request, replacing any prior values.
3041        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
3042            self.0.request = v.into();
3043            self
3044        }
3045
3046        /// Sets all the options, replacing any prior values.
3047        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3048            self.0.options = v.into();
3049            self
3050        }
3051
3052        /// Sends the request.
3053        pub async fn send(self) -> Result<iam_v1::model::Policy> {
3054            (*self.0.stub)
3055                .get_iam_policy(self.0.request, self.0.options)
3056                .await
3057                .map(gax::response::Response::into_body)
3058        }
3059
3060        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
3061        ///
3062        /// This is a **required** field for requests.
3063        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
3064            self.0.request.resource = v.into();
3065            self
3066        }
3067
3068        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
3069        pub fn set_options<T>(mut self, v: T) -> Self
3070        where
3071            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
3072        {
3073            self.0.request.options = std::option::Option::Some(v.into());
3074            self
3075        }
3076
3077        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
3078        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
3079        where
3080            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
3081        {
3082            self.0.request.options = v.map(|x| x.into());
3083            self
3084        }
3085    }
3086
3087    #[doc(hidden)]
3088    impl gax::options::internal::RequestBuilder for GetIamPolicy {
3089        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3090            &mut self.0.options
3091        }
3092    }
3093
3094    /// The request builder for [Config::test_iam_permissions][crate::client::Config::test_iam_permissions] calls.
3095    ///
3096    /// # Example
3097    /// ```
3098    /// # use google_cloud_config_v1::builder::config::TestIamPermissions;
3099    /// # async fn sample() -> gax::Result<()> {
3100    ///
3101    /// let builder = prepare_request_builder();
3102    /// let response = builder.send().await?;
3103    /// # Ok(()) }
3104    ///
3105    /// fn prepare_request_builder() -> TestIamPermissions {
3106    ///   # panic!();
3107    ///   // ... details omitted ...
3108    /// }
3109    /// ```
3110    #[derive(Clone, Debug)]
3111    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
3112
3113    impl TestIamPermissions {
3114        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
3115            Self(RequestBuilder::new(stub))
3116        }
3117
3118        /// Sets the full request, replacing any prior values.
3119        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
3120            mut self,
3121            v: V,
3122        ) -> Self {
3123            self.0.request = v.into();
3124            self
3125        }
3126
3127        /// Sets all the options, replacing any prior values.
3128        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3129            self.0.options = v.into();
3130            self
3131        }
3132
3133        /// Sends the request.
3134        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
3135            (*self.0.stub)
3136                .test_iam_permissions(self.0.request, self.0.options)
3137                .await
3138                .map(gax::response::Response::into_body)
3139        }
3140
3141        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
3142        ///
3143        /// This is a **required** field for requests.
3144        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
3145            self.0.request.resource = v.into();
3146            self
3147        }
3148
3149        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
3150        ///
3151        /// This is a **required** field for requests.
3152        pub fn set_permissions<T, V>(mut self, v: T) -> Self
3153        where
3154            T: std::iter::IntoIterator<Item = V>,
3155            V: std::convert::Into<std::string::String>,
3156        {
3157            use std::iter::Iterator;
3158            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
3159            self
3160        }
3161    }
3162
3163    #[doc(hidden)]
3164    impl gax::options::internal::RequestBuilder for TestIamPermissions {
3165        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3166            &mut self.0.options
3167        }
3168    }
3169
3170    /// The request builder for [Config::list_operations][crate::client::Config::list_operations] calls.
3171    ///
3172    /// # Example
3173    /// ```
3174    /// # use google_cloud_config_v1::builder::config::ListOperations;
3175    /// # async fn sample() -> gax::Result<()> {
3176    /// use gax::paginator::ItemPaginator;
3177    ///
3178    /// let builder = prepare_request_builder();
3179    /// let mut items = builder.by_item();
3180    /// while let Some(result) = items.next().await {
3181    ///   let item = result?;
3182    /// }
3183    /// # Ok(()) }
3184    ///
3185    /// fn prepare_request_builder() -> ListOperations {
3186    ///   # panic!();
3187    ///   // ... details omitted ...
3188    /// }
3189    /// ```
3190    #[derive(Clone, Debug)]
3191    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
3192
3193    impl ListOperations {
3194        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
3195            Self(RequestBuilder::new(stub))
3196        }
3197
3198        /// Sets the full request, replacing any prior values.
3199        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
3200            mut self,
3201            v: V,
3202        ) -> Self {
3203            self.0.request = v.into();
3204            self
3205        }
3206
3207        /// Sets all the options, replacing any prior values.
3208        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3209            self.0.options = v.into();
3210            self
3211        }
3212
3213        /// Sends the request.
3214        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
3215            (*self.0.stub)
3216                .list_operations(self.0.request, self.0.options)
3217                .await
3218                .map(gax::response::Response::into_body)
3219        }
3220
3221        /// Streams each page in the collection.
3222        pub fn by_page(
3223            self,
3224        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
3225        {
3226            use std::clone::Clone;
3227            let token = self.0.request.page_token.clone();
3228            let execute = move |token: String| {
3229                let mut builder = self.clone();
3230                builder.0.request = builder.0.request.set_page_token(token);
3231                builder.send()
3232            };
3233            gax::paginator::internal::new_paginator(token, execute)
3234        }
3235
3236        /// Streams each item in the collection.
3237        pub fn by_item(
3238            self,
3239        ) -> impl gax::paginator::ItemPaginator<
3240            longrunning::model::ListOperationsResponse,
3241            gax::error::Error,
3242        > {
3243            use gax::paginator::Paginator;
3244            self.by_page().items()
3245        }
3246
3247        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
3248        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3249            self.0.request.name = v.into();
3250            self
3251        }
3252
3253        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
3254        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3255            self.0.request.filter = v.into();
3256            self
3257        }
3258
3259        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
3260        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3261            self.0.request.page_size = v.into();
3262            self
3263        }
3264
3265        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
3266        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3267            self.0.request.page_token = v.into();
3268            self
3269        }
3270
3271        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
3272        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
3273            self.0.request.return_partial_success = v.into();
3274            self
3275        }
3276    }
3277
3278    #[doc(hidden)]
3279    impl gax::options::internal::RequestBuilder for ListOperations {
3280        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3281            &mut self.0.options
3282        }
3283    }
3284
3285    /// The request builder for [Config::get_operation][crate::client::Config::get_operation] calls.
3286    ///
3287    /// # Example
3288    /// ```
3289    /// # use google_cloud_config_v1::builder::config::GetOperation;
3290    /// # async fn sample() -> gax::Result<()> {
3291    ///
3292    /// let builder = prepare_request_builder();
3293    /// let response = builder.send().await?;
3294    /// # Ok(()) }
3295    ///
3296    /// fn prepare_request_builder() -> GetOperation {
3297    ///   # panic!();
3298    ///   // ... details omitted ...
3299    /// }
3300    /// ```
3301    #[derive(Clone, Debug)]
3302    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
3303
3304    impl GetOperation {
3305        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
3306            Self(RequestBuilder::new(stub))
3307        }
3308
3309        /// Sets the full request, replacing any prior values.
3310        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
3311            mut self,
3312            v: V,
3313        ) -> Self {
3314            self.0.request = v.into();
3315            self
3316        }
3317
3318        /// Sets all the options, replacing any prior values.
3319        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3320            self.0.options = v.into();
3321            self
3322        }
3323
3324        /// Sends the request.
3325        pub async fn send(self) -> Result<longrunning::model::Operation> {
3326            (*self.0.stub)
3327                .get_operation(self.0.request, self.0.options)
3328                .await
3329                .map(gax::response::Response::into_body)
3330        }
3331
3332        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
3333        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3334            self.0.request.name = v.into();
3335            self
3336        }
3337    }
3338
3339    #[doc(hidden)]
3340    impl gax::options::internal::RequestBuilder for GetOperation {
3341        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3342            &mut self.0.options
3343        }
3344    }
3345
3346    /// The request builder for [Config::delete_operation][crate::client::Config::delete_operation] calls.
3347    ///
3348    /// # Example
3349    /// ```
3350    /// # use google_cloud_config_v1::builder::config::DeleteOperation;
3351    /// # async fn sample() -> gax::Result<()> {
3352    ///
3353    /// let builder = prepare_request_builder();
3354    /// let response = builder.send().await?;
3355    /// # Ok(()) }
3356    ///
3357    /// fn prepare_request_builder() -> DeleteOperation {
3358    ///   # panic!();
3359    ///   // ... details omitted ...
3360    /// }
3361    /// ```
3362    #[derive(Clone, Debug)]
3363    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
3364
3365    impl DeleteOperation {
3366        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
3367            Self(RequestBuilder::new(stub))
3368        }
3369
3370        /// Sets the full request, replacing any prior values.
3371        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
3372            mut self,
3373            v: V,
3374        ) -> Self {
3375            self.0.request = v.into();
3376            self
3377        }
3378
3379        /// Sets all the options, replacing any prior values.
3380        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3381            self.0.options = v.into();
3382            self
3383        }
3384
3385        /// Sends the request.
3386        pub async fn send(self) -> Result<()> {
3387            (*self.0.stub)
3388                .delete_operation(self.0.request, self.0.options)
3389                .await
3390                .map(gax::response::Response::into_body)
3391        }
3392
3393        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
3394        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3395            self.0.request.name = v.into();
3396            self
3397        }
3398    }
3399
3400    #[doc(hidden)]
3401    impl gax::options::internal::RequestBuilder for DeleteOperation {
3402        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3403            &mut self.0.options
3404        }
3405    }
3406
3407    /// The request builder for [Config::cancel_operation][crate::client::Config::cancel_operation] calls.
3408    ///
3409    /// # Example
3410    /// ```
3411    /// # use google_cloud_config_v1::builder::config::CancelOperation;
3412    /// # async fn sample() -> gax::Result<()> {
3413    ///
3414    /// let builder = prepare_request_builder();
3415    /// let response = builder.send().await?;
3416    /// # Ok(()) }
3417    ///
3418    /// fn prepare_request_builder() -> CancelOperation {
3419    ///   # panic!();
3420    ///   // ... details omitted ...
3421    /// }
3422    /// ```
3423    #[derive(Clone, Debug)]
3424    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
3425
3426    impl CancelOperation {
3427        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
3428            Self(RequestBuilder::new(stub))
3429        }
3430
3431        /// Sets the full request, replacing any prior values.
3432        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
3433            mut self,
3434            v: V,
3435        ) -> Self {
3436            self.0.request = v.into();
3437            self
3438        }
3439
3440        /// Sets all the options, replacing any prior values.
3441        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3442            self.0.options = v.into();
3443            self
3444        }
3445
3446        /// Sends the request.
3447        pub async fn send(self) -> Result<()> {
3448            (*self.0.stub)
3449                .cancel_operation(self.0.request, self.0.options)
3450                .await
3451                .map(gax::response::Response::into_body)
3452        }
3453
3454        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
3455        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3456            self.0.request.name = v.into();
3457            self
3458        }
3459    }
3460
3461    #[doc(hidden)]
3462    impl gax::options::internal::RequestBuilder for CancelOperation {
3463        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3464            &mut self.0.options
3465        }
3466    }
3467}