Skip to main content

google_cloud_container_v1/
builder.rs

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