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