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 pub fn set_boot_disk<T>(mut self, v: T) -> Self
948 where
949 T: std::convert::Into<crate::model::BootDisk>,
950 {
951 self.0.request.boot_disk = std::option::Option::Some(v.into());
952 self
953 }
954
955 pub fn set_or_clear_boot_disk<T>(mut self, v: std::option::Option<T>) -> Self
957 where
958 T: std::convert::Into<crate::model::BootDisk>,
959 {
960 self.0.request.boot_disk = v.map(|x| x.into());
961 self
962 }
963 }
964
965 #[doc(hidden)]
966 impl gax::options::internal::RequestBuilder for UpdateNodePool {
967 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
968 &mut self.0.options
969 }
970 }
971
972 #[derive(Clone, Debug)]
990 pub struct SetNodePoolAutoscaling(RequestBuilder<crate::model::SetNodePoolAutoscalingRequest>);
991
992 impl SetNodePoolAutoscaling {
993 pub(crate) fn new(
994 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
995 ) -> Self {
996 Self(RequestBuilder::new(stub))
997 }
998
999 pub fn with_request<V: Into<crate::model::SetNodePoolAutoscalingRequest>>(
1001 mut self,
1002 v: V,
1003 ) -> Self {
1004 self.0.request = v.into();
1005 self
1006 }
1007
1008 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1010 self.0.options = v.into();
1011 self
1012 }
1013
1014 pub async fn send(self) -> Result<crate::model::Operation> {
1016 (*self.0.stub)
1017 .set_node_pool_autoscaling(self.0.request, self.0.options)
1018 .await
1019 .map(gax::response::Response::into_body)
1020 }
1021
1022 #[deprecated]
1024 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1025 self.0.request.project_id = v.into();
1026 self
1027 }
1028
1029 #[deprecated]
1031 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1032 self.0.request.zone = v.into();
1033 self
1034 }
1035
1036 #[deprecated]
1038 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1039 self.0.request.cluster_id = v.into();
1040 self
1041 }
1042
1043 #[deprecated]
1045 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1046 self.0.request.node_pool_id = v.into();
1047 self
1048 }
1049
1050 pub fn set_autoscaling<T>(mut self, v: T) -> Self
1054 where
1055 T: std::convert::Into<crate::model::NodePoolAutoscaling>,
1056 {
1057 self.0.request.autoscaling = std::option::Option::Some(v.into());
1058 self
1059 }
1060
1061 pub fn set_or_clear_autoscaling<T>(mut self, v: std::option::Option<T>) -> Self
1065 where
1066 T: std::convert::Into<crate::model::NodePoolAutoscaling>,
1067 {
1068 self.0.request.autoscaling = v.map(|x| x.into());
1069 self
1070 }
1071
1072 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1074 self.0.request.name = v.into();
1075 self
1076 }
1077 }
1078
1079 #[doc(hidden)]
1080 impl gax::options::internal::RequestBuilder for SetNodePoolAutoscaling {
1081 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1082 &mut self.0.options
1083 }
1084 }
1085
1086 #[derive(Clone, Debug)]
1104 pub struct SetLoggingService(RequestBuilder<crate::model::SetLoggingServiceRequest>);
1105
1106 impl SetLoggingService {
1107 pub(crate) fn new(
1108 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1109 ) -> Self {
1110 Self(RequestBuilder::new(stub))
1111 }
1112
1113 pub fn with_request<V: Into<crate::model::SetLoggingServiceRequest>>(
1115 mut self,
1116 v: V,
1117 ) -> Self {
1118 self.0.request = v.into();
1119 self
1120 }
1121
1122 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1124 self.0.options = v.into();
1125 self
1126 }
1127
1128 pub async fn send(self) -> Result<crate::model::Operation> {
1130 (*self.0.stub)
1131 .set_logging_service(self.0.request, self.0.options)
1132 .await
1133 .map(gax::response::Response::into_body)
1134 }
1135
1136 #[deprecated]
1138 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1139 self.0.request.project_id = v.into();
1140 self
1141 }
1142
1143 #[deprecated]
1145 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1146 self.0.request.zone = v.into();
1147 self
1148 }
1149
1150 #[deprecated]
1152 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1153 self.0.request.cluster_id = v.into();
1154 self
1155 }
1156
1157 pub fn set_logging_service<T: Into<std::string::String>>(mut self, v: T) -> Self {
1161 self.0.request.logging_service = v.into();
1162 self
1163 }
1164
1165 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1167 self.0.request.name = v.into();
1168 self
1169 }
1170 }
1171
1172 #[doc(hidden)]
1173 impl gax::options::internal::RequestBuilder for SetLoggingService {
1174 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1175 &mut self.0.options
1176 }
1177 }
1178
1179 #[derive(Clone, Debug)]
1197 pub struct SetMonitoringService(RequestBuilder<crate::model::SetMonitoringServiceRequest>);
1198
1199 impl SetMonitoringService {
1200 pub(crate) fn new(
1201 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1202 ) -> Self {
1203 Self(RequestBuilder::new(stub))
1204 }
1205
1206 pub fn with_request<V: Into<crate::model::SetMonitoringServiceRequest>>(
1208 mut self,
1209 v: V,
1210 ) -> Self {
1211 self.0.request = v.into();
1212 self
1213 }
1214
1215 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1217 self.0.options = v.into();
1218 self
1219 }
1220
1221 pub async fn send(self) -> Result<crate::model::Operation> {
1223 (*self.0.stub)
1224 .set_monitoring_service(self.0.request, self.0.options)
1225 .await
1226 .map(gax::response::Response::into_body)
1227 }
1228
1229 #[deprecated]
1231 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1232 self.0.request.project_id = v.into();
1233 self
1234 }
1235
1236 #[deprecated]
1238 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1239 self.0.request.zone = v.into();
1240 self
1241 }
1242
1243 #[deprecated]
1245 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1246 self.0.request.cluster_id = v.into();
1247 self
1248 }
1249
1250 pub fn set_monitoring_service<T: Into<std::string::String>>(mut self, v: T) -> Self {
1254 self.0.request.monitoring_service = v.into();
1255 self
1256 }
1257
1258 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1260 self.0.request.name = v.into();
1261 self
1262 }
1263 }
1264
1265 #[doc(hidden)]
1266 impl gax::options::internal::RequestBuilder for SetMonitoringService {
1267 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1268 &mut self.0.options
1269 }
1270 }
1271
1272 #[derive(Clone, Debug)]
1290 pub struct SetAddonsConfig(RequestBuilder<crate::model::SetAddonsConfigRequest>);
1291
1292 impl SetAddonsConfig {
1293 pub(crate) fn new(
1294 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1295 ) -> Self {
1296 Self(RequestBuilder::new(stub))
1297 }
1298
1299 pub fn with_request<V: Into<crate::model::SetAddonsConfigRequest>>(mut self, v: V) -> Self {
1301 self.0.request = v.into();
1302 self
1303 }
1304
1305 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1307 self.0.options = v.into();
1308 self
1309 }
1310
1311 pub async fn send(self) -> Result<crate::model::Operation> {
1313 (*self.0.stub)
1314 .set_addons_config(self.0.request, self.0.options)
1315 .await
1316 .map(gax::response::Response::into_body)
1317 }
1318
1319 #[deprecated]
1321 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1322 self.0.request.project_id = v.into();
1323 self
1324 }
1325
1326 #[deprecated]
1328 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1329 self.0.request.zone = v.into();
1330 self
1331 }
1332
1333 #[deprecated]
1335 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1336 self.0.request.cluster_id = v.into();
1337 self
1338 }
1339
1340 pub fn set_addons_config<T>(mut self, v: T) -> Self
1344 where
1345 T: std::convert::Into<crate::model::AddonsConfig>,
1346 {
1347 self.0.request.addons_config = std::option::Option::Some(v.into());
1348 self
1349 }
1350
1351 pub fn set_or_clear_addons_config<T>(mut self, v: std::option::Option<T>) -> Self
1355 where
1356 T: std::convert::Into<crate::model::AddonsConfig>,
1357 {
1358 self.0.request.addons_config = v.map(|x| x.into());
1359 self
1360 }
1361
1362 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1364 self.0.request.name = v.into();
1365 self
1366 }
1367 }
1368
1369 #[doc(hidden)]
1370 impl gax::options::internal::RequestBuilder for SetAddonsConfig {
1371 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1372 &mut self.0.options
1373 }
1374 }
1375
1376 #[derive(Clone, Debug)]
1394 pub struct SetLocations(RequestBuilder<crate::model::SetLocationsRequest>);
1395
1396 impl SetLocations {
1397 pub(crate) fn new(
1398 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1399 ) -> Self {
1400 Self(RequestBuilder::new(stub))
1401 }
1402
1403 pub fn with_request<V: Into<crate::model::SetLocationsRequest>>(mut self, v: V) -> Self {
1405 self.0.request = v.into();
1406 self
1407 }
1408
1409 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1411 self.0.options = v.into();
1412 self
1413 }
1414
1415 pub async fn send(self) -> Result<crate::model::Operation> {
1417 (*self.0.stub)
1418 .set_locations(self.0.request, self.0.options)
1419 .await
1420 .map(gax::response::Response::into_body)
1421 }
1422
1423 #[deprecated]
1425 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1426 self.0.request.project_id = v.into();
1427 self
1428 }
1429
1430 #[deprecated]
1432 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1433 self.0.request.zone = v.into();
1434 self
1435 }
1436
1437 #[deprecated]
1439 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1440 self.0.request.cluster_id = v.into();
1441 self
1442 }
1443
1444 pub fn set_locations<T, V>(mut self, v: T) -> Self
1448 where
1449 T: std::iter::IntoIterator<Item = V>,
1450 V: std::convert::Into<std::string::String>,
1451 {
1452 use std::iter::Iterator;
1453 self.0.request.locations = v.into_iter().map(|i| i.into()).collect();
1454 self
1455 }
1456
1457 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1459 self.0.request.name = v.into();
1460 self
1461 }
1462 }
1463
1464 #[doc(hidden)]
1465 impl gax::options::internal::RequestBuilder for SetLocations {
1466 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1467 &mut self.0.options
1468 }
1469 }
1470
1471 #[derive(Clone, Debug)]
1489 pub struct UpdateMaster(RequestBuilder<crate::model::UpdateMasterRequest>);
1490
1491 impl UpdateMaster {
1492 pub(crate) fn new(
1493 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1494 ) -> Self {
1495 Self(RequestBuilder::new(stub))
1496 }
1497
1498 pub fn with_request<V: Into<crate::model::UpdateMasterRequest>>(mut self, v: V) -> Self {
1500 self.0.request = v.into();
1501 self
1502 }
1503
1504 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1506 self.0.options = v.into();
1507 self
1508 }
1509
1510 pub async fn send(self) -> Result<crate::model::Operation> {
1512 (*self.0.stub)
1513 .update_master(self.0.request, self.0.options)
1514 .await
1515 .map(gax::response::Response::into_body)
1516 }
1517
1518 #[deprecated]
1520 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1521 self.0.request.project_id = v.into();
1522 self
1523 }
1524
1525 #[deprecated]
1527 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1528 self.0.request.zone = v.into();
1529 self
1530 }
1531
1532 #[deprecated]
1534 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1535 self.0.request.cluster_id = v.into();
1536 self
1537 }
1538
1539 pub fn set_master_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
1543 self.0.request.master_version = v.into();
1544 self
1545 }
1546
1547 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1549 self.0.request.name = v.into();
1550 self
1551 }
1552 }
1553
1554 #[doc(hidden)]
1555 impl gax::options::internal::RequestBuilder for UpdateMaster {
1556 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1557 &mut self.0.options
1558 }
1559 }
1560
1561 #[derive(Clone, Debug)]
1579 pub struct SetMasterAuth(RequestBuilder<crate::model::SetMasterAuthRequest>);
1580
1581 impl SetMasterAuth {
1582 pub(crate) fn new(
1583 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1584 ) -> Self {
1585 Self(RequestBuilder::new(stub))
1586 }
1587
1588 pub fn with_request<V: Into<crate::model::SetMasterAuthRequest>>(mut self, v: V) -> Self {
1590 self.0.request = v.into();
1591 self
1592 }
1593
1594 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1596 self.0.options = v.into();
1597 self
1598 }
1599
1600 pub async fn send(self) -> Result<crate::model::Operation> {
1602 (*self.0.stub)
1603 .set_master_auth(self.0.request, self.0.options)
1604 .await
1605 .map(gax::response::Response::into_body)
1606 }
1607
1608 #[deprecated]
1610 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1611 self.0.request.project_id = v.into();
1612 self
1613 }
1614
1615 #[deprecated]
1617 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1618 self.0.request.zone = v.into();
1619 self
1620 }
1621
1622 #[deprecated]
1624 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1625 self.0.request.cluster_id = v.into();
1626 self
1627 }
1628
1629 pub fn set_action<T: Into<crate::model::set_master_auth_request::Action>>(
1633 mut self,
1634 v: T,
1635 ) -> Self {
1636 self.0.request.action = v.into();
1637 self
1638 }
1639
1640 pub fn set_update<T>(mut self, v: T) -> Self
1644 where
1645 T: std::convert::Into<crate::model::MasterAuth>,
1646 {
1647 self.0.request.update = std::option::Option::Some(v.into());
1648 self
1649 }
1650
1651 pub fn set_or_clear_update<T>(mut self, v: std::option::Option<T>) -> Self
1655 where
1656 T: std::convert::Into<crate::model::MasterAuth>,
1657 {
1658 self.0.request.update = v.map(|x| x.into());
1659 self
1660 }
1661
1662 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1664 self.0.request.name = v.into();
1665 self
1666 }
1667 }
1668
1669 #[doc(hidden)]
1670 impl gax::options::internal::RequestBuilder for SetMasterAuth {
1671 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1672 &mut self.0.options
1673 }
1674 }
1675
1676 #[derive(Clone, Debug)]
1694 pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
1695
1696 impl DeleteCluster {
1697 pub(crate) fn new(
1698 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1699 ) -> Self {
1700 Self(RequestBuilder::new(stub))
1701 }
1702
1703 pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
1705 self.0.request = v.into();
1706 self
1707 }
1708
1709 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1711 self.0.options = v.into();
1712 self
1713 }
1714
1715 pub async fn send(self) -> Result<crate::model::Operation> {
1717 (*self.0.stub)
1718 .delete_cluster(self.0.request, self.0.options)
1719 .await
1720 .map(gax::response::Response::into_body)
1721 }
1722
1723 #[deprecated]
1725 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1726 self.0.request.project_id = v.into();
1727 self
1728 }
1729
1730 #[deprecated]
1732 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1733 self.0.request.zone = v.into();
1734 self
1735 }
1736
1737 #[deprecated]
1739 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1740 self.0.request.cluster_id = v.into();
1741 self
1742 }
1743
1744 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1746 self.0.request.name = v.into();
1747 self
1748 }
1749 }
1750
1751 #[doc(hidden)]
1752 impl gax::options::internal::RequestBuilder for DeleteCluster {
1753 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1754 &mut self.0.options
1755 }
1756 }
1757
1758 #[derive(Clone, Debug)]
1776 pub struct ListOperations(RequestBuilder<crate::model::ListOperationsRequest>);
1777
1778 impl ListOperations {
1779 pub(crate) fn new(
1780 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1781 ) -> Self {
1782 Self(RequestBuilder::new(stub))
1783 }
1784
1785 pub fn with_request<V: Into<crate::model::ListOperationsRequest>>(mut self, v: V) -> Self {
1787 self.0.request = v.into();
1788 self
1789 }
1790
1791 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1793 self.0.options = v.into();
1794 self
1795 }
1796
1797 pub async fn send(self) -> Result<crate::model::ListOperationsResponse> {
1799 (*self.0.stub)
1800 .list_operations(self.0.request, self.0.options)
1801 .await
1802 .map(gax::response::Response::into_body)
1803 }
1804
1805 #[deprecated]
1807 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1808 self.0.request.project_id = v.into();
1809 self
1810 }
1811
1812 #[deprecated]
1814 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1815 self.0.request.zone = v.into();
1816 self
1817 }
1818
1819 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1821 self.0.request.parent = v.into();
1822 self
1823 }
1824 }
1825
1826 #[doc(hidden)]
1827 impl gax::options::internal::RequestBuilder for ListOperations {
1828 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1829 &mut self.0.options
1830 }
1831 }
1832
1833 #[derive(Clone, Debug)]
1851 pub struct GetOperation(RequestBuilder<crate::model::GetOperationRequest>);
1852
1853 impl GetOperation {
1854 pub(crate) fn new(
1855 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1856 ) -> Self {
1857 Self(RequestBuilder::new(stub))
1858 }
1859
1860 pub fn with_request<V: Into<crate::model::GetOperationRequest>>(mut self, v: V) -> Self {
1862 self.0.request = v.into();
1863 self
1864 }
1865
1866 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1868 self.0.options = v.into();
1869 self
1870 }
1871
1872 pub async fn send(self) -> Result<crate::model::Operation> {
1874 (*self.0.stub)
1875 .get_operation(self.0.request, self.0.options)
1876 .await
1877 .map(gax::response::Response::into_body)
1878 }
1879
1880 #[deprecated]
1882 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1883 self.0.request.project_id = v.into();
1884 self
1885 }
1886
1887 #[deprecated]
1889 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1890 self.0.request.zone = v.into();
1891 self
1892 }
1893
1894 #[deprecated]
1896 pub fn set_operation_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1897 self.0.request.operation_id = v.into();
1898 self
1899 }
1900
1901 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1903 self.0.request.name = v.into();
1904 self
1905 }
1906 }
1907
1908 #[doc(hidden)]
1909 impl gax::options::internal::RequestBuilder for GetOperation {
1910 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1911 &mut self.0.options
1912 }
1913 }
1914
1915 #[derive(Clone, Debug)]
1933 pub struct CancelOperation(RequestBuilder<crate::model::CancelOperationRequest>);
1934
1935 impl CancelOperation {
1936 pub(crate) fn new(
1937 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1938 ) -> Self {
1939 Self(RequestBuilder::new(stub))
1940 }
1941
1942 pub fn with_request<V: Into<crate::model::CancelOperationRequest>>(mut self, v: V) -> Self {
1944 self.0.request = v.into();
1945 self
1946 }
1947
1948 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1950 self.0.options = v.into();
1951 self
1952 }
1953
1954 pub async fn send(self) -> Result<()> {
1956 (*self.0.stub)
1957 .cancel_operation(self.0.request, self.0.options)
1958 .await
1959 .map(gax::response::Response::into_body)
1960 }
1961
1962 #[deprecated]
1964 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1965 self.0.request.project_id = v.into();
1966 self
1967 }
1968
1969 #[deprecated]
1971 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1972 self.0.request.zone = v.into();
1973 self
1974 }
1975
1976 #[deprecated]
1978 pub fn set_operation_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1979 self.0.request.operation_id = v.into();
1980 self
1981 }
1982
1983 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1985 self.0.request.name = v.into();
1986 self
1987 }
1988 }
1989
1990 #[doc(hidden)]
1991 impl gax::options::internal::RequestBuilder for CancelOperation {
1992 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1993 &mut self.0.options
1994 }
1995 }
1996
1997 #[derive(Clone, Debug)]
2015 pub struct GetServerConfig(RequestBuilder<crate::model::GetServerConfigRequest>);
2016
2017 impl GetServerConfig {
2018 pub(crate) fn new(
2019 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2020 ) -> Self {
2021 Self(RequestBuilder::new(stub))
2022 }
2023
2024 pub fn with_request<V: Into<crate::model::GetServerConfigRequest>>(mut self, v: V) -> Self {
2026 self.0.request = v.into();
2027 self
2028 }
2029
2030 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2032 self.0.options = v.into();
2033 self
2034 }
2035
2036 pub async fn send(self) -> Result<crate::model::ServerConfig> {
2038 (*self.0.stub)
2039 .get_server_config(self.0.request, self.0.options)
2040 .await
2041 .map(gax::response::Response::into_body)
2042 }
2043
2044 #[deprecated]
2046 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2047 self.0.request.project_id = v.into();
2048 self
2049 }
2050
2051 #[deprecated]
2053 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2054 self.0.request.zone = v.into();
2055 self
2056 }
2057
2058 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2060 self.0.request.name = v.into();
2061 self
2062 }
2063 }
2064
2065 #[doc(hidden)]
2066 impl gax::options::internal::RequestBuilder for GetServerConfig {
2067 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2068 &mut self.0.options
2069 }
2070 }
2071
2072 #[derive(Clone, Debug)]
2090 pub struct GetJSONWebKeys(RequestBuilder<crate::model::GetJSONWebKeysRequest>);
2091
2092 impl GetJSONWebKeys {
2093 pub(crate) fn new(
2094 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2095 ) -> Self {
2096 Self(RequestBuilder::new(stub))
2097 }
2098
2099 pub fn with_request<V: Into<crate::model::GetJSONWebKeysRequest>>(mut self, v: V) -> Self {
2101 self.0.request = v.into();
2102 self
2103 }
2104
2105 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2107 self.0.options = v.into();
2108 self
2109 }
2110
2111 pub async fn send(self) -> Result<crate::model::GetJSONWebKeysResponse> {
2113 (*self.0.stub)
2114 .get_json_web_keys(self.0.request, self.0.options)
2115 .await
2116 .map(gax::response::Response::into_body)
2117 }
2118
2119 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2121 self.0.request.parent = v.into();
2122 self
2123 }
2124 }
2125
2126 #[doc(hidden)]
2127 impl gax::options::internal::RequestBuilder for GetJSONWebKeys {
2128 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2129 &mut self.0.options
2130 }
2131 }
2132
2133 #[derive(Clone, Debug)]
2151 pub struct ListNodePools(RequestBuilder<crate::model::ListNodePoolsRequest>);
2152
2153 impl ListNodePools {
2154 pub(crate) fn new(
2155 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2156 ) -> Self {
2157 Self(RequestBuilder::new(stub))
2158 }
2159
2160 pub fn with_request<V: Into<crate::model::ListNodePoolsRequest>>(mut self, v: V) -> Self {
2162 self.0.request = v.into();
2163 self
2164 }
2165
2166 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2168 self.0.options = v.into();
2169 self
2170 }
2171
2172 pub async fn send(self) -> Result<crate::model::ListNodePoolsResponse> {
2174 (*self.0.stub)
2175 .list_node_pools(self.0.request, self.0.options)
2176 .await
2177 .map(gax::response::Response::into_body)
2178 }
2179
2180 #[deprecated]
2182 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2183 self.0.request.project_id = v.into();
2184 self
2185 }
2186
2187 #[deprecated]
2189 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2190 self.0.request.zone = v.into();
2191 self
2192 }
2193
2194 #[deprecated]
2196 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2197 self.0.request.cluster_id = v.into();
2198 self
2199 }
2200
2201 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2203 self.0.request.parent = v.into();
2204 self
2205 }
2206 }
2207
2208 #[doc(hidden)]
2209 impl gax::options::internal::RequestBuilder for ListNodePools {
2210 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2211 &mut self.0.options
2212 }
2213 }
2214
2215 #[derive(Clone, Debug)]
2233 pub struct GetNodePool(RequestBuilder<crate::model::GetNodePoolRequest>);
2234
2235 impl GetNodePool {
2236 pub(crate) fn new(
2237 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2238 ) -> Self {
2239 Self(RequestBuilder::new(stub))
2240 }
2241
2242 pub fn with_request<V: Into<crate::model::GetNodePoolRequest>>(mut self, v: V) -> Self {
2244 self.0.request = v.into();
2245 self
2246 }
2247
2248 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2250 self.0.options = v.into();
2251 self
2252 }
2253
2254 pub async fn send(self) -> Result<crate::model::NodePool> {
2256 (*self.0.stub)
2257 .get_node_pool(self.0.request, self.0.options)
2258 .await
2259 .map(gax::response::Response::into_body)
2260 }
2261
2262 #[deprecated]
2264 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2265 self.0.request.project_id = v.into();
2266 self
2267 }
2268
2269 #[deprecated]
2271 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2272 self.0.request.zone = v.into();
2273 self
2274 }
2275
2276 #[deprecated]
2278 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2279 self.0.request.cluster_id = v.into();
2280 self
2281 }
2282
2283 #[deprecated]
2285 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2286 self.0.request.node_pool_id = v.into();
2287 self
2288 }
2289
2290 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2292 self.0.request.name = v.into();
2293 self
2294 }
2295 }
2296
2297 #[doc(hidden)]
2298 impl gax::options::internal::RequestBuilder for GetNodePool {
2299 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2300 &mut self.0.options
2301 }
2302 }
2303
2304 #[derive(Clone, Debug)]
2322 pub struct CreateNodePool(RequestBuilder<crate::model::CreateNodePoolRequest>);
2323
2324 impl CreateNodePool {
2325 pub(crate) fn new(
2326 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2327 ) -> Self {
2328 Self(RequestBuilder::new(stub))
2329 }
2330
2331 pub fn with_request<V: Into<crate::model::CreateNodePoolRequest>>(mut self, v: V) -> Self {
2333 self.0.request = v.into();
2334 self
2335 }
2336
2337 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2339 self.0.options = v.into();
2340 self
2341 }
2342
2343 pub async fn send(self) -> Result<crate::model::Operation> {
2345 (*self.0.stub)
2346 .create_node_pool(self.0.request, self.0.options)
2347 .await
2348 .map(gax::response::Response::into_body)
2349 }
2350
2351 #[deprecated]
2353 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2354 self.0.request.project_id = v.into();
2355 self
2356 }
2357
2358 #[deprecated]
2360 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2361 self.0.request.zone = v.into();
2362 self
2363 }
2364
2365 #[deprecated]
2367 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2368 self.0.request.cluster_id = v.into();
2369 self
2370 }
2371
2372 pub fn set_node_pool<T>(mut self, v: T) -> Self
2376 where
2377 T: std::convert::Into<crate::model::NodePool>,
2378 {
2379 self.0.request.node_pool = std::option::Option::Some(v.into());
2380 self
2381 }
2382
2383 pub fn set_or_clear_node_pool<T>(mut self, v: std::option::Option<T>) -> Self
2387 where
2388 T: std::convert::Into<crate::model::NodePool>,
2389 {
2390 self.0.request.node_pool = v.map(|x| x.into());
2391 self
2392 }
2393
2394 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2396 self.0.request.parent = v.into();
2397 self
2398 }
2399 }
2400
2401 #[doc(hidden)]
2402 impl gax::options::internal::RequestBuilder for CreateNodePool {
2403 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2404 &mut self.0.options
2405 }
2406 }
2407
2408 #[derive(Clone, Debug)]
2426 pub struct DeleteNodePool(RequestBuilder<crate::model::DeleteNodePoolRequest>);
2427
2428 impl DeleteNodePool {
2429 pub(crate) fn new(
2430 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2431 ) -> Self {
2432 Self(RequestBuilder::new(stub))
2433 }
2434
2435 pub fn with_request<V: Into<crate::model::DeleteNodePoolRequest>>(mut self, v: V) -> Self {
2437 self.0.request = v.into();
2438 self
2439 }
2440
2441 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2443 self.0.options = v.into();
2444 self
2445 }
2446
2447 pub async fn send(self) -> Result<crate::model::Operation> {
2449 (*self.0.stub)
2450 .delete_node_pool(self.0.request, self.0.options)
2451 .await
2452 .map(gax::response::Response::into_body)
2453 }
2454
2455 #[deprecated]
2457 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2458 self.0.request.project_id = v.into();
2459 self
2460 }
2461
2462 #[deprecated]
2464 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2465 self.0.request.zone = v.into();
2466 self
2467 }
2468
2469 #[deprecated]
2471 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2472 self.0.request.cluster_id = v.into();
2473 self
2474 }
2475
2476 #[deprecated]
2478 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2479 self.0.request.node_pool_id = v.into();
2480 self
2481 }
2482
2483 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2485 self.0.request.name = v.into();
2486 self
2487 }
2488 }
2489
2490 #[doc(hidden)]
2491 impl gax::options::internal::RequestBuilder for DeleteNodePool {
2492 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2493 &mut self.0.options
2494 }
2495 }
2496
2497 #[derive(Clone, Debug)]
2515 pub struct CompleteNodePoolUpgrade(
2516 RequestBuilder<crate::model::CompleteNodePoolUpgradeRequest>,
2517 );
2518
2519 impl CompleteNodePoolUpgrade {
2520 pub(crate) fn new(
2521 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2522 ) -> Self {
2523 Self(RequestBuilder::new(stub))
2524 }
2525
2526 pub fn with_request<V: Into<crate::model::CompleteNodePoolUpgradeRequest>>(
2528 mut self,
2529 v: V,
2530 ) -> Self {
2531 self.0.request = v.into();
2532 self
2533 }
2534
2535 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2537 self.0.options = v.into();
2538 self
2539 }
2540
2541 pub async fn send(self) -> Result<()> {
2543 (*self.0.stub)
2544 .complete_node_pool_upgrade(self.0.request, self.0.options)
2545 .await
2546 .map(gax::response::Response::into_body)
2547 }
2548
2549 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2551 self.0.request.name = v.into();
2552 self
2553 }
2554 }
2555
2556 #[doc(hidden)]
2557 impl gax::options::internal::RequestBuilder for CompleteNodePoolUpgrade {
2558 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2559 &mut self.0.options
2560 }
2561 }
2562
2563 #[derive(Clone, Debug)]
2581 pub struct RollbackNodePoolUpgrade(
2582 RequestBuilder<crate::model::RollbackNodePoolUpgradeRequest>,
2583 );
2584
2585 impl RollbackNodePoolUpgrade {
2586 pub(crate) fn new(
2587 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2588 ) -> Self {
2589 Self(RequestBuilder::new(stub))
2590 }
2591
2592 pub fn with_request<V: Into<crate::model::RollbackNodePoolUpgradeRequest>>(
2594 mut self,
2595 v: V,
2596 ) -> Self {
2597 self.0.request = v.into();
2598 self
2599 }
2600
2601 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2603 self.0.options = v.into();
2604 self
2605 }
2606
2607 pub async fn send(self) -> Result<crate::model::Operation> {
2609 (*self.0.stub)
2610 .rollback_node_pool_upgrade(self.0.request, self.0.options)
2611 .await
2612 .map(gax::response::Response::into_body)
2613 }
2614
2615 #[deprecated]
2617 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2618 self.0.request.project_id = v.into();
2619 self
2620 }
2621
2622 #[deprecated]
2624 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2625 self.0.request.zone = v.into();
2626 self
2627 }
2628
2629 #[deprecated]
2631 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2632 self.0.request.cluster_id = v.into();
2633 self
2634 }
2635
2636 #[deprecated]
2638 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2639 self.0.request.node_pool_id = v.into();
2640 self
2641 }
2642
2643 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2645 self.0.request.name = v.into();
2646 self
2647 }
2648
2649 pub fn set_respect_pdb<T: Into<bool>>(mut self, v: T) -> Self {
2651 self.0.request.respect_pdb = v.into();
2652 self
2653 }
2654 }
2655
2656 #[doc(hidden)]
2657 impl gax::options::internal::RequestBuilder for RollbackNodePoolUpgrade {
2658 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2659 &mut self.0.options
2660 }
2661 }
2662
2663 #[derive(Clone, Debug)]
2681 pub struct SetNodePoolManagement(RequestBuilder<crate::model::SetNodePoolManagementRequest>);
2682
2683 impl SetNodePoolManagement {
2684 pub(crate) fn new(
2685 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2686 ) -> Self {
2687 Self(RequestBuilder::new(stub))
2688 }
2689
2690 pub fn with_request<V: Into<crate::model::SetNodePoolManagementRequest>>(
2692 mut self,
2693 v: V,
2694 ) -> Self {
2695 self.0.request = v.into();
2696 self
2697 }
2698
2699 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2701 self.0.options = v.into();
2702 self
2703 }
2704
2705 pub async fn send(self) -> Result<crate::model::Operation> {
2707 (*self.0.stub)
2708 .set_node_pool_management(self.0.request, self.0.options)
2709 .await
2710 .map(gax::response::Response::into_body)
2711 }
2712
2713 #[deprecated]
2715 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2716 self.0.request.project_id = v.into();
2717 self
2718 }
2719
2720 #[deprecated]
2722 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2723 self.0.request.zone = v.into();
2724 self
2725 }
2726
2727 #[deprecated]
2729 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2730 self.0.request.cluster_id = v.into();
2731 self
2732 }
2733
2734 #[deprecated]
2736 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2737 self.0.request.node_pool_id = v.into();
2738 self
2739 }
2740
2741 pub fn set_management<T>(mut self, v: T) -> Self
2745 where
2746 T: std::convert::Into<crate::model::NodeManagement>,
2747 {
2748 self.0.request.management = std::option::Option::Some(v.into());
2749 self
2750 }
2751
2752 pub fn set_or_clear_management<T>(mut self, v: std::option::Option<T>) -> Self
2756 where
2757 T: std::convert::Into<crate::model::NodeManagement>,
2758 {
2759 self.0.request.management = v.map(|x| x.into());
2760 self
2761 }
2762
2763 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2765 self.0.request.name = v.into();
2766 self
2767 }
2768 }
2769
2770 #[doc(hidden)]
2771 impl gax::options::internal::RequestBuilder for SetNodePoolManagement {
2772 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2773 &mut self.0.options
2774 }
2775 }
2776
2777 #[derive(Clone, Debug)]
2795 pub struct SetLabels(RequestBuilder<crate::model::SetLabelsRequest>);
2796
2797 impl SetLabels {
2798 pub(crate) fn new(
2799 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2800 ) -> Self {
2801 Self(RequestBuilder::new(stub))
2802 }
2803
2804 pub fn with_request<V: Into<crate::model::SetLabelsRequest>>(mut self, v: V) -> Self {
2806 self.0.request = v.into();
2807 self
2808 }
2809
2810 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2812 self.0.options = v.into();
2813 self
2814 }
2815
2816 pub async fn send(self) -> Result<crate::model::Operation> {
2818 (*self.0.stub)
2819 .set_labels(self.0.request, self.0.options)
2820 .await
2821 .map(gax::response::Response::into_body)
2822 }
2823
2824 #[deprecated]
2826 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2827 self.0.request.project_id = v.into();
2828 self
2829 }
2830
2831 #[deprecated]
2833 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2834 self.0.request.zone = v.into();
2835 self
2836 }
2837
2838 #[deprecated]
2840 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2841 self.0.request.cluster_id = v.into();
2842 self
2843 }
2844
2845 pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
2849 where
2850 T: std::iter::IntoIterator<Item = (K, V)>,
2851 K: std::convert::Into<std::string::String>,
2852 V: std::convert::Into<std::string::String>,
2853 {
2854 self.0.request.resource_labels =
2855 v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2856 self
2857 }
2858
2859 pub fn set_label_fingerprint<T: Into<std::string::String>>(mut self, v: T) -> Self {
2863 self.0.request.label_fingerprint = v.into();
2864 self
2865 }
2866
2867 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2869 self.0.request.name = v.into();
2870 self
2871 }
2872 }
2873
2874 #[doc(hidden)]
2875 impl gax::options::internal::RequestBuilder for SetLabels {
2876 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2877 &mut self.0.options
2878 }
2879 }
2880
2881 #[derive(Clone, Debug)]
2899 pub struct SetLegacyAbac(RequestBuilder<crate::model::SetLegacyAbacRequest>);
2900
2901 impl SetLegacyAbac {
2902 pub(crate) fn new(
2903 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2904 ) -> Self {
2905 Self(RequestBuilder::new(stub))
2906 }
2907
2908 pub fn with_request<V: Into<crate::model::SetLegacyAbacRequest>>(mut self, v: V) -> Self {
2910 self.0.request = v.into();
2911 self
2912 }
2913
2914 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2916 self.0.options = v.into();
2917 self
2918 }
2919
2920 pub async fn send(self) -> Result<crate::model::Operation> {
2922 (*self.0.stub)
2923 .set_legacy_abac(self.0.request, self.0.options)
2924 .await
2925 .map(gax::response::Response::into_body)
2926 }
2927
2928 #[deprecated]
2930 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2931 self.0.request.project_id = v.into();
2932 self
2933 }
2934
2935 #[deprecated]
2937 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2938 self.0.request.zone = v.into();
2939 self
2940 }
2941
2942 #[deprecated]
2944 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2945 self.0.request.cluster_id = v.into();
2946 self
2947 }
2948
2949 pub fn set_enabled<T: Into<bool>>(mut self, v: T) -> Self {
2953 self.0.request.enabled = v.into();
2954 self
2955 }
2956
2957 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2959 self.0.request.name = v.into();
2960 self
2961 }
2962 }
2963
2964 #[doc(hidden)]
2965 impl gax::options::internal::RequestBuilder for SetLegacyAbac {
2966 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2967 &mut self.0.options
2968 }
2969 }
2970
2971 #[derive(Clone, Debug)]
2989 pub struct StartIPRotation(RequestBuilder<crate::model::StartIPRotationRequest>);
2990
2991 impl StartIPRotation {
2992 pub(crate) fn new(
2993 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2994 ) -> Self {
2995 Self(RequestBuilder::new(stub))
2996 }
2997
2998 pub fn with_request<V: Into<crate::model::StartIPRotationRequest>>(mut self, v: V) -> Self {
3000 self.0.request = v.into();
3001 self
3002 }
3003
3004 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3006 self.0.options = v.into();
3007 self
3008 }
3009
3010 pub async fn send(self) -> Result<crate::model::Operation> {
3012 (*self.0.stub)
3013 .start_ip_rotation(self.0.request, self.0.options)
3014 .await
3015 .map(gax::response::Response::into_body)
3016 }
3017
3018 #[deprecated]
3020 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3021 self.0.request.project_id = v.into();
3022 self
3023 }
3024
3025 #[deprecated]
3027 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3028 self.0.request.zone = v.into();
3029 self
3030 }
3031
3032 #[deprecated]
3034 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3035 self.0.request.cluster_id = v.into();
3036 self
3037 }
3038
3039 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3041 self.0.request.name = v.into();
3042 self
3043 }
3044
3045 pub fn set_rotate_credentials<T: Into<bool>>(mut self, v: T) -> Self {
3047 self.0.request.rotate_credentials = v.into();
3048 self
3049 }
3050 }
3051
3052 #[doc(hidden)]
3053 impl gax::options::internal::RequestBuilder for StartIPRotation {
3054 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3055 &mut self.0.options
3056 }
3057 }
3058
3059 #[derive(Clone, Debug)]
3077 pub struct CompleteIPRotation(RequestBuilder<crate::model::CompleteIPRotationRequest>);
3078
3079 impl CompleteIPRotation {
3080 pub(crate) fn new(
3081 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3082 ) -> Self {
3083 Self(RequestBuilder::new(stub))
3084 }
3085
3086 pub fn with_request<V: Into<crate::model::CompleteIPRotationRequest>>(
3088 mut self,
3089 v: V,
3090 ) -> Self {
3091 self.0.request = v.into();
3092 self
3093 }
3094
3095 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3097 self.0.options = v.into();
3098 self
3099 }
3100
3101 pub async fn send(self) -> Result<crate::model::Operation> {
3103 (*self.0.stub)
3104 .complete_ip_rotation(self.0.request, self.0.options)
3105 .await
3106 .map(gax::response::Response::into_body)
3107 }
3108
3109 #[deprecated]
3111 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3112 self.0.request.project_id = v.into();
3113 self
3114 }
3115
3116 #[deprecated]
3118 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3119 self.0.request.zone = v.into();
3120 self
3121 }
3122
3123 #[deprecated]
3125 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3126 self.0.request.cluster_id = v.into();
3127 self
3128 }
3129
3130 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3132 self.0.request.name = v.into();
3133 self
3134 }
3135 }
3136
3137 #[doc(hidden)]
3138 impl gax::options::internal::RequestBuilder for CompleteIPRotation {
3139 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3140 &mut self.0.options
3141 }
3142 }
3143
3144 #[derive(Clone, Debug)]
3162 pub struct SetNodePoolSize(RequestBuilder<crate::model::SetNodePoolSizeRequest>);
3163
3164 impl SetNodePoolSize {
3165 pub(crate) fn new(
3166 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3167 ) -> Self {
3168 Self(RequestBuilder::new(stub))
3169 }
3170
3171 pub fn with_request<V: Into<crate::model::SetNodePoolSizeRequest>>(mut self, v: V) -> Self {
3173 self.0.request = v.into();
3174 self
3175 }
3176
3177 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3179 self.0.options = v.into();
3180 self
3181 }
3182
3183 pub async fn send(self) -> Result<crate::model::Operation> {
3185 (*self.0.stub)
3186 .set_node_pool_size(self.0.request, self.0.options)
3187 .await
3188 .map(gax::response::Response::into_body)
3189 }
3190
3191 #[deprecated]
3193 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3194 self.0.request.project_id = v.into();
3195 self
3196 }
3197
3198 #[deprecated]
3200 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3201 self.0.request.zone = v.into();
3202 self
3203 }
3204
3205 #[deprecated]
3207 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3208 self.0.request.cluster_id = v.into();
3209 self
3210 }
3211
3212 #[deprecated]
3214 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3215 self.0.request.node_pool_id = v.into();
3216 self
3217 }
3218
3219 pub fn set_node_count<T: Into<i32>>(mut self, v: T) -> Self {
3223 self.0.request.node_count = v.into();
3224 self
3225 }
3226
3227 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3229 self.0.request.name = v.into();
3230 self
3231 }
3232 }
3233
3234 #[doc(hidden)]
3235 impl gax::options::internal::RequestBuilder for SetNodePoolSize {
3236 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3237 &mut self.0.options
3238 }
3239 }
3240
3241 #[derive(Clone, Debug)]
3259 pub struct SetNetworkPolicy(RequestBuilder<crate::model::SetNetworkPolicyRequest>);
3260
3261 impl SetNetworkPolicy {
3262 pub(crate) fn new(
3263 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3264 ) -> Self {
3265 Self(RequestBuilder::new(stub))
3266 }
3267
3268 pub fn with_request<V: Into<crate::model::SetNetworkPolicyRequest>>(
3270 mut self,
3271 v: V,
3272 ) -> Self {
3273 self.0.request = v.into();
3274 self
3275 }
3276
3277 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3279 self.0.options = v.into();
3280 self
3281 }
3282
3283 pub async fn send(self) -> Result<crate::model::Operation> {
3285 (*self.0.stub)
3286 .set_network_policy(self.0.request, self.0.options)
3287 .await
3288 .map(gax::response::Response::into_body)
3289 }
3290
3291 #[deprecated]
3293 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3294 self.0.request.project_id = v.into();
3295 self
3296 }
3297
3298 #[deprecated]
3300 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3301 self.0.request.zone = v.into();
3302 self
3303 }
3304
3305 #[deprecated]
3307 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3308 self.0.request.cluster_id = v.into();
3309 self
3310 }
3311
3312 pub fn set_network_policy<T>(mut self, v: T) -> Self
3316 where
3317 T: std::convert::Into<crate::model::NetworkPolicy>,
3318 {
3319 self.0.request.network_policy = std::option::Option::Some(v.into());
3320 self
3321 }
3322
3323 pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
3327 where
3328 T: std::convert::Into<crate::model::NetworkPolicy>,
3329 {
3330 self.0.request.network_policy = v.map(|x| x.into());
3331 self
3332 }
3333
3334 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3336 self.0.request.name = v.into();
3337 self
3338 }
3339 }
3340
3341 #[doc(hidden)]
3342 impl gax::options::internal::RequestBuilder for SetNetworkPolicy {
3343 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3344 &mut self.0.options
3345 }
3346 }
3347
3348 #[derive(Clone, Debug)]
3366 pub struct SetMaintenancePolicy(RequestBuilder<crate::model::SetMaintenancePolicyRequest>);
3367
3368 impl SetMaintenancePolicy {
3369 pub(crate) fn new(
3370 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3371 ) -> Self {
3372 Self(RequestBuilder::new(stub))
3373 }
3374
3375 pub fn with_request<V: Into<crate::model::SetMaintenancePolicyRequest>>(
3377 mut self,
3378 v: V,
3379 ) -> Self {
3380 self.0.request = v.into();
3381 self
3382 }
3383
3384 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3386 self.0.options = v.into();
3387 self
3388 }
3389
3390 pub async fn send(self) -> Result<crate::model::Operation> {
3392 (*self.0.stub)
3393 .set_maintenance_policy(self.0.request, self.0.options)
3394 .await
3395 .map(gax::response::Response::into_body)
3396 }
3397
3398 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3402 self.0.request.project_id = v.into();
3403 self
3404 }
3405
3406 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3410 self.0.request.zone = v.into();
3411 self
3412 }
3413
3414 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3418 self.0.request.cluster_id = v.into();
3419 self
3420 }
3421
3422 pub fn set_maintenance_policy<T>(mut self, v: T) -> Self
3426 where
3427 T: std::convert::Into<crate::model::MaintenancePolicy>,
3428 {
3429 self.0.request.maintenance_policy = std::option::Option::Some(v.into());
3430 self
3431 }
3432
3433 pub fn set_or_clear_maintenance_policy<T>(mut self, v: std::option::Option<T>) -> Self
3437 where
3438 T: std::convert::Into<crate::model::MaintenancePolicy>,
3439 {
3440 self.0.request.maintenance_policy = v.map(|x| x.into());
3441 self
3442 }
3443
3444 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3446 self.0.request.name = v.into();
3447 self
3448 }
3449 }
3450
3451 #[doc(hidden)]
3452 impl gax::options::internal::RequestBuilder for SetMaintenancePolicy {
3453 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3454 &mut self.0.options
3455 }
3456 }
3457
3458 #[derive(Clone, Debug)]
3480 pub struct ListUsableSubnetworks(RequestBuilder<crate::model::ListUsableSubnetworksRequest>);
3481
3482 impl ListUsableSubnetworks {
3483 pub(crate) fn new(
3484 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3485 ) -> Self {
3486 Self(RequestBuilder::new(stub))
3487 }
3488
3489 pub fn with_request<V: Into<crate::model::ListUsableSubnetworksRequest>>(
3491 mut self,
3492 v: V,
3493 ) -> Self {
3494 self.0.request = v.into();
3495 self
3496 }
3497
3498 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3500 self.0.options = v.into();
3501 self
3502 }
3503
3504 pub async fn send(self) -> Result<crate::model::ListUsableSubnetworksResponse> {
3506 (*self.0.stub)
3507 .list_usable_subnetworks(self.0.request, self.0.options)
3508 .await
3509 .map(gax::response::Response::into_body)
3510 }
3511
3512 pub fn by_page(
3514 self,
3515 ) -> impl gax::paginator::Paginator<crate::model::ListUsableSubnetworksResponse, gax::error::Error>
3516 {
3517 use std::clone::Clone;
3518 let token = self.0.request.page_token.clone();
3519 let execute = move |token: String| {
3520 let mut builder = self.clone();
3521 builder.0.request = builder.0.request.set_page_token(token);
3522 builder.send()
3523 };
3524 gax::paginator::internal::new_paginator(token, execute)
3525 }
3526
3527 pub fn by_item(
3529 self,
3530 ) -> impl gax::paginator::ItemPaginator<
3531 crate::model::ListUsableSubnetworksResponse,
3532 gax::error::Error,
3533 > {
3534 use gax::paginator::Paginator;
3535 self.by_page().items()
3536 }
3537
3538 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3540 self.0.request.parent = v.into();
3541 self
3542 }
3543
3544 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3546 self.0.request.filter = v.into();
3547 self
3548 }
3549
3550 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3552 self.0.request.page_size = v.into();
3553 self
3554 }
3555
3556 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3558 self.0.request.page_token = v.into();
3559 self
3560 }
3561 }
3562
3563 #[doc(hidden)]
3564 impl gax::options::internal::RequestBuilder for ListUsableSubnetworks {
3565 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3566 &mut self.0.options
3567 }
3568 }
3569
3570 #[derive(Clone, Debug)]
3588 pub struct CheckAutopilotCompatibility(
3589 RequestBuilder<crate::model::CheckAutopilotCompatibilityRequest>,
3590 );
3591
3592 impl CheckAutopilotCompatibility {
3593 pub(crate) fn new(
3594 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3595 ) -> Self {
3596 Self(RequestBuilder::new(stub))
3597 }
3598
3599 pub fn with_request<V: Into<crate::model::CheckAutopilotCompatibilityRequest>>(
3601 mut self,
3602 v: V,
3603 ) -> Self {
3604 self.0.request = v.into();
3605 self
3606 }
3607
3608 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3610 self.0.options = v.into();
3611 self
3612 }
3613
3614 pub async fn send(self) -> Result<crate::model::CheckAutopilotCompatibilityResponse> {
3616 (*self.0.stub)
3617 .check_autopilot_compatibility(self.0.request, self.0.options)
3618 .await
3619 .map(gax::response::Response::into_body)
3620 }
3621
3622 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3624 self.0.request.name = v.into();
3625 self
3626 }
3627 }
3628
3629 #[doc(hidden)]
3630 impl gax::options::internal::RequestBuilder for CheckAutopilotCompatibility {
3631 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3632 &mut self.0.options
3633 }
3634 }
3635
3636 #[derive(Clone, Debug)]
3654 pub struct FetchClusterUpgradeInfo(
3655 RequestBuilder<crate::model::FetchClusterUpgradeInfoRequest>,
3656 );
3657
3658 impl FetchClusterUpgradeInfo {
3659 pub(crate) fn new(
3660 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3661 ) -> Self {
3662 Self(RequestBuilder::new(stub))
3663 }
3664
3665 pub fn with_request<V: Into<crate::model::FetchClusterUpgradeInfoRequest>>(
3667 mut self,
3668 v: V,
3669 ) -> Self {
3670 self.0.request = v.into();
3671 self
3672 }
3673
3674 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3676 self.0.options = v.into();
3677 self
3678 }
3679
3680 pub async fn send(self) -> Result<crate::model::ClusterUpgradeInfo> {
3682 (*self.0.stub)
3683 .fetch_cluster_upgrade_info(self.0.request, self.0.options)
3684 .await
3685 .map(gax::response::Response::into_body)
3686 }
3687
3688 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3692 self.0.request.name = v.into();
3693 self
3694 }
3695
3696 pub fn set_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
3698 self.0.request.version = v.into();
3699 self
3700 }
3701 }
3702
3703 #[doc(hidden)]
3704 impl gax::options::internal::RequestBuilder for FetchClusterUpgradeInfo {
3705 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3706 &mut self.0.options
3707 }
3708 }
3709
3710 #[derive(Clone, Debug)]
3728 pub struct FetchNodePoolUpgradeInfo(
3729 RequestBuilder<crate::model::FetchNodePoolUpgradeInfoRequest>,
3730 );
3731
3732 impl FetchNodePoolUpgradeInfo {
3733 pub(crate) fn new(
3734 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3735 ) -> Self {
3736 Self(RequestBuilder::new(stub))
3737 }
3738
3739 pub fn with_request<V: Into<crate::model::FetchNodePoolUpgradeInfoRequest>>(
3741 mut self,
3742 v: V,
3743 ) -> Self {
3744 self.0.request = v.into();
3745 self
3746 }
3747
3748 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3750 self.0.options = v.into();
3751 self
3752 }
3753
3754 pub async fn send(self) -> Result<crate::model::NodePoolUpgradeInfo> {
3756 (*self.0.stub)
3757 .fetch_node_pool_upgrade_info(self.0.request, self.0.options)
3758 .await
3759 .map(gax::response::Response::into_body)
3760 }
3761
3762 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3766 self.0.request.name = v.into();
3767 self
3768 }
3769
3770 pub fn set_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
3772 self.0.request.version = v.into();
3773 self
3774 }
3775 }
3776
3777 #[doc(hidden)]
3778 impl gax::options::internal::RequestBuilder for FetchNodePoolUpgradeInfo {
3779 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3780 &mut self.0.options
3781 }
3782 }
3783}