1pub mod cluster_manager {
18 use crate::Result;
19
20 pub type ClientBuilder =
34 gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36 pub(crate) mod client {
37 use super::super::super::client::ClusterManager;
38 pub struct Factory;
39 impl gax::client_builder::internal::ClientFactory for Factory {
40 type Client = ClusterManager;
41 type Credentials = gaxi::options::Credentials;
42 async fn build(
43 self,
44 config: gaxi::options::ClientConfig,
45 ) -> gax::client_builder::Result<Self::Client> {
46 Self::Client::new(config).await
47 }
48 }
49 }
50
51 #[derive(Clone, Debug)]
53 pub(crate) struct RequestBuilder<R: std::default::Default> {
54 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
55 request: R,
56 options: gax::options::RequestOptions,
57 }
58
59 impl<R> RequestBuilder<R>
60 where
61 R: std::default::Default,
62 {
63 pub(crate) fn new(
64 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
65 ) -> Self {
66 Self {
67 stub,
68 request: R::default(),
69 options: gax::options::RequestOptions::default(),
70 }
71 }
72 }
73
74 #[derive(Clone, Debug)]
91 pub struct ListClusters(RequestBuilder<crate::model::ListClustersRequest>);
92
93 impl ListClusters {
94 pub(crate) fn new(
95 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
96 ) -> Self {
97 Self(RequestBuilder::new(stub))
98 }
99
100 pub fn with_request<V: Into<crate::model::ListClustersRequest>>(mut self, v: V) -> Self {
102 self.0.request = v.into();
103 self
104 }
105
106 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
108 self.0.options = v.into();
109 self
110 }
111
112 pub async fn send(self) -> Result<crate::model::ListClustersResponse> {
114 (*self.0.stub)
115 .list_clusters(self.0.request, self.0.options)
116 .await
117 .map(gax::response::Response::into_body)
118 }
119
120 #[deprecated]
122 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
123 self.0.request.project_id = v.into();
124 self
125 }
126
127 #[deprecated]
129 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
130 self.0.request.zone = v.into();
131 self
132 }
133
134 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
136 self.0.request.parent = v.into();
137 self
138 }
139 }
140
141 #[doc(hidden)]
142 impl gax::options::internal::RequestBuilder for ListClusters {
143 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
144 &mut self.0.options
145 }
146 }
147
148 #[derive(Clone, Debug)]
165 pub struct GetCluster(RequestBuilder<crate::model::GetClusterRequest>);
166
167 impl GetCluster {
168 pub(crate) fn new(
169 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
170 ) -> Self {
171 Self(RequestBuilder::new(stub))
172 }
173
174 pub fn with_request<V: Into<crate::model::GetClusterRequest>>(mut self, v: V) -> Self {
176 self.0.request = v.into();
177 self
178 }
179
180 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
182 self.0.options = v.into();
183 self
184 }
185
186 pub async fn send(self) -> Result<crate::model::Cluster> {
188 (*self.0.stub)
189 .get_cluster(self.0.request, self.0.options)
190 .await
191 .map(gax::response::Response::into_body)
192 }
193
194 #[deprecated]
196 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
197 self.0.request.project_id = v.into();
198 self
199 }
200
201 #[deprecated]
203 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
204 self.0.request.zone = v.into();
205 self
206 }
207
208 #[deprecated]
210 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
211 self.0.request.cluster_id = v.into();
212 self
213 }
214
215 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
217 self.0.request.name = v.into();
218 self
219 }
220 }
221
222 #[doc(hidden)]
223 impl gax::options::internal::RequestBuilder for GetCluster {
224 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
225 &mut self.0.options
226 }
227 }
228
229 #[derive(Clone, Debug)]
246 pub struct CreateCluster(RequestBuilder<crate::model::CreateClusterRequest>);
247
248 impl CreateCluster {
249 pub(crate) fn new(
250 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
251 ) -> Self {
252 Self(RequestBuilder::new(stub))
253 }
254
255 pub fn with_request<V: Into<crate::model::CreateClusterRequest>>(mut self, v: V) -> Self {
257 self.0.request = v.into();
258 self
259 }
260
261 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
263 self.0.options = v.into();
264 self
265 }
266
267 pub async fn send(self) -> Result<crate::model::Operation> {
269 (*self.0.stub)
270 .create_cluster(self.0.request, self.0.options)
271 .await
272 .map(gax::response::Response::into_body)
273 }
274
275 #[deprecated]
277 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
278 self.0.request.project_id = v.into();
279 self
280 }
281
282 #[deprecated]
284 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
285 self.0.request.zone = v.into();
286 self
287 }
288
289 pub fn set_cluster<T>(mut self, v: T) -> Self
293 where
294 T: std::convert::Into<crate::model::Cluster>,
295 {
296 self.0.request.cluster = std::option::Option::Some(v.into());
297 self
298 }
299
300 pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
304 where
305 T: std::convert::Into<crate::model::Cluster>,
306 {
307 self.0.request.cluster = v.map(|x| x.into());
308 self
309 }
310
311 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
313 self.0.request.parent = v.into();
314 self
315 }
316 }
317
318 #[doc(hidden)]
319 impl gax::options::internal::RequestBuilder for CreateCluster {
320 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
321 &mut self.0.options
322 }
323 }
324
325 #[derive(Clone, Debug)]
342 pub struct UpdateCluster(RequestBuilder<crate::model::UpdateClusterRequest>);
343
344 impl UpdateCluster {
345 pub(crate) fn new(
346 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
347 ) -> Self {
348 Self(RequestBuilder::new(stub))
349 }
350
351 pub fn with_request<V: Into<crate::model::UpdateClusterRequest>>(mut self, v: V) -> Self {
353 self.0.request = v.into();
354 self
355 }
356
357 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
359 self.0.options = v.into();
360 self
361 }
362
363 pub async fn send(self) -> Result<crate::model::Operation> {
365 (*self.0.stub)
366 .update_cluster(self.0.request, self.0.options)
367 .await
368 .map(gax::response::Response::into_body)
369 }
370
371 #[deprecated]
373 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
374 self.0.request.project_id = v.into();
375 self
376 }
377
378 #[deprecated]
380 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
381 self.0.request.zone = v.into();
382 self
383 }
384
385 #[deprecated]
387 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
388 self.0.request.cluster_id = v.into();
389 self
390 }
391
392 pub fn set_update<T>(mut self, v: T) -> Self
396 where
397 T: std::convert::Into<crate::model::ClusterUpdate>,
398 {
399 self.0.request.update = std::option::Option::Some(v.into());
400 self
401 }
402
403 pub fn set_or_clear_update<T>(mut self, v: std::option::Option<T>) -> Self
407 where
408 T: std::convert::Into<crate::model::ClusterUpdate>,
409 {
410 self.0.request.update = v.map(|x| x.into());
411 self
412 }
413
414 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
416 self.0.request.name = v.into();
417 self
418 }
419 }
420
421 #[doc(hidden)]
422 impl gax::options::internal::RequestBuilder for UpdateCluster {
423 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
424 &mut self.0.options
425 }
426 }
427
428 #[derive(Clone, Debug)]
445 pub struct UpdateNodePool(RequestBuilder<crate::model::UpdateNodePoolRequest>);
446
447 impl UpdateNodePool {
448 pub(crate) fn new(
449 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
450 ) -> Self {
451 Self(RequestBuilder::new(stub))
452 }
453
454 pub fn with_request<V: Into<crate::model::UpdateNodePoolRequest>>(mut self, v: V) -> Self {
456 self.0.request = v.into();
457 self
458 }
459
460 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
462 self.0.options = v.into();
463 self
464 }
465
466 pub async fn send(self) -> Result<crate::model::Operation> {
468 (*self.0.stub)
469 .update_node_pool(self.0.request, self.0.options)
470 .await
471 .map(gax::response::Response::into_body)
472 }
473
474 #[deprecated]
476 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
477 self.0.request.project_id = v.into();
478 self
479 }
480
481 #[deprecated]
483 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
484 self.0.request.zone = v.into();
485 self
486 }
487
488 #[deprecated]
490 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
491 self.0.request.cluster_id = v.into();
492 self
493 }
494
495 #[deprecated]
497 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
498 self.0.request.node_pool_id = v.into();
499 self
500 }
501
502 pub fn set_node_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
506 self.0.request.node_version = v.into();
507 self
508 }
509
510 pub fn set_image_type<T: Into<std::string::String>>(mut self, v: T) -> Self {
514 self.0.request.image_type = v.into();
515 self
516 }
517
518 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
520 self.0.request.name = v.into();
521 self
522 }
523
524 pub fn set_locations<T, V>(mut self, v: T) -> Self
526 where
527 T: std::iter::IntoIterator<Item = V>,
528 V: std::convert::Into<std::string::String>,
529 {
530 use std::iter::Iterator;
531 self.0.request.locations = v.into_iter().map(|i| i.into()).collect();
532 self
533 }
534
535 pub fn set_workload_metadata_config<T>(mut self, v: T) -> Self
537 where
538 T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
539 {
540 self.0.request.workload_metadata_config = std::option::Option::Some(v.into());
541 self
542 }
543
544 pub fn set_or_clear_workload_metadata_config<T>(mut self, v: std::option::Option<T>) -> Self
546 where
547 T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
548 {
549 self.0.request.workload_metadata_config = v.map(|x| x.into());
550 self
551 }
552
553 pub fn set_upgrade_settings<T>(mut self, v: T) -> Self
555 where
556 T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
557 {
558 self.0.request.upgrade_settings = std::option::Option::Some(v.into());
559 self
560 }
561
562 pub fn set_or_clear_upgrade_settings<T>(mut self, v: std::option::Option<T>) -> Self
564 where
565 T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
566 {
567 self.0.request.upgrade_settings = v.map(|x| x.into());
568 self
569 }
570
571 pub fn set_tags<T>(mut self, v: T) -> Self
573 where
574 T: std::convert::Into<crate::model::NetworkTags>,
575 {
576 self.0.request.tags = std::option::Option::Some(v.into());
577 self
578 }
579
580 pub fn set_or_clear_tags<T>(mut self, v: std::option::Option<T>) -> Self
582 where
583 T: std::convert::Into<crate::model::NetworkTags>,
584 {
585 self.0.request.tags = v.map(|x| x.into());
586 self
587 }
588
589 pub fn set_taints<T>(mut self, v: T) -> Self
591 where
592 T: std::convert::Into<crate::model::NodeTaints>,
593 {
594 self.0.request.taints = std::option::Option::Some(v.into());
595 self
596 }
597
598 pub fn set_or_clear_taints<T>(mut self, v: std::option::Option<T>) -> Self
600 where
601 T: std::convert::Into<crate::model::NodeTaints>,
602 {
603 self.0.request.taints = v.map(|x| x.into());
604 self
605 }
606
607 pub fn set_labels<T>(mut self, v: T) -> Self
609 where
610 T: std::convert::Into<crate::model::NodeLabels>,
611 {
612 self.0.request.labels = std::option::Option::Some(v.into());
613 self
614 }
615
616 pub fn set_or_clear_labels<T>(mut self, v: std::option::Option<T>) -> Self
618 where
619 T: std::convert::Into<crate::model::NodeLabels>,
620 {
621 self.0.request.labels = v.map(|x| x.into());
622 self
623 }
624
625 pub fn set_linux_node_config<T>(mut self, v: T) -> Self
627 where
628 T: std::convert::Into<crate::model::LinuxNodeConfig>,
629 {
630 self.0.request.linux_node_config = std::option::Option::Some(v.into());
631 self
632 }
633
634 pub fn set_or_clear_linux_node_config<T>(mut self, v: std::option::Option<T>) -> Self
636 where
637 T: std::convert::Into<crate::model::LinuxNodeConfig>,
638 {
639 self.0.request.linux_node_config = v.map(|x| x.into());
640 self
641 }
642
643 pub fn set_kubelet_config<T>(mut self, v: T) -> Self
645 where
646 T: std::convert::Into<crate::model::NodeKubeletConfig>,
647 {
648 self.0.request.kubelet_config = std::option::Option::Some(v.into());
649 self
650 }
651
652 pub fn set_or_clear_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
654 where
655 T: std::convert::Into<crate::model::NodeKubeletConfig>,
656 {
657 self.0.request.kubelet_config = v.map(|x| x.into());
658 self
659 }
660
661 pub fn set_node_network_config<T>(mut self, v: T) -> Self
663 where
664 T: std::convert::Into<crate::model::NodeNetworkConfig>,
665 {
666 self.0.request.node_network_config = std::option::Option::Some(v.into());
667 self
668 }
669
670 pub fn set_or_clear_node_network_config<T>(mut self, v: std::option::Option<T>) -> Self
672 where
673 T: std::convert::Into<crate::model::NodeNetworkConfig>,
674 {
675 self.0.request.node_network_config = v.map(|x| x.into());
676 self
677 }
678
679 pub fn set_gcfs_config<T>(mut self, v: T) -> Self
681 where
682 T: std::convert::Into<crate::model::GcfsConfig>,
683 {
684 self.0.request.gcfs_config = std::option::Option::Some(v.into());
685 self
686 }
687
688 pub fn set_or_clear_gcfs_config<T>(mut self, v: std::option::Option<T>) -> Self
690 where
691 T: std::convert::Into<crate::model::GcfsConfig>,
692 {
693 self.0.request.gcfs_config = v.map(|x| x.into());
694 self
695 }
696
697 pub fn set_confidential_nodes<T>(mut self, v: T) -> Self
699 where
700 T: std::convert::Into<crate::model::ConfidentialNodes>,
701 {
702 self.0.request.confidential_nodes = std::option::Option::Some(v.into());
703 self
704 }
705
706 pub fn set_or_clear_confidential_nodes<T>(mut self, v: std::option::Option<T>) -> Self
708 where
709 T: std::convert::Into<crate::model::ConfidentialNodes>,
710 {
711 self.0.request.confidential_nodes = v.map(|x| x.into());
712 self
713 }
714
715 pub fn set_gvnic<T>(mut self, v: T) -> Self
717 where
718 T: std::convert::Into<crate::model::VirtualNIC>,
719 {
720 self.0.request.gvnic = std::option::Option::Some(v.into());
721 self
722 }
723
724 pub fn set_or_clear_gvnic<T>(mut self, v: std::option::Option<T>) -> Self
726 where
727 T: std::convert::Into<crate::model::VirtualNIC>,
728 {
729 self.0.request.gvnic = v.map(|x| x.into());
730 self
731 }
732
733 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
735 self.0.request.etag = v.into();
736 self
737 }
738
739 pub fn set_fast_socket<T>(mut self, v: T) -> Self
741 where
742 T: std::convert::Into<crate::model::FastSocket>,
743 {
744 self.0.request.fast_socket = std::option::Option::Some(v.into());
745 self
746 }
747
748 pub fn set_or_clear_fast_socket<T>(mut self, v: std::option::Option<T>) -> Self
750 where
751 T: std::convert::Into<crate::model::FastSocket>,
752 {
753 self.0.request.fast_socket = v.map(|x| x.into());
754 self
755 }
756
757 pub fn set_logging_config<T>(mut self, v: T) -> Self
759 where
760 T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
761 {
762 self.0.request.logging_config = std::option::Option::Some(v.into());
763 self
764 }
765
766 pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
768 where
769 T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
770 {
771 self.0.request.logging_config = v.map(|x| x.into());
772 self
773 }
774
775 pub fn set_resource_labels<T>(mut self, v: T) -> Self
777 where
778 T: std::convert::Into<crate::model::ResourceLabels>,
779 {
780 self.0.request.resource_labels = std::option::Option::Some(v.into());
781 self
782 }
783
784 pub fn set_or_clear_resource_labels<T>(mut self, v: std::option::Option<T>) -> Self
786 where
787 T: std::convert::Into<crate::model::ResourceLabels>,
788 {
789 self.0.request.resource_labels = v.map(|x| x.into());
790 self
791 }
792
793 pub fn set_windows_node_config<T>(mut self, v: T) -> Self
795 where
796 T: std::convert::Into<crate::model::WindowsNodeConfig>,
797 {
798 self.0.request.windows_node_config = std::option::Option::Some(v.into());
799 self
800 }
801
802 pub fn set_or_clear_windows_node_config<T>(mut self, v: std::option::Option<T>) -> Self
804 where
805 T: std::convert::Into<crate::model::WindowsNodeConfig>,
806 {
807 self.0.request.windows_node_config = v.map(|x| x.into());
808 self
809 }
810
811 pub fn set_accelerators<T, V>(mut self, v: T) -> Self
813 where
814 T: std::iter::IntoIterator<Item = V>,
815 V: std::convert::Into<crate::model::AcceleratorConfig>,
816 {
817 use std::iter::Iterator;
818 self.0.request.accelerators = v.into_iter().map(|i| i.into()).collect();
819 self
820 }
821
822 pub fn set_machine_type<T: Into<std::string::String>>(mut self, v: T) -> Self {
824 self.0.request.machine_type = v.into();
825 self
826 }
827
828 pub fn set_disk_type<T: Into<std::string::String>>(mut self, v: T) -> Self {
830 self.0.request.disk_type = v.into();
831 self
832 }
833
834 pub fn set_disk_size_gb<T: Into<i64>>(mut self, v: T) -> Self {
836 self.0.request.disk_size_gb = v.into();
837 self
838 }
839
840 pub fn set_resource_manager_tags<T>(mut self, v: T) -> Self
842 where
843 T: std::convert::Into<crate::model::ResourceManagerTags>,
844 {
845 self.0.request.resource_manager_tags = std::option::Option::Some(v.into());
846 self
847 }
848
849 pub fn set_or_clear_resource_manager_tags<T>(mut self, v: std::option::Option<T>) -> Self
851 where
852 T: std::convert::Into<crate::model::ResourceManagerTags>,
853 {
854 self.0.request.resource_manager_tags = v.map(|x| x.into());
855 self
856 }
857
858 pub fn set_containerd_config<T>(mut self, v: T) -> Self
860 where
861 T: std::convert::Into<crate::model::ContainerdConfig>,
862 {
863 self.0.request.containerd_config = std::option::Option::Some(v.into());
864 self
865 }
866
867 pub fn set_or_clear_containerd_config<T>(mut self, v: std::option::Option<T>) -> Self
869 where
870 T: std::convert::Into<crate::model::ContainerdConfig>,
871 {
872 self.0.request.containerd_config = v.map(|x| x.into());
873 self
874 }
875
876 pub fn set_queued_provisioning<T>(mut self, v: T) -> Self
878 where
879 T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
880 {
881 self.0.request.queued_provisioning = std::option::Option::Some(v.into());
882 self
883 }
884
885 pub fn set_or_clear_queued_provisioning<T>(mut self, v: std::option::Option<T>) -> Self
887 where
888 T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
889 {
890 self.0.request.queued_provisioning = v.map(|x| x.into());
891 self
892 }
893
894 pub fn set_storage_pools<T, V>(mut self, v: T) -> Self
896 where
897 T: std::iter::IntoIterator<Item = V>,
898 V: std::convert::Into<std::string::String>,
899 {
900 use std::iter::Iterator;
901 self.0.request.storage_pools = v.into_iter().map(|i| i.into()).collect();
902 self
903 }
904
905 pub fn set_max_run_duration<T>(mut self, v: T) -> Self
907 where
908 T: std::convert::Into<wkt::Duration>,
909 {
910 self.0.request.max_run_duration = std::option::Option::Some(v.into());
911 self
912 }
913
914 pub fn set_or_clear_max_run_duration<T>(mut self, v: std::option::Option<T>) -> Self
916 where
917 T: std::convert::Into<wkt::Duration>,
918 {
919 self.0.request.max_run_duration = v.map(|x| x.into());
920 self
921 }
922
923 pub fn set_flex_start<T>(mut self, v: T) -> Self
925 where
926 T: std::convert::Into<bool>,
927 {
928 self.0.request.flex_start = std::option::Option::Some(v.into());
929 self
930 }
931
932 pub fn set_or_clear_flex_start<T>(mut self, v: std::option::Option<T>) -> Self
934 where
935 T: std::convert::Into<bool>,
936 {
937 self.0.request.flex_start = v.map(|x| x.into());
938 self
939 }
940
941 pub fn set_boot_disk<T>(mut self, v: T) -> Self
943 where
944 T: std::convert::Into<crate::model::BootDisk>,
945 {
946 self.0.request.boot_disk = std::option::Option::Some(v.into());
947 self
948 }
949
950 pub fn set_or_clear_boot_disk<T>(mut self, v: std::option::Option<T>) -> Self
952 where
953 T: std::convert::Into<crate::model::BootDisk>,
954 {
955 self.0.request.boot_disk = v.map(|x| x.into());
956 self
957 }
958
959 pub fn set_node_drain_config<T>(mut self, v: T) -> Self
961 where
962 T: std::convert::Into<crate::model::node_pool::NodeDrainConfig>,
963 {
964 self.0.request.node_drain_config = std::option::Option::Some(v.into());
965 self
966 }
967
968 pub fn set_or_clear_node_drain_config<T>(mut self, v: std::option::Option<T>) -> Self
970 where
971 T: std::convert::Into<crate::model::node_pool::NodeDrainConfig>,
972 {
973 self.0.request.node_drain_config = v.map(|x| x.into());
974 self
975 }
976
977 pub fn set_consolidation_delay<T>(mut self, v: T) -> Self
979 where
980 T: std::convert::Into<wkt::Duration>,
981 {
982 self.0.request.consolidation_delay = std::option::Option::Some(v.into());
983 self
984 }
985
986 pub fn set_or_clear_consolidation_delay<T>(mut self, v: std::option::Option<T>) -> Self
988 where
989 T: std::convert::Into<wkt::Duration>,
990 {
991 self.0.request.consolidation_delay = v.map(|x| x.into());
992 self
993 }
994 }
995
996 #[doc(hidden)]
997 impl gax::options::internal::RequestBuilder for UpdateNodePool {
998 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
999 &mut self.0.options
1000 }
1001 }
1002
1003 #[derive(Clone, Debug)]
1020 pub struct SetNodePoolAutoscaling(RequestBuilder<crate::model::SetNodePoolAutoscalingRequest>);
1021
1022 impl SetNodePoolAutoscaling {
1023 pub(crate) fn new(
1024 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1025 ) -> Self {
1026 Self(RequestBuilder::new(stub))
1027 }
1028
1029 pub fn with_request<V: Into<crate::model::SetNodePoolAutoscalingRequest>>(
1031 mut self,
1032 v: V,
1033 ) -> Self {
1034 self.0.request = v.into();
1035 self
1036 }
1037
1038 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1040 self.0.options = v.into();
1041 self
1042 }
1043
1044 pub async fn send(self) -> Result<crate::model::Operation> {
1046 (*self.0.stub)
1047 .set_node_pool_autoscaling(self.0.request, self.0.options)
1048 .await
1049 .map(gax::response::Response::into_body)
1050 }
1051
1052 #[deprecated]
1054 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1055 self.0.request.project_id = v.into();
1056 self
1057 }
1058
1059 #[deprecated]
1061 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1062 self.0.request.zone = v.into();
1063 self
1064 }
1065
1066 #[deprecated]
1068 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1069 self.0.request.cluster_id = v.into();
1070 self
1071 }
1072
1073 #[deprecated]
1075 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1076 self.0.request.node_pool_id = v.into();
1077 self
1078 }
1079
1080 pub fn set_autoscaling<T>(mut self, v: T) -> Self
1084 where
1085 T: std::convert::Into<crate::model::NodePoolAutoscaling>,
1086 {
1087 self.0.request.autoscaling = std::option::Option::Some(v.into());
1088 self
1089 }
1090
1091 pub fn set_or_clear_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
1095 where
1096 T: std::convert::Into<crate::model::NodePoolAutoscaling>,
1097 {
1098 self.0.request.autoscaling = v.map(|x| x.into());
1099 self
1100 }
1101
1102 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1104 self.0.request.name = v.into();
1105 self
1106 }
1107 }
1108
1109 #[doc(hidden)]
1110 impl gax::options::internal::RequestBuilder for SetNodePoolAutoscaling {
1111 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1112 &mut self.0.options
1113 }
1114 }
1115
1116 #[derive(Clone, Debug)]
1133 pub struct SetLoggingService(RequestBuilder<crate::model::SetLoggingServiceRequest>);
1134
1135 impl SetLoggingService {
1136 pub(crate) fn new(
1137 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1138 ) -> Self {
1139 Self(RequestBuilder::new(stub))
1140 }
1141
1142 pub fn with_request<V: Into<crate::model::SetLoggingServiceRequest>>(
1144 mut self,
1145 v: V,
1146 ) -> Self {
1147 self.0.request = v.into();
1148 self
1149 }
1150
1151 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1153 self.0.options = v.into();
1154 self
1155 }
1156
1157 pub async fn send(self) -> Result<crate::model::Operation> {
1159 (*self.0.stub)
1160 .set_logging_service(self.0.request, self.0.options)
1161 .await
1162 .map(gax::response::Response::into_body)
1163 }
1164
1165 #[deprecated]
1167 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1168 self.0.request.project_id = v.into();
1169 self
1170 }
1171
1172 #[deprecated]
1174 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1175 self.0.request.zone = v.into();
1176 self
1177 }
1178
1179 #[deprecated]
1181 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1182 self.0.request.cluster_id = v.into();
1183 self
1184 }
1185
1186 pub fn set_logging_service<T: Into<std::string::String>>(mut self, v: T) -> Self {
1190 self.0.request.logging_service = v.into();
1191 self
1192 }
1193
1194 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1196 self.0.request.name = v.into();
1197 self
1198 }
1199 }
1200
1201 #[doc(hidden)]
1202 impl gax::options::internal::RequestBuilder for SetLoggingService {
1203 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1204 &mut self.0.options
1205 }
1206 }
1207
1208 #[derive(Clone, Debug)]
1225 pub struct SetMonitoringService(RequestBuilder<crate::model::SetMonitoringServiceRequest>);
1226
1227 impl SetMonitoringService {
1228 pub(crate) fn new(
1229 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1230 ) -> Self {
1231 Self(RequestBuilder::new(stub))
1232 }
1233
1234 pub fn with_request<V: Into<crate::model::SetMonitoringServiceRequest>>(
1236 mut self,
1237 v: V,
1238 ) -> Self {
1239 self.0.request = v.into();
1240 self
1241 }
1242
1243 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1245 self.0.options = v.into();
1246 self
1247 }
1248
1249 pub async fn send(self) -> Result<crate::model::Operation> {
1251 (*self.0.stub)
1252 .set_monitoring_service(self.0.request, self.0.options)
1253 .await
1254 .map(gax::response::Response::into_body)
1255 }
1256
1257 #[deprecated]
1259 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1260 self.0.request.project_id = v.into();
1261 self
1262 }
1263
1264 #[deprecated]
1266 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1267 self.0.request.zone = v.into();
1268 self
1269 }
1270
1271 #[deprecated]
1273 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1274 self.0.request.cluster_id = v.into();
1275 self
1276 }
1277
1278 pub fn set_monitoring_service<T: Into<std::string::String>>(mut self, v: T) -> Self {
1282 self.0.request.monitoring_service = v.into();
1283 self
1284 }
1285
1286 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1288 self.0.request.name = v.into();
1289 self
1290 }
1291 }
1292
1293 #[doc(hidden)]
1294 impl gax::options::internal::RequestBuilder for SetMonitoringService {
1295 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1296 &mut self.0.options
1297 }
1298 }
1299
1300 #[derive(Clone, Debug)]
1317 pub struct SetAddonsConfig(RequestBuilder<crate::model::SetAddonsConfigRequest>);
1318
1319 impl SetAddonsConfig {
1320 pub(crate) fn new(
1321 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1322 ) -> Self {
1323 Self(RequestBuilder::new(stub))
1324 }
1325
1326 pub fn with_request<V: Into<crate::model::SetAddonsConfigRequest>>(mut self, v: V) -> Self {
1328 self.0.request = v.into();
1329 self
1330 }
1331
1332 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1334 self.0.options = v.into();
1335 self
1336 }
1337
1338 pub async fn send(self) -> Result<crate::model::Operation> {
1340 (*self.0.stub)
1341 .set_addons_config(self.0.request, self.0.options)
1342 .await
1343 .map(gax::response::Response::into_body)
1344 }
1345
1346 #[deprecated]
1348 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1349 self.0.request.project_id = v.into();
1350 self
1351 }
1352
1353 #[deprecated]
1355 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1356 self.0.request.zone = v.into();
1357 self
1358 }
1359
1360 #[deprecated]
1362 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1363 self.0.request.cluster_id = v.into();
1364 self
1365 }
1366
1367 pub fn set_addons_config<T>(mut self, v: T) -> Self
1371 where
1372 T: std::convert::Into<crate::model::AddonsConfig>,
1373 {
1374 self.0.request.addons_config = std::option::Option::Some(v.into());
1375 self
1376 }
1377
1378 pub fn set_or_clear_addons_config<T>(mut self, v: std::option::Option<T>) -> Self
1382 where
1383 T: std::convert::Into<crate::model::AddonsConfig>,
1384 {
1385 self.0.request.addons_config = v.map(|x| x.into());
1386 self
1387 }
1388
1389 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1391 self.0.request.name = v.into();
1392 self
1393 }
1394 }
1395
1396 #[doc(hidden)]
1397 impl gax::options::internal::RequestBuilder for SetAddonsConfig {
1398 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1399 &mut self.0.options
1400 }
1401 }
1402
1403 #[derive(Clone, Debug)]
1420 pub struct SetLocations(RequestBuilder<crate::model::SetLocationsRequest>);
1421
1422 impl SetLocations {
1423 pub(crate) fn new(
1424 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1425 ) -> Self {
1426 Self(RequestBuilder::new(stub))
1427 }
1428
1429 pub fn with_request<V: Into<crate::model::SetLocationsRequest>>(mut self, v: V) -> Self {
1431 self.0.request = v.into();
1432 self
1433 }
1434
1435 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1437 self.0.options = v.into();
1438 self
1439 }
1440
1441 pub async fn send(self) -> Result<crate::model::Operation> {
1443 (*self.0.stub)
1444 .set_locations(self.0.request, self.0.options)
1445 .await
1446 .map(gax::response::Response::into_body)
1447 }
1448
1449 #[deprecated]
1451 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1452 self.0.request.project_id = v.into();
1453 self
1454 }
1455
1456 #[deprecated]
1458 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1459 self.0.request.zone = v.into();
1460 self
1461 }
1462
1463 #[deprecated]
1465 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1466 self.0.request.cluster_id = v.into();
1467 self
1468 }
1469
1470 pub fn set_locations<T, V>(mut self, v: T) -> Self
1474 where
1475 T: std::iter::IntoIterator<Item = V>,
1476 V: std::convert::Into<std::string::String>,
1477 {
1478 use std::iter::Iterator;
1479 self.0.request.locations = v.into_iter().map(|i| i.into()).collect();
1480 self
1481 }
1482
1483 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1485 self.0.request.name = v.into();
1486 self
1487 }
1488 }
1489
1490 #[doc(hidden)]
1491 impl gax::options::internal::RequestBuilder for SetLocations {
1492 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1493 &mut self.0.options
1494 }
1495 }
1496
1497 #[derive(Clone, Debug)]
1514 pub struct UpdateMaster(RequestBuilder<crate::model::UpdateMasterRequest>);
1515
1516 impl UpdateMaster {
1517 pub(crate) fn new(
1518 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1519 ) -> Self {
1520 Self(RequestBuilder::new(stub))
1521 }
1522
1523 pub fn with_request<V: Into<crate::model::UpdateMasterRequest>>(mut self, v: V) -> Self {
1525 self.0.request = v.into();
1526 self
1527 }
1528
1529 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1531 self.0.options = v.into();
1532 self
1533 }
1534
1535 pub async fn send(self) -> Result<crate::model::Operation> {
1537 (*self.0.stub)
1538 .update_master(self.0.request, self.0.options)
1539 .await
1540 .map(gax::response::Response::into_body)
1541 }
1542
1543 #[deprecated]
1545 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1546 self.0.request.project_id = v.into();
1547 self
1548 }
1549
1550 #[deprecated]
1552 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1553 self.0.request.zone = v.into();
1554 self
1555 }
1556
1557 #[deprecated]
1559 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1560 self.0.request.cluster_id = v.into();
1561 self
1562 }
1563
1564 pub fn set_master_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
1568 self.0.request.master_version = v.into();
1569 self
1570 }
1571
1572 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1574 self.0.request.name = v.into();
1575 self
1576 }
1577 }
1578
1579 #[doc(hidden)]
1580 impl gax::options::internal::RequestBuilder for UpdateMaster {
1581 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1582 &mut self.0.options
1583 }
1584 }
1585
1586 #[derive(Clone, Debug)]
1603 pub struct SetMasterAuth(RequestBuilder<crate::model::SetMasterAuthRequest>);
1604
1605 impl SetMasterAuth {
1606 pub(crate) fn new(
1607 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1608 ) -> Self {
1609 Self(RequestBuilder::new(stub))
1610 }
1611
1612 pub fn with_request<V: Into<crate::model::SetMasterAuthRequest>>(mut self, v: V) -> Self {
1614 self.0.request = v.into();
1615 self
1616 }
1617
1618 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1620 self.0.options = v.into();
1621 self
1622 }
1623
1624 pub async fn send(self) -> Result<crate::model::Operation> {
1626 (*self.0.stub)
1627 .set_master_auth(self.0.request, self.0.options)
1628 .await
1629 .map(gax::response::Response::into_body)
1630 }
1631
1632 #[deprecated]
1634 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1635 self.0.request.project_id = v.into();
1636 self
1637 }
1638
1639 #[deprecated]
1641 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1642 self.0.request.zone = v.into();
1643 self
1644 }
1645
1646 #[deprecated]
1648 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1649 self.0.request.cluster_id = v.into();
1650 self
1651 }
1652
1653 pub fn set_action<T: Into<crate::model::set_master_auth_request::Action>>(
1657 mut self,
1658 v: T,
1659 ) -> Self {
1660 self.0.request.action = v.into();
1661 self
1662 }
1663
1664 pub fn set_update<T>(mut self, v: T) -> Self
1668 where
1669 T: std::convert::Into<crate::model::MasterAuth>,
1670 {
1671 self.0.request.update = std::option::Option::Some(v.into());
1672 self
1673 }
1674
1675 pub fn set_or_clear_update<T>(mut self, v: std::option::Option<T>) -> Self
1679 where
1680 T: std::convert::Into<crate::model::MasterAuth>,
1681 {
1682 self.0.request.update = v.map(|x| x.into());
1683 self
1684 }
1685
1686 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1688 self.0.request.name = v.into();
1689 self
1690 }
1691 }
1692
1693 #[doc(hidden)]
1694 impl gax::options::internal::RequestBuilder for SetMasterAuth {
1695 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1696 &mut self.0.options
1697 }
1698 }
1699
1700 #[derive(Clone, Debug)]
1717 pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
1718
1719 impl DeleteCluster {
1720 pub(crate) fn new(
1721 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1722 ) -> Self {
1723 Self(RequestBuilder::new(stub))
1724 }
1725
1726 pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
1728 self.0.request = v.into();
1729 self
1730 }
1731
1732 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1734 self.0.options = v.into();
1735 self
1736 }
1737
1738 pub async fn send(self) -> Result<crate::model::Operation> {
1740 (*self.0.stub)
1741 .delete_cluster(self.0.request, self.0.options)
1742 .await
1743 .map(gax::response::Response::into_body)
1744 }
1745
1746 #[deprecated]
1748 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1749 self.0.request.project_id = v.into();
1750 self
1751 }
1752
1753 #[deprecated]
1755 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1756 self.0.request.zone = v.into();
1757 self
1758 }
1759
1760 #[deprecated]
1762 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1763 self.0.request.cluster_id = v.into();
1764 self
1765 }
1766
1767 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1769 self.0.request.name = v.into();
1770 self
1771 }
1772 }
1773
1774 #[doc(hidden)]
1775 impl gax::options::internal::RequestBuilder for DeleteCluster {
1776 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1777 &mut self.0.options
1778 }
1779 }
1780
1781 #[derive(Clone, Debug)]
1798 pub struct ListOperations(RequestBuilder<crate::model::ListOperationsRequest>);
1799
1800 impl ListOperations {
1801 pub(crate) fn new(
1802 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1803 ) -> Self {
1804 Self(RequestBuilder::new(stub))
1805 }
1806
1807 pub fn with_request<V: Into<crate::model::ListOperationsRequest>>(mut self, v: V) -> Self {
1809 self.0.request = v.into();
1810 self
1811 }
1812
1813 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1815 self.0.options = v.into();
1816 self
1817 }
1818
1819 pub async fn send(self) -> Result<crate::model::ListOperationsResponse> {
1821 (*self.0.stub)
1822 .list_operations(self.0.request, self.0.options)
1823 .await
1824 .map(gax::response::Response::into_body)
1825 }
1826
1827 #[deprecated]
1829 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1830 self.0.request.project_id = v.into();
1831 self
1832 }
1833
1834 #[deprecated]
1836 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1837 self.0.request.zone = v.into();
1838 self
1839 }
1840
1841 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1843 self.0.request.parent = v.into();
1844 self
1845 }
1846 }
1847
1848 #[doc(hidden)]
1849 impl gax::options::internal::RequestBuilder for ListOperations {
1850 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1851 &mut self.0.options
1852 }
1853 }
1854
1855 #[derive(Clone, Debug)]
1872 pub struct GetOperation(RequestBuilder<crate::model::GetOperationRequest>);
1873
1874 impl GetOperation {
1875 pub(crate) fn new(
1876 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1877 ) -> Self {
1878 Self(RequestBuilder::new(stub))
1879 }
1880
1881 pub fn with_request<V: Into<crate::model::GetOperationRequest>>(mut self, v: V) -> Self {
1883 self.0.request = v.into();
1884 self
1885 }
1886
1887 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1889 self.0.options = v.into();
1890 self
1891 }
1892
1893 pub async fn send(self) -> Result<crate::model::Operation> {
1895 (*self.0.stub)
1896 .get_operation(self.0.request, self.0.options)
1897 .await
1898 .map(gax::response::Response::into_body)
1899 }
1900
1901 #[deprecated]
1903 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1904 self.0.request.project_id = v.into();
1905 self
1906 }
1907
1908 #[deprecated]
1910 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1911 self.0.request.zone = v.into();
1912 self
1913 }
1914
1915 #[deprecated]
1917 pub fn set_operation_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1918 self.0.request.operation_id = v.into();
1919 self
1920 }
1921
1922 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1924 self.0.request.name = v.into();
1925 self
1926 }
1927 }
1928
1929 #[doc(hidden)]
1930 impl gax::options::internal::RequestBuilder for GetOperation {
1931 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1932 &mut self.0.options
1933 }
1934 }
1935
1936 #[derive(Clone, Debug)]
1953 pub struct CancelOperation(RequestBuilder<crate::model::CancelOperationRequest>);
1954
1955 impl CancelOperation {
1956 pub(crate) fn new(
1957 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1958 ) -> Self {
1959 Self(RequestBuilder::new(stub))
1960 }
1961
1962 pub fn with_request<V: Into<crate::model::CancelOperationRequest>>(mut self, v: V) -> Self {
1964 self.0.request = v.into();
1965 self
1966 }
1967
1968 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1970 self.0.options = v.into();
1971 self
1972 }
1973
1974 pub async fn send(self) -> Result<()> {
1976 (*self.0.stub)
1977 .cancel_operation(self.0.request, self.0.options)
1978 .await
1979 .map(gax::response::Response::into_body)
1980 }
1981
1982 #[deprecated]
1984 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1985 self.0.request.project_id = v.into();
1986 self
1987 }
1988
1989 #[deprecated]
1991 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1992 self.0.request.zone = v.into();
1993 self
1994 }
1995
1996 #[deprecated]
1998 pub fn set_operation_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1999 self.0.request.operation_id = v.into();
2000 self
2001 }
2002
2003 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2005 self.0.request.name = v.into();
2006 self
2007 }
2008 }
2009
2010 #[doc(hidden)]
2011 impl gax::options::internal::RequestBuilder for CancelOperation {
2012 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2013 &mut self.0.options
2014 }
2015 }
2016
2017 #[derive(Clone, Debug)]
2034 pub struct GetServerConfig(RequestBuilder<crate::model::GetServerConfigRequest>);
2035
2036 impl GetServerConfig {
2037 pub(crate) fn new(
2038 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2039 ) -> Self {
2040 Self(RequestBuilder::new(stub))
2041 }
2042
2043 pub fn with_request<V: Into<crate::model::GetServerConfigRequest>>(mut self, v: V) -> Self {
2045 self.0.request = v.into();
2046 self
2047 }
2048
2049 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2051 self.0.options = v.into();
2052 self
2053 }
2054
2055 pub async fn send(self) -> Result<crate::model::ServerConfig> {
2057 (*self.0.stub)
2058 .get_server_config(self.0.request, self.0.options)
2059 .await
2060 .map(gax::response::Response::into_body)
2061 }
2062
2063 #[deprecated]
2065 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2066 self.0.request.project_id = v.into();
2067 self
2068 }
2069
2070 #[deprecated]
2072 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2073 self.0.request.zone = v.into();
2074 self
2075 }
2076
2077 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2079 self.0.request.name = v.into();
2080 self
2081 }
2082 }
2083
2084 #[doc(hidden)]
2085 impl gax::options::internal::RequestBuilder for GetServerConfig {
2086 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2087 &mut self.0.options
2088 }
2089 }
2090
2091 #[derive(Clone, Debug)]
2108 pub struct GetJSONWebKeys(RequestBuilder<crate::model::GetJSONWebKeysRequest>);
2109
2110 impl GetJSONWebKeys {
2111 pub(crate) fn new(
2112 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2113 ) -> Self {
2114 Self(RequestBuilder::new(stub))
2115 }
2116
2117 pub fn with_request<V: Into<crate::model::GetJSONWebKeysRequest>>(mut self, v: V) -> Self {
2119 self.0.request = v.into();
2120 self
2121 }
2122
2123 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2125 self.0.options = v.into();
2126 self
2127 }
2128
2129 pub async fn send(self) -> Result<crate::model::GetJSONWebKeysResponse> {
2131 (*self.0.stub)
2132 .get_json_web_keys(self.0.request, self.0.options)
2133 .await
2134 .map(gax::response::Response::into_body)
2135 }
2136
2137 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2139 self.0.request.parent = v.into();
2140 self
2141 }
2142 }
2143
2144 #[doc(hidden)]
2145 impl gax::options::internal::RequestBuilder for GetJSONWebKeys {
2146 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2147 &mut self.0.options
2148 }
2149 }
2150
2151 #[derive(Clone, Debug)]
2168 pub struct ListNodePools(RequestBuilder<crate::model::ListNodePoolsRequest>);
2169
2170 impl ListNodePools {
2171 pub(crate) fn new(
2172 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2173 ) -> Self {
2174 Self(RequestBuilder::new(stub))
2175 }
2176
2177 pub fn with_request<V: Into<crate::model::ListNodePoolsRequest>>(mut self, v: V) -> Self {
2179 self.0.request = v.into();
2180 self
2181 }
2182
2183 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2185 self.0.options = v.into();
2186 self
2187 }
2188
2189 pub async fn send(self) -> Result<crate::model::ListNodePoolsResponse> {
2191 (*self.0.stub)
2192 .list_node_pools(self.0.request, self.0.options)
2193 .await
2194 .map(gax::response::Response::into_body)
2195 }
2196
2197 #[deprecated]
2199 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2200 self.0.request.project_id = v.into();
2201 self
2202 }
2203
2204 #[deprecated]
2206 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2207 self.0.request.zone = v.into();
2208 self
2209 }
2210
2211 #[deprecated]
2213 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2214 self.0.request.cluster_id = v.into();
2215 self
2216 }
2217
2218 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2220 self.0.request.parent = v.into();
2221 self
2222 }
2223 }
2224
2225 #[doc(hidden)]
2226 impl gax::options::internal::RequestBuilder for ListNodePools {
2227 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2228 &mut self.0.options
2229 }
2230 }
2231
2232 #[derive(Clone, Debug)]
2249 pub struct GetNodePool(RequestBuilder<crate::model::GetNodePoolRequest>);
2250
2251 impl GetNodePool {
2252 pub(crate) fn new(
2253 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2254 ) -> Self {
2255 Self(RequestBuilder::new(stub))
2256 }
2257
2258 pub fn with_request<V: Into<crate::model::GetNodePoolRequest>>(mut self, v: V) -> Self {
2260 self.0.request = v.into();
2261 self
2262 }
2263
2264 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2266 self.0.options = v.into();
2267 self
2268 }
2269
2270 pub async fn send(self) -> Result<crate::model::NodePool> {
2272 (*self.0.stub)
2273 .get_node_pool(self.0.request, self.0.options)
2274 .await
2275 .map(gax::response::Response::into_body)
2276 }
2277
2278 #[deprecated]
2280 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2281 self.0.request.project_id = v.into();
2282 self
2283 }
2284
2285 #[deprecated]
2287 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2288 self.0.request.zone = v.into();
2289 self
2290 }
2291
2292 #[deprecated]
2294 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2295 self.0.request.cluster_id = v.into();
2296 self
2297 }
2298
2299 #[deprecated]
2301 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2302 self.0.request.node_pool_id = v.into();
2303 self
2304 }
2305
2306 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2308 self.0.request.name = v.into();
2309 self
2310 }
2311 }
2312
2313 #[doc(hidden)]
2314 impl gax::options::internal::RequestBuilder for GetNodePool {
2315 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2316 &mut self.0.options
2317 }
2318 }
2319
2320 #[derive(Clone, Debug)]
2337 pub struct CreateNodePool(RequestBuilder<crate::model::CreateNodePoolRequest>);
2338
2339 impl CreateNodePool {
2340 pub(crate) fn new(
2341 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2342 ) -> Self {
2343 Self(RequestBuilder::new(stub))
2344 }
2345
2346 pub fn with_request<V: Into<crate::model::CreateNodePoolRequest>>(mut self, v: V) -> Self {
2348 self.0.request = v.into();
2349 self
2350 }
2351
2352 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2354 self.0.options = v.into();
2355 self
2356 }
2357
2358 pub async fn send(self) -> Result<crate::model::Operation> {
2360 (*self.0.stub)
2361 .create_node_pool(self.0.request, self.0.options)
2362 .await
2363 .map(gax::response::Response::into_body)
2364 }
2365
2366 #[deprecated]
2368 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2369 self.0.request.project_id = v.into();
2370 self
2371 }
2372
2373 #[deprecated]
2375 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2376 self.0.request.zone = v.into();
2377 self
2378 }
2379
2380 #[deprecated]
2382 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2383 self.0.request.cluster_id = v.into();
2384 self
2385 }
2386
2387 pub fn set_node_pool<T>(mut self, v: T) -> Self
2391 where
2392 T: std::convert::Into<crate::model::NodePool>,
2393 {
2394 self.0.request.node_pool = std::option::Option::Some(v.into());
2395 self
2396 }
2397
2398 pub fn set_or_clear_node_pool<T>(mut self, v: std::option::Option<T>) -> Self
2402 where
2403 T: std::convert::Into<crate::model::NodePool>,
2404 {
2405 self.0.request.node_pool = v.map(|x| x.into());
2406 self
2407 }
2408
2409 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2411 self.0.request.parent = v.into();
2412 self
2413 }
2414 }
2415
2416 #[doc(hidden)]
2417 impl gax::options::internal::RequestBuilder for CreateNodePool {
2418 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2419 &mut self.0.options
2420 }
2421 }
2422
2423 #[derive(Clone, Debug)]
2440 pub struct DeleteNodePool(RequestBuilder<crate::model::DeleteNodePoolRequest>);
2441
2442 impl DeleteNodePool {
2443 pub(crate) fn new(
2444 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2445 ) -> Self {
2446 Self(RequestBuilder::new(stub))
2447 }
2448
2449 pub fn with_request<V: Into<crate::model::DeleteNodePoolRequest>>(mut self, v: V) -> Self {
2451 self.0.request = v.into();
2452 self
2453 }
2454
2455 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2457 self.0.options = v.into();
2458 self
2459 }
2460
2461 pub async fn send(self) -> Result<crate::model::Operation> {
2463 (*self.0.stub)
2464 .delete_node_pool(self.0.request, self.0.options)
2465 .await
2466 .map(gax::response::Response::into_body)
2467 }
2468
2469 #[deprecated]
2471 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2472 self.0.request.project_id = v.into();
2473 self
2474 }
2475
2476 #[deprecated]
2478 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2479 self.0.request.zone = v.into();
2480 self
2481 }
2482
2483 #[deprecated]
2485 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2486 self.0.request.cluster_id = v.into();
2487 self
2488 }
2489
2490 #[deprecated]
2492 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2493 self.0.request.node_pool_id = v.into();
2494 self
2495 }
2496
2497 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2499 self.0.request.name = v.into();
2500 self
2501 }
2502 }
2503
2504 #[doc(hidden)]
2505 impl gax::options::internal::RequestBuilder for DeleteNodePool {
2506 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2507 &mut self.0.options
2508 }
2509 }
2510
2511 #[derive(Clone, Debug)]
2528 pub struct CompleteNodePoolUpgrade(
2529 RequestBuilder<crate::model::CompleteNodePoolUpgradeRequest>,
2530 );
2531
2532 impl CompleteNodePoolUpgrade {
2533 pub(crate) fn new(
2534 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2535 ) -> Self {
2536 Self(RequestBuilder::new(stub))
2537 }
2538
2539 pub fn with_request<V: Into<crate::model::CompleteNodePoolUpgradeRequest>>(
2541 mut self,
2542 v: V,
2543 ) -> Self {
2544 self.0.request = v.into();
2545 self
2546 }
2547
2548 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2550 self.0.options = v.into();
2551 self
2552 }
2553
2554 pub async fn send(self) -> Result<()> {
2556 (*self.0.stub)
2557 .complete_node_pool_upgrade(self.0.request, self.0.options)
2558 .await
2559 .map(gax::response::Response::into_body)
2560 }
2561
2562 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2564 self.0.request.name = v.into();
2565 self
2566 }
2567 }
2568
2569 #[doc(hidden)]
2570 impl gax::options::internal::RequestBuilder for CompleteNodePoolUpgrade {
2571 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2572 &mut self.0.options
2573 }
2574 }
2575
2576 #[derive(Clone, Debug)]
2593 pub struct RollbackNodePoolUpgrade(
2594 RequestBuilder<crate::model::RollbackNodePoolUpgradeRequest>,
2595 );
2596
2597 impl RollbackNodePoolUpgrade {
2598 pub(crate) fn new(
2599 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2600 ) -> Self {
2601 Self(RequestBuilder::new(stub))
2602 }
2603
2604 pub fn with_request<V: Into<crate::model::RollbackNodePoolUpgradeRequest>>(
2606 mut self,
2607 v: V,
2608 ) -> Self {
2609 self.0.request = v.into();
2610 self
2611 }
2612
2613 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2615 self.0.options = v.into();
2616 self
2617 }
2618
2619 pub async fn send(self) -> Result<crate::model::Operation> {
2621 (*self.0.stub)
2622 .rollback_node_pool_upgrade(self.0.request, self.0.options)
2623 .await
2624 .map(gax::response::Response::into_body)
2625 }
2626
2627 #[deprecated]
2629 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2630 self.0.request.project_id = v.into();
2631 self
2632 }
2633
2634 #[deprecated]
2636 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2637 self.0.request.zone = v.into();
2638 self
2639 }
2640
2641 #[deprecated]
2643 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2644 self.0.request.cluster_id = v.into();
2645 self
2646 }
2647
2648 #[deprecated]
2650 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2651 self.0.request.node_pool_id = v.into();
2652 self
2653 }
2654
2655 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2657 self.0.request.name = v.into();
2658 self
2659 }
2660
2661 pub fn set_respect_pdb<T: Into<bool>>(mut self, v: T) -> Self {
2663 self.0.request.respect_pdb = v.into();
2664 self
2665 }
2666 }
2667
2668 #[doc(hidden)]
2669 impl gax::options::internal::RequestBuilder for RollbackNodePoolUpgrade {
2670 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2671 &mut self.0.options
2672 }
2673 }
2674
2675 #[derive(Clone, Debug)]
2692 pub struct SetNodePoolManagement(RequestBuilder<crate::model::SetNodePoolManagementRequest>);
2693
2694 impl SetNodePoolManagement {
2695 pub(crate) fn new(
2696 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2697 ) -> Self {
2698 Self(RequestBuilder::new(stub))
2699 }
2700
2701 pub fn with_request<V: Into<crate::model::SetNodePoolManagementRequest>>(
2703 mut self,
2704 v: V,
2705 ) -> Self {
2706 self.0.request = v.into();
2707 self
2708 }
2709
2710 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2712 self.0.options = v.into();
2713 self
2714 }
2715
2716 pub async fn send(self) -> Result<crate::model::Operation> {
2718 (*self.0.stub)
2719 .set_node_pool_management(self.0.request, self.0.options)
2720 .await
2721 .map(gax::response::Response::into_body)
2722 }
2723
2724 #[deprecated]
2726 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2727 self.0.request.project_id = v.into();
2728 self
2729 }
2730
2731 #[deprecated]
2733 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2734 self.0.request.zone = v.into();
2735 self
2736 }
2737
2738 #[deprecated]
2740 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2741 self.0.request.cluster_id = v.into();
2742 self
2743 }
2744
2745 #[deprecated]
2747 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2748 self.0.request.node_pool_id = v.into();
2749 self
2750 }
2751
2752 pub fn set_management<T>(mut self, v: T) -> Self
2756 where
2757 T: std::convert::Into<crate::model::NodeManagement>,
2758 {
2759 self.0.request.management = std::option::Option::Some(v.into());
2760 self
2761 }
2762
2763 pub fn set_or_clear_management<T>(mut self, v: std::option::Option<T>) -> Self
2767 where
2768 T: std::convert::Into<crate::model::NodeManagement>,
2769 {
2770 self.0.request.management = v.map(|x| x.into());
2771 self
2772 }
2773
2774 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2776 self.0.request.name = v.into();
2777 self
2778 }
2779 }
2780
2781 #[doc(hidden)]
2782 impl gax::options::internal::RequestBuilder for SetNodePoolManagement {
2783 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2784 &mut self.0.options
2785 }
2786 }
2787
2788 #[derive(Clone, Debug)]
2805 pub struct SetLabels(RequestBuilder<crate::model::SetLabelsRequest>);
2806
2807 impl SetLabels {
2808 pub(crate) fn new(
2809 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2810 ) -> Self {
2811 Self(RequestBuilder::new(stub))
2812 }
2813
2814 pub fn with_request<V: Into<crate::model::SetLabelsRequest>>(mut self, v: V) -> Self {
2816 self.0.request = v.into();
2817 self
2818 }
2819
2820 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2822 self.0.options = v.into();
2823 self
2824 }
2825
2826 pub async fn send(self) -> Result<crate::model::Operation> {
2828 (*self.0.stub)
2829 .set_labels(self.0.request, self.0.options)
2830 .await
2831 .map(gax::response::Response::into_body)
2832 }
2833
2834 #[deprecated]
2836 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2837 self.0.request.project_id = v.into();
2838 self
2839 }
2840
2841 #[deprecated]
2843 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2844 self.0.request.zone = v.into();
2845 self
2846 }
2847
2848 #[deprecated]
2850 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2851 self.0.request.cluster_id = v.into();
2852 self
2853 }
2854
2855 pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
2859 where
2860 T: std::iter::IntoIterator<Item = (K, V)>,
2861 K: std::convert::Into<std::string::String>,
2862 V: std::convert::Into<std::string::String>,
2863 {
2864 self.0.request.resource_labels =
2865 v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2866 self
2867 }
2868
2869 pub fn set_label_fingerprint<T: Into<std::string::String>>(mut self, v: T) -> Self {
2873 self.0.request.label_fingerprint = v.into();
2874 self
2875 }
2876
2877 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2879 self.0.request.name = v.into();
2880 self
2881 }
2882 }
2883
2884 #[doc(hidden)]
2885 impl gax::options::internal::RequestBuilder for SetLabels {
2886 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2887 &mut self.0.options
2888 }
2889 }
2890
2891 #[derive(Clone, Debug)]
2908 pub struct SetLegacyAbac(RequestBuilder<crate::model::SetLegacyAbacRequest>);
2909
2910 impl SetLegacyAbac {
2911 pub(crate) fn new(
2912 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2913 ) -> Self {
2914 Self(RequestBuilder::new(stub))
2915 }
2916
2917 pub fn with_request<V: Into<crate::model::SetLegacyAbacRequest>>(mut self, v: V) -> Self {
2919 self.0.request = v.into();
2920 self
2921 }
2922
2923 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2925 self.0.options = v.into();
2926 self
2927 }
2928
2929 pub async fn send(self) -> Result<crate::model::Operation> {
2931 (*self.0.stub)
2932 .set_legacy_abac(self.0.request, self.0.options)
2933 .await
2934 .map(gax::response::Response::into_body)
2935 }
2936
2937 #[deprecated]
2939 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2940 self.0.request.project_id = v.into();
2941 self
2942 }
2943
2944 #[deprecated]
2946 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2947 self.0.request.zone = v.into();
2948 self
2949 }
2950
2951 #[deprecated]
2953 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2954 self.0.request.cluster_id = v.into();
2955 self
2956 }
2957
2958 pub fn set_enabled<T: Into<bool>>(mut self, v: T) -> Self {
2962 self.0.request.enabled = v.into();
2963 self
2964 }
2965
2966 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2968 self.0.request.name = v.into();
2969 self
2970 }
2971 }
2972
2973 #[doc(hidden)]
2974 impl gax::options::internal::RequestBuilder for SetLegacyAbac {
2975 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2976 &mut self.0.options
2977 }
2978 }
2979
2980 #[derive(Clone, Debug)]
2997 pub struct StartIPRotation(RequestBuilder<crate::model::StartIPRotationRequest>);
2998
2999 impl StartIPRotation {
3000 pub(crate) fn new(
3001 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3002 ) -> Self {
3003 Self(RequestBuilder::new(stub))
3004 }
3005
3006 pub fn with_request<V: Into<crate::model::StartIPRotationRequest>>(mut self, v: V) -> Self {
3008 self.0.request = v.into();
3009 self
3010 }
3011
3012 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3014 self.0.options = v.into();
3015 self
3016 }
3017
3018 pub async fn send(self) -> Result<crate::model::Operation> {
3020 (*self.0.stub)
3021 .start_ip_rotation(self.0.request, self.0.options)
3022 .await
3023 .map(gax::response::Response::into_body)
3024 }
3025
3026 #[deprecated]
3028 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3029 self.0.request.project_id = v.into();
3030 self
3031 }
3032
3033 #[deprecated]
3035 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3036 self.0.request.zone = v.into();
3037 self
3038 }
3039
3040 #[deprecated]
3042 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3043 self.0.request.cluster_id = v.into();
3044 self
3045 }
3046
3047 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3049 self.0.request.name = v.into();
3050 self
3051 }
3052
3053 pub fn set_rotate_credentials<T: Into<bool>>(mut self, v: T) -> Self {
3055 self.0.request.rotate_credentials = v.into();
3056 self
3057 }
3058 }
3059
3060 #[doc(hidden)]
3061 impl gax::options::internal::RequestBuilder for StartIPRotation {
3062 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3063 &mut self.0.options
3064 }
3065 }
3066
3067 #[derive(Clone, Debug)]
3084 pub struct CompleteIPRotation(RequestBuilder<crate::model::CompleteIPRotationRequest>);
3085
3086 impl CompleteIPRotation {
3087 pub(crate) fn new(
3088 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3089 ) -> Self {
3090 Self(RequestBuilder::new(stub))
3091 }
3092
3093 pub fn with_request<V: Into<crate::model::CompleteIPRotationRequest>>(
3095 mut self,
3096 v: V,
3097 ) -> Self {
3098 self.0.request = v.into();
3099 self
3100 }
3101
3102 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3104 self.0.options = v.into();
3105 self
3106 }
3107
3108 pub async fn send(self) -> Result<crate::model::Operation> {
3110 (*self.0.stub)
3111 .complete_ip_rotation(self.0.request, self.0.options)
3112 .await
3113 .map(gax::response::Response::into_body)
3114 }
3115
3116 #[deprecated]
3118 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3119 self.0.request.project_id = v.into();
3120 self
3121 }
3122
3123 #[deprecated]
3125 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3126 self.0.request.zone = v.into();
3127 self
3128 }
3129
3130 #[deprecated]
3132 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3133 self.0.request.cluster_id = v.into();
3134 self
3135 }
3136
3137 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3139 self.0.request.name = v.into();
3140 self
3141 }
3142 }
3143
3144 #[doc(hidden)]
3145 impl gax::options::internal::RequestBuilder for CompleteIPRotation {
3146 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3147 &mut self.0.options
3148 }
3149 }
3150
3151 #[derive(Clone, Debug)]
3168 pub struct SetNodePoolSize(RequestBuilder<crate::model::SetNodePoolSizeRequest>);
3169
3170 impl SetNodePoolSize {
3171 pub(crate) fn new(
3172 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3173 ) -> Self {
3174 Self(RequestBuilder::new(stub))
3175 }
3176
3177 pub fn with_request<V: Into<crate::model::SetNodePoolSizeRequest>>(mut self, v: V) -> Self {
3179 self.0.request = v.into();
3180 self
3181 }
3182
3183 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3185 self.0.options = v.into();
3186 self
3187 }
3188
3189 pub async fn send(self) -> Result<crate::model::Operation> {
3191 (*self.0.stub)
3192 .set_node_pool_size(self.0.request, self.0.options)
3193 .await
3194 .map(gax::response::Response::into_body)
3195 }
3196
3197 #[deprecated]
3199 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3200 self.0.request.project_id = v.into();
3201 self
3202 }
3203
3204 #[deprecated]
3206 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3207 self.0.request.zone = v.into();
3208 self
3209 }
3210
3211 #[deprecated]
3213 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3214 self.0.request.cluster_id = v.into();
3215 self
3216 }
3217
3218 #[deprecated]
3220 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3221 self.0.request.node_pool_id = v.into();
3222 self
3223 }
3224
3225 pub fn set_node_count<T: Into<i32>>(mut self, v: T) -> Self {
3229 self.0.request.node_count = v.into();
3230 self
3231 }
3232
3233 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3235 self.0.request.name = v.into();
3236 self
3237 }
3238 }
3239
3240 #[doc(hidden)]
3241 impl gax::options::internal::RequestBuilder for SetNodePoolSize {
3242 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3243 &mut self.0.options
3244 }
3245 }
3246
3247 #[derive(Clone, Debug)]
3264 pub struct SetNetworkPolicy(RequestBuilder<crate::model::SetNetworkPolicyRequest>);
3265
3266 impl SetNetworkPolicy {
3267 pub(crate) fn new(
3268 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3269 ) -> Self {
3270 Self(RequestBuilder::new(stub))
3271 }
3272
3273 pub fn with_request<V: Into<crate::model::SetNetworkPolicyRequest>>(
3275 mut self,
3276 v: V,
3277 ) -> Self {
3278 self.0.request = v.into();
3279 self
3280 }
3281
3282 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3284 self.0.options = v.into();
3285 self
3286 }
3287
3288 pub async fn send(self) -> Result<crate::model::Operation> {
3290 (*self.0.stub)
3291 .set_network_policy(self.0.request, self.0.options)
3292 .await
3293 .map(gax::response::Response::into_body)
3294 }
3295
3296 #[deprecated]
3298 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3299 self.0.request.project_id = v.into();
3300 self
3301 }
3302
3303 #[deprecated]
3305 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3306 self.0.request.zone = v.into();
3307 self
3308 }
3309
3310 #[deprecated]
3312 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3313 self.0.request.cluster_id = v.into();
3314 self
3315 }
3316
3317 pub fn set_network_policy<T>(mut self, v: T) -> Self
3321 where
3322 T: std::convert::Into<crate::model::NetworkPolicy>,
3323 {
3324 self.0.request.network_policy = std::option::Option::Some(v.into());
3325 self
3326 }
3327
3328 pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
3332 where
3333 T: std::convert::Into<crate::model::NetworkPolicy>,
3334 {
3335 self.0.request.network_policy = v.map(|x| x.into());
3336 self
3337 }
3338
3339 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3341 self.0.request.name = v.into();
3342 self
3343 }
3344 }
3345
3346 #[doc(hidden)]
3347 impl gax::options::internal::RequestBuilder for SetNetworkPolicy {
3348 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3349 &mut self.0.options
3350 }
3351 }
3352
3353 #[derive(Clone, Debug)]
3370 pub struct SetMaintenancePolicy(RequestBuilder<crate::model::SetMaintenancePolicyRequest>);
3371
3372 impl SetMaintenancePolicy {
3373 pub(crate) fn new(
3374 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3375 ) -> Self {
3376 Self(RequestBuilder::new(stub))
3377 }
3378
3379 pub fn with_request<V: Into<crate::model::SetMaintenancePolicyRequest>>(
3381 mut self,
3382 v: V,
3383 ) -> Self {
3384 self.0.request = v.into();
3385 self
3386 }
3387
3388 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3390 self.0.options = v.into();
3391 self
3392 }
3393
3394 pub async fn send(self) -> Result<crate::model::Operation> {
3396 (*self.0.stub)
3397 .set_maintenance_policy(self.0.request, self.0.options)
3398 .await
3399 .map(gax::response::Response::into_body)
3400 }
3401
3402 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3406 self.0.request.project_id = v.into();
3407 self
3408 }
3409
3410 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3414 self.0.request.zone = v.into();
3415 self
3416 }
3417
3418 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3422 self.0.request.cluster_id = v.into();
3423 self
3424 }
3425
3426 pub fn set_maintenance_policy<T>(mut self, v: T) -> Self
3430 where
3431 T: std::convert::Into<crate::model::MaintenancePolicy>,
3432 {
3433 self.0.request.maintenance_policy = std::option::Option::Some(v.into());
3434 self
3435 }
3436
3437 pub fn set_or_clear_maintenance_policy<T>(mut self, v: std::option::Option<T>) -> Self
3441 where
3442 T: std::convert::Into<crate::model::MaintenancePolicy>,
3443 {
3444 self.0.request.maintenance_policy = v.map(|x| x.into());
3445 self
3446 }
3447
3448 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3450 self.0.request.name = v.into();
3451 self
3452 }
3453 }
3454
3455 #[doc(hidden)]
3456 impl gax::options::internal::RequestBuilder for SetMaintenancePolicy {
3457 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3458 &mut self.0.options
3459 }
3460 }
3461
3462 #[derive(Clone, Debug)]
3483 pub struct ListUsableSubnetworks(RequestBuilder<crate::model::ListUsableSubnetworksRequest>);
3484
3485 impl ListUsableSubnetworks {
3486 pub(crate) fn new(
3487 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3488 ) -> Self {
3489 Self(RequestBuilder::new(stub))
3490 }
3491
3492 pub fn with_request<V: Into<crate::model::ListUsableSubnetworksRequest>>(
3494 mut self,
3495 v: V,
3496 ) -> Self {
3497 self.0.request = v.into();
3498 self
3499 }
3500
3501 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3503 self.0.options = v.into();
3504 self
3505 }
3506
3507 pub async fn send(self) -> Result<crate::model::ListUsableSubnetworksResponse> {
3509 (*self.0.stub)
3510 .list_usable_subnetworks(self.0.request, self.0.options)
3511 .await
3512 .map(gax::response::Response::into_body)
3513 }
3514
3515 pub fn by_page(
3517 self,
3518 ) -> impl gax::paginator::Paginator<crate::model::ListUsableSubnetworksResponse, gax::error::Error>
3519 {
3520 use std::clone::Clone;
3521 let token = self.0.request.page_token.clone();
3522 let execute = move |token: String| {
3523 let mut builder = self.clone();
3524 builder.0.request = builder.0.request.set_page_token(token);
3525 builder.send()
3526 };
3527 gax::paginator::internal::new_paginator(token, execute)
3528 }
3529
3530 pub fn by_item(
3532 self,
3533 ) -> impl gax::paginator::ItemPaginator<
3534 crate::model::ListUsableSubnetworksResponse,
3535 gax::error::Error,
3536 > {
3537 use gax::paginator::Paginator;
3538 self.by_page().items()
3539 }
3540
3541 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3543 self.0.request.parent = v.into();
3544 self
3545 }
3546
3547 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3549 self.0.request.filter = v.into();
3550 self
3551 }
3552
3553 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3555 self.0.request.page_size = v.into();
3556 self
3557 }
3558
3559 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3561 self.0.request.page_token = v.into();
3562 self
3563 }
3564 }
3565
3566 #[doc(hidden)]
3567 impl gax::options::internal::RequestBuilder for ListUsableSubnetworks {
3568 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3569 &mut self.0.options
3570 }
3571 }
3572
3573 #[derive(Clone, Debug)]
3590 pub struct CheckAutopilotCompatibility(
3591 RequestBuilder<crate::model::CheckAutopilotCompatibilityRequest>,
3592 );
3593
3594 impl CheckAutopilotCompatibility {
3595 pub(crate) fn new(
3596 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3597 ) -> Self {
3598 Self(RequestBuilder::new(stub))
3599 }
3600
3601 pub fn with_request<V: Into<crate::model::CheckAutopilotCompatibilityRequest>>(
3603 mut self,
3604 v: V,
3605 ) -> Self {
3606 self.0.request = v.into();
3607 self
3608 }
3609
3610 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3612 self.0.options = v.into();
3613 self
3614 }
3615
3616 pub async fn send(self) -> Result<crate::model::CheckAutopilotCompatibilityResponse> {
3618 (*self.0.stub)
3619 .check_autopilot_compatibility(self.0.request, self.0.options)
3620 .await
3621 .map(gax::response::Response::into_body)
3622 }
3623
3624 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3626 self.0.request.name = v.into();
3627 self
3628 }
3629 }
3630
3631 #[doc(hidden)]
3632 impl gax::options::internal::RequestBuilder for CheckAutopilotCompatibility {
3633 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3634 &mut self.0.options
3635 }
3636 }
3637
3638 #[derive(Clone, Debug)]
3655 pub struct FetchClusterUpgradeInfo(
3656 RequestBuilder<crate::model::FetchClusterUpgradeInfoRequest>,
3657 );
3658
3659 impl FetchClusterUpgradeInfo {
3660 pub(crate) fn new(
3661 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3662 ) -> Self {
3663 Self(RequestBuilder::new(stub))
3664 }
3665
3666 pub fn with_request<V: Into<crate::model::FetchClusterUpgradeInfoRequest>>(
3668 mut self,
3669 v: V,
3670 ) -> Self {
3671 self.0.request = v.into();
3672 self
3673 }
3674
3675 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3677 self.0.options = v.into();
3678 self
3679 }
3680
3681 pub async fn send(self) -> Result<crate::model::ClusterUpgradeInfo> {
3683 (*self.0.stub)
3684 .fetch_cluster_upgrade_info(self.0.request, self.0.options)
3685 .await
3686 .map(gax::response::Response::into_body)
3687 }
3688
3689 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3693 self.0.request.name = v.into();
3694 self
3695 }
3696
3697 pub fn set_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
3699 self.0.request.version = v.into();
3700 self
3701 }
3702 }
3703
3704 #[doc(hidden)]
3705 impl gax::options::internal::RequestBuilder for FetchClusterUpgradeInfo {
3706 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3707 &mut self.0.options
3708 }
3709 }
3710
3711 #[derive(Clone, Debug)]
3728 pub struct FetchNodePoolUpgradeInfo(
3729 RequestBuilder<crate::model::FetchNodePoolUpgradeInfoRequest>,
3730 );
3731
3732 impl FetchNodePoolUpgradeInfo {
3733 pub(crate) fn new(
3734 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3735 ) -> Self {
3736 Self(RequestBuilder::new(stub))
3737 }
3738
3739 pub fn with_request<V: Into<crate::model::FetchNodePoolUpgradeInfoRequest>>(
3741 mut self,
3742 v: V,
3743 ) -> Self {
3744 self.0.request = v.into();
3745 self
3746 }
3747
3748 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3750 self.0.options = v.into();
3751 self
3752 }
3753
3754 pub async fn send(self) -> Result<crate::model::NodePoolUpgradeInfo> {
3756 (*self.0.stub)
3757 .fetch_node_pool_upgrade_info(self.0.request, self.0.options)
3758 .await
3759 .map(gax::response::Response::into_body)
3760 }
3761
3762 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3766 self.0.request.name = v.into();
3767 self
3768 }
3769
3770 pub fn set_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
3772 self.0.request.version = v.into();
3773 self
3774 }
3775 }
3776
3777 #[doc(hidden)]
3778 impl gax::options::internal::RequestBuilder for FetchNodePoolUpgradeInfo {
3779 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3780 &mut self.0.options
3781 }
3782 }
3783}