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
1026    #[doc(hidden)]
1027    impl crate::RequestBuilder for UpdateNodePool {
1028        fn request_options(&mut self) -> &mut crate::RequestOptions {
1029            &mut self.0.options
1030        }
1031    }
1032
1033    /// The request builder for [ClusterManager::set_node_pool_autoscaling][crate::client::ClusterManager::set_node_pool_autoscaling] calls.
1034    ///
1035    /// # Example
1036    /// ```
1037    /// # use google_cloud_container_v1::builder::cluster_manager::SetNodePoolAutoscaling;
1038    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1039    ///
1040    /// let builder = prepare_request_builder();
1041    /// let response = builder.send().await?;
1042    /// # Ok(()) }
1043    ///
1044    /// fn prepare_request_builder() -> SetNodePoolAutoscaling {
1045    ///   # panic!();
1046    ///   // ... details omitted ...
1047    /// }
1048    /// ```
1049    #[derive(Clone, Debug)]
1050    pub struct SetNodePoolAutoscaling(RequestBuilder<crate::model::SetNodePoolAutoscalingRequest>);
1051
1052    impl SetNodePoolAutoscaling {
1053        pub(crate) fn new(
1054            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1055        ) -> Self {
1056            Self(RequestBuilder::new(stub))
1057        }
1058
1059        /// Sets the full request, replacing any prior values.
1060        pub fn with_request<V: Into<crate::model::SetNodePoolAutoscalingRequest>>(
1061            mut self,
1062            v: V,
1063        ) -> Self {
1064            self.0.request = v.into();
1065            self
1066        }
1067
1068        /// Sets all the options, replacing any prior values.
1069        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1070            self.0.options = v.into();
1071            self
1072        }
1073
1074        /// Sends the request.
1075        pub async fn send(self) -> Result<crate::model::Operation> {
1076            (*self.0.stub)
1077                .set_node_pool_autoscaling(self.0.request, self.0.options)
1078                .await
1079                .map(crate::Response::into_body)
1080        }
1081
1082        /// Sets the value of [project_id][crate::model::SetNodePoolAutoscalingRequest::project_id].
1083        #[deprecated]
1084        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1085            self.0.request.project_id = v.into();
1086            self
1087        }
1088
1089        /// Sets the value of [zone][crate::model::SetNodePoolAutoscalingRequest::zone].
1090        #[deprecated]
1091        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1092            self.0.request.zone = v.into();
1093            self
1094        }
1095
1096        /// Sets the value of [cluster_id][crate::model::SetNodePoolAutoscalingRequest::cluster_id].
1097        #[deprecated]
1098        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1099            self.0.request.cluster_id = v.into();
1100            self
1101        }
1102
1103        /// Sets the value of [node_pool_id][crate::model::SetNodePoolAutoscalingRequest::node_pool_id].
1104        #[deprecated]
1105        pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1106            self.0.request.node_pool_id = v.into();
1107            self
1108        }
1109
1110        /// Sets the value of [autoscaling][crate::model::SetNodePoolAutoscalingRequest::autoscaling].
1111        ///
1112        /// This is a **required** field for requests.
1113        pub fn set_autoscaling<T>(mut self, v: T) -> Self
1114        where
1115            T: std::convert::Into<crate::model::NodePoolAutoscaling>,
1116        {
1117            self.0.request.autoscaling = std::option::Option::Some(v.into());
1118            self
1119        }
1120
1121        /// Sets or clears the value of [autoscaling][crate::model::SetNodePoolAutoscalingRequest::autoscaling].
1122        ///
1123        /// This is a **required** field for requests.
1124        pub fn set_or_clear_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
1125        where
1126            T: std::convert::Into<crate::model::NodePoolAutoscaling>,
1127        {
1128            self.0.request.autoscaling = v.map(|x| x.into());
1129            self
1130        }
1131
1132        /// Sets the value of [name][crate::model::SetNodePoolAutoscalingRequest::name].
1133        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1134            self.0.request.name = v.into();
1135            self
1136        }
1137    }
1138
1139    #[doc(hidden)]
1140    impl crate::RequestBuilder for SetNodePoolAutoscaling {
1141        fn request_options(&mut self) -> &mut crate::RequestOptions {
1142            &mut self.0.options
1143        }
1144    }
1145
1146    /// The request builder for [ClusterManager::set_logging_service][crate::client::ClusterManager::set_logging_service] calls.
1147    ///
1148    /// # Example
1149    /// ```
1150    /// # use google_cloud_container_v1::builder::cluster_manager::SetLoggingService;
1151    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1152    ///
1153    /// let builder = prepare_request_builder();
1154    /// let response = builder.send().await?;
1155    /// # Ok(()) }
1156    ///
1157    /// fn prepare_request_builder() -> SetLoggingService {
1158    ///   # panic!();
1159    ///   // ... details omitted ...
1160    /// }
1161    /// ```
1162    #[derive(Clone, Debug)]
1163    pub struct SetLoggingService(RequestBuilder<crate::model::SetLoggingServiceRequest>);
1164
1165    impl SetLoggingService {
1166        pub(crate) fn new(
1167            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1168        ) -> Self {
1169            Self(RequestBuilder::new(stub))
1170        }
1171
1172        /// Sets the full request, replacing any prior values.
1173        pub fn with_request<V: Into<crate::model::SetLoggingServiceRequest>>(
1174            mut self,
1175            v: V,
1176        ) -> Self {
1177            self.0.request = v.into();
1178            self
1179        }
1180
1181        /// Sets all the options, replacing any prior values.
1182        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1183            self.0.options = v.into();
1184            self
1185        }
1186
1187        /// Sends the request.
1188        pub async fn send(self) -> Result<crate::model::Operation> {
1189            (*self.0.stub)
1190                .set_logging_service(self.0.request, self.0.options)
1191                .await
1192                .map(crate::Response::into_body)
1193        }
1194
1195        /// Sets the value of [project_id][crate::model::SetLoggingServiceRequest::project_id].
1196        #[deprecated]
1197        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1198            self.0.request.project_id = v.into();
1199            self
1200        }
1201
1202        /// Sets the value of [zone][crate::model::SetLoggingServiceRequest::zone].
1203        #[deprecated]
1204        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1205            self.0.request.zone = v.into();
1206            self
1207        }
1208
1209        /// Sets the value of [cluster_id][crate::model::SetLoggingServiceRequest::cluster_id].
1210        #[deprecated]
1211        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1212            self.0.request.cluster_id = v.into();
1213            self
1214        }
1215
1216        /// Sets the value of [logging_service][crate::model::SetLoggingServiceRequest::logging_service].
1217        ///
1218        /// This is a **required** field for requests.
1219        pub fn set_logging_service<T: Into<std::string::String>>(mut self, v: T) -> Self {
1220            self.0.request.logging_service = v.into();
1221            self
1222        }
1223
1224        /// Sets the value of [name][crate::model::SetLoggingServiceRequest::name].
1225        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1226            self.0.request.name = v.into();
1227            self
1228        }
1229    }
1230
1231    #[doc(hidden)]
1232    impl crate::RequestBuilder for SetLoggingService {
1233        fn request_options(&mut self) -> &mut crate::RequestOptions {
1234            &mut self.0.options
1235        }
1236    }
1237
1238    /// The request builder for [ClusterManager::set_monitoring_service][crate::client::ClusterManager::set_monitoring_service] calls.
1239    ///
1240    /// # Example
1241    /// ```
1242    /// # use google_cloud_container_v1::builder::cluster_manager::SetMonitoringService;
1243    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1244    ///
1245    /// let builder = prepare_request_builder();
1246    /// let response = builder.send().await?;
1247    /// # Ok(()) }
1248    ///
1249    /// fn prepare_request_builder() -> SetMonitoringService {
1250    ///   # panic!();
1251    ///   // ... details omitted ...
1252    /// }
1253    /// ```
1254    #[derive(Clone, Debug)]
1255    pub struct SetMonitoringService(RequestBuilder<crate::model::SetMonitoringServiceRequest>);
1256
1257    impl SetMonitoringService {
1258        pub(crate) fn new(
1259            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1260        ) -> Self {
1261            Self(RequestBuilder::new(stub))
1262        }
1263
1264        /// Sets the full request, replacing any prior values.
1265        pub fn with_request<V: Into<crate::model::SetMonitoringServiceRequest>>(
1266            mut self,
1267            v: V,
1268        ) -> Self {
1269            self.0.request = v.into();
1270            self
1271        }
1272
1273        /// Sets all the options, replacing any prior values.
1274        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1275            self.0.options = v.into();
1276            self
1277        }
1278
1279        /// Sends the request.
1280        pub async fn send(self) -> Result<crate::model::Operation> {
1281            (*self.0.stub)
1282                .set_monitoring_service(self.0.request, self.0.options)
1283                .await
1284                .map(crate::Response::into_body)
1285        }
1286
1287        /// Sets the value of [project_id][crate::model::SetMonitoringServiceRequest::project_id].
1288        #[deprecated]
1289        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1290            self.0.request.project_id = v.into();
1291            self
1292        }
1293
1294        /// Sets the value of [zone][crate::model::SetMonitoringServiceRequest::zone].
1295        #[deprecated]
1296        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1297            self.0.request.zone = v.into();
1298            self
1299        }
1300
1301        /// Sets the value of [cluster_id][crate::model::SetMonitoringServiceRequest::cluster_id].
1302        #[deprecated]
1303        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1304            self.0.request.cluster_id = v.into();
1305            self
1306        }
1307
1308        /// Sets the value of [monitoring_service][crate::model::SetMonitoringServiceRequest::monitoring_service].
1309        ///
1310        /// This is a **required** field for requests.
1311        pub fn set_monitoring_service<T: Into<std::string::String>>(mut self, v: T) -> Self {
1312            self.0.request.monitoring_service = v.into();
1313            self
1314        }
1315
1316        /// Sets the value of [name][crate::model::SetMonitoringServiceRequest::name].
1317        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1318            self.0.request.name = v.into();
1319            self
1320        }
1321    }
1322
1323    #[doc(hidden)]
1324    impl crate::RequestBuilder for SetMonitoringService {
1325        fn request_options(&mut self) -> &mut crate::RequestOptions {
1326            &mut self.0.options
1327        }
1328    }
1329
1330    /// The request builder for [ClusterManager::set_addons_config][crate::client::ClusterManager::set_addons_config] calls.
1331    ///
1332    /// # Example
1333    /// ```
1334    /// # use google_cloud_container_v1::builder::cluster_manager::SetAddonsConfig;
1335    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1336    ///
1337    /// let builder = prepare_request_builder();
1338    /// let response = builder.send().await?;
1339    /// # Ok(()) }
1340    ///
1341    /// fn prepare_request_builder() -> SetAddonsConfig {
1342    ///   # panic!();
1343    ///   // ... details omitted ...
1344    /// }
1345    /// ```
1346    #[derive(Clone, Debug)]
1347    pub struct SetAddonsConfig(RequestBuilder<crate::model::SetAddonsConfigRequest>);
1348
1349    impl SetAddonsConfig {
1350        pub(crate) fn new(
1351            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1352        ) -> Self {
1353            Self(RequestBuilder::new(stub))
1354        }
1355
1356        /// Sets the full request, replacing any prior values.
1357        pub fn with_request<V: Into<crate::model::SetAddonsConfigRequest>>(mut self, v: V) -> Self {
1358            self.0.request = v.into();
1359            self
1360        }
1361
1362        /// Sets all the options, replacing any prior values.
1363        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1364            self.0.options = v.into();
1365            self
1366        }
1367
1368        /// Sends the request.
1369        pub async fn send(self) -> Result<crate::model::Operation> {
1370            (*self.0.stub)
1371                .set_addons_config(self.0.request, self.0.options)
1372                .await
1373                .map(crate::Response::into_body)
1374        }
1375
1376        /// Sets the value of [project_id][crate::model::SetAddonsConfigRequest::project_id].
1377        #[deprecated]
1378        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1379            self.0.request.project_id = v.into();
1380            self
1381        }
1382
1383        /// Sets the value of [zone][crate::model::SetAddonsConfigRequest::zone].
1384        #[deprecated]
1385        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1386            self.0.request.zone = v.into();
1387            self
1388        }
1389
1390        /// Sets the value of [cluster_id][crate::model::SetAddonsConfigRequest::cluster_id].
1391        #[deprecated]
1392        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1393            self.0.request.cluster_id = v.into();
1394            self
1395        }
1396
1397        /// Sets the value of [addons_config][crate::model::SetAddonsConfigRequest::addons_config].
1398        ///
1399        /// This is a **required** field for requests.
1400        pub fn set_addons_config<T>(mut self, v: T) -> Self
1401        where
1402            T: std::convert::Into<crate::model::AddonsConfig>,
1403        {
1404            self.0.request.addons_config = std::option::Option::Some(v.into());
1405            self
1406        }
1407
1408        /// Sets or clears the value of [addons_config][crate::model::SetAddonsConfigRequest::addons_config].
1409        ///
1410        /// This is a **required** field for requests.
1411        pub fn set_or_clear_addons_config<T>(mut self, v: std::option::Option<T>) -> Self
1412        where
1413            T: std::convert::Into<crate::model::AddonsConfig>,
1414        {
1415            self.0.request.addons_config = v.map(|x| x.into());
1416            self
1417        }
1418
1419        /// Sets the value of [name][crate::model::SetAddonsConfigRequest::name].
1420        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1421            self.0.request.name = v.into();
1422            self
1423        }
1424    }
1425
1426    #[doc(hidden)]
1427    impl crate::RequestBuilder for SetAddonsConfig {
1428        fn request_options(&mut self) -> &mut crate::RequestOptions {
1429            &mut self.0.options
1430        }
1431    }
1432
1433    /// The request builder for [ClusterManager::set_locations][crate::client::ClusterManager::set_locations] calls.
1434    ///
1435    /// # Example
1436    /// ```
1437    /// # use google_cloud_container_v1::builder::cluster_manager::SetLocations;
1438    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1439    ///
1440    /// let builder = prepare_request_builder();
1441    /// let response = builder.send().await?;
1442    /// # Ok(()) }
1443    ///
1444    /// fn prepare_request_builder() -> SetLocations {
1445    ///   # panic!();
1446    ///   // ... details omitted ...
1447    /// }
1448    /// ```
1449    #[derive(Clone, Debug)]
1450    pub struct SetLocations(RequestBuilder<crate::model::SetLocationsRequest>);
1451
1452    impl SetLocations {
1453        pub(crate) fn new(
1454            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1455        ) -> Self {
1456            Self(RequestBuilder::new(stub))
1457        }
1458
1459        /// Sets the full request, replacing any prior values.
1460        pub fn with_request<V: Into<crate::model::SetLocationsRequest>>(mut self, v: V) -> Self {
1461            self.0.request = v.into();
1462            self
1463        }
1464
1465        /// Sets all the options, replacing any prior values.
1466        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1467            self.0.options = v.into();
1468            self
1469        }
1470
1471        /// Sends the request.
1472        pub async fn send(self) -> Result<crate::model::Operation> {
1473            (*self.0.stub)
1474                .set_locations(self.0.request, self.0.options)
1475                .await
1476                .map(crate::Response::into_body)
1477        }
1478
1479        /// Sets the value of [project_id][crate::model::SetLocationsRequest::project_id].
1480        #[deprecated]
1481        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1482            self.0.request.project_id = v.into();
1483            self
1484        }
1485
1486        /// Sets the value of [zone][crate::model::SetLocationsRequest::zone].
1487        #[deprecated]
1488        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1489            self.0.request.zone = v.into();
1490            self
1491        }
1492
1493        /// Sets the value of [cluster_id][crate::model::SetLocationsRequest::cluster_id].
1494        #[deprecated]
1495        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1496            self.0.request.cluster_id = v.into();
1497            self
1498        }
1499
1500        /// Sets the value of [locations][crate::model::SetLocationsRequest::locations].
1501        ///
1502        /// This is a **required** field for requests.
1503        pub fn set_locations<T, V>(mut self, v: T) -> Self
1504        where
1505            T: std::iter::IntoIterator<Item = V>,
1506            V: std::convert::Into<std::string::String>,
1507        {
1508            use std::iter::Iterator;
1509            self.0.request.locations = v.into_iter().map(|i| i.into()).collect();
1510            self
1511        }
1512
1513        /// Sets the value of [name][crate::model::SetLocationsRequest::name].
1514        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1515            self.0.request.name = v.into();
1516            self
1517        }
1518    }
1519
1520    #[doc(hidden)]
1521    impl crate::RequestBuilder for SetLocations {
1522        fn request_options(&mut self) -> &mut crate::RequestOptions {
1523            &mut self.0.options
1524        }
1525    }
1526
1527    /// The request builder for [ClusterManager::update_master][crate::client::ClusterManager::update_master] calls.
1528    ///
1529    /// # Example
1530    /// ```
1531    /// # use google_cloud_container_v1::builder::cluster_manager::UpdateMaster;
1532    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1533    ///
1534    /// let builder = prepare_request_builder();
1535    /// let response = builder.send().await?;
1536    /// # Ok(()) }
1537    ///
1538    /// fn prepare_request_builder() -> UpdateMaster {
1539    ///   # panic!();
1540    ///   // ... details omitted ...
1541    /// }
1542    /// ```
1543    #[derive(Clone, Debug)]
1544    pub struct UpdateMaster(RequestBuilder<crate::model::UpdateMasterRequest>);
1545
1546    impl UpdateMaster {
1547        pub(crate) fn new(
1548            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1549        ) -> Self {
1550            Self(RequestBuilder::new(stub))
1551        }
1552
1553        /// Sets the full request, replacing any prior values.
1554        pub fn with_request<V: Into<crate::model::UpdateMasterRequest>>(mut self, v: V) -> Self {
1555            self.0.request = v.into();
1556            self
1557        }
1558
1559        /// Sets all the options, replacing any prior values.
1560        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1561            self.0.options = v.into();
1562            self
1563        }
1564
1565        /// Sends the request.
1566        pub async fn send(self) -> Result<crate::model::Operation> {
1567            (*self.0.stub)
1568                .update_master(self.0.request, self.0.options)
1569                .await
1570                .map(crate::Response::into_body)
1571        }
1572
1573        /// Sets the value of [project_id][crate::model::UpdateMasterRequest::project_id].
1574        #[deprecated]
1575        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1576            self.0.request.project_id = v.into();
1577            self
1578        }
1579
1580        /// Sets the value of [zone][crate::model::UpdateMasterRequest::zone].
1581        #[deprecated]
1582        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1583            self.0.request.zone = v.into();
1584            self
1585        }
1586
1587        /// Sets the value of [cluster_id][crate::model::UpdateMasterRequest::cluster_id].
1588        #[deprecated]
1589        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1590            self.0.request.cluster_id = v.into();
1591            self
1592        }
1593
1594        /// Sets the value of [master_version][crate::model::UpdateMasterRequest::master_version].
1595        ///
1596        /// This is a **required** field for requests.
1597        pub fn set_master_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
1598            self.0.request.master_version = v.into();
1599            self
1600        }
1601
1602        /// Sets the value of [name][crate::model::UpdateMasterRequest::name].
1603        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1604            self.0.request.name = v.into();
1605            self
1606        }
1607    }
1608
1609    #[doc(hidden)]
1610    impl crate::RequestBuilder for UpdateMaster {
1611        fn request_options(&mut self) -> &mut crate::RequestOptions {
1612            &mut self.0.options
1613        }
1614    }
1615
1616    /// The request builder for [ClusterManager::set_master_auth][crate::client::ClusterManager::set_master_auth] calls.
1617    ///
1618    /// # Example
1619    /// ```
1620    /// # use google_cloud_container_v1::builder::cluster_manager::SetMasterAuth;
1621    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1622    ///
1623    /// let builder = prepare_request_builder();
1624    /// let response = builder.send().await?;
1625    /// # Ok(()) }
1626    ///
1627    /// fn prepare_request_builder() -> SetMasterAuth {
1628    ///   # panic!();
1629    ///   // ... details omitted ...
1630    /// }
1631    /// ```
1632    #[derive(Clone, Debug)]
1633    pub struct SetMasterAuth(RequestBuilder<crate::model::SetMasterAuthRequest>);
1634
1635    impl SetMasterAuth {
1636        pub(crate) fn new(
1637            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1638        ) -> Self {
1639            Self(RequestBuilder::new(stub))
1640        }
1641
1642        /// Sets the full request, replacing any prior values.
1643        pub fn with_request<V: Into<crate::model::SetMasterAuthRequest>>(mut self, v: V) -> Self {
1644            self.0.request = v.into();
1645            self
1646        }
1647
1648        /// Sets all the options, replacing any prior values.
1649        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1650            self.0.options = v.into();
1651            self
1652        }
1653
1654        /// Sends the request.
1655        pub async fn send(self) -> Result<crate::model::Operation> {
1656            (*self.0.stub)
1657                .set_master_auth(self.0.request, self.0.options)
1658                .await
1659                .map(crate::Response::into_body)
1660        }
1661
1662        /// Sets the value of [project_id][crate::model::SetMasterAuthRequest::project_id].
1663        #[deprecated]
1664        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1665            self.0.request.project_id = v.into();
1666            self
1667        }
1668
1669        /// Sets the value of [zone][crate::model::SetMasterAuthRequest::zone].
1670        #[deprecated]
1671        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1672            self.0.request.zone = v.into();
1673            self
1674        }
1675
1676        /// Sets the value of [cluster_id][crate::model::SetMasterAuthRequest::cluster_id].
1677        #[deprecated]
1678        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1679            self.0.request.cluster_id = v.into();
1680            self
1681        }
1682
1683        /// Sets the value of [action][crate::model::SetMasterAuthRequest::action].
1684        ///
1685        /// This is a **required** field for requests.
1686        pub fn set_action<T: Into<crate::model::set_master_auth_request::Action>>(
1687            mut self,
1688            v: T,
1689        ) -> Self {
1690            self.0.request.action = v.into();
1691            self
1692        }
1693
1694        /// Sets the value of [update][crate::model::SetMasterAuthRequest::update].
1695        ///
1696        /// This is a **required** field for requests.
1697        pub fn set_update<T>(mut self, v: T) -> Self
1698        where
1699            T: std::convert::Into<crate::model::MasterAuth>,
1700        {
1701            self.0.request.update = std::option::Option::Some(v.into());
1702            self
1703        }
1704
1705        /// Sets or clears the value of [update][crate::model::SetMasterAuthRequest::update].
1706        ///
1707        /// This is a **required** field for requests.
1708        pub fn set_or_clear_update<T>(mut self, v: std::option::Option<T>) -> Self
1709        where
1710            T: std::convert::Into<crate::model::MasterAuth>,
1711        {
1712            self.0.request.update = v.map(|x| x.into());
1713            self
1714        }
1715
1716        /// Sets the value of [name][crate::model::SetMasterAuthRequest::name].
1717        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1718            self.0.request.name = v.into();
1719            self
1720        }
1721    }
1722
1723    #[doc(hidden)]
1724    impl crate::RequestBuilder for SetMasterAuth {
1725        fn request_options(&mut self) -> &mut crate::RequestOptions {
1726            &mut self.0.options
1727        }
1728    }
1729
1730    /// The request builder for [ClusterManager::delete_cluster][crate::client::ClusterManager::delete_cluster] calls.
1731    ///
1732    /// # Example
1733    /// ```
1734    /// # use google_cloud_container_v1::builder::cluster_manager::DeleteCluster;
1735    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1736    ///
1737    /// let builder = prepare_request_builder();
1738    /// let response = builder.send().await?;
1739    /// # Ok(()) }
1740    ///
1741    /// fn prepare_request_builder() -> DeleteCluster {
1742    ///   # panic!();
1743    ///   // ... details omitted ...
1744    /// }
1745    /// ```
1746    #[derive(Clone, Debug)]
1747    pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
1748
1749    impl DeleteCluster {
1750        pub(crate) fn new(
1751            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1752        ) -> Self {
1753            Self(RequestBuilder::new(stub))
1754        }
1755
1756        /// Sets the full request, replacing any prior values.
1757        pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
1758            self.0.request = v.into();
1759            self
1760        }
1761
1762        /// Sets all the options, replacing any prior values.
1763        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1764            self.0.options = v.into();
1765            self
1766        }
1767
1768        /// Sends the request.
1769        pub async fn send(self) -> Result<crate::model::Operation> {
1770            (*self.0.stub)
1771                .delete_cluster(self.0.request, self.0.options)
1772                .await
1773                .map(crate::Response::into_body)
1774        }
1775
1776        /// Sets the value of [project_id][crate::model::DeleteClusterRequest::project_id].
1777        #[deprecated]
1778        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1779            self.0.request.project_id = v.into();
1780            self
1781        }
1782
1783        /// Sets the value of [zone][crate::model::DeleteClusterRequest::zone].
1784        #[deprecated]
1785        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1786            self.0.request.zone = v.into();
1787            self
1788        }
1789
1790        /// Sets the value of [cluster_id][crate::model::DeleteClusterRequest::cluster_id].
1791        #[deprecated]
1792        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1793            self.0.request.cluster_id = v.into();
1794            self
1795        }
1796
1797        /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
1798        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1799            self.0.request.name = v.into();
1800            self
1801        }
1802    }
1803
1804    #[doc(hidden)]
1805    impl crate::RequestBuilder for DeleteCluster {
1806        fn request_options(&mut self) -> &mut crate::RequestOptions {
1807            &mut self.0.options
1808        }
1809    }
1810
1811    /// The request builder for [ClusterManager::list_operations][crate::client::ClusterManager::list_operations] calls.
1812    ///
1813    /// # Example
1814    /// ```
1815    /// # use google_cloud_container_v1::builder::cluster_manager::ListOperations;
1816    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1817    ///
1818    /// let builder = prepare_request_builder();
1819    /// let response = builder.send().await?;
1820    /// # Ok(()) }
1821    ///
1822    /// fn prepare_request_builder() -> ListOperations {
1823    ///   # panic!();
1824    ///   // ... details omitted ...
1825    /// }
1826    /// ```
1827    #[derive(Clone, Debug)]
1828    pub struct ListOperations(RequestBuilder<crate::model::ListOperationsRequest>);
1829
1830    impl ListOperations {
1831        pub(crate) fn new(
1832            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1833        ) -> Self {
1834            Self(RequestBuilder::new(stub))
1835        }
1836
1837        /// Sets the full request, replacing any prior values.
1838        pub fn with_request<V: Into<crate::model::ListOperationsRequest>>(mut self, v: V) -> Self {
1839            self.0.request = v.into();
1840            self
1841        }
1842
1843        /// Sets all the options, replacing any prior values.
1844        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1845            self.0.options = v.into();
1846            self
1847        }
1848
1849        /// Sends the request.
1850        pub async fn send(self) -> Result<crate::model::ListOperationsResponse> {
1851            (*self.0.stub)
1852                .list_operations(self.0.request, self.0.options)
1853                .await
1854                .map(crate::Response::into_body)
1855        }
1856
1857        /// Sets the value of [project_id][crate::model::ListOperationsRequest::project_id].
1858        #[deprecated]
1859        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1860            self.0.request.project_id = v.into();
1861            self
1862        }
1863
1864        /// Sets the value of [zone][crate::model::ListOperationsRequest::zone].
1865        #[deprecated]
1866        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1867            self.0.request.zone = v.into();
1868            self
1869        }
1870
1871        /// Sets the value of [parent][crate::model::ListOperationsRequest::parent].
1872        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1873            self.0.request.parent = v.into();
1874            self
1875        }
1876    }
1877
1878    #[doc(hidden)]
1879    impl crate::RequestBuilder for ListOperations {
1880        fn request_options(&mut self) -> &mut crate::RequestOptions {
1881            &mut self.0.options
1882        }
1883    }
1884
1885    /// The request builder for [ClusterManager::get_operation][crate::client::ClusterManager::get_operation] calls.
1886    ///
1887    /// # Example
1888    /// ```
1889    /// # use google_cloud_container_v1::builder::cluster_manager::GetOperation;
1890    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1891    ///
1892    /// let builder = prepare_request_builder();
1893    /// let response = builder.send().await?;
1894    /// # Ok(()) }
1895    ///
1896    /// fn prepare_request_builder() -> GetOperation {
1897    ///   # panic!();
1898    ///   // ... details omitted ...
1899    /// }
1900    /// ```
1901    #[derive(Clone, Debug)]
1902    pub struct GetOperation(RequestBuilder<crate::model::GetOperationRequest>);
1903
1904    impl GetOperation {
1905        pub(crate) fn new(
1906            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1907        ) -> Self {
1908            Self(RequestBuilder::new(stub))
1909        }
1910
1911        /// Sets the full request, replacing any prior values.
1912        pub fn with_request<V: Into<crate::model::GetOperationRequest>>(mut self, v: V) -> Self {
1913            self.0.request = v.into();
1914            self
1915        }
1916
1917        /// Sets all the options, replacing any prior values.
1918        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1919            self.0.options = v.into();
1920            self
1921        }
1922
1923        /// Sends the request.
1924        pub async fn send(self) -> Result<crate::model::Operation> {
1925            (*self.0.stub)
1926                .get_operation(self.0.request, self.0.options)
1927                .await
1928                .map(crate::Response::into_body)
1929        }
1930
1931        /// Sets the value of [project_id][crate::model::GetOperationRequest::project_id].
1932        #[deprecated]
1933        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1934            self.0.request.project_id = v.into();
1935            self
1936        }
1937
1938        /// Sets the value of [zone][crate::model::GetOperationRequest::zone].
1939        #[deprecated]
1940        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1941            self.0.request.zone = v.into();
1942            self
1943        }
1944
1945        /// Sets the value of [operation_id][crate::model::GetOperationRequest::operation_id].
1946        #[deprecated]
1947        pub fn set_operation_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1948            self.0.request.operation_id = v.into();
1949            self
1950        }
1951
1952        /// Sets the value of [name][crate::model::GetOperationRequest::name].
1953        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1954            self.0.request.name = v.into();
1955            self
1956        }
1957    }
1958
1959    #[doc(hidden)]
1960    impl crate::RequestBuilder for GetOperation {
1961        fn request_options(&mut self) -> &mut crate::RequestOptions {
1962            &mut self.0.options
1963        }
1964    }
1965
1966    /// The request builder for [ClusterManager::cancel_operation][crate::client::ClusterManager::cancel_operation] calls.
1967    ///
1968    /// # Example
1969    /// ```
1970    /// # use google_cloud_container_v1::builder::cluster_manager::CancelOperation;
1971    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
1972    ///
1973    /// let builder = prepare_request_builder();
1974    /// let response = builder.send().await?;
1975    /// # Ok(()) }
1976    ///
1977    /// fn prepare_request_builder() -> CancelOperation {
1978    ///   # panic!();
1979    ///   // ... details omitted ...
1980    /// }
1981    /// ```
1982    #[derive(Clone, Debug)]
1983    pub struct CancelOperation(RequestBuilder<crate::model::CancelOperationRequest>);
1984
1985    impl CancelOperation {
1986        pub(crate) fn new(
1987            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1988        ) -> Self {
1989            Self(RequestBuilder::new(stub))
1990        }
1991
1992        /// Sets the full request, replacing any prior values.
1993        pub fn with_request<V: Into<crate::model::CancelOperationRequest>>(mut self, v: V) -> Self {
1994            self.0.request = v.into();
1995            self
1996        }
1997
1998        /// Sets all the options, replacing any prior values.
1999        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2000            self.0.options = v.into();
2001            self
2002        }
2003
2004        /// Sends the request.
2005        pub async fn send(self) -> Result<()> {
2006            (*self.0.stub)
2007                .cancel_operation(self.0.request, self.0.options)
2008                .await
2009                .map(crate::Response::into_body)
2010        }
2011
2012        /// Sets the value of [project_id][crate::model::CancelOperationRequest::project_id].
2013        #[deprecated]
2014        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2015            self.0.request.project_id = v.into();
2016            self
2017        }
2018
2019        /// Sets the value of [zone][crate::model::CancelOperationRequest::zone].
2020        #[deprecated]
2021        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2022            self.0.request.zone = v.into();
2023            self
2024        }
2025
2026        /// Sets the value of [operation_id][crate::model::CancelOperationRequest::operation_id].
2027        #[deprecated]
2028        pub fn set_operation_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2029            self.0.request.operation_id = v.into();
2030            self
2031        }
2032
2033        /// Sets the value of [name][crate::model::CancelOperationRequest::name].
2034        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2035            self.0.request.name = v.into();
2036            self
2037        }
2038    }
2039
2040    #[doc(hidden)]
2041    impl crate::RequestBuilder for CancelOperation {
2042        fn request_options(&mut self) -> &mut crate::RequestOptions {
2043            &mut self.0.options
2044        }
2045    }
2046
2047    /// The request builder for [ClusterManager::get_server_config][crate::client::ClusterManager::get_server_config] calls.
2048    ///
2049    /// # Example
2050    /// ```
2051    /// # use google_cloud_container_v1::builder::cluster_manager::GetServerConfig;
2052    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2053    ///
2054    /// let builder = prepare_request_builder();
2055    /// let response = builder.send().await?;
2056    /// # Ok(()) }
2057    ///
2058    /// fn prepare_request_builder() -> GetServerConfig {
2059    ///   # panic!();
2060    ///   // ... details omitted ...
2061    /// }
2062    /// ```
2063    #[derive(Clone, Debug)]
2064    pub struct GetServerConfig(RequestBuilder<crate::model::GetServerConfigRequest>);
2065
2066    impl GetServerConfig {
2067        pub(crate) fn new(
2068            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2069        ) -> Self {
2070            Self(RequestBuilder::new(stub))
2071        }
2072
2073        /// Sets the full request, replacing any prior values.
2074        pub fn with_request<V: Into<crate::model::GetServerConfigRequest>>(mut self, v: V) -> Self {
2075            self.0.request = v.into();
2076            self
2077        }
2078
2079        /// Sets all the options, replacing any prior values.
2080        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2081            self.0.options = v.into();
2082            self
2083        }
2084
2085        /// Sends the request.
2086        pub async fn send(self) -> Result<crate::model::ServerConfig> {
2087            (*self.0.stub)
2088                .get_server_config(self.0.request, self.0.options)
2089                .await
2090                .map(crate::Response::into_body)
2091        }
2092
2093        /// Sets the value of [project_id][crate::model::GetServerConfigRequest::project_id].
2094        #[deprecated]
2095        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2096            self.0.request.project_id = v.into();
2097            self
2098        }
2099
2100        /// Sets the value of [zone][crate::model::GetServerConfigRequest::zone].
2101        #[deprecated]
2102        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2103            self.0.request.zone = v.into();
2104            self
2105        }
2106
2107        /// Sets the value of [name][crate::model::GetServerConfigRequest::name].
2108        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2109            self.0.request.name = v.into();
2110            self
2111        }
2112    }
2113
2114    #[doc(hidden)]
2115    impl crate::RequestBuilder for GetServerConfig {
2116        fn request_options(&mut self) -> &mut crate::RequestOptions {
2117            &mut self.0.options
2118        }
2119    }
2120
2121    /// The request builder for [ClusterManager::get_json_web_keys][crate::client::ClusterManager::get_json_web_keys] calls.
2122    ///
2123    /// # Example
2124    /// ```
2125    /// # use google_cloud_container_v1::builder::cluster_manager::GetJSONWebKeys;
2126    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2127    ///
2128    /// let builder = prepare_request_builder();
2129    /// let response = builder.send().await?;
2130    /// # Ok(()) }
2131    ///
2132    /// fn prepare_request_builder() -> GetJSONWebKeys {
2133    ///   # panic!();
2134    ///   // ... details omitted ...
2135    /// }
2136    /// ```
2137    #[derive(Clone, Debug)]
2138    pub struct GetJSONWebKeys(RequestBuilder<crate::model::GetJSONWebKeysRequest>);
2139
2140    impl GetJSONWebKeys {
2141        pub(crate) fn new(
2142            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2143        ) -> Self {
2144            Self(RequestBuilder::new(stub))
2145        }
2146
2147        /// Sets the full request, replacing any prior values.
2148        pub fn with_request<V: Into<crate::model::GetJSONWebKeysRequest>>(mut self, v: V) -> Self {
2149            self.0.request = v.into();
2150            self
2151        }
2152
2153        /// Sets all the options, replacing any prior values.
2154        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2155            self.0.options = v.into();
2156            self
2157        }
2158
2159        /// Sends the request.
2160        pub async fn send(self) -> Result<crate::model::GetJSONWebKeysResponse> {
2161            (*self.0.stub)
2162                .get_json_web_keys(self.0.request, self.0.options)
2163                .await
2164                .map(crate::Response::into_body)
2165        }
2166
2167        /// Sets the value of [parent][crate::model::GetJSONWebKeysRequest::parent].
2168        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2169            self.0.request.parent = v.into();
2170            self
2171        }
2172    }
2173
2174    #[doc(hidden)]
2175    impl crate::RequestBuilder for GetJSONWebKeys {
2176        fn request_options(&mut self) -> &mut crate::RequestOptions {
2177            &mut self.0.options
2178        }
2179    }
2180
2181    /// The request builder for [ClusterManager::list_node_pools][crate::client::ClusterManager::list_node_pools] calls.
2182    ///
2183    /// # Example
2184    /// ```
2185    /// # use google_cloud_container_v1::builder::cluster_manager::ListNodePools;
2186    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2187    ///
2188    /// let builder = prepare_request_builder();
2189    /// let response = builder.send().await?;
2190    /// # Ok(()) }
2191    ///
2192    /// fn prepare_request_builder() -> ListNodePools {
2193    ///   # panic!();
2194    ///   // ... details omitted ...
2195    /// }
2196    /// ```
2197    #[derive(Clone, Debug)]
2198    pub struct ListNodePools(RequestBuilder<crate::model::ListNodePoolsRequest>);
2199
2200    impl ListNodePools {
2201        pub(crate) fn new(
2202            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2203        ) -> Self {
2204            Self(RequestBuilder::new(stub))
2205        }
2206
2207        /// Sets the full request, replacing any prior values.
2208        pub fn with_request<V: Into<crate::model::ListNodePoolsRequest>>(mut self, v: V) -> Self {
2209            self.0.request = v.into();
2210            self
2211        }
2212
2213        /// Sets all the options, replacing any prior values.
2214        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2215            self.0.options = v.into();
2216            self
2217        }
2218
2219        /// Sends the request.
2220        pub async fn send(self) -> Result<crate::model::ListNodePoolsResponse> {
2221            (*self.0.stub)
2222                .list_node_pools(self.0.request, self.0.options)
2223                .await
2224                .map(crate::Response::into_body)
2225        }
2226
2227        /// Sets the value of [project_id][crate::model::ListNodePoolsRequest::project_id].
2228        #[deprecated]
2229        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2230            self.0.request.project_id = v.into();
2231            self
2232        }
2233
2234        /// Sets the value of [zone][crate::model::ListNodePoolsRequest::zone].
2235        #[deprecated]
2236        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2237            self.0.request.zone = v.into();
2238            self
2239        }
2240
2241        /// Sets the value of [cluster_id][crate::model::ListNodePoolsRequest::cluster_id].
2242        #[deprecated]
2243        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2244            self.0.request.cluster_id = v.into();
2245            self
2246        }
2247
2248        /// Sets the value of [parent][crate::model::ListNodePoolsRequest::parent].
2249        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2250            self.0.request.parent = v.into();
2251            self
2252        }
2253    }
2254
2255    #[doc(hidden)]
2256    impl crate::RequestBuilder for ListNodePools {
2257        fn request_options(&mut self) -> &mut crate::RequestOptions {
2258            &mut self.0.options
2259        }
2260    }
2261
2262    /// The request builder for [ClusterManager::get_node_pool][crate::client::ClusterManager::get_node_pool] calls.
2263    ///
2264    /// # Example
2265    /// ```
2266    /// # use google_cloud_container_v1::builder::cluster_manager::GetNodePool;
2267    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2268    ///
2269    /// let builder = prepare_request_builder();
2270    /// let response = builder.send().await?;
2271    /// # Ok(()) }
2272    ///
2273    /// fn prepare_request_builder() -> GetNodePool {
2274    ///   # panic!();
2275    ///   // ... details omitted ...
2276    /// }
2277    /// ```
2278    #[derive(Clone, Debug)]
2279    pub struct GetNodePool(RequestBuilder<crate::model::GetNodePoolRequest>);
2280
2281    impl GetNodePool {
2282        pub(crate) fn new(
2283            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2284        ) -> Self {
2285            Self(RequestBuilder::new(stub))
2286        }
2287
2288        /// Sets the full request, replacing any prior values.
2289        pub fn with_request<V: Into<crate::model::GetNodePoolRequest>>(mut self, v: V) -> Self {
2290            self.0.request = v.into();
2291            self
2292        }
2293
2294        /// Sets all the options, replacing any prior values.
2295        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2296            self.0.options = v.into();
2297            self
2298        }
2299
2300        /// Sends the request.
2301        pub async fn send(self) -> Result<crate::model::NodePool> {
2302            (*self.0.stub)
2303                .get_node_pool(self.0.request, self.0.options)
2304                .await
2305                .map(crate::Response::into_body)
2306        }
2307
2308        /// Sets the value of [project_id][crate::model::GetNodePoolRequest::project_id].
2309        #[deprecated]
2310        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2311            self.0.request.project_id = v.into();
2312            self
2313        }
2314
2315        /// Sets the value of [zone][crate::model::GetNodePoolRequest::zone].
2316        #[deprecated]
2317        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2318            self.0.request.zone = v.into();
2319            self
2320        }
2321
2322        /// Sets the value of [cluster_id][crate::model::GetNodePoolRequest::cluster_id].
2323        #[deprecated]
2324        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2325            self.0.request.cluster_id = v.into();
2326            self
2327        }
2328
2329        /// Sets the value of [node_pool_id][crate::model::GetNodePoolRequest::node_pool_id].
2330        #[deprecated]
2331        pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2332            self.0.request.node_pool_id = v.into();
2333            self
2334        }
2335
2336        /// Sets the value of [name][crate::model::GetNodePoolRequest::name].
2337        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2338            self.0.request.name = v.into();
2339            self
2340        }
2341    }
2342
2343    #[doc(hidden)]
2344    impl crate::RequestBuilder for GetNodePool {
2345        fn request_options(&mut self) -> &mut crate::RequestOptions {
2346            &mut self.0.options
2347        }
2348    }
2349
2350    /// The request builder for [ClusterManager::create_node_pool][crate::client::ClusterManager::create_node_pool] calls.
2351    ///
2352    /// # Example
2353    /// ```
2354    /// # use google_cloud_container_v1::builder::cluster_manager::CreateNodePool;
2355    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2356    ///
2357    /// let builder = prepare_request_builder();
2358    /// let response = builder.send().await?;
2359    /// # Ok(()) }
2360    ///
2361    /// fn prepare_request_builder() -> CreateNodePool {
2362    ///   # panic!();
2363    ///   // ... details omitted ...
2364    /// }
2365    /// ```
2366    #[derive(Clone, Debug)]
2367    pub struct CreateNodePool(RequestBuilder<crate::model::CreateNodePoolRequest>);
2368
2369    impl CreateNodePool {
2370        pub(crate) fn new(
2371            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2372        ) -> Self {
2373            Self(RequestBuilder::new(stub))
2374        }
2375
2376        /// Sets the full request, replacing any prior values.
2377        pub fn with_request<V: Into<crate::model::CreateNodePoolRequest>>(mut self, v: V) -> Self {
2378            self.0.request = v.into();
2379            self
2380        }
2381
2382        /// Sets all the options, replacing any prior values.
2383        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2384            self.0.options = v.into();
2385            self
2386        }
2387
2388        /// Sends the request.
2389        pub async fn send(self) -> Result<crate::model::Operation> {
2390            (*self.0.stub)
2391                .create_node_pool(self.0.request, self.0.options)
2392                .await
2393                .map(crate::Response::into_body)
2394        }
2395
2396        /// Sets the value of [project_id][crate::model::CreateNodePoolRequest::project_id].
2397        #[deprecated]
2398        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2399            self.0.request.project_id = v.into();
2400            self
2401        }
2402
2403        /// Sets the value of [zone][crate::model::CreateNodePoolRequest::zone].
2404        #[deprecated]
2405        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2406            self.0.request.zone = v.into();
2407            self
2408        }
2409
2410        /// Sets the value of [cluster_id][crate::model::CreateNodePoolRequest::cluster_id].
2411        #[deprecated]
2412        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2413            self.0.request.cluster_id = v.into();
2414            self
2415        }
2416
2417        /// Sets the value of [node_pool][crate::model::CreateNodePoolRequest::node_pool].
2418        ///
2419        /// This is a **required** field for requests.
2420        pub fn set_node_pool<T>(mut self, v: T) -> Self
2421        where
2422            T: std::convert::Into<crate::model::NodePool>,
2423        {
2424            self.0.request.node_pool = std::option::Option::Some(v.into());
2425            self
2426        }
2427
2428        /// Sets or clears the value of [node_pool][crate::model::CreateNodePoolRequest::node_pool].
2429        ///
2430        /// This is a **required** field for requests.
2431        pub fn set_or_clear_node_pool<T>(mut self, v: std::option::Option<T>) -> Self
2432        where
2433            T: std::convert::Into<crate::model::NodePool>,
2434        {
2435            self.0.request.node_pool = v.map(|x| x.into());
2436            self
2437        }
2438
2439        /// Sets the value of [parent][crate::model::CreateNodePoolRequest::parent].
2440        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2441            self.0.request.parent = v.into();
2442            self
2443        }
2444    }
2445
2446    #[doc(hidden)]
2447    impl crate::RequestBuilder for CreateNodePool {
2448        fn request_options(&mut self) -> &mut crate::RequestOptions {
2449            &mut self.0.options
2450        }
2451    }
2452
2453    /// The request builder for [ClusterManager::delete_node_pool][crate::client::ClusterManager::delete_node_pool] calls.
2454    ///
2455    /// # Example
2456    /// ```
2457    /// # use google_cloud_container_v1::builder::cluster_manager::DeleteNodePool;
2458    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2459    ///
2460    /// let builder = prepare_request_builder();
2461    /// let response = builder.send().await?;
2462    /// # Ok(()) }
2463    ///
2464    /// fn prepare_request_builder() -> DeleteNodePool {
2465    ///   # panic!();
2466    ///   // ... details omitted ...
2467    /// }
2468    /// ```
2469    #[derive(Clone, Debug)]
2470    pub struct DeleteNodePool(RequestBuilder<crate::model::DeleteNodePoolRequest>);
2471
2472    impl DeleteNodePool {
2473        pub(crate) fn new(
2474            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2475        ) -> Self {
2476            Self(RequestBuilder::new(stub))
2477        }
2478
2479        /// Sets the full request, replacing any prior values.
2480        pub fn with_request<V: Into<crate::model::DeleteNodePoolRequest>>(mut self, v: V) -> Self {
2481            self.0.request = v.into();
2482            self
2483        }
2484
2485        /// Sets all the options, replacing any prior values.
2486        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2487            self.0.options = v.into();
2488            self
2489        }
2490
2491        /// Sends the request.
2492        pub async fn send(self) -> Result<crate::model::Operation> {
2493            (*self.0.stub)
2494                .delete_node_pool(self.0.request, self.0.options)
2495                .await
2496                .map(crate::Response::into_body)
2497        }
2498
2499        /// Sets the value of [project_id][crate::model::DeleteNodePoolRequest::project_id].
2500        #[deprecated]
2501        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2502            self.0.request.project_id = v.into();
2503            self
2504        }
2505
2506        /// Sets the value of [zone][crate::model::DeleteNodePoolRequest::zone].
2507        #[deprecated]
2508        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2509            self.0.request.zone = v.into();
2510            self
2511        }
2512
2513        /// Sets the value of [cluster_id][crate::model::DeleteNodePoolRequest::cluster_id].
2514        #[deprecated]
2515        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2516            self.0.request.cluster_id = v.into();
2517            self
2518        }
2519
2520        /// Sets the value of [node_pool_id][crate::model::DeleteNodePoolRequest::node_pool_id].
2521        #[deprecated]
2522        pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2523            self.0.request.node_pool_id = v.into();
2524            self
2525        }
2526
2527        /// Sets the value of [name][crate::model::DeleteNodePoolRequest::name].
2528        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2529            self.0.request.name = v.into();
2530            self
2531        }
2532    }
2533
2534    #[doc(hidden)]
2535    impl crate::RequestBuilder for DeleteNodePool {
2536        fn request_options(&mut self) -> &mut crate::RequestOptions {
2537            &mut self.0.options
2538        }
2539    }
2540
2541    /// The request builder for [ClusterManager::complete_node_pool_upgrade][crate::client::ClusterManager::complete_node_pool_upgrade] calls.
2542    ///
2543    /// # Example
2544    /// ```
2545    /// # use google_cloud_container_v1::builder::cluster_manager::CompleteNodePoolUpgrade;
2546    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2547    ///
2548    /// let builder = prepare_request_builder();
2549    /// let response = builder.send().await?;
2550    /// # Ok(()) }
2551    ///
2552    /// fn prepare_request_builder() -> CompleteNodePoolUpgrade {
2553    ///   # panic!();
2554    ///   // ... details omitted ...
2555    /// }
2556    /// ```
2557    #[derive(Clone, Debug)]
2558    pub struct CompleteNodePoolUpgrade(
2559        RequestBuilder<crate::model::CompleteNodePoolUpgradeRequest>,
2560    );
2561
2562    impl CompleteNodePoolUpgrade {
2563        pub(crate) fn new(
2564            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2565        ) -> Self {
2566            Self(RequestBuilder::new(stub))
2567        }
2568
2569        /// Sets the full request, replacing any prior values.
2570        pub fn with_request<V: Into<crate::model::CompleteNodePoolUpgradeRequest>>(
2571            mut self,
2572            v: V,
2573        ) -> Self {
2574            self.0.request = v.into();
2575            self
2576        }
2577
2578        /// Sets all the options, replacing any prior values.
2579        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2580            self.0.options = v.into();
2581            self
2582        }
2583
2584        /// Sends the request.
2585        pub async fn send(self) -> Result<()> {
2586            (*self.0.stub)
2587                .complete_node_pool_upgrade(self.0.request, self.0.options)
2588                .await
2589                .map(crate::Response::into_body)
2590        }
2591
2592        /// Sets the value of [name][crate::model::CompleteNodePoolUpgradeRequest::name].
2593        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2594            self.0.request.name = v.into();
2595            self
2596        }
2597    }
2598
2599    #[doc(hidden)]
2600    impl crate::RequestBuilder for CompleteNodePoolUpgrade {
2601        fn request_options(&mut self) -> &mut crate::RequestOptions {
2602            &mut self.0.options
2603        }
2604    }
2605
2606    /// The request builder for [ClusterManager::rollback_node_pool_upgrade][crate::client::ClusterManager::rollback_node_pool_upgrade] calls.
2607    ///
2608    /// # Example
2609    /// ```
2610    /// # use google_cloud_container_v1::builder::cluster_manager::RollbackNodePoolUpgrade;
2611    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2612    ///
2613    /// let builder = prepare_request_builder();
2614    /// let response = builder.send().await?;
2615    /// # Ok(()) }
2616    ///
2617    /// fn prepare_request_builder() -> RollbackNodePoolUpgrade {
2618    ///   # panic!();
2619    ///   // ... details omitted ...
2620    /// }
2621    /// ```
2622    #[derive(Clone, Debug)]
2623    pub struct RollbackNodePoolUpgrade(
2624        RequestBuilder<crate::model::RollbackNodePoolUpgradeRequest>,
2625    );
2626
2627    impl RollbackNodePoolUpgrade {
2628        pub(crate) fn new(
2629            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2630        ) -> Self {
2631            Self(RequestBuilder::new(stub))
2632        }
2633
2634        /// Sets the full request, replacing any prior values.
2635        pub fn with_request<V: Into<crate::model::RollbackNodePoolUpgradeRequest>>(
2636            mut self,
2637            v: V,
2638        ) -> Self {
2639            self.0.request = v.into();
2640            self
2641        }
2642
2643        /// Sets all the options, replacing any prior values.
2644        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2645            self.0.options = v.into();
2646            self
2647        }
2648
2649        /// Sends the request.
2650        pub async fn send(self) -> Result<crate::model::Operation> {
2651            (*self.0.stub)
2652                .rollback_node_pool_upgrade(self.0.request, self.0.options)
2653                .await
2654                .map(crate::Response::into_body)
2655        }
2656
2657        /// Sets the value of [project_id][crate::model::RollbackNodePoolUpgradeRequest::project_id].
2658        #[deprecated]
2659        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2660            self.0.request.project_id = v.into();
2661            self
2662        }
2663
2664        /// Sets the value of [zone][crate::model::RollbackNodePoolUpgradeRequest::zone].
2665        #[deprecated]
2666        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2667            self.0.request.zone = v.into();
2668            self
2669        }
2670
2671        /// Sets the value of [cluster_id][crate::model::RollbackNodePoolUpgradeRequest::cluster_id].
2672        #[deprecated]
2673        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2674            self.0.request.cluster_id = v.into();
2675            self
2676        }
2677
2678        /// Sets the value of [node_pool_id][crate::model::RollbackNodePoolUpgradeRequest::node_pool_id].
2679        #[deprecated]
2680        pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2681            self.0.request.node_pool_id = v.into();
2682            self
2683        }
2684
2685        /// Sets the value of [name][crate::model::RollbackNodePoolUpgradeRequest::name].
2686        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2687            self.0.request.name = v.into();
2688            self
2689        }
2690
2691        /// Sets the value of [respect_pdb][crate::model::RollbackNodePoolUpgradeRequest::respect_pdb].
2692        pub fn set_respect_pdb<T: Into<bool>>(mut self, v: T) -> Self {
2693            self.0.request.respect_pdb = v.into();
2694            self
2695        }
2696    }
2697
2698    #[doc(hidden)]
2699    impl crate::RequestBuilder for RollbackNodePoolUpgrade {
2700        fn request_options(&mut self) -> &mut crate::RequestOptions {
2701            &mut self.0.options
2702        }
2703    }
2704
2705    /// The request builder for [ClusterManager::set_node_pool_management][crate::client::ClusterManager::set_node_pool_management] calls.
2706    ///
2707    /// # Example
2708    /// ```
2709    /// # use google_cloud_container_v1::builder::cluster_manager::SetNodePoolManagement;
2710    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2711    ///
2712    /// let builder = prepare_request_builder();
2713    /// let response = builder.send().await?;
2714    /// # Ok(()) }
2715    ///
2716    /// fn prepare_request_builder() -> SetNodePoolManagement {
2717    ///   # panic!();
2718    ///   // ... details omitted ...
2719    /// }
2720    /// ```
2721    #[derive(Clone, Debug)]
2722    pub struct SetNodePoolManagement(RequestBuilder<crate::model::SetNodePoolManagementRequest>);
2723
2724    impl SetNodePoolManagement {
2725        pub(crate) fn new(
2726            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2727        ) -> Self {
2728            Self(RequestBuilder::new(stub))
2729        }
2730
2731        /// Sets the full request, replacing any prior values.
2732        pub fn with_request<V: Into<crate::model::SetNodePoolManagementRequest>>(
2733            mut self,
2734            v: V,
2735        ) -> Self {
2736            self.0.request = v.into();
2737            self
2738        }
2739
2740        /// Sets all the options, replacing any prior values.
2741        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2742            self.0.options = v.into();
2743            self
2744        }
2745
2746        /// Sends the request.
2747        pub async fn send(self) -> Result<crate::model::Operation> {
2748            (*self.0.stub)
2749                .set_node_pool_management(self.0.request, self.0.options)
2750                .await
2751                .map(crate::Response::into_body)
2752        }
2753
2754        /// Sets the value of [project_id][crate::model::SetNodePoolManagementRequest::project_id].
2755        #[deprecated]
2756        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2757            self.0.request.project_id = v.into();
2758            self
2759        }
2760
2761        /// Sets the value of [zone][crate::model::SetNodePoolManagementRequest::zone].
2762        #[deprecated]
2763        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2764            self.0.request.zone = v.into();
2765            self
2766        }
2767
2768        /// Sets the value of [cluster_id][crate::model::SetNodePoolManagementRequest::cluster_id].
2769        #[deprecated]
2770        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2771            self.0.request.cluster_id = v.into();
2772            self
2773        }
2774
2775        /// Sets the value of [node_pool_id][crate::model::SetNodePoolManagementRequest::node_pool_id].
2776        #[deprecated]
2777        pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2778            self.0.request.node_pool_id = v.into();
2779            self
2780        }
2781
2782        /// Sets the value of [management][crate::model::SetNodePoolManagementRequest::management].
2783        ///
2784        /// This is a **required** field for requests.
2785        pub fn set_management<T>(mut self, v: T) -> Self
2786        where
2787            T: std::convert::Into<crate::model::NodeManagement>,
2788        {
2789            self.0.request.management = std::option::Option::Some(v.into());
2790            self
2791        }
2792
2793        /// Sets or clears the value of [management][crate::model::SetNodePoolManagementRequest::management].
2794        ///
2795        /// This is a **required** field for requests.
2796        pub fn set_or_clear_management<T>(mut self, v: std::option::Option<T>) -> Self
2797        where
2798            T: std::convert::Into<crate::model::NodeManagement>,
2799        {
2800            self.0.request.management = v.map(|x| x.into());
2801            self
2802        }
2803
2804        /// Sets the value of [name][crate::model::SetNodePoolManagementRequest::name].
2805        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2806            self.0.request.name = v.into();
2807            self
2808        }
2809    }
2810
2811    #[doc(hidden)]
2812    impl crate::RequestBuilder for SetNodePoolManagement {
2813        fn request_options(&mut self) -> &mut crate::RequestOptions {
2814            &mut self.0.options
2815        }
2816    }
2817
2818    /// The request builder for [ClusterManager::set_labels][crate::client::ClusterManager::set_labels] calls.
2819    ///
2820    /// # Example
2821    /// ```
2822    /// # use google_cloud_container_v1::builder::cluster_manager::SetLabels;
2823    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2824    ///
2825    /// let builder = prepare_request_builder();
2826    /// let response = builder.send().await?;
2827    /// # Ok(()) }
2828    ///
2829    /// fn prepare_request_builder() -> SetLabels {
2830    ///   # panic!();
2831    ///   // ... details omitted ...
2832    /// }
2833    /// ```
2834    #[derive(Clone, Debug)]
2835    pub struct SetLabels(RequestBuilder<crate::model::SetLabelsRequest>);
2836
2837    impl SetLabels {
2838        pub(crate) fn new(
2839            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2840        ) -> Self {
2841            Self(RequestBuilder::new(stub))
2842        }
2843
2844        /// Sets the full request, replacing any prior values.
2845        pub fn with_request<V: Into<crate::model::SetLabelsRequest>>(mut self, v: V) -> Self {
2846            self.0.request = v.into();
2847            self
2848        }
2849
2850        /// Sets all the options, replacing any prior values.
2851        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2852            self.0.options = v.into();
2853            self
2854        }
2855
2856        /// Sends the request.
2857        pub async fn send(self) -> Result<crate::model::Operation> {
2858            (*self.0.stub)
2859                .set_labels(self.0.request, self.0.options)
2860                .await
2861                .map(crate::Response::into_body)
2862        }
2863
2864        /// Sets the value of [project_id][crate::model::SetLabelsRequest::project_id].
2865        #[deprecated]
2866        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2867            self.0.request.project_id = v.into();
2868            self
2869        }
2870
2871        /// Sets the value of [zone][crate::model::SetLabelsRequest::zone].
2872        #[deprecated]
2873        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2874            self.0.request.zone = v.into();
2875            self
2876        }
2877
2878        /// Sets the value of [cluster_id][crate::model::SetLabelsRequest::cluster_id].
2879        #[deprecated]
2880        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2881            self.0.request.cluster_id = v.into();
2882            self
2883        }
2884
2885        /// Sets the value of [resource_labels][crate::model::SetLabelsRequest::resource_labels].
2886        ///
2887        /// This is a **required** field for requests.
2888        pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
2889        where
2890            T: std::iter::IntoIterator<Item = (K, V)>,
2891            K: std::convert::Into<std::string::String>,
2892            V: std::convert::Into<std::string::String>,
2893        {
2894            self.0.request.resource_labels =
2895                v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2896            self
2897        }
2898
2899        /// Sets the value of [label_fingerprint][crate::model::SetLabelsRequest::label_fingerprint].
2900        ///
2901        /// This is a **required** field for requests.
2902        pub fn set_label_fingerprint<T: Into<std::string::String>>(mut self, v: T) -> Self {
2903            self.0.request.label_fingerprint = v.into();
2904            self
2905        }
2906
2907        /// Sets the value of [name][crate::model::SetLabelsRequest::name].
2908        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2909            self.0.request.name = v.into();
2910            self
2911        }
2912    }
2913
2914    #[doc(hidden)]
2915    impl crate::RequestBuilder for SetLabels {
2916        fn request_options(&mut self) -> &mut crate::RequestOptions {
2917            &mut self.0.options
2918        }
2919    }
2920
2921    /// The request builder for [ClusterManager::set_legacy_abac][crate::client::ClusterManager::set_legacy_abac] calls.
2922    ///
2923    /// # Example
2924    /// ```
2925    /// # use google_cloud_container_v1::builder::cluster_manager::SetLegacyAbac;
2926    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
2927    ///
2928    /// let builder = prepare_request_builder();
2929    /// let response = builder.send().await?;
2930    /// # Ok(()) }
2931    ///
2932    /// fn prepare_request_builder() -> SetLegacyAbac {
2933    ///   # panic!();
2934    ///   // ... details omitted ...
2935    /// }
2936    /// ```
2937    #[derive(Clone, Debug)]
2938    pub struct SetLegacyAbac(RequestBuilder<crate::model::SetLegacyAbacRequest>);
2939
2940    impl SetLegacyAbac {
2941        pub(crate) fn new(
2942            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2943        ) -> Self {
2944            Self(RequestBuilder::new(stub))
2945        }
2946
2947        /// Sets the full request, replacing any prior values.
2948        pub fn with_request<V: Into<crate::model::SetLegacyAbacRequest>>(mut self, v: V) -> Self {
2949            self.0.request = v.into();
2950            self
2951        }
2952
2953        /// Sets all the options, replacing any prior values.
2954        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2955            self.0.options = v.into();
2956            self
2957        }
2958
2959        /// Sends the request.
2960        pub async fn send(self) -> Result<crate::model::Operation> {
2961            (*self.0.stub)
2962                .set_legacy_abac(self.0.request, self.0.options)
2963                .await
2964                .map(crate::Response::into_body)
2965        }
2966
2967        /// Sets the value of [project_id][crate::model::SetLegacyAbacRequest::project_id].
2968        #[deprecated]
2969        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2970            self.0.request.project_id = v.into();
2971            self
2972        }
2973
2974        /// Sets the value of [zone][crate::model::SetLegacyAbacRequest::zone].
2975        #[deprecated]
2976        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2977            self.0.request.zone = v.into();
2978            self
2979        }
2980
2981        /// Sets the value of [cluster_id][crate::model::SetLegacyAbacRequest::cluster_id].
2982        #[deprecated]
2983        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2984            self.0.request.cluster_id = v.into();
2985            self
2986        }
2987
2988        /// Sets the value of [enabled][crate::model::SetLegacyAbacRequest::enabled].
2989        ///
2990        /// This is a **required** field for requests.
2991        pub fn set_enabled<T: Into<bool>>(mut self, v: T) -> Self {
2992            self.0.request.enabled = v.into();
2993            self
2994        }
2995
2996        /// Sets the value of [name][crate::model::SetLegacyAbacRequest::name].
2997        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2998            self.0.request.name = v.into();
2999            self
3000        }
3001    }
3002
3003    #[doc(hidden)]
3004    impl crate::RequestBuilder for SetLegacyAbac {
3005        fn request_options(&mut self) -> &mut crate::RequestOptions {
3006            &mut self.0.options
3007        }
3008    }
3009
3010    /// The request builder for [ClusterManager::start_ip_rotation][crate::client::ClusterManager::start_ip_rotation] calls.
3011    ///
3012    /// # Example
3013    /// ```
3014    /// # use google_cloud_container_v1::builder::cluster_manager::StartIPRotation;
3015    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3016    ///
3017    /// let builder = prepare_request_builder();
3018    /// let response = builder.send().await?;
3019    /// # Ok(()) }
3020    ///
3021    /// fn prepare_request_builder() -> StartIPRotation {
3022    ///   # panic!();
3023    ///   // ... details omitted ...
3024    /// }
3025    /// ```
3026    #[derive(Clone, Debug)]
3027    pub struct StartIPRotation(RequestBuilder<crate::model::StartIPRotationRequest>);
3028
3029    impl StartIPRotation {
3030        pub(crate) fn new(
3031            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3032        ) -> Self {
3033            Self(RequestBuilder::new(stub))
3034        }
3035
3036        /// Sets the full request, replacing any prior values.
3037        pub fn with_request<V: Into<crate::model::StartIPRotationRequest>>(mut self, v: V) -> Self {
3038            self.0.request = v.into();
3039            self
3040        }
3041
3042        /// Sets all the options, replacing any prior values.
3043        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3044            self.0.options = v.into();
3045            self
3046        }
3047
3048        /// Sends the request.
3049        pub async fn send(self) -> Result<crate::model::Operation> {
3050            (*self.0.stub)
3051                .start_ip_rotation(self.0.request, self.0.options)
3052                .await
3053                .map(crate::Response::into_body)
3054        }
3055
3056        /// Sets the value of [project_id][crate::model::StartIPRotationRequest::project_id].
3057        #[deprecated]
3058        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3059            self.0.request.project_id = v.into();
3060            self
3061        }
3062
3063        /// Sets the value of [zone][crate::model::StartIPRotationRequest::zone].
3064        #[deprecated]
3065        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3066            self.0.request.zone = v.into();
3067            self
3068        }
3069
3070        /// Sets the value of [cluster_id][crate::model::StartIPRotationRequest::cluster_id].
3071        #[deprecated]
3072        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3073            self.0.request.cluster_id = v.into();
3074            self
3075        }
3076
3077        /// Sets the value of [name][crate::model::StartIPRotationRequest::name].
3078        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3079            self.0.request.name = v.into();
3080            self
3081        }
3082
3083        /// Sets the value of [rotate_credentials][crate::model::StartIPRotationRequest::rotate_credentials].
3084        pub fn set_rotate_credentials<T: Into<bool>>(mut self, v: T) -> Self {
3085            self.0.request.rotate_credentials = v.into();
3086            self
3087        }
3088    }
3089
3090    #[doc(hidden)]
3091    impl crate::RequestBuilder for StartIPRotation {
3092        fn request_options(&mut self) -> &mut crate::RequestOptions {
3093            &mut self.0.options
3094        }
3095    }
3096
3097    /// The request builder for [ClusterManager::complete_ip_rotation][crate::client::ClusterManager::complete_ip_rotation] calls.
3098    ///
3099    /// # Example
3100    /// ```
3101    /// # use google_cloud_container_v1::builder::cluster_manager::CompleteIPRotation;
3102    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3103    ///
3104    /// let builder = prepare_request_builder();
3105    /// let response = builder.send().await?;
3106    /// # Ok(()) }
3107    ///
3108    /// fn prepare_request_builder() -> CompleteIPRotation {
3109    ///   # panic!();
3110    ///   // ... details omitted ...
3111    /// }
3112    /// ```
3113    #[derive(Clone, Debug)]
3114    pub struct CompleteIPRotation(RequestBuilder<crate::model::CompleteIPRotationRequest>);
3115
3116    impl CompleteIPRotation {
3117        pub(crate) fn new(
3118            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3119        ) -> Self {
3120            Self(RequestBuilder::new(stub))
3121        }
3122
3123        /// Sets the full request, replacing any prior values.
3124        pub fn with_request<V: Into<crate::model::CompleteIPRotationRequest>>(
3125            mut self,
3126            v: V,
3127        ) -> Self {
3128            self.0.request = v.into();
3129            self
3130        }
3131
3132        /// Sets all the options, replacing any prior values.
3133        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3134            self.0.options = v.into();
3135            self
3136        }
3137
3138        /// Sends the request.
3139        pub async fn send(self) -> Result<crate::model::Operation> {
3140            (*self.0.stub)
3141                .complete_ip_rotation(self.0.request, self.0.options)
3142                .await
3143                .map(crate::Response::into_body)
3144        }
3145
3146        /// Sets the value of [project_id][crate::model::CompleteIPRotationRequest::project_id].
3147        #[deprecated]
3148        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3149            self.0.request.project_id = v.into();
3150            self
3151        }
3152
3153        /// Sets the value of [zone][crate::model::CompleteIPRotationRequest::zone].
3154        #[deprecated]
3155        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3156            self.0.request.zone = v.into();
3157            self
3158        }
3159
3160        /// Sets the value of [cluster_id][crate::model::CompleteIPRotationRequest::cluster_id].
3161        #[deprecated]
3162        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3163            self.0.request.cluster_id = v.into();
3164            self
3165        }
3166
3167        /// Sets the value of [name][crate::model::CompleteIPRotationRequest::name].
3168        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3169            self.0.request.name = v.into();
3170            self
3171        }
3172    }
3173
3174    #[doc(hidden)]
3175    impl crate::RequestBuilder for CompleteIPRotation {
3176        fn request_options(&mut self) -> &mut crate::RequestOptions {
3177            &mut self.0.options
3178        }
3179    }
3180
3181    /// The request builder for [ClusterManager::set_node_pool_size][crate::client::ClusterManager::set_node_pool_size] calls.
3182    ///
3183    /// # Example
3184    /// ```
3185    /// # use google_cloud_container_v1::builder::cluster_manager::SetNodePoolSize;
3186    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3187    ///
3188    /// let builder = prepare_request_builder();
3189    /// let response = builder.send().await?;
3190    /// # Ok(()) }
3191    ///
3192    /// fn prepare_request_builder() -> SetNodePoolSize {
3193    ///   # panic!();
3194    ///   // ... details omitted ...
3195    /// }
3196    /// ```
3197    #[derive(Clone, Debug)]
3198    pub struct SetNodePoolSize(RequestBuilder<crate::model::SetNodePoolSizeRequest>);
3199
3200    impl SetNodePoolSize {
3201        pub(crate) fn new(
3202            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3203        ) -> Self {
3204            Self(RequestBuilder::new(stub))
3205        }
3206
3207        /// Sets the full request, replacing any prior values.
3208        pub fn with_request<V: Into<crate::model::SetNodePoolSizeRequest>>(mut self, v: V) -> Self {
3209            self.0.request = v.into();
3210            self
3211        }
3212
3213        /// Sets all the options, replacing any prior values.
3214        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3215            self.0.options = v.into();
3216            self
3217        }
3218
3219        /// Sends the request.
3220        pub async fn send(self) -> Result<crate::model::Operation> {
3221            (*self.0.stub)
3222                .set_node_pool_size(self.0.request, self.0.options)
3223                .await
3224                .map(crate::Response::into_body)
3225        }
3226
3227        /// Sets the value of [project_id][crate::model::SetNodePoolSizeRequest::project_id].
3228        #[deprecated]
3229        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3230            self.0.request.project_id = v.into();
3231            self
3232        }
3233
3234        /// Sets the value of [zone][crate::model::SetNodePoolSizeRequest::zone].
3235        #[deprecated]
3236        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3237            self.0.request.zone = v.into();
3238            self
3239        }
3240
3241        /// Sets the value of [cluster_id][crate::model::SetNodePoolSizeRequest::cluster_id].
3242        #[deprecated]
3243        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3244            self.0.request.cluster_id = v.into();
3245            self
3246        }
3247
3248        /// Sets the value of [node_pool_id][crate::model::SetNodePoolSizeRequest::node_pool_id].
3249        #[deprecated]
3250        pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3251            self.0.request.node_pool_id = v.into();
3252            self
3253        }
3254
3255        /// Sets the value of [node_count][crate::model::SetNodePoolSizeRequest::node_count].
3256        ///
3257        /// This is a **required** field for requests.
3258        pub fn set_node_count<T: Into<i32>>(mut self, v: T) -> Self {
3259            self.0.request.node_count = v.into();
3260            self
3261        }
3262
3263        /// Sets the value of [name][crate::model::SetNodePoolSizeRequest::name].
3264        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3265            self.0.request.name = v.into();
3266            self
3267        }
3268    }
3269
3270    #[doc(hidden)]
3271    impl crate::RequestBuilder for SetNodePoolSize {
3272        fn request_options(&mut self) -> &mut crate::RequestOptions {
3273            &mut self.0.options
3274        }
3275    }
3276
3277    /// The request builder for [ClusterManager::set_network_policy][crate::client::ClusterManager::set_network_policy] calls.
3278    ///
3279    /// # Example
3280    /// ```
3281    /// # use google_cloud_container_v1::builder::cluster_manager::SetNetworkPolicy;
3282    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3283    ///
3284    /// let builder = prepare_request_builder();
3285    /// let response = builder.send().await?;
3286    /// # Ok(()) }
3287    ///
3288    /// fn prepare_request_builder() -> SetNetworkPolicy {
3289    ///   # panic!();
3290    ///   // ... details omitted ...
3291    /// }
3292    /// ```
3293    #[derive(Clone, Debug)]
3294    pub struct SetNetworkPolicy(RequestBuilder<crate::model::SetNetworkPolicyRequest>);
3295
3296    impl SetNetworkPolicy {
3297        pub(crate) fn new(
3298            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3299        ) -> Self {
3300            Self(RequestBuilder::new(stub))
3301        }
3302
3303        /// Sets the full request, replacing any prior values.
3304        pub fn with_request<V: Into<crate::model::SetNetworkPolicyRequest>>(
3305            mut self,
3306            v: V,
3307        ) -> Self {
3308            self.0.request = v.into();
3309            self
3310        }
3311
3312        /// Sets all the options, replacing any prior values.
3313        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3314            self.0.options = v.into();
3315            self
3316        }
3317
3318        /// Sends the request.
3319        pub async fn send(self) -> Result<crate::model::Operation> {
3320            (*self.0.stub)
3321                .set_network_policy(self.0.request, self.0.options)
3322                .await
3323                .map(crate::Response::into_body)
3324        }
3325
3326        /// Sets the value of [project_id][crate::model::SetNetworkPolicyRequest::project_id].
3327        #[deprecated]
3328        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3329            self.0.request.project_id = v.into();
3330            self
3331        }
3332
3333        /// Sets the value of [zone][crate::model::SetNetworkPolicyRequest::zone].
3334        #[deprecated]
3335        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3336            self.0.request.zone = v.into();
3337            self
3338        }
3339
3340        /// Sets the value of [cluster_id][crate::model::SetNetworkPolicyRequest::cluster_id].
3341        #[deprecated]
3342        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3343            self.0.request.cluster_id = v.into();
3344            self
3345        }
3346
3347        /// Sets the value of [network_policy][crate::model::SetNetworkPolicyRequest::network_policy].
3348        ///
3349        /// This is a **required** field for requests.
3350        pub fn set_network_policy<T>(mut self, v: T) -> Self
3351        where
3352            T: std::convert::Into<crate::model::NetworkPolicy>,
3353        {
3354            self.0.request.network_policy = std::option::Option::Some(v.into());
3355            self
3356        }
3357
3358        /// Sets or clears the value of [network_policy][crate::model::SetNetworkPolicyRequest::network_policy].
3359        ///
3360        /// This is a **required** field for requests.
3361        pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
3362        where
3363            T: std::convert::Into<crate::model::NetworkPolicy>,
3364        {
3365            self.0.request.network_policy = v.map(|x| x.into());
3366            self
3367        }
3368
3369        /// Sets the value of [name][crate::model::SetNetworkPolicyRequest::name].
3370        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3371            self.0.request.name = v.into();
3372            self
3373        }
3374    }
3375
3376    #[doc(hidden)]
3377    impl crate::RequestBuilder for SetNetworkPolicy {
3378        fn request_options(&mut self) -> &mut crate::RequestOptions {
3379            &mut self.0.options
3380        }
3381    }
3382
3383    /// The request builder for [ClusterManager::set_maintenance_policy][crate::client::ClusterManager::set_maintenance_policy] calls.
3384    ///
3385    /// # Example
3386    /// ```
3387    /// # use google_cloud_container_v1::builder::cluster_manager::SetMaintenancePolicy;
3388    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3389    ///
3390    /// let builder = prepare_request_builder();
3391    /// let response = builder.send().await?;
3392    /// # Ok(()) }
3393    ///
3394    /// fn prepare_request_builder() -> SetMaintenancePolicy {
3395    ///   # panic!();
3396    ///   // ... details omitted ...
3397    /// }
3398    /// ```
3399    #[derive(Clone, Debug)]
3400    pub struct SetMaintenancePolicy(RequestBuilder<crate::model::SetMaintenancePolicyRequest>);
3401
3402    impl SetMaintenancePolicy {
3403        pub(crate) fn new(
3404            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3405        ) -> Self {
3406            Self(RequestBuilder::new(stub))
3407        }
3408
3409        /// Sets the full request, replacing any prior values.
3410        pub fn with_request<V: Into<crate::model::SetMaintenancePolicyRequest>>(
3411            mut self,
3412            v: V,
3413        ) -> Self {
3414            self.0.request = v.into();
3415            self
3416        }
3417
3418        /// Sets all the options, replacing any prior values.
3419        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3420            self.0.options = v.into();
3421            self
3422        }
3423
3424        /// Sends the request.
3425        pub async fn send(self) -> Result<crate::model::Operation> {
3426            (*self.0.stub)
3427                .set_maintenance_policy(self.0.request, self.0.options)
3428                .await
3429                .map(crate::Response::into_body)
3430        }
3431
3432        /// Sets the value of [project_id][crate::model::SetMaintenancePolicyRequest::project_id].
3433        ///
3434        /// This is a **required** field for requests.
3435        pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3436            self.0.request.project_id = v.into();
3437            self
3438        }
3439
3440        /// Sets the value of [zone][crate::model::SetMaintenancePolicyRequest::zone].
3441        ///
3442        /// This is a **required** field for requests.
3443        pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3444            self.0.request.zone = v.into();
3445            self
3446        }
3447
3448        /// Sets the value of [cluster_id][crate::model::SetMaintenancePolicyRequest::cluster_id].
3449        ///
3450        /// This is a **required** field for requests.
3451        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3452            self.0.request.cluster_id = v.into();
3453            self
3454        }
3455
3456        /// Sets the value of [maintenance_policy][crate::model::SetMaintenancePolicyRequest::maintenance_policy].
3457        ///
3458        /// This is a **required** field for requests.
3459        pub fn set_maintenance_policy<T>(mut self, v: T) -> Self
3460        where
3461            T: std::convert::Into<crate::model::MaintenancePolicy>,
3462        {
3463            self.0.request.maintenance_policy = std::option::Option::Some(v.into());
3464            self
3465        }
3466
3467        /// Sets or clears the value of [maintenance_policy][crate::model::SetMaintenancePolicyRequest::maintenance_policy].
3468        ///
3469        /// This is a **required** field for requests.
3470        pub fn set_or_clear_maintenance_policy<T>(mut self, v: std::option::Option<T>) -> Self
3471        where
3472            T: std::convert::Into<crate::model::MaintenancePolicy>,
3473        {
3474            self.0.request.maintenance_policy = v.map(|x| x.into());
3475            self
3476        }
3477
3478        /// Sets the value of [name][crate::model::SetMaintenancePolicyRequest::name].
3479        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3480            self.0.request.name = v.into();
3481            self
3482        }
3483    }
3484
3485    #[doc(hidden)]
3486    impl crate::RequestBuilder for SetMaintenancePolicy {
3487        fn request_options(&mut self) -> &mut crate::RequestOptions {
3488            &mut self.0.options
3489        }
3490    }
3491
3492    /// The request builder for [ClusterManager::list_usable_subnetworks][crate::client::ClusterManager::list_usable_subnetworks] calls.
3493    ///
3494    /// # Example
3495    /// ```
3496    /// # use google_cloud_container_v1::builder::cluster_manager::ListUsableSubnetworks;
3497    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3498    /// use google_cloud_gax::paginator::ItemPaginator;
3499    ///
3500    /// let builder = prepare_request_builder();
3501    /// let mut items = builder.by_item();
3502    /// while let Some(result) = items.next().await {
3503    ///   let item = result?;
3504    /// }
3505    /// # Ok(()) }
3506    ///
3507    /// fn prepare_request_builder() -> ListUsableSubnetworks {
3508    ///   # panic!();
3509    ///   // ... details omitted ...
3510    /// }
3511    /// ```
3512    #[derive(Clone, Debug)]
3513    pub struct ListUsableSubnetworks(RequestBuilder<crate::model::ListUsableSubnetworksRequest>);
3514
3515    impl ListUsableSubnetworks {
3516        pub(crate) fn new(
3517            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3518        ) -> Self {
3519            Self(RequestBuilder::new(stub))
3520        }
3521
3522        /// Sets the full request, replacing any prior values.
3523        pub fn with_request<V: Into<crate::model::ListUsableSubnetworksRequest>>(
3524            mut self,
3525            v: V,
3526        ) -> Self {
3527            self.0.request = v.into();
3528            self
3529        }
3530
3531        /// Sets all the options, replacing any prior values.
3532        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3533            self.0.options = v.into();
3534            self
3535        }
3536
3537        /// Sends the request.
3538        pub async fn send(self) -> Result<crate::model::ListUsableSubnetworksResponse> {
3539            (*self.0.stub)
3540                .list_usable_subnetworks(self.0.request, self.0.options)
3541                .await
3542                .map(crate::Response::into_body)
3543        }
3544
3545        /// Streams each page in the collection.
3546        pub fn by_page(
3547            self,
3548        ) -> impl google_cloud_gax::paginator::Paginator<
3549            crate::model::ListUsableSubnetworksResponse,
3550            crate::Error,
3551        > {
3552            use std::clone::Clone;
3553            let token = self.0.request.page_token.clone();
3554            let execute = move |token: String| {
3555                let mut builder = self.clone();
3556                builder.0.request = builder.0.request.set_page_token(token);
3557                builder.send()
3558            };
3559            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3560        }
3561
3562        /// Streams each item in the collection.
3563        pub fn by_item(
3564            self,
3565        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3566            crate::model::ListUsableSubnetworksResponse,
3567            crate::Error,
3568        > {
3569            use google_cloud_gax::paginator::Paginator;
3570            self.by_page().items()
3571        }
3572
3573        /// Sets the value of [parent][crate::model::ListUsableSubnetworksRequest::parent].
3574        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3575            self.0.request.parent = v.into();
3576            self
3577        }
3578
3579        /// Sets the value of [filter][crate::model::ListUsableSubnetworksRequest::filter].
3580        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3581            self.0.request.filter = v.into();
3582            self
3583        }
3584
3585        /// Sets the value of [page_size][crate::model::ListUsableSubnetworksRequest::page_size].
3586        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3587            self.0.request.page_size = v.into();
3588            self
3589        }
3590
3591        /// Sets the value of [page_token][crate::model::ListUsableSubnetworksRequest::page_token].
3592        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3593            self.0.request.page_token = v.into();
3594            self
3595        }
3596    }
3597
3598    #[doc(hidden)]
3599    impl crate::RequestBuilder for ListUsableSubnetworks {
3600        fn request_options(&mut self) -> &mut crate::RequestOptions {
3601            &mut self.0.options
3602        }
3603    }
3604
3605    /// The request builder for [ClusterManager::check_autopilot_compatibility][crate::client::ClusterManager::check_autopilot_compatibility] calls.
3606    ///
3607    /// # Example
3608    /// ```
3609    /// # use google_cloud_container_v1::builder::cluster_manager::CheckAutopilotCompatibility;
3610    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3611    ///
3612    /// let builder = prepare_request_builder();
3613    /// let response = builder.send().await?;
3614    /// # Ok(()) }
3615    ///
3616    /// fn prepare_request_builder() -> CheckAutopilotCompatibility {
3617    ///   # panic!();
3618    ///   // ... details omitted ...
3619    /// }
3620    /// ```
3621    #[derive(Clone, Debug)]
3622    pub struct CheckAutopilotCompatibility(
3623        RequestBuilder<crate::model::CheckAutopilotCompatibilityRequest>,
3624    );
3625
3626    impl CheckAutopilotCompatibility {
3627        pub(crate) fn new(
3628            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3629        ) -> Self {
3630            Self(RequestBuilder::new(stub))
3631        }
3632
3633        /// Sets the full request, replacing any prior values.
3634        pub fn with_request<V: Into<crate::model::CheckAutopilotCompatibilityRequest>>(
3635            mut self,
3636            v: V,
3637        ) -> Self {
3638            self.0.request = v.into();
3639            self
3640        }
3641
3642        /// Sets all the options, replacing any prior values.
3643        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3644            self.0.options = v.into();
3645            self
3646        }
3647
3648        /// Sends the request.
3649        pub async fn send(self) -> Result<crate::model::CheckAutopilotCompatibilityResponse> {
3650            (*self.0.stub)
3651                .check_autopilot_compatibility(self.0.request, self.0.options)
3652                .await
3653                .map(crate::Response::into_body)
3654        }
3655
3656        /// Sets the value of [name][crate::model::CheckAutopilotCompatibilityRequest::name].
3657        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3658            self.0.request.name = v.into();
3659            self
3660        }
3661    }
3662
3663    #[doc(hidden)]
3664    impl crate::RequestBuilder for CheckAutopilotCompatibility {
3665        fn request_options(&mut self) -> &mut crate::RequestOptions {
3666            &mut self.0.options
3667        }
3668    }
3669
3670    /// The request builder for [ClusterManager::fetch_cluster_upgrade_info][crate::client::ClusterManager::fetch_cluster_upgrade_info] calls.
3671    ///
3672    /// # Example
3673    /// ```
3674    /// # use google_cloud_container_v1::builder::cluster_manager::FetchClusterUpgradeInfo;
3675    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3676    ///
3677    /// let builder = prepare_request_builder();
3678    /// let response = builder.send().await?;
3679    /// # Ok(()) }
3680    ///
3681    /// fn prepare_request_builder() -> FetchClusterUpgradeInfo {
3682    ///   # panic!();
3683    ///   // ... details omitted ...
3684    /// }
3685    /// ```
3686    #[derive(Clone, Debug)]
3687    pub struct FetchClusterUpgradeInfo(
3688        RequestBuilder<crate::model::FetchClusterUpgradeInfoRequest>,
3689    );
3690
3691    impl FetchClusterUpgradeInfo {
3692        pub(crate) fn new(
3693            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3694        ) -> Self {
3695            Self(RequestBuilder::new(stub))
3696        }
3697
3698        /// Sets the full request, replacing any prior values.
3699        pub fn with_request<V: Into<crate::model::FetchClusterUpgradeInfoRequest>>(
3700            mut self,
3701            v: V,
3702        ) -> Self {
3703            self.0.request = v.into();
3704            self
3705        }
3706
3707        /// Sets all the options, replacing any prior values.
3708        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3709            self.0.options = v.into();
3710            self
3711        }
3712
3713        /// Sends the request.
3714        pub async fn send(self) -> Result<crate::model::ClusterUpgradeInfo> {
3715            (*self.0.stub)
3716                .fetch_cluster_upgrade_info(self.0.request, self.0.options)
3717                .await
3718                .map(crate::Response::into_body)
3719        }
3720
3721        /// Sets the value of [name][crate::model::FetchClusterUpgradeInfoRequest::name].
3722        ///
3723        /// This is a **required** field for requests.
3724        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3725            self.0.request.name = v.into();
3726            self
3727        }
3728
3729        /// Sets the value of [version][crate::model::FetchClusterUpgradeInfoRequest::version].
3730        pub fn set_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
3731            self.0.request.version = v.into();
3732            self
3733        }
3734    }
3735
3736    #[doc(hidden)]
3737    impl crate::RequestBuilder for FetchClusterUpgradeInfo {
3738        fn request_options(&mut self) -> &mut crate::RequestOptions {
3739            &mut self.0.options
3740        }
3741    }
3742
3743    /// The request builder for [ClusterManager::fetch_node_pool_upgrade_info][crate::client::ClusterManager::fetch_node_pool_upgrade_info] calls.
3744    ///
3745    /// # Example
3746    /// ```
3747    /// # use google_cloud_container_v1::builder::cluster_manager::FetchNodePoolUpgradeInfo;
3748    /// # async fn sample() -> google_cloud_container_v1::Result<()> {
3749    ///
3750    /// let builder = prepare_request_builder();
3751    /// let response = builder.send().await?;
3752    /// # Ok(()) }
3753    ///
3754    /// fn prepare_request_builder() -> FetchNodePoolUpgradeInfo {
3755    ///   # panic!();
3756    ///   // ... details omitted ...
3757    /// }
3758    /// ```
3759    #[derive(Clone, Debug)]
3760    pub struct FetchNodePoolUpgradeInfo(
3761        RequestBuilder<crate::model::FetchNodePoolUpgradeInfoRequest>,
3762    );
3763
3764    impl FetchNodePoolUpgradeInfo {
3765        pub(crate) fn new(
3766            stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3767        ) -> Self {
3768            Self(RequestBuilder::new(stub))
3769        }
3770
3771        /// Sets the full request, replacing any prior values.
3772        pub fn with_request<V: Into<crate::model::FetchNodePoolUpgradeInfoRequest>>(
3773            mut self,
3774            v: V,
3775        ) -> Self {
3776            self.0.request = v.into();
3777            self
3778        }
3779
3780        /// Sets all the options, replacing any prior values.
3781        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3782            self.0.options = v.into();
3783            self
3784        }
3785
3786        /// Sends the request.
3787        pub async fn send(self) -> Result<crate::model::NodePoolUpgradeInfo> {
3788            (*self.0.stub)
3789                .fetch_node_pool_upgrade_info(self.0.request, self.0.options)
3790                .await
3791                .map(crate::Response::into_body)
3792        }
3793
3794        /// Sets the value of [name][crate::model::FetchNodePoolUpgradeInfoRequest::name].
3795        ///
3796        /// This is a **required** field for requests.
3797        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3798            self.0.request.name = v.into();
3799            self
3800        }
3801
3802        /// Sets the value of [version][crate::model::FetchNodePoolUpgradeInfoRequest::version].
3803        pub fn set_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
3804            self.0.request.version = v.into();
3805            self
3806        }
3807    }
3808
3809    #[doc(hidden)]
3810    impl crate::RequestBuilder for FetchNodePoolUpgradeInfo {
3811        fn request_options(&mut self) -> &mut crate::RequestOptions {
3812            &mut self.0.options
3813        }
3814    }
3815}