Skip to main content

google_cloud_container_v1/
builder.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17/// Request and client builders for [ClusterManager][crate::client::ClusterManager].
18pub mod cluster_manager {
19    use crate::Result;
20
21    /// A builder for [ClusterManager][crate::client::ClusterManager].
22    ///
23    /// ```
24    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
25    /// # use google_cloud_container_v1::*;
26    /// # use builder::cluster_manager::ClientBuilder;
27    /// # use client::ClusterManager;
28    /// let builder : ClientBuilder = ClusterManager::builder();
29    /// let client = builder
30    ///     .with_endpoint("https://container.googleapis.com")
31    ///     .build().await?;
32    /// # Ok(()) }
33    /// ```
34    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36    pub(crate) mod client {
37        use super::super::super::client::ClusterManager;
38        pub struct Factory;
39        impl crate::ClientFactory for Factory {
40            type Client = ClusterManager;
41            type Credentials = gaxi::options::Credentials;
42            async fn build(
43                self,
44                config: gaxi::options::ClientConfig,
45            ) -> crate::ClientBuilderResult<Self::Client> {
46                Self::Client::new(config).await
47            }
48        }
49    }
50
51    /// Common implementation for [crate::client::ClusterManager] request builders.
52    #[derive(Clone, Debug)]
53    pub(crate) struct RequestBuilder<R: std::default::Default> {
54        stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
55        request: R,
56        options: crate::RequestOptions,
57    }
58
59    impl<R> RequestBuilder<R>
60    where
61        R: std::default::Default,
62    {
63        pub(crate) fn new(
64            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
65        ) -> Self {
66            Self {
67                stub,
68                request: R::default(),
69                options: crate::RequestOptions::default(),
70            }
71        }
72    }
73
74    /// The request builder for [ClusterManager::list_clusters][crate::client::ClusterManager::list_clusters] calls.
75    ///
76    /// # Example
77    /// ```
78    /// # use google_cloud_container_v1::builder::cluster_manager::ListClusters;
79    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
80    ///
81    /// let builder = prepare_request_builder();
82    /// let response = builder.send().await?;
83    /// # Ok(()) }
84    ///
85    /// fn prepare_request_builder() -> ListClusters {
86    ///   # panic!();
87    ///   // ... details omitted ...
88    /// }
89    /// ```
90    #[derive(Clone, Debug)]
91    pub struct ListClusters(RequestBuilder<crate::model::ListClustersRequest>);
92
93    impl ListClusters {
94        pub(crate) fn new(
95            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
96        ) -> Self {
97            Self(RequestBuilder::new(stub))
98        }
99
100        /// Sets the full request, replacing any prior values.
101        pub fn with_request<V: Into<crate::model::ListClustersRequest>>(mut self, v: V) -> Self {
102            self.0.request = v.into();
103            self
104        }
105
106        /// Sets all the options, replacing any prior values.
107        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
108            self.0.options = v.into();
109            self
110        }
111
112        /// Sends the request.
113        pub async fn send(self) -> Result<crate::model::ListClustersResponse> {
114            (*self.0.stub)
115                .list_clusters(self.0.request, self.0.options)
116                .await
117                .map(crate::Response::into_body)
118        }
119
120        /// Sets the value of [project_id][crate::model::ListClustersRequest::project_id].
121        #[deprecated]
122        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
123            self.0.request.project_id = v.into();
124            self
125        }
126
127        /// Sets the value of [zone][crate::model::ListClustersRequest::zone].
128        #[deprecated]
129        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
130            self.0.request.zone = v.into();
131            self
132        }
133
134        /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
135        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
136            self.0.request.parent = v.into();
137            self
138        }
139    }
140
141    #[doc(hidden)]
142    impl crate::RequestBuilder for ListClusters {
143        fn request_options(&mut self) -> &mut crate::RequestOptions {
144            &mut self.0.options
145        }
146    }
147
148    /// The request builder for [ClusterManager::get_cluster][crate::client::ClusterManager::get_cluster] calls.
149    ///
150    /// # Example
151    /// ```
152    /// # use google_cloud_container_v1::builder::cluster_manager::GetCluster;
153    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
154    ///
155    /// let builder = prepare_request_builder();
156    /// let response = builder.send().await?;
157    /// # Ok(()) }
158    ///
159    /// fn prepare_request_builder() -> GetCluster {
160    ///   # panic!();
161    ///   // ... details omitted ...
162    /// }
163    /// ```
164    #[derive(Clone, Debug)]
165    pub struct GetCluster(RequestBuilder<crate::model::GetClusterRequest>);
166
167    impl GetCluster {
168        pub(crate) fn new(
169            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
170        ) -> Self {
171            Self(RequestBuilder::new(stub))
172        }
173
174        /// Sets the full request, replacing any prior values.
175        pub fn with_request<V: Into<crate::model::GetClusterRequest>>(mut self, v: V) -> Self {
176            self.0.request = v.into();
177            self
178        }
179
180        /// Sets all the options, replacing any prior values.
181        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
182            self.0.options = v.into();
183            self
184        }
185
186        /// Sends the request.
187        pub async fn send(self) -> Result<crate::model::Cluster> {
188            (*self.0.stub)
189                .get_cluster(self.0.request, self.0.options)
190                .await
191                .map(crate::Response::into_body)
192        }
193
194        /// Sets the value of [project_id][crate::model::GetClusterRequest::project_id].
195        #[deprecated]
196        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
197            self.0.request.project_id = v.into();
198            self
199        }
200
201        /// Sets the value of [zone][crate::model::GetClusterRequest::zone].
202        #[deprecated]
203        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
204            self.0.request.zone = v.into();
205            self
206        }
207
208        /// Sets the value of [cluster_id][crate::model::GetClusterRequest::cluster_id].
209        #[deprecated]
210        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
211            self.0.request.cluster_id = v.into();
212            self
213        }
214
215        /// Sets the value of [name][crate::model::GetClusterRequest::name].
216        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
217            self.0.request.name = v.into();
218            self
219        }
220    }
221
222    #[doc(hidden)]
223    impl crate::RequestBuilder for GetCluster {
224        fn request_options(&mut self) -> &mut crate::RequestOptions {
225            &mut self.0.options
226        }
227    }
228
229    /// The request builder for [ClusterManager::create_cluster][crate::client::ClusterManager::create_cluster] calls.
230    ///
231    /// # Example
232    /// ```
233    /// # use google_cloud_container_v1::builder::cluster_manager::CreateCluster;
234    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
235    ///
236    /// let builder = prepare_request_builder();
237    /// let response = builder.send().await?;
238    /// # Ok(()) }
239    ///
240    /// fn prepare_request_builder() -> CreateCluster {
241    ///   # panic!();
242    ///   // ... details omitted ...
243    /// }
244    /// ```
245    #[derive(Clone, Debug)]
246    pub struct CreateCluster(RequestBuilder<crate::model::CreateClusterRequest>);
247
248    impl CreateCluster {
249        pub(crate) fn new(
250            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
251        ) -> Self {
252            Self(RequestBuilder::new(stub))
253        }
254
255        /// Sets the full request, replacing any prior values.
256        pub fn with_request<V: Into<crate::model::CreateClusterRequest>>(mut self, v: V) -> Self {
257            self.0.request = v.into();
258            self
259        }
260
261        /// Sets all the options, replacing any prior values.
262        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
263            self.0.options = v.into();
264            self
265        }
266
267        /// Sends the request.
268        pub async fn send(self) -> Result<crate::model::Operation> {
269            (*self.0.stub)
270                .create_cluster(self.0.request, self.0.options)
271                .await
272                .map(crate::Response::into_body)
273        }
274
275        /// Sets the value of [project_id][crate::model::CreateClusterRequest::project_id].
276        #[deprecated]
277        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
278            self.0.request.project_id = v.into();
279            self
280        }
281
282        /// Sets the value of [zone][crate::model::CreateClusterRequest::zone].
283        #[deprecated]
284        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
285            self.0.request.zone = v.into();
286            self
287        }
288
289        /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
290        ///
291        /// This is a **required** field for requests.
292        pub fn set_cluster<T>(mut self, v: T) -> Self
293        where
294            T: std::convert::Into<crate::model::Cluster>,
295        {
296            self.0.request.cluster = std::option::Option::Some(v.into());
297            self
298        }
299
300        /// Sets or clears the value of [cluster][crate::model::CreateClusterRequest::cluster].
301        ///
302        /// This is a **required** field for requests.
303        pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
304        where
305            T: std::convert::Into<crate::model::Cluster>,
306        {
307            self.0.request.cluster = v.map(|x| x.into());
308            self
309        }
310
311        /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
312        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
313            self.0.request.parent = v.into();
314            self
315        }
316    }
317
318    #[doc(hidden)]
319    impl crate::RequestBuilder for CreateCluster {
320        fn request_options(&mut self) -> &mut crate::RequestOptions {
321            &mut self.0.options
322        }
323    }
324
325    /// The request builder for [ClusterManager::update_cluster][crate::client::ClusterManager::update_cluster] calls.
326    ///
327    /// # Example
328    /// ```
329    /// # use google_cloud_container_v1::builder::cluster_manager::UpdateCluster;
330    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
331    ///
332    /// let builder = prepare_request_builder();
333    /// let response = builder.send().await?;
334    /// # Ok(()) }
335    ///
336    /// fn prepare_request_builder() -> UpdateCluster {
337    ///   # panic!();
338    ///   // ... details omitted ...
339    /// }
340    /// ```
341    #[derive(Clone, Debug)]
342    pub struct UpdateCluster(RequestBuilder<crate::model::UpdateClusterRequest>);
343
344    impl UpdateCluster {
345        pub(crate) fn new(
346            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
347        ) -> Self {
348            Self(RequestBuilder::new(stub))
349        }
350
351        /// Sets the full request, replacing any prior values.
352        pub fn with_request<V: Into<crate::model::UpdateClusterRequest>>(mut self, v: V) -> Self {
353            self.0.request = v.into();
354            self
355        }
356
357        /// Sets all the options, replacing any prior values.
358        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
359            self.0.options = v.into();
360            self
361        }
362
363        /// Sends the request.
364        pub async fn send(self) -> Result<crate::model::Operation> {
365            (*self.0.stub)
366                .update_cluster(self.0.request, self.0.options)
367                .await
368                .map(crate::Response::into_body)
369        }
370
371        /// Sets the value of [project_id][crate::model::UpdateClusterRequest::project_id].
372        #[deprecated]
373        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
374            self.0.request.project_id = v.into();
375            self
376        }
377
378        /// Sets the value of [zone][crate::model::UpdateClusterRequest::zone].
379        #[deprecated]
380        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
381            self.0.request.zone = v.into();
382            self
383        }
384
385        /// Sets the value of [cluster_id][crate::model::UpdateClusterRequest::cluster_id].
386        #[deprecated]
387        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
388            self.0.request.cluster_id = v.into();
389            self
390        }
391
392        /// Sets the value of [update][crate::model::UpdateClusterRequest::update].
393        ///
394        /// This is a **required** field for requests.
395        pub fn set_update<T>(mut self, v: T) -> Self
396        where
397            T: std::convert::Into<crate::model::ClusterUpdate>,
398        {
399            self.0.request.update = std::option::Option::Some(v.into());
400            self
401        }
402
403        /// Sets or clears the value of [update][crate::model::UpdateClusterRequest::update].
404        ///
405        /// This is a **required** field for requests.
406        pub fn set_or_clear_update<T>(mut self, v: std::option::Option<T>) -> Self
407        where
408            T: std::convert::Into<crate::model::ClusterUpdate>,
409        {
410            self.0.request.update = v.map(|x| x.into());
411            self
412        }
413
414        /// Sets the value of [name][crate::model::UpdateClusterRequest::name].
415        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
416            self.0.request.name = v.into();
417            self
418        }
419    }
420
421    #[doc(hidden)]
422    impl crate::RequestBuilder for UpdateCluster {
423        fn request_options(&mut self) -> &mut crate::RequestOptions {
424            &mut self.0.options
425        }
426    }
427
428    /// The request builder for [ClusterManager::update_node_pool][crate::client::ClusterManager::update_node_pool] calls.
429    ///
430    /// # Example
431    /// ```
432    /// # use google_cloud_container_v1::builder::cluster_manager::UpdateNodePool;
433    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
434    ///
435    /// let builder = prepare_request_builder();
436    /// let response = builder.send().await?;
437    /// # Ok(()) }
438    ///
439    /// fn prepare_request_builder() -> UpdateNodePool {
440    ///   # panic!();
441    ///   // ... details omitted ...
442    /// }
443    /// ```
444    #[derive(Clone, Debug)]
445    pub struct UpdateNodePool(RequestBuilder<crate::model::UpdateNodePoolRequest>);
446
447    impl UpdateNodePool {
448        pub(crate) fn new(
449            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
450        ) -> Self {
451            Self(RequestBuilder::new(stub))
452        }
453
454        /// Sets the full request, replacing any prior values.
455        pub fn with_request<V: Into<crate::model::UpdateNodePoolRequest>>(mut self, v: V) -> Self {
456            self.0.request = v.into();
457            self
458        }
459
460        /// Sets all the options, replacing any prior values.
461        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
462            self.0.options = v.into();
463            self
464        }
465
466        /// Sends the request.
467        pub async fn send(self) -> Result<crate::model::Operation> {
468            (*self.0.stub)
469                .update_node_pool(self.0.request, self.0.options)
470                .await
471                .map(crate::Response::into_body)
472        }
473
474        /// Sets the value of [project_id][crate::model::UpdateNodePoolRequest::project_id].
475        #[deprecated]
476        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
477            self.0.request.project_id = v.into();
478            self
479        }
480
481        /// Sets the value of [zone][crate::model::UpdateNodePoolRequest::zone].
482        #[deprecated]
483        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
484            self.0.request.zone = v.into();
485            self
486        }
487
488        /// Sets the value of [cluster_id][crate::model::UpdateNodePoolRequest::cluster_id].
489        #[deprecated]
490        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
491            self.0.request.cluster_id = v.into();
492            self
493        }
494
495        /// Sets the value of [node_pool_id][crate::model::UpdateNodePoolRequest::node_pool_id].
496        #[deprecated]
497        pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
498            self.0.request.node_pool_id = v.into();
499            self
500        }
501
502        /// Sets the value of [node_version][crate::model::UpdateNodePoolRequest::node_version].
503        ///
504        /// This is a **required** field for requests.
505        pub fn set_node_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
506            self.0.request.node_version = v.into();
507            self
508        }
509
510        /// Sets the value of [image_type][crate::model::UpdateNodePoolRequest::image_type].
511        ///
512        /// This is a **required** field for requests.
513        pub fn set_image_type<T: Into<std::string::String>>(mut self, v: T) -> Self {
514            self.0.request.image_type = v.into();
515            self
516        }
517
518        /// Sets the value of [name][crate::model::UpdateNodePoolRequest::name].
519        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
520            self.0.request.name = v.into();
521            self
522        }
523
524        /// Sets the value of [image][crate::model::UpdateNodePoolRequest::image].
525        pub fn set_image<T: Into<std::string::String>>(mut self, v: T) -> Self {
526            self.0.request.image = v.into();
527            self
528        }
529
530        /// Sets the value of [image_project][crate::model::UpdateNodePoolRequest::image_project].
531        pub fn set_image_project<T: Into<std::string::String>>(mut self, v: T) -> Self {
532            self.0.request.image_project = v.into();
533            self
534        }
535
536        /// Sets the value of [locations][crate::model::UpdateNodePoolRequest::locations].
537        pub fn set_locations<T, V>(mut self, v: T) -> Self
538        where
539            T: std::iter::IntoIterator<Item = V>,
540            V: std::convert::Into<std::string::String>,
541        {
542            use std::iter::Iterator;
543            self.0.request.locations = v.into_iter().map(|i| i.into()).collect();
544            self
545        }
546
547        /// Sets the value of [workload_metadata_config][crate::model::UpdateNodePoolRequest::workload_metadata_config].
548        pub fn set_workload_metadata_config<T>(mut self, v: T) -> Self
549        where
550            T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
551        {
552            self.0.request.workload_metadata_config = std::option::Option::Some(v.into());
553            self
554        }
555
556        /// Sets or clears the value of [workload_metadata_config][crate::model::UpdateNodePoolRequest::workload_metadata_config].
557        pub fn set_or_clear_workload_metadata_config<T>(mut self, v: std::option::Option<T>) -> Self
558        where
559            T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
560        {
561            self.0.request.workload_metadata_config = v.map(|x| x.into());
562            self
563        }
564
565        /// Sets the value of [upgrade_settings][crate::model::UpdateNodePoolRequest::upgrade_settings].
566        pub fn set_upgrade_settings<T>(mut self, v: T) -> Self
567        where
568            T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
569        {
570            self.0.request.upgrade_settings = std::option::Option::Some(v.into());
571            self
572        }
573
574        /// Sets or clears the value of [upgrade_settings][crate::model::UpdateNodePoolRequest::upgrade_settings].
575        pub fn set_or_clear_upgrade_settings<T>(mut self, v: std::option::Option<T>) -> Self
576        where
577            T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
578        {
579            self.0.request.upgrade_settings = v.map(|x| x.into());
580            self
581        }
582
583        /// Sets the value of [tags][crate::model::UpdateNodePoolRequest::tags].
584        pub fn set_tags<T>(mut self, v: T) -> Self
585        where
586            T: std::convert::Into<crate::model::NetworkTags>,
587        {
588            self.0.request.tags = std::option::Option::Some(v.into());
589            self
590        }
591
592        /// Sets or clears the value of [tags][crate::model::UpdateNodePoolRequest::tags].
593        pub fn set_or_clear_tags<T>(mut self, v: std::option::Option<T>) -> Self
594        where
595            T: std::convert::Into<crate::model::NetworkTags>,
596        {
597            self.0.request.tags = v.map(|x| x.into());
598            self
599        }
600
601        /// Sets the value of [taints][crate::model::UpdateNodePoolRequest::taints].
602        pub fn set_taints<T>(mut self, v: T) -> Self
603        where
604            T: std::convert::Into<crate::model::NodeTaints>,
605        {
606            self.0.request.taints = std::option::Option::Some(v.into());
607            self
608        }
609
610        /// Sets or clears the value of [taints][crate::model::UpdateNodePoolRequest::taints].
611        pub fn set_or_clear_taints<T>(mut self, v: std::option::Option<T>) -> Self
612        where
613            T: std::convert::Into<crate::model::NodeTaints>,
614        {
615            self.0.request.taints = v.map(|x| x.into());
616            self
617        }
618
619        /// Sets the value of [labels][crate::model::UpdateNodePoolRequest::labels].
620        pub fn set_labels<T>(mut self, v: T) -> Self
621        where
622            T: std::convert::Into<crate::model::NodeLabels>,
623        {
624            self.0.request.labels = std::option::Option::Some(v.into());
625            self
626        }
627
628        /// Sets or clears the value of [labels][crate::model::UpdateNodePoolRequest::labels].
629        pub fn set_or_clear_labels<T>(mut self, v: std::option::Option<T>) -> Self
630        where
631            T: std::convert::Into<crate::model::NodeLabels>,
632        {
633            self.0.request.labels = v.map(|x| x.into());
634            self
635        }
636
637        /// Sets the value of [linux_node_config][crate::model::UpdateNodePoolRequest::linux_node_config].
638        pub fn set_linux_node_config<T>(mut self, v: T) -> Self
639        where
640            T: std::convert::Into<crate::model::LinuxNodeConfig>,
641        {
642            self.0.request.linux_node_config = std::option::Option::Some(v.into());
643            self
644        }
645
646        /// Sets or clears the value of [linux_node_config][crate::model::UpdateNodePoolRequest::linux_node_config].
647        pub fn set_or_clear_linux_node_config<T>(mut self, v: std::option::Option<T>) -> Self
648        where
649            T: std::convert::Into<crate::model::LinuxNodeConfig>,
650        {
651            self.0.request.linux_node_config = v.map(|x| x.into());
652            self
653        }
654
655        /// Sets the value of [kubelet_config][crate::model::UpdateNodePoolRequest::kubelet_config].
656        pub fn set_kubelet_config<T>(mut self, v: T) -> Self
657        where
658            T: std::convert::Into<crate::model::NodeKubeletConfig>,
659        {
660            self.0.request.kubelet_config = std::option::Option::Some(v.into());
661            self
662        }
663
664        /// Sets or clears the value of [kubelet_config][crate::model::UpdateNodePoolRequest::kubelet_config].
665        pub fn set_or_clear_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
666        where
667            T: std::convert::Into<crate::model::NodeKubeletConfig>,
668        {
669            self.0.request.kubelet_config = v.map(|x| x.into());
670            self
671        }
672
673        /// Sets the value of [node_network_config][crate::model::UpdateNodePoolRequest::node_network_config].
674        pub fn set_node_network_config<T>(mut self, v: T) -> Self
675        where
676            T: std::convert::Into<crate::model::NodeNetworkConfig>,
677        {
678            self.0.request.node_network_config = std::option::Option::Some(v.into());
679            self
680        }
681
682        /// Sets or clears the value of [node_network_config][crate::model::UpdateNodePoolRequest::node_network_config].
683        pub fn set_or_clear_node_network_config<T>(mut self, v: std::option::Option<T>) -> Self
684        where
685            T: std::convert::Into<crate::model::NodeNetworkConfig>,
686        {
687            self.0.request.node_network_config = v.map(|x| x.into());
688            self
689        }
690
691        /// Sets the value of [gcfs_config][crate::model::UpdateNodePoolRequest::gcfs_config].
692        pub fn set_gcfs_config<T>(mut self, v: T) -> Self
693        where
694            T: std::convert::Into<crate::model::GcfsConfig>,
695        {
696            self.0.request.gcfs_config = std::option::Option::Some(v.into());
697            self
698        }
699
700        /// Sets or clears the value of [gcfs_config][crate::model::UpdateNodePoolRequest::gcfs_config].
701        pub fn set_or_clear_gcfs_config<T>(mut self, v: std::option::Option<T>) -> Self
702        where
703            T: std::convert::Into<crate::model::GcfsConfig>,
704        {
705            self.0.request.gcfs_config = v.map(|x| x.into());
706            self
707        }
708
709        /// Sets the value of [confidential_nodes][crate::model::UpdateNodePoolRequest::confidential_nodes].
710        pub fn set_confidential_nodes<T>(mut self, v: T) -> Self
711        where
712            T: std::convert::Into<crate::model::ConfidentialNodes>,
713        {
714            self.0.request.confidential_nodes = std::option::Option::Some(v.into());
715            self
716        }
717
718        /// Sets or clears the value of [confidential_nodes][crate::model::UpdateNodePoolRequest::confidential_nodes].
719        pub fn set_or_clear_confidential_nodes<T>(mut self, v: std::option::Option<T>) -> Self
720        where
721            T: std::convert::Into<crate::model::ConfidentialNodes>,
722        {
723            self.0.request.confidential_nodes = v.map(|x| x.into());
724            self
725        }
726
727        /// Sets the value of [gvnic][crate::model::UpdateNodePoolRequest::gvnic].
728        pub fn set_gvnic<T>(mut self, v: T) -> Self
729        where
730            T: std::convert::Into<crate::model::VirtualNIC>,
731        {
732            self.0.request.gvnic = std::option::Option::Some(v.into());
733            self
734        }
735
736        /// Sets or clears the value of [gvnic][crate::model::UpdateNodePoolRequest::gvnic].
737        pub fn set_or_clear_gvnic<T>(mut self, v: std::option::Option<T>) -> Self
738        where
739            T: std::convert::Into<crate::model::VirtualNIC>,
740        {
741            self.0.request.gvnic = v.map(|x| x.into());
742            self
743        }
744
745        /// Sets the value of [etag][crate::model::UpdateNodePoolRequest::etag].
746        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
747            self.0.request.etag = v.into();
748            self
749        }
750
751        /// Sets the value of [fast_socket][crate::model::UpdateNodePoolRequest::fast_socket].
752        pub fn set_fast_socket<T>(mut self, v: T) -> Self
753        where
754            T: std::convert::Into<crate::model::FastSocket>,
755        {
756            self.0.request.fast_socket = std::option::Option::Some(v.into());
757            self
758        }
759
760        /// Sets or clears the value of [fast_socket][crate::model::UpdateNodePoolRequest::fast_socket].
761        pub fn set_or_clear_fast_socket<T>(mut self, v: std::option::Option<T>) -> Self
762        where
763            T: std::convert::Into<crate::model::FastSocket>,
764        {
765            self.0.request.fast_socket = v.map(|x| x.into());
766            self
767        }
768
769        /// Sets the value of [logging_config][crate::model::UpdateNodePoolRequest::logging_config].
770        pub fn set_logging_config<T>(mut self, v: T) -> Self
771        where
772            T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
773        {
774            self.0.request.logging_config = std::option::Option::Some(v.into());
775            self
776        }
777
778        /// Sets or clears the value of [logging_config][crate::model::UpdateNodePoolRequest::logging_config].
779        pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
780        where
781            T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
782        {
783            self.0.request.logging_config = v.map(|x| x.into());
784            self
785        }
786
787        /// Sets the value of [resource_labels][crate::model::UpdateNodePoolRequest::resource_labels].
788        pub fn set_resource_labels<T>(mut self, v: T) -> Self
789        where
790            T: std::convert::Into<crate::model::ResourceLabels>,
791        {
792            self.0.request.resource_labels = std::option::Option::Some(v.into());
793            self
794        }
795
796        /// Sets or clears the value of [resource_labels][crate::model::UpdateNodePoolRequest::resource_labels].
797        pub fn set_or_clear_resource_labels<T>(mut self, v: std::option::Option<T>) -> Self
798        where
799            T: std::convert::Into<crate::model::ResourceLabels>,
800        {
801            self.0.request.resource_labels = v.map(|x| x.into());
802            self
803        }
804
805        /// Sets the value of [windows_node_config][crate::model::UpdateNodePoolRequest::windows_node_config].
806        pub fn set_windows_node_config<T>(mut self, v: T) -> Self
807        where
808            T: std::convert::Into<crate::model::WindowsNodeConfig>,
809        {
810            self.0.request.windows_node_config = std::option::Option::Some(v.into());
811            self
812        }
813
814        /// Sets or clears the value of [windows_node_config][crate::model::UpdateNodePoolRequest::windows_node_config].
815        pub fn set_or_clear_windows_node_config<T>(mut self, v: std::option::Option<T>) -> Self
816        where
817            T: std::convert::Into<crate::model::WindowsNodeConfig>,
818        {
819            self.0.request.windows_node_config = v.map(|x| x.into());
820            self
821        }
822
823        /// Sets the value of [accelerators][crate::model::UpdateNodePoolRequest::accelerators].
824        pub fn set_accelerators<T, V>(mut self, v: T) -> Self
825        where
826            T: std::iter::IntoIterator<Item = V>,
827            V: std::convert::Into<crate::model::AcceleratorConfig>,
828        {
829            use std::iter::Iterator;
830            self.0.request.accelerators = v.into_iter().map(|i| i.into()).collect();
831            self
832        }
833
834        /// Sets the value of [machine_type][crate::model::UpdateNodePoolRequest::machine_type].
835        pub fn set_machine_type<T: Into<std::string::String>>(mut self, v: T) -> Self {
836            self.0.request.machine_type = v.into();
837            self
838        }
839
840        /// Sets the value of [disk_type][crate::model::UpdateNodePoolRequest::disk_type].
841        pub fn set_disk_type<T: Into<std::string::String>>(mut self, v: T) -> Self {
842            self.0.request.disk_type = v.into();
843            self
844        }
845
846        /// Sets the value of [disk_size_gb][crate::model::UpdateNodePoolRequest::disk_size_gb].
847        pub fn set_disk_size_gb<T: Into<i64>>(mut self, v: T) -> Self {
848            self.0.request.disk_size_gb = v.into();
849            self
850        }
851
852        /// Sets the value of [resource_manager_tags][crate::model::UpdateNodePoolRequest::resource_manager_tags].
853        pub fn set_resource_manager_tags<T>(mut self, v: T) -> Self
854        where
855            T: std::convert::Into<crate::model::ResourceManagerTags>,
856        {
857            self.0.request.resource_manager_tags = std::option::Option::Some(v.into());
858            self
859        }
860
861        /// Sets or clears the value of [resource_manager_tags][crate::model::UpdateNodePoolRequest::resource_manager_tags].
862        pub fn set_or_clear_resource_manager_tags<T>(mut self, v: std::option::Option<T>) -> Self
863        where
864            T: std::convert::Into<crate::model::ResourceManagerTags>,
865        {
866            self.0.request.resource_manager_tags = v.map(|x| x.into());
867            self
868        }
869
870        /// Sets the value of [containerd_config][crate::model::UpdateNodePoolRequest::containerd_config].
871        pub fn set_containerd_config<T>(mut self, v: T) -> Self
872        where
873            T: std::convert::Into<crate::model::ContainerdConfig>,
874        {
875            self.0.request.containerd_config = std::option::Option::Some(v.into());
876            self
877        }
878
879        /// Sets or clears the value of [containerd_config][crate::model::UpdateNodePoolRequest::containerd_config].
880        pub fn set_or_clear_containerd_config<T>(mut self, v: std::option::Option<T>) -> Self
881        where
882            T: std::convert::Into<crate::model::ContainerdConfig>,
883        {
884            self.0.request.containerd_config = v.map(|x| x.into());
885            self
886        }
887
888        /// Sets the value of [queued_provisioning][crate::model::UpdateNodePoolRequest::queued_provisioning].
889        pub fn set_queued_provisioning<T>(mut self, v: T) -> Self
890        where
891            T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
892        {
893            self.0.request.queued_provisioning = std::option::Option::Some(v.into());
894            self
895        }
896
897        /// Sets or clears the value of [queued_provisioning][crate::model::UpdateNodePoolRequest::queued_provisioning].
898        pub fn set_or_clear_queued_provisioning<T>(mut self, v: std::option::Option<T>) -> Self
899        where
900            T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
901        {
902            self.0.request.queued_provisioning = v.map(|x| x.into());
903            self
904        }
905
906        /// Sets the value of [storage_pools][crate::model::UpdateNodePoolRequest::storage_pools].
907        pub fn set_storage_pools<T, V>(mut self, v: T) -> Self
908        where
909            T: std::iter::IntoIterator<Item = V>,
910            V: std::convert::Into<std::string::String>,
911        {
912            use std::iter::Iterator;
913            self.0.request.storage_pools = v.into_iter().map(|i| i.into()).collect();
914            self
915        }
916
917        /// Sets the value of [max_run_duration][crate::model::UpdateNodePoolRequest::max_run_duration].
918        pub fn set_max_run_duration<T>(mut self, v: T) -> Self
919        where
920            T: std::convert::Into<wkt::Duration>,
921        {
922            self.0.request.max_run_duration = std::option::Option::Some(v.into());
923            self
924        }
925
926        /// Sets or clears the value of [max_run_duration][crate::model::UpdateNodePoolRequest::max_run_duration].
927        pub fn set_or_clear_max_run_duration<T>(mut self, v: std::option::Option<T>) -> Self
928        where
929            T: std::convert::Into<wkt::Duration>,
930        {
931            self.0.request.max_run_duration = v.map(|x| x.into());
932            self
933        }
934
935        /// Sets the value of [flex_start][crate::model::UpdateNodePoolRequest::flex_start].
936        pub fn set_flex_start<T>(mut self, v: T) -> Self
937        where
938            T: std::convert::Into<bool>,
939        {
940            self.0.request.flex_start = std::option::Option::Some(v.into());
941            self
942        }
943
944        /// Sets or clears the value of [flex_start][crate::model::UpdateNodePoolRequest::flex_start].
945        pub fn set_or_clear_flex_start<T>(mut self, v: std::option::Option<T>) -> Self
946        where
947            T: std::convert::Into<bool>,
948        {
949            self.0.request.flex_start = v.map(|x| x.into());
950            self
951        }
952
953        /// Sets the value of [boot_disk][crate::model::UpdateNodePoolRequest::boot_disk].
954        pub fn set_boot_disk<T>(mut self, v: T) -> Self
955        where
956            T: std::convert::Into<crate::model::BootDisk>,
957        {
958            self.0.request.boot_disk = std::option::Option::Some(v.into());
959            self
960        }
961
962        /// Sets or clears the value of [boot_disk][crate::model::UpdateNodePoolRequest::boot_disk].
963        pub fn set_or_clear_boot_disk<T>(mut self, v: std::option::Option<T>) -> Self
964        where
965            T: std::convert::Into<crate::model::BootDisk>,
966        {
967            self.0.request.boot_disk = v.map(|x| x.into());
968            self
969        }
970
971        /// Sets the value of [node_drain_config][crate::model::UpdateNodePoolRequest::node_drain_config].
972        pub fn set_node_drain_config<T>(mut self, v: T) -> Self
973        where
974            T: std::convert::Into<crate::model::node_pool::NodeDrainConfig>,
975        {
976            self.0.request.node_drain_config = std::option::Option::Some(v.into());
977            self
978        }
979
980        /// Sets or clears the value of [node_drain_config][crate::model::UpdateNodePoolRequest::node_drain_config].
981        pub fn set_or_clear_node_drain_config<T>(mut self, v: std::option::Option<T>) -> Self
982        where
983            T: std::convert::Into<crate::model::node_pool::NodeDrainConfig>,
984        {
985            self.0.request.node_drain_config = v.map(|x| x.into());
986            self
987        }
988
989        /// Sets the value of [consolidation_delay][crate::model::UpdateNodePoolRequest::consolidation_delay].
990        pub fn set_consolidation_delay<T>(mut self, v: T) -> Self
991        where
992            T: std::convert::Into<wkt::Duration>,
993        {
994            self.0.request.consolidation_delay = std::option::Option::Some(v.into());
995            self
996        }
997
998        /// Sets or clears the value of [consolidation_delay][crate::model::UpdateNodePoolRequest::consolidation_delay].
999        pub fn set_or_clear_consolidation_delay<T>(mut self, v: std::option::Option<T>) -> Self
1000        where
1001            T: std::convert::Into<wkt::Duration>,
1002        {
1003            self.0.request.consolidation_delay = v.map(|x| x.into());
1004            self
1005        }
1006
1007        /// Sets the value of [taint_config][crate::model::UpdateNodePoolRequest::taint_config].
1008        pub fn set_taint_config<T>(mut self, v: T) -> Self
1009        where
1010            T: std::convert::Into<crate::model::TaintConfig>,
1011        {
1012            self.0.request.taint_config = std::option::Option::Some(v.into());
1013            self
1014        }
1015
1016        /// Sets or clears the value of [taint_config][crate::model::UpdateNodePoolRequest::taint_config].
1017        pub fn set_or_clear_taint_config<T>(mut self, v: std::option::Option<T>) -> Self
1018        where
1019            T: std::convert::Into<crate::model::TaintConfig>,
1020        {
1021            self.0.request.taint_config = v.map(|x| x.into());
1022            self
1023        }
1024
1025        /// Sets the value of [maintenance_policy][crate::model::UpdateNodePoolRequest::maintenance_policy].
1026        pub fn set_maintenance_policy<T>(mut self, v: T) -> Self
1027        where
1028            T: std::convert::Into<crate::model::node_pool::NodePoolMaintenancePolicy>,
1029        {
1030            self.0.request.maintenance_policy = std::option::Option::Some(v.into());
1031            self
1032        }
1033
1034        /// Sets or clears the value of [maintenance_policy][crate::model::UpdateNodePoolRequest::maintenance_policy].
1035        pub fn set_or_clear_maintenance_policy<T>(mut self, v: std::option::Option<T>) -> Self
1036        where
1037            T: std::convert::Into<crate::model::node_pool::NodePoolMaintenancePolicy>,
1038        {
1039            self.0.request.maintenance_policy = v.map(|x| x.into());
1040            self
1041        }
1042    }
1043
1044    #[doc(hidden)]
1045    impl crate::RequestBuilder for UpdateNodePool {
1046        fn request_options(&mut self) -> &mut crate::RequestOptions {
1047            &mut self.0.options
1048        }
1049    }
1050
1051    /// The request builder for [ClusterManager::set_node_pool_autoscaling][crate::client::ClusterManager::set_node_pool_autoscaling] calls.
1052    ///
1053    /// # Example
1054    /// ```
1055    /// # use google_cloud_container_v1::builder::cluster_manager::SetNodePoolAutoscaling;
1056    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1057    ///
1058    /// let builder = prepare_request_builder();
1059    /// let response = builder.send().await?;
1060    /// # Ok(()) }
1061    ///
1062    /// fn prepare_request_builder() -> SetNodePoolAutoscaling {
1063    ///   # panic!();
1064    ///   // ... details omitted ...
1065    /// }
1066    /// ```
1067    #[derive(Clone, Debug)]
1068    pub struct SetNodePoolAutoscaling(RequestBuilder<crate::model::SetNodePoolAutoscalingRequest>);
1069
1070    impl SetNodePoolAutoscaling {
1071        pub(crate) fn new(
1072            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1073        ) -> Self {
1074            Self(RequestBuilder::new(stub))
1075        }
1076
1077        /// Sets the full request, replacing any prior values.
1078        pub fn with_request<V: Into<crate::model::SetNodePoolAutoscalingRequest>>(
1079            mut self,
1080            v: V,
1081        ) -> Self {
1082            self.0.request = v.into();
1083            self
1084        }
1085
1086        /// Sets all the options, replacing any prior values.
1087        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1088            self.0.options = v.into();
1089            self
1090        }
1091
1092        /// Sends the request.
1093        pub async fn send(self) -> Result<crate::model::Operation> {
1094            (*self.0.stub)
1095                .set_node_pool_autoscaling(self.0.request, self.0.options)
1096                .await
1097                .map(crate::Response::into_body)
1098        }
1099
1100        /// Sets the value of [project_id][crate::model::SetNodePoolAutoscalingRequest::project_id].
1101        #[deprecated]
1102        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1103            self.0.request.project_id = v.into();
1104            self
1105        }
1106
1107        /// Sets the value of [zone][crate::model::SetNodePoolAutoscalingRequest::zone].
1108        #[deprecated]
1109        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1110            self.0.request.zone = v.into();
1111            self
1112        }
1113
1114        /// Sets the value of [cluster_id][crate::model::SetNodePoolAutoscalingRequest::cluster_id].
1115        #[deprecated]
1116        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1117            self.0.request.cluster_id = v.into();
1118            self
1119        }
1120
1121        /// Sets the value of [node_pool_id][crate::model::SetNodePoolAutoscalingRequest::node_pool_id].
1122        #[deprecated]
1123        pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1124            self.0.request.node_pool_id = v.into();
1125            self
1126        }
1127
1128        /// Sets the value of [autoscaling][crate::model::SetNodePoolAutoscalingRequest::autoscaling].
1129        ///
1130        /// This is a **required** field for requests.
1131        pub fn set_autoscaling<T>(mut self, v: T) -> Self
1132        where
1133            T: std::convert::Into<crate::model::NodePoolAutoscaling>,
1134        {
1135            self.0.request.autoscaling = std::option::Option::Some(v.into());
1136            self
1137        }
1138
1139        /// Sets or clears the value of [autoscaling][crate::model::SetNodePoolAutoscalingRequest::autoscaling].
1140        ///
1141        /// This is a **required** field for requests.
1142        pub fn set_or_clear_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
1143        where
1144            T: std::convert::Into<crate::model::NodePoolAutoscaling>,
1145        {
1146            self.0.request.autoscaling = v.map(|x| x.into());
1147            self
1148        }
1149
1150        /// Sets the value of [name][crate::model::SetNodePoolAutoscalingRequest::name].
1151        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1152            self.0.request.name = v.into();
1153            self
1154        }
1155    }
1156
1157    #[doc(hidden)]
1158    impl crate::RequestBuilder for SetNodePoolAutoscaling {
1159        fn request_options(&mut self) -> &mut crate::RequestOptions {
1160            &mut self.0.options
1161        }
1162    }
1163
1164    /// The request builder for [ClusterManager::set_logging_service][crate::client::ClusterManager::set_logging_service] calls.
1165    ///
1166    /// # Example
1167    /// ```
1168    /// # use google_cloud_container_v1::builder::cluster_manager::SetLoggingService;
1169    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1170    ///
1171    /// let builder = prepare_request_builder();
1172    /// let response = builder.send().await?;
1173    /// # Ok(()) }
1174    ///
1175    /// fn prepare_request_builder() -> SetLoggingService {
1176    ///   # panic!();
1177    ///   // ... details omitted ...
1178    /// }
1179    /// ```
1180    #[derive(Clone, Debug)]
1181    pub struct SetLoggingService(RequestBuilder<crate::model::SetLoggingServiceRequest>);
1182
1183    impl SetLoggingService {
1184        pub(crate) fn new(
1185            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1186        ) -> Self {
1187            Self(RequestBuilder::new(stub))
1188        }
1189
1190        /// Sets the full request, replacing any prior values.
1191        pub fn with_request<V: Into<crate::model::SetLoggingServiceRequest>>(
1192            mut self,
1193            v: V,
1194        ) -> Self {
1195            self.0.request = v.into();
1196            self
1197        }
1198
1199        /// Sets all the options, replacing any prior values.
1200        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1201            self.0.options = v.into();
1202            self
1203        }
1204
1205        /// Sends the request.
1206        pub async fn send(self) -> Result<crate::model::Operation> {
1207            (*self.0.stub)
1208                .set_logging_service(self.0.request, self.0.options)
1209                .await
1210                .map(crate::Response::into_body)
1211        }
1212
1213        /// Sets the value of [project_id][crate::model::SetLoggingServiceRequest::project_id].
1214        #[deprecated]
1215        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1216            self.0.request.project_id = v.into();
1217            self
1218        }
1219
1220        /// Sets the value of [zone][crate::model::SetLoggingServiceRequest::zone].
1221        #[deprecated]
1222        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1223            self.0.request.zone = v.into();
1224            self
1225        }
1226
1227        /// Sets the value of [cluster_id][crate::model::SetLoggingServiceRequest::cluster_id].
1228        #[deprecated]
1229        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1230            self.0.request.cluster_id = v.into();
1231            self
1232        }
1233
1234        /// Sets the value of [logging_service][crate::model::SetLoggingServiceRequest::logging_service].
1235        ///
1236        /// This is a **required** field for requests.
1237        pub fn set_logging_service<T: Into<std::string::String>>(mut self, v: T) -> Self {
1238            self.0.request.logging_service = v.into();
1239            self
1240        }
1241
1242        /// Sets the value of [name][crate::model::SetLoggingServiceRequest::name].
1243        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1244            self.0.request.name = v.into();
1245            self
1246        }
1247    }
1248
1249    #[doc(hidden)]
1250    impl crate::RequestBuilder for SetLoggingService {
1251        fn request_options(&mut self) -> &mut crate::RequestOptions {
1252            &mut self.0.options
1253        }
1254    }
1255
1256    /// The request builder for [ClusterManager::set_monitoring_service][crate::client::ClusterManager::set_monitoring_service] calls.
1257    ///
1258    /// # Example
1259    /// ```
1260    /// # use google_cloud_container_v1::builder::cluster_manager::SetMonitoringService;
1261    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1262    ///
1263    /// let builder = prepare_request_builder();
1264    /// let response = builder.send().await?;
1265    /// # Ok(()) }
1266    ///
1267    /// fn prepare_request_builder() -> SetMonitoringService {
1268    ///   # panic!();
1269    ///   // ... details omitted ...
1270    /// }
1271    /// ```
1272    #[derive(Clone, Debug)]
1273    pub struct SetMonitoringService(RequestBuilder<crate::model::SetMonitoringServiceRequest>);
1274
1275    impl SetMonitoringService {
1276        pub(crate) fn new(
1277            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1278        ) -> Self {
1279            Self(RequestBuilder::new(stub))
1280        }
1281
1282        /// Sets the full request, replacing any prior values.
1283        pub fn with_request<V: Into<crate::model::SetMonitoringServiceRequest>>(
1284            mut self,
1285            v: V,
1286        ) -> Self {
1287            self.0.request = v.into();
1288            self
1289        }
1290
1291        /// Sets all the options, replacing any prior values.
1292        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1293            self.0.options = v.into();
1294            self
1295        }
1296
1297        /// Sends the request.
1298        pub async fn send(self) -> Result<crate::model::Operation> {
1299            (*self.0.stub)
1300                .set_monitoring_service(self.0.request, self.0.options)
1301                .await
1302                .map(crate::Response::into_body)
1303        }
1304
1305        /// Sets the value of [project_id][crate::model::SetMonitoringServiceRequest::project_id].
1306        #[deprecated]
1307        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1308            self.0.request.project_id = v.into();
1309            self
1310        }
1311
1312        /// Sets the value of [zone][crate::model::SetMonitoringServiceRequest::zone].
1313        #[deprecated]
1314        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1315            self.0.request.zone = v.into();
1316            self
1317        }
1318
1319        /// Sets the value of [cluster_id][crate::model::SetMonitoringServiceRequest::cluster_id].
1320        #[deprecated]
1321        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1322            self.0.request.cluster_id = v.into();
1323            self
1324        }
1325
1326        /// Sets the value of [monitoring_service][crate::model::SetMonitoringServiceRequest::monitoring_service].
1327        ///
1328        /// This is a **required** field for requests.
1329        pub fn set_monitoring_service<T: Into<std::string::String>>(mut self, v: T) -> Self {
1330            self.0.request.monitoring_service = v.into();
1331            self
1332        }
1333
1334        /// Sets the value of [name][crate::model::SetMonitoringServiceRequest::name].
1335        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1336            self.0.request.name = v.into();
1337            self
1338        }
1339    }
1340
1341    #[doc(hidden)]
1342    impl crate::RequestBuilder for SetMonitoringService {
1343        fn request_options(&mut self) -> &mut crate::RequestOptions {
1344            &mut self.0.options
1345        }
1346    }
1347
1348    /// The request builder for [ClusterManager::set_addons_config][crate::client::ClusterManager::set_addons_config] calls.
1349    ///
1350    /// # Example
1351    /// ```
1352    /// # use google_cloud_container_v1::builder::cluster_manager::SetAddonsConfig;
1353    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1354    ///
1355    /// let builder = prepare_request_builder();
1356    /// let response = builder.send().await?;
1357    /// # Ok(()) }
1358    ///
1359    /// fn prepare_request_builder() -> SetAddonsConfig {
1360    ///   # panic!();
1361    ///   // ... details omitted ...
1362    /// }
1363    /// ```
1364    #[derive(Clone, Debug)]
1365    pub struct SetAddonsConfig(RequestBuilder<crate::model::SetAddonsConfigRequest>);
1366
1367    impl SetAddonsConfig {
1368        pub(crate) fn new(
1369            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1370        ) -> Self {
1371            Self(RequestBuilder::new(stub))
1372        }
1373
1374        /// Sets the full request, replacing any prior values.
1375        pub fn with_request<V: Into<crate::model::SetAddonsConfigRequest>>(mut self, v: V) -> Self {
1376            self.0.request = v.into();
1377            self
1378        }
1379
1380        /// Sets all the options, replacing any prior values.
1381        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1382            self.0.options = v.into();
1383            self
1384        }
1385
1386        /// Sends the request.
1387        pub async fn send(self) -> Result<crate::model::Operation> {
1388            (*self.0.stub)
1389                .set_addons_config(self.0.request, self.0.options)
1390                .await
1391                .map(crate::Response::into_body)
1392        }
1393
1394        /// Sets the value of [project_id][crate::model::SetAddonsConfigRequest::project_id].
1395        #[deprecated]
1396        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1397            self.0.request.project_id = v.into();
1398            self
1399        }
1400
1401        /// Sets the value of [zone][crate::model::SetAddonsConfigRequest::zone].
1402        #[deprecated]
1403        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1404            self.0.request.zone = v.into();
1405            self
1406        }
1407
1408        /// Sets the value of [cluster_id][crate::model::SetAddonsConfigRequest::cluster_id].
1409        #[deprecated]
1410        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1411            self.0.request.cluster_id = v.into();
1412            self
1413        }
1414
1415        /// Sets the value of [addons_config][crate::model::SetAddonsConfigRequest::addons_config].
1416        ///
1417        /// This is a **required** field for requests.
1418        pub fn set_addons_config<T>(mut self, v: T) -> Self
1419        where
1420            T: std::convert::Into<crate::model::AddonsConfig>,
1421        {
1422            self.0.request.addons_config = std::option::Option::Some(v.into());
1423            self
1424        }
1425
1426        /// Sets or clears the value of [addons_config][crate::model::SetAddonsConfigRequest::addons_config].
1427        ///
1428        /// This is a **required** field for requests.
1429        pub fn set_or_clear_addons_config<T>(mut self, v: std::option::Option<T>) -> Self
1430        where
1431            T: std::convert::Into<crate::model::AddonsConfig>,
1432        {
1433            self.0.request.addons_config = v.map(|x| x.into());
1434            self
1435        }
1436
1437        /// Sets the value of [name][crate::model::SetAddonsConfigRequest::name].
1438        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1439            self.0.request.name = v.into();
1440            self
1441        }
1442    }
1443
1444    #[doc(hidden)]
1445    impl crate::RequestBuilder for SetAddonsConfig {
1446        fn request_options(&mut self) -> &mut crate::RequestOptions {
1447            &mut self.0.options
1448        }
1449    }
1450
1451    /// The request builder for [ClusterManager::set_locations][crate::client::ClusterManager::set_locations] calls.
1452    ///
1453    /// # Example
1454    /// ```
1455    /// # use google_cloud_container_v1::builder::cluster_manager::SetLocations;
1456    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1457    ///
1458    /// let builder = prepare_request_builder();
1459    /// let response = builder.send().await?;
1460    /// # Ok(()) }
1461    ///
1462    /// fn prepare_request_builder() -> SetLocations {
1463    ///   # panic!();
1464    ///   // ... details omitted ...
1465    /// }
1466    /// ```
1467    #[derive(Clone, Debug)]
1468    pub struct SetLocations(RequestBuilder<crate::model::SetLocationsRequest>);
1469
1470    impl SetLocations {
1471        pub(crate) fn new(
1472            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1473        ) -> Self {
1474            Self(RequestBuilder::new(stub))
1475        }
1476
1477        /// Sets the full request, replacing any prior values.
1478        pub fn with_request<V: Into<crate::model::SetLocationsRequest>>(mut self, v: V) -> Self {
1479            self.0.request = v.into();
1480            self
1481        }
1482
1483        /// Sets all the options, replacing any prior values.
1484        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1485            self.0.options = v.into();
1486            self
1487        }
1488
1489        /// Sends the request.
1490        pub async fn send(self) -> Result<crate::model::Operation> {
1491            (*self.0.stub)
1492                .set_locations(self.0.request, self.0.options)
1493                .await
1494                .map(crate::Response::into_body)
1495        }
1496
1497        /// Sets the value of [project_id][crate::model::SetLocationsRequest::project_id].
1498        #[deprecated]
1499        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1500            self.0.request.project_id = v.into();
1501            self
1502        }
1503
1504        /// Sets the value of [zone][crate::model::SetLocationsRequest::zone].
1505        #[deprecated]
1506        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1507            self.0.request.zone = v.into();
1508            self
1509        }
1510
1511        /// Sets the value of [cluster_id][crate::model::SetLocationsRequest::cluster_id].
1512        #[deprecated]
1513        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1514            self.0.request.cluster_id = v.into();
1515            self
1516        }
1517
1518        /// Sets the value of [locations][crate::model::SetLocationsRequest::locations].
1519        ///
1520        /// This is a **required** field for requests.
1521        pub fn set_locations<T, V>(mut self, v: T) -> Self
1522        where
1523            T: std::iter::IntoIterator<Item = V>,
1524            V: std::convert::Into<std::string::String>,
1525        {
1526            use std::iter::Iterator;
1527            self.0.request.locations = v.into_iter().map(|i| i.into()).collect();
1528            self
1529        }
1530
1531        /// Sets the value of [name][crate::model::SetLocationsRequest::name].
1532        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1533            self.0.request.name = v.into();
1534            self
1535        }
1536    }
1537
1538    #[doc(hidden)]
1539    impl crate::RequestBuilder for SetLocations {
1540        fn request_options(&mut self) -> &mut crate::RequestOptions {
1541            &mut self.0.options
1542        }
1543    }
1544
1545    /// The request builder for [ClusterManager::update_master][crate::client::ClusterManager::update_master] calls.
1546    ///
1547    /// # Example
1548    /// ```
1549    /// # use google_cloud_container_v1::builder::cluster_manager::UpdateMaster;
1550    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1551    ///
1552    /// let builder = prepare_request_builder();
1553    /// let response = builder.send().await?;
1554    /// # Ok(()) }
1555    ///
1556    /// fn prepare_request_builder() -> UpdateMaster {
1557    ///   # panic!();
1558    ///   // ... details omitted ...
1559    /// }
1560    /// ```
1561    #[derive(Clone, Debug)]
1562    pub struct UpdateMaster(RequestBuilder<crate::model::UpdateMasterRequest>);
1563
1564    impl UpdateMaster {
1565        pub(crate) fn new(
1566            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1567        ) -> Self {
1568            Self(RequestBuilder::new(stub))
1569        }
1570
1571        /// Sets the full request, replacing any prior values.
1572        pub fn with_request<V: Into<crate::model::UpdateMasterRequest>>(mut self, v: V) -> Self {
1573            self.0.request = v.into();
1574            self
1575        }
1576
1577        /// Sets all the options, replacing any prior values.
1578        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1579            self.0.options = v.into();
1580            self
1581        }
1582
1583        /// Sends the request.
1584        pub async fn send(self) -> Result<crate::model::Operation> {
1585            (*self.0.stub)
1586                .update_master(self.0.request, self.0.options)
1587                .await
1588                .map(crate::Response::into_body)
1589        }
1590
1591        /// Sets the value of [project_id][crate::model::UpdateMasterRequest::project_id].
1592        #[deprecated]
1593        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1594            self.0.request.project_id = v.into();
1595            self
1596        }
1597
1598        /// Sets the value of [zone][crate::model::UpdateMasterRequest::zone].
1599        #[deprecated]
1600        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1601            self.0.request.zone = v.into();
1602            self
1603        }
1604
1605        /// Sets the value of [cluster_id][crate::model::UpdateMasterRequest::cluster_id].
1606        #[deprecated]
1607        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1608            self.0.request.cluster_id = v.into();
1609            self
1610        }
1611
1612        /// Sets the value of [master_version][crate::model::UpdateMasterRequest::master_version].
1613        ///
1614        /// This is a **required** field for requests.
1615        pub fn set_master_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
1616            self.0.request.master_version = v.into();
1617            self
1618        }
1619
1620        /// Sets the value of [name][crate::model::UpdateMasterRequest::name].
1621        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1622            self.0.request.name = v.into();
1623            self
1624        }
1625    }
1626
1627    #[doc(hidden)]
1628    impl crate::RequestBuilder for UpdateMaster {
1629        fn request_options(&mut self) -> &mut crate::RequestOptions {
1630            &mut self.0.options
1631        }
1632    }
1633
1634    /// The request builder for [ClusterManager::set_master_auth][crate::client::ClusterManager::set_master_auth] calls.
1635    ///
1636    /// # Example
1637    /// ```
1638    /// # use google_cloud_container_v1::builder::cluster_manager::SetMasterAuth;
1639    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1640    ///
1641    /// let builder = prepare_request_builder();
1642    /// let response = builder.send().await?;
1643    /// # Ok(()) }
1644    ///
1645    /// fn prepare_request_builder() -> SetMasterAuth {
1646    ///   # panic!();
1647    ///   // ... details omitted ...
1648    /// }
1649    /// ```
1650    #[derive(Clone, Debug)]
1651    pub struct SetMasterAuth(RequestBuilder<crate::model::SetMasterAuthRequest>);
1652
1653    impl SetMasterAuth {
1654        pub(crate) fn new(
1655            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1656        ) -> Self {
1657            Self(RequestBuilder::new(stub))
1658        }
1659
1660        /// Sets the full request, replacing any prior values.
1661        pub fn with_request<V: Into<crate::model::SetMasterAuthRequest>>(mut self, v: V) -> Self {
1662            self.0.request = v.into();
1663            self
1664        }
1665
1666        /// Sets all the options, replacing any prior values.
1667        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1668            self.0.options = v.into();
1669            self
1670        }
1671
1672        /// Sends the request.
1673        pub async fn send(self) -> Result<crate::model::Operation> {
1674            (*self.0.stub)
1675                .set_master_auth(self.0.request, self.0.options)
1676                .await
1677                .map(crate::Response::into_body)
1678        }
1679
1680        /// Sets the value of [project_id][crate::model::SetMasterAuthRequest::project_id].
1681        #[deprecated]
1682        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1683            self.0.request.project_id = v.into();
1684            self
1685        }
1686
1687        /// Sets the value of [zone][crate::model::SetMasterAuthRequest::zone].
1688        #[deprecated]
1689        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1690            self.0.request.zone = v.into();
1691            self
1692        }
1693
1694        /// Sets the value of [cluster_id][crate::model::SetMasterAuthRequest::cluster_id].
1695        #[deprecated]
1696        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1697            self.0.request.cluster_id = v.into();
1698            self
1699        }
1700
1701        /// Sets the value of [action][crate::model::SetMasterAuthRequest::action].
1702        ///
1703        /// This is a **required** field for requests.
1704        pub fn set_action<T: Into<crate::model::set_master_auth_request::Action>>(
1705            mut self,
1706            v: T,
1707        ) -> Self {
1708            self.0.request.action = v.into();
1709            self
1710        }
1711
1712        /// Sets the value of [update][crate::model::SetMasterAuthRequest::update].
1713        ///
1714        /// This is a **required** field for requests.
1715        pub fn set_update<T>(mut self, v: T) -> Self
1716        where
1717            T: std::convert::Into<crate::model::MasterAuth>,
1718        {
1719            self.0.request.update = std::option::Option::Some(v.into());
1720            self
1721        }
1722
1723        /// Sets or clears the value of [update][crate::model::SetMasterAuthRequest::update].
1724        ///
1725        /// This is a **required** field for requests.
1726        pub fn set_or_clear_update<T>(mut self, v: std::option::Option<T>) -> Self
1727        where
1728            T: std::convert::Into<crate::model::MasterAuth>,
1729        {
1730            self.0.request.update = v.map(|x| x.into());
1731            self
1732        }
1733
1734        /// Sets the value of [name][crate::model::SetMasterAuthRequest::name].
1735        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1736            self.0.request.name = v.into();
1737            self
1738        }
1739    }
1740
1741    #[doc(hidden)]
1742    impl crate::RequestBuilder for SetMasterAuth {
1743        fn request_options(&mut self) -> &mut crate::RequestOptions {
1744            &mut self.0.options
1745        }
1746    }
1747
1748    /// The request builder for [ClusterManager::delete_cluster][crate::client::ClusterManager::delete_cluster] calls.
1749    ///
1750    /// # Example
1751    /// ```
1752    /// # use google_cloud_container_v1::builder::cluster_manager::DeleteCluster;
1753    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1754    ///
1755    /// let builder = prepare_request_builder();
1756    /// let response = builder.send().await?;
1757    /// # Ok(()) }
1758    ///
1759    /// fn prepare_request_builder() -> DeleteCluster {
1760    ///   # panic!();
1761    ///   // ... details omitted ...
1762    /// }
1763    /// ```
1764    #[derive(Clone, Debug)]
1765    pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
1766
1767    impl DeleteCluster {
1768        pub(crate) fn new(
1769            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1770        ) -> Self {
1771            Self(RequestBuilder::new(stub))
1772        }
1773
1774        /// Sets the full request, replacing any prior values.
1775        pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
1776            self.0.request = v.into();
1777            self
1778        }
1779
1780        /// Sets all the options, replacing any prior values.
1781        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1782            self.0.options = v.into();
1783            self
1784        }
1785
1786        /// Sends the request.
1787        pub async fn send(self) -> Result<crate::model::Operation> {
1788            (*self.0.stub)
1789                .delete_cluster(self.0.request, self.0.options)
1790                .await
1791                .map(crate::Response::into_body)
1792        }
1793
1794        /// Sets the value of [project_id][crate::model::DeleteClusterRequest::project_id].
1795        #[deprecated]
1796        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1797            self.0.request.project_id = v.into();
1798            self
1799        }
1800
1801        /// Sets the value of [zone][crate::model::DeleteClusterRequest::zone].
1802        #[deprecated]
1803        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1804            self.0.request.zone = v.into();
1805            self
1806        }
1807
1808        /// Sets the value of [cluster_id][crate::model::DeleteClusterRequest::cluster_id].
1809        #[deprecated]
1810        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1811            self.0.request.cluster_id = v.into();
1812            self
1813        }
1814
1815        /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
1816        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1817            self.0.request.name = v.into();
1818            self
1819        }
1820    }
1821
1822    #[doc(hidden)]
1823    impl crate::RequestBuilder for DeleteCluster {
1824        fn request_options(&mut self) -> &mut crate::RequestOptions {
1825            &mut self.0.options
1826        }
1827    }
1828
1829    /// The request builder for [ClusterManager::list_operations][crate::client::ClusterManager::list_operations] calls.
1830    ///
1831    /// # Example
1832    /// ```
1833    /// # use google_cloud_container_v1::builder::cluster_manager::ListOperations;
1834    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1835    ///
1836    /// let builder = prepare_request_builder();
1837    /// let response = builder.send().await?;
1838    /// # Ok(()) }
1839    ///
1840    /// fn prepare_request_builder() -> ListOperations {
1841    ///   # panic!();
1842    ///   // ... details omitted ...
1843    /// }
1844    /// ```
1845    #[derive(Clone, Debug)]
1846    pub struct ListOperations(RequestBuilder<crate::model::ListOperationsRequest>);
1847
1848    impl ListOperations {
1849        pub(crate) fn new(
1850            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1851        ) -> Self {
1852            Self(RequestBuilder::new(stub))
1853        }
1854
1855        /// Sets the full request, replacing any prior values.
1856        pub fn with_request<V: Into<crate::model::ListOperationsRequest>>(mut self, v: V) -> Self {
1857            self.0.request = v.into();
1858            self
1859        }
1860
1861        /// Sets all the options, replacing any prior values.
1862        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1863            self.0.options = v.into();
1864            self
1865        }
1866
1867        /// Sends the request.
1868        pub async fn send(self) -> Result<crate::model::ListOperationsResponse> {
1869            (*self.0.stub)
1870                .list_operations(self.0.request, self.0.options)
1871                .await
1872                .map(crate::Response::into_body)
1873        }
1874
1875        /// Sets the value of [project_id][crate::model::ListOperationsRequest::project_id].
1876        #[deprecated]
1877        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1878            self.0.request.project_id = v.into();
1879            self
1880        }
1881
1882        /// Sets the value of [zone][crate::model::ListOperationsRequest::zone].
1883        #[deprecated]
1884        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1885            self.0.request.zone = v.into();
1886            self
1887        }
1888
1889        /// Sets the value of [parent][crate::model::ListOperationsRequest::parent].
1890        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1891            self.0.request.parent = v.into();
1892            self
1893        }
1894    }
1895
1896    #[doc(hidden)]
1897    impl crate::RequestBuilder for ListOperations {
1898        fn request_options(&mut self) -> &mut crate::RequestOptions {
1899            &mut self.0.options
1900        }
1901    }
1902
1903    /// The request builder for [ClusterManager::get_operation][crate::client::ClusterManager::get_operation] calls.
1904    ///
1905    /// # Example
1906    /// ```
1907    /// # use google_cloud_container_v1::builder::cluster_manager::GetOperation;
1908    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1909    ///
1910    /// let builder = prepare_request_builder();
1911    /// let response = builder.send().await?;
1912    /// # Ok(()) }
1913    ///
1914    /// fn prepare_request_builder() -> GetOperation {
1915    ///   # panic!();
1916    ///   // ... details omitted ...
1917    /// }
1918    /// ```
1919    #[derive(Clone, Debug)]
1920    pub struct GetOperation(RequestBuilder<crate::model::GetOperationRequest>);
1921
1922    impl GetOperation {
1923        pub(crate) fn new(
1924            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1925        ) -> Self {
1926            Self(RequestBuilder::new(stub))
1927        }
1928
1929        /// Sets the full request, replacing any prior values.
1930        pub fn with_request<V: Into<crate::model::GetOperationRequest>>(mut self, v: V) -> Self {
1931            self.0.request = v.into();
1932            self
1933        }
1934
1935        /// Sets all the options, replacing any prior values.
1936        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1937            self.0.options = v.into();
1938            self
1939        }
1940
1941        /// Sends the request.
1942        pub async fn send(self) -> Result<crate::model::Operation> {
1943            (*self.0.stub)
1944                .get_operation(self.0.request, self.0.options)
1945                .await
1946                .map(crate::Response::into_body)
1947        }
1948
1949        /// Sets the value of [project_id][crate::model::GetOperationRequest::project_id].
1950        #[deprecated]
1951        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1952            self.0.request.project_id = v.into();
1953            self
1954        }
1955
1956        /// Sets the value of [zone][crate::model::GetOperationRequest::zone].
1957        #[deprecated]
1958        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1959            self.0.request.zone = v.into();
1960            self
1961        }
1962
1963        /// Sets the value of [operation_id][crate::model::GetOperationRequest::operation_id].
1964        #[deprecated]
1965        pub fn set_operation_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1966            self.0.request.operation_id = v.into();
1967            self
1968        }
1969
1970        /// Sets the value of [name][crate::model::GetOperationRequest::name].
1971        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1972            self.0.request.name = v.into();
1973            self
1974        }
1975    }
1976
1977    #[doc(hidden)]
1978    impl crate::RequestBuilder for GetOperation {
1979        fn request_options(&mut self) -> &mut crate::RequestOptions {
1980            &mut self.0.options
1981        }
1982    }
1983
1984    /// The request builder for [ClusterManager::cancel_operation][crate::client::ClusterManager::cancel_operation] calls.
1985    ///
1986    /// # Example
1987    /// ```
1988    /// # use google_cloud_container_v1::builder::cluster_manager::CancelOperation;
1989    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1990    ///
1991    /// let builder = prepare_request_builder();
1992    /// let response = builder.send().await?;
1993    /// # Ok(()) }
1994    ///
1995    /// fn prepare_request_builder() -> CancelOperation {
1996    ///   # panic!();
1997    ///   // ... details omitted ...
1998    /// }
1999    /// ```
2000    #[derive(Clone, Debug)]
2001    pub struct CancelOperation(RequestBuilder<crate::model::CancelOperationRequest>);
2002
2003    impl CancelOperation {
2004        pub(crate) fn new(
2005            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2006        ) -> Self {
2007            Self(RequestBuilder::new(stub))
2008        }
2009
2010        /// Sets the full request, replacing any prior values.
2011        pub fn with_request<V: Into<crate::model::CancelOperationRequest>>(mut self, v: V) -> Self {
2012            self.0.request = v.into();
2013            self
2014        }
2015
2016        /// Sets all the options, replacing any prior values.
2017        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2018            self.0.options = v.into();
2019            self
2020        }
2021
2022        /// Sends the request.
2023        pub async fn send(self) -> Result<()> {
2024            (*self.0.stub)
2025                .cancel_operation(self.0.request, self.0.options)
2026                .await
2027                .map(crate::Response::into_body)
2028        }
2029
2030        /// Sets the value of [project_id][crate::model::CancelOperationRequest::project_id].
2031        #[deprecated]
2032        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2033            self.0.request.project_id = v.into();
2034            self
2035        }
2036
2037        /// Sets the value of [zone][crate::model::CancelOperationRequest::zone].
2038        #[deprecated]
2039        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2040            self.0.request.zone = v.into();
2041            self
2042        }
2043
2044        /// Sets the value of [operation_id][crate::model::CancelOperationRequest::operation_id].
2045        #[deprecated]
2046        pub fn set_operation_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2047            self.0.request.operation_id = v.into();
2048            self
2049        }
2050
2051        /// Sets the value of [name][crate::model::CancelOperationRequest::name].
2052        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2053            self.0.request.name = v.into();
2054            self
2055        }
2056    }
2057
2058    #[doc(hidden)]
2059    impl crate::RequestBuilder for CancelOperation {
2060        fn request_options(&mut self) -> &mut crate::RequestOptions {
2061            &mut self.0.options
2062        }
2063    }
2064
2065    /// The request builder for [ClusterManager::get_server_config][crate::client::ClusterManager::get_server_config] calls.
2066    ///
2067    /// # Example
2068    /// ```
2069    /// # use google_cloud_container_v1::builder::cluster_manager::GetServerConfig;
2070    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2071    ///
2072    /// let builder = prepare_request_builder();
2073    /// let response = builder.send().await?;
2074    /// # Ok(()) }
2075    ///
2076    /// fn prepare_request_builder() -> GetServerConfig {
2077    ///   # panic!();
2078    ///   // ... details omitted ...
2079    /// }
2080    /// ```
2081    #[derive(Clone, Debug)]
2082    pub struct GetServerConfig(RequestBuilder<crate::model::GetServerConfigRequest>);
2083
2084    impl GetServerConfig {
2085        pub(crate) fn new(
2086            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2087        ) -> Self {
2088            Self(RequestBuilder::new(stub))
2089        }
2090
2091        /// Sets the full request, replacing any prior values.
2092        pub fn with_request<V: Into<crate::model::GetServerConfigRequest>>(mut self, v: V) -> Self {
2093            self.0.request = v.into();
2094            self
2095        }
2096
2097        /// Sets all the options, replacing any prior values.
2098        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2099            self.0.options = v.into();
2100            self
2101        }
2102
2103        /// Sends the request.
2104        pub async fn send(self) -> Result<crate::model::ServerConfig> {
2105            (*self.0.stub)
2106                .get_server_config(self.0.request, self.0.options)
2107                .await
2108                .map(crate::Response::into_body)
2109        }
2110
2111        /// Sets the value of [project_id][crate::model::GetServerConfigRequest::project_id].
2112        #[deprecated]
2113        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2114            self.0.request.project_id = v.into();
2115            self
2116        }
2117
2118        /// Sets the value of [zone][crate::model::GetServerConfigRequest::zone].
2119        #[deprecated]
2120        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2121            self.0.request.zone = v.into();
2122            self
2123        }
2124
2125        /// Sets the value of [name][crate::model::GetServerConfigRequest::name].
2126        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2127            self.0.request.name = v.into();
2128            self
2129        }
2130    }
2131
2132    #[doc(hidden)]
2133    impl crate::RequestBuilder for GetServerConfig {
2134        fn request_options(&mut self) -> &mut crate::RequestOptions {
2135            &mut self.0.options
2136        }
2137    }
2138
2139    /// The request builder for [ClusterManager::get_json_web_keys][crate::client::ClusterManager::get_json_web_keys] calls.
2140    ///
2141    /// # Example
2142    /// ```
2143    /// # use google_cloud_container_v1::builder::cluster_manager::GetJSONWebKeys;
2144    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2145    ///
2146    /// let builder = prepare_request_builder();
2147    /// let response = builder.send().await?;
2148    /// # Ok(()) }
2149    ///
2150    /// fn prepare_request_builder() -> GetJSONWebKeys {
2151    ///   # panic!();
2152    ///   // ... details omitted ...
2153    /// }
2154    /// ```
2155    #[derive(Clone, Debug)]
2156    pub struct GetJSONWebKeys(RequestBuilder<crate::model::GetJSONWebKeysRequest>);
2157
2158    impl GetJSONWebKeys {
2159        pub(crate) fn new(
2160            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2161        ) -> Self {
2162            Self(RequestBuilder::new(stub))
2163        }
2164
2165        /// Sets the full request, replacing any prior values.
2166        pub fn with_request<V: Into<crate::model::GetJSONWebKeysRequest>>(mut self, v: V) -> Self {
2167            self.0.request = v.into();
2168            self
2169        }
2170
2171        /// Sets all the options, replacing any prior values.
2172        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2173            self.0.options = v.into();
2174            self
2175        }
2176
2177        /// Sends the request.
2178        pub async fn send(self) -> Result<crate::model::GetJSONWebKeysResponse> {
2179            (*self.0.stub)
2180                .get_json_web_keys(self.0.request, self.0.options)
2181                .await
2182                .map(crate::Response::into_body)
2183        }
2184
2185        /// Sets the value of [parent][crate::model::GetJSONWebKeysRequest::parent].
2186        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2187            self.0.request.parent = v.into();
2188            self
2189        }
2190    }
2191
2192    #[doc(hidden)]
2193    impl crate::RequestBuilder for GetJSONWebKeys {
2194        fn request_options(&mut self) -> &mut crate::RequestOptions {
2195            &mut self.0.options
2196        }
2197    }
2198
2199    /// The request builder for [ClusterManager::list_node_pools][crate::client::ClusterManager::list_node_pools] calls.
2200    ///
2201    /// # Example
2202    /// ```
2203    /// # use google_cloud_container_v1::builder::cluster_manager::ListNodePools;
2204    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2205    ///
2206    /// let builder = prepare_request_builder();
2207    /// let response = builder.send().await?;
2208    /// # Ok(()) }
2209    ///
2210    /// fn prepare_request_builder() -> ListNodePools {
2211    ///   # panic!();
2212    ///   // ... details omitted ...
2213    /// }
2214    /// ```
2215    #[derive(Clone, Debug)]
2216    pub struct ListNodePools(RequestBuilder<crate::model::ListNodePoolsRequest>);
2217
2218    impl ListNodePools {
2219        pub(crate) fn new(
2220            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2221        ) -> Self {
2222            Self(RequestBuilder::new(stub))
2223        }
2224
2225        /// Sets the full request, replacing any prior values.
2226        pub fn with_request<V: Into<crate::model::ListNodePoolsRequest>>(mut self, v: V) -> Self {
2227            self.0.request = v.into();
2228            self
2229        }
2230
2231        /// Sets all the options, replacing any prior values.
2232        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2233            self.0.options = v.into();
2234            self
2235        }
2236
2237        /// Sends the request.
2238        pub async fn send(self) -> Result<crate::model::ListNodePoolsResponse> {
2239            (*self.0.stub)
2240                .list_node_pools(self.0.request, self.0.options)
2241                .await
2242                .map(crate::Response::into_body)
2243        }
2244
2245        /// Sets the value of [project_id][crate::model::ListNodePoolsRequest::project_id].
2246        #[deprecated]
2247        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2248            self.0.request.project_id = v.into();
2249            self
2250        }
2251
2252        /// Sets the value of [zone][crate::model::ListNodePoolsRequest::zone].
2253        #[deprecated]
2254        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2255            self.0.request.zone = v.into();
2256            self
2257        }
2258
2259        /// Sets the value of [cluster_id][crate::model::ListNodePoolsRequest::cluster_id].
2260        #[deprecated]
2261        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2262            self.0.request.cluster_id = v.into();
2263            self
2264        }
2265
2266        /// Sets the value of [parent][crate::model::ListNodePoolsRequest::parent].
2267        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2268            self.0.request.parent = v.into();
2269            self
2270        }
2271    }
2272
2273    #[doc(hidden)]
2274    impl crate::RequestBuilder for ListNodePools {
2275        fn request_options(&mut self) -> &mut crate::RequestOptions {
2276            &mut self.0.options
2277        }
2278    }
2279
2280    /// The request builder for [ClusterManager::get_node_pool][crate::client::ClusterManager::get_node_pool] calls.
2281    ///
2282    /// # Example
2283    /// ```
2284    /// # use google_cloud_container_v1::builder::cluster_manager::GetNodePool;
2285    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2286    ///
2287    /// let builder = prepare_request_builder();
2288    /// let response = builder.send().await?;
2289    /// # Ok(()) }
2290    ///
2291    /// fn prepare_request_builder() -> GetNodePool {
2292    ///   # panic!();
2293    ///   // ... details omitted ...
2294    /// }
2295    /// ```
2296    #[derive(Clone, Debug)]
2297    pub struct GetNodePool(RequestBuilder<crate::model::GetNodePoolRequest>);
2298
2299    impl GetNodePool {
2300        pub(crate) fn new(
2301            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2302        ) -> Self {
2303            Self(RequestBuilder::new(stub))
2304        }
2305
2306        /// Sets the full request, replacing any prior values.
2307        pub fn with_request<V: Into<crate::model::GetNodePoolRequest>>(mut self, v: V) -> Self {
2308            self.0.request = v.into();
2309            self
2310        }
2311
2312        /// Sets all the options, replacing any prior values.
2313        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2314            self.0.options = v.into();
2315            self
2316        }
2317
2318        /// Sends the request.
2319        pub async fn send(self) -> Result<crate::model::NodePool> {
2320            (*self.0.stub)
2321                .get_node_pool(self.0.request, self.0.options)
2322                .await
2323                .map(crate::Response::into_body)
2324        }
2325
2326        /// Sets the value of [project_id][crate::model::GetNodePoolRequest::project_id].
2327        #[deprecated]
2328        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2329            self.0.request.project_id = v.into();
2330            self
2331        }
2332
2333        /// Sets the value of [zone][crate::model::GetNodePoolRequest::zone].
2334        #[deprecated]
2335        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2336            self.0.request.zone = v.into();
2337            self
2338        }
2339
2340        /// Sets the value of [cluster_id][crate::model::GetNodePoolRequest::cluster_id].
2341        #[deprecated]
2342        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2343            self.0.request.cluster_id = v.into();
2344            self
2345        }
2346
2347        /// Sets the value of [node_pool_id][crate::model::GetNodePoolRequest::node_pool_id].
2348        #[deprecated]
2349        pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2350            self.0.request.node_pool_id = v.into();
2351            self
2352        }
2353
2354        /// Sets the value of [name][crate::model::GetNodePoolRequest::name].
2355        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2356            self.0.request.name = v.into();
2357            self
2358        }
2359    }
2360
2361    #[doc(hidden)]
2362    impl crate::RequestBuilder for GetNodePool {
2363        fn request_options(&mut self) -> &mut crate::RequestOptions {
2364            &mut self.0.options
2365        }
2366    }
2367
2368    /// The request builder for [ClusterManager::create_node_pool][crate::client::ClusterManager::create_node_pool] calls.
2369    ///
2370    /// # Example
2371    /// ```
2372    /// # use google_cloud_container_v1::builder::cluster_manager::CreateNodePool;
2373    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2374    ///
2375    /// let builder = prepare_request_builder();
2376    /// let response = builder.send().await?;
2377    /// # Ok(()) }
2378    ///
2379    /// fn prepare_request_builder() -> CreateNodePool {
2380    ///   # panic!();
2381    ///   // ... details omitted ...
2382    /// }
2383    /// ```
2384    #[derive(Clone, Debug)]
2385    pub struct CreateNodePool(RequestBuilder<crate::model::CreateNodePoolRequest>);
2386
2387    impl CreateNodePool {
2388        pub(crate) fn new(
2389            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2390        ) -> Self {
2391            Self(RequestBuilder::new(stub))
2392        }
2393
2394        /// Sets the full request, replacing any prior values.
2395        pub fn with_request<V: Into<crate::model::CreateNodePoolRequest>>(mut self, v: V) -> Self {
2396            self.0.request = v.into();
2397            self
2398        }
2399
2400        /// Sets all the options, replacing any prior values.
2401        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2402            self.0.options = v.into();
2403            self
2404        }
2405
2406        /// Sends the request.
2407        pub async fn send(self) -> Result<crate::model::Operation> {
2408            (*self.0.stub)
2409                .create_node_pool(self.0.request, self.0.options)
2410                .await
2411                .map(crate::Response::into_body)
2412        }
2413
2414        /// Sets the value of [project_id][crate::model::CreateNodePoolRequest::project_id].
2415        #[deprecated]
2416        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2417            self.0.request.project_id = v.into();
2418            self
2419        }
2420
2421        /// Sets the value of [zone][crate::model::CreateNodePoolRequest::zone].
2422        #[deprecated]
2423        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2424            self.0.request.zone = v.into();
2425            self
2426        }
2427
2428        /// Sets the value of [cluster_id][crate::model::CreateNodePoolRequest::cluster_id].
2429        #[deprecated]
2430        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2431            self.0.request.cluster_id = v.into();
2432            self
2433        }
2434
2435        /// Sets the value of [node_pool][crate::model::CreateNodePoolRequest::node_pool].
2436        ///
2437        /// This is a **required** field for requests.
2438        pub fn set_node_pool<T>(mut self, v: T) -> Self
2439        where
2440            T: std::convert::Into<crate::model::NodePool>,
2441        {
2442            self.0.request.node_pool = std::option::Option::Some(v.into());
2443            self
2444        }
2445
2446        /// Sets or clears the value of [node_pool][crate::model::CreateNodePoolRequest::node_pool].
2447        ///
2448        /// This is a **required** field for requests.
2449        pub fn set_or_clear_node_pool<T>(mut self, v: std::option::Option<T>) -> Self
2450        where
2451            T: std::convert::Into<crate::model::NodePool>,
2452        {
2453            self.0.request.node_pool = v.map(|x| x.into());
2454            self
2455        }
2456
2457        /// Sets the value of [parent][crate::model::CreateNodePoolRequest::parent].
2458        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2459            self.0.request.parent = v.into();
2460            self
2461        }
2462    }
2463
2464    #[doc(hidden)]
2465    impl crate::RequestBuilder for CreateNodePool {
2466        fn request_options(&mut self) -> &mut crate::RequestOptions {
2467            &mut self.0.options
2468        }
2469    }
2470
2471    /// The request builder for [ClusterManager::delete_node_pool][crate::client::ClusterManager::delete_node_pool] calls.
2472    ///
2473    /// # Example
2474    /// ```
2475    /// # use google_cloud_container_v1::builder::cluster_manager::DeleteNodePool;
2476    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2477    ///
2478    /// let builder = prepare_request_builder();
2479    /// let response = builder.send().await?;
2480    /// # Ok(()) }
2481    ///
2482    /// fn prepare_request_builder() -> DeleteNodePool {
2483    ///   # panic!();
2484    ///   // ... details omitted ...
2485    /// }
2486    /// ```
2487    #[derive(Clone, Debug)]
2488    pub struct DeleteNodePool(RequestBuilder<crate::model::DeleteNodePoolRequest>);
2489
2490    impl DeleteNodePool {
2491        pub(crate) fn new(
2492            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2493        ) -> Self {
2494            Self(RequestBuilder::new(stub))
2495        }
2496
2497        /// Sets the full request, replacing any prior values.
2498        pub fn with_request<V: Into<crate::model::DeleteNodePoolRequest>>(mut self, v: V) -> Self {
2499            self.0.request = v.into();
2500            self
2501        }
2502
2503        /// Sets all the options, replacing any prior values.
2504        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2505            self.0.options = v.into();
2506            self
2507        }
2508
2509        /// Sends the request.
2510        pub async fn send(self) -> Result<crate::model::Operation> {
2511            (*self.0.stub)
2512                .delete_node_pool(self.0.request, self.0.options)
2513                .await
2514                .map(crate::Response::into_body)
2515        }
2516
2517        /// Sets the value of [project_id][crate::model::DeleteNodePoolRequest::project_id].
2518        #[deprecated]
2519        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2520            self.0.request.project_id = v.into();
2521            self
2522        }
2523
2524        /// Sets the value of [zone][crate::model::DeleteNodePoolRequest::zone].
2525        #[deprecated]
2526        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2527            self.0.request.zone = v.into();
2528            self
2529        }
2530
2531        /// Sets the value of [cluster_id][crate::model::DeleteNodePoolRequest::cluster_id].
2532        #[deprecated]
2533        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2534            self.0.request.cluster_id = v.into();
2535            self
2536        }
2537
2538        /// Sets the value of [node_pool_id][crate::model::DeleteNodePoolRequest::node_pool_id].
2539        #[deprecated]
2540        pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2541            self.0.request.node_pool_id = v.into();
2542            self
2543        }
2544
2545        /// Sets the value of [name][crate::model::DeleteNodePoolRequest::name].
2546        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2547            self.0.request.name = v.into();
2548            self
2549        }
2550    }
2551
2552    #[doc(hidden)]
2553    impl crate::RequestBuilder for DeleteNodePool {
2554        fn request_options(&mut self) -> &mut crate::RequestOptions {
2555            &mut self.0.options
2556        }
2557    }
2558
2559    /// The request builder for [ClusterManager::complete_node_pool_upgrade][crate::client::ClusterManager::complete_node_pool_upgrade] calls.
2560    ///
2561    /// # Example
2562    /// ```
2563    /// # use google_cloud_container_v1::builder::cluster_manager::CompleteNodePoolUpgrade;
2564    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2565    ///
2566    /// let builder = prepare_request_builder();
2567    /// let response = builder.send().await?;
2568    /// # Ok(()) }
2569    ///
2570    /// fn prepare_request_builder() -> CompleteNodePoolUpgrade {
2571    ///   # panic!();
2572    ///   // ... details omitted ...
2573    /// }
2574    /// ```
2575    #[derive(Clone, Debug)]
2576    pub struct CompleteNodePoolUpgrade(
2577        RequestBuilder<crate::model::CompleteNodePoolUpgradeRequest>,
2578    );
2579
2580    impl CompleteNodePoolUpgrade {
2581        pub(crate) fn new(
2582            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2583        ) -> Self {
2584            Self(RequestBuilder::new(stub))
2585        }
2586
2587        /// Sets the full request, replacing any prior values.
2588        pub fn with_request<V: Into<crate::model::CompleteNodePoolUpgradeRequest>>(
2589            mut self,
2590            v: V,
2591        ) -> Self {
2592            self.0.request = v.into();
2593            self
2594        }
2595
2596        /// Sets all the options, replacing any prior values.
2597        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2598            self.0.options = v.into();
2599            self
2600        }
2601
2602        /// Sends the request.
2603        pub async fn send(self) -> Result<()> {
2604            (*self.0.stub)
2605                .complete_node_pool_upgrade(self.0.request, self.0.options)
2606                .await
2607                .map(crate::Response::into_body)
2608        }
2609
2610        /// Sets the value of [name][crate::model::CompleteNodePoolUpgradeRequest::name].
2611        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2612            self.0.request.name = v.into();
2613            self
2614        }
2615    }
2616
2617    #[doc(hidden)]
2618    impl crate::RequestBuilder for CompleteNodePoolUpgrade {
2619        fn request_options(&mut self) -> &mut crate::RequestOptions {
2620            &mut self.0.options
2621        }
2622    }
2623
2624    /// The request builder for [ClusterManager::rollback_node_pool_upgrade][crate::client::ClusterManager::rollback_node_pool_upgrade] calls.
2625    ///
2626    /// # Example
2627    /// ```
2628    /// # use google_cloud_container_v1::builder::cluster_manager::RollbackNodePoolUpgrade;
2629    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2630    ///
2631    /// let builder = prepare_request_builder();
2632    /// let response = builder.send().await?;
2633    /// # Ok(()) }
2634    ///
2635    /// fn prepare_request_builder() -> RollbackNodePoolUpgrade {
2636    ///   # panic!();
2637    ///   // ... details omitted ...
2638    /// }
2639    /// ```
2640    #[derive(Clone, Debug)]
2641    pub struct RollbackNodePoolUpgrade(
2642        RequestBuilder<crate::model::RollbackNodePoolUpgradeRequest>,
2643    );
2644
2645    impl RollbackNodePoolUpgrade {
2646        pub(crate) fn new(
2647            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2648        ) -> Self {
2649            Self(RequestBuilder::new(stub))
2650        }
2651
2652        /// Sets the full request, replacing any prior values.
2653        pub fn with_request<V: Into<crate::model::RollbackNodePoolUpgradeRequest>>(
2654            mut self,
2655            v: V,
2656        ) -> Self {
2657            self.0.request = v.into();
2658            self
2659        }
2660
2661        /// Sets all the options, replacing any prior values.
2662        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2663            self.0.options = v.into();
2664            self
2665        }
2666
2667        /// Sends the request.
2668        pub async fn send(self) -> Result<crate::model::Operation> {
2669            (*self.0.stub)
2670                .rollback_node_pool_upgrade(self.0.request, self.0.options)
2671                .await
2672                .map(crate::Response::into_body)
2673        }
2674
2675        /// Sets the value of [project_id][crate::model::RollbackNodePoolUpgradeRequest::project_id].
2676        #[deprecated]
2677        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2678            self.0.request.project_id = v.into();
2679            self
2680        }
2681
2682        /// Sets the value of [zone][crate::model::RollbackNodePoolUpgradeRequest::zone].
2683        #[deprecated]
2684        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2685            self.0.request.zone = v.into();
2686            self
2687        }
2688
2689        /// Sets the value of [cluster_id][crate::model::RollbackNodePoolUpgradeRequest::cluster_id].
2690        #[deprecated]
2691        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2692            self.0.request.cluster_id = v.into();
2693            self
2694        }
2695
2696        /// Sets the value of [node_pool_id][crate::model::RollbackNodePoolUpgradeRequest::node_pool_id].
2697        #[deprecated]
2698        pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2699            self.0.request.node_pool_id = v.into();
2700            self
2701        }
2702
2703        /// Sets the value of [name][crate::model::RollbackNodePoolUpgradeRequest::name].
2704        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2705            self.0.request.name = v.into();
2706            self
2707        }
2708
2709        /// Sets the value of [respect_pdb][crate::model::RollbackNodePoolUpgradeRequest::respect_pdb].
2710        pub fn set_respect_pdb<T: Into<bool>>(mut self, v: T) -> Self {
2711            self.0.request.respect_pdb = v.into();
2712            self
2713        }
2714    }
2715
2716    #[doc(hidden)]
2717    impl crate::RequestBuilder for RollbackNodePoolUpgrade {
2718        fn request_options(&mut self) -> &mut crate::RequestOptions {
2719            &mut self.0.options
2720        }
2721    }
2722
2723    /// The request builder for [ClusterManager::set_node_pool_management][crate::client::ClusterManager::set_node_pool_management] calls.
2724    ///
2725    /// # Example
2726    /// ```
2727    /// # use google_cloud_container_v1::builder::cluster_manager::SetNodePoolManagement;
2728    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2729    ///
2730    /// let builder = prepare_request_builder();
2731    /// let response = builder.send().await?;
2732    /// # Ok(()) }
2733    ///
2734    /// fn prepare_request_builder() -> SetNodePoolManagement {
2735    ///   # panic!();
2736    ///   // ... details omitted ...
2737    /// }
2738    /// ```
2739    #[derive(Clone, Debug)]
2740    pub struct SetNodePoolManagement(RequestBuilder<crate::model::SetNodePoolManagementRequest>);
2741
2742    impl SetNodePoolManagement {
2743        pub(crate) fn new(
2744            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2745        ) -> Self {
2746            Self(RequestBuilder::new(stub))
2747        }
2748
2749        /// Sets the full request, replacing any prior values.
2750        pub fn with_request<V: Into<crate::model::SetNodePoolManagementRequest>>(
2751            mut self,
2752            v: V,
2753        ) -> Self {
2754            self.0.request = v.into();
2755            self
2756        }
2757
2758        /// Sets all the options, replacing any prior values.
2759        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2760            self.0.options = v.into();
2761            self
2762        }
2763
2764        /// Sends the request.
2765        pub async fn send(self) -> Result<crate::model::Operation> {
2766            (*self.0.stub)
2767                .set_node_pool_management(self.0.request, self.0.options)
2768                .await
2769                .map(crate::Response::into_body)
2770        }
2771
2772        /// Sets the value of [project_id][crate::model::SetNodePoolManagementRequest::project_id].
2773        #[deprecated]
2774        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2775            self.0.request.project_id = v.into();
2776            self
2777        }
2778
2779        /// Sets the value of [zone][crate::model::SetNodePoolManagementRequest::zone].
2780        #[deprecated]
2781        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2782            self.0.request.zone = v.into();
2783            self
2784        }
2785
2786        /// Sets the value of [cluster_id][crate::model::SetNodePoolManagementRequest::cluster_id].
2787        #[deprecated]
2788        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2789            self.0.request.cluster_id = v.into();
2790            self
2791        }
2792
2793        /// Sets the value of [node_pool_id][crate::model::SetNodePoolManagementRequest::node_pool_id].
2794        #[deprecated]
2795        pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2796            self.0.request.node_pool_id = v.into();
2797            self
2798        }
2799
2800        /// Sets the value of [management][crate::model::SetNodePoolManagementRequest::management].
2801        ///
2802        /// This is a **required** field for requests.
2803        pub fn set_management<T>(mut self, v: T) -> Self
2804        where
2805            T: std::convert::Into<crate::model::NodeManagement>,
2806        {
2807            self.0.request.management = std::option::Option::Some(v.into());
2808            self
2809        }
2810
2811        /// Sets or clears the value of [management][crate::model::SetNodePoolManagementRequest::management].
2812        ///
2813        /// This is a **required** field for requests.
2814        pub fn set_or_clear_management<T>(mut self, v: std::option::Option<T>) -> Self
2815        where
2816            T: std::convert::Into<crate::model::NodeManagement>,
2817        {
2818            self.0.request.management = v.map(|x| x.into());
2819            self
2820        }
2821
2822        /// Sets the value of [name][crate::model::SetNodePoolManagementRequest::name].
2823        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2824            self.0.request.name = v.into();
2825            self
2826        }
2827    }
2828
2829    #[doc(hidden)]
2830    impl crate::RequestBuilder for SetNodePoolManagement {
2831        fn request_options(&mut self) -> &mut crate::RequestOptions {
2832            &mut self.0.options
2833        }
2834    }
2835
2836    /// The request builder for [ClusterManager::set_labels][crate::client::ClusterManager::set_labels] calls.
2837    ///
2838    /// # Example
2839    /// ```
2840    /// # use google_cloud_container_v1::builder::cluster_manager::SetLabels;
2841    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2842    ///
2843    /// let builder = prepare_request_builder();
2844    /// let response = builder.send().await?;
2845    /// # Ok(()) }
2846    ///
2847    /// fn prepare_request_builder() -> SetLabels {
2848    ///   # panic!();
2849    ///   // ... details omitted ...
2850    /// }
2851    /// ```
2852    #[derive(Clone, Debug)]
2853    pub struct SetLabels(RequestBuilder<crate::model::SetLabelsRequest>);
2854
2855    impl SetLabels {
2856        pub(crate) fn new(
2857            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2858        ) -> Self {
2859            Self(RequestBuilder::new(stub))
2860        }
2861
2862        /// Sets the full request, replacing any prior values.
2863        pub fn with_request<V: Into<crate::model::SetLabelsRequest>>(mut self, v: V) -> Self {
2864            self.0.request = v.into();
2865            self
2866        }
2867
2868        /// Sets all the options, replacing any prior values.
2869        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2870            self.0.options = v.into();
2871            self
2872        }
2873
2874        /// Sends the request.
2875        pub async fn send(self) -> Result<crate::model::Operation> {
2876            (*self.0.stub)
2877                .set_labels(self.0.request, self.0.options)
2878                .await
2879                .map(crate::Response::into_body)
2880        }
2881
2882        /// Sets the value of [project_id][crate::model::SetLabelsRequest::project_id].
2883        #[deprecated]
2884        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2885            self.0.request.project_id = v.into();
2886            self
2887        }
2888
2889        /// Sets the value of [zone][crate::model::SetLabelsRequest::zone].
2890        #[deprecated]
2891        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2892            self.0.request.zone = v.into();
2893            self
2894        }
2895
2896        /// Sets the value of [cluster_id][crate::model::SetLabelsRequest::cluster_id].
2897        #[deprecated]
2898        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2899            self.0.request.cluster_id = v.into();
2900            self
2901        }
2902
2903        /// Sets the value of [resource_labels][crate::model::SetLabelsRequest::resource_labels].
2904        ///
2905        /// This is a **required** field for requests.
2906        pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
2907        where
2908            T: std::iter::IntoIterator<Item = (K, V)>,
2909            K: std::convert::Into<std::string::String>,
2910            V: std::convert::Into<std::string::String>,
2911        {
2912            self.0.request.resource_labels =
2913                v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2914            self
2915        }
2916
2917        /// Sets the value of [label_fingerprint][crate::model::SetLabelsRequest::label_fingerprint].
2918        ///
2919        /// This is a **required** field for requests.
2920        pub fn set_label_fingerprint<T: Into<std::string::String>>(mut self, v: T) -> Self {
2921            self.0.request.label_fingerprint = v.into();
2922            self
2923        }
2924
2925        /// Sets the value of [name][crate::model::SetLabelsRequest::name].
2926        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2927            self.0.request.name = v.into();
2928            self
2929        }
2930    }
2931
2932    #[doc(hidden)]
2933    impl crate::RequestBuilder for SetLabels {
2934        fn request_options(&mut self) -> &mut crate::RequestOptions {
2935            &mut self.0.options
2936        }
2937    }
2938
2939    /// The request builder for [ClusterManager::set_legacy_abac][crate::client::ClusterManager::set_legacy_abac] calls.
2940    ///
2941    /// # Example
2942    /// ```
2943    /// # use google_cloud_container_v1::builder::cluster_manager::SetLegacyAbac;
2944    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2945    ///
2946    /// let builder = prepare_request_builder();
2947    /// let response = builder.send().await?;
2948    /// # Ok(()) }
2949    ///
2950    /// fn prepare_request_builder() -> SetLegacyAbac {
2951    ///   # panic!();
2952    ///   // ... details omitted ...
2953    /// }
2954    /// ```
2955    #[derive(Clone, Debug)]
2956    pub struct SetLegacyAbac(RequestBuilder<crate::model::SetLegacyAbacRequest>);
2957
2958    impl SetLegacyAbac {
2959        pub(crate) fn new(
2960            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2961        ) -> Self {
2962            Self(RequestBuilder::new(stub))
2963        }
2964
2965        /// Sets the full request, replacing any prior values.
2966        pub fn with_request<V: Into<crate::model::SetLegacyAbacRequest>>(mut self, v: V) -> Self {
2967            self.0.request = v.into();
2968            self
2969        }
2970
2971        /// Sets all the options, replacing any prior values.
2972        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2973            self.0.options = v.into();
2974            self
2975        }
2976
2977        /// Sends the request.
2978        pub async fn send(self) -> Result<crate::model::Operation> {
2979            (*self.0.stub)
2980                .set_legacy_abac(self.0.request, self.0.options)
2981                .await
2982                .map(crate::Response::into_body)
2983        }
2984
2985        /// Sets the value of [project_id][crate::model::SetLegacyAbacRequest::project_id].
2986        #[deprecated]
2987        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2988            self.0.request.project_id = v.into();
2989            self
2990        }
2991
2992        /// Sets the value of [zone][crate::model::SetLegacyAbacRequest::zone].
2993        #[deprecated]
2994        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2995            self.0.request.zone = v.into();
2996            self
2997        }
2998
2999        /// Sets the value of [cluster_id][crate::model::SetLegacyAbacRequest::cluster_id].
3000        #[deprecated]
3001        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3002            self.0.request.cluster_id = v.into();
3003            self
3004        }
3005
3006        /// Sets the value of [enabled][crate::model::SetLegacyAbacRequest::enabled].
3007        ///
3008        /// This is a **required** field for requests.
3009        pub fn set_enabled<T: Into<bool>>(mut self, v: T) -> Self {
3010            self.0.request.enabled = v.into();
3011            self
3012        }
3013
3014        /// Sets the value of [name][crate::model::SetLegacyAbacRequest::name].
3015        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3016            self.0.request.name = v.into();
3017            self
3018        }
3019    }
3020
3021    #[doc(hidden)]
3022    impl crate::RequestBuilder for SetLegacyAbac {
3023        fn request_options(&mut self) -> &mut crate::RequestOptions {
3024            &mut self.0.options
3025        }
3026    }
3027
3028    /// The request builder for [ClusterManager::start_ip_rotation][crate::client::ClusterManager::start_ip_rotation] calls.
3029    ///
3030    /// # Example
3031    /// ```
3032    /// # use google_cloud_container_v1::builder::cluster_manager::StartIPRotation;
3033    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3034    ///
3035    /// let builder = prepare_request_builder();
3036    /// let response = builder.send().await?;
3037    /// # Ok(()) }
3038    ///
3039    /// fn prepare_request_builder() -> StartIPRotation {
3040    ///   # panic!();
3041    ///   // ... details omitted ...
3042    /// }
3043    /// ```
3044    #[derive(Clone, Debug)]
3045    pub struct StartIPRotation(RequestBuilder<crate::model::StartIPRotationRequest>);
3046
3047    impl StartIPRotation {
3048        pub(crate) fn new(
3049            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3050        ) -> Self {
3051            Self(RequestBuilder::new(stub))
3052        }
3053
3054        /// Sets the full request, replacing any prior values.
3055        pub fn with_request<V: Into<crate::model::StartIPRotationRequest>>(mut self, v: V) -> Self {
3056            self.0.request = v.into();
3057            self
3058        }
3059
3060        /// Sets all the options, replacing any prior values.
3061        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3062            self.0.options = v.into();
3063            self
3064        }
3065
3066        /// Sends the request.
3067        pub async fn send(self) -> Result<crate::model::Operation> {
3068            (*self.0.stub)
3069                .start_ip_rotation(self.0.request, self.0.options)
3070                .await
3071                .map(crate::Response::into_body)
3072        }
3073
3074        /// Sets the value of [project_id][crate::model::StartIPRotationRequest::project_id].
3075        #[deprecated]
3076        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3077            self.0.request.project_id = v.into();
3078            self
3079        }
3080
3081        /// Sets the value of [zone][crate::model::StartIPRotationRequest::zone].
3082        #[deprecated]
3083        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3084            self.0.request.zone = v.into();
3085            self
3086        }
3087
3088        /// Sets the value of [cluster_id][crate::model::StartIPRotationRequest::cluster_id].
3089        #[deprecated]
3090        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3091            self.0.request.cluster_id = v.into();
3092            self
3093        }
3094
3095        /// Sets the value of [name][crate::model::StartIPRotationRequest::name].
3096        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3097            self.0.request.name = v.into();
3098            self
3099        }
3100
3101        /// Sets the value of [rotate_credentials][crate::model::StartIPRotationRequest::rotate_credentials].
3102        pub fn set_rotate_credentials<T: Into<bool>>(mut self, v: T) -> Self {
3103            self.0.request.rotate_credentials = v.into();
3104            self
3105        }
3106    }
3107
3108    #[doc(hidden)]
3109    impl crate::RequestBuilder for StartIPRotation {
3110        fn request_options(&mut self) -> &mut crate::RequestOptions {
3111            &mut self.0.options
3112        }
3113    }
3114
3115    /// The request builder for [ClusterManager::complete_ip_rotation][crate::client::ClusterManager::complete_ip_rotation] calls.
3116    ///
3117    /// # Example
3118    /// ```
3119    /// # use google_cloud_container_v1::builder::cluster_manager::CompleteIPRotation;
3120    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3121    ///
3122    /// let builder = prepare_request_builder();
3123    /// let response = builder.send().await?;
3124    /// # Ok(()) }
3125    ///
3126    /// fn prepare_request_builder() -> CompleteIPRotation {
3127    ///   # panic!();
3128    ///   // ... details omitted ...
3129    /// }
3130    /// ```
3131    #[derive(Clone, Debug)]
3132    pub struct CompleteIPRotation(RequestBuilder<crate::model::CompleteIPRotationRequest>);
3133
3134    impl CompleteIPRotation {
3135        pub(crate) fn new(
3136            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3137        ) -> Self {
3138            Self(RequestBuilder::new(stub))
3139        }
3140
3141        /// Sets the full request, replacing any prior values.
3142        pub fn with_request<V: Into<crate::model::CompleteIPRotationRequest>>(
3143            mut self,
3144            v: V,
3145        ) -> Self {
3146            self.0.request = v.into();
3147            self
3148        }
3149
3150        /// Sets all the options, replacing any prior values.
3151        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3152            self.0.options = v.into();
3153            self
3154        }
3155
3156        /// Sends the request.
3157        pub async fn send(self) -> Result<crate::model::Operation> {
3158            (*self.0.stub)
3159                .complete_ip_rotation(self.0.request, self.0.options)
3160                .await
3161                .map(crate::Response::into_body)
3162        }
3163
3164        /// Sets the value of [project_id][crate::model::CompleteIPRotationRequest::project_id].
3165        #[deprecated]
3166        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3167            self.0.request.project_id = v.into();
3168            self
3169        }
3170
3171        /// Sets the value of [zone][crate::model::CompleteIPRotationRequest::zone].
3172        #[deprecated]
3173        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3174            self.0.request.zone = v.into();
3175            self
3176        }
3177
3178        /// Sets the value of [cluster_id][crate::model::CompleteIPRotationRequest::cluster_id].
3179        #[deprecated]
3180        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3181            self.0.request.cluster_id = v.into();
3182            self
3183        }
3184
3185        /// Sets the value of [name][crate::model::CompleteIPRotationRequest::name].
3186        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3187            self.0.request.name = v.into();
3188            self
3189        }
3190    }
3191
3192    #[doc(hidden)]
3193    impl crate::RequestBuilder for CompleteIPRotation {
3194        fn request_options(&mut self) -> &mut crate::RequestOptions {
3195            &mut self.0.options
3196        }
3197    }
3198
3199    /// The request builder for [ClusterManager::set_node_pool_size][crate::client::ClusterManager::set_node_pool_size] calls.
3200    ///
3201    /// # Example
3202    /// ```
3203    /// # use google_cloud_container_v1::builder::cluster_manager::SetNodePoolSize;
3204    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3205    ///
3206    /// let builder = prepare_request_builder();
3207    /// let response = builder.send().await?;
3208    /// # Ok(()) }
3209    ///
3210    /// fn prepare_request_builder() -> SetNodePoolSize {
3211    ///   # panic!();
3212    ///   // ... details omitted ...
3213    /// }
3214    /// ```
3215    #[derive(Clone, Debug)]
3216    pub struct SetNodePoolSize(RequestBuilder<crate::model::SetNodePoolSizeRequest>);
3217
3218    impl SetNodePoolSize {
3219        pub(crate) fn new(
3220            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3221        ) -> Self {
3222            Self(RequestBuilder::new(stub))
3223        }
3224
3225        /// Sets the full request, replacing any prior values.
3226        pub fn with_request<V: Into<crate::model::SetNodePoolSizeRequest>>(mut self, v: V) -> Self {
3227            self.0.request = v.into();
3228            self
3229        }
3230
3231        /// Sets all the options, replacing any prior values.
3232        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3233            self.0.options = v.into();
3234            self
3235        }
3236
3237        /// Sends the request.
3238        pub async fn send(self) -> Result<crate::model::Operation> {
3239            (*self.0.stub)
3240                .set_node_pool_size(self.0.request, self.0.options)
3241                .await
3242                .map(crate::Response::into_body)
3243        }
3244
3245        /// Sets the value of [project_id][crate::model::SetNodePoolSizeRequest::project_id].
3246        #[deprecated]
3247        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3248            self.0.request.project_id = v.into();
3249            self
3250        }
3251
3252        /// Sets the value of [zone][crate::model::SetNodePoolSizeRequest::zone].
3253        #[deprecated]
3254        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3255            self.0.request.zone = v.into();
3256            self
3257        }
3258
3259        /// Sets the value of [cluster_id][crate::model::SetNodePoolSizeRequest::cluster_id].
3260        #[deprecated]
3261        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3262            self.0.request.cluster_id = v.into();
3263            self
3264        }
3265
3266        /// Sets the value of [node_pool_id][crate::model::SetNodePoolSizeRequest::node_pool_id].
3267        #[deprecated]
3268        pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3269            self.0.request.node_pool_id = v.into();
3270            self
3271        }
3272
3273        /// Sets the value of [node_count][crate::model::SetNodePoolSizeRequest::node_count].
3274        ///
3275        /// This is a **required** field for requests.
3276        pub fn set_node_count<T: Into<i32>>(mut self, v: T) -> Self {
3277            self.0.request.node_count = v.into();
3278            self
3279        }
3280
3281        /// Sets the value of [name][crate::model::SetNodePoolSizeRequest::name].
3282        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3283            self.0.request.name = v.into();
3284            self
3285        }
3286    }
3287
3288    #[doc(hidden)]
3289    impl crate::RequestBuilder for SetNodePoolSize {
3290        fn request_options(&mut self) -> &mut crate::RequestOptions {
3291            &mut self.0.options
3292        }
3293    }
3294
3295    /// The request builder for [ClusterManager::set_network_policy][crate::client::ClusterManager::set_network_policy] calls.
3296    ///
3297    /// # Example
3298    /// ```
3299    /// # use google_cloud_container_v1::builder::cluster_manager::SetNetworkPolicy;
3300    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3301    ///
3302    /// let builder = prepare_request_builder();
3303    /// let response = builder.send().await?;
3304    /// # Ok(()) }
3305    ///
3306    /// fn prepare_request_builder() -> SetNetworkPolicy {
3307    ///   # panic!();
3308    ///   // ... details omitted ...
3309    /// }
3310    /// ```
3311    #[derive(Clone, Debug)]
3312    pub struct SetNetworkPolicy(RequestBuilder<crate::model::SetNetworkPolicyRequest>);
3313
3314    impl SetNetworkPolicy {
3315        pub(crate) fn new(
3316            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3317        ) -> Self {
3318            Self(RequestBuilder::new(stub))
3319        }
3320
3321        /// Sets the full request, replacing any prior values.
3322        pub fn with_request<V: Into<crate::model::SetNetworkPolicyRequest>>(
3323            mut self,
3324            v: V,
3325        ) -> Self {
3326            self.0.request = v.into();
3327            self
3328        }
3329
3330        /// Sets all the options, replacing any prior values.
3331        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3332            self.0.options = v.into();
3333            self
3334        }
3335
3336        /// Sends the request.
3337        pub async fn send(self) -> Result<crate::model::Operation> {
3338            (*self.0.stub)
3339                .set_network_policy(self.0.request, self.0.options)
3340                .await
3341                .map(crate::Response::into_body)
3342        }
3343
3344        /// Sets the value of [project_id][crate::model::SetNetworkPolicyRequest::project_id].
3345        #[deprecated]
3346        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3347            self.0.request.project_id = v.into();
3348            self
3349        }
3350
3351        /// Sets the value of [zone][crate::model::SetNetworkPolicyRequest::zone].
3352        #[deprecated]
3353        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3354            self.0.request.zone = v.into();
3355            self
3356        }
3357
3358        /// Sets the value of [cluster_id][crate::model::SetNetworkPolicyRequest::cluster_id].
3359        #[deprecated]
3360        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3361            self.0.request.cluster_id = v.into();
3362            self
3363        }
3364
3365        /// Sets the value of [network_policy][crate::model::SetNetworkPolicyRequest::network_policy].
3366        ///
3367        /// This is a **required** field for requests.
3368        pub fn set_network_policy<T>(mut self, v: T) -> Self
3369        where
3370            T: std::convert::Into<crate::model::NetworkPolicy>,
3371        {
3372            self.0.request.network_policy = std::option::Option::Some(v.into());
3373            self
3374        }
3375
3376        /// Sets or clears the value of [network_policy][crate::model::SetNetworkPolicyRequest::network_policy].
3377        ///
3378        /// This is a **required** field for requests.
3379        pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
3380        where
3381            T: std::convert::Into<crate::model::NetworkPolicy>,
3382        {
3383            self.0.request.network_policy = v.map(|x| x.into());
3384            self
3385        }
3386
3387        /// Sets the value of [name][crate::model::SetNetworkPolicyRequest::name].
3388        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3389            self.0.request.name = v.into();
3390            self
3391        }
3392    }
3393
3394    #[doc(hidden)]
3395    impl crate::RequestBuilder for SetNetworkPolicy {
3396        fn request_options(&mut self) -> &mut crate::RequestOptions {
3397            &mut self.0.options
3398        }
3399    }
3400
3401    /// The request builder for [ClusterManager::set_maintenance_policy][crate::client::ClusterManager::set_maintenance_policy] calls.
3402    ///
3403    /// # Example
3404    /// ```
3405    /// # use google_cloud_container_v1::builder::cluster_manager::SetMaintenancePolicy;
3406    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3407    ///
3408    /// let builder = prepare_request_builder();
3409    /// let response = builder.send().await?;
3410    /// # Ok(()) }
3411    ///
3412    /// fn prepare_request_builder() -> SetMaintenancePolicy {
3413    ///   # panic!();
3414    ///   // ... details omitted ...
3415    /// }
3416    /// ```
3417    #[derive(Clone, Debug)]
3418    pub struct SetMaintenancePolicy(RequestBuilder<crate::model::SetMaintenancePolicyRequest>);
3419
3420    impl SetMaintenancePolicy {
3421        pub(crate) fn new(
3422            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3423        ) -> Self {
3424            Self(RequestBuilder::new(stub))
3425        }
3426
3427        /// Sets the full request, replacing any prior values.
3428        pub fn with_request<V: Into<crate::model::SetMaintenancePolicyRequest>>(
3429            mut self,
3430            v: V,
3431        ) -> Self {
3432            self.0.request = v.into();
3433            self
3434        }
3435
3436        /// Sets all the options, replacing any prior values.
3437        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3438            self.0.options = v.into();
3439            self
3440        }
3441
3442        /// Sends the request.
3443        pub async fn send(self) -> Result<crate::model::Operation> {
3444            (*self.0.stub)
3445                .set_maintenance_policy(self.0.request, self.0.options)
3446                .await
3447                .map(crate::Response::into_body)
3448        }
3449
3450        /// Sets the value of [project_id][crate::model::SetMaintenancePolicyRequest::project_id].
3451        ///
3452        /// This is a **required** field for requests.
3453        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3454            self.0.request.project_id = v.into();
3455            self
3456        }
3457
3458        /// Sets the value of [zone][crate::model::SetMaintenancePolicyRequest::zone].
3459        ///
3460        /// This is a **required** field for requests.
3461        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3462            self.0.request.zone = v.into();
3463            self
3464        }
3465
3466        /// Sets the value of [cluster_id][crate::model::SetMaintenancePolicyRequest::cluster_id].
3467        ///
3468        /// This is a **required** field for requests.
3469        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3470            self.0.request.cluster_id = v.into();
3471            self
3472        }
3473
3474        /// Sets the value of [maintenance_policy][crate::model::SetMaintenancePolicyRequest::maintenance_policy].
3475        ///
3476        /// This is a **required** field for requests.
3477        pub fn set_maintenance_policy<T>(mut self, v: T) -> Self
3478        where
3479            T: std::convert::Into<crate::model::MaintenancePolicy>,
3480        {
3481            self.0.request.maintenance_policy = std::option::Option::Some(v.into());
3482            self
3483        }
3484
3485        /// Sets or clears the value of [maintenance_policy][crate::model::SetMaintenancePolicyRequest::maintenance_policy].
3486        ///
3487        /// This is a **required** field for requests.
3488        pub fn set_or_clear_maintenance_policy<T>(mut self, v: std::option::Option<T>) -> Self
3489        where
3490            T: std::convert::Into<crate::model::MaintenancePolicy>,
3491        {
3492            self.0.request.maintenance_policy = v.map(|x| x.into());
3493            self
3494        }
3495
3496        /// Sets the value of [name][crate::model::SetMaintenancePolicyRequest::name].
3497        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3498            self.0.request.name = v.into();
3499            self
3500        }
3501    }
3502
3503    #[doc(hidden)]
3504    impl crate::RequestBuilder for SetMaintenancePolicy {
3505        fn request_options(&mut self) -> &mut crate::RequestOptions {
3506            &mut self.0.options
3507        }
3508    }
3509
3510    /// The request builder for [ClusterManager::list_usable_subnetworks][crate::client::ClusterManager::list_usable_subnetworks] calls.
3511    ///
3512    /// # Example
3513    /// ```
3514    /// # use google_cloud_container_v1::builder::cluster_manager::ListUsableSubnetworks;
3515    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3516    /// use google_cloud_gax::paginator::ItemPaginator;
3517    ///
3518    /// let builder = prepare_request_builder();
3519    /// let mut items = builder.by_item();
3520    /// while let Some(result) = items.next().await {
3521    ///   let item = result?;
3522    /// }
3523    /// # Ok(()) }
3524    ///
3525    /// fn prepare_request_builder() -> ListUsableSubnetworks {
3526    ///   # panic!();
3527    ///   // ... details omitted ...
3528    /// }
3529    /// ```
3530    #[derive(Clone, Debug)]
3531    pub struct ListUsableSubnetworks(RequestBuilder<crate::model::ListUsableSubnetworksRequest>);
3532
3533    impl ListUsableSubnetworks {
3534        pub(crate) fn new(
3535            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3536        ) -> Self {
3537            Self(RequestBuilder::new(stub))
3538        }
3539
3540        /// Sets the full request, replacing any prior values.
3541        pub fn with_request<V: Into<crate::model::ListUsableSubnetworksRequest>>(
3542            mut self,
3543            v: V,
3544        ) -> Self {
3545            self.0.request = v.into();
3546            self
3547        }
3548
3549        /// Sets all the options, replacing any prior values.
3550        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3551            self.0.options = v.into();
3552            self
3553        }
3554
3555        /// Sends the request.
3556        pub async fn send(self) -> Result<crate::model::ListUsableSubnetworksResponse> {
3557            (*self.0.stub)
3558                .list_usable_subnetworks(self.0.request, self.0.options)
3559                .await
3560                .map(crate::Response::into_body)
3561        }
3562
3563        /// Streams each page in the collection.
3564        pub fn by_page(
3565            self,
3566        ) -> impl google_cloud_gax::paginator::Paginator<
3567            crate::model::ListUsableSubnetworksResponse,
3568            crate::Error,
3569        > {
3570            use std::clone::Clone;
3571            let token = self.0.request.page_token.clone();
3572            let execute = move |token: String| {
3573                let mut builder = self.clone();
3574                builder.0.request = builder.0.request.set_page_token(token);
3575                builder.send()
3576            };
3577            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3578        }
3579
3580        /// Streams each item in the collection.
3581        pub fn by_item(
3582            self,
3583        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3584            crate::model::ListUsableSubnetworksResponse,
3585            crate::Error,
3586        > {
3587            use google_cloud_gax::paginator::Paginator;
3588            self.by_page().items()
3589        }
3590
3591        /// Sets the value of [parent][crate::model::ListUsableSubnetworksRequest::parent].
3592        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3593            self.0.request.parent = v.into();
3594            self
3595        }
3596
3597        /// Sets the value of [filter][crate::model::ListUsableSubnetworksRequest::filter].
3598        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3599            self.0.request.filter = v.into();
3600            self
3601        }
3602
3603        /// Sets the value of [page_size][crate::model::ListUsableSubnetworksRequest::page_size].
3604        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3605            self.0.request.page_size = v.into();
3606            self
3607        }
3608
3609        /// Sets the value of [page_token][crate::model::ListUsableSubnetworksRequest::page_token].
3610        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3611            self.0.request.page_token = v.into();
3612            self
3613        }
3614    }
3615
3616    #[doc(hidden)]
3617    impl crate::RequestBuilder for ListUsableSubnetworks {
3618        fn request_options(&mut self) -> &mut crate::RequestOptions {
3619            &mut self.0.options
3620        }
3621    }
3622
3623    /// The request builder for [ClusterManager::check_autopilot_compatibility][crate::client::ClusterManager::check_autopilot_compatibility] calls.
3624    ///
3625    /// # Example
3626    /// ```
3627    /// # use google_cloud_container_v1::builder::cluster_manager::CheckAutopilotCompatibility;
3628    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3629    ///
3630    /// let builder = prepare_request_builder();
3631    /// let response = builder.send().await?;
3632    /// # Ok(()) }
3633    ///
3634    /// fn prepare_request_builder() -> CheckAutopilotCompatibility {
3635    ///   # panic!();
3636    ///   // ... details omitted ...
3637    /// }
3638    /// ```
3639    #[derive(Clone, Debug)]
3640    pub struct CheckAutopilotCompatibility(
3641        RequestBuilder<crate::model::CheckAutopilotCompatibilityRequest>,
3642    );
3643
3644    impl CheckAutopilotCompatibility {
3645        pub(crate) fn new(
3646            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3647        ) -> Self {
3648            Self(RequestBuilder::new(stub))
3649        }
3650
3651        /// Sets the full request, replacing any prior values.
3652        pub fn with_request<V: Into<crate::model::CheckAutopilotCompatibilityRequest>>(
3653            mut self,
3654            v: V,
3655        ) -> Self {
3656            self.0.request = v.into();
3657            self
3658        }
3659
3660        /// Sets all the options, replacing any prior values.
3661        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3662            self.0.options = v.into();
3663            self
3664        }
3665
3666        /// Sends the request.
3667        pub async fn send(self) -> Result<crate::model::CheckAutopilotCompatibilityResponse> {
3668            (*self.0.stub)
3669                .check_autopilot_compatibility(self.0.request, self.0.options)
3670                .await
3671                .map(crate::Response::into_body)
3672        }
3673
3674        /// Sets the value of [name][crate::model::CheckAutopilotCompatibilityRequest::name].
3675        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3676            self.0.request.name = v.into();
3677            self
3678        }
3679    }
3680
3681    #[doc(hidden)]
3682    impl crate::RequestBuilder for CheckAutopilotCompatibility {
3683        fn request_options(&mut self) -> &mut crate::RequestOptions {
3684            &mut self.0.options
3685        }
3686    }
3687
3688    /// The request builder for [ClusterManager::fetch_cluster_upgrade_info][crate::client::ClusterManager::fetch_cluster_upgrade_info] calls.
3689    ///
3690    /// # Example
3691    /// ```
3692    /// # use google_cloud_container_v1::builder::cluster_manager::FetchClusterUpgradeInfo;
3693    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3694    ///
3695    /// let builder = prepare_request_builder();
3696    /// let response = builder.send().await?;
3697    /// # Ok(()) }
3698    ///
3699    /// fn prepare_request_builder() -> FetchClusterUpgradeInfo {
3700    ///   # panic!();
3701    ///   // ... details omitted ...
3702    /// }
3703    /// ```
3704    #[derive(Clone, Debug)]
3705    pub struct FetchClusterUpgradeInfo(
3706        RequestBuilder<crate::model::FetchClusterUpgradeInfoRequest>,
3707    );
3708
3709    impl FetchClusterUpgradeInfo {
3710        pub(crate) fn new(
3711            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3712        ) -> Self {
3713            Self(RequestBuilder::new(stub))
3714        }
3715
3716        /// Sets the full request, replacing any prior values.
3717        pub fn with_request<V: Into<crate::model::FetchClusterUpgradeInfoRequest>>(
3718            mut self,
3719            v: V,
3720        ) -> Self {
3721            self.0.request = v.into();
3722            self
3723        }
3724
3725        /// Sets all the options, replacing any prior values.
3726        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3727            self.0.options = v.into();
3728            self
3729        }
3730
3731        /// Sends the request.
3732        pub async fn send(self) -> Result<crate::model::ClusterUpgradeInfo> {
3733            (*self.0.stub)
3734                .fetch_cluster_upgrade_info(self.0.request, self.0.options)
3735                .await
3736                .map(crate::Response::into_body)
3737        }
3738
3739        /// Sets the value of [name][crate::model::FetchClusterUpgradeInfoRequest::name].
3740        ///
3741        /// This is a **required** field for requests.
3742        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3743            self.0.request.name = v.into();
3744            self
3745        }
3746
3747        /// Sets the value of [version][crate::model::FetchClusterUpgradeInfoRequest::version].
3748        pub fn set_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
3749            self.0.request.version = v.into();
3750            self
3751        }
3752    }
3753
3754    #[doc(hidden)]
3755    impl crate::RequestBuilder for FetchClusterUpgradeInfo {
3756        fn request_options(&mut self) -> &mut crate::RequestOptions {
3757            &mut self.0.options
3758        }
3759    }
3760
3761    /// The request builder for [ClusterManager::fetch_node_pool_upgrade_info][crate::client::ClusterManager::fetch_node_pool_upgrade_info] calls.
3762    ///
3763    /// # Example
3764    /// ```
3765    /// # use google_cloud_container_v1::builder::cluster_manager::FetchNodePoolUpgradeInfo;
3766    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3767    ///
3768    /// let builder = prepare_request_builder();
3769    /// let response = builder.send().await?;
3770    /// # Ok(()) }
3771    ///
3772    /// fn prepare_request_builder() -> FetchNodePoolUpgradeInfo {
3773    ///   # panic!();
3774    ///   // ... details omitted ...
3775    /// }
3776    /// ```
3777    #[derive(Clone, Debug)]
3778    pub struct FetchNodePoolUpgradeInfo(
3779        RequestBuilder<crate::model::FetchNodePoolUpgradeInfoRequest>,
3780    );
3781
3782    impl FetchNodePoolUpgradeInfo {
3783        pub(crate) fn new(
3784            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3785        ) -> Self {
3786            Self(RequestBuilder::new(stub))
3787        }
3788
3789        /// Sets the full request, replacing any prior values.
3790        pub fn with_request<V: Into<crate::model::FetchNodePoolUpgradeInfoRequest>>(
3791            mut self,
3792            v: V,
3793        ) -> Self {
3794            self.0.request = v.into();
3795            self
3796        }
3797
3798        /// Sets all the options, replacing any prior values.
3799        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3800            self.0.options = v.into();
3801            self
3802        }
3803
3804        /// Sends the request.
3805        pub async fn send(self) -> Result<crate::model::NodePoolUpgradeInfo> {
3806            (*self.0.stub)
3807                .fetch_node_pool_upgrade_info(self.0.request, self.0.options)
3808                .await
3809                .map(crate::Response::into_body)
3810        }
3811
3812        /// Sets the value of [name][crate::model::FetchNodePoolUpgradeInfoRequest::name].
3813        ///
3814        /// This is a **required** field for requests.
3815        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3816            self.0.request.name = v.into();
3817            self
3818        }
3819
3820        /// Sets the value of [version][crate::model::FetchNodePoolUpgradeInfoRequest::version].
3821        pub fn set_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
3822            self.0.request.version = v.into();
3823            self
3824        }
3825    }
3826
3827    #[doc(hidden)]
3828    impl crate::RequestBuilder for FetchNodePoolUpgradeInfo {
3829        fn request_options(&mut self) -> &mut crate::RequestOptions {
3830            &mut self.0.options
3831        }
3832    }
3833
3834    /// The request builder for [ClusterManager::complete_control_plane_upgrade][crate::client::ClusterManager::complete_control_plane_upgrade] calls.
3835    ///
3836    /// # Example
3837    /// ```
3838    /// # use google_cloud_container_v1::builder::cluster_manager::CompleteControlPlaneUpgrade;
3839    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3840    ///
3841    /// let builder = prepare_request_builder();
3842    /// let response = builder.send().await?;
3843    /// # Ok(()) }
3844    ///
3845    /// fn prepare_request_builder() -> CompleteControlPlaneUpgrade {
3846    ///   # panic!();
3847    ///   // ... details omitted ...
3848    /// }
3849    /// ```
3850    #[derive(Clone, Debug)]
3851    pub struct CompleteControlPlaneUpgrade(
3852        RequestBuilder<crate::model::CompleteControlPlaneUpgradeRequest>,
3853    );
3854
3855    impl CompleteControlPlaneUpgrade {
3856        pub(crate) fn new(
3857            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3858        ) -> Self {
3859            Self(RequestBuilder::new(stub))
3860        }
3861
3862        /// Sets the full request, replacing any prior values.
3863        pub fn with_request<V: Into<crate::model::CompleteControlPlaneUpgradeRequest>>(
3864            mut self,
3865            v: V,
3866        ) -> Self {
3867            self.0.request = v.into();
3868            self
3869        }
3870
3871        /// Sets all the options, replacing any prior values.
3872        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3873            self.0.options = v.into();
3874            self
3875        }
3876
3877        /// Sends the request.
3878        pub async fn send(self) -> Result<crate::model::Operation> {
3879            (*self.0.stub)
3880                .complete_control_plane_upgrade(self.0.request, self.0.options)
3881                .await
3882                .map(crate::Response::into_body)
3883        }
3884
3885        /// Sets the value of [name][crate::model::CompleteControlPlaneUpgradeRequest::name].
3886        ///
3887        /// This is a **required** field for requests.
3888        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3889            self.0.request.name = v.into();
3890            self
3891        }
3892
3893        /// Sets the value of [version][crate::model::CompleteControlPlaneUpgradeRequest::version].
3894        pub fn set_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
3895            self.0.request.version = v.into();
3896            self
3897        }
3898    }
3899
3900    #[doc(hidden)]
3901    impl crate::RequestBuilder for CompleteControlPlaneUpgrade {
3902        fn request_options(&mut self) -> &mut crate::RequestOptions {
3903            &mut self.0.options
3904        }
3905    }
3906}