1pub mod cluster_manager {
18 use crate::Result;
19
20 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
34
35 pub(crate) mod client {
36 use super::super::super::client::ClusterManager;
37 pub struct Factory;
38 impl crate::ClientFactory for Factory {
39 type Client = ClusterManager;
40 type Credentials = gaxi::options::Credentials;
41 async fn build(
42 self,
43 config: gaxi::options::ClientConfig,
44 ) -> crate::ClientBuilderResult<Self::Client> {
45 Self::Client::new(config).await
46 }
47 }
48 }
49
50 #[derive(Clone, Debug)]
52 pub(crate) struct RequestBuilder<R: std::default::Default> {
53 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
54 request: R,
55 options: crate::RequestOptions,
56 }
57
58 impl<R> RequestBuilder<R>
59 where
60 R: std::default::Default,
61 {
62 pub(crate) fn new(
63 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
64 ) -> Self {
65 Self {
66 stub,
67 request: R::default(),
68 options: crate::RequestOptions::default(),
69 }
70 }
71 }
72
73 #[derive(Clone, Debug)]
90 pub struct ListClusters(RequestBuilder<crate::model::ListClustersRequest>);
91
92 impl ListClusters {
93 pub(crate) fn new(
94 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
95 ) -> Self {
96 Self(RequestBuilder::new(stub))
97 }
98
99 pub fn with_request<V: Into<crate::model::ListClustersRequest>>(mut self, v: V) -> Self {
101 self.0.request = v.into();
102 self
103 }
104
105 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
107 self.0.options = v.into();
108 self
109 }
110
111 pub async fn send(self) -> Result<crate::model::ListClustersResponse> {
113 (*self.0.stub)
114 .list_clusters(self.0.request, self.0.options)
115 .await
116 .map(crate::Response::into_body)
117 }
118
119 #[deprecated]
121 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
122 self.0.request.project_id = v.into();
123 self
124 }
125
126 #[deprecated]
128 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
129 self.0.request.zone = v.into();
130 self
131 }
132
133 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
135 self.0.request.parent = v.into();
136 self
137 }
138 }
139
140 #[doc(hidden)]
141 impl crate::RequestBuilder for ListClusters {
142 fn request_options(&mut self) -> &mut crate::RequestOptions {
143 &mut self.0.options
144 }
145 }
146
147 #[derive(Clone, Debug)]
164 pub struct GetCluster(RequestBuilder<crate::model::GetClusterRequest>);
165
166 impl GetCluster {
167 pub(crate) fn new(
168 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
169 ) -> Self {
170 Self(RequestBuilder::new(stub))
171 }
172
173 pub fn with_request<V: Into<crate::model::GetClusterRequest>>(mut self, v: V) -> Self {
175 self.0.request = v.into();
176 self
177 }
178
179 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
181 self.0.options = v.into();
182 self
183 }
184
185 pub async fn send(self) -> Result<crate::model::Cluster> {
187 (*self.0.stub)
188 .get_cluster(self.0.request, self.0.options)
189 .await
190 .map(crate::Response::into_body)
191 }
192
193 #[deprecated]
195 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
196 self.0.request.project_id = v.into();
197 self
198 }
199
200 #[deprecated]
202 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
203 self.0.request.zone = v.into();
204 self
205 }
206
207 #[deprecated]
209 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
210 self.0.request.cluster_id = v.into();
211 self
212 }
213
214 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
216 self.0.request.name = v.into();
217 self
218 }
219 }
220
221 #[doc(hidden)]
222 impl crate::RequestBuilder for GetCluster {
223 fn request_options(&mut self) -> &mut crate::RequestOptions {
224 &mut self.0.options
225 }
226 }
227
228 #[derive(Clone, Debug)]
245 pub struct CreateCluster(RequestBuilder<crate::model::CreateClusterRequest>);
246
247 impl CreateCluster {
248 pub(crate) fn new(
249 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
250 ) -> Self {
251 Self(RequestBuilder::new(stub))
252 }
253
254 pub fn with_request<V: Into<crate::model::CreateClusterRequest>>(mut self, v: V) -> Self {
256 self.0.request = v.into();
257 self
258 }
259
260 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
262 self.0.options = v.into();
263 self
264 }
265
266 pub async fn send(self) -> Result<crate::model::Operation> {
268 (*self.0.stub)
269 .create_cluster(self.0.request, self.0.options)
270 .await
271 .map(crate::Response::into_body)
272 }
273
274 #[deprecated]
276 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
277 self.0.request.project_id = v.into();
278 self
279 }
280
281 #[deprecated]
283 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
284 self.0.request.zone = v.into();
285 self
286 }
287
288 pub fn set_cluster<T>(mut self, v: T) -> Self
292 where
293 T: std::convert::Into<crate::model::Cluster>,
294 {
295 self.0.request.cluster = std::option::Option::Some(v.into());
296 self
297 }
298
299 pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
303 where
304 T: std::convert::Into<crate::model::Cluster>,
305 {
306 self.0.request.cluster = v.map(|x| x.into());
307 self
308 }
309
310 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
312 self.0.request.parent = v.into();
313 self
314 }
315 }
316
317 #[doc(hidden)]
318 impl crate::RequestBuilder for CreateCluster {
319 fn request_options(&mut self) -> &mut crate::RequestOptions {
320 &mut self.0.options
321 }
322 }
323
324 #[derive(Clone, Debug)]
341 pub struct UpdateCluster(RequestBuilder<crate::model::UpdateClusterRequest>);
342
343 impl UpdateCluster {
344 pub(crate) fn new(
345 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
346 ) -> Self {
347 Self(RequestBuilder::new(stub))
348 }
349
350 pub fn with_request<V: Into<crate::model::UpdateClusterRequest>>(mut self, v: V) -> Self {
352 self.0.request = v.into();
353 self
354 }
355
356 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
358 self.0.options = v.into();
359 self
360 }
361
362 pub async fn send(self) -> Result<crate::model::Operation> {
364 (*self.0.stub)
365 .update_cluster(self.0.request, self.0.options)
366 .await
367 .map(crate::Response::into_body)
368 }
369
370 #[deprecated]
372 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
373 self.0.request.project_id = v.into();
374 self
375 }
376
377 #[deprecated]
379 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
380 self.0.request.zone = v.into();
381 self
382 }
383
384 #[deprecated]
386 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
387 self.0.request.cluster_id = v.into();
388 self
389 }
390
391 pub fn set_update<T>(mut self, v: T) -> Self
395 where
396 T: std::convert::Into<crate::model::ClusterUpdate>,
397 {
398 self.0.request.update = std::option::Option::Some(v.into());
399 self
400 }
401
402 pub fn set_or_clear_update<T>(mut self, v: std::option::Option<T>) -> Self
406 where
407 T: std::convert::Into<crate::model::ClusterUpdate>,
408 {
409 self.0.request.update = v.map(|x| x.into());
410 self
411 }
412
413 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
415 self.0.request.name = v.into();
416 self
417 }
418 }
419
420 #[doc(hidden)]
421 impl crate::RequestBuilder for UpdateCluster {
422 fn request_options(&mut self) -> &mut crate::RequestOptions {
423 &mut self.0.options
424 }
425 }
426
427 #[derive(Clone, Debug)]
444 pub struct UpdateNodePool(RequestBuilder<crate::model::UpdateNodePoolRequest>);
445
446 impl UpdateNodePool {
447 pub(crate) fn new(
448 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
449 ) -> Self {
450 Self(RequestBuilder::new(stub))
451 }
452
453 pub fn with_request<V: Into<crate::model::UpdateNodePoolRequest>>(mut self, v: V) -> Self {
455 self.0.request = v.into();
456 self
457 }
458
459 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
461 self.0.options = v.into();
462 self
463 }
464
465 pub async fn send(self) -> Result<crate::model::Operation> {
467 (*self.0.stub)
468 .update_node_pool(self.0.request, self.0.options)
469 .await
470 .map(crate::Response::into_body)
471 }
472
473 #[deprecated]
475 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
476 self.0.request.project_id = v.into();
477 self
478 }
479
480 #[deprecated]
482 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
483 self.0.request.zone = v.into();
484 self
485 }
486
487 #[deprecated]
489 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
490 self.0.request.cluster_id = v.into();
491 self
492 }
493
494 #[deprecated]
496 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
497 self.0.request.node_pool_id = v.into();
498 self
499 }
500
501 pub fn set_node_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
505 self.0.request.node_version = v.into();
506 self
507 }
508
509 pub fn set_image_type<T: Into<std::string::String>>(mut self, v: T) -> Self {
513 self.0.request.image_type = v.into();
514 self
515 }
516
517 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
519 self.0.request.name = v.into();
520 self
521 }
522
523 pub fn set_locations<T, V>(mut self, v: T) -> Self
525 where
526 T: std::iter::IntoIterator<Item = V>,
527 V: std::convert::Into<std::string::String>,
528 {
529 use std::iter::Iterator;
530 self.0.request.locations = v.into_iter().map(|i| i.into()).collect();
531 self
532 }
533
534 pub fn set_workload_metadata_config<T>(mut self, v: T) -> Self
536 where
537 T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
538 {
539 self.0.request.workload_metadata_config = std::option::Option::Some(v.into());
540 self
541 }
542
543 pub fn set_or_clear_workload_metadata_config<T>(mut self, v: std::option::Option<T>) -> Self
545 where
546 T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
547 {
548 self.0.request.workload_metadata_config = v.map(|x| x.into());
549 self
550 }
551
552 pub fn set_upgrade_settings<T>(mut self, v: T) -> Self
554 where
555 T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
556 {
557 self.0.request.upgrade_settings = std::option::Option::Some(v.into());
558 self
559 }
560
561 pub fn set_or_clear_upgrade_settings<T>(mut self, v: std::option::Option<T>) -> Self
563 where
564 T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
565 {
566 self.0.request.upgrade_settings = v.map(|x| x.into());
567 self
568 }
569
570 pub fn set_tags<T>(mut self, v: T) -> Self
572 where
573 T: std::convert::Into<crate::model::NetworkTags>,
574 {
575 self.0.request.tags = std::option::Option::Some(v.into());
576 self
577 }
578
579 pub fn set_or_clear_tags<T>(mut self, v: std::option::Option<T>) -> Self
581 where
582 T: std::convert::Into<crate::model::NetworkTags>,
583 {
584 self.0.request.tags = v.map(|x| x.into());
585 self
586 }
587
588 pub fn set_taints<T>(mut self, v: T) -> Self
590 where
591 T: std::convert::Into<crate::model::NodeTaints>,
592 {
593 self.0.request.taints = std::option::Option::Some(v.into());
594 self
595 }
596
597 pub fn set_or_clear_taints<T>(mut self, v: std::option::Option<T>) -> Self
599 where
600 T: std::convert::Into<crate::model::NodeTaints>,
601 {
602 self.0.request.taints = v.map(|x| x.into());
603 self
604 }
605
606 pub fn set_labels<T>(mut self, v: T) -> Self
608 where
609 T: std::convert::Into<crate::model::NodeLabels>,
610 {
611 self.0.request.labels = std::option::Option::Some(v.into());
612 self
613 }
614
615 pub fn set_or_clear_labels<T>(mut self, v: std::option::Option<T>) -> Self
617 where
618 T: std::convert::Into<crate::model::NodeLabels>,
619 {
620 self.0.request.labels = v.map(|x| x.into());
621 self
622 }
623
624 pub fn set_linux_node_config<T>(mut self, v: T) -> Self
626 where
627 T: std::convert::Into<crate::model::LinuxNodeConfig>,
628 {
629 self.0.request.linux_node_config = std::option::Option::Some(v.into());
630 self
631 }
632
633 pub fn set_or_clear_linux_node_config<T>(mut self, v: std::option::Option<T>) -> Self
635 where
636 T: std::convert::Into<crate::model::LinuxNodeConfig>,
637 {
638 self.0.request.linux_node_config = v.map(|x| x.into());
639 self
640 }
641
642 pub fn set_kubelet_config<T>(mut self, v: T) -> Self
644 where
645 T: std::convert::Into<crate::model::NodeKubeletConfig>,
646 {
647 self.0.request.kubelet_config = std::option::Option::Some(v.into());
648 self
649 }
650
651 pub fn set_or_clear_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
653 where
654 T: std::convert::Into<crate::model::NodeKubeletConfig>,
655 {
656 self.0.request.kubelet_config = v.map(|x| x.into());
657 self
658 }
659
660 pub fn set_node_network_config<T>(mut self, v: T) -> Self
662 where
663 T: std::convert::Into<crate::model::NodeNetworkConfig>,
664 {
665 self.0.request.node_network_config = std::option::Option::Some(v.into());
666 self
667 }
668
669 pub fn set_or_clear_node_network_config<T>(mut self, v: std::option::Option<T>) -> Self
671 where
672 T: std::convert::Into<crate::model::NodeNetworkConfig>,
673 {
674 self.0.request.node_network_config = v.map(|x| x.into());
675 self
676 }
677
678 pub fn set_gcfs_config<T>(mut self, v: T) -> Self
680 where
681 T: std::convert::Into<crate::model::GcfsConfig>,
682 {
683 self.0.request.gcfs_config = std::option::Option::Some(v.into());
684 self
685 }
686
687 pub fn set_or_clear_gcfs_config<T>(mut self, v: std::option::Option<T>) -> Self
689 where
690 T: std::convert::Into<crate::model::GcfsConfig>,
691 {
692 self.0.request.gcfs_config = v.map(|x| x.into());
693 self
694 }
695
696 pub fn set_confidential_nodes<T>(mut self, v: T) -> Self
698 where
699 T: std::convert::Into<crate::model::ConfidentialNodes>,
700 {
701 self.0.request.confidential_nodes = std::option::Option::Some(v.into());
702 self
703 }
704
705 pub fn set_or_clear_confidential_nodes<T>(mut self, v: std::option::Option<T>) -> Self
707 where
708 T: std::convert::Into<crate::model::ConfidentialNodes>,
709 {
710 self.0.request.confidential_nodes = v.map(|x| x.into());
711 self
712 }
713
714 pub fn set_gvnic<T>(mut self, v: T) -> Self
716 where
717 T: std::convert::Into<crate::model::VirtualNIC>,
718 {
719 self.0.request.gvnic = std::option::Option::Some(v.into());
720 self
721 }
722
723 pub fn set_or_clear_gvnic<T>(mut self, v: std::option::Option<T>) -> Self
725 where
726 T: std::convert::Into<crate::model::VirtualNIC>,
727 {
728 self.0.request.gvnic = v.map(|x| x.into());
729 self
730 }
731
732 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
734 self.0.request.etag = v.into();
735 self
736 }
737
738 pub fn set_fast_socket<T>(mut self, v: T) -> Self
740 where
741 T: std::convert::Into<crate::model::FastSocket>,
742 {
743 self.0.request.fast_socket = std::option::Option::Some(v.into());
744 self
745 }
746
747 pub fn set_or_clear_fast_socket<T>(mut self, v: std::option::Option<T>) -> Self
749 where
750 T: std::convert::Into<crate::model::FastSocket>,
751 {
752 self.0.request.fast_socket = v.map(|x| x.into());
753 self
754 }
755
756 pub fn set_logging_config<T>(mut self, v: T) -> Self
758 where
759 T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
760 {
761 self.0.request.logging_config = std::option::Option::Some(v.into());
762 self
763 }
764
765 pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
767 where
768 T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
769 {
770 self.0.request.logging_config = v.map(|x| x.into());
771 self
772 }
773
774 pub fn set_resource_labels<T>(mut self, v: T) -> Self
776 where
777 T: std::convert::Into<crate::model::ResourceLabels>,
778 {
779 self.0.request.resource_labels = std::option::Option::Some(v.into());
780 self
781 }
782
783 pub fn set_or_clear_resource_labels<T>(mut self, v: std::option::Option<T>) -> Self
785 where
786 T: std::convert::Into<crate::model::ResourceLabels>,
787 {
788 self.0.request.resource_labels = v.map(|x| x.into());
789 self
790 }
791
792 pub fn set_windows_node_config<T>(mut self, v: T) -> Self
794 where
795 T: std::convert::Into<crate::model::WindowsNodeConfig>,
796 {
797 self.0.request.windows_node_config = std::option::Option::Some(v.into());
798 self
799 }
800
801 pub fn set_or_clear_windows_node_config<T>(mut self, v: std::option::Option<T>) -> Self
803 where
804 T: std::convert::Into<crate::model::WindowsNodeConfig>,
805 {
806 self.0.request.windows_node_config = v.map(|x| x.into());
807 self
808 }
809
810 pub fn set_accelerators<T, V>(mut self, v: T) -> Self
812 where
813 T: std::iter::IntoIterator<Item = V>,
814 V: std::convert::Into<crate::model::AcceleratorConfig>,
815 {
816 use std::iter::Iterator;
817 self.0.request.accelerators = v.into_iter().map(|i| i.into()).collect();
818 self
819 }
820
821 pub fn set_machine_type<T: Into<std::string::String>>(mut self, v: T) -> Self {
823 self.0.request.machine_type = v.into();
824 self
825 }
826
827 pub fn set_disk_type<T: Into<std::string::String>>(mut self, v: T) -> Self {
829 self.0.request.disk_type = v.into();
830 self
831 }
832
833 pub fn set_disk_size_gb<T: Into<i64>>(mut self, v: T) -> Self {
835 self.0.request.disk_size_gb = v.into();
836 self
837 }
838
839 pub fn set_resource_manager_tags<T>(mut self, v: T) -> Self
841 where
842 T: std::convert::Into<crate::model::ResourceManagerTags>,
843 {
844 self.0.request.resource_manager_tags = std::option::Option::Some(v.into());
845 self
846 }
847
848 pub fn set_or_clear_resource_manager_tags<T>(mut self, v: std::option::Option<T>) -> Self
850 where
851 T: std::convert::Into<crate::model::ResourceManagerTags>,
852 {
853 self.0.request.resource_manager_tags = v.map(|x| x.into());
854 self
855 }
856
857 pub fn set_containerd_config<T>(mut self, v: T) -> Self
859 where
860 T: std::convert::Into<crate::model::ContainerdConfig>,
861 {
862 self.0.request.containerd_config = std::option::Option::Some(v.into());
863 self
864 }
865
866 pub fn set_or_clear_containerd_config<T>(mut self, v: std::option::Option<T>) -> Self
868 where
869 T: std::convert::Into<crate::model::ContainerdConfig>,
870 {
871 self.0.request.containerd_config = v.map(|x| x.into());
872 self
873 }
874
875 pub fn set_queued_provisioning<T>(mut self, v: T) -> Self
877 where
878 T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
879 {
880 self.0.request.queued_provisioning = std::option::Option::Some(v.into());
881 self
882 }
883
884 pub fn set_or_clear_queued_provisioning<T>(mut self, v: std::option::Option<T>) -> Self
886 where
887 T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
888 {
889 self.0.request.queued_provisioning = v.map(|x| x.into());
890 self
891 }
892
893 pub fn set_storage_pools<T, V>(mut self, v: T) -> Self
895 where
896 T: std::iter::IntoIterator<Item = V>,
897 V: std::convert::Into<std::string::String>,
898 {
899 use std::iter::Iterator;
900 self.0.request.storage_pools = v.into_iter().map(|i| i.into()).collect();
901 self
902 }
903
904 pub fn set_max_run_duration<T>(mut self, v: T) -> Self
906 where
907 T: std::convert::Into<wkt::Duration>,
908 {
909 self.0.request.max_run_duration = std::option::Option::Some(v.into());
910 self
911 }
912
913 pub fn set_or_clear_max_run_duration<T>(mut self, v: std::option::Option<T>) -> Self
915 where
916 T: std::convert::Into<wkt::Duration>,
917 {
918 self.0.request.max_run_duration = v.map(|x| x.into());
919 self
920 }
921
922 pub fn set_flex_start<T>(mut self, v: T) -> Self
924 where
925 T: std::convert::Into<bool>,
926 {
927 self.0.request.flex_start = std::option::Option::Some(v.into());
928 self
929 }
930
931 pub fn set_or_clear_flex_start<T>(mut self, v: std::option::Option<T>) -> Self
933 where
934 T: std::convert::Into<bool>,
935 {
936 self.0.request.flex_start = v.map(|x| x.into());
937 self
938 }
939
940 pub fn set_boot_disk<T>(mut self, v: T) -> Self
942 where
943 T: std::convert::Into<crate::model::BootDisk>,
944 {
945 self.0.request.boot_disk = std::option::Option::Some(v.into());
946 self
947 }
948
949 pub fn set_or_clear_boot_disk<T>(mut self, v: std::option::Option<T>) -> Self
951 where
952 T: std::convert::Into<crate::model::BootDisk>,
953 {
954 self.0.request.boot_disk = v.map(|x| x.into());
955 self
956 }
957
958 pub fn set_node_drain_config<T>(mut self, v: T) -> Self
960 where
961 T: std::convert::Into<crate::model::node_pool::NodeDrainConfig>,
962 {
963 self.0.request.node_drain_config = std::option::Option::Some(v.into());
964 self
965 }
966
967 pub fn set_or_clear_node_drain_config<T>(mut self, v: std::option::Option<T>) -> Self
969 where
970 T: std::convert::Into<crate::model::node_pool::NodeDrainConfig>,
971 {
972 self.0.request.node_drain_config = v.map(|x| x.into());
973 self
974 }
975
976 pub fn set_consolidation_delay<T>(mut self, v: T) -> Self
978 where
979 T: std::convert::Into<wkt::Duration>,
980 {
981 self.0.request.consolidation_delay = std::option::Option::Some(v.into());
982 self
983 }
984
985 pub fn set_or_clear_consolidation_delay<T>(mut self, v: std::option::Option<T>) -> Self
987 where
988 T: std::convert::Into<wkt::Duration>,
989 {
990 self.0.request.consolidation_delay = v.map(|x| x.into());
991 self
992 }
993 }
994
995 #[doc(hidden)]
996 impl crate::RequestBuilder for UpdateNodePool {
997 fn request_options(&mut self) -> &mut crate::RequestOptions {
998 &mut self.0.options
999 }
1000 }
1001
1002 #[derive(Clone, Debug)]
1019 pub struct SetNodePoolAutoscaling(RequestBuilder<crate::model::SetNodePoolAutoscalingRequest>);
1020
1021 impl SetNodePoolAutoscaling {
1022 pub(crate) fn new(
1023 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1024 ) -> Self {
1025 Self(RequestBuilder::new(stub))
1026 }
1027
1028 pub fn with_request<V: Into<crate::model::SetNodePoolAutoscalingRequest>>(
1030 mut self,
1031 v: V,
1032 ) -> Self {
1033 self.0.request = v.into();
1034 self
1035 }
1036
1037 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1039 self.0.options = v.into();
1040 self
1041 }
1042
1043 pub async fn send(self) -> Result<crate::model::Operation> {
1045 (*self.0.stub)
1046 .set_node_pool_autoscaling(self.0.request, self.0.options)
1047 .await
1048 .map(crate::Response::into_body)
1049 }
1050
1051 #[deprecated]
1053 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1054 self.0.request.project_id = v.into();
1055 self
1056 }
1057
1058 #[deprecated]
1060 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1061 self.0.request.zone = v.into();
1062 self
1063 }
1064
1065 #[deprecated]
1067 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1068 self.0.request.cluster_id = v.into();
1069 self
1070 }
1071
1072 #[deprecated]
1074 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1075 self.0.request.node_pool_id = v.into();
1076 self
1077 }
1078
1079 pub fn set_autoscaling<T>(mut self, v: T) -> Self
1083 where
1084 T: std::convert::Into<crate::model::NodePoolAutoscaling>,
1085 {
1086 self.0.request.autoscaling = std::option::Option::Some(v.into());
1087 self
1088 }
1089
1090 pub fn set_or_clear_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
1094 where
1095 T: std::convert::Into<crate::model::NodePoolAutoscaling>,
1096 {
1097 self.0.request.autoscaling = v.map(|x| x.into());
1098 self
1099 }
1100
1101 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1103 self.0.request.name = v.into();
1104 self
1105 }
1106 }
1107
1108 #[doc(hidden)]
1109 impl crate::RequestBuilder for SetNodePoolAutoscaling {
1110 fn request_options(&mut self) -> &mut crate::RequestOptions {
1111 &mut self.0.options
1112 }
1113 }
1114
1115 #[derive(Clone, Debug)]
1132 pub struct SetLoggingService(RequestBuilder<crate::model::SetLoggingServiceRequest>);
1133
1134 impl SetLoggingService {
1135 pub(crate) fn new(
1136 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1137 ) -> Self {
1138 Self(RequestBuilder::new(stub))
1139 }
1140
1141 pub fn with_request<V: Into<crate::model::SetLoggingServiceRequest>>(
1143 mut self,
1144 v: V,
1145 ) -> Self {
1146 self.0.request = v.into();
1147 self
1148 }
1149
1150 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1152 self.0.options = v.into();
1153 self
1154 }
1155
1156 pub async fn send(self) -> Result<crate::model::Operation> {
1158 (*self.0.stub)
1159 .set_logging_service(self.0.request, self.0.options)
1160 .await
1161 .map(crate::Response::into_body)
1162 }
1163
1164 #[deprecated]
1166 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1167 self.0.request.project_id = v.into();
1168 self
1169 }
1170
1171 #[deprecated]
1173 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1174 self.0.request.zone = v.into();
1175 self
1176 }
1177
1178 #[deprecated]
1180 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1181 self.0.request.cluster_id = v.into();
1182 self
1183 }
1184
1185 pub fn set_logging_service<T: Into<std::string::String>>(mut self, v: T) -> Self {
1189 self.0.request.logging_service = v.into();
1190 self
1191 }
1192
1193 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1195 self.0.request.name = v.into();
1196 self
1197 }
1198 }
1199
1200 #[doc(hidden)]
1201 impl crate::RequestBuilder for SetLoggingService {
1202 fn request_options(&mut self) -> &mut crate::RequestOptions {
1203 &mut self.0.options
1204 }
1205 }
1206
1207 #[derive(Clone, Debug)]
1224 pub struct SetMonitoringService(RequestBuilder<crate::model::SetMonitoringServiceRequest>);
1225
1226 impl SetMonitoringService {
1227 pub(crate) fn new(
1228 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1229 ) -> Self {
1230 Self(RequestBuilder::new(stub))
1231 }
1232
1233 pub fn with_request<V: Into<crate::model::SetMonitoringServiceRequest>>(
1235 mut self,
1236 v: V,
1237 ) -> Self {
1238 self.0.request = v.into();
1239 self
1240 }
1241
1242 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1244 self.0.options = v.into();
1245 self
1246 }
1247
1248 pub async fn send(self) -> Result<crate::model::Operation> {
1250 (*self.0.stub)
1251 .set_monitoring_service(self.0.request, self.0.options)
1252 .await
1253 .map(crate::Response::into_body)
1254 }
1255
1256 #[deprecated]
1258 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1259 self.0.request.project_id = v.into();
1260 self
1261 }
1262
1263 #[deprecated]
1265 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1266 self.0.request.zone = v.into();
1267 self
1268 }
1269
1270 #[deprecated]
1272 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1273 self.0.request.cluster_id = v.into();
1274 self
1275 }
1276
1277 pub fn set_monitoring_service<T: Into<std::string::String>>(mut self, v: T) -> Self {
1281 self.0.request.monitoring_service = v.into();
1282 self
1283 }
1284
1285 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1287 self.0.request.name = v.into();
1288 self
1289 }
1290 }
1291
1292 #[doc(hidden)]
1293 impl crate::RequestBuilder for SetMonitoringService {
1294 fn request_options(&mut self) -> &mut crate::RequestOptions {
1295 &mut self.0.options
1296 }
1297 }
1298
1299 #[derive(Clone, Debug)]
1316 pub struct SetAddonsConfig(RequestBuilder<crate::model::SetAddonsConfigRequest>);
1317
1318 impl SetAddonsConfig {
1319 pub(crate) fn new(
1320 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1321 ) -> Self {
1322 Self(RequestBuilder::new(stub))
1323 }
1324
1325 pub fn with_request<V: Into<crate::model::SetAddonsConfigRequest>>(mut self, v: V) -> Self {
1327 self.0.request = v.into();
1328 self
1329 }
1330
1331 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1333 self.0.options = v.into();
1334 self
1335 }
1336
1337 pub async fn send(self) -> Result<crate::model::Operation> {
1339 (*self.0.stub)
1340 .set_addons_config(self.0.request, self.0.options)
1341 .await
1342 .map(crate::Response::into_body)
1343 }
1344
1345 #[deprecated]
1347 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1348 self.0.request.project_id = v.into();
1349 self
1350 }
1351
1352 #[deprecated]
1354 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1355 self.0.request.zone = v.into();
1356 self
1357 }
1358
1359 #[deprecated]
1361 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1362 self.0.request.cluster_id = v.into();
1363 self
1364 }
1365
1366 pub fn set_addons_config<T>(mut self, v: T) -> Self
1370 where
1371 T: std::convert::Into<crate::model::AddonsConfig>,
1372 {
1373 self.0.request.addons_config = std::option::Option::Some(v.into());
1374 self
1375 }
1376
1377 pub fn set_or_clear_addons_config<T>(mut self, v: std::option::Option<T>) -> Self
1381 where
1382 T: std::convert::Into<crate::model::AddonsConfig>,
1383 {
1384 self.0.request.addons_config = v.map(|x| x.into());
1385 self
1386 }
1387
1388 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1390 self.0.request.name = v.into();
1391 self
1392 }
1393 }
1394
1395 #[doc(hidden)]
1396 impl crate::RequestBuilder for SetAddonsConfig {
1397 fn request_options(&mut self) -> &mut crate::RequestOptions {
1398 &mut self.0.options
1399 }
1400 }
1401
1402 #[derive(Clone, Debug)]
1419 pub struct SetLocations(RequestBuilder<crate::model::SetLocationsRequest>);
1420
1421 impl SetLocations {
1422 pub(crate) fn new(
1423 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1424 ) -> Self {
1425 Self(RequestBuilder::new(stub))
1426 }
1427
1428 pub fn with_request<V: Into<crate::model::SetLocationsRequest>>(mut self, v: V) -> Self {
1430 self.0.request = v.into();
1431 self
1432 }
1433
1434 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1436 self.0.options = v.into();
1437 self
1438 }
1439
1440 pub async fn send(self) -> Result<crate::model::Operation> {
1442 (*self.0.stub)
1443 .set_locations(self.0.request, self.0.options)
1444 .await
1445 .map(crate::Response::into_body)
1446 }
1447
1448 #[deprecated]
1450 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1451 self.0.request.project_id = v.into();
1452 self
1453 }
1454
1455 #[deprecated]
1457 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1458 self.0.request.zone = v.into();
1459 self
1460 }
1461
1462 #[deprecated]
1464 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1465 self.0.request.cluster_id = v.into();
1466 self
1467 }
1468
1469 pub fn set_locations<T, V>(mut self, v: T) -> Self
1473 where
1474 T: std::iter::IntoIterator<Item = V>,
1475 V: std::convert::Into<std::string::String>,
1476 {
1477 use std::iter::Iterator;
1478 self.0.request.locations = v.into_iter().map(|i| i.into()).collect();
1479 self
1480 }
1481
1482 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1484 self.0.request.name = v.into();
1485 self
1486 }
1487 }
1488
1489 #[doc(hidden)]
1490 impl crate::RequestBuilder for SetLocations {
1491 fn request_options(&mut self) -> &mut crate::RequestOptions {
1492 &mut self.0.options
1493 }
1494 }
1495
1496 #[derive(Clone, Debug)]
1513 pub struct UpdateMaster(RequestBuilder<crate::model::UpdateMasterRequest>);
1514
1515 impl UpdateMaster {
1516 pub(crate) fn new(
1517 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1518 ) -> Self {
1519 Self(RequestBuilder::new(stub))
1520 }
1521
1522 pub fn with_request<V: Into<crate::model::UpdateMasterRequest>>(mut self, v: V) -> Self {
1524 self.0.request = v.into();
1525 self
1526 }
1527
1528 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1530 self.0.options = v.into();
1531 self
1532 }
1533
1534 pub async fn send(self) -> Result<crate::model::Operation> {
1536 (*self.0.stub)
1537 .update_master(self.0.request, self.0.options)
1538 .await
1539 .map(crate::Response::into_body)
1540 }
1541
1542 #[deprecated]
1544 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1545 self.0.request.project_id = v.into();
1546 self
1547 }
1548
1549 #[deprecated]
1551 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1552 self.0.request.zone = v.into();
1553 self
1554 }
1555
1556 #[deprecated]
1558 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1559 self.0.request.cluster_id = v.into();
1560 self
1561 }
1562
1563 pub fn set_master_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
1567 self.0.request.master_version = v.into();
1568 self
1569 }
1570
1571 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1573 self.0.request.name = v.into();
1574 self
1575 }
1576 }
1577
1578 #[doc(hidden)]
1579 impl crate::RequestBuilder for UpdateMaster {
1580 fn request_options(&mut self) -> &mut crate::RequestOptions {
1581 &mut self.0.options
1582 }
1583 }
1584
1585 #[derive(Clone, Debug)]
1602 pub struct SetMasterAuth(RequestBuilder<crate::model::SetMasterAuthRequest>);
1603
1604 impl SetMasterAuth {
1605 pub(crate) fn new(
1606 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1607 ) -> Self {
1608 Self(RequestBuilder::new(stub))
1609 }
1610
1611 pub fn with_request<V: Into<crate::model::SetMasterAuthRequest>>(mut self, v: V) -> Self {
1613 self.0.request = v.into();
1614 self
1615 }
1616
1617 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1619 self.0.options = v.into();
1620 self
1621 }
1622
1623 pub async fn send(self) -> Result<crate::model::Operation> {
1625 (*self.0.stub)
1626 .set_master_auth(self.0.request, self.0.options)
1627 .await
1628 .map(crate::Response::into_body)
1629 }
1630
1631 #[deprecated]
1633 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1634 self.0.request.project_id = v.into();
1635 self
1636 }
1637
1638 #[deprecated]
1640 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1641 self.0.request.zone = v.into();
1642 self
1643 }
1644
1645 #[deprecated]
1647 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1648 self.0.request.cluster_id = v.into();
1649 self
1650 }
1651
1652 pub fn set_action<T: Into<crate::model::set_master_auth_request::Action>>(
1656 mut self,
1657 v: T,
1658 ) -> Self {
1659 self.0.request.action = v.into();
1660 self
1661 }
1662
1663 pub fn set_update<T>(mut self, v: T) -> Self
1667 where
1668 T: std::convert::Into<crate::model::MasterAuth>,
1669 {
1670 self.0.request.update = std::option::Option::Some(v.into());
1671 self
1672 }
1673
1674 pub fn set_or_clear_update<T>(mut self, v: std::option::Option<T>) -> Self
1678 where
1679 T: std::convert::Into<crate::model::MasterAuth>,
1680 {
1681 self.0.request.update = v.map(|x| x.into());
1682 self
1683 }
1684
1685 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1687 self.0.request.name = v.into();
1688 self
1689 }
1690 }
1691
1692 #[doc(hidden)]
1693 impl crate::RequestBuilder for SetMasterAuth {
1694 fn request_options(&mut self) -> &mut crate::RequestOptions {
1695 &mut self.0.options
1696 }
1697 }
1698
1699 #[derive(Clone, Debug)]
1716 pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
1717
1718 impl DeleteCluster {
1719 pub(crate) fn new(
1720 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1721 ) -> Self {
1722 Self(RequestBuilder::new(stub))
1723 }
1724
1725 pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
1727 self.0.request = v.into();
1728 self
1729 }
1730
1731 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1733 self.0.options = v.into();
1734 self
1735 }
1736
1737 pub async fn send(self) -> Result<crate::model::Operation> {
1739 (*self.0.stub)
1740 .delete_cluster(self.0.request, self.0.options)
1741 .await
1742 .map(crate::Response::into_body)
1743 }
1744
1745 #[deprecated]
1747 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1748 self.0.request.project_id = v.into();
1749 self
1750 }
1751
1752 #[deprecated]
1754 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1755 self.0.request.zone = v.into();
1756 self
1757 }
1758
1759 #[deprecated]
1761 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1762 self.0.request.cluster_id = v.into();
1763 self
1764 }
1765
1766 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1768 self.0.request.name = v.into();
1769 self
1770 }
1771 }
1772
1773 #[doc(hidden)]
1774 impl crate::RequestBuilder for DeleteCluster {
1775 fn request_options(&mut self) -> &mut crate::RequestOptions {
1776 &mut self.0.options
1777 }
1778 }
1779
1780 #[derive(Clone, Debug)]
1797 pub struct ListOperations(RequestBuilder<crate::model::ListOperationsRequest>);
1798
1799 impl ListOperations {
1800 pub(crate) fn new(
1801 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1802 ) -> Self {
1803 Self(RequestBuilder::new(stub))
1804 }
1805
1806 pub fn with_request<V: Into<crate::model::ListOperationsRequest>>(mut self, v: V) -> Self {
1808 self.0.request = v.into();
1809 self
1810 }
1811
1812 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1814 self.0.options = v.into();
1815 self
1816 }
1817
1818 pub async fn send(self) -> Result<crate::model::ListOperationsResponse> {
1820 (*self.0.stub)
1821 .list_operations(self.0.request, self.0.options)
1822 .await
1823 .map(crate::Response::into_body)
1824 }
1825
1826 #[deprecated]
1828 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1829 self.0.request.project_id = v.into();
1830 self
1831 }
1832
1833 #[deprecated]
1835 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1836 self.0.request.zone = v.into();
1837 self
1838 }
1839
1840 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1842 self.0.request.parent = v.into();
1843 self
1844 }
1845 }
1846
1847 #[doc(hidden)]
1848 impl crate::RequestBuilder for ListOperations {
1849 fn request_options(&mut self) -> &mut crate::RequestOptions {
1850 &mut self.0.options
1851 }
1852 }
1853
1854 #[derive(Clone, Debug)]
1871 pub struct GetOperation(RequestBuilder<crate::model::GetOperationRequest>);
1872
1873 impl GetOperation {
1874 pub(crate) fn new(
1875 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1876 ) -> Self {
1877 Self(RequestBuilder::new(stub))
1878 }
1879
1880 pub fn with_request<V: Into<crate::model::GetOperationRequest>>(mut self, v: V) -> Self {
1882 self.0.request = v.into();
1883 self
1884 }
1885
1886 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1888 self.0.options = v.into();
1889 self
1890 }
1891
1892 pub async fn send(self) -> Result<crate::model::Operation> {
1894 (*self.0.stub)
1895 .get_operation(self.0.request, self.0.options)
1896 .await
1897 .map(crate::Response::into_body)
1898 }
1899
1900 #[deprecated]
1902 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1903 self.0.request.project_id = v.into();
1904 self
1905 }
1906
1907 #[deprecated]
1909 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1910 self.0.request.zone = v.into();
1911 self
1912 }
1913
1914 #[deprecated]
1916 pub fn set_operation_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1917 self.0.request.operation_id = v.into();
1918 self
1919 }
1920
1921 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1923 self.0.request.name = v.into();
1924 self
1925 }
1926 }
1927
1928 #[doc(hidden)]
1929 impl crate::RequestBuilder for GetOperation {
1930 fn request_options(&mut self) -> &mut crate::RequestOptions {
1931 &mut self.0.options
1932 }
1933 }
1934
1935 #[derive(Clone, Debug)]
1952 pub struct CancelOperation(RequestBuilder<crate::model::CancelOperationRequest>);
1953
1954 impl CancelOperation {
1955 pub(crate) fn new(
1956 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1957 ) -> Self {
1958 Self(RequestBuilder::new(stub))
1959 }
1960
1961 pub fn with_request<V: Into<crate::model::CancelOperationRequest>>(mut self, v: V) -> Self {
1963 self.0.request = v.into();
1964 self
1965 }
1966
1967 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1969 self.0.options = v.into();
1970 self
1971 }
1972
1973 pub async fn send(self) -> Result<()> {
1975 (*self.0.stub)
1976 .cancel_operation(self.0.request, self.0.options)
1977 .await
1978 .map(crate::Response::into_body)
1979 }
1980
1981 #[deprecated]
1983 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1984 self.0.request.project_id = v.into();
1985 self
1986 }
1987
1988 #[deprecated]
1990 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1991 self.0.request.zone = v.into();
1992 self
1993 }
1994
1995 #[deprecated]
1997 pub fn set_operation_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1998 self.0.request.operation_id = v.into();
1999 self
2000 }
2001
2002 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2004 self.0.request.name = v.into();
2005 self
2006 }
2007 }
2008
2009 #[doc(hidden)]
2010 impl crate::RequestBuilder for CancelOperation {
2011 fn request_options(&mut self) -> &mut crate::RequestOptions {
2012 &mut self.0.options
2013 }
2014 }
2015
2016 #[derive(Clone, Debug)]
2033 pub struct GetServerConfig(RequestBuilder<crate::model::GetServerConfigRequest>);
2034
2035 impl GetServerConfig {
2036 pub(crate) fn new(
2037 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2038 ) -> Self {
2039 Self(RequestBuilder::new(stub))
2040 }
2041
2042 pub fn with_request<V: Into<crate::model::GetServerConfigRequest>>(mut self, v: V) -> Self {
2044 self.0.request = v.into();
2045 self
2046 }
2047
2048 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2050 self.0.options = v.into();
2051 self
2052 }
2053
2054 pub async fn send(self) -> Result<crate::model::ServerConfig> {
2056 (*self.0.stub)
2057 .get_server_config(self.0.request, self.0.options)
2058 .await
2059 .map(crate::Response::into_body)
2060 }
2061
2062 #[deprecated]
2064 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2065 self.0.request.project_id = v.into();
2066 self
2067 }
2068
2069 #[deprecated]
2071 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2072 self.0.request.zone = v.into();
2073 self
2074 }
2075
2076 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2078 self.0.request.name = v.into();
2079 self
2080 }
2081 }
2082
2083 #[doc(hidden)]
2084 impl crate::RequestBuilder for GetServerConfig {
2085 fn request_options(&mut self) -> &mut crate::RequestOptions {
2086 &mut self.0.options
2087 }
2088 }
2089
2090 #[derive(Clone, Debug)]
2107 pub struct GetJSONWebKeys(RequestBuilder<crate::model::GetJSONWebKeysRequest>);
2108
2109 impl GetJSONWebKeys {
2110 pub(crate) fn new(
2111 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2112 ) -> Self {
2113 Self(RequestBuilder::new(stub))
2114 }
2115
2116 pub fn with_request<V: Into<crate::model::GetJSONWebKeysRequest>>(mut self, v: V) -> Self {
2118 self.0.request = v.into();
2119 self
2120 }
2121
2122 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2124 self.0.options = v.into();
2125 self
2126 }
2127
2128 pub async fn send(self) -> Result<crate::model::GetJSONWebKeysResponse> {
2130 (*self.0.stub)
2131 .get_json_web_keys(self.0.request, self.0.options)
2132 .await
2133 .map(crate::Response::into_body)
2134 }
2135
2136 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2138 self.0.request.parent = v.into();
2139 self
2140 }
2141 }
2142
2143 #[doc(hidden)]
2144 impl crate::RequestBuilder for GetJSONWebKeys {
2145 fn request_options(&mut self) -> &mut crate::RequestOptions {
2146 &mut self.0.options
2147 }
2148 }
2149
2150 #[derive(Clone, Debug)]
2167 pub struct ListNodePools(RequestBuilder<crate::model::ListNodePoolsRequest>);
2168
2169 impl ListNodePools {
2170 pub(crate) fn new(
2171 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2172 ) -> Self {
2173 Self(RequestBuilder::new(stub))
2174 }
2175
2176 pub fn with_request<V: Into<crate::model::ListNodePoolsRequest>>(mut self, v: V) -> Self {
2178 self.0.request = v.into();
2179 self
2180 }
2181
2182 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2184 self.0.options = v.into();
2185 self
2186 }
2187
2188 pub async fn send(self) -> Result<crate::model::ListNodePoolsResponse> {
2190 (*self.0.stub)
2191 .list_node_pools(self.0.request, self.0.options)
2192 .await
2193 .map(crate::Response::into_body)
2194 }
2195
2196 #[deprecated]
2198 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2199 self.0.request.project_id = v.into();
2200 self
2201 }
2202
2203 #[deprecated]
2205 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2206 self.0.request.zone = v.into();
2207 self
2208 }
2209
2210 #[deprecated]
2212 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2213 self.0.request.cluster_id = v.into();
2214 self
2215 }
2216
2217 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2219 self.0.request.parent = v.into();
2220 self
2221 }
2222 }
2223
2224 #[doc(hidden)]
2225 impl crate::RequestBuilder for ListNodePools {
2226 fn request_options(&mut self) -> &mut crate::RequestOptions {
2227 &mut self.0.options
2228 }
2229 }
2230
2231 #[derive(Clone, Debug)]
2248 pub struct GetNodePool(RequestBuilder<crate::model::GetNodePoolRequest>);
2249
2250 impl GetNodePool {
2251 pub(crate) fn new(
2252 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2253 ) -> Self {
2254 Self(RequestBuilder::new(stub))
2255 }
2256
2257 pub fn with_request<V: Into<crate::model::GetNodePoolRequest>>(mut self, v: V) -> Self {
2259 self.0.request = v.into();
2260 self
2261 }
2262
2263 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2265 self.0.options = v.into();
2266 self
2267 }
2268
2269 pub async fn send(self) -> Result<crate::model::NodePool> {
2271 (*self.0.stub)
2272 .get_node_pool(self.0.request, self.0.options)
2273 .await
2274 .map(crate::Response::into_body)
2275 }
2276
2277 #[deprecated]
2279 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2280 self.0.request.project_id = v.into();
2281 self
2282 }
2283
2284 #[deprecated]
2286 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2287 self.0.request.zone = v.into();
2288 self
2289 }
2290
2291 #[deprecated]
2293 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2294 self.0.request.cluster_id = v.into();
2295 self
2296 }
2297
2298 #[deprecated]
2300 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2301 self.0.request.node_pool_id = v.into();
2302 self
2303 }
2304
2305 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2307 self.0.request.name = v.into();
2308 self
2309 }
2310 }
2311
2312 #[doc(hidden)]
2313 impl crate::RequestBuilder for GetNodePool {
2314 fn request_options(&mut self) -> &mut crate::RequestOptions {
2315 &mut self.0.options
2316 }
2317 }
2318
2319 #[derive(Clone, Debug)]
2336 pub struct CreateNodePool(RequestBuilder<crate::model::CreateNodePoolRequest>);
2337
2338 impl CreateNodePool {
2339 pub(crate) fn new(
2340 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2341 ) -> Self {
2342 Self(RequestBuilder::new(stub))
2343 }
2344
2345 pub fn with_request<V: Into<crate::model::CreateNodePoolRequest>>(mut self, v: V) -> Self {
2347 self.0.request = v.into();
2348 self
2349 }
2350
2351 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2353 self.0.options = v.into();
2354 self
2355 }
2356
2357 pub async fn send(self) -> Result<crate::model::Operation> {
2359 (*self.0.stub)
2360 .create_node_pool(self.0.request, self.0.options)
2361 .await
2362 .map(crate::Response::into_body)
2363 }
2364
2365 #[deprecated]
2367 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2368 self.0.request.project_id = v.into();
2369 self
2370 }
2371
2372 #[deprecated]
2374 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2375 self.0.request.zone = v.into();
2376 self
2377 }
2378
2379 #[deprecated]
2381 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2382 self.0.request.cluster_id = v.into();
2383 self
2384 }
2385
2386 pub fn set_node_pool<T>(mut self, v: T) -> Self
2390 where
2391 T: std::convert::Into<crate::model::NodePool>,
2392 {
2393 self.0.request.node_pool = std::option::Option::Some(v.into());
2394 self
2395 }
2396
2397 pub fn set_or_clear_node_pool<T>(mut self, v: std::option::Option<T>) -> Self
2401 where
2402 T: std::convert::Into<crate::model::NodePool>,
2403 {
2404 self.0.request.node_pool = v.map(|x| x.into());
2405 self
2406 }
2407
2408 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2410 self.0.request.parent = v.into();
2411 self
2412 }
2413 }
2414
2415 #[doc(hidden)]
2416 impl crate::RequestBuilder for CreateNodePool {
2417 fn request_options(&mut self) -> &mut crate::RequestOptions {
2418 &mut self.0.options
2419 }
2420 }
2421
2422 #[derive(Clone, Debug)]
2439 pub struct DeleteNodePool(RequestBuilder<crate::model::DeleteNodePoolRequest>);
2440
2441 impl DeleteNodePool {
2442 pub(crate) fn new(
2443 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2444 ) -> Self {
2445 Self(RequestBuilder::new(stub))
2446 }
2447
2448 pub fn with_request<V: Into<crate::model::DeleteNodePoolRequest>>(mut self, v: V) -> Self {
2450 self.0.request = v.into();
2451 self
2452 }
2453
2454 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2456 self.0.options = v.into();
2457 self
2458 }
2459
2460 pub async fn send(self) -> Result<crate::model::Operation> {
2462 (*self.0.stub)
2463 .delete_node_pool(self.0.request, self.0.options)
2464 .await
2465 .map(crate::Response::into_body)
2466 }
2467
2468 #[deprecated]
2470 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2471 self.0.request.project_id = v.into();
2472 self
2473 }
2474
2475 #[deprecated]
2477 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2478 self.0.request.zone = v.into();
2479 self
2480 }
2481
2482 #[deprecated]
2484 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2485 self.0.request.cluster_id = v.into();
2486 self
2487 }
2488
2489 #[deprecated]
2491 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2492 self.0.request.node_pool_id = v.into();
2493 self
2494 }
2495
2496 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2498 self.0.request.name = v.into();
2499 self
2500 }
2501 }
2502
2503 #[doc(hidden)]
2504 impl crate::RequestBuilder for DeleteNodePool {
2505 fn request_options(&mut self) -> &mut crate::RequestOptions {
2506 &mut self.0.options
2507 }
2508 }
2509
2510 #[derive(Clone, Debug)]
2527 pub struct CompleteNodePoolUpgrade(
2528 RequestBuilder<crate::model::CompleteNodePoolUpgradeRequest>,
2529 );
2530
2531 impl CompleteNodePoolUpgrade {
2532 pub(crate) fn new(
2533 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2534 ) -> Self {
2535 Self(RequestBuilder::new(stub))
2536 }
2537
2538 pub fn with_request<V: Into<crate::model::CompleteNodePoolUpgradeRequest>>(
2540 mut self,
2541 v: V,
2542 ) -> Self {
2543 self.0.request = v.into();
2544 self
2545 }
2546
2547 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2549 self.0.options = v.into();
2550 self
2551 }
2552
2553 pub async fn send(self) -> Result<()> {
2555 (*self.0.stub)
2556 .complete_node_pool_upgrade(self.0.request, self.0.options)
2557 .await
2558 .map(crate::Response::into_body)
2559 }
2560
2561 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2563 self.0.request.name = v.into();
2564 self
2565 }
2566 }
2567
2568 #[doc(hidden)]
2569 impl crate::RequestBuilder for CompleteNodePoolUpgrade {
2570 fn request_options(&mut self) -> &mut crate::RequestOptions {
2571 &mut self.0.options
2572 }
2573 }
2574
2575 #[derive(Clone, Debug)]
2592 pub struct RollbackNodePoolUpgrade(
2593 RequestBuilder<crate::model::RollbackNodePoolUpgradeRequest>,
2594 );
2595
2596 impl RollbackNodePoolUpgrade {
2597 pub(crate) fn new(
2598 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2599 ) -> Self {
2600 Self(RequestBuilder::new(stub))
2601 }
2602
2603 pub fn with_request<V: Into<crate::model::RollbackNodePoolUpgradeRequest>>(
2605 mut self,
2606 v: V,
2607 ) -> Self {
2608 self.0.request = v.into();
2609 self
2610 }
2611
2612 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2614 self.0.options = v.into();
2615 self
2616 }
2617
2618 pub async fn send(self) -> Result<crate::model::Operation> {
2620 (*self.0.stub)
2621 .rollback_node_pool_upgrade(self.0.request, self.0.options)
2622 .await
2623 .map(crate::Response::into_body)
2624 }
2625
2626 #[deprecated]
2628 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2629 self.0.request.project_id = v.into();
2630 self
2631 }
2632
2633 #[deprecated]
2635 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2636 self.0.request.zone = v.into();
2637 self
2638 }
2639
2640 #[deprecated]
2642 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2643 self.0.request.cluster_id = v.into();
2644 self
2645 }
2646
2647 #[deprecated]
2649 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2650 self.0.request.node_pool_id = v.into();
2651 self
2652 }
2653
2654 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 pub fn set_respect_pdb<T: Into<bool>>(mut self, v: T) -> Self {
2662 self.0.request.respect_pdb = v.into();
2663 self
2664 }
2665 }
2666
2667 #[doc(hidden)]
2668 impl crate::RequestBuilder for RollbackNodePoolUpgrade {
2669 fn request_options(&mut self) -> &mut crate::RequestOptions {
2670 &mut self.0.options
2671 }
2672 }
2673
2674 #[derive(Clone, Debug)]
2691 pub struct SetNodePoolManagement(RequestBuilder<crate::model::SetNodePoolManagementRequest>);
2692
2693 impl SetNodePoolManagement {
2694 pub(crate) fn new(
2695 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2696 ) -> Self {
2697 Self(RequestBuilder::new(stub))
2698 }
2699
2700 pub fn with_request<V: Into<crate::model::SetNodePoolManagementRequest>>(
2702 mut self,
2703 v: V,
2704 ) -> Self {
2705 self.0.request = v.into();
2706 self
2707 }
2708
2709 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2711 self.0.options = v.into();
2712 self
2713 }
2714
2715 pub async fn send(self) -> Result<crate::model::Operation> {
2717 (*self.0.stub)
2718 .set_node_pool_management(self.0.request, self.0.options)
2719 .await
2720 .map(crate::Response::into_body)
2721 }
2722
2723 #[deprecated]
2725 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2726 self.0.request.project_id = v.into();
2727 self
2728 }
2729
2730 #[deprecated]
2732 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2733 self.0.request.zone = v.into();
2734 self
2735 }
2736
2737 #[deprecated]
2739 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2740 self.0.request.cluster_id = v.into();
2741 self
2742 }
2743
2744 #[deprecated]
2746 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2747 self.0.request.node_pool_id = v.into();
2748 self
2749 }
2750
2751 pub fn set_management<T>(mut self, v: T) -> Self
2755 where
2756 T: std::convert::Into<crate::model::NodeManagement>,
2757 {
2758 self.0.request.management = std::option::Option::Some(v.into());
2759 self
2760 }
2761
2762 pub fn set_or_clear_management<T>(mut self, v: std::option::Option<T>) -> Self
2766 where
2767 T: std::convert::Into<crate::model::NodeManagement>,
2768 {
2769 self.0.request.management = v.map(|x| x.into());
2770 self
2771 }
2772
2773 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2775 self.0.request.name = v.into();
2776 self
2777 }
2778 }
2779
2780 #[doc(hidden)]
2781 impl crate::RequestBuilder for SetNodePoolManagement {
2782 fn request_options(&mut self) -> &mut crate::RequestOptions {
2783 &mut self.0.options
2784 }
2785 }
2786
2787 #[derive(Clone, Debug)]
2804 pub struct SetLabels(RequestBuilder<crate::model::SetLabelsRequest>);
2805
2806 impl SetLabels {
2807 pub(crate) fn new(
2808 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2809 ) -> Self {
2810 Self(RequestBuilder::new(stub))
2811 }
2812
2813 pub fn with_request<V: Into<crate::model::SetLabelsRequest>>(mut self, v: V) -> Self {
2815 self.0.request = v.into();
2816 self
2817 }
2818
2819 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2821 self.0.options = v.into();
2822 self
2823 }
2824
2825 pub async fn send(self) -> Result<crate::model::Operation> {
2827 (*self.0.stub)
2828 .set_labels(self.0.request, self.0.options)
2829 .await
2830 .map(crate::Response::into_body)
2831 }
2832
2833 #[deprecated]
2835 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2836 self.0.request.project_id = v.into();
2837 self
2838 }
2839
2840 #[deprecated]
2842 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2843 self.0.request.zone = v.into();
2844 self
2845 }
2846
2847 #[deprecated]
2849 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2850 self.0.request.cluster_id = v.into();
2851 self
2852 }
2853
2854 pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
2858 where
2859 T: std::iter::IntoIterator<Item = (K, V)>,
2860 K: std::convert::Into<std::string::String>,
2861 V: std::convert::Into<std::string::String>,
2862 {
2863 self.0.request.resource_labels =
2864 v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2865 self
2866 }
2867
2868 pub fn set_label_fingerprint<T: Into<std::string::String>>(mut self, v: T) -> Self {
2872 self.0.request.label_fingerprint = v.into();
2873 self
2874 }
2875
2876 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2878 self.0.request.name = v.into();
2879 self
2880 }
2881 }
2882
2883 #[doc(hidden)]
2884 impl crate::RequestBuilder for SetLabels {
2885 fn request_options(&mut self) -> &mut crate::RequestOptions {
2886 &mut self.0.options
2887 }
2888 }
2889
2890 #[derive(Clone, Debug)]
2907 pub struct SetLegacyAbac(RequestBuilder<crate::model::SetLegacyAbacRequest>);
2908
2909 impl SetLegacyAbac {
2910 pub(crate) fn new(
2911 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2912 ) -> Self {
2913 Self(RequestBuilder::new(stub))
2914 }
2915
2916 pub fn with_request<V: Into<crate::model::SetLegacyAbacRequest>>(mut self, v: V) -> Self {
2918 self.0.request = v.into();
2919 self
2920 }
2921
2922 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2924 self.0.options = v.into();
2925 self
2926 }
2927
2928 pub async fn send(self) -> Result<crate::model::Operation> {
2930 (*self.0.stub)
2931 .set_legacy_abac(self.0.request, self.0.options)
2932 .await
2933 .map(crate::Response::into_body)
2934 }
2935
2936 #[deprecated]
2938 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2939 self.0.request.project_id = v.into();
2940 self
2941 }
2942
2943 #[deprecated]
2945 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2946 self.0.request.zone = v.into();
2947 self
2948 }
2949
2950 #[deprecated]
2952 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2953 self.0.request.cluster_id = v.into();
2954 self
2955 }
2956
2957 pub fn set_enabled<T: Into<bool>>(mut self, v: T) -> Self {
2961 self.0.request.enabled = v.into();
2962 self
2963 }
2964
2965 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2967 self.0.request.name = v.into();
2968 self
2969 }
2970 }
2971
2972 #[doc(hidden)]
2973 impl crate::RequestBuilder for SetLegacyAbac {
2974 fn request_options(&mut self) -> &mut crate::RequestOptions {
2975 &mut self.0.options
2976 }
2977 }
2978
2979 #[derive(Clone, Debug)]
2996 pub struct StartIPRotation(RequestBuilder<crate::model::StartIPRotationRequest>);
2997
2998 impl StartIPRotation {
2999 pub(crate) fn new(
3000 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3001 ) -> Self {
3002 Self(RequestBuilder::new(stub))
3003 }
3004
3005 pub fn with_request<V: Into<crate::model::StartIPRotationRequest>>(mut self, v: V) -> Self {
3007 self.0.request = v.into();
3008 self
3009 }
3010
3011 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3013 self.0.options = v.into();
3014 self
3015 }
3016
3017 pub async fn send(self) -> Result<crate::model::Operation> {
3019 (*self.0.stub)
3020 .start_ip_rotation(self.0.request, self.0.options)
3021 .await
3022 .map(crate::Response::into_body)
3023 }
3024
3025 #[deprecated]
3027 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3028 self.0.request.project_id = v.into();
3029 self
3030 }
3031
3032 #[deprecated]
3034 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3035 self.0.request.zone = v.into();
3036 self
3037 }
3038
3039 #[deprecated]
3041 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3042 self.0.request.cluster_id = v.into();
3043 self
3044 }
3045
3046 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3048 self.0.request.name = v.into();
3049 self
3050 }
3051
3052 pub fn set_rotate_credentials<T: Into<bool>>(mut self, v: T) -> Self {
3054 self.0.request.rotate_credentials = v.into();
3055 self
3056 }
3057 }
3058
3059 #[doc(hidden)]
3060 impl crate::RequestBuilder for StartIPRotation {
3061 fn request_options(&mut self) -> &mut crate::RequestOptions {
3062 &mut self.0.options
3063 }
3064 }
3065
3066 #[derive(Clone, Debug)]
3083 pub struct CompleteIPRotation(RequestBuilder<crate::model::CompleteIPRotationRequest>);
3084
3085 impl CompleteIPRotation {
3086 pub(crate) fn new(
3087 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3088 ) -> Self {
3089 Self(RequestBuilder::new(stub))
3090 }
3091
3092 pub fn with_request<V: Into<crate::model::CompleteIPRotationRequest>>(
3094 mut self,
3095 v: V,
3096 ) -> Self {
3097 self.0.request = v.into();
3098 self
3099 }
3100
3101 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3103 self.0.options = v.into();
3104 self
3105 }
3106
3107 pub async fn send(self) -> Result<crate::model::Operation> {
3109 (*self.0.stub)
3110 .complete_ip_rotation(self.0.request, self.0.options)
3111 .await
3112 .map(crate::Response::into_body)
3113 }
3114
3115 #[deprecated]
3117 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3118 self.0.request.project_id = v.into();
3119 self
3120 }
3121
3122 #[deprecated]
3124 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3125 self.0.request.zone = v.into();
3126 self
3127 }
3128
3129 #[deprecated]
3131 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3132 self.0.request.cluster_id = v.into();
3133 self
3134 }
3135
3136 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3138 self.0.request.name = v.into();
3139 self
3140 }
3141 }
3142
3143 #[doc(hidden)]
3144 impl crate::RequestBuilder for CompleteIPRotation {
3145 fn request_options(&mut self) -> &mut crate::RequestOptions {
3146 &mut self.0.options
3147 }
3148 }
3149
3150 #[derive(Clone, Debug)]
3167 pub struct SetNodePoolSize(RequestBuilder<crate::model::SetNodePoolSizeRequest>);
3168
3169 impl SetNodePoolSize {
3170 pub(crate) fn new(
3171 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3172 ) -> Self {
3173 Self(RequestBuilder::new(stub))
3174 }
3175
3176 pub fn with_request<V: Into<crate::model::SetNodePoolSizeRequest>>(mut self, v: V) -> Self {
3178 self.0.request = v.into();
3179 self
3180 }
3181
3182 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3184 self.0.options = v.into();
3185 self
3186 }
3187
3188 pub async fn send(self) -> Result<crate::model::Operation> {
3190 (*self.0.stub)
3191 .set_node_pool_size(self.0.request, self.0.options)
3192 .await
3193 .map(crate::Response::into_body)
3194 }
3195
3196 #[deprecated]
3198 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3199 self.0.request.project_id = v.into();
3200 self
3201 }
3202
3203 #[deprecated]
3205 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3206 self.0.request.zone = v.into();
3207 self
3208 }
3209
3210 #[deprecated]
3212 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3213 self.0.request.cluster_id = v.into();
3214 self
3215 }
3216
3217 #[deprecated]
3219 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3220 self.0.request.node_pool_id = v.into();
3221 self
3222 }
3223
3224 pub fn set_node_count<T: Into<i32>>(mut self, v: T) -> Self {
3228 self.0.request.node_count = v.into();
3229 self
3230 }
3231
3232 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3234 self.0.request.name = v.into();
3235 self
3236 }
3237 }
3238
3239 #[doc(hidden)]
3240 impl crate::RequestBuilder for SetNodePoolSize {
3241 fn request_options(&mut self) -> &mut crate::RequestOptions {
3242 &mut self.0.options
3243 }
3244 }
3245
3246 #[derive(Clone, Debug)]
3263 pub struct SetNetworkPolicy(RequestBuilder<crate::model::SetNetworkPolicyRequest>);
3264
3265 impl SetNetworkPolicy {
3266 pub(crate) fn new(
3267 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3268 ) -> Self {
3269 Self(RequestBuilder::new(stub))
3270 }
3271
3272 pub fn with_request<V: Into<crate::model::SetNetworkPolicyRequest>>(
3274 mut self,
3275 v: V,
3276 ) -> Self {
3277 self.0.request = v.into();
3278 self
3279 }
3280
3281 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3283 self.0.options = v.into();
3284 self
3285 }
3286
3287 pub async fn send(self) -> Result<crate::model::Operation> {
3289 (*self.0.stub)
3290 .set_network_policy(self.0.request, self.0.options)
3291 .await
3292 .map(crate::Response::into_body)
3293 }
3294
3295 #[deprecated]
3297 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3298 self.0.request.project_id = v.into();
3299 self
3300 }
3301
3302 #[deprecated]
3304 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3305 self.0.request.zone = v.into();
3306 self
3307 }
3308
3309 #[deprecated]
3311 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3312 self.0.request.cluster_id = v.into();
3313 self
3314 }
3315
3316 pub fn set_network_policy<T>(mut self, v: T) -> Self
3320 where
3321 T: std::convert::Into<crate::model::NetworkPolicy>,
3322 {
3323 self.0.request.network_policy = std::option::Option::Some(v.into());
3324 self
3325 }
3326
3327 pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
3331 where
3332 T: std::convert::Into<crate::model::NetworkPolicy>,
3333 {
3334 self.0.request.network_policy = v.map(|x| x.into());
3335 self
3336 }
3337
3338 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3340 self.0.request.name = v.into();
3341 self
3342 }
3343 }
3344
3345 #[doc(hidden)]
3346 impl crate::RequestBuilder for SetNetworkPolicy {
3347 fn request_options(&mut self) -> &mut crate::RequestOptions {
3348 &mut self.0.options
3349 }
3350 }
3351
3352 #[derive(Clone, Debug)]
3369 pub struct SetMaintenancePolicy(RequestBuilder<crate::model::SetMaintenancePolicyRequest>);
3370
3371 impl SetMaintenancePolicy {
3372 pub(crate) fn new(
3373 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3374 ) -> Self {
3375 Self(RequestBuilder::new(stub))
3376 }
3377
3378 pub fn with_request<V: Into<crate::model::SetMaintenancePolicyRequest>>(
3380 mut self,
3381 v: V,
3382 ) -> Self {
3383 self.0.request = v.into();
3384 self
3385 }
3386
3387 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3389 self.0.options = v.into();
3390 self
3391 }
3392
3393 pub async fn send(self) -> Result<crate::model::Operation> {
3395 (*self.0.stub)
3396 .set_maintenance_policy(self.0.request, self.0.options)
3397 .await
3398 .map(crate::Response::into_body)
3399 }
3400
3401 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3405 self.0.request.project_id = v.into();
3406 self
3407 }
3408
3409 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3413 self.0.request.zone = v.into();
3414 self
3415 }
3416
3417 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3421 self.0.request.cluster_id = v.into();
3422 self
3423 }
3424
3425 pub fn set_maintenance_policy<T>(mut self, v: T) -> Self
3429 where
3430 T: std::convert::Into<crate::model::MaintenancePolicy>,
3431 {
3432 self.0.request.maintenance_policy = std::option::Option::Some(v.into());
3433 self
3434 }
3435
3436 pub fn set_or_clear_maintenance_policy<T>(mut self, v: std::option::Option<T>) -> Self
3440 where
3441 T: std::convert::Into<crate::model::MaintenancePolicy>,
3442 {
3443 self.0.request.maintenance_policy = v.map(|x| x.into());
3444 self
3445 }
3446
3447 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3449 self.0.request.name = v.into();
3450 self
3451 }
3452 }
3453
3454 #[doc(hidden)]
3455 impl crate::RequestBuilder for SetMaintenancePolicy {
3456 fn request_options(&mut self) -> &mut crate::RequestOptions {
3457 &mut self.0.options
3458 }
3459 }
3460
3461 #[derive(Clone, Debug)]
3482 pub struct ListUsableSubnetworks(RequestBuilder<crate::model::ListUsableSubnetworksRequest>);
3483
3484 impl ListUsableSubnetworks {
3485 pub(crate) fn new(
3486 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3487 ) -> Self {
3488 Self(RequestBuilder::new(stub))
3489 }
3490
3491 pub fn with_request<V: Into<crate::model::ListUsableSubnetworksRequest>>(
3493 mut self,
3494 v: V,
3495 ) -> Self {
3496 self.0.request = v.into();
3497 self
3498 }
3499
3500 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3502 self.0.options = v.into();
3503 self
3504 }
3505
3506 pub async fn send(self) -> Result<crate::model::ListUsableSubnetworksResponse> {
3508 (*self.0.stub)
3509 .list_usable_subnetworks(self.0.request, self.0.options)
3510 .await
3511 .map(crate::Response::into_body)
3512 }
3513
3514 pub fn by_page(
3516 self,
3517 ) -> impl google_cloud_gax::paginator::Paginator<
3518 crate::model::ListUsableSubnetworksResponse,
3519 crate::Error,
3520 > {
3521 use std::clone::Clone;
3522 let token = self.0.request.page_token.clone();
3523 let execute = move |token: String| {
3524 let mut builder = self.clone();
3525 builder.0.request = builder.0.request.set_page_token(token);
3526 builder.send()
3527 };
3528 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3529 }
3530
3531 pub fn by_item(
3533 self,
3534 ) -> impl google_cloud_gax::paginator::ItemPaginator<
3535 crate::model::ListUsableSubnetworksResponse,
3536 crate::Error,
3537 > {
3538 use google_cloud_gax::paginator::Paginator;
3539 self.by_page().items()
3540 }
3541
3542 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3544 self.0.request.parent = v.into();
3545 self
3546 }
3547
3548 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3550 self.0.request.filter = v.into();
3551 self
3552 }
3553
3554 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3556 self.0.request.page_size = v.into();
3557 self
3558 }
3559
3560 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3562 self.0.request.page_token = v.into();
3563 self
3564 }
3565 }
3566
3567 #[doc(hidden)]
3568 impl crate::RequestBuilder for ListUsableSubnetworks {
3569 fn request_options(&mut self) -> &mut crate::RequestOptions {
3570 &mut self.0.options
3571 }
3572 }
3573
3574 #[derive(Clone, Debug)]
3591 pub struct CheckAutopilotCompatibility(
3592 RequestBuilder<crate::model::CheckAutopilotCompatibilityRequest>,
3593 );
3594
3595 impl CheckAutopilotCompatibility {
3596 pub(crate) fn new(
3597 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3598 ) -> Self {
3599 Self(RequestBuilder::new(stub))
3600 }
3601
3602 pub fn with_request<V: Into<crate::model::CheckAutopilotCompatibilityRequest>>(
3604 mut self,
3605 v: V,
3606 ) -> Self {
3607 self.0.request = v.into();
3608 self
3609 }
3610
3611 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3613 self.0.options = v.into();
3614 self
3615 }
3616
3617 pub async fn send(self) -> Result<crate::model::CheckAutopilotCompatibilityResponse> {
3619 (*self.0.stub)
3620 .check_autopilot_compatibility(self.0.request, self.0.options)
3621 .await
3622 .map(crate::Response::into_body)
3623 }
3624
3625 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3627 self.0.request.name = v.into();
3628 self
3629 }
3630 }
3631
3632 #[doc(hidden)]
3633 impl crate::RequestBuilder for CheckAutopilotCompatibility {
3634 fn request_options(&mut self) -> &mut crate::RequestOptions {
3635 &mut self.0.options
3636 }
3637 }
3638
3639 #[derive(Clone, Debug)]
3656 pub struct FetchClusterUpgradeInfo(
3657 RequestBuilder<crate::model::FetchClusterUpgradeInfoRequest>,
3658 );
3659
3660 impl FetchClusterUpgradeInfo {
3661 pub(crate) fn new(
3662 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3663 ) -> Self {
3664 Self(RequestBuilder::new(stub))
3665 }
3666
3667 pub fn with_request<V: Into<crate::model::FetchClusterUpgradeInfoRequest>>(
3669 mut self,
3670 v: V,
3671 ) -> Self {
3672 self.0.request = v.into();
3673 self
3674 }
3675
3676 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3678 self.0.options = v.into();
3679 self
3680 }
3681
3682 pub async fn send(self) -> Result<crate::model::ClusterUpgradeInfo> {
3684 (*self.0.stub)
3685 .fetch_cluster_upgrade_info(self.0.request, self.0.options)
3686 .await
3687 .map(crate::Response::into_body)
3688 }
3689
3690 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3694 self.0.request.name = v.into();
3695 self
3696 }
3697
3698 pub fn set_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
3700 self.0.request.version = v.into();
3701 self
3702 }
3703 }
3704
3705 #[doc(hidden)]
3706 impl crate::RequestBuilder for FetchClusterUpgradeInfo {
3707 fn request_options(&mut self) -> &mut crate::RequestOptions {
3708 &mut self.0.options
3709 }
3710 }
3711
3712 #[derive(Clone, Debug)]
3729 pub struct FetchNodePoolUpgradeInfo(
3730 RequestBuilder<crate::model::FetchNodePoolUpgradeInfoRequest>,
3731 );
3732
3733 impl FetchNodePoolUpgradeInfo {
3734 pub(crate) fn new(
3735 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3736 ) -> Self {
3737 Self(RequestBuilder::new(stub))
3738 }
3739
3740 pub fn with_request<V: Into<crate::model::FetchNodePoolUpgradeInfoRequest>>(
3742 mut self,
3743 v: V,
3744 ) -> Self {
3745 self.0.request = v.into();
3746 self
3747 }
3748
3749 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3751 self.0.options = v.into();
3752 self
3753 }
3754
3755 pub async fn send(self) -> Result<crate::model::NodePoolUpgradeInfo> {
3757 (*self.0.stub)
3758 .fetch_node_pool_upgrade_info(self.0.request, self.0.options)
3759 .await
3760 .map(crate::Response::into_body)
3761 }
3762
3763 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3767 self.0.request.name = v.into();
3768 self
3769 }
3770
3771 pub fn set_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
3773 self.0.request.version = v.into();
3774 self
3775 }
3776 }
3777
3778 #[doc(hidden)]
3779 impl crate::RequestBuilder for FetchNodePoolUpgradeInfo {
3780 fn request_options(&mut self) -> &mut crate::RequestOptions {
3781 &mut self.0.options
3782 }
3783 }
3784}