google_cloud_edgecontainer_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 edge_container {
18    use crate::Result;
19
20    /// A builder for [EdgeContainer][super::super::client::EdgeContainer].
21    ///
22    /// ```
23    /// # tokio_test::block_on(async {
24    /// # use google_cloud_edgecontainer_v1::*;
25    /// # use builder::edge_container::ClientBuilder;
26    /// # use client::EdgeContainer;
27    /// let builder : ClientBuilder = EdgeContainer::builder();
28    /// let client = builder
29    ///     .with_endpoint("https://edgecontainer.googleapis.com")
30    ///     .build().await?;
31    /// # gax::Result::<()>::Ok(()) });
32    /// ```
33    pub type ClientBuilder =
34        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36    pub(crate) mod client {
37        use super::super::super::client::EdgeContainer;
38        pub struct Factory;
39        impl gax::client_builder::internal::ClientFactory for Factory {
40            type Client = EdgeContainer;
41            type Credentials = gaxi::options::Credentials;
42            async fn build(self, config: gaxi::options::ClientConfig) -> gax::Result<Self::Client> {
43                Self::Client::new(config).await
44            }
45        }
46    }
47
48    /// Common implementation for [super::super::client::EdgeContainer] request builders.
49    #[derive(Clone, Debug)]
50    pub(crate) struct RequestBuilder<R: std::default::Default> {
51        stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
52        request: R,
53        options: gax::options::RequestOptions,
54    }
55
56    impl<R> RequestBuilder<R>
57    where
58        R: std::default::Default,
59    {
60        pub(crate) fn new(
61            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
62        ) -> Self {
63            Self {
64                stub,
65                request: R::default(),
66                options: gax::options::RequestOptions::default(),
67            }
68        }
69    }
70
71    /// The request builder for [EdgeContainer::list_clusters][super::super::client::EdgeContainer::list_clusters] calls.
72    ///
73    /// # Example
74    /// ```no_run
75    /// # use google_cloud_edgecontainer_v1::builder;
76    /// use builder::edge_container::ListClusters;
77    /// # tokio_test::block_on(async {
78    /// let builder = prepare_request_builder();
79    /// use gax::paginator::ItemPaginator;
80    /// let mut items = builder.by_item();
81    /// while let Some(result) = items.next().await {
82    ///   let item = result?;
83    /// }
84    /// # gax::Result::<()>::Ok(()) });
85    ///
86    /// fn prepare_request_builder() -> ListClusters {
87    ///   # panic!();
88    ///   // ... details omitted ...
89    /// }
90    /// ```
91    #[derive(Clone, Debug)]
92    pub struct ListClusters(RequestBuilder<crate::model::ListClustersRequest>);
93
94    impl ListClusters {
95        pub(crate) fn new(
96            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
97        ) -> Self {
98            Self(RequestBuilder::new(stub))
99        }
100
101        /// Sets the full request, replacing any prior values.
102        pub fn with_request<V: Into<crate::model::ListClustersRequest>>(mut self, v: V) -> Self {
103            self.0.request = v.into();
104            self
105        }
106
107        /// Sets all the options, replacing any prior values.
108        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
109            self.0.options = v.into();
110            self
111        }
112
113        /// Sends the request.
114        pub async fn send(self) -> Result<crate::model::ListClustersResponse> {
115            (*self.0.stub)
116                .list_clusters(self.0.request, self.0.options)
117                .await
118                .map(gax::response::Response::into_body)
119        }
120
121        /// Streams each page in the collection.
122        pub fn by_page(
123            self,
124        ) -> impl gax::paginator::Paginator<crate::model::ListClustersResponse, gax::error::Error>
125        {
126            use std::clone::Clone;
127            let token = self.0.request.page_token.clone();
128            let execute = move |token: String| {
129                let mut builder = self.clone();
130                builder.0.request = builder.0.request.set_page_token(token);
131                builder.send()
132            };
133            gax::paginator::internal::new_paginator(token, execute)
134        }
135
136        /// Streams each item in the collection.
137        pub fn by_item(
138            self,
139        ) -> impl gax::paginator::ItemPaginator<crate::model::ListClustersResponse, gax::error::Error>
140        {
141            use gax::paginator::Paginator;
142            self.by_page().items()
143        }
144
145        /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
146        ///
147        /// This is a **required** field for requests.
148        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
149            self.0.request.parent = v.into();
150            self
151        }
152
153        /// Sets the value of [page_size][crate::model::ListClustersRequest::page_size].
154        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
155            self.0.request.page_size = v.into();
156            self
157        }
158
159        /// Sets the value of [page_token][crate::model::ListClustersRequest::page_token].
160        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
161            self.0.request.page_token = v.into();
162            self
163        }
164
165        /// Sets the value of [filter][crate::model::ListClustersRequest::filter].
166        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
167            self.0.request.filter = v.into();
168            self
169        }
170
171        /// Sets the value of [order_by][crate::model::ListClustersRequest::order_by].
172        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
173            self.0.request.order_by = v.into();
174            self
175        }
176    }
177
178    #[doc(hidden)]
179    impl gax::options::internal::RequestBuilder for ListClusters {
180        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
181            &mut self.0.options
182        }
183    }
184
185    /// The request builder for [EdgeContainer::get_cluster][super::super::client::EdgeContainer::get_cluster] calls.
186    ///
187    /// # Example
188    /// ```no_run
189    /// # use google_cloud_edgecontainer_v1::builder;
190    /// use builder::edge_container::GetCluster;
191    /// # tokio_test::block_on(async {
192    /// let builder = prepare_request_builder();
193    /// let response = builder.send().await?;
194    /// # gax::Result::<()>::Ok(()) });
195    ///
196    /// fn prepare_request_builder() -> GetCluster {
197    ///   # panic!();
198    ///   // ... details omitted ...
199    /// }
200    /// ```
201    #[derive(Clone, Debug)]
202    pub struct GetCluster(RequestBuilder<crate::model::GetClusterRequest>);
203
204    impl GetCluster {
205        pub(crate) fn new(
206            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
207        ) -> Self {
208            Self(RequestBuilder::new(stub))
209        }
210
211        /// Sets the full request, replacing any prior values.
212        pub fn with_request<V: Into<crate::model::GetClusterRequest>>(mut self, v: V) -> Self {
213            self.0.request = v.into();
214            self
215        }
216
217        /// Sets all the options, replacing any prior values.
218        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
219            self.0.options = v.into();
220            self
221        }
222
223        /// Sends the request.
224        pub async fn send(self) -> Result<crate::model::Cluster> {
225            (*self.0.stub)
226                .get_cluster(self.0.request, self.0.options)
227                .await
228                .map(gax::response::Response::into_body)
229        }
230
231        /// Sets the value of [name][crate::model::GetClusterRequest::name].
232        ///
233        /// This is a **required** field for requests.
234        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
235            self.0.request.name = v.into();
236            self
237        }
238    }
239
240    #[doc(hidden)]
241    impl gax::options::internal::RequestBuilder for GetCluster {
242        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
243            &mut self.0.options
244        }
245    }
246
247    /// The request builder for [EdgeContainer::create_cluster][super::super::client::EdgeContainer::create_cluster] calls.
248    ///
249    /// # Example
250    /// ```no_run
251    /// # use google_cloud_edgecontainer_v1::builder;
252    /// use builder::edge_container::CreateCluster;
253    /// # tokio_test::block_on(async {
254    /// let builder = prepare_request_builder();
255    /// use google_cloud_edgecontainer_v1::Poller;
256    /// let response = builder.poller().until_done().await?;
257    /// # gax::Result::<()>::Ok(()) });
258    ///
259    /// fn prepare_request_builder() -> CreateCluster {
260    ///   # panic!();
261    ///   // ... details omitted ...
262    /// }
263    /// ```
264    #[derive(Clone, Debug)]
265    pub struct CreateCluster(RequestBuilder<crate::model::CreateClusterRequest>);
266
267    impl CreateCluster {
268        pub(crate) fn new(
269            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
270        ) -> Self {
271            Self(RequestBuilder::new(stub))
272        }
273
274        /// Sets the full request, replacing any prior values.
275        pub fn with_request<V: Into<crate::model::CreateClusterRequest>>(mut self, v: V) -> Self {
276            self.0.request = v.into();
277            self
278        }
279
280        /// Sets all the options, replacing any prior values.
281        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
282            self.0.options = v.into();
283            self
284        }
285
286        /// Sends the request.
287        ///
288        /// # Long running operations
289        ///
290        /// This starts, but does not poll, a longrunning operation. More information
291        /// on [create_cluster][super::super::client::EdgeContainer::create_cluster].
292        pub async fn send(self) -> Result<longrunning::model::Operation> {
293            (*self.0.stub)
294                .create_cluster(self.0.request, self.0.options)
295                .await
296                .map(gax::response::Response::into_body)
297        }
298
299        /// Creates a [Poller][lro::Poller] to work with `create_cluster`.
300        pub fn poller(
301            self,
302        ) -> impl lro::Poller<crate::model::Cluster, crate::model::OperationMetadata> {
303            type Operation =
304                lro::internal::Operation<crate::model::Cluster, crate::model::OperationMetadata>;
305            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
306            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
307
308            let stub = self.0.stub.clone();
309            let mut options = self.0.options.clone();
310            options.set_retry_policy(gax::retry_policy::NeverRetry);
311            let query = move |name| {
312                let stub = stub.clone();
313                let options = options.clone();
314                async {
315                    let op = GetOperation::new(stub)
316                        .set_name(name)
317                        .with_options(options)
318                        .send()
319                        .await?;
320                    Ok(Operation::new(op))
321                }
322            };
323
324            let start = move || async {
325                let op = self.send().await?;
326                Ok(Operation::new(op))
327            };
328
329            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
330        }
331
332        /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
333        ///
334        /// This is a **required** field for requests.
335        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
336            self.0.request.parent = v.into();
337            self
338        }
339
340        /// Sets the value of [cluster_id][crate::model::CreateClusterRequest::cluster_id].
341        ///
342        /// This is a **required** field for requests.
343        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
344            self.0.request.cluster_id = v.into();
345            self
346        }
347
348        /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
349        ///
350        /// This is a **required** field for requests.
351        pub fn set_cluster<T: Into<std::option::Option<crate::model::Cluster>>>(
352            mut self,
353            v: T,
354        ) -> Self {
355            self.0.request.cluster = v.into();
356            self
357        }
358
359        /// Sets the value of [request_id][crate::model::CreateClusterRequest::request_id].
360        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
361            self.0.request.request_id = v.into();
362            self
363        }
364    }
365
366    #[doc(hidden)]
367    impl gax::options::internal::RequestBuilder for CreateCluster {
368        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
369            &mut self.0.options
370        }
371    }
372
373    /// The request builder for [EdgeContainer::update_cluster][super::super::client::EdgeContainer::update_cluster] calls.
374    ///
375    /// # Example
376    /// ```no_run
377    /// # use google_cloud_edgecontainer_v1::builder;
378    /// use builder::edge_container::UpdateCluster;
379    /// # tokio_test::block_on(async {
380    /// let builder = prepare_request_builder();
381    /// use google_cloud_edgecontainer_v1::Poller;
382    /// let response = builder.poller().until_done().await?;
383    /// # gax::Result::<()>::Ok(()) });
384    ///
385    /// fn prepare_request_builder() -> UpdateCluster {
386    ///   # panic!();
387    ///   // ... details omitted ...
388    /// }
389    /// ```
390    #[derive(Clone, Debug)]
391    pub struct UpdateCluster(RequestBuilder<crate::model::UpdateClusterRequest>);
392
393    impl UpdateCluster {
394        pub(crate) fn new(
395            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
396        ) -> Self {
397            Self(RequestBuilder::new(stub))
398        }
399
400        /// Sets the full request, replacing any prior values.
401        pub fn with_request<V: Into<crate::model::UpdateClusterRequest>>(mut self, v: V) -> Self {
402            self.0.request = v.into();
403            self
404        }
405
406        /// Sets all the options, replacing any prior values.
407        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
408            self.0.options = v.into();
409            self
410        }
411
412        /// Sends the request.
413        ///
414        /// # Long running operations
415        ///
416        /// This starts, but does not poll, a longrunning operation. More information
417        /// on [update_cluster][super::super::client::EdgeContainer::update_cluster].
418        pub async fn send(self) -> Result<longrunning::model::Operation> {
419            (*self.0.stub)
420                .update_cluster(self.0.request, self.0.options)
421                .await
422                .map(gax::response::Response::into_body)
423        }
424
425        /// Creates a [Poller][lro::Poller] to work with `update_cluster`.
426        pub fn poller(
427            self,
428        ) -> impl lro::Poller<crate::model::Cluster, crate::model::OperationMetadata> {
429            type Operation =
430                lro::internal::Operation<crate::model::Cluster, crate::model::OperationMetadata>;
431            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
432            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
433
434            let stub = self.0.stub.clone();
435            let mut options = self.0.options.clone();
436            options.set_retry_policy(gax::retry_policy::NeverRetry);
437            let query = move |name| {
438                let stub = stub.clone();
439                let options = options.clone();
440                async {
441                    let op = GetOperation::new(stub)
442                        .set_name(name)
443                        .with_options(options)
444                        .send()
445                        .await?;
446                    Ok(Operation::new(op))
447                }
448            };
449
450            let start = move || async {
451                let op = self.send().await?;
452                Ok(Operation::new(op))
453            };
454
455            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
456        }
457
458        /// Sets the value of [update_mask][crate::model::UpdateClusterRequest::update_mask].
459        pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
460            mut self,
461            v: T,
462        ) -> Self {
463            self.0.request.update_mask = v.into();
464            self
465        }
466
467        /// Sets the value of [cluster][crate::model::UpdateClusterRequest::cluster].
468        pub fn set_cluster<T: Into<std::option::Option<crate::model::Cluster>>>(
469            mut self,
470            v: T,
471        ) -> Self {
472            self.0.request.cluster = v.into();
473            self
474        }
475
476        /// Sets the value of [request_id][crate::model::UpdateClusterRequest::request_id].
477        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
478            self.0.request.request_id = v.into();
479            self
480        }
481    }
482
483    #[doc(hidden)]
484    impl gax::options::internal::RequestBuilder for UpdateCluster {
485        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
486            &mut self.0.options
487        }
488    }
489
490    /// The request builder for [EdgeContainer::upgrade_cluster][super::super::client::EdgeContainer::upgrade_cluster] calls.
491    ///
492    /// # Example
493    /// ```no_run
494    /// # use google_cloud_edgecontainer_v1::builder;
495    /// use builder::edge_container::UpgradeCluster;
496    /// # tokio_test::block_on(async {
497    /// let builder = prepare_request_builder();
498    /// use google_cloud_edgecontainer_v1::Poller;
499    /// let response = builder.poller().until_done().await?;
500    /// # gax::Result::<()>::Ok(()) });
501    ///
502    /// fn prepare_request_builder() -> UpgradeCluster {
503    ///   # panic!();
504    ///   // ... details omitted ...
505    /// }
506    /// ```
507    #[derive(Clone, Debug)]
508    pub struct UpgradeCluster(RequestBuilder<crate::model::UpgradeClusterRequest>);
509
510    impl UpgradeCluster {
511        pub(crate) fn new(
512            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
513        ) -> Self {
514            Self(RequestBuilder::new(stub))
515        }
516
517        /// Sets the full request, replacing any prior values.
518        pub fn with_request<V: Into<crate::model::UpgradeClusterRequest>>(mut self, v: V) -> Self {
519            self.0.request = v.into();
520            self
521        }
522
523        /// Sets all the options, replacing any prior values.
524        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
525            self.0.options = v.into();
526            self
527        }
528
529        /// Sends the request.
530        ///
531        /// # Long running operations
532        ///
533        /// This starts, but does not poll, a longrunning operation. More information
534        /// on [upgrade_cluster][super::super::client::EdgeContainer::upgrade_cluster].
535        pub async fn send(self) -> Result<longrunning::model::Operation> {
536            (*self.0.stub)
537                .upgrade_cluster(self.0.request, self.0.options)
538                .await
539                .map(gax::response::Response::into_body)
540        }
541
542        /// Creates a [Poller][lro::Poller] to work with `upgrade_cluster`.
543        pub fn poller(
544            self,
545        ) -> impl lro::Poller<crate::model::Cluster, crate::model::OperationMetadata> {
546            type Operation =
547                lro::internal::Operation<crate::model::Cluster, crate::model::OperationMetadata>;
548            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
549            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
550
551            let stub = self.0.stub.clone();
552            let mut options = self.0.options.clone();
553            options.set_retry_policy(gax::retry_policy::NeverRetry);
554            let query = move |name| {
555                let stub = stub.clone();
556                let options = options.clone();
557                async {
558                    let op = GetOperation::new(stub)
559                        .set_name(name)
560                        .with_options(options)
561                        .send()
562                        .await?;
563                    Ok(Operation::new(op))
564                }
565            };
566
567            let start = move || async {
568                let op = self.send().await?;
569                Ok(Operation::new(op))
570            };
571
572            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
573        }
574
575        /// Sets the value of [name][crate::model::UpgradeClusterRequest::name].
576        ///
577        /// This is a **required** field for requests.
578        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
579            self.0.request.name = v.into();
580            self
581        }
582
583        /// Sets the value of [target_version][crate::model::UpgradeClusterRequest::target_version].
584        ///
585        /// This is a **required** field for requests.
586        pub fn set_target_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
587            self.0.request.target_version = v.into();
588            self
589        }
590
591        /// Sets the value of [schedule][crate::model::UpgradeClusterRequest::schedule].
592        pub fn set_schedule<T: Into<crate::model::upgrade_cluster_request::Schedule>>(
593            mut self,
594            v: T,
595        ) -> Self {
596            self.0.request.schedule = v.into();
597            self
598        }
599
600        /// Sets the value of [request_id][crate::model::UpgradeClusterRequest::request_id].
601        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
602            self.0.request.request_id = v.into();
603            self
604        }
605    }
606
607    #[doc(hidden)]
608    impl gax::options::internal::RequestBuilder for UpgradeCluster {
609        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
610            &mut self.0.options
611        }
612    }
613
614    /// The request builder for [EdgeContainer::delete_cluster][super::super::client::EdgeContainer::delete_cluster] calls.
615    ///
616    /// # Example
617    /// ```no_run
618    /// # use google_cloud_edgecontainer_v1::builder;
619    /// use builder::edge_container::DeleteCluster;
620    /// # tokio_test::block_on(async {
621    /// let builder = prepare_request_builder();
622    /// use google_cloud_edgecontainer_v1::Poller;
623    /// let response = builder.poller().until_done().await?;
624    /// # gax::Result::<()>::Ok(()) });
625    ///
626    /// fn prepare_request_builder() -> DeleteCluster {
627    ///   # panic!();
628    ///   // ... details omitted ...
629    /// }
630    /// ```
631    #[derive(Clone, Debug)]
632    pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
633
634    impl DeleteCluster {
635        pub(crate) fn new(
636            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
637        ) -> Self {
638            Self(RequestBuilder::new(stub))
639        }
640
641        /// Sets the full request, replacing any prior values.
642        pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
643            self.0.request = v.into();
644            self
645        }
646
647        /// Sets all the options, replacing any prior values.
648        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
649            self.0.options = v.into();
650            self
651        }
652
653        /// Sends the request.
654        ///
655        /// # Long running operations
656        ///
657        /// This starts, but does not poll, a longrunning operation. More information
658        /// on [delete_cluster][super::super::client::EdgeContainer::delete_cluster].
659        pub async fn send(self) -> Result<longrunning::model::Operation> {
660            (*self.0.stub)
661                .delete_cluster(self.0.request, self.0.options)
662                .await
663                .map(gax::response::Response::into_body)
664        }
665
666        /// Creates a [Poller][lro::Poller] to work with `delete_cluster`.
667        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
668            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
669            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
670            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
671
672            let stub = self.0.stub.clone();
673            let mut options = self.0.options.clone();
674            options.set_retry_policy(gax::retry_policy::NeverRetry);
675            let query = move |name| {
676                let stub = stub.clone();
677                let options = options.clone();
678                async {
679                    let op = GetOperation::new(stub)
680                        .set_name(name)
681                        .with_options(options)
682                        .send()
683                        .await?;
684                    Ok(Operation::new(op))
685                }
686            };
687
688            let start = move || async {
689                let op = self.send().await?;
690                Ok(Operation::new(op))
691            };
692
693            lro::internal::new_unit_response_poller(
694                polling_error_policy,
695                polling_backoff_policy,
696                start,
697                query,
698            )
699        }
700
701        /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
702        ///
703        /// This is a **required** field for requests.
704        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
705            self.0.request.name = v.into();
706            self
707        }
708
709        /// Sets the value of [request_id][crate::model::DeleteClusterRequest::request_id].
710        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
711            self.0.request.request_id = v.into();
712            self
713        }
714    }
715
716    #[doc(hidden)]
717    impl gax::options::internal::RequestBuilder for DeleteCluster {
718        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
719            &mut self.0.options
720        }
721    }
722
723    /// The request builder for [EdgeContainer::generate_access_token][super::super::client::EdgeContainer::generate_access_token] calls.
724    ///
725    /// # Example
726    /// ```no_run
727    /// # use google_cloud_edgecontainer_v1::builder;
728    /// use builder::edge_container::GenerateAccessToken;
729    /// # tokio_test::block_on(async {
730    /// let builder = prepare_request_builder();
731    /// let response = builder.send().await?;
732    /// # gax::Result::<()>::Ok(()) });
733    ///
734    /// fn prepare_request_builder() -> GenerateAccessToken {
735    ///   # panic!();
736    ///   // ... details omitted ...
737    /// }
738    /// ```
739    #[derive(Clone, Debug)]
740    pub struct GenerateAccessToken(RequestBuilder<crate::model::GenerateAccessTokenRequest>);
741
742    impl GenerateAccessToken {
743        pub(crate) fn new(
744            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
745        ) -> Self {
746            Self(RequestBuilder::new(stub))
747        }
748
749        /// Sets the full request, replacing any prior values.
750        pub fn with_request<V: Into<crate::model::GenerateAccessTokenRequest>>(
751            mut self,
752            v: V,
753        ) -> Self {
754            self.0.request = v.into();
755            self
756        }
757
758        /// Sets all the options, replacing any prior values.
759        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
760            self.0.options = v.into();
761            self
762        }
763
764        /// Sends the request.
765        pub async fn send(self) -> Result<crate::model::GenerateAccessTokenResponse> {
766            (*self.0.stub)
767                .generate_access_token(self.0.request, self.0.options)
768                .await
769                .map(gax::response::Response::into_body)
770        }
771
772        /// Sets the value of [cluster][crate::model::GenerateAccessTokenRequest::cluster].
773        ///
774        /// This is a **required** field for requests.
775        pub fn set_cluster<T: Into<std::string::String>>(mut self, v: T) -> Self {
776            self.0.request.cluster = v.into();
777            self
778        }
779    }
780
781    #[doc(hidden)]
782    impl gax::options::internal::RequestBuilder for GenerateAccessToken {
783        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
784            &mut self.0.options
785        }
786    }
787
788    /// The request builder for [EdgeContainer::generate_offline_credential][super::super::client::EdgeContainer::generate_offline_credential] calls.
789    ///
790    /// # Example
791    /// ```no_run
792    /// # use google_cloud_edgecontainer_v1::builder;
793    /// use builder::edge_container::GenerateOfflineCredential;
794    /// # tokio_test::block_on(async {
795    /// let builder = prepare_request_builder();
796    /// let response = builder.send().await?;
797    /// # gax::Result::<()>::Ok(()) });
798    ///
799    /// fn prepare_request_builder() -> GenerateOfflineCredential {
800    ///   # panic!();
801    ///   // ... details omitted ...
802    /// }
803    /// ```
804    #[derive(Clone, Debug)]
805    pub struct GenerateOfflineCredential(
806        RequestBuilder<crate::model::GenerateOfflineCredentialRequest>,
807    );
808
809    impl GenerateOfflineCredential {
810        pub(crate) fn new(
811            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
812        ) -> Self {
813            Self(RequestBuilder::new(stub))
814        }
815
816        /// Sets the full request, replacing any prior values.
817        pub fn with_request<V: Into<crate::model::GenerateOfflineCredentialRequest>>(
818            mut self,
819            v: V,
820        ) -> Self {
821            self.0.request = v.into();
822            self
823        }
824
825        /// Sets all the options, replacing any prior values.
826        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
827            self.0.options = v.into();
828            self
829        }
830
831        /// Sends the request.
832        pub async fn send(self) -> Result<crate::model::GenerateOfflineCredentialResponse> {
833            (*self.0.stub)
834                .generate_offline_credential(self.0.request, self.0.options)
835                .await
836                .map(gax::response::Response::into_body)
837        }
838
839        /// Sets the value of [cluster][crate::model::GenerateOfflineCredentialRequest::cluster].
840        ///
841        /// This is a **required** field for requests.
842        pub fn set_cluster<T: Into<std::string::String>>(mut self, v: T) -> Self {
843            self.0.request.cluster = v.into();
844            self
845        }
846    }
847
848    #[doc(hidden)]
849    impl gax::options::internal::RequestBuilder for GenerateOfflineCredential {
850        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
851            &mut self.0.options
852        }
853    }
854
855    /// The request builder for [EdgeContainer::list_node_pools][super::super::client::EdgeContainer::list_node_pools] calls.
856    ///
857    /// # Example
858    /// ```no_run
859    /// # use google_cloud_edgecontainer_v1::builder;
860    /// use builder::edge_container::ListNodePools;
861    /// # tokio_test::block_on(async {
862    /// let builder = prepare_request_builder();
863    /// use gax::paginator::ItemPaginator;
864    /// let mut items = builder.by_item();
865    /// while let Some(result) = items.next().await {
866    ///   let item = result?;
867    /// }
868    /// # gax::Result::<()>::Ok(()) });
869    ///
870    /// fn prepare_request_builder() -> ListNodePools {
871    ///   # panic!();
872    ///   // ... details omitted ...
873    /// }
874    /// ```
875    #[derive(Clone, Debug)]
876    pub struct ListNodePools(RequestBuilder<crate::model::ListNodePoolsRequest>);
877
878    impl ListNodePools {
879        pub(crate) fn new(
880            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
881        ) -> Self {
882            Self(RequestBuilder::new(stub))
883        }
884
885        /// Sets the full request, replacing any prior values.
886        pub fn with_request<V: Into<crate::model::ListNodePoolsRequest>>(mut self, v: V) -> Self {
887            self.0.request = v.into();
888            self
889        }
890
891        /// Sets all the options, replacing any prior values.
892        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
893            self.0.options = v.into();
894            self
895        }
896
897        /// Sends the request.
898        pub async fn send(self) -> Result<crate::model::ListNodePoolsResponse> {
899            (*self.0.stub)
900                .list_node_pools(self.0.request, self.0.options)
901                .await
902                .map(gax::response::Response::into_body)
903        }
904
905        /// Streams each page in the collection.
906        pub fn by_page(
907            self,
908        ) -> impl gax::paginator::Paginator<crate::model::ListNodePoolsResponse, gax::error::Error>
909        {
910            use std::clone::Clone;
911            let token = self.0.request.page_token.clone();
912            let execute = move |token: String| {
913                let mut builder = self.clone();
914                builder.0.request = builder.0.request.set_page_token(token);
915                builder.send()
916            };
917            gax::paginator::internal::new_paginator(token, execute)
918        }
919
920        /// Streams each item in the collection.
921        pub fn by_item(
922            self,
923        ) -> impl gax::paginator::ItemPaginator<crate::model::ListNodePoolsResponse, gax::error::Error>
924        {
925            use gax::paginator::Paginator;
926            self.by_page().items()
927        }
928
929        /// Sets the value of [parent][crate::model::ListNodePoolsRequest::parent].
930        ///
931        /// This is a **required** field for requests.
932        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
933            self.0.request.parent = v.into();
934            self
935        }
936
937        /// Sets the value of [page_size][crate::model::ListNodePoolsRequest::page_size].
938        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
939            self.0.request.page_size = v.into();
940            self
941        }
942
943        /// Sets the value of [page_token][crate::model::ListNodePoolsRequest::page_token].
944        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
945            self.0.request.page_token = v.into();
946            self
947        }
948
949        /// Sets the value of [filter][crate::model::ListNodePoolsRequest::filter].
950        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
951            self.0.request.filter = v.into();
952            self
953        }
954
955        /// Sets the value of [order_by][crate::model::ListNodePoolsRequest::order_by].
956        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
957            self.0.request.order_by = v.into();
958            self
959        }
960    }
961
962    #[doc(hidden)]
963    impl gax::options::internal::RequestBuilder for ListNodePools {
964        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
965            &mut self.0.options
966        }
967    }
968
969    /// The request builder for [EdgeContainer::get_node_pool][super::super::client::EdgeContainer::get_node_pool] calls.
970    ///
971    /// # Example
972    /// ```no_run
973    /// # use google_cloud_edgecontainer_v1::builder;
974    /// use builder::edge_container::GetNodePool;
975    /// # tokio_test::block_on(async {
976    /// let builder = prepare_request_builder();
977    /// let response = builder.send().await?;
978    /// # gax::Result::<()>::Ok(()) });
979    ///
980    /// fn prepare_request_builder() -> GetNodePool {
981    ///   # panic!();
982    ///   // ... details omitted ...
983    /// }
984    /// ```
985    #[derive(Clone, Debug)]
986    pub struct GetNodePool(RequestBuilder<crate::model::GetNodePoolRequest>);
987
988    impl GetNodePool {
989        pub(crate) fn new(
990            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
991        ) -> Self {
992            Self(RequestBuilder::new(stub))
993        }
994
995        /// Sets the full request, replacing any prior values.
996        pub fn with_request<V: Into<crate::model::GetNodePoolRequest>>(mut self, v: V) -> Self {
997            self.0.request = v.into();
998            self
999        }
1000
1001        /// Sets all the options, replacing any prior values.
1002        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1003            self.0.options = v.into();
1004            self
1005        }
1006
1007        /// Sends the request.
1008        pub async fn send(self) -> Result<crate::model::NodePool> {
1009            (*self.0.stub)
1010                .get_node_pool(self.0.request, self.0.options)
1011                .await
1012                .map(gax::response::Response::into_body)
1013        }
1014
1015        /// Sets the value of [name][crate::model::GetNodePoolRequest::name].
1016        ///
1017        /// This is a **required** field for requests.
1018        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1019            self.0.request.name = v.into();
1020            self
1021        }
1022    }
1023
1024    #[doc(hidden)]
1025    impl gax::options::internal::RequestBuilder for GetNodePool {
1026        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1027            &mut self.0.options
1028        }
1029    }
1030
1031    /// The request builder for [EdgeContainer::create_node_pool][super::super::client::EdgeContainer::create_node_pool] calls.
1032    ///
1033    /// # Example
1034    /// ```no_run
1035    /// # use google_cloud_edgecontainer_v1::builder;
1036    /// use builder::edge_container::CreateNodePool;
1037    /// # tokio_test::block_on(async {
1038    /// let builder = prepare_request_builder();
1039    /// use google_cloud_edgecontainer_v1::Poller;
1040    /// let response = builder.poller().until_done().await?;
1041    /// # gax::Result::<()>::Ok(()) });
1042    ///
1043    /// fn prepare_request_builder() -> CreateNodePool {
1044    ///   # panic!();
1045    ///   // ... details omitted ...
1046    /// }
1047    /// ```
1048    #[derive(Clone, Debug)]
1049    pub struct CreateNodePool(RequestBuilder<crate::model::CreateNodePoolRequest>);
1050
1051    impl CreateNodePool {
1052        pub(crate) fn new(
1053            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
1054        ) -> Self {
1055            Self(RequestBuilder::new(stub))
1056        }
1057
1058        /// Sets the full request, replacing any prior values.
1059        pub fn with_request<V: Into<crate::model::CreateNodePoolRequest>>(mut self, v: V) -> Self {
1060            self.0.request = v.into();
1061            self
1062        }
1063
1064        /// Sets all the options, replacing any prior values.
1065        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1066            self.0.options = v.into();
1067            self
1068        }
1069
1070        /// Sends the request.
1071        ///
1072        /// # Long running operations
1073        ///
1074        /// This starts, but does not poll, a longrunning operation. More information
1075        /// on [create_node_pool][super::super::client::EdgeContainer::create_node_pool].
1076        pub async fn send(self) -> Result<longrunning::model::Operation> {
1077            (*self.0.stub)
1078                .create_node_pool(self.0.request, self.0.options)
1079                .await
1080                .map(gax::response::Response::into_body)
1081        }
1082
1083        /// Creates a [Poller][lro::Poller] to work with `create_node_pool`.
1084        pub fn poller(
1085            self,
1086        ) -> impl lro::Poller<crate::model::NodePool, crate::model::OperationMetadata> {
1087            type Operation =
1088                lro::internal::Operation<crate::model::NodePool, crate::model::OperationMetadata>;
1089            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1090            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1091
1092            let stub = self.0.stub.clone();
1093            let mut options = self.0.options.clone();
1094            options.set_retry_policy(gax::retry_policy::NeverRetry);
1095            let query = move |name| {
1096                let stub = stub.clone();
1097                let options = options.clone();
1098                async {
1099                    let op = GetOperation::new(stub)
1100                        .set_name(name)
1101                        .with_options(options)
1102                        .send()
1103                        .await?;
1104                    Ok(Operation::new(op))
1105                }
1106            };
1107
1108            let start = move || async {
1109                let op = self.send().await?;
1110                Ok(Operation::new(op))
1111            };
1112
1113            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1114        }
1115
1116        /// Sets the value of [parent][crate::model::CreateNodePoolRequest::parent].
1117        ///
1118        /// This is a **required** field for requests.
1119        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1120            self.0.request.parent = v.into();
1121            self
1122        }
1123
1124        /// Sets the value of [node_pool_id][crate::model::CreateNodePoolRequest::node_pool_id].
1125        ///
1126        /// This is a **required** field for requests.
1127        pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1128            self.0.request.node_pool_id = v.into();
1129            self
1130        }
1131
1132        /// Sets the value of [node_pool][crate::model::CreateNodePoolRequest::node_pool].
1133        ///
1134        /// This is a **required** field for requests.
1135        pub fn set_node_pool<T: Into<std::option::Option<crate::model::NodePool>>>(
1136            mut self,
1137            v: T,
1138        ) -> Self {
1139            self.0.request.node_pool = v.into();
1140            self
1141        }
1142
1143        /// Sets the value of [request_id][crate::model::CreateNodePoolRequest::request_id].
1144        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1145            self.0.request.request_id = v.into();
1146            self
1147        }
1148    }
1149
1150    #[doc(hidden)]
1151    impl gax::options::internal::RequestBuilder for CreateNodePool {
1152        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1153            &mut self.0.options
1154        }
1155    }
1156
1157    /// The request builder for [EdgeContainer::update_node_pool][super::super::client::EdgeContainer::update_node_pool] calls.
1158    ///
1159    /// # Example
1160    /// ```no_run
1161    /// # use google_cloud_edgecontainer_v1::builder;
1162    /// use builder::edge_container::UpdateNodePool;
1163    /// # tokio_test::block_on(async {
1164    /// let builder = prepare_request_builder();
1165    /// use google_cloud_edgecontainer_v1::Poller;
1166    /// let response = builder.poller().until_done().await?;
1167    /// # gax::Result::<()>::Ok(()) });
1168    ///
1169    /// fn prepare_request_builder() -> UpdateNodePool {
1170    ///   # panic!();
1171    ///   // ... details omitted ...
1172    /// }
1173    /// ```
1174    #[derive(Clone, Debug)]
1175    pub struct UpdateNodePool(RequestBuilder<crate::model::UpdateNodePoolRequest>);
1176
1177    impl UpdateNodePool {
1178        pub(crate) fn new(
1179            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
1180        ) -> Self {
1181            Self(RequestBuilder::new(stub))
1182        }
1183
1184        /// Sets the full request, replacing any prior values.
1185        pub fn with_request<V: Into<crate::model::UpdateNodePoolRequest>>(mut self, v: V) -> Self {
1186            self.0.request = v.into();
1187            self
1188        }
1189
1190        /// Sets all the options, replacing any prior values.
1191        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1192            self.0.options = v.into();
1193            self
1194        }
1195
1196        /// Sends the request.
1197        ///
1198        /// # Long running operations
1199        ///
1200        /// This starts, but does not poll, a longrunning operation. More information
1201        /// on [update_node_pool][super::super::client::EdgeContainer::update_node_pool].
1202        pub async fn send(self) -> Result<longrunning::model::Operation> {
1203            (*self.0.stub)
1204                .update_node_pool(self.0.request, self.0.options)
1205                .await
1206                .map(gax::response::Response::into_body)
1207        }
1208
1209        /// Creates a [Poller][lro::Poller] to work with `update_node_pool`.
1210        pub fn poller(
1211            self,
1212        ) -> impl lro::Poller<crate::model::NodePool, crate::model::OperationMetadata> {
1213            type Operation =
1214                lro::internal::Operation<crate::model::NodePool, crate::model::OperationMetadata>;
1215            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1216            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1217
1218            let stub = self.0.stub.clone();
1219            let mut options = self.0.options.clone();
1220            options.set_retry_policy(gax::retry_policy::NeverRetry);
1221            let query = move |name| {
1222                let stub = stub.clone();
1223                let options = options.clone();
1224                async {
1225                    let op = GetOperation::new(stub)
1226                        .set_name(name)
1227                        .with_options(options)
1228                        .send()
1229                        .await?;
1230                    Ok(Operation::new(op))
1231                }
1232            };
1233
1234            let start = move || async {
1235                let op = self.send().await?;
1236                Ok(Operation::new(op))
1237            };
1238
1239            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1240        }
1241
1242        /// Sets the value of [update_mask][crate::model::UpdateNodePoolRequest::update_mask].
1243        pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
1244            mut self,
1245            v: T,
1246        ) -> Self {
1247            self.0.request.update_mask = v.into();
1248            self
1249        }
1250
1251        /// Sets the value of [node_pool][crate::model::UpdateNodePoolRequest::node_pool].
1252        pub fn set_node_pool<T: Into<std::option::Option<crate::model::NodePool>>>(
1253            mut self,
1254            v: T,
1255        ) -> Self {
1256            self.0.request.node_pool = v.into();
1257            self
1258        }
1259
1260        /// Sets the value of [request_id][crate::model::UpdateNodePoolRequest::request_id].
1261        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1262            self.0.request.request_id = v.into();
1263            self
1264        }
1265    }
1266
1267    #[doc(hidden)]
1268    impl gax::options::internal::RequestBuilder for UpdateNodePool {
1269        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1270            &mut self.0.options
1271        }
1272    }
1273
1274    /// The request builder for [EdgeContainer::delete_node_pool][super::super::client::EdgeContainer::delete_node_pool] calls.
1275    ///
1276    /// # Example
1277    /// ```no_run
1278    /// # use google_cloud_edgecontainer_v1::builder;
1279    /// use builder::edge_container::DeleteNodePool;
1280    /// # tokio_test::block_on(async {
1281    /// let builder = prepare_request_builder();
1282    /// use google_cloud_edgecontainer_v1::Poller;
1283    /// let response = builder.poller().until_done().await?;
1284    /// # gax::Result::<()>::Ok(()) });
1285    ///
1286    /// fn prepare_request_builder() -> DeleteNodePool {
1287    ///   # panic!();
1288    ///   // ... details omitted ...
1289    /// }
1290    /// ```
1291    #[derive(Clone, Debug)]
1292    pub struct DeleteNodePool(RequestBuilder<crate::model::DeleteNodePoolRequest>);
1293
1294    impl DeleteNodePool {
1295        pub(crate) fn new(
1296            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
1297        ) -> Self {
1298            Self(RequestBuilder::new(stub))
1299        }
1300
1301        /// Sets the full request, replacing any prior values.
1302        pub fn with_request<V: Into<crate::model::DeleteNodePoolRequest>>(mut self, v: V) -> Self {
1303            self.0.request = v.into();
1304            self
1305        }
1306
1307        /// Sets all the options, replacing any prior values.
1308        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1309            self.0.options = v.into();
1310            self
1311        }
1312
1313        /// Sends the request.
1314        ///
1315        /// # Long running operations
1316        ///
1317        /// This starts, but does not poll, a longrunning operation. More information
1318        /// on [delete_node_pool][super::super::client::EdgeContainer::delete_node_pool].
1319        pub async fn send(self) -> Result<longrunning::model::Operation> {
1320            (*self.0.stub)
1321                .delete_node_pool(self.0.request, self.0.options)
1322                .await
1323                .map(gax::response::Response::into_body)
1324        }
1325
1326        /// Creates a [Poller][lro::Poller] to work with `delete_node_pool`.
1327        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
1328            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1329            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1330            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1331
1332            let stub = self.0.stub.clone();
1333            let mut options = self.0.options.clone();
1334            options.set_retry_policy(gax::retry_policy::NeverRetry);
1335            let query = move |name| {
1336                let stub = stub.clone();
1337                let options = options.clone();
1338                async {
1339                    let op = GetOperation::new(stub)
1340                        .set_name(name)
1341                        .with_options(options)
1342                        .send()
1343                        .await?;
1344                    Ok(Operation::new(op))
1345                }
1346            };
1347
1348            let start = move || async {
1349                let op = self.send().await?;
1350                Ok(Operation::new(op))
1351            };
1352
1353            lro::internal::new_unit_response_poller(
1354                polling_error_policy,
1355                polling_backoff_policy,
1356                start,
1357                query,
1358            )
1359        }
1360
1361        /// Sets the value of [name][crate::model::DeleteNodePoolRequest::name].
1362        ///
1363        /// This is a **required** field for requests.
1364        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1365            self.0.request.name = v.into();
1366            self
1367        }
1368
1369        /// Sets the value of [request_id][crate::model::DeleteNodePoolRequest::request_id].
1370        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1371            self.0.request.request_id = v.into();
1372            self
1373        }
1374    }
1375
1376    #[doc(hidden)]
1377    impl gax::options::internal::RequestBuilder for DeleteNodePool {
1378        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1379            &mut self.0.options
1380        }
1381    }
1382
1383    /// The request builder for [EdgeContainer::list_machines][super::super::client::EdgeContainer::list_machines] calls.
1384    ///
1385    /// # Example
1386    /// ```no_run
1387    /// # use google_cloud_edgecontainer_v1::builder;
1388    /// use builder::edge_container::ListMachines;
1389    /// # tokio_test::block_on(async {
1390    /// let builder = prepare_request_builder();
1391    /// use gax::paginator::ItemPaginator;
1392    /// let mut items = builder.by_item();
1393    /// while let Some(result) = items.next().await {
1394    ///   let item = result?;
1395    /// }
1396    /// # gax::Result::<()>::Ok(()) });
1397    ///
1398    /// fn prepare_request_builder() -> ListMachines {
1399    ///   # panic!();
1400    ///   // ... details omitted ...
1401    /// }
1402    /// ```
1403    #[derive(Clone, Debug)]
1404    pub struct ListMachines(RequestBuilder<crate::model::ListMachinesRequest>);
1405
1406    impl ListMachines {
1407        pub(crate) fn new(
1408            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
1409        ) -> Self {
1410            Self(RequestBuilder::new(stub))
1411        }
1412
1413        /// Sets the full request, replacing any prior values.
1414        pub fn with_request<V: Into<crate::model::ListMachinesRequest>>(mut self, v: V) -> Self {
1415            self.0.request = v.into();
1416            self
1417        }
1418
1419        /// Sets all the options, replacing any prior values.
1420        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1421            self.0.options = v.into();
1422            self
1423        }
1424
1425        /// Sends the request.
1426        pub async fn send(self) -> Result<crate::model::ListMachinesResponse> {
1427            (*self.0.stub)
1428                .list_machines(self.0.request, self.0.options)
1429                .await
1430                .map(gax::response::Response::into_body)
1431        }
1432
1433        /// Streams each page in the collection.
1434        pub fn by_page(
1435            self,
1436        ) -> impl gax::paginator::Paginator<crate::model::ListMachinesResponse, gax::error::Error>
1437        {
1438            use std::clone::Clone;
1439            let token = self.0.request.page_token.clone();
1440            let execute = move |token: String| {
1441                let mut builder = self.clone();
1442                builder.0.request = builder.0.request.set_page_token(token);
1443                builder.send()
1444            };
1445            gax::paginator::internal::new_paginator(token, execute)
1446        }
1447
1448        /// Streams each item in the collection.
1449        pub fn by_item(
1450            self,
1451        ) -> impl gax::paginator::ItemPaginator<crate::model::ListMachinesResponse, gax::error::Error>
1452        {
1453            use gax::paginator::Paginator;
1454            self.by_page().items()
1455        }
1456
1457        /// Sets the value of [parent][crate::model::ListMachinesRequest::parent].
1458        ///
1459        /// This is a **required** field for requests.
1460        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1461            self.0.request.parent = v.into();
1462            self
1463        }
1464
1465        /// Sets the value of [page_size][crate::model::ListMachinesRequest::page_size].
1466        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1467            self.0.request.page_size = v.into();
1468            self
1469        }
1470
1471        /// Sets the value of [page_token][crate::model::ListMachinesRequest::page_token].
1472        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1473            self.0.request.page_token = v.into();
1474            self
1475        }
1476
1477        /// Sets the value of [filter][crate::model::ListMachinesRequest::filter].
1478        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1479            self.0.request.filter = v.into();
1480            self
1481        }
1482
1483        /// Sets the value of [order_by][crate::model::ListMachinesRequest::order_by].
1484        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1485            self.0.request.order_by = v.into();
1486            self
1487        }
1488    }
1489
1490    #[doc(hidden)]
1491    impl gax::options::internal::RequestBuilder for ListMachines {
1492        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1493            &mut self.0.options
1494        }
1495    }
1496
1497    /// The request builder for [EdgeContainer::get_machine][super::super::client::EdgeContainer::get_machine] calls.
1498    ///
1499    /// # Example
1500    /// ```no_run
1501    /// # use google_cloud_edgecontainer_v1::builder;
1502    /// use builder::edge_container::GetMachine;
1503    /// # tokio_test::block_on(async {
1504    /// let builder = prepare_request_builder();
1505    /// let response = builder.send().await?;
1506    /// # gax::Result::<()>::Ok(()) });
1507    ///
1508    /// fn prepare_request_builder() -> GetMachine {
1509    ///   # panic!();
1510    ///   // ... details omitted ...
1511    /// }
1512    /// ```
1513    #[derive(Clone, Debug)]
1514    pub struct GetMachine(RequestBuilder<crate::model::GetMachineRequest>);
1515
1516    impl GetMachine {
1517        pub(crate) fn new(
1518            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
1519        ) -> Self {
1520            Self(RequestBuilder::new(stub))
1521        }
1522
1523        /// Sets the full request, replacing any prior values.
1524        pub fn with_request<V: Into<crate::model::GetMachineRequest>>(mut self, v: V) -> Self {
1525            self.0.request = v.into();
1526            self
1527        }
1528
1529        /// Sets all the options, replacing any prior values.
1530        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1531            self.0.options = v.into();
1532            self
1533        }
1534
1535        /// Sends the request.
1536        pub async fn send(self) -> Result<crate::model::Machine> {
1537            (*self.0.stub)
1538                .get_machine(self.0.request, self.0.options)
1539                .await
1540                .map(gax::response::Response::into_body)
1541        }
1542
1543        /// Sets the value of [name][crate::model::GetMachineRequest::name].
1544        ///
1545        /// This is a **required** field for requests.
1546        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1547            self.0.request.name = v.into();
1548            self
1549        }
1550    }
1551
1552    #[doc(hidden)]
1553    impl gax::options::internal::RequestBuilder for GetMachine {
1554        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1555            &mut self.0.options
1556        }
1557    }
1558
1559    /// The request builder for [EdgeContainer::list_vpn_connections][super::super::client::EdgeContainer::list_vpn_connections] calls.
1560    ///
1561    /// # Example
1562    /// ```no_run
1563    /// # use google_cloud_edgecontainer_v1::builder;
1564    /// use builder::edge_container::ListVpnConnections;
1565    /// # tokio_test::block_on(async {
1566    /// let builder = prepare_request_builder();
1567    /// use gax::paginator::ItemPaginator;
1568    /// let mut items = builder.by_item();
1569    /// while let Some(result) = items.next().await {
1570    ///   let item = result?;
1571    /// }
1572    /// # gax::Result::<()>::Ok(()) });
1573    ///
1574    /// fn prepare_request_builder() -> ListVpnConnections {
1575    ///   # panic!();
1576    ///   // ... details omitted ...
1577    /// }
1578    /// ```
1579    #[derive(Clone, Debug)]
1580    pub struct ListVpnConnections(RequestBuilder<crate::model::ListVpnConnectionsRequest>);
1581
1582    impl ListVpnConnections {
1583        pub(crate) fn new(
1584            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
1585        ) -> Self {
1586            Self(RequestBuilder::new(stub))
1587        }
1588
1589        /// Sets the full request, replacing any prior values.
1590        pub fn with_request<V: Into<crate::model::ListVpnConnectionsRequest>>(
1591            mut self,
1592            v: V,
1593        ) -> Self {
1594            self.0.request = v.into();
1595            self
1596        }
1597
1598        /// Sets all the options, replacing any prior values.
1599        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1600            self.0.options = v.into();
1601            self
1602        }
1603
1604        /// Sends the request.
1605        pub async fn send(self) -> Result<crate::model::ListVpnConnectionsResponse> {
1606            (*self.0.stub)
1607                .list_vpn_connections(self.0.request, self.0.options)
1608                .await
1609                .map(gax::response::Response::into_body)
1610        }
1611
1612        /// Streams each page in the collection.
1613        pub fn by_page(
1614            self,
1615        ) -> impl gax::paginator::Paginator<crate::model::ListVpnConnectionsResponse, gax::error::Error>
1616        {
1617            use std::clone::Clone;
1618            let token = self.0.request.page_token.clone();
1619            let execute = move |token: String| {
1620                let mut builder = self.clone();
1621                builder.0.request = builder.0.request.set_page_token(token);
1622                builder.send()
1623            };
1624            gax::paginator::internal::new_paginator(token, execute)
1625        }
1626
1627        /// Streams each item in the collection.
1628        pub fn by_item(
1629            self,
1630        ) -> impl gax::paginator::ItemPaginator<
1631            crate::model::ListVpnConnectionsResponse,
1632            gax::error::Error,
1633        > {
1634            use gax::paginator::Paginator;
1635            self.by_page().items()
1636        }
1637
1638        /// Sets the value of [parent][crate::model::ListVpnConnectionsRequest::parent].
1639        ///
1640        /// This is a **required** field for requests.
1641        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1642            self.0.request.parent = v.into();
1643            self
1644        }
1645
1646        /// Sets the value of [page_size][crate::model::ListVpnConnectionsRequest::page_size].
1647        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1648            self.0.request.page_size = v.into();
1649            self
1650        }
1651
1652        /// Sets the value of [page_token][crate::model::ListVpnConnectionsRequest::page_token].
1653        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1654            self.0.request.page_token = v.into();
1655            self
1656        }
1657
1658        /// Sets the value of [filter][crate::model::ListVpnConnectionsRequest::filter].
1659        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1660            self.0.request.filter = v.into();
1661            self
1662        }
1663
1664        /// Sets the value of [order_by][crate::model::ListVpnConnectionsRequest::order_by].
1665        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1666            self.0.request.order_by = v.into();
1667            self
1668        }
1669    }
1670
1671    #[doc(hidden)]
1672    impl gax::options::internal::RequestBuilder for ListVpnConnections {
1673        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1674            &mut self.0.options
1675        }
1676    }
1677
1678    /// The request builder for [EdgeContainer::get_vpn_connection][super::super::client::EdgeContainer::get_vpn_connection] calls.
1679    ///
1680    /// # Example
1681    /// ```no_run
1682    /// # use google_cloud_edgecontainer_v1::builder;
1683    /// use builder::edge_container::GetVpnConnection;
1684    /// # tokio_test::block_on(async {
1685    /// let builder = prepare_request_builder();
1686    /// let response = builder.send().await?;
1687    /// # gax::Result::<()>::Ok(()) });
1688    ///
1689    /// fn prepare_request_builder() -> GetVpnConnection {
1690    ///   # panic!();
1691    ///   // ... details omitted ...
1692    /// }
1693    /// ```
1694    #[derive(Clone, Debug)]
1695    pub struct GetVpnConnection(RequestBuilder<crate::model::GetVpnConnectionRequest>);
1696
1697    impl GetVpnConnection {
1698        pub(crate) fn new(
1699            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
1700        ) -> Self {
1701            Self(RequestBuilder::new(stub))
1702        }
1703
1704        /// Sets the full request, replacing any prior values.
1705        pub fn with_request<V: Into<crate::model::GetVpnConnectionRequest>>(
1706            mut self,
1707            v: V,
1708        ) -> Self {
1709            self.0.request = v.into();
1710            self
1711        }
1712
1713        /// Sets all the options, replacing any prior values.
1714        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1715            self.0.options = v.into();
1716            self
1717        }
1718
1719        /// Sends the request.
1720        pub async fn send(self) -> Result<crate::model::VpnConnection> {
1721            (*self.0.stub)
1722                .get_vpn_connection(self.0.request, self.0.options)
1723                .await
1724                .map(gax::response::Response::into_body)
1725        }
1726
1727        /// Sets the value of [name][crate::model::GetVpnConnectionRequest::name].
1728        ///
1729        /// This is a **required** field for requests.
1730        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1731            self.0.request.name = v.into();
1732            self
1733        }
1734    }
1735
1736    #[doc(hidden)]
1737    impl gax::options::internal::RequestBuilder for GetVpnConnection {
1738        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1739            &mut self.0.options
1740        }
1741    }
1742
1743    /// The request builder for [EdgeContainer::create_vpn_connection][super::super::client::EdgeContainer::create_vpn_connection] calls.
1744    ///
1745    /// # Example
1746    /// ```no_run
1747    /// # use google_cloud_edgecontainer_v1::builder;
1748    /// use builder::edge_container::CreateVpnConnection;
1749    /// # tokio_test::block_on(async {
1750    /// let builder = prepare_request_builder();
1751    /// use google_cloud_edgecontainer_v1::Poller;
1752    /// let response = builder.poller().until_done().await?;
1753    /// # gax::Result::<()>::Ok(()) });
1754    ///
1755    /// fn prepare_request_builder() -> CreateVpnConnection {
1756    ///   # panic!();
1757    ///   // ... details omitted ...
1758    /// }
1759    /// ```
1760    #[derive(Clone, Debug)]
1761    pub struct CreateVpnConnection(RequestBuilder<crate::model::CreateVpnConnectionRequest>);
1762
1763    impl CreateVpnConnection {
1764        pub(crate) fn new(
1765            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
1766        ) -> Self {
1767            Self(RequestBuilder::new(stub))
1768        }
1769
1770        /// Sets the full request, replacing any prior values.
1771        pub fn with_request<V: Into<crate::model::CreateVpnConnectionRequest>>(
1772            mut self,
1773            v: V,
1774        ) -> Self {
1775            self.0.request = v.into();
1776            self
1777        }
1778
1779        /// Sets all the options, replacing any prior values.
1780        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1781            self.0.options = v.into();
1782            self
1783        }
1784
1785        /// Sends the request.
1786        ///
1787        /// # Long running operations
1788        ///
1789        /// This starts, but does not poll, a longrunning operation. More information
1790        /// on [create_vpn_connection][super::super::client::EdgeContainer::create_vpn_connection].
1791        pub async fn send(self) -> Result<longrunning::model::Operation> {
1792            (*self.0.stub)
1793                .create_vpn_connection(self.0.request, self.0.options)
1794                .await
1795                .map(gax::response::Response::into_body)
1796        }
1797
1798        /// Creates a [Poller][lro::Poller] to work with `create_vpn_connection`.
1799        pub fn poller(
1800            self,
1801        ) -> impl lro::Poller<crate::model::VpnConnection, crate::model::OperationMetadata>
1802        {
1803            type Operation = lro::internal::Operation<
1804                crate::model::VpnConnection,
1805                crate::model::OperationMetadata,
1806            >;
1807            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1808            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1809
1810            let stub = self.0.stub.clone();
1811            let mut options = self.0.options.clone();
1812            options.set_retry_policy(gax::retry_policy::NeverRetry);
1813            let query = move |name| {
1814                let stub = stub.clone();
1815                let options = options.clone();
1816                async {
1817                    let op = GetOperation::new(stub)
1818                        .set_name(name)
1819                        .with_options(options)
1820                        .send()
1821                        .await?;
1822                    Ok(Operation::new(op))
1823                }
1824            };
1825
1826            let start = move || async {
1827                let op = self.send().await?;
1828                Ok(Operation::new(op))
1829            };
1830
1831            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1832        }
1833
1834        /// Sets the value of [parent][crate::model::CreateVpnConnectionRequest::parent].
1835        ///
1836        /// This is a **required** field for requests.
1837        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1838            self.0.request.parent = v.into();
1839            self
1840        }
1841
1842        /// Sets the value of [vpn_connection_id][crate::model::CreateVpnConnectionRequest::vpn_connection_id].
1843        ///
1844        /// This is a **required** field for requests.
1845        pub fn set_vpn_connection_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1846            self.0.request.vpn_connection_id = v.into();
1847            self
1848        }
1849
1850        /// Sets the value of [vpn_connection][crate::model::CreateVpnConnectionRequest::vpn_connection].
1851        ///
1852        /// This is a **required** field for requests.
1853        pub fn set_vpn_connection<T: Into<std::option::Option<crate::model::VpnConnection>>>(
1854            mut self,
1855            v: T,
1856        ) -> Self {
1857            self.0.request.vpn_connection = v.into();
1858            self
1859        }
1860
1861        /// Sets the value of [request_id][crate::model::CreateVpnConnectionRequest::request_id].
1862        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1863            self.0.request.request_id = v.into();
1864            self
1865        }
1866    }
1867
1868    #[doc(hidden)]
1869    impl gax::options::internal::RequestBuilder for CreateVpnConnection {
1870        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1871            &mut self.0.options
1872        }
1873    }
1874
1875    /// The request builder for [EdgeContainer::delete_vpn_connection][super::super::client::EdgeContainer::delete_vpn_connection] calls.
1876    ///
1877    /// # Example
1878    /// ```no_run
1879    /// # use google_cloud_edgecontainer_v1::builder;
1880    /// use builder::edge_container::DeleteVpnConnection;
1881    /// # tokio_test::block_on(async {
1882    /// let builder = prepare_request_builder();
1883    /// use google_cloud_edgecontainer_v1::Poller;
1884    /// let response = builder.poller().until_done().await?;
1885    /// # gax::Result::<()>::Ok(()) });
1886    ///
1887    /// fn prepare_request_builder() -> DeleteVpnConnection {
1888    ///   # panic!();
1889    ///   // ... details omitted ...
1890    /// }
1891    /// ```
1892    #[derive(Clone, Debug)]
1893    pub struct DeleteVpnConnection(RequestBuilder<crate::model::DeleteVpnConnectionRequest>);
1894
1895    impl DeleteVpnConnection {
1896        pub(crate) fn new(
1897            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
1898        ) -> Self {
1899            Self(RequestBuilder::new(stub))
1900        }
1901
1902        /// Sets the full request, replacing any prior values.
1903        pub fn with_request<V: Into<crate::model::DeleteVpnConnectionRequest>>(
1904            mut self,
1905            v: V,
1906        ) -> Self {
1907            self.0.request = v.into();
1908            self
1909        }
1910
1911        /// Sets all the options, replacing any prior values.
1912        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1913            self.0.options = v.into();
1914            self
1915        }
1916
1917        /// Sends the request.
1918        ///
1919        /// # Long running operations
1920        ///
1921        /// This starts, but does not poll, a longrunning operation. More information
1922        /// on [delete_vpn_connection][super::super::client::EdgeContainer::delete_vpn_connection].
1923        pub async fn send(self) -> Result<longrunning::model::Operation> {
1924            (*self.0.stub)
1925                .delete_vpn_connection(self.0.request, self.0.options)
1926                .await
1927                .map(gax::response::Response::into_body)
1928        }
1929
1930        /// Creates a [Poller][lro::Poller] to work with `delete_vpn_connection`.
1931        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
1932            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1933            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1934            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1935
1936            let stub = self.0.stub.clone();
1937            let mut options = self.0.options.clone();
1938            options.set_retry_policy(gax::retry_policy::NeverRetry);
1939            let query = move |name| {
1940                let stub = stub.clone();
1941                let options = options.clone();
1942                async {
1943                    let op = GetOperation::new(stub)
1944                        .set_name(name)
1945                        .with_options(options)
1946                        .send()
1947                        .await?;
1948                    Ok(Operation::new(op))
1949                }
1950            };
1951
1952            let start = move || async {
1953                let op = self.send().await?;
1954                Ok(Operation::new(op))
1955            };
1956
1957            lro::internal::new_unit_response_poller(
1958                polling_error_policy,
1959                polling_backoff_policy,
1960                start,
1961                query,
1962            )
1963        }
1964
1965        /// Sets the value of [name][crate::model::DeleteVpnConnectionRequest::name].
1966        ///
1967        /// This is a **required** field for requests.
1968        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1969            self.0.request.name = v.into();
1970            self
1971        }
1972
1973        /// Sets the value of [request_id][crate::model::DeleteVpnConnectionRequest::request_id].
1974        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1975            self.0.request.request_id = v.into();
1976            self
1977        }
1978    }
1979
1980    #[doc(hidden)]
1981    impl gax::options::internal::RequestBuilder for DeleteVpnConnection {
1982        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1983            &mut self.0.options
1984        }
1985    }
1986
1987    /// The request builder for [EdgeContainer::get_server_config][super::super::client::EdgeContainer::get_server_config] calls.
1988    ///
1989    /// # Example
1990    /// ```no_run
1991    /// # use google_cloud_edgecontainer_v1::builder;
1992    /// use builder::edge_container::GetServerConfig;
1993    /// # tokio_test::block_on(async {
1994    /// let builder = prepare_request_builder();
1995    /// let response = builder.send().await?;
1996    /// # gax::Result::<()>::Ok(()) });
1997    ///
1998    /// fn prepare_request_builder() -> GetServerConfig {
1999    ///   # panic!();
2000    ///   // ... details omitted ...
2001    /// }
2002    /// ```
2003    #[derive(Clone, Debug)]
2004    pub struct GetServerConfig(RequestBuilder<crate::model::GetServerConfigRequest>);
2005
2006    impl GetServerConfig {
2007        pub(crate) fn new(
2008            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
2009        ) -> Self {
2010            Self(RequestBuilder::new(stub))
2011        }
2012
2013        /// Sets the full request, replacing any prior values.
2014        pub fn with_request<V: Into<crate::model::GetServerConfigRequest>>(mut self, v: V) -> Self {
2015            self.0.request = v.into();
2016            self
2017        }
2018
2019        /// Sets all the options, replacing any prior values.
2020        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2021            self.0.options = v.into();
2022            self
2023        }
2024
2025        /// Sends the request.
2026        pub async fn send(self) -> Result<crate::model::ServerConfig> {
2027            (*self.0.stub)
2028                .get_server_config(self.0.request, self.0.options)
2029                .await
2030                .map(gax::response::Response::into_body)
2031        }
2032
2033        /// Sets the value of [name][crate::model::GetServerConfigRequest::name].
2034        ///
2035        /// This is a **required** field for requests.
2036        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2037            self.0.request.name = v.into();
2038            self
2039        }
2040    }
2041
2042    #[doc(hidden)]
2043    impl gax::options::internal::RequestBuilder for GetServerConfig {
2044        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2045            &mut self.0.options
2046        }
2047    }
2048
2049    /// The request builder for [EdgeContainer::list_locations][super::super::client::EdgeContainer::list_locations] calls.
2050    ///
2051    /// # Example
2052    /// ```no_run
2053    /// # use google_cloud_edgecontainer_v1::builder;
2054    /// use builder::edge_container::ListLocations;
2055    /// # tokio_test::block_on(async {
2056    /// let builder = prepare_request_builder();
2057    /// use gax::paginator::ItemPaginator;
2058    /// let mut items = builder.by_item();
2059    /// while let Some(result) = items.next().await {
2060    ///   let item = result?;
2061    /// }
2062    /// # gax::Result::<()>::Ok(()) });
2063    ///
2064    /// fn prepare_request_builder() -> ListLocations {
2065    ///   # panic!();
2066    ///   // ... details omitted ...
2067    /// }
2068    /// ```
2069    #[derive(Clone, Debug)]
2070    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
2071
2072    impl ListLocations {
2073        pub(crate) fn new(
2074            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
2075        ) -> Self {
2076            Self(RequestBuilder::new(stub))
2077        }
2078
2079        /// Sets the full request, replacing any prior values.
2080        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
2081            mut self,
2082            v: V,
2083        ) -> Self {
2084            self.0.request = v.into();
2085            self
2086        }
2087
2088        /// Sets all the options, replacing any prior values.
2089        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2090            self.0.options = v.into();
2091            self
2092        }
2093
2094        /// Sends the request.
2095        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
2096            (*self.0.stub)
2097                .list_locations(self.0.request, self.0.options)
2098                .await
2099                .map(gax::response::Response::into_body)
2100        }
2101
2102        /// Streams each page in the collection.
2103        pub fn by_page(
2104            self,
2105        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
2106        {
2107            use std::clone::Clone;
2108            let token = self.0.request.page_token.clone();
2109            let execute = move |token: String| {
2110                let mut builder = self.clone();
2111                builder.0.request = builder.0.request.set_page_token(token);
2112                builder.send()
2113            };
2114            gax::paginator::internal::new_paginator(token, execute)
2115        }
2116
2117        /// Streams each item in the collection.
2118        pub fn by_item(
2119            self,
2120        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
2121        {
2122            use gax::paginator::Paginator;
2123            self.by_page().items()
2124        }
2125
2126        /// Sets the value of [name][location::model::ListLocationsRequest::name].
2127        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2128            self.0.request.name = v.into();
2129            self
2130        }
2131
2132        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
2133        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2134            self.0.request.filter = v.into();
2135            self
2136        }
2137
2138        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
2139        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2140            self.0.request.page_size = v.into();
2141            self
2142        }
2143
2144        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
2145        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2146            self.0.request.page_token = v.into();
2147            self
2148        }
2149    }
2150
2151    #[doc(hidden)]
2152    impl gax::options::internal::RequestBuilder for ListLocations {
2153        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2154            &mut self.0.options
2155        }
2156    }
2157
2158    /// The request builder for [EdgeContainer::get_location][super::super::client::EdgeContainer::get_location] calls.
2159    ///
2160    /// # Example
2161    /// ```no_run
2162    /// # use google_cloud_edgecontainer_v1::builder;
2163    /// use builder::edge_container::GetLocation;
2164    /// # tokio_test::block_on(async {
2165    /// let builder = prepare_request_builder();
2166    /// let response = builder.send().await?;
2167    /// # gax::Result::<()>::Ok(()) });
2168    ///
2169    /// fn prepare_request_builder() -> GetLocation {
2170    ///   # panic!();
2171    ///   // ... details omitted ...
2172    /// }
2173    /// ```
2174    #[derive(Clone, Debug)]
2175    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
2176
2177    impl GetLocation {
2178        pub(crate) fn new(
2179            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
2180        ) -> Self {
2181            Self(RequestBuilder::new(stub))
2182        }
2183
2184        /// Sets the full request, replacing any prior values.
2185        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
2186            self.0.request = v.into();
2187            self
2188        }
2189
2190        /// Sets all the options, replacing any prior values.
2191        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2192            self.0.options = v.into();
2193            self
2194        }
2195
2196        /// Sends the request.
2197        pub async fn send(self) -> Result<location::model::Location> {
2198            (*self.0.stub)
2199                .get_location(self.0.request, self.0.options)
2200                .await
2201                .map(gax::response::Response::into_body)
2202        }
2203
2204        /// Sets the value of [name][location::model::GetLocationRequest::name].
2205        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2206            self.0.request.name = v.into();
2207            self
2208        }
2209    }
2210
2211    #[doc(hidden)]
2212    impl gax::options::internal::RequestBuilder for GetLocation {
2213        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2214            &mut self.0.options
2215        }
2216    }
2217
2218    /// The request builder for [EdgeContainer::list_operations][super::super::client::EdgeContainer::list_operations] calls.
2219    ///
2220    /// # Example
2221    /// ```no_run
2222    /// # use google_cloud_edgecontainer_v1::builder;
2223    /// use builder::edge_container::ListOperations;
2224    /// # tokio_test::block_on(async {
2225    /// let builder = prepare_request_builder();
2226    /// use gax::paginator::ItemPaginator;
2227    /// let mut items = builder.by_item();
2228    /// while let Some(result) = items.next().await {
2229    ///   let item = result?;
2230    /// }
2231    /// # gax::Result::<()>::Ok(()) });
2232    ///
2233    /// fn prepare_request_builder() -> ListOperations {
2234    ///   # panic!();
2235    ///   // ... details omitted ...
2236    /// }
2237    /// ```
2238    #[derive(Clone, Debug)]
2239    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
2240
2241    impl ListOperations {
2242        pub(crate) fn new(
2243            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
2244        ) -> Self {
2245            Self(RequestBuilder::new(stub))
2246        }
2247
2248        /// Sets the full request, replacing any prior values.
2249        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
2250            mut self,
2251            v: V,
2252        ) -> Self {
2253            self.0.request = v.into();
2254            self
2255        }
2256
2257        /// Sets all the options, replacing any prior values.
2258        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2259            self.0.options = v.into();
2260            self
2261        }
2262
2263        /// Sends the request.
2264        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
2265            (*self.0.stub)
2266                .list_operations(self.0.request, self.0.options)
2267                .await
2268                .map(gax::response::Response::into_body)
2269        }
2270
2271        /// Streams each page in the collection.
2272        pub fn by_page(
2273            self,
2274        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
2275        {
2276            use std::clone::Clone;
2277            let token = self.0.request.page_token.clone();
2278            let execute = move |token: String| {
2279                let mut builder = self.clone();
2280                builder.0.request = builder.0.request.set_page_token(token);
2281                builder.send()
2282            };
2283            gax::paginator::internal::new_paginator(token, execute)
2284        }
2285
2286        /// Streams each item in the collection.
2287        pub fn by_item(
2288            self,
2289        ) -> impl gax::paginator::ItemPaginator<
2290            longrunning::model::ListOperationsResponse,
2291            gax::error::Error,
2292        > {
2293            use gax::paginator::Paginator;
2294            self.by_page().items()
2295        }
2296
2297        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
2298        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2299            self.0.request.name = v.into();
2300            self
2301        }
2302
2303        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
2304        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2305            self.0.request.filter = v.into();
2306            self
2307        }
2308
2309        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
2310        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2311            self.0.request.page_size = v.into();
2312            self
2313        }
2314
2315        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
2316        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2317            self.0.request.page_token = v.into();
2318            self
2319        }
2320    }
2321
2322    #[doc(hidden)]
2323    impl gax::options::internal::RequestBuilder for ListOperations {
2324        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2325            &mut self.0.options
2326        }
2327    }
2328
2329    /// The request builder for [EdgeContainer::get_operation][super::super::client::EdgeContainer::get_operation] calls.
2330    ///
2331    /// # Example
2332    /// ```no_run
2333    /// # use google_cloud_edgecontainer_v1::builder;
2334    /// use builder::edge_container::GetOperation;
2335    /// # tokio_test::block_on(async {
2336    /// let builder = prepare_request_builder();
2337    /// let response = builder.send().await?;
2338    /// # gax::Result::<()>::Ok(()) });
2339    ///
2340    /// fn prepare_request_builder() -> GetOperation {
2341    ///   # panic!();
2342    ///   // ... details omitted ...
2343    /// }
2344    /// ```
2345    #[derive(Clone, Debug)]
2346    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
2347
2348    impl GetOperation {
2349        pub(crate) fn new(
2350            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
2351        ) -> Self {
2352            Self(RequestBuilder::new(stub))
2353        }
2354
2355        /// Sets the full request, replacing any prior values.
2356        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
2357            mut self,
2358            v: V,
2359        ) -> Self {
2360            self.0.request = v.into();
2361            self
2362        }
2363
2364        /// Sets all the options, replacing any prior values.
2365        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2366            self.0.options = v.into();
2367            self
2368        }
2369
2370        /// Sends the request.
2371        pub async fn send(self) -> Result<longrunning::model::Operation> {
2372            (*self.0.stub)
2373                .get_operation(self.0.request, self.0.options)
2374                .await
2375                .map(gax::response::Response::into_body)
2376        }
2377
2378        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
2379        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2380            self.0.request.name = v.into();
2381            self
2382        }
2383    }
2384
2385    #[doc(hidden)]
2386    impl gax::options::internal::RequestBuilder for GetOperation {
2387        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2388            &mut self.0.options
2389        }
2390    }
2391
2392    /// The request builder for [EdgeContainer::delete_operation][super::super::client::EdgeContainer::delete_operation] calls.
2393    ///
2394    /// # Example
2395    /// ```no_run
2396    /// # use google_cloud_edgecontainer_v1::builder;
2397    /// use builder::edge_container::DeleteOperation;
2398    /// # tokio_test::block_on(async {
2399    /// let builder = prepare_request_builder();
2400    /// let response = builder.send().await?;
2401    /// # gax::Result::<()>::Ok(()) });
2402    ///
2403    /// fn prepare_request_builder() -> DeleteOperation {
2404    ///   # panic!();
2405    ///   // ... details omitted ...
2406    /// }
2407    /// ```
2408    #[derive(Clone, Debug)]
2409    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
2410
2411    impl DeleteOperation {
2412        pub(crate) fn new(
2413            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
2414        ) -> Self {
2415            Self(RequestBuilder::new(stub))
2416        }
2417
2418        /// Sets the full request, replacing any prior values.
2419        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
2420            mut self,
2421            v: V,
2422        ) -> Self {
2423            self.0.request = v.into();
2424            self
2425        }
2426
2427        /// Sets all the options, replacing any prior values.
2428        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2429            self.0.options = v.into();
2430            self
2431        }
2432
2433        /// Sends the request.
2434        pub async fn send(self) -> Result<()> {
2435            (*self.0.stub)
2436                .delete_operation(self.0.request, self.0.options)
2437                .await
2438                .map(gax::response::Response::into_body)
2439        }
2440
2441        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
2442        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2443            self.0.request.name = v.into();
2444            self
2445        }
2446    }
2447
2448    #[doc(hidden)]
2449    impl gax::options::internal::RequestBuilder for DeleteOperation {
2450        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2451            &mut self.0.options
2452        }
2453    }
2454
2455    /// The request builder for [EdgeContainer::cancel_operation][super::super::client::EdgeContainer::cancel_operation] calls.
2456    ///
2457    /// # Example
2458    /// ```no_run
2459    /// # use google_cloud_edgecontainer_v1::builder;
2460    /// use builder::edge_container::CancelOperation;
2461    /// # tokio_test::block_on(async {
2462    /// let builder = prepare_request_builder();
2463    /// let response = builder.send().await?;
2464    /// # gax::Result::<()>::Ok(()) });
2465    ///
2466    /// fn prepare_request_builder() -> CancelOperation {
2467    ///   # panic!();
2468    ///   // ... details omitted ...
2469    /// }
2470    /// ```
2471    #[derive(Clone, Debug)]
2472    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
2473
2474    impl CancelOperation {
2475        pub(crate) fn new(
2476            stub: std::sync::Arc<dyn super::super::stub::dynamic::EdgeContainer>,
2477        ) -> Self {
2478            Self(RequestBuilder::new(stub))
2479        }
2480
2481        /// Sets the full request, replacing any prior values.
2482        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
2483            mut self,
2484            v: V,
2485        ) -> Self {
2486            self.0.request = v.into();
2487            self
2488        }
2489
2490        /// Sets all the options, replacing any prior values.
2491        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2492            self.0.options = v.into();
2493            self
2494        }
2495
2496        /// Sends the request.
2497        pub async fn send(self) -> Result<()> {
2498            (*self.0.stub)
2499                .cancel_operation(self.0.request, self.0.options)
2500                .await
2501                .map(gax::response::Response::into_body)
2502        }
2503
2504        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
2505        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2506            self.0.request.name = v.into();
2507            self
2508        }
2509    }
2510
2511    #[doc(hidden)]
2512    impl gax::options::internal::RequestBuilder for CancelOperation {
2513        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2514            &mut self.0.options
2515        }
2516    }
2517}