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)]
92 pub struct ListClusters(RequestBuilder<crate::model::ListClustersRequest>);
93
94 impl ListClusters {
95 pub(crate) fn new(
96 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
97 ) -> Self {
98 Self(RequestBuilder::new(stub))
99 }
100
101 pub fn with_request<V: Into<crate::model::ListClustersRequest>>(mut self, v: V) -> Self {
103 self.0.request = v.into();
104 self
105 }
106
107 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
109 self.0.options = v.into();
110 self
111 }
112
113 pub async fn send(self) -> Result<crate::model::ListClustersResponse> {
115 (*self.0.stub)
116 .list_clusters(self.0.request, self.0.options)
117 .await
118 .map(gax::response::Response::into_body)
119 }
120
121 #[deprecated]
123 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
124 self.0.request.project_id = v.into();
125 self
126 }
127
128 #[deprecated]
130 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
131 self.0.request.zone = v.into();
132 self
133 }
134
135 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
137 self.0.request.parent = v.into();
138 self
139 }
140 }
141
142 #[doc(hidden)]
143 impl gax::options::internal::RequestBuilder for ListClusters {
144 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
145 &mut self.0.options
146 }
147 }
148
149 #[derive(Clone, Debug)]
167 pub struct GetCluster(RequestBuilder<crate::model::GetClusterRequest>);
168
169 impl GetCluster {
170 pub(crate) fn new(
171 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
172 ) -> Self {
173 Self(RequestBuilder::new(stub))
174 }
175
176 pub fn with_request<V: Into<crate::model::GetClusterRequest>>(mut self, v: V) -> Self {
178 self.0.request = v.into();
179 self
180 }
181
182 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
184 self.0.options = v.into();
185 self
186 }
187
188 pub async fn send(self) -> Result<crate::model::Cluster> {
190 (*self.0.stub)
191 .get_cluster(self.0.request, self.0.options)
192 .await
193 .map(gax::response::Response::into_body)
194 }
195
196 #[deprecated]
198 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
199 self.0.request.project_id = v.into();
200 self
201 }
202
203 #[deprecated]
205 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
206 self.0.request.zone = v.into();
207 self
208 }
209
210 #[deprecated]
212 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
213 self.0.request.cluster_id = v.into();
214 self
215 }
216
217 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
219 self.0.request.name = v.into();
220 self
221 }
222 }
223
224 #[doc(hidden)]
225 impl gax::options::internal::RequestBuilder for GetCluster {
226 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
227 &mut self.0.options
228 }
229 }
230
231 #[derive(Clone, Debug)]
249 pub struct CreateCluster(RequestBuilder<crate::model::CreateClusterRequest>);
250
251 impl CreateCluster {
252 pub(crate) fn new(
253 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
254 ) -> Self {
255 Self(RequestBuilder::new(stub))
256 }
257
258 pub fn with_request<V: Into<crate::model::CreateClusterRequest>>(mut self, v: V) -> Self {
260 self.0.request = v.into();
261 self
262 }
263
264 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
266 self.0.options = v.into();
267 self
268 }
269
270 pub async fn send(self) -> Result<crate::model::Operation> {
272 (*self.0.stub)
273 .create_cluster(self.0.request, self.0.options)
274 .await
275 .map(gax::response::Response::into_body)
276 }
277
278 #[deprecated]
280 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
281 self.0.request.project_id = v.into();
282 self
283 }
284
285 #[deprecated]
287 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
288 self.0.request.zone = v.into();
289 self
290 }
291
292 pub fn set_cluster<T>(mut self, v: T) -> Self
296 where
297 T: std::convert::Into<crate::model::Cluster>,
298 {
299 self.0.request.cluster = std::option::Option::Some(v.into());
300 self
301 }
302
303 pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
307 where
308 T: std::convert::Into<crate::model::Cluster>,
309 {
310 self.0.request.cluster = v.map(|x| x.into());
311 self
312 }
313
314 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
316 self.0.request.parent = v.into();
317 self
318 }
319 }
320
321 #[doc(hidden)]
322 impl gax::options::internal::RequestBuilder for CreateCluster {
323 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
324 &mut self.0.options
325 }
326 }
327
328 #[derive(Clone, Debug)]
346 pub struct UpdateCluster(RequestBuilder<crate::model::UpdateClusterRequest>);
347
348 impl UpdateCluster {
349 pub(crate) fn new(
350 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
351 ) -> Self {
352 Self(RequestBuilder::new(stub))
353 }
354
355 pub fn with_request<V: Into<crate::model::UpdateClusterRequest>>(mut self, v: V) -> Self {
357 self.0.request = v.into();
358 self
359 }
360
361 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
363 self.0.options = v.into();
364 self
365 }
366
367 pub async fn send(self) -> Result<crate::model::Operation> {
369 (*self.0.stub)
370 .update_cluster(self.0.request, self.0.options)
371 .await
372 .map(gax::response::Response::into_body)
373 }
374
375 #[deprecated]
377 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
378 self.0.request.project_id = v.into();
379 self
380 }
381
382 #[deprecated]
384 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
385 self.0.request.zone = v.into();
386 self
387 }
388
389 #[deprecated]
391 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
392 self.0.request.cluster_id = v.into();
393 self
394 }
395
396 pub fn set_update<T>(mut self, v: T) -> Self
400 where
401 T: std::convert::Into<crate::model::ClusterUpdate>,
402 {
403 self.0.request.update = std::option::Option::Some(v.into());
404 self
405 }
406
407 pub fn set_or_clear_update<T>(mut self, v: std::option::Option<T>) -> Self
411 where
412 T: std::convert::Into<crate::model::ClusterUpdate>,
413 {
414 self.0.request.update = v.map(|x| x.into());
415 self
416 }
417
418 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
420 self.0.request.name = v.into();
421 self
422 }
423 }
424
425 #[doc(hidden)]
426 impl gax::options::internal::RequestBuilder for UpdateCluster {
427 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
428 &mut self.0.options
429 }
430 }
431
432 #[derive(Clone, Debug)]
450 pub struct UpdateNodePool(RequestBuilder<crate::model::UpdateNodePoolRequest>);
451
452 impl UpdateNodePool {
453 pub(crate) fn new(
454 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
455 ) -> Self {
456 Self(RequestBuilder::new(stub))
457 }
458
459 pub fn with_request<V: Into<crate::model::UpdateNodePoolRequest>>(mut self, v: V) -> Self {
461 self.0.request = v.into();
462 self
463 }
464
465 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
467 self.0.options = v.into();
468 self
469 }
470
471 pub async fn send(self) -> Result<crate::model::Operation> {
473 (*self.0.stub)
474 .update_node_pool(self.0.request, self.0.options)
475 .await
476 .map(gax::response::Response::into_body)
477 }
478
479 #[deprecated]
481 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
482 self.0.request.project_id = v.into();
483 self
484 }
485
486 #[deprecated]
488 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
489 self.0.request.zone = v.into();
490 self
491 }
492
493 #[deprecated]
495 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
496 self.0.request.cluster_id = v.into();
497 self
498 }
499
500 #[deprecated]
502 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
503 self.0.request.node_pool_id = v.into();
504 self
505 }
506
507 pub fn set_node_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
511 self.0.request.node_version = v.into();
512 self
513 }
514
515 pub fn set_image_type<T: Into<std::string::String>>(mut self, v: T) -> Self {
519 self.0.request.image_type = v.into();
520 self
521 }
522
523 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
525 self.0.request.name = v.into();
526 self
527 }
528
529 pub fn set_locations<T, V>(mut self, v: T) -> Self
531 where
532 T: std::iter::IntoIterator<Item = V>,
533 V: std::convert::Into<std::string::String>,
534 {
535 use std::iter::Iterator;
536 self.0.request.locations = v.into_iter().map(|i| i.into()).collect();
537 self
538 }
539
540 pub fn set_workload_metadata_config<T>(mut self, v: T) -> Self
542 where
543 T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
544 {
545 self.0.request.workload_metadata_config = std::option::Option::Some(v.into());
546 self
547 }
548
549 pub fn set_or_clear_workload_metadata_config<T>(mut self, v: std::option::Option<T>) -> Self
551 where
552 T: std::convert::Into<crate::model::WorkloadMetadataConfig>,
553 {
554 self.0.request.workload_metadata_config = v.map(|x| x.into());
555 self
556 }
557
558 pub fn set_upgrade_settings<T>(mut self, v: T) -> Self
560 where
561 T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
562 {
563 self.0.request.upgrade_settings = std::option::Option::Some(v.into());
564 self
565 }
566
567 pub fn set_or_clear_upgrade_settings<T>(mut self, v: std::option::Option<T>) -> Self
569 where
570 T: std::convert::Into<crate::model::node_pool::UpgradeSettings>,
571 {
572 self.0.request.upgrade_settings = v.map(|x| x.into());
573 self
574 }
575
576 pub fn set_tags<T>(mut self, v: T) -> Self
578 where
579 T: std::convert::Into<crate::model::NetworkTags>,
580 {
581 self.0.request.tags = std::option::Option::Some(v.into());
582 self
583 }
584
585 pub fn set_or_clear_tags<T>(mut self, v: std::option::Option<T>) -> Self
587 where
588 T: std::convert::Into<crate::model::NetworkTags>,
589 {
590 self.0.request.tags = v.map(|x| x.into());
591 self
592 }
593
594 pub fn set_taints<T>(mut self, v: T) -> Self
596 where
597 T: std::convert::Into<crate::model::NodeTaints>,
598 {
599 self.0.request.taints = std::option::Option::Some(v.into());
600 self
601 }
602
603 pub fn set_or_clear_taints<T>(mut self, v: std::option::Option<T>) -> Self
605 where
606 T: std::convert::Into<crate::model::NodeTaints>,
607 {
608 self.0.request.taints = v.map(|x| x.into());
609 self
610 }
611
612 pub fn set_labels<T>(mut self, v: T) -> Self
614 where
615 T: std::convert::Into<crate::model::NodeLabels>,
616 {
617 self.0.request.labels = std::option::Option::Some(v.into());
618 self
619 }
620
621 pub fn set_or_clear_labels<T>(mut self, v: std::option::Option<T>) -> Self
623 where
624 T: std::convert::Into<crate::model::NodeLabels>,
625 {
626 self.0.request.labels = v.map(|x| x.into());
627 self
628 }
629
630 pub fn set_linux_node_config<T>(mut self, v: T) -> Self
632 where
633 T: std::convert::Into<crate::model::LinuxNodeConfig>,
634 {
635 self.0.request.linux_node_config = std::option::Option::Some(v.into());
636 self
637 }
638
639 pub fn set_or_clear_linux_node_config<T>(mut self, v: std::option::Option<T>) -> Self
641 where
642 T: std::convert::Into<crate::model::LinuxNodeConfig>,
643 {
644 self.0.request.linux_node_config = v.map(|x| x.into());
645 self
646 }
647
648 pub fn set_kubelet_config<T>(mut self, v: T) -> Self
650 where
651 T: std::convert::Into<crate::model::NodeKubeletConfig>,
652 {
653 self.0.request.kubelet_config = std::option::Option::Some(v.into());
654 self
655 }
656
657 pub fn set_or_clear_kubelet_config<T>(mut self, v: std::option::Option<T>) -> Self
659 where
660 T: std::convert::Into<crate::model::NodeKubeletConfig>,
661 {
662 self.0.request.kubelet_config = v.map(|x| x.into());
663 self
664 }
665
666 pub fn set_node_network_config<T>(mut self, v: T) -> Self
668 where
669 T: std::convert::Into<crate::model::NodeNetworkConfig>,
670 {
671 self.0.request.node_network_config = std::option::Option::Some(v.into());
672 self
673 }
674
675 pub fn set_or_clear_node_network_config<T>(mut self, v: std::option::Option<T>) -> Self
677 where
678 T: std::convert::Into<crate::model::NodeNetworkConfig>,
679 {
680 self.0.request.node_network_config = v.map(|x| x.into());
681 self
682 }
683
684 pub fn set_gcfs_config<T>(mut self, v: T) -> Self
686 where
687 T: std::convert::Into<crate::model::GcfsConfig>,
688 {
689 self.0.request.gcfs_config = std::option::Option::Some(v.into());
690 self
691 }
692
693 pub fn set_or_clear_gcfs_config<T>(mut self, v: std::option::Option<T>) -> Self
695 where
696 T: std::convert::Into<crate::model::GcfsConfig>,
697 {
698 self.0.request.gcfs_config = v.map(|x| x.into());
699 self
700 }
701
702 pub fn set_confidential_nodes<T>(mut self, v: T) -> Self
704 where
705 T: std::convert::Into<crate::model::ConfidentialNodes>,
706 {
707 self.0.request.confidential_nodes = std::option::Option::Some(v.into());
708 self
709 }
710
711 pub fn set_or_clear_confidential_nodes<T>(mut self, v: std::option::Option<T>) -> Self
713 where
714 T: std::convert::Into<crate::model::ConfidentialNodes>,
715 {
716 self.0.request.confidential_nodes = v.map(|x| x.into());
717 self
718 }
719
720 pub fn set_gvnic<T>(mut self, v: T) -> Self
722 where
723 T: std::convert::Into<crate::model::VirtualNIC>,
724 {
725 self.0.request.gvnic = std::option::Option::Some(v.into());
726 self
727 }
728
729 pub fn set_or_clear_gvnic<T>(mut self, v: std::option::Option<T>) -> Self
731 where
732 T: std::convert::Into<crate::model::VirtualNIC>,
733 {
734 self.0.request.gvnic = v.map(|x| x.into());
735 self
736 }
737
738 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
740 self.0.request.etag = v.into();
741 self
742 }
743
744 pub fn set_fast_socket<T>(mut self, v: T) -> Self
746 where
747 T: std::convert::Into<crate::model::FastSocket>,
748 {
749 self.0.request.fast_socket = std::option::Option::Some(v.into());
750 self
751 }
752
753 pub fn set_or_clear_fast_socket<T>(mut self, v: std::option::Option<T>) -> Self
755 where
756 T: std::convert::Into<crate::model::FastSocket>,
757 {
758 self.0.request.fast_socket = v.map(|x| x.into());
759 self
760 }
761
762 pub fn set_logging_config<T>(mut self, v: T) -> Self
764 where
765 T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
766 {
767 self.0.request.logging_config = std::option::Option::Some(v.into());
768 self
769 }
770
771 pub fn set_or_clear_logging_config<T>(mut self, v: std::option::Option<T>) -> Self
773 where
774 T: std::convert::Into<crate::model::NodePoolLoggingConfig>,
775 {
776 self.0.request.logging_config = v.map(|x| x.into());
777 self
778 }
779
780 pub fn set_resource_labels<T>(mut self, v: T) -> Self
782 where
783 T: std::convert::Into<crate::model::ResourceLabels>,
784 {
785 self.0.request.resource_labels = std::option::Option::Some(v.into());
786 self
787 }
788
789 pub fn set_or_clear_resource_labels<T>(mut self, v: std::option::Option<T>) -> Self
791 where
792 T: std::convert::Into<crate::model::ResourceLabels>,
793 {
794 self.0.request.resource_labels = v.map(|x| x.into());
795 self
796 }
797
798 pub fn set_windows_node_config<T>(mut self, v: T) -> Self
800 where
801 T: std::convert::Into<crate::model::WindowsNodeConfig>,
802 {
803 self.0.request.windows_node_config = std::option::Option::Some(v.into());
804 self
805 }
806
807 pub fn set_or_clear_windows_node_config<T>(mut self, v: std::option::Option<T>) -> Self
809 where
810 T: std::convert::Into<crate::model::WindowsNodeConfig>,
811 {
812 self.0.request.windows_node_config = v.map(|x| x.into());
813 self
814 }
815
816 pub fn set_accelerators<T, V>(mut self, v: T) -> Self
818 where
819 T: std::iter::IntoIterator<Item = V>,
820 V: std::convert::Into<crate::model::AcceleratorConfig>,
821 {
822 use std::iter::Iterator;
823 self.0.request.accelerators = v.into_iter().map(|i| i.into()).collect();
824 self
825 }
826
827 pub fn set_machine_type<T: Into<std::string::String>>(mut self, v: T) -> Self {
829 self.0.request.machine_type = v.into();
830 self
831 }
832
833 pub fn set_disk_type<T: Into<std::string::String>>(mut self, v: T) -> Self {
835 self.0.request.disk_type = v.into();
836 self
837 }
838
839 pub fn set_disk_size_gb<T: Into<i64>>(mut self, v: T) -> Self {
841 self.0.request.disk_size_gb = v.into();
842 self
843 }
844
845 pub fn set_resource_manager_tags<T>(mut self, v: T) -> Self
847 where
848 T: std::convert::Into<crate::model::ResourceManagerTags>,
849 {
850 self.0.request.resource_manager_tags = std::option::Option::Some(v.into());
851 self
852 }
853
854 pub fn set_or_clear_resource_manager_tags<T>(mut self, v: std::option::Option<T>) -> Self
856 where
857 T: std::convert::Into<crate::model::ResourceManagerTags>,
858 {
859 self.0.request.resource_manager_tags = v.map(|x| x.into());
860 self
861 }
862
863 pub fn set_containerd_config<T>(mut self, v: T) -> Self
865 where
866 T: std::convert::Into<crate::model::ContainerdConfig>,
867 {
868 self.0.request.containerd_config = std::option::Option::Some(v.into());
869 self
870 }
871
872 pub fn set_or_clear_containerd_config<T>(mut self, v: std::option::Option<T>) -> Self
874 where
875 T: std::convert::Into<crate::model::ContainerdConfig>,
876 {
877 self.0.request.containerd_config = v.map(|x| x.into());
878 self
879 }
880
881 pub fn set_queued_provisioning<T>(mut self, v: T) -> Self
883 where
884 T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
885 {
886 self.0.request.queued_provisioning = std::option::Option::Some(v.into());
887 self
888 }
889
890 pub fn set_or_clear_queued_provisioning<T>(mut self, v: std::option::Option<T>) -> Self
892 where
893 T: std::convert::Into<crate::model::node_pool::QueuedProvisioning>,
894 {
895 self.0.request.queued_provisioning = v.map(|x| x.into());
896 self
897 }
898
899 pub fn set_storage_pools<T, V>(mut self, v: T) -> Self
901 where
902 T: std::iter::IntoIterator<Item = V>,
903 V: std::convert::Into<std::string::String>,
904 {
905 use std::iter::Iterator;
906 self.0.request.storage_pools = v.into_iter().map(|i| i.into()).collect();
907 self
908 }
909
910 pub fn set_max_run_duration<T>(mut self, v: T) -> Self
912 where
913 T: std::convert::Into<wkt::Duration>,
914 {
915 self.0.request.max_run_duration = std::option::Option::Some(v.into());
916 self
917 }
918
919 pub fn set_or_clear_max_run_duration<T>(mut self, v: std::option::Option<T>) -> Self
921 where
922 T: std::convert::Into<wkt::Duration>,
923 {
924 self.0.request.max_run_duration = v.map(|x| x.into());
925 self
926 }
927
928 pub fn set_flex_start<T>(mut self, v: T) -> Self
930 where
931 T: std::convert::Into<bool>,
932 {
933 self.0.request.flex_start = std::option::Option::Some(v.into());
934 self
935 }
936
937 pub fn set_or_clear_flex_start<T>(mut self, v: std::option::Option<T>) -> Self
939 where
940 T: std::convert::Into<bool>,
941 {
942 self.0.request.flex_start = v.map(|x| x.into());
943 self
944 }
945 }
946
947 #[doc(hidden)]
948 impl gax::options::internal::RequestBuilder for UpdateNodePool {
949 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
950 &mut self.0.options
951 }
952 }
953
954 #[derive(Clone, Debug)]
972 pub struct SetNodePoolAutoscaling(RequestBuilder<crate::model::SetNodePoolAutoscalingRequest>);
973
974 impl SetNodePoolAutoscaling {
975 pub(crate) fn new(
976 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
977 ) -> Self {
978 Self(RequestBuilder::new(stub))
979 }
980
981 pub fn with_request<V: Into<crate::model::SetNodePoolAutoscalingRequest>>(
983 mut self,
984 v: V,
985 ) -> Self {
986 self.0.request = v.into();
987 self
988 }
989
990 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
992 self.0.options = v.into();
993 self
994 }
995
996 pub async fn send(self) -> Result<crate::model::Operation> {
998 (*self.0.stub)
999 .set_node_pool_autoscaling(self.0.request, self.0.options)
1000 .await
1001 .map(gax::response::Response::into_body)
1002 }
1003
1004 #[deprecated]
1006 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1007 self.0.request.project_id = v.into();
1008 self
1009 }
1010
1011 #[deprecated]
1013 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1014 self.0.request.zone = v.into();
1015 self
1016 }
1017
1018 #[deprecated]
1020 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1021 self.0.request.cluster_id = v.into();
1022 self
1023 }
1024
1025 #[deprecated]
1027 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1028 self.0.request.node_pool_id = v.into();
1029 self
1030 }
1031
1032 pub fn set_autoscaling<T>(mut self, v: T) -> Self
1036 where
1037 T: std::convert::Into<crate::model::NodePoolAutoscaling>,
1038 {
1039 self.0.request.autoscaling = std::option::Option::Some(v.into());
1040 self
1041 }
1042
1043 pub fn set_or_clear_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
1047 where
1048 T: std::convert::Into<crate::model::NodePoolAutoscaling>,
1049 {
1050 self.0.request.autoscaling = v.map(|x| x.into());
1051 self
1052 }
1053
1054 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1056 self.0.request.name = v.into();
1057 self
1058 }
1059 }
1060
1061 #[doc(hidden)]
1062 impl gax::options::internal::RequestBuilder for SetNodePoolAutoscaling {
1063 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1064 &mut self.0.options
1065 }
1066 }
1067
1068 #[derive(Clone, Debug)]
1086 pub struct SetLoggingService(RequestBuilder<crate::model::SetLoggingServiceRequest>);
1087
1088 impl SetLoggingService {
1089 pub(crate) fn new(
1090 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1091 ) -> Self {
1092 Self(RequestBuilder::new(stub))
1093 }
1094
1095 pub fn with_request<V: Into<crate::model::SetLoggingServiceRequest>>(
1097 mut self,
1098 v: V,
1099 ) -> Self {
1100 self.0.request = v.into();
1101 self
1102 }
1103
1104 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1106 self.0.options = v.into();
1107 self
1108 }
1109
1110 pub async fn send(self) -> Result<crate::model::Operation> {
1112 (*self.0.stub)
1113 .set_logging_service(self.0.request, self.0.options)
1114 .await
1115 .map(gax::response::Response::into_body)
1116 }
1117
1118 #[deprecated]
1120 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1121 self.0.request.project_id = v.into();
1122 self
1123 }
1124
1125 #[deprecated]
1127 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1128 self.0.request.zone = v.into();
1129 self
1130 }
1131
1132 #[deprecated]
1134 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1135 self.0.request.cluster_id = v.into();
1136 self
1137 }
1138
1139 pub fn set_logging_service<T: Into<std::string::String>>(mut self, v: T) -> Self {
1143 self.0.request.logging_service = v.into();
1144 self
1145 }
1146
1147 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1149 self.0.request.name = v.into();
1150 self
1151 }
1152 }
1153
1154 #[doc(hidden)]
1155 impl gax::options::internal::RequestBuilder for SetLoggingService {
1156 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1157 &mut self.0.options
1158 }
1159 }
1160
1161 #[derive(Clone, Debug)]
1179 pub struct SetMonitoringService(RequestBuilder<crate::model::SetMonitoringServiceRequest>);
1180
1181 impl SetMonitoringService {
1182 pub(crate) fn new(
1183 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1184 ) -> Self {
1185 Self(RequestBuilder::new(stub))
1186 }
1187
1188 pub fn with_request<V: Into<crate::model::SetMonitoringServiceRequest>>(
1190 mut self,
1191 v: V,
1192 ) -> Self {
1193 self.0.request = v.into();
1194 self
1195 }
1196
1197 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1199 self.0.options = v.into();
1200 self
1201 }
1202
1203 pub async fn send(self) -> Result<crate::model::Operation> {
1205 (*self.0.stub)
1206 .set_monitoring_service(self.0.request, self.0.options)
1207 .await
1208 .map(gax::response::Response::into_body)
1209 }
1210
1211 #[deprecated]
1213 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1214 self.0.request.project_id = v.into();
1215 self
1216 }
1217
1218 #[deprecated]
1220 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1221 self.0.request.zone = v.into();
1222 self
1223 }
1224
1225 #[deprecated]
1227 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1228 self.0.request.cluster_id = v.into();
1229 self
1230 }
1231
1232 pub fn set_monitoring_service<T: Into<std::string::String>>(mut self, v: T) -> Self {
1236 self.0.request.monitoring_service = v.into();
1237 self
1238 }
1239
1240 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1242 self.0.request.name = v.into();
1243 self
1244 }
1245 }
1246
1247 #[doc(hidden)]
1248 impl gax::options::internal::RequestBuilder for SetMonitoringService {
1249 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1250 &mut self.0.options
1251 }
1252 }
1253
1254 #[derive(Clone, Debug)]
1272 pub struct SetAddonsConfig(RequestBuilder<crate::model::SetAddonsConfigRequest>);
1273
1274 impl SetAddonsConfig {
1275 pub(crate) fn new(
1276 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1277 ) -> Self {
1278 Self(RequestBuilder::new(stub))
1279 }
1280
1281 pub fn with_request<V: Into<crate::model::SetAddonsConfigRequest>>(mut self, v: V) -> Self {
1283 self.0.request = v.into();
1284 self
1285 }
1286
1287 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1289 self.0.options = v.into();
1290 self
1291 }
1292
1293 pub async fn send(self) -> Result<crate::model::Operation> {
1295 (*self.0.stub)
1296 .set_addons_config(self.0.request, self.0.options)
1297 .await
1298 .map(gax::response::Response::into_body)
1299 }
1300
1301 #[deprecated]
1303 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1304 self.0.request.project_id = v.into();
1305 self
1306 }
1307
1308 #[deprecated]
1310 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1311 self.0.request.zone = v.into();
1312 self
1313 }
1314
1315 #[deprecated]
1317 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1318 self.0.request.cluster_id = v.into();
1319 self
1320 }
1321
1322 pub fn set_addons_config<T>(mut self, v: T) -> Self
1326 where
1327 T: std::convert::Into<crate::model::AddonsConfig>,
1328 {
1329 self.0.request.addons_config = std::option::Option::Some(v.into());
1330 self
1331 }
1332
1333 pub fn set_or_clear_addons_config<T>(mut self, v: std::option::Option<T>) -> Self
1337 where
1338 T: std::convert::Into<crate::model::AddonsConfig>,
1339 {
1340 self.0.request.addons_config = v.map(|x| x.into());
1341 self
1342 }
1343
1344 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1346 self.0.request.name = v.into();
1347 self
1348 }
1349 }
1350
1351 #[doc(hidden)]
1352 impl gax::options::internal::RequestBuilder for SetAddonsConfig {
1353 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1354 &mut self.0.options
1355 }
1356 }
1357
1358 #[derive(Clone, Debug)]
1376 pub struct SetLocations(RequestBuilder<crate::model::SetLocationsRequest>);
1377
1378 impl SetLocations {
1379 pub(crate) fn new(
1380 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1381 ) -> Self {
1382 Self(RequestBuilder::new(stub))
1383 }
1384
1385 pub fn with_request<V: Into<crate::model::SetLocationsRequest>>(mut self, v: V) -> Self {
1387 self.0.request = v.into();
1388 self
1389 }
1390
1391 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1393 self.0.options = v.into();
1394 self
1395 }
1396
1397 pub async fn send(self) -> Result<crate::model::Operation> {
1399 (*self.0.stub)
1400 .set_locations(self.0.request, self.0.options)
1401 .await
1402 .map(gax::response::Response::into_body)
1403 }
1404
1405 #[deprecated]
1407 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1408 self.0.request.project_id = v.into();
1409 self
1410 }
1411
1412 #[deprecated]
1414 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1415 self.0.request.zone = v.into();
1416 self
1417 }
1418
1419 #[deprecated]
1421 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1422 self.0.request.cluster_id = v.into();
1423 self
1424 }
1425
1426 pub fn set_locations<T, V>(mut self, v: T) -> Self
1430 where
1431 T: std::iter::IntoIterator<Item = V>,
1432 V: std::convert::Into<std::string::String>,
1433 {
1434 use std::iter::Iterator;
1435 self.0.request.locations = v.into_iter().map(|i| i.into()).collect();
1436 self
1437 }
1438
1439 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1441 self.0.request.name = v.into();
1442 self
1443 }
1444 }
1445
1446 #[doc(hidden)]
1447 impl gax::options::internal::RequestBuilder for SetLocations {
1448 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1449 &mut self.0.options
1450 }
1451 }
1452
1453 #[derive(Clone, Debug)]
1471 pub struct UpdateMaster(RequestBuilder<crate::model::UpdateMasterRequest>);
1472
1473 impl UpdateMaster {
1474 pub(crate) fn new(
1475 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1476 ) -> Self {
1477 Self(RequestBuilder::new(stub))
1478 }
1479
1480 pub fn with_request<V: Into<crate::model::UpdateMasterRequest>>(mut self, v: V) -> Self {
1482 self.0.request = v.into();
1483 self
1484 }
1485
1486 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1488 self.0.options = v.into();
1489 self
1490 }
1491
1492 pub async fn send(self) -> Result<crate::model::Operation> {
1494 (*self.0.stub)
1495 .update_master(self.0.request, self.0.options)
1496 .await
1497 .map(gax::response::Response::into_body)
1498 }
1499
1500 #[deprecated]
1502 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1503 self.0.request.project_id = v.into();
1504 self
1505 }
1506
1507 #[deprecated]
1509 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1510 self.0.request.zone = v.into();
1511 self
1512 }
1513
1514 #[deprecated]
1516 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1517 self.0.request.cluster_id = v.into();
1518 self
1519 }
1520
1521 pub fn set_master_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
1525 self.0.request.master_version = v.into();
1526 self
1527 }
1528
1529 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1531 self.0.request.name = v.into();
1532 self
1533 }
1534 }
1535
1536 #[doc(hidden)]
1537 impl gax::options::internal::RequestBuilder for UpdateMaster {
1538 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1539 &mut self.0.options
1540 }
1541 }
1542
1543 #[derive(Clone, Debug)]
1561 pub struct SetMasterAuth(RequestBuilder<crate::model::SetMasterAuthRequest>);
1562
1563 impl SetMasterAuth {
1564 pub(crate) fn new(
1565 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1566 ) -> Self {
1567 Self(RequestBuilder::new(stub))
1568 }
1569
1570 pub fn with_request<V: Into<crate::model::SetMasterAuthRequest>>(mut self, v: V) -> Self {
1572 self.0.request = v.into();
1573 self
1574 }
1575
1576 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1578 self.0.options = v.into();
1579 self
1580 }
1581
1582 pub async fn send(self) -> Result<crate::model::Operation> {
1584 (*self.0.stub)
1585 .set_master_auth(self.0.request, self.0.options)
1586 .await
1587 .map(gax::response::Response::into_body)
1588 }
1589
1590 #[deprecated]
1592 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1593 self.0.request.project_id = v.into();
1594 self
1595 }
1596
1597 #[deprecated]
1599 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1600 self.0.request.zone = v.into();
1601 self
1602 }
1603
1604 #[deprecated]
1606 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1607 self.0.request.cluster_id = v.into();
1608 self
1609 }
1610
1611 pub fn set_action<T: Into<crate::model::set_master_auth_request::Action>>(
1615 mut self,
1616 v: T,
1617 ) -> Self {
1618 self.0.request.action = v.into();
1619 self
1620 }
1621
1622 pub fn set_update<T>(mut self, v: T) -> Self
1626 where
1627 T: std::convert::Into<crate::model::MasterAuth>,
1628 {
1629 self.0.request.update = std::option::Option::Some(v.into());
1630 self
1631 }
1632
1633 pub fn set_or_clear_update<T>(mut self, v: std::option::Option<T>) -> Self
1637 where
1638 T: std::convert::Into<crate::model::MasterAuth>,
1639 {
1640 self.0.request.update = v.map(|x| x.into());
1641 self
1642 }
1643
1644 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1646 self.0.request.name = v.into();
1647 self
1648 }
1649 }
1650
1651 #[doc(hidden)]
1652 impl gax::options::internal::RequestBuilder for SetMasterAuth {
1653 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1654 &mut self.0.options
1655 }
1656 }
1657
1658 #[derive(Clone, Debug)]
1676 pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
1677
1678 impl DeleteCluster {
1679 pub(crate) fn new(
1680 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1681 ) -> Self {
1682 Self(RequestBuilder::new(stub))
1683 }
1684
1685 pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
1687 self.0.request = v.into();
1688 self
1689 }
1690
1691 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1693 self.0.options = v.into();
1694 self
1695 }
1696
1697 pub async fn send(self) -> Result<crate::model::Operation> {
1699 (*self.0.stub)
1700 .delete_cluster(self.0.request, self.0.options)
1701 .await
1702 .map(gax::response::Response::into_body)
1703 }
1704
1705 #[deprecated]
1707 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1708 self.0.request.project_id = v.into();
1709 self
1710 }
1711
1712 #[deprecated]
1714 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1715 self.0.request.zone = v.into();
1716 self
1717 }
1718
1719 #[deprecated]
1721 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1722 self.0.request.cluster_id = v.into();
1723 self
1724 }
1725
1726 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1728 self.0.request.name = v.into();
1729 self
1730 }
1731 }
1732
1733 #[doc(hidden)]
1734 impl gax::options::internal::RequestBuilder for DeleteCluster {
1735 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1736 &mut self.0.options
1737 }
1738 }
1739
1740 #[derive(Clone, Debug)]
1758 pub struct ListOperations(RequestBuilder<crate::model::ListOperationsRequest>);
1759
1760 impl ListOperations {
1761 pub(crate) fn new(
1762 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1763 ) -> Self {
1764 Self(RequestBuilder::new(stub))
1765 }
1766
1767 pub fn with_request<V: Into<crate::model::ListOperationsRequest>>(mut self, v: V) -> Self {
1769 self.0.request = v.into();
1770 self
1771 }
1772
1773 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1775 self.0.options = v.into();
1776 self
1777 }
1778
1779 pub async fn send(self) -> Result<crate::model::ListOperationsResponse> {
1781 (*self.0.stub)
1782 .list_operations(self.0.request, self.0.options)
1783 .await
1784 .map(gax::response::Response::into_body)
1785 }
1786
1787 #[deprecated]
1789 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1790 self.0.request.project_id = v.into();
1791 self
1792 }
1793
1794 #[deprecated]
1796 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1797 self.0.request.zone = v.into();
1798 self
1799 }
1800
1801 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1803 self.0.request.parent = v.into();
1804 self
1805 }
1806 }
1807
1808 #[doc(hidden)]
1809 impl gax::options::internal::RequestBuilder for ListOperations {
1810 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1811 &mut self.0.options
1812 }
1813 }
1814
1815 #[derive(Clone, Debug)]
1833 pub struct GetOperation(RequestBuilder<crate::model::GetOperationRequest>);
1834
1835 impl GetOperation {
1836 pub(crate) fn new(
1837 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1838 ) -> Self {
1839 Self(RequestBuilder::new(stub))
1840 }
1841
1842 pub fn with_request<V: Into<crate::model::GetOperationRequest>>(mut self, v: V) -> Self {
1844 self.0.request = v.into();
1845 self
1846 }
1847
1848 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1850 self.0.options = v.into();
1851 self
1852 }
1853
1854 pub async fn send(self) -> Result<crate::model::Operation> {
1856 (*self.0.stub)
1857 .get_operation(self.0.request, self.0.options)
1858 .await
1859 .map(gax::response::Response::into_body)
1860 }
1861
1862 #[deprecated]
1864 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1865 self.0.request.project_id = v.into();
1866 self
1867 }
1868
1869 #[deprecated]
1871 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1872 self.0.request.zone = v.into();
1873 self
1874 }
1875
1876 #[deprecated]
1878 pub fn set_operation_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1879 self.0.request.operation_id = v.into();
1880 self
1881 }
1882
1883 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1885 self.0.request.name = v.into();
1886 self
1887 }
1888 }
1889
1890 #[doc(hidden)]
1891 impl gax::options::internal::RequestBuilder for GetOperation {
1892 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1893 &mut self.0.options
1894 }
1895 }
1896
1897 #[derive(Clone, Debug)]
1915 pub struct CancelOperation(RequestBuilder<crate::model::CancelOperationRequest>);
1916
1917 impl CancelOperation {
1918 pub(crate) fn new(
1919 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1920 ) -> Self {
1921 Self(RequestBuilder::new(stub))
1922 }
1923
1924 pub fn with_request<V: Into<crate::model::CancelOperationRequest>>(mut self, v: V) -> Self {
1926 self.0.request = v.into();
1927 self
1928 }
1929
1930 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1932 self.0.options = v.into();
1933 self
1934 }
1935
1936 pub async fn send(self) -> Result<()> {
1938 (*self.0.stub)
1939 .cancel_operation(self.0.request, self.0.options)
1940 .await
1941 .map(gax::response::Response::into_body)
1942 }
1943
1944 #[deprecated]
1946 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1947 self.0.request.project_id = v.into();
1948 self
1949 }
1950
1951 #[deprecated]
1953 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1954 self.0.request.zone = v.into();
1955 self
1956 }
1957
1958 #[deprecated]
1960 pub fn set_operation_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1961 self.0.request.operation_id = v.into();
1962 self
1963 }
1964
1965 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1967 self.0.request.name = v.into();
1968 self
1969 }
1970 }
1971
1972 #[doc(hidden)]
1973 impl gax::options::internal::RequestBuilder for CancelOperation {
1974 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1975 &mut self.0.options
1976 }
1977 }
1978
1979 #[derive(Clone, Debug)]
1997 pub struct GetServerConfig(RequestBuilder<crate::model::GetServerConfigRequest>);
1998
1999 impl GetServerConfig {
2000 pub(crate) fn new(
2001 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2002 ) -> Self {
2003 Self(RequestBuilder::new(stub))
2004 }
2005
2006 pub fn with_request<V: Into<crate::model::GetServerConfigRequest>>(mut self, v: V) -> Self {
2008 self.0.request = v.into();
2009 self
2010 }
2011
2012 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2014 self.0.options = v.into();
2015 self
2016 }
2017
2018 pub async fn send(self) -> Result<crate::model::ServerConfig> {
2020 (*self.0.stub)
2021 .get_server_config(self.0.request, self.0.options)
2022 .await
2023 .map(gax::response::Response::into_body)
2024 }
2025
2026 #[deprecated]
2028 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2029 self.0.request.project_id = v.into();
2030 self
2031 }
2032
2033 #[deprecated]
2035 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2036 self.0.request.zone = v.into();
2037 self
2038 }
2039
2040 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2042 self.0.request.name = v.into();
2043 self
2044 }
2045 }
2046
2047 #[doc(hidden)]
2048 impl gax::options::internal::RequestBuilder for GetServerConfig {
2049 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2050 &mut self.0.options
2051 }
2052 }
2053
2054 #[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)]
2133 pub struct ListNodePools(RequestBuilder<crate::model::ListNodePoolsRequest>);
2134
2135 impl ListNodePools {
2136 pub(crate) fn new(
2137 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2138 ) -> Self {
2139 Self(RequestBuilder::new(stub))
2140 }
2141
2142 pub fn with_request<V: Into<crate::model::ListNodePoolsRequest>>(mut self, v: V) -> Self {
2144 self.0.request = v.into();
2145 self
2146 }
2147
2148 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2150 self.0.options = v.into();
2151 self
2152 }
2153
2154 pub async fn send(self) -> Result<crate::model::ListNodePoolsResponse> {
2156 (*self.0.stub)
2157 .list_node_pools(self.0.request, self.0.options)
2158 .await
2159 .map(gax::response::Response::into_body)
2160 }
2161
2162 #[deprecated]
2164 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2165 self.0.request.project_id = v.into();
2166 self
2167 }
2168
2169 #[deprecated]
2171 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2172 self.0.request.zone = v.into();
2173 self
2174 }
2175
2176 #[deprecated]
2178 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2179 self.0.request.cluster_id = v.into();
2180 self
2181 }
2182
2183 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2185 self.0.request.parent = v.into();
2186 self
2187 }
2188 }
2189
2190 #[doc(hidden)]
2191 impl gax::options::internal::RequestBuilder for ListNodePools {
2192 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2193 &mut self.0.options
2194 }
2195 }
2196
2197 #[derive(Clone, Debug)]
2215 pub struct GetNodePool(RequestBuilder<crate::model::GetNodePoolRequest>);
2216
2217 impl GetNodePool {
2218 pub(crate) fn new(
2219 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2220 ) -> Self {
2221 Self(RequestBuilder::new(stub))
2222 }
2223
2224 pub fn with_request<V: Into<crate::model::GetNodePoolRequest>>(mut self, v: V) -> Self {
2226 self.0.request = v.into();
2227 self
2228 }
2229
2230 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2232 self.0.options = v.into();
2233 self
2234 }
2235
2236 pub async fn send(self) -> Result<crate::model::NodePool> {
2238 (*self.0.stub)
2239 .get_node_pool(self.0.request, self.0.options)
2240 .await
2241 .map(gax::response::Response::into_body)
2242 }
2243
2244 #[deprecated]
2246 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2247 self.0.request.project_id = v.into();
2248 self
2249 }
2250
2251 #[deprecated]
2253 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2254 self.0.request.zone = v.into();
2255 self
2256 }
2257
2258 #[deprecated]
2260 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2261 self.0.request.cluster_id = v.into();
2262 self
2263 }
2264
2265 #[deprecated]
2267 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2268 self.0.request.node_pool_id = v.into();
2269 self
2270 }
2271
2272 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2274 self.0.request.name = v.into();
2275 self
2276 }
2277 }
2278
2279 #[doc(hidden)]
2280 impl gax::options::internal::RequestBuilder for GetNodePool {
2281 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2282 &mut self.0.options
2283 }
2284 }
2285
2286 #[derive(Clone, Debug)]
2304 pub struct CreateNodePool(RequestBuilder<crate::model::CreateNodePoolRequest>);
2305
2306 impl CreateNodePool {
2307 pub(crate) fn new(
2308 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2309 ) -> Self {
2310 Self(RequestBuilder::new(stub))
2311 }
2312
2313 pub fn with_request<V: Into<crate::model::CreateNodePoolRequest>>(mut self, v: V) -> Self {
2315 self.0.request = v.into();
2316 self
2317 }
2318
2319 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2321 self.0.options = v.into();
2322 self
2323 }
2324
2325 pub async fn send(self) -> Result<crate::model::Operation> {
2327 (*self.0.stub)
2328 .create_node_pool(self.0.request, self.0.options)
2329 .await
2330 .map(gax::response::Response::into_body)
2331 }
2332
2333 #[deprecated]
2335 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2336 self.0.request.project_id = v.into();
2337 self
2338 }
2339
2340 #[deprecated]
2342 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2343 self.0.request.zone = v.into();
2344 self
2345 }
2346
2347 #[deprecated]
2349 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2350 self.0.request.cluster_id = v.into();
2351 self
2352 }
2353
2354 pub fn set_node_pool<T>(mut self, v: T) -> Self
2358 where
2359 T: std::convert::Into<crate::model::NodePool>,
2360 {
2361 self.0.request.node_pool = std::option::Option::Some(v.into());
2362 self
2363 }
2364
2365 pub fn set_or_clear_node_pool<T>(mut self, v: std::option::Option<T>) -> Self
2369 where
2370 T: std::convert::Into<crate::model::NodePool>,
2371 {
2372 self.0.request.node_pool = v.map(|x| x.into());
2373 self
2374 }
2375
2376 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2378 self.0.request.parent = v.into();
2379 self
2380 }
2381 }
2382
2383 #[doc(hidden)]
2384 impl gax::options::internal::RequestBuilder for CreateNodePool {
2385 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2386 &mut self.0.options
2387 }
2388 }
2389
2390 #[derive(Clone, Debug)]
2408 pub struct DeleteNodePool(RequestBuilder<crate::model::DeleteNodePoolRequest>);
2409
2410 impl DeleteNodePool {
2411 pub(crate) fn new(
2412 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2413 ) -> Self {
2414 Self(RequestBuilder::new(stub))
2415 }
2416
2417 pub fn with_request<V: Into<crate::model::DeleteNodePoolRequest>>(mut self, v: V) -> Self {
2419 self.0.request = v.into();
2420 self
2421 }
2422
2423 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2425 self.0.options = v.into();
2426 self
2427 }
2428
2429 pub async fn send(self) -> Result<crate::model::Operation> {
2431 (*self.0.stub)
2432 .delete_node_pool(self.0.request, self.0.options)
2433 .await
2434 .map(gax::response::Response::into_body)
2435 }
2436
2437 #[deprecated]
2439 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2440 self.0.request.project_id = v.into();
2441 self
2442 }
2443
2444 #[deprecated]
2446 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2447 self.0.request.zone = v.into();
2448 self
2449 }
2450
2451 #[deprecated]
2453 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2454 self.0.request.cluster_id = v.into();
2455 self
2456 }
2457
2458 #[deprecated]
2460 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2461 self.0.request.node_pool_id = v.into();
2462 self
2463 }
2464
2465 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2467 self.0.request.name = v.into();
2468 self
2469 }
2470 }
2471
2472 #[doc(hidden)]
2473 impl gax::options::internal::RequestBuilder for DeleteNodePool {
2474 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2475 &mut self.0.options
2476 }
2477 }
2478
2479 #[derive(Clone, Debug)]
2497 pub struct CompleteNodePoolUpgrade(
2498 RequestBuilder<crate::model::CompleteNodePoolUpgradeRequest>,
2499 );
2500
2501 impl CompleteNodePoolUpgrade {
2502 pub(crate) fn new(
2503 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2504 ) -> Self {
2505 Self(RequestBuilder::new(stub))
2506 }
2507
2508 pub fn with_request<V: Into<crate::model::CompleteNodePoolUpgradeRequest>>(
2510 mut self,
2511 v: V,
2512 ) -> Self {
2513 self.0.request = v.into();
2514 self
2515 }
2516
2517 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2519 self.0.options = v.into();
2520 self
2521 }
2522
2523 pub async fn send(self) -> Result<()> {
2525 (*self.0.stub)
2526 .complete_node_pool_upgrade(self.0.request, self.0.options)
2527 .await
2528 .map(gax::response::Response::into_body)
2529 }
2530
2531 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2533 self.0.request.name = v.into();
2534 self
2535 }
2536 }
2537
2538 #[doc(hidden)]
2539 impl gax::options::internal::RequestBuilder for CompleteNodePoolUpgrade {
2540 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2541 &mut self.0.options
2542 }
2543 }
2544
2545 #[derive(Clone, Debug)]
2563 pub struct RollbackNodePoolUpgrade(
2564 RequestBuilder<crate::model::RollbackNodePoolUpgradeRequest>,
2565 );
2566
2567 impl RollbackNodePoolUpgrade {
2568 pub(crate) fn new(
2569 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2570 ) -> Self {
2571 Self(RequestBuilder::new(stub))
2572 }
2573
2574 pub fn with_request<V: Into<crate::model::RollbackNodePoolUpgradeRequest>>(
2576 mut self,
2577 v: V,
2578 ) -> Self {
2579 self.0.request = v.into();
2580 self
2581 }
2582
2583 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2585 self.0.options = v.into();
2586 self
2587 }
2588
2589 pub async fn send(self) -> Result<crate::model::Operation> {
2591 (*self.0.stub)
2592 .rollback_node_pool_upgrade(self.0.request, self.0.options)
2593 .await
2594 .map(gax::response::Response::into_body)
2595 }
2596
2597 #[deprecated]
2599 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2600 self.0.request.project_id = v.into();
2601 self
2602 }
2603
2604 #[deprecated]
2606 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2607 self.0.request.zone = v.into();
2608 self
2609 }
2610
2611 #[deprecated]
2613 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2614 self.0.request.cluster_id = v.into();
2615 self
2616 }
2617
2618 #[deprecated]
2620 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2621 self.0.request.node_pool_id = v.into();
2622 self
2623 }
2624
2625 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2627 self.0.request.name = v.into();
2628 self
2629 }
2630
2631 pub fn set_respect_pdb<T: Into<bool>>(mut self, v: T) -> Self {
2633 self.0.request.respect_pdb = v.into();
2634 self
2635 }
2636 }
2637
2638 #[doc(hidden)]
2639 impl gax::options::internal::RequestBuilder for RollbackNodePoolUpgrade {
2640 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2641 &mut self.0.options
2642 }
2643 }
2644
2645 #[derive(Clone, Debug)]
2663 pub struct SetNodePoolManagement(RequestBuilder<crate::model::SetNodePoolManagementRequest>);
2664
2665 impl SetNodePoolManagement {
2666 pub(crate) fn new(
2667 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2668 ) -> Self {
2669 Self(RequestBuilder::new(stub))
2670 }
2671
2672 pub fn with_request<V: Into<crate::model::SetNodePoolManagementRequest>>(
2674 mut self,
2675 v: V,
2676 ) -> Self {
2677 self.0.request = v.into();
2678 self
2679 }
2680
2681 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2683 self.0.options = v.into();
2684 self
2685 }
2686
2687 pub async fn send(self) -> Result<crate::model::Operation> {
2689 (*self.0.stub)
2690 .set_node_pool_management(self.0.request, self.0.options)
2691 .await
2692 .map(gax::response::Response::into_body)
2693 }
2694
2695 #[deprecated]
2697 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2698 self.0.request.project_id = v.into();
2699 self
2700 }
2701
2702 #[deprecated]
2704 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2705 self.0.request.zone = v.into();
2706 self
2707 }
2708
2709 #[deprecated]
2711 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2712 self.0.request.cluster_id = v.into();
2713 self
2714 }
2715
2716 #[deprecated]
2718 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2719 self.0.request.node_pool_id = v.into();
2720 self
2721 }
2722
2723 pub fn set_management<T>(mut self, v: T) -> Self
2727 where
2728 T: std::convert::Into<crate::model::NodeManagement>,
2729 {
2730 self.0.request.management = std::option::Option::Some(v.into());
2731 self
2732 }
2733
2734 pub fn set_or_clear_management<T>(mut self, v: std::option::Option<T>) -> Self
2738 where
2739 T: std::convert::Into<crate::model::NodeManagement>,
2740 {
2741 self.0.request.management = v.map(|x| x.into());
2742 self
2743 }
2744
2745 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2747 self.0.request.name = v.into();
2748 self
2749 }
2750 }
2751
2752 #[doc(hidden)]
2753 impl gax::options::internal::RequestBuilder for SetNodePoolManagement {
2754 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2755 &mut self.0.options
2756 }
2757 }
2758
2759 #[derive(Clone, Debug)]
2777 pub struct SetLabels(RequestBuilder<crate::model::SetLabelsRequest>);
2778
2779 impl SetLabels {
2780 pub(crate) fn new(
2781 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2782 ) -> Self {
2783 Self(RequestBuilder::new(stub))
2784 }
2785
2786 pub fn with_request<V: Into<crate::model::SetLabelsRequest>>(mut self, v: V) -> Self {
2788 self.0.request = v.into();
2789 self
2790 }
2791
2792 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2794 self.0.options = v.into();
2795 self
2796 }
2797
2798 pub async fn send(self) -> Result<crate::model::Operation> {
2800 (*self.0.stub)
2801 .set_labels(self.0.request, self.0.options)
2802 .await
2803 .map(gax::response::Response::into_body)
2804 }
2805
2806 #[deprecated]
2808 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2809 self.0.request.project_id = v.into();
2810 self
2811 }
2812
2813 #[deprecated]
2815 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2816 self.0.request.zone = v.into();
2817 self
2818 }
2819
2820 #[deprecated]
2822 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2823 self.0.request.cluster_id = v.into();
2824 self
2825 }
2826
2827 pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
2831 where
2832 T: std::iter::IntoIterator<Item = (K, V)>,
2833 K: std::convert::Into<std::string::String>,
2834 V: std::convert::Into<std::string::String>,
2835 {
2836 self.0.request.resource_labels =
2837 v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2838 self
2839 }
2840
2841 pub fn set_label_fingerprint<T: Into<std::string::String>>(mut self, v: T) -> Self {
2845 self.0.request.label_fingerprint = v.into();
2846 self
2847 }
2848
2849 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2851 self.0.request.name = v.into();
2852 self
2853 }
2854 }
2855
2856 #[doc(hidden)]
2857 impl gax::options::internal::RequestBuilder for SetLabels {
2858 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2859 &mut self.0.options
2860 }
2861 }
2862
2863 #[derive(Clone, Debug)]
2881 pub struct SetLegacyAbac(RequestBuilder<crate::model::SetLegacyAbacRequest>);
2882
2883 impl SetLegacyAbac {
2884 pub(crate) fn new(
2885 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2886 ) -> Self {
2887 Self(RequestBuilder::new(stub))
2888 }
2889
2890 pub fn with_request<V: Into<crate::model::SetLegacyAbacRequest>>(mut self, v: V) -> Self {
2892 self.0.request = v.into();
2893 self
2894 }
2895
2896 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2898 self.0.options = v.into();
2899 self
2900 }
2901
2902 pub async fn send(self) -> Result<crate::model::Operation> {
2904 (*self.0.stub)
2905 .set_legacy_abac(self.0.request, self.0.options)
2906 .await
2907 .map(gax::response::Response::into_body)
2908 }
2909
2910 #[deprecated]
2912 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2913 self.0.request.project_id = v.into();
2914 self
2915 }
2916
2917 #[deprecated]
2919 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2920 self.0.request.zone = v.into();
2921 self
2922 }
2923
2924 #[deprecated]
2926 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2927 self.0.request.cluster_id = v.into();
2928 self
2929 }
2930
2931 pub fn set_enabled<T: Into<bool>>(mut self, v: T) -> Self {
2935 self.0.request.enabled = v.into();
2936 self
2937 }
2938
2939 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2941 self.0.request.name = v.into();
2942 self
2943 }
2944 }
2945
2946 #[doc(hidden)]
2947 impl gax::options::internal::RequestBuilder for SetLegacyAbac {
2948 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2949 &mut self.0.options
2950 }
2951 }
2952
2953 #[derive(Clone, Debug)]
2971 pub struct StartIPRotation(RequestBuilder<crate::model::StartIPRotationRequest>);
2972
2973 impl StartIPRotation {
2974 pub(crate) fn new(
2975 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2976 ) -> Self {
2977 Self(RequestBuilder::new(stub))
2978 }
2979
2980 pub fn with_request<V: Into<crate::model::StartIPRotationRequest>>(mut self, v: V) -> Self {
2982 self.0.request = v.into();
2983 self
2984 }
2985
2986 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2988 self.0.options = v.into();
2989 self
2990 }
2991
2992 pub async fn send(self) -> Result<crate::model::Operation> {
2994 (*self.0.stub)
2995 .start_ip_rotation(self.0.request, self.0.options)
2996 .await
2997 .map(gax::response::Response::into_body)
2998 }
2999
3000 #[deprecated]
3002 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3003 self.0.request.project_id = v.into();
3004 self
3005 }
3006
3007 #[deprecated]
3009 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3010 self.0.request.zone = v.into();
3011 self
3012 }
3013
3014 #[deprecated]
3016 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3017 self.0.request.cluster_id = v.into();
3018 self
3019 }
3020
3021 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3023 self.0.request.name = v.into();
3024 self
3025 }
3026
3027 pub fn set_rotate_credentials<T: Into<bool>>(mut self, v: T) -> Self {
3029 self.0.request.rotate_credentials = v.into();
3030 self
3031 }
3032 }
3033
3034 #[doc(hidden)]
3035 impl gax::options::internal::RequestBuilder for StartIPRotation {
3036 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3037 &mut self.0.options
3038 }
3039 }
3040
3041 #[derive(Clone, Debug)]
3059 pub struct CompleteIPRotation(RequestBuilder<crate::model::CompleteIPRotationRequest>);
3060
3061 impl CompleteIPRotation {
3062 pub(crate) fn new(
3063 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3064 ) -> Self {
3065 Self(RequestBuilder::new(stub))
3066 }
3067
3068 pub fn with_request<V: Into<crate::model::CompleteIPRotationRequest>>(
3070 mut self,
3071 v: V,
3072 ) -> Self {
3073 self.0.request = v.into();
3074 self
3075 }
3076
3077 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3079 self.0.options = v.into();
3080 self
3081 }
3082
3083 pub async fn send(self) -> Result<crate::model::Operation> {
3085 (*self.0.stub)
3086 .complete_ip_rotation(self.0.request, self.0.options)
3087 .await
3088 .map(gax::response::Response::into_body)
3089 }
3090
3091 #[deprecated]
3093 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3094 self.0.request.project_id = v.into();
3095 self
3096 }
3097
3098 #[deprecated]
3100 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3101 self.0.request.zone = v.into();
3102 self
3103 }
3104
3105 #[deprecated]
3107 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3108 self.0.request.cluster_id = v.into();
3109 self
3110 }
3111
3112 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3114 self.0.request.name = v.into();
3115 self
3116 }
3117 }
3118
3119 #[doc(hidden)]
3120 impl gax::options::internal::RequestBuilder for CompleteIPRotation {
3121 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3122 &mut self.0.options
3123 }
3124 }
3125
3126 #[derive(Clone, Debug)]
3144 pub struct SetNodePoolSize(RequestBuilder<crate::model::SetNodePoolSizeRequest>);
3145
3146 impl SetNodePoolSize {
3147 pub(crate) fn new(
3148 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3149 ) -> Self {
3150 Self(RequestBuilder::new(stub))
3151 }
3152
3153 pub fn with_request<V: Into<crate::model::SetNodePoolSizeRequest>>(mut self, v: V) -> Self {
3155 self.0.request = v.into();
3156 self
3157 }
3158
3159 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3161 self.0.options = v.into();
3162 self
3163 }
3164
3165 pub async fn send(self) -> Result<crate::model::Operation> {
3167 (*self.0.stub)
3168 .set_node_pool_size(self.0.request, self.0.options)
3169 .await
3170 .map(gax::response::Response::into_body)
3171 }
3172
3173 #[deprecated]
3175 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3176 self.0.request.project_id = v.into();
3177 self
3178 }
3179
3180 #[deprecated]
3182 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3183 self.0.request.zone = v.into();
3184 self
3185 }
3186
3187 #[deprecated]
3189 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3190 self.0.request.cluster_id = v.into();
3191 self
3192 }
3193
3194 #[deprecated]
3196 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3197 self.0.request.node_pool_id = v.into();
3198 self
3199 }
3200
3201 pub fn set_node_count<T: Into<i32>>(mut self, v: T) -> Self {
3205 self.0.request.node_count = v.into();
3206 self
3207 }
3208
3209 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3211 self.0.request.name = v.into();
3212 self
3213 }
3214 }
3215
3216 #[doc(hidden)]
3217 impl gax::options::internal::RequestBuilder for SetNodePoolSize {
3218 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3219 &mut self.0.options
3220 }
3221 }
3222
3223 #[derive(Clone, Debug)]
3241 pub struct SetNetworkPolicy(RequestBuilder<crate::model::SetNetworkPolicyRequest>);
3242
3243 impl SetNetworkPolicy {
3244 pub(crate) fn new(
3245 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3246 ) -> Self {
3247 Self(RequestBuilder::new(stub))
3248 }
3249
3250 pub fn with_request<V: Into<crate::model::SetNetworkPolicyRequest>>(
3252 mut self,
3253 v: V,
3254 ) -> Self {
3255 self.0.request = v.into();
3256 self
3257 }
3258
3259 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3261 self.0.options = v.into();
3262 self
3263 }
3264
3265 pub async fn send(self) -> Result<crate::model::Operation> {
3267 (*self.0.stub)
3268 .set_network_policy(self.0.request, self.0.options)
3269 .await
3270 .map(gax::response::Response::into_body)
3271 }
3272
3273 #[deprecated]
3275 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3276 self.0.request.project_id = v.into();
3277 self
3278 }
3279
3280 #[deprecated]
3282 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3283 self.0.request.zone = v.into();
3284 self
3285 }
3286
3287 #[deprecated]
3289 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3290 self.0.request.cluster_id = v.into();
3291 self
3292 }
3293
3294 pub fn set_network_policy<T>(mut self, v: T) -> Self
3298 where
3299 T: std::convert::Into<crate::model::NetworkPolicy>,
3300 {
3301 self.0.request.network_policy = std::option::Option::Some(v.into());
3302 self
3303 }
3304
3305 pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
3309 where
3310 T: std::convert::Into<crate::model::NetworkPolicy>,
3311 {
3312 self.0.request.network_policy = v.map(|x| x.into());
3313 self
3314 }
3315
3316 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3318 self.0.request.name = v.into();
3319 self
3320 }
3321 }
3322
3323 #[doc(hidden)]
3324 impl gax::options::internal::RequestBuilder for SetNetworkPolicy {
3325 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3326 &mut self.0.options
3327 }
3328 }
3329
3330 #[derive(Clone, Debug)]
3348 pub struct SetMaintenancePolicy(RequestBuilder<crate::model::SetMaintenancePolicyRequest>);
3349
3350 impl SetMaintenancePolicy {
3351 pub(crate) fn new(
3352 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3353 ) -> Self {
3354 Self(RequestBuilder::new(stub))
3355 }
3356
3357 pub fn with_request<V: Into<crate::model::SetMaintenancePolicyRequest>>(
3359 mut self,
3360 v: V,
3361 ) -> Self {
3362 self.0.request = v.into();
3363 self
3364 }
3365
3366 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3368 self.0.options = v.into();
3369 self
3370 }
3371
3372 pub async fn send(self) -> Result<crate::model::Operation> {
3374 (*self.0.stub)
3375 .set_maintenance_policy(self.0.request, self.0.options)
3376 .await
3377 .map(gax::response::Response::into_body)
3378 }
3379
3380 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3384 self.0.request.project_id = v.into();
3385 self
3386 }
3387
3388 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3392 self.0.request.zone = v.into();
3393 self
3394 }
3395
3396 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3400 self.0.request.cluster_id = v.into();
3401 self
3402 }
3403
3404 pub fn set_maintenance_policy<T>(mut self, v: T) -> Self
3408 where
3409 T: std::convert::Into<crate::model::MaintenancePolicy>,
3410 {
3411 self.0.request.maintenance_policy = std::option::Option::Some(v.into());
3412 self
3413 }
3414
3415 pub fn set_or_clear_maintenance_policy<T>(mut self, v: std::option::Option<T>) -> Self
3419 where
3420 T: std::convert::Into<crate::model::MaintenancePolicy>,
3421 {
3422 self.0.request.maintenance_policy = v.map(|x| x.into());
3423 self
3424 }
3425
3426 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3428 self.0.request.name = v.into();
3429 self
3430 }
3431 }
3432
3433 #[doc(hidden)]
3434 impl gax::options::internal::RequestBuilder for SetMaintenancePolicy {
3435 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3436 &mut self.0.options
3437 }
3438 }
3439
3440 #[derive(Clone, Debug)]
3462 pub struct ListUsableSubnetworks(RequestBuilder<crate::model::ListUsableSubnetworksRequest>);
3463
3464 impl ListUsableSubnetworks {
3465 pub(crate) fn new(
3466 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3467 ) -> Self {
3468 Self(RequestBuilder::new(stub))
3469 }
3470
3471 pub fn with_request<V: Into<crate::model::ListUsableSubnetworksRequest>>(
3473 mut self,
3474 v: V,
3475 ) -> Self {
3476 self.0.request = v.into();
3477 self
3478 }
3479
3480 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3482 self.0.options = v.into();
3483 self
3484 }
3485
3486 pub async fn send(self) -> Result<crate::model::ListUsableSubnetworksResponse> {
3488 (*self.0.stub)
3489 .list_usable_subnetworks(self.0.request, self.0.options)
3490 .await
3491 .map(gax::response::Response::into_body)
3492 }
3493
3494 pub fn by_page(
3496 self,
3497 ) -> impl gax::paginator::Paginator<crate::model::ListUsableSubnetworksResponse, gax::error::Error>
3498 {
3499 use std::clone::Clone;
3500 let token = self.0.request.page_token.clone();
3501 let execute = move |token: String| {
3502 let mut builder = self.clone();
3503 builder.0.request = builder.0.request.set_page_token(token);
3504 builder.send()
3505 };
3506 gax::paginator::internal::new_paginator(token, execute)
3507 }
3508
3509 pub fn by_item(
3511 self,
3512 ) -> impl gax::paginator::ItemPaginator<
3513 crate::model::ListUsableSubnetworksResponse,
3514 gax::error::Error,
3515 > {
3516 use gax::paginator::Paginator;
3517 self.by_page().items()
3518 }
3519
3520 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3522 self.0.request.parent = v.into();
3523 self
3524 }
3525
3526 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3528 self.0.request.filter = v.into();
3529 self
3530 }
3531
3532 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3534 self.0.request.page_size = v.into();
3535 self
3536 }
3537
3538 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3540 self.0.request.page_token = v.into();
3541 self
3542 }
3543 }
3544
3545 #[doc(hidden)]
3546 impl gax::options::internal::RequestBuilder for ListUsableSubnetworks {
3547 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3548 &mut self.0.options
3549 }
3550 }
3551
3552 #[derive(Clone, Debug)]
3570 pub struct CheckAutopilotCompatibility(
3571 RequestBuilder<crate::model::CheckAutopilotCompatibilityRequest>,
3572 );
3573
3574 impl CheckAutopilotCompatibility {
3575 pub(crate) fn new(
3576 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3577 ) -> Self {
3578 Self(RequestBuilder::new(stub))
3579 }
3580
3581 pub fn with_request<V: Into<crate::model::CheckAutopilotCompatibilityRequest>>(
3583 mut self,
3584 v: V,
3585 ) -> Self {
3586 self.0.request = v.into();
3587 self
3588 }
3589
3590 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3592 self.0.options = v.into();
3593 self
3594 }
3595
3596 pub async fn send(self) -> Result<crate::model::CheckAutopilotCompatibilityResponse> {
3598 (*self.0.stub)
3599 .check_autopilot_compatibility(self.0.request, self.0.options)
3600 .await
3601 .map(gax::response::Response::into_body)
3602 }
3603
3604 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3606 self.0.request.name = v.into();
3607 self
3608 }
3609 }
3610
3611 #[doc(hidden)]
3612 impl gax::options::internal::RequestBuilder for CheckAutopilotCompatibility {
3613 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3614 &mut self.0.options
3615 }
3616 }
3617
3618 #[derive(Clone, Debug)]
3636 pub struct FetchClusterUpgradeInfo(
3637 RequestBuilder<crate::model::FetchClusterUpgradeInfoRequest>,
3638 );
3639
3640 impl FetchClusterUpgradeInfo {
3641 pub(crate) fn new(
3642 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3643 ) -> Self {
3644 Self(RequestBuilder::new(stub))
3645 }
3646
3647 pub fn with_request<V: Into<crate::model::FetchClusterUpgradeInfoRequest>>(
3649 mut self,
3650 v: V,
3651 ) -> Self {
3652 self.0.request = v.into();
3653 self
3654 }
3655
3656 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3658 self.0.options = v.into();
3659 self
3660 }
3661
3662 pub async fn send(self) -> Result<crate::model::ClusterUpgradeInfo> {
3664 (*self.0.stub)
3665 .fetch_cluster_upgrade_info(self.0.request, self.0.options)
3666 .await
3667 .map(gax::response::Response::into_body)
3668 }
3669
3670 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3674 self.0.request.name = v.into();
3675 self
3676 }
3677
3678 pub fn set_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
3680 self.0.request.version = v.into();
3681 self
3682 }
3683 }
3684
3685 #[doc(hidden)]
3686 impl gax::options::internal::RequestBuilder for FetchClusterUpgradeInfo {
3687 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3688 &mut self.0.options
3689 }
3690 }
3691
3692 #[derive(Clone, Debug)]
3710 pub struct FetchNodePoolUpgradeInfo(
3711 RequestBuilder<crate::model::FetchNodePoolUpgradeInfoRequest>,
3712 );
3713
3714 impl FetchNodePoolUpgradeInfo {
3715 pub(crate) fn new(
3716 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3717 ) -> Self {
3718 Self(RequestBuilder::new(stub))
3719 }
3720
3721 pub fn with_request<V: Into<crate::model::FetchNodePoolUpgradeInfoRequest>>(
3723 mut self,
3724 v: V,
3725 ) -> Self {
3726 self.0.request = v.into();
3727 self
3728 }
3729
3730 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3732 self.0.options = v.into();
3733 self
3734 }
3735
3736 pub async fn send(self) -> Result<crate::model::NodePoolUpgradeInfo> {
3738 (*self.0.stub)
3739 .fetch_node_pool_upgrade_info(self.0.request, self.0.options)
3740 .await
3741 .map(gax::response::Response::into_body)
3742 }
3743
3744 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3748 self.0.request.name = v.into();
3749 self
3750 }
3751
3752 pub fn set_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
3754 self.0.request.version = v.into();
3755 self
3756 }
3757 }
3758
3759 #[doc(hidden)]
3760 impl gax::options::internal::RequestBuilder for FetchNodePoolUpgradeInfo {
3761 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3762 &mut self.0.options
3763 }
3764 }
3765}