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