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
960 #[doc(hidden)]
961 impl gax::options::internal::RequestBuilder for UpdateNodePool {
962 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
963 &mut self.0.options
964 }
965 }
966
967 #[derive(Clone, Debug)]
984 pub struct SetNodePoolAutoscaling(RequestBuilder<crate::model::SetNodePoolAutoscalingRequest>);
985
986 impl SetNodePoolAutoscaling {
987 pub(crate) fn new(
988 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
989 ) -> Self {
990 Self(RequestBuilder::new(stub))
991 }
992
993 pub fn with_request<V: Into<crate::model::SetNodePoolAutoscalingRequest>>(
995 mut self,
996 v: V,
997 ) -> Self {
998 self.0.request = v.into();
999 self
1000 }
1001
1002 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1004 self.0.options = v.into();
1005 self
1006 }
1007
1008 pub async fn send(self) -> Result<crate::model::Operation> {
1010 (*self.0.stub)
1011 .set_node_pool_autoscaling(self.0.request, self.0.options)
1012 .await
1013 .map(gax::response::Response::into_body)
1014 }
1015
1016 #[deprecated]
1018 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1019 self.0.request.project_id = v.into();
1020 self
1021 }
1022
1023 #[deprecated]
1025 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1026 self.0.request.zone = v.into();
1027 self
1028 }
1029
1030 #[deprecated]
1032 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1033 self.0.request.cluster_id = v.into();
1034 self
1035 }
1036
1037 #[deprecated]
1039 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1040 self.0.request.node_pool_id = v.into();
1041 self
1042 }
1043
1044 pub fn set_autoscaling<T>(mut self, v: T) -> Self
1048 where
1049 T: std::convert::Into<crate::model::NodePoolAutoscaling>,
1050 {
1051 self.0.request.autoscaling = std::option::Option::Some(v.into());
1052 self
1053 }
1054
1055 pub fn set_or_clear_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
1059 where
1060 T: std::convert::Into<crate::model::NodePoolAutoscaling>,
1061 {
1062 self.0.request.autoscaling = v.map(|x| x.into());
1063 self
1064 }
1065
1066 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1068 self.0.request.name = v.into();
1069 self
1070 }
1071 }
1072
1073 #[doc(hidden)]
1074 impl gax::options::internal::RequestBuilder for SetNodePoolAutoscaling {
1075 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1076 &mut self.0.options
1077 }
1078 }
1079
1080 #[derive(Clone, Debug)]
1097 pub struct SetLoggingService(RequestBuilder<crate::model::SetLoggingServiceRequest>);
1098
1099 impl SetLoggingService {
1100 pub(crate) fn new(
1101 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1102 ) -> Self {
1103 Self(RequestBuilder::new(stub))
1104 }
1105
1106 pub fn with_request<V: Into<crate::model::SetLoggingServiceRequest>>(
1108 mut self,
1109 v: V,
1110 ) -> Self {
1111 self.0.request = v.into();
1112 self
1113 }
1114
1115 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1117 self.0.options = v.into();
1118 self
1119 }
1120
1121 pub async fn send(self) -> Result<crate::model::Operation> {
1123 (*self.0.stub)
1124 .set_logging_service(self.0.request, self.0.options)
1125 .await
1126 .map(gax::response::Response::into_body)
1127 }
1128
1129 #[deprecated]
1131 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1132 self.0.request.project_id = v.into();
1133 self
1134 }
1135
1136 #[deprecated]
1138 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1139 self.0.request.zone = v.into();
1140 self
1141 }
1142
1143 #[deprecated]
1145 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1146 self.0.request.cluster_id = v.into();
1147 self
1148 }
1149
1150 pub fn set_logging_service<T: Into<std::string::String>>(mut self, v: T) -> Self {
1154 self.0.request.logging_service = v.into();
1155 self
1156 }
1157
1158 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1160 self.0.request.name = v.into();
1161 self
1162 }
1163 }
1164
1165 #[doc(hidden)]
1166 impl gax::options::internal::RequestBuilder for SetLoggingService {
1167 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1168 &mut self.0.options
1169 }
1170 }
1171
1172 #[derive(Clone, Debug)]
1189 pub struct SetMonitoringService(RequestBuilder<crate::model::SetMonitoringServiceRequest>);
1190
1191 impl SetMonitoringService {
1192 pub(crate) fn new(
1193 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1194 ) -> Self {
1195 Self(RequestBuilder::new(stub))
1196 }
1197
1198 pub fn with_request<V: Into<crate::model::SetMonitoringServiceRequest>>(
1200 mut self,
1201 v: V,
1202 ) -> Self {
1203 self.0.request = v.into();
1204 self
1205 }
1206
1207 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1209 self.0.options = v.into();
1210 self
1211 }
1212
1213 pub async fn send(self) -> Result<crate::model::Operation> {
1215 (*self.0.stub)
1216 .set_monitoring_service(self.0.request, self.0.options)
1217 .await
1218 .map(gax::response::Response::into_body)
1219 }
1220
1221 #[deprecated]
1223 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1224 self.0.request.project_id = v.into();
1225 self
1226 }
1227
1228 #[deprecated]
1230 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1231 self.0.request.zone = v.into();
1232 self
1233 }
1234
1235 #[deprecated]
1237 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1238 self.0.request.cluster_id = v.into();
1239 self
1240 }
1241
1242 pub fn set_monitoring_service<T: Into<std::string::String>>(mut self, v: T) -> Self {
1246 self.0.request.monitoring_service = v.into();
1247 self
1248 }
1249
1250 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1252 self.0.request.name = v.into();
1253 self
1254 }
1255 }
1256
1257 #[doc(hidden)]
1258 impl gax::options::internal::RequestBuilder for SetMonitoringService {
1259 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1260 &mut self.0.options
1261 }
1262 }
1263
1264 #[derive(Clone, Debug)]
1281 pub struct SetAddonsConfig(RequestBuilder<crate::model::SetAddonsConfigRequest>);
1282
1283 impl SetAddonsConfig {
1284 pub(crate) fn new(
1285 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1286 ) -> Self {
1287 Self(RequestBuilder::new(stub))
1288 }
1289
1290 pub fn with_request<V: Into<crate::model::SetAddonsConfigRequest>>(mut self, v: V) -> Self {
1292 self.0.request = v.into();
1293 self
1294 }
1295
1296 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1298 self.0.options = v.into();
1299 self
1300 }
1301
1302 pub async fn send(self) -> Result<crate::model::Operation> {
1304 (*self.0.stub)
1305 .set_addons_config(self.0.request, self.0.options)
1306 .await
1307 .map(gax::response::Response::into_body)
1308 }
1309
1310 #[deprecated]
1312 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1313 self.0.request.project_id = v.into();
1314 self
1315 }
1316
1317 #[deprecated]
1319 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1320 self.0.request.zone = v.into();
1321 self
1322 }
1323
1324 #[deprecated]
1326 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1327 self.0.request.cluster_id = v.into();
1328 self
1329 }
1330
1331 pub fn set_addons_config<T>(mut self, v: T) -> Self
1335 where
1336 T: std::convert::Into<crate::model::AddonsConfig>,
1337 {
1338 self.0.request.addons_config = std::option::Option::Some(v.into());
1339 self
1340 }
1341
1342 pub fn set_or_clear_addons_config<T>(mut self, v: std::option::Option<T>) -> Self
1346 where
1347 T: std::convert::Into<crate::model::AddonsConfig>,
1348 {
1349 self.0.request.addons_config = v.map(|x| x.into());
1350 self
1351 }
1352
1353 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1355 self.0.request.name = v.into();
1356 self
1357 }
1358 }
1359
1360 #[doc(hidden)]
1361 impl gax::options::internal::RequestBuilder for SetAddonsConfig {
1362 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1363 &mut self.0.options
1364 }
1365 }
1366
1367 #[derive(Clone, Debug)]
1384 pub struct SetLocations(RequestBuilder<crate::model::SetLocationsRequest>);
1385
1386 impl SetLocations {
1387 pub(crate) fn new(
1388 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1389 ) -> Self {
1390 Self(RequestBuilder::new(stub))
1391 }
1392
1393 pub fn with_request<V: Into<crate::model::SetLocationsRequest>>(mut self, v: V) -> Self {
1395 self.0.request = v.into();
1396 self
1397 }
1398
1399 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1401 self.0.options = v.into();
1402 self
1403 }
1404
1405 pub async fn send(self) -> Result<crate::model::Operation> {
1407 (*self.0.stub)
1408 .set_locations(self.0.request, self.0.options)
1409 .await
1410 .map(gax::response::Response::into_body)
1411 }
1412
1413 #[deprecated]
1415 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1416 self.0.request.project_id = v.into();
1417 self
1418 }
1419
1420 #[deprecated]
1422 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1423 self.0.request.zone = v.into();
1424 self
1425 }
1426
1427 #[deprecated]
1429 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1430 self.0.request.cluster_id = v.into();
1431 self
1432 }
1433
1434 pub fn set_locations<T, V>(mut self, v: T) -> Self
1438 where
1439 T: std::iter::IntoIterator<Item = V>,
1440 V: std::convert::Into<std::string::String>,
1441 {
1442 use std::iter::Iterator;
1443 self.0.request.locations = v.into_iter().map(|i| i.into()).collect();
1444 self
1445 }
1446
1447 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1449 self.0.request.name = v.into();
1450 self
1451 }
1452 }
1453
1454 #[doc(hidden)]
1455 impl gax::options::internal::RequestBuilder for SetLocations {
1456 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1457 &mut self.0.options
1458 }
1459 }
1460
1461 #[derive(Clone, Debug)]
1478 pub struct UpdateMaster(RequestBuilder<crate::model::UpdateMasterRequest>);
1479
1480 impl UpdateMaster {
1481 pub(crate) fn new(
1482 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1483 ) -> Self {
1484 Self(RequestBuilder::new(stub))
1485 }
1486
1487 pub fn with_request<V: Into<crate::model::UpdateMasterRequest>>(mut self, v: V) -> Self {
1489 self.0.request = v.into();
1490 self
1491 }
1492
1493 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1495 self.0.options = v.into();
1496 self
1497 }
1498
1499 pub async fn send(self) -> Result<crate::model::Operation> {
1501 (*self.0.stub)
1502 .update_master(self.0.request, self.0.options)
1503 .await
1504 .map(gax::response::Response::into_body)
1505 }
1506
1507 #[deprecated]
1509 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1510 self.0.request.project_id = v.into();
1511 self
1512 }
1513
1514 #[deprecated]
1516 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1517 self.0.request.zone = v.into();
1518 self
1519 }
1520
1521 #[deprecated]
1523 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1524 self.0.request.cluster_id = v.into();
1525 self
1526 }
1527
1528 pub fn set_master_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
1532 self.0.request.master_version = v.into();
1533 self
1534 }
1535
1536 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1538 self.0.request.name = v.into();
1539 self
1540 }
1541 }
1542
1543 #[doc(hidden)]
1544 impl gax::options::internal::RequestBuilder for UpdateMaster {
1545 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1546 &mut self.0.options
1547 }
1548 }
1549
1550 #[derive(Clone, Debug)]
1567 pub struct SetMasterAuth(RequestBuilder<crate::model::SetMasterAuthRequest>);
1568
1569 impl SetMasterAuth {
1570 pub(crate) fn new(
1571 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1572 ) -> Self {
1573 Self(RequestBuilder::new(stub))
1574 }
1575
1576 pub fn with_request<V: Into<crate::model::SetMasterAuthRequest>>(mut self, v: V) -> Self {
1578 self.0.request = v.into();
1579 self
1580 }
1581
1582 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1584 self.0.options = v.into();
1585 self
1586 }
1587
1588 pub async fn send(self) -> Result<crate::model::Operation> {
1590 (*self.0.stub)
1591 .set_master_auth(self.0.request, self.0.options)
1592 .await
1593 .map(gax::response::Response::into_body)
1594 }
1595
1596 #[deprecated]
1598 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1599 self.0.request.project_id = v.into();
1600 self
1601 }
1602
1603 #[deprecated]
1605 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1606 self.0.request.zone = v.into();
1607 self
1608 }
1609
1610 #[deprecated]
1612 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1613 self.0.request.cluster_id = v.into();
1614 self
1615 }
1616
1617 pub fn set_action<T: Into<crate::model::set_master_auth_request::Action>>(
1621 mut self,
1622 v: T,
1623 ) -> Self {
1624 self.0.request.action = v.into();
1625 self
1626 }
1627
1628 pub fn set_update<T>(mut self, v: T) -> Self
1632 where
1633 T: std::convert::Into<crate::model::MasterAuth>,
1634 {
1635 self.0.request.update = std::option::Option::Some(v.into());
1636 self
1637 }
1638
1639 pub fn set_or_clear_update<T>(mut self, v: std::option::Option<T>) -> Self
1643 where
1644 T: std::convert::Into<crate::model::MasterAuth>,
1645 {
1646 self.0.request.update = v.map(|x| x.into());
1647 self
1648 }
1649
1650 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1652 self.0.request.name = v.into();
1653 self
1654 }
1655 }
1656
1657 #[doc(hidden)]
1658 impl gax::options::internal::RequestBuilder for SetMasterAuth {
1659 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1660 &mut self.0.options
1661 }
1662 }
1663
1664 #[derive(Clone, Debug)]
1681 pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
1682
1683 impl DeleteCluster {
1684 pub(crate) fn new(
1685 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1686 ) -> Self {
1687 Self(RequestBuilder::new(stub))
1688 }
1689
1690 pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
1692 self.0.request = v.into();
1693 self
1694 }
1695
1696 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1698 self.0.options = v.into();
1699 self
1700 }
1701
1702 pub async fn send(self) -> Result<crate::model::Operation> {
1704 (*self.0.stub)
1705 .delete_cluster(self.0.request, self.0.options)
1706 .await
1707 .map(gax::response::Response::into_body)
1708 }
1709
1710 #[deprecated]
1712 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1713 self.0.request.project_id = v.into();
1714 self
1715 }
1716
1717 #[deprecated]
1719 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1720 self.0.request.zone = v.into();
1721 self
1722 }
1723
1724 #[deprecated]
1726 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1727 self.0.request.cluster_id = v.into();
1728 self
1729 }
1730
1731 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1733 self.0.request.name = v.into();
1734 self
1735 }
1736 }
1737
1738 #[doc(hidden)]
1739 impl gax::options::internal::RequestBuilder for DeleteCluster {
1740 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1741 &mut self.0.options
1742 }
1743 }
1744
1745 #[derive(Clone, Debug)]
1762 pub struct ListOperations(RequestBuilder<crate::model::ListOperationsRequest>);
1763
1764 impl ListOperations {
1765 pub(crate) fn new(
1766 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1767 ) -> Self {
1768 Self(RequestBuilder::new(stub))
1769 }
1770
1771 pub fn with_request<V: Into<crate::model::ListOperationsRequest>>(mut self, v: V) -> Self {
1773 self.0.request = v.into();
1774 self
1775 }
1776
1777 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1779 self.0.options = v.into();
1780 self
1781 }
1782
1783 pub async fn send(self) -> Result<crate::model::ListOperationsResponse> {
1785 (*self.0.stub)
1786 .list_operations(self.0.request, self.0.options)
1787 .await
1788 .map(gax::response::Response::into_body)
1789 }
1790
1791 #[deprecated]
1793 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1794 self.0.request.project_id = v.into();
1795 self
1796 }
1797
1798 #[deprecated]
1800 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1801 self.0.request.zone = v.into();
1802 self
1803 }
1804
1805 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1807 self.0.request.parent = v.into();
1808 self
1809 }
1810 }
1811
1812 #[doc(hidden)]
1813 impl gax::options::internal::RequestBuilder for ListOperations {
1814 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1815 &mut self.0.options
1816 }
1817 }
1818
1819 #[derive(Clone, Debug)]
1836 pub struct GetOperation(RequestBuilder<crate::model::GetOperationRequest>);
1837
1838 impl GetOperation {
1839 pub(crate) fn new(
1840 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1841 ) -> Self {
1842 Self(RequestBuilder::new(stub))
1843 }
1844
1845 pub fn with_request<V: Into<crate::model::GetOperationRequest>>(mut self, v: V) -> Self {
1847 self.0.request = v.into();
1848 self
1849 }
1850
1851 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1853 self.0.options = v.into();
1854 self
1855 }
1856
1857 pub async fn send(self) -> Result<crate::model::Operation> {
1859 (*self.0.stub)
1860 .get_operation(self.0.request, self.0.options)
1861 .await
1862 .map(gax::response::Response::into_body)
1863 }
1864
1865 #[deprecated]
1867 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1868 self.0.request.project_id = v.into();
1869 self
1870 }
1871
1872 #[deprecated]
1874 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1875 self.0.request.zone = v.into();
1876 self
1877 }
1878
1879 #[deprecated]
1881 pub fn set_operation_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1882 self.0.request.operation_id = v.into();
1883 self
1884 }
1885
1886 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1888 self.0.request.name = v.into();
1889 self
1890 }
1891 }
1892
1893 #[doc(hidden)]
1894 impl gax::options::internal::RequestBuilder for GetOperation {
1895 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1896 &mut self.0.options
1897 }
1898 }
1899
1900 #[derive(Clone, Debug)]
1917 pub struct CancelOperation(RequestBuilder<crate::model::CancelOperationRequest>);
1918
1919 impl CancelOperation {
1920 pub(crate) fn new(
1921 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1922 ) -> Self {
1923 Self(RequestBuilder::new(stub))
1924 }
1925
1926 pub fn with_request<V: Into<crate::model::CancelOperationRequest>>(mut self, v: V) -> Self {
1928 self.0.request = v.into();
1929 self
1930 }
1931
1932 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1934 self.0.options = v.into();
1935 self
1936 }
1937
1938 pub async fn send(self) -> Result<()> {
1940 (*self.0.stub)
1941 .cancel_operation(self.0.request, self.0.options)
1942 .await
1943 .map(gax::response::Response::into_body)
1944 }
1945
1946 #[deprecated]
1948 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1949 self.0.request.project_id = v.into();
1950 self
1951 }
1952
1953 #[deprecated]
1955 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1956 self.0.request.zone = v.into();
1957 self
1958 }
1959
1960 #[deprecated]
1962 pub fn set_operation_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1963 self.0.request.operation_id = v.into();
1964 self
1965 }
1966
1967 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1969 self.0.request.name = v.into();
1970 self
1971 }
1972 }
1973
1974 #[doc(hidden)]
1975 impl gax::options::internal::RequestBuilder for CancelOperation {
1976 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1977 &mut self.0.options
1978 }
1979 }
1980
1981 #[derive(Clone, Debug)]
1998 pub struct GetServerConfig(RequestBuilder<crate::model::GetServerConfigRequest>);
1999
2000 impl GetServerConfig {
2001 pub(crate) fn new(
2002 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2003 ) -> Self {
2004 Self(RequestBuilder::new(stub))
2005 }
2006
2007 pub fn with_request<V: Into<crate::model::GetServerConfigRequest>>(mut self, v: V) -> Self {
2009 self.0.request = v.into();
2010 self
2011 }
2012
2013 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2015 self.0.options = v.into();
2016 self
2017 }
2018
2019 pub async fn send(self) -> Result<crate::model::ServerConfig> {
2021 (*self.0.stub)
2022 .get_server_config(self.0.request, self.0.options)
2023 .await
2024 .map(gax::response::Response::into_body)
2025 }
2026
2027 #[deprecated]
2029 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2030 self.0.request.project_id = v.into();
2031 self
2032 }
2033
2034 #[deprecated]
2036 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2037 self.0.request.zone = v.into();
2038 self
2039 }
2040
2041 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2043 self.0.request.name = v.into();
2044 self
2045 }
2046 }
2047
2048 #[doc(hidden)]
2049 impl gax::options::internal::RequestBuilder for GetServerConfig {
2050 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2051 &mut self.0.options
2052 }
2053 }
2054
2055 #[derive(Clone, Debug)]
2072 pub struct GetJSONWebKeys(RequestBuilder<crate::model::GetJSONWebKeysRequest>);
2073
2074 impl GetJSONWebKeys {
2075 pub(crate) fn new(
2076 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2077 ) -> Self {
2078 Self(RequestBuilder::new(stub))
2079 }
2080
2081 pub fn with_request<V: Into<crate::model::GetJSONWebKeysRequest>>(mut self, v: V) -> Self {
2083 self.0.request = v.into();
2084 self
2085 }
2086
2087 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2089 self.0.options = v.into();
2090 self
2091 }
2092
2093 pub async fn send(self) -> Result<crate::model::GetJSONWebKeysResponse> {
2095 (*self.0.stub)
2096 .get_json_web_keys(self.0.request, self.0.options)
2097 .await
2098 .map(gax::response::Response::into_body)
2099 }
2100
2101 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2103 self.0.request.parent = v.into();
2104 self
2105 }
2106 }
2107
2108 #[doc(hidden)]
2109 impl gax::options::internal::RequestBuilder for GetJSONWebKeys {
2110 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2111 &mut self.0.options
2112 }
2113 }
2114
2115 #[derive(Clone, Debug)]
2132 pub struct ListNodePools(RequestBuilder<crate::model::ListNodePoolsRequest>);
2133
2134 impl ListNodePools {
2135 pub(crate) fn new(
2136 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2137 ) -> Self {
2138 Self(RequestBuilder::new(stub))
2139 }
2140
2141 pub fn with_request<V: Into<crate::model::ListNodePoolsRequest>>(mut self, v: V) -> Self {
2143 self.0.request = v.into();
2144 self
2145 }
2146
2147 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2149 self.0.options = v.into();
2150 self
2151 }
2152
2153 pub async fn send(self) -> Result<crate::model::ListNodePoolsResponse> {
2155 (*self.0.stub)
2156 .list_node_pools(self.0.request, self.0.options)
2157 .await
2158 .map(gax::response::Response::into_body)
2159 }
2160
2161 #[deprecated]
2163 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2164 self.0.request.project_id = v.into();
2165 self
2166 }
2167
2168 #[deprecated]
2170 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2171 self.0.request.zone = v.into();
2172 self
2173 }
2174
2175 #[deprecated]
2177 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2178 self.0.request.cluster_id = v.into();
2179 self
2180 }
2181
2182 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2184 self.0.request.parent = v.into();
2185 self
2186 }
2187 }
2188
2189 #[doc(hidden)]
2190 impl gax::options::internal::RequestBuilder for ListNodePools {
2191 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2192 &mut self.0.options
2193 }
2194 }
2195
2196 #[derive(Clone, Debug)]
2213 pub struct GetNodePool(RequestBuilder<crate::model::GetNodePoolRequest>);
2214
2215 impl GetNodePool {
2216 pub(crate) fn new(
2217 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2218 ) -> Self {
2219 Self(RequestBuilder::new(stub))
2220 }
2221
2222 pub fn with_request<V: Into<crate::model::GetNodePoolRequest>>(mut self, v: V) -> Self {
2224 self.0.request = v.into();
2225 self
2226 }
2227
2228 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2230 self.0.options = v.into();
2231 self
2232 }
2233
2234 pub async fn send(self) -> Result<crate::model::NodePool> {
2236 (*self.0.stub)
2237 .get_node_pool(self.0.request, self.0.options)
2238 .await
2239 .map(gax::response::Response::into_body)
2240 }
2241
2242 #[deprecated]
2244 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2245 self.0.request.project_id = v.into();
2246 self
2247 }
2248
2249 #[deprecated]
2251 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2252 self.0.request.zone = v.into();
2253 self
2254 }
2255
2256 #[deprecated]
2258 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2259 self.0.request.cluster_id = v.into();
2260 self
2261 }
2262
2263 #[deprecated]
2265 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2266 self.0.request.node_pool_id = v.into();
2267 self
2268 }
2269
2270 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2272 self.0.request.name = v.into();
2273 self
2274 }
2275 }
2276
2277 #[doc(hidden)]
2278 impl gax::options::internal::RequestBuilder for GetNodePool {
2279 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2280 &mut self.0.options
2281 }
2282 }
2283
2284 #[derive(Clone, Debug)]
2301 pub struct CreateNodePool(RequestBuilder<crate::model::CreateNodePoolRequest>);
2302
2303 impl CreateNodePool {
2304 pub(crate) fn new(
2305 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2306 ) -> Self {
2307 Self(RequestBuilder::new(stub))
2308 }
2309
2310 pub fn with_request<V: Into<crate::model::CreateNodePoolRequest>>(mut self, v: V) -> Self {
2312 self.0.request = v.into();
2313 self
2314 }
2315
2316 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2318 self.0.options = v.into();
2319 self
2320 }
2321
2322 pub async fn send(self) -> Result<crate::model::Operation> {
2324 (*self.0.stub)
2325 .create_node_pool(self.0.request, self.0.options)
2326 .await
2327 .map(gax::response::Response::into_body)
2328 }
2329
2330 #[deprecated]
2332 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2333 self.0.request.project_id = v.into();
2334 self
2335 }
2336
2337 #[deprecated]
2339 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2340 self.0.request.zone = v.into();
2341 self
2342 }
2343
2344 #[deprecated]
2346 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2347 self.0.request.cluster_id = v.into();
2348 self
2349 }
2350
2351 pub fn set_node_pool<T>(mut self, v: T) -> Self
2355 where
2356 T: std::convert::Into<crate::model::NodePool>,
2357 {
2358 self.0.request.node_pool = std::option::Option::Some(v.into());
2359 self
2360 }
2361
2362 pub fn set_or_clear_node_pool<T>(mut self, v: std::option::Option<T>) -> Self
2366 where
2367 T: std::convert::Into<crate::model::NodePool>,
2368 {
2369 self.0.request.node_pool = v.map(|x| x.into());
2370 self
2371 }
2372
2373 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2375 self.0.request.parent = v.into();
2376 self
2377 }
2378 }
2379
2380 #[doc(hidden)]
2381 impl gax::options::internal::RequestBuilder for CreateNodePool {
2382 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2383 &mut self.0.options
2384 }
2385 }
2386
2387 #[derive(Clone, Debug)]
2404 pub struct DeleteNodePool(RequestBuilder<crate::model::DeleteNodePoolRequest>);
2405
2406 impl DeleteNodePool {
2407 pub(crate) fn new(
2408 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2409 ) -> Self {
2410 Self(RequestBuilder::new(stub))
2411 }
2412
2413 pub fn with_request<V: Into<crate::model::DeleteNodePoolRequest>>(mut self, v: V) -> Self {
2415 self.0.request = v.into();
2416 self
2417 }
2418
2419 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2421 self.0.options = v.into();
2422 self
2423 }
2424
2425 pub async fn send(self) -> Result<crate::model::Operation> {
2427 (*self.0.stub)
2428 .delete_node_pool(self.0.request, self.0.options)
2429 .await
2430 .map(gax::response::Response::into_body)
2431 }
2432
2433 #[deprecated]
2435 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2436 self.0.request.project_id = v.into();
2437 self
2438 }
2439
2440 #[deprecated]
2442 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2443 self.0.request.zone = v.into();
2444 self
2445 }
2446
2447 #[deprecated]
2449 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2450 self.0.request.cluster_id = v.into();
2451 self
2452 }
2453
2454 #[deprecated]
2456 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2457 self.0.request.node_pool_id = v.into();
2458 self
2459 }
2460
2461 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2463 self.0.request.name = v.into();
2464 self
2465 }
2466 }
2467
2468 #[doc(hidden)]
2469 impl gax::options::internal::RequestBuilder for DeleteNodePool {
2470 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2471 &mut self.0.options
2472 }
2473 }
2474
2475 #[derive(Clone, Debug)]
2492 pub struct CompleteNodePoolUpgrade(
2493 RequestBuilder<crate::model::CompleteNodePoolUpgradeRequest>,
2494 );
2495
2496 impl CompleteNodePoolUpgrade {
2497 pub(crate) fn new(
2498 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2499 ) -> Self {
2500 Self(RequestBuilder::new(stub))
2501 }
2502
2503 pub fn with_request<V: Into<crate::model::CompleteNodePoolUpgradeRequest>>(
2505 mut self,
2506 v: V,
2507 ) -> Self {
2508 self.0.request = v.into();
2509 self
2510 }
2511
2512 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2514 self.0.options = v.into();
2515 self
2516 }
2517
2518 pub async fn send(self) -> Result<()> {
2520 (*self.0.stub)
2521 .complete_node_pool_upgrade(self.0.request, self.0.options)
2522 .await
2523 .map(gax::response::Response::into_body)
2524 }
2525
2526 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2528 self.0.request.name = v.into();
2529 self
2530 }
2531 }
2532
2533 #[doc(hidden)]
2534 impl gax::options::internal::RequestBuilder for CompleteNodePoolUpgrade {
2535 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2536 &mut self.0.options
2537 }
2538 }
2539
2540 #[derive(Clone, Debug)]
2557 pub struct RollbackNodePoolUpgrade(
2558 RequestBuilder<crate::model::RollbackNodePoolUpgradeRequest>,
2559 );
2560
2561 impl RollbackNodePoolUpgrade {
2562 pub(crate) fn new(
2563 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2564 ) -> Self {
2565 Self(RequestBuilder::new(stub))
2566 }
2567
2568 pub fn with_request<V: Into<crate::model::RollbackNodePoolUpgradeRequest>>(
2570 mut self,
2571 v: V,
2572 ) -> Self {
2573 self.0.request = v.into();
2574 self
2575 }
2576
2577 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2579 self.0.options = v.into();
2580 self
2581 }
2582
2583 pub async fn send(self) -> Result<crate::model::Operation> {
2585 (*self.0.stub)
2586 .rollback_node_pool_upgrade(self.0.request, self.0.options)
2587 .await
2588 .map(gax::response::Response::into_body)
2589 }
2590
2591 #[deprecated]
2593 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2594 self.0.request.project_id = v.into();
2595 self
2596 }
2597
2598 #[deprecated]
2600 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2601 self.0.request.zone = v.into();
2602 self
2603 }
2604
2605 #[deprecated]
2607 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2608 self.0.request.cluster_id = v.into();
2609 self
2610 }
2611
2612 #[deprecated]
2614 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2615 self.0.request.node_pool_id = v.into();
2616 self
2617 }
2618
2619 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2621 self.0.request.name = v.into();
2622 self
2623 }
2624
2625 pub fn set_respect_pdb<T: Into<bool>>(mut self, v: T) -> Self {
2627 self.0.request.respect_pdb = v.into();
2628 self
2629 }
2630 }
2631
2632 #[doc(hidden)]
2633 impl gax::options::internal::RequestBuilder for RollbackNodePoolUpgrade {
2634 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2635 &mut self.0.options
2636 }
2637 }
2638
2639 #[derive(Clone, Debug)]
2656 pub struct SetNodePoolManagement(RequestBuilder<crate::model::SetNodePoolManagementRequest>);
2657
2658 impl SetNodePoolManagement {
2659 pub(crate) fn new(
2660 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2661 ) -> Self {
2662 Self(RequestBuilder::new(stub))
2663 }
2664
2665 pub fn with_request<V: Into<crate::model::SetNodePoolManagementRequest>>(
2667 mut self,
2668 v: V,
2669 ) -> Self {
2670 self.0.request = v.into();
2671 self
2672 }
2673
2674 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2676 self.0.options = v.into();
2677 self
2678 }
2679
2680 pub async fn send(self) -> Result<crate::model::Operation> {
2682 (*self.0.stub)
2683 .set_node_pool_management(self.0.request, self.0.options)
2684 .await
2685 .map(gax::response::Response::into_body)
2686 }
2687
2688 #[deprecated]
2690 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2691 self.0.request.project_id = v.into();
2692 self
2693 }
2694
2695 #[deprecated]
2697 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2698 self.0.request.zone = v.into();
2699 self
2700 }
2701
2702 #[deprecated]
2704 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2705 self.0.request.cluster_id = v.into();
2706 self
2707 }
2708
2709 #[deprecated]
2711 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2712 self.0.request.node_pool_id = v.into();
2713 self
2714 }
2715
2716 pub fn set_management<T>(mut self, v: T) -> Self
2720 where
2721 T: std::convert::Into<crate::model::NodeManagement>,
2722 {
2723 self.0.request.management = std::option::Option::Some(v.into());
2724 self
2725 }
2726
2727 pub fn set_or_clear_management<T>(mut self, v: std::option::Option<T>) -> Self
2731 where
2732 T: std::convert::Into<crate::model::NodeManagement>,
2733 {
2734 self.0.request.management = v.map(|x| x.into());
2735 self
2736 }
2737
2738 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2740 self.0.request.name = v.into();
2741 self
2742 }
2743 }
2744
2745 #[doc(hidden)]
2746 impl gax::options::internal::RequestBuilder for SetNodePoolManagement {
2747 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2748 &mut self.0.options
2749 }
2750 }
2751
2752 #[derive(Clone, Debug)]
2769 pub struct SetLabels(RequestBuilder<crate::model::SetLabelsRequest>);
2770
2771 impl SetLabels {
2772 pub(crate) fn new(
2773 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2774 ) -> Self {
2775 Self(RequestBuilder::new(stub))
2776 }
2777
2778 pub fn with_request<V: Into<crate::model::SetLabelsRequest>>(mut self, v: V) -> Self {
2780 self.0.request = v.into();
2781 self
2782 }
2783
2784 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2786 self.0.options = v.into();
2787 self
2788 }
2789
2790 pub async fn send(self) -> Result<crate::model::Operation> {
2792 (*self.0.stub)
2793 .set_labels(self.0.request, self.0.options)
2794 .await
2795 .map(gax::response::Response::into_body)
2796 }
2797
2798 #[deprecated]
2800 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2801 self.0.request.project_id = v.into();
2802 self
2803 }
2804
2805 #[deprecated]
2807 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2808 self.0.request.zone = v.into();
2809 self
2810 }
2811
2812 #[deprecated]
2814 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2815 self.0.request.cluster_id = v.into();
2816 self
2817 }
2818
2819 pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
2823 where
2824 T: std::iter::IntoIterator<Item = (K, V)>,
2825 K: std::convert::Into<std::string::String>,
2826 V: std::convert::Into<std::string::String>,
2827 {
2828 self.0.request.resource_labels =
2829 v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2830 self
2831 }
2832
2833 pub fn set_label_fingerprint<T: Into<std::string::String>>(mut self, v: T) -> Self {
2837 self.0.request.label_fingerprint = v.into();
2838 self
2839 }
2840
2841 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2843 self.0.request.name = v.into();
2844 self
2845 }
2846 }
2847
2848 #[doc(hidden)]
2849 impl gax::options::internal::RequestBuilder for SetLabels {
2850 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2851 &mut self.0.options
2852 }
2853 }
2854
2855 #[derive(Clone, Debug)]
2872 pub struct SetLegacyAbac(RequestBuilder<crate::model::SetLegacyAbacRequest>);
2873
2874 impl SetLegacyAbac {
2875 pub(crate) fn new(
2876 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2877 ) -> Self {
2878 Self(RequestBuilder::new(stub))
2879 }
2880
2881 pub fn with_request<V: Into<crate::model::SetLegacyAbacRequest>>(mut self, v: V) -> Self {
2883 self.0.request = v.into();
2884 self
2885 }
2886
2887 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2889 self.0.options = v.into();
2890 self
2891 }
2892
2893 pub async fn send(self) -> Result<crate::model::Operation> {
2895 (*self.0.stub)
2896 .set_legacy_abac(self.0.request, self.0.options)
2897 .await
2898 .map(gax::response::Response::into_body)
2899 }
2900
2901 #[deprecated]
2903 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2904 self.0.request.project_id = v.into();
2905 self
2906 }
2907
2908 #[deprecated]
2910 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2911 self.0.request.zone = v.into();
2912 self
2913 }
2914
2915 #[deprecated]
2917 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2918 self.0.request.cluster_id = v.into();
2919 self
2920 }
2921
2922 pub fn set_enabled<T: Into<bool>>(mut self, v: T) -> Self {
2926 self.0.request.enabled = v.into();
2927 self
2928 }
2929
2930 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2932 self.0.request.name = v.into();
2933 self
2934 }
2935 }
2936
2937 #[doc(hidden)]
2938 impl gax::options::internal::RequestBuilder for SetLegacyAbac {
2939 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2940 &mut self.0.options
2941 }
2942 }
2943
2944 #[derive(Clone, Debug)]
2961 pub struct StartIPRotation(RequestBuilder<crate::model::StartIPRotationRequest>);
2962
2963 impl StartIPRotation {
2964 pub(crate) fn new(
2965 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2966 ) -> Self {
2967 Self(RequestBuilder::new(stub))
2968 }
2969
2970 pub fn with_request<V: Into<crate::model::StartIPRotationRequest>>(mut self, v: V) -> Self {
2972 self.0.request = v.into();
2973 self
2974 }
2975
2976 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2978 self.0.options = v.into();
2979 self
2980 }
2981
2982 pub async fn send(self) -> Result<crate::model::Operation> {
2984 (*self.0.stub)
2985 .start_ip_rotation(self.0.request, self.0.options)
2986 .await
2987 .map(gax::response::Response::into_body)
2988 }
2989
2990 #[deprecated]
2992 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2993 self.0.request.project_id = v.into();
2994 self
2995 }
2996
2997 #[deprecated]
2999 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3000 self.0.request.zone = v.into();
3001 self
3002 }
3003
3004 #[deprecated]
3006 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3007 self.0.request.cluster_id = v.into();
3008 self
3009 }
3010
3011 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3013 self.0.request.name = v.into();
3014 self
3015 }
3016
3017 pub fn set_rotate_credentials<T: Into<bool>>(mut self, v: T) -> Self {
3019 self.0.request.rotate_credentials = v.into();
3020 self
3021 }
3022 }
3023
3024 #[doc(hidden)]
3025 impl gax::options::internal::RequestBuilder for StartIPRotation {
3026 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3027 &mut self.0.options
3028 }
3029 }
3030
3031 #[derive(Clone, Debug)]
3048 pub struct CompleteIPRotation(RequestBuilder<crate::model::CompleteIPRotationRequest>);
3049
3050 impl CompleteIPRotation {
3051 pub(crate) fn new(
3052 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3053 ) -> Self {
3054 Self(RequestBuilder::new(stub))
3055 }
3056
3057 pub fn with_request<V: Into<crate::model::CompleteIPRotationRequest>>(
3059 mut self,
3060 v: V,
3061 ) -> Self {
3062 self.0.request = v.into();
3063 self
3064 }
3065
3066 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3068 self.0.options = v.into();
3069 self
3070 }
3071
3072 pub async fn send(self) -> Result<crate::model::Operation> {
3074 (*self.0.stub)
3075 .complete_ip_rotation(self.0.request, self.0.options)
3076 .await
3077 .map(gax::response::Response::into_body)
3078 }
3079
3080 #[deprecated]
3082 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3083 self.0.request.project_id = v.into();
3084 self
3085 }
3086
3087 #[deprecated]
3089 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3090 self.0.request.zone = v.into();
3091 self
3092 }
3093
3094 #[deprecated]
3096 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3097 self.0.request.cluster_id = v.into();
3098 self
3099 }
3100
3101 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3103 self.0.request.name = v.into();
3104 self
3105 }
3106 }
3107
3108 #[doc(hidden)]
3109 impl gax::options::internal::RequestBuilder for CompleteIPRotation {
3110 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3111 &mut self.0.options
3112 }
3113 }
3114
3115 #[derive(Clone, Debug)]
3132 pub struct SetNodePoolSize(RequestBuilder<crate::model::SetNodePoolSizeRequest>);
3133
3134 impl SetNodePoolSize {
3135 pub(crate) fn new(
3136 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3137 ) -> Self {
3138 Self(RequestBuilder::new(stub))
3139 }
3140
3141 pub fn with_request<V: Into<crate::model::SetNodePoolSizeRequest>>(mut self, v: V) -> Self {
3143 self.0.request = v.into();
3144 self
3145 }
3146
3147 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3149 self.0.options = v.into();
3150 self
3151 }
3152
3153 pub async fn send(self) -> Result<crate::model::Operation> {
3155 (*self.0.stub)
3156 .set_node_pool_size(self.0.request, self.0.options)
3157 .await
3158 .map(gax::response::Response::into_body)
3159 }
3160
3161 #[deprecated]
3163 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3164 self.0.request.project_id = v.into();
3165 self
3166 }
3167
3168 #[deprecated]
3170 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3171 self.0.request.zone = v.into();
3172 self
3173 }
3174
3175 #[deprecated]
3177 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3178 self.0.request.cluster_id = v.into();
3179 self
3180 }
3181
3182 #[deprecated]
3184 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3185 self.0.request.node_pool_id = v.into();
3186 self
3187 }
3188
3189 pub fn set_node_count<T: Into<i32>>(mut self, v: T) -> Self {
3193 self.0.request.node_count = v.into();
3194 self
3195 }
3196
3197 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3199 self.0.request.name = v.into();
3200 self
3201 }
3202 }
3203
3204 #[doc(hidden)]
3205 impl gax::options::internal::RequestBuilder for SetNodePoolSize {
3206 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3207 &mut self.0.options
3208 }
3209 }
3210
3211 #[derive(Clone, Debug)]
3228 pub struct SetNetworkPolicy(RequestBuilder<crate::model::SetNetworkPolicyRequest>);
3229
3230 impl SetNetworkPolicy {
3231 pub(crate) fn new(
3232 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3233 ) -> Self {
3234 Self(RequestBuilder::new(stub))
3235 }
3236
3237 pub fn with_request<V: Into<crate::model::SetNetworkPolicyRequest>>(
3239 mut self,
3240 v: V,
3241 ) -> Self {
3242 self.0.request = v.into();
3243 self
3244 }
3245
3246 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3248 self.0.options = v.into();
3249 self
3250 }
3251
3252 pub async fn send(self) -> Result<crate::model::Operation> {
3254 (*self.0.stub)
3255 .set_network_policy(self.0.request, self.0.options)
3256 .await
3257 .map(gax::response::Response::into_body)
3258 }
3259
3260 #[deprecated]
3262 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3263 self.0.request.project_id = v.into();
3264 self
3265 }
3266
3267 #[deprecated]
3269 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3270 self.0.request.zone = v.into();
3271 self
3272 }
3273
3274 #[deprecated]
3276 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3277 self.0.request.cluster_id = v.into();
3278 self
3279 }
3280
3281 pub fn set_network_policy<T>(mut self, v: T) -> Self
3285 where
3286 T: std::convert::Into<crate::model::NetworkPolicy>,
3287 {
3288 self.0.request.network_policy = std::option::Option::Some(v.into());
3289 self
3290 }
3291
3292 pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
3296 where
3297 T: std::convert::Into<crate::model::NetworkPolicy>,
3298 {
3299 self.0.request.network_policy = v.map(|x| x.into());
3300 self
3301 }
3302
3303 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3305 self.0.request.name = v.into();
3306 self
3307 }
3308 }
3309
3310 #[doc(hidden)]
3311 impl gax::options::internal::RequestBuilder for SetNetworkPolicy {
3312 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3313 &mut self.0.options
3314 }
3315 }
3316
3317 #[derive(Clone, Debug)]
3334 pub struct SetMaintenancePolicy(RequestBuilder<crate::model::SetMaintenancePolicyRequest>);
3335
3336 impl SetMaintenancePolicy {
3337 pub(crate) fn new(
3338 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3339 ) -> Self {
3340 Self(RequestBuilder::new(stub))
3341 }
3342
3343 pub fn with_request<V: Into<crate::model::SetMaintenancePolicyRequest>>(
3345 mut self,
3346 v: V,
3347 ) -> Self {
3348 self.0.request = v.into();
3349 self
3350 }
3351
3352 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3354 self.0.options = v.into();
3355 self
3356 }
3357
3358 pub async fn send(self) -> Result<crate::model::Operation> {
3360 (*self.0.stub)
3361 .set_maintenance_policy(self.0.request, self.0.options)
3362 .await
3363 .map(gax::response::Response::into_body)
3364 }
3365
3366 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3370 self.0.request.project_id = v.into();
3371 self
3372 }
3373
3374 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3378 self.0.request.zone = v.into();
3379 self
3380 }
3381
3382 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3386 self.0.request.cluster_id = v.into();
3387 self
3388 }
3389
3390 pub fn set_maintenance_policy<T>(mut self, v: T) -> Self
3394 where
3395 T: std::convert::Into<crate::model::MaintenancePolicy>,
3396 {
3397 self.0.request.maintenance_policy = std::option::Option::Some(v.into());
3398 self
3399 }
3400
3401 pub fn set_or_clear_maintenance_policy<T>(mut self, v: std::option::Option<T>) -> Self
3405 where
3406 T: std::convert::Into<crate::model::MaintenancePolicy>,
3407 {
3408 self.0.request.maintenance_policy = v.map(|x| x.into());
3409 self
3410 }
3411
3412 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3414 self.0.request.name = v.into();
3415 self
3416 }
3417 }
3418
3419 #[doc(hidden)]
3420 impl gax::options::internal::RequestBuilder for SetMaintenancePolicy {
3421 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3422 &mut self.0.options
3423 }
3424 }
3425
3426 #[derive(Clone, Debug)]
3447 pub struct ListUsableSubnetworks(RequestBuilder<crate::model::ListUsableSubnetworksRequest>);
3448
3449 impl ListUsableSubnetworks {
3450 pub(crate) fn new(
3451 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3452 ) -> Self {
3453 Self(RequestBuilder::new(stub))
3454 }
3455
3456 pub fn with_request<V: Into<crate::model::ListUsableSubnetworksRequest>>(
3458 mut self,
3459 v: V,
3460 ) -> Self {
3461 self.0.request = v.into();
3462 self
3463 }
3464
3465 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3467 self.0.options = v.into();
3468 self
3469 }
3470
3471 pub async fn send(self) -> Result<crate::model::ListUsableSubnetworksResponse> {
3473 (*self.0.stub)
3474 .list_usable_subnetworks(self.0.request, self.0.options)
3475 .await
3476 .map(gax::response::Response::into_body)
3477 }
3478
3479 pub fn by_page(
3481 self,
3482 ) -> impl gax::paginator::Paginator<crate::model::ListUsableSubnetworksResponse, gax::error::Error>
3483 {
3484 use std::clone::Clone;
3485 let token = self.0.request.page_token.clone();
3486 let execute = move |token: String| {
3487 let mut builder = self.clone();
3488 builder.0.request = builder.0.request.set_page_token(token);
3489 builder.send()
3490 };
3491 gax::paginator::internal::new_paginator(token, execute)
3492 }
3493
3494 pub fn by_item(
3496 self,
3497 ) -> impl gax::paginator::ItemPaginator<
3498 crate::model::ListUsableSubnetworksResponse,
3499 gax::error::Error,
3500 > {
3501 use gax::paginator::Paginator;
3502 self.by_page().items()
3503 }
3504
3505 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3507 self.0.request.parent = v.into();
3508 self
3509 }
3510
3511 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3513 self.0.request.filter = v.into();
3514 self
3515 }
3516
3517 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3519 self.0.request.page_size = v.into();
3520 self
3521 }
3522
3523 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3525 self.0.request.page_token = v.into();
3526 self
3527 }
3528 }
3529
3530 #[doc(hidden)]
3531 impl gax::options::internal::RequestBuilder for ListUsableSubnetworks {
3532 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3533 &mut self.0.options
3534 }
3535 }
3536
3537 #[derive(Clone, Debug)]
3554 pub struct CheckAutopilotCompatibility(
3555 RequestBuilder<crate::model::CheckAutopilotCompatibilityRequest>,
3556 );
3557
3558 impl CheckAutopilotCompatibility {
3559 pub(crate) fn new(
3560 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3561 ) -> Self {
3562 Self(RequestBuilder::new(stub))
3563 }
3564
3565 pub fn with_request<V: Into<crate::model::CheckAutopilotCompatibilityRequest>>(
3567 mut self,
3568 v: V,
3569 ) -> Self {
3570 self.0.request = v.into();
3571 self
3572 }
3573
3574 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3576 self.0.options = v.into();
3577 self
3578 }
3579
3580 pub async fn send(self) -> Result<crate::model::CheckAutopilotCompatibilityResponse> {
3582 (*self.0.stub)
3583 .check_autopilot_compatibility(self.0.request, self.0.options)
3584 .await
3585 .map(gax::response::Response::into_body)
3586 }
3587
3588 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3590 self.0.request.name = v.into();
3591 self
3592 }
3593 }
3594
3595 #[doc(hidden)]
3596 impl gax::options::internal::RequestBuilder for CheckAutopilotCompatibility {
3597 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3598 &mut self.0.options
3599 }
3600 }
3601
3602 #[derive(Clone, Debug)]
3619 pub struct FetchClusterUpgradeInfo(
3620 RequestBuilder<crate::model::FetchClusterUpgradeInfoRequest>,
3621 );
3622
3623 impl FetchClusterUpgradeInfo {
3624 pub(crate) fn new(
3625 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3626 ) -> Self {
3627 Self(RequestBuilder::new(stub))
3628 }
3629
3630 pub fn with_request<V: Into<crate::model::FetchClusterUpgradeInfoRequest>>(
3632 mut self,
3633 v: V,
3634 ) -> Self {
3635 self.0.request = v.into();
3636 self
3637 }
3638
3639 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3641 self.0.options = v.into();
3642 self
3643 }
3644
3645 pub async fn send(self) -> Result<crate::model::ClusterUpgradeInfo> {
3647 (*self.0.stub)
3648 .fetch_cluster_upgrade_info(self.0.request, self.0.options)
3649 .await
3650 .map(gax::response::Response::into_body)
3651 }
3652
3653 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3657 self.0.request.name = v.into();
3658 self
3659 }
3660
3661 pub fn set_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
3663 self.0.request.version = v.into();
3664 self
3665 }
3666 }
3667
3668 #[doc(hidden)]
3669 impl gax::options::internal::RequestBuilder for FetchClusterUpgradeInfo {
3670 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3671 &mut self.0.options
3672 }
3673 }
3674
3675 #[derive(Clone, Debug)]
3692 pub struct FetchNodePoolUpgradeInfo(
3693 RequestBuilder<crate::model::FetchNodePoolUpgradeInfoRequest>,
3694 );
3695
3696 impl FetchNodePoolUpgradeInfo {
3697 pub(crate) fn new(
3698 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3699 ) -> Self {
3700 Self(RequestBuilder::new(stub))
3701 }
3702
3703 pub fn with_request<V: Into<crate::model::FetchNodePoolUpgradeInfoRequest>>(
3705 mut self,
3706 v: V,
3707 ) -> Self {
3708 self.0.request = v.into();
3709 self
3710 }
3711
3712 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3714 self.0.options = v.into();
3715 self
3716 }
3717
3718 pub async fn send(self) -> Result<crate::model::NodePoolUpgradeInfo> {
3720 (*self.0.stub)
3721 .fetch_node_pool_upgrade_info(self.0.request, self.0.options)
3722 .await
3723 .map(gax::response::Response::into_body)
3724 }
3725
3726 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3730 self.0.request.name = v.into();
3731 self
3732 }
3733
3734 pub fn set_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
3736 self.0.request.version = v.into();
3737 self
3738 }
3739 }
3740
3741 #[doc(hidden)]
3742 impl gax::options::internal::RequestBuilder for FetchNodePoolUpgradeInfo {
3743 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3744 &mut self.0.options
3745 }
3746 }
3747}