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