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