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(self, config: gaxi::options::ClientConfig) -> gax::Result<Self::Client> {
43 Self::Client::new(config).await
44 }
45 }
46 }
47
48 #[derive(Clone, Debug)]
50 pub(crate) struct RequestBuilder<R: std::default::Default> {
51 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
52 request: R,
53 options: gax::options::RequestOptions,
54 }
55
56 impl<R> RequestBuilder<R>
57 where
58 R: std::default::Default,
59 {
60 pub(crate) fn new(
61 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
62 ) -> Self {
63 Self {
64 stub,
65 request: R::default(),
66 options: gax::options::RequestOptions::default(),
67 }
68 }
69 }
70
71 #[derive(Clone, Debug)]
88 pub struct ListClusters(RequestBuilder<crate::model::ListClustersRequest>);
89
90 impl ListClusters {
91 pub(crate) fn new(
92 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
93 ) -> Self {
94 Self(RequestBuilder::new(stub))
95 }
96
97 pub fn with_request<V: Into<crate::model::ListClustersRequest>>(mut self, v: V) -> Self {
99 self.0.request = v.into();
100 self
101 }
102
103 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
105 self.0.options = v.into();
106 self
107 }
108
109 pub async fn send(self) -> Result<crate::model::ListClustersResponse> {
111 (*self.0.stub)
112 .list_clusters(self.0.request, self.0.options)
113 .await
114 .map(gax::response::Response::into_body)
115 }
116
117 #[deprecated]
119 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
120 self.0.request.project_id = v.into();
121 self
122 }
123
124 #[deprecated]
126 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
127 self.0.request.zone = v.into();
128 self
129 }
130
131 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
133 self.0.request.parent = v.into();
134 self
135 }
136 }
137
138 #[doc(hidden)]
139 impl gax::options::internal::RequestBuilder for ListClusters {
140 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
141 &mut self.0.options
142 }
143 }
144
145 #[derive(Clone, Debug)]
162 pub struct GetCluster(RequestBuilder<crate::model::GetClusterRequest>);
163
164 impl GetCluster {
165 pub(crate) fn new(
166 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
167 ) -> Self {
168 Self(RequestBuilder::new(stub))
169 }
170
171 pub fn with_request<V: Into<crate::model::GetClusterRequest>>(mut self, v: V) -> Self {
173 self.0.request = v.into();
174 self
175 }
176
177 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
179 self.0.options = v.into();
180 self
181 }
182
183 pub async fn send(self) -> Result<crate::model::Cluster> {
185 (*self.0.stub)
186 .get_cluster(self.0.request, self.0.options)
187 .await
188 .map(gax::response::Response::into_body)
189 }
190
191 #[deprecated]
193 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
194 self.0.request.project_id = v.into();
195 self
196 }
197
198 #[deprecated]
200 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
201 self.0.request.zone = v.into();
202 self
203 }
204
205 #[deprecated]
207 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
208 self.0.request.cluster_id = v.into();
209 self
210 }
211
212 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
214 self.0.request.name = v.into();
215 self
216 }
217 }
218
219 #[doc(hidden)]
220 impl gax::options::internal::RequestBuilder for GetCluster {
221 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
222 &mut self.0.options
223 }
224 }
225
226 #[derive(Clone, Debug)]
243 pub struct CreateCluster(RequestBuilder<crate::model::CreateClusterRequest>);
244
245 impl CreateCluster {
246 pub(crate) fn new(
247 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
248 ) -> Self {
249 Self(RequestBuilder::new(stub))
250 }
251
252 pub fn with_request<V: Into<crate::model::CreateClusterRequest>>(mut self, v: V) -> Self {
254 self.0.request = v.into();
255 self
256 }
257
258 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
260 self.0.options = v.into();
261 self
262 }
263
264 pub async fn send(self) -> Result<crate::model::Operation> {
266 (*self.0.stub)
267 .create_cluster(self.0.request, self.0.options)
268 .await
269 .map(gax::response::Response::into_body)
270 }
271
272 #[deprecated]
274 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
275 self.0.request.project_id = v.into();
276 self
277 }
278
279 #[deprecated]
281 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
282 self.0.request.zone = v.into();
283 self
284 }
285
286 pub fn set_cluster<T: Into<std::option::Option<crate::model::Cluster>>>(
290 mut self,
291 v: T,
292 ) -> Self {
293 self.0.request.cluster = v.into();
294 self
295 }
296
297 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
299 self.0.request.parent = v.into();
300 self
301 }
302 }
303
304 #[doc(hidden)]
305 impl gax::options::internal::RequestBuilder for CreateCluster {
306 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
307 &mut self.0.options
308 }
309 }
310
311 #[derive(Clone, Debug)]
328 pub struct UpdateCluster(RequestBuilder<crate::model::UpdateClusterRequest>);
329
330 impl UpdateCluster {
331 pub(crate) fn new(
332 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
333 ) -> Self {
334 Self(RequestBuilder::new(stub))
335 }
336
337 pub fn with_request<V: Into<crate::model::UpdateClusterRequest>>(mut self, v: V) -> Self {
339 self.0.request = v.into();
340 self
341 }
342
343 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
345 self.0.options = v.into();
346 self
347 }
348
349 pub async fn send(self) -> Result<crate::model::Operation> {
351 (*self.0.stub)
352 .update_cluster(self.0.request, self.0.options)
353 .await
354 .map(gax::response::Response::into_body)
355 }
356
357 #[deprecated]
359 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
360 self.0.request.project_id = v.into();
361 self
362 }
363
364 #[deprecated]
366 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
367 self.0.request.zone = v.into();
368 self
369 }
370
371 #[deprecated]
373 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
374 self.0.request.cluster_id = v.into();
375 self
376 }
377
378 pub fn set_update<T: Into<std::option::Option<crate::model::ClusterUpdate>>>(
382 mut self,
383 v: T,
384 ) -> Self {
385 self.0.request.update = v.into();
386 self
387 }
388
389 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
391 self.0.request.name = v.into();
392 self
393 }
394 }
395
396 #[doc(hidden)]
397 impl gax::options::internal::RequestBuilder for UpdateCluster {
398 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
399 &mut self.0.options
400 }
401 }
402
403 #[derive(Clone, Debug)]
420 pub struct UpdateNodePool(RequestBuilder<crate::model::UpdateNodePoolRequest>);
421
422 impl UpdateNodePool {
423 pub(crate) fn new(
424 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
425 ) -> Self {
426 Self(RequestBuilder::new(stub))
427 }
428
429 pub fn with_request<V: Into<crate::model::UpdateNodePoolRequest>>(mut self, v: V) -> Self {
431 self.0.request = v.into();
432 self
433 }
434
435 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
437 self.0.options = v.into();
438 self
439 }
440
441 pub async fn send(self) -> Result<crate::model::Operation> {
443 (*self.0.stub)
444 .update_node_pool(self.0.request, self.0.options)
445 .await
446 .map(gax::response::Response::into_body)
447 }
448
449 #[deprecated]
451 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
452 self.0.request.project_id = v.into();
453 self
454 }
455
456 #[deprecated]
458 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
459 self.0.request.zone = v.into();
460 self
461 }
462
463 #[deprecated]
465 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
466 self.0.request.cluster_id = v.into();
467 self
468 }
469
470 #[deprecated]
472 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
473 self.0.request.node_pool_id = v.into();
474 self
475 }
476
477 pub fn set_node_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
481 self.0.request.node_version = v.into();
482 self
483 }
484
485 pub fn set_image_type<T: Into<std::string::String>>(mut self, v: T) -> Self {
489 self.0.request.image_type = v.into();
490 self
491 }
492
493 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
495 self.0.request.name = v.into();
496 self
497 }
498
499 pub fn set_locations<T, V>(mut self, v: T) -> Self
501 where
502 T: std::iter::IntoIterator<Item = V>,
503 V: std::convert::Into<std::string::String>,
504 {
505 use std::iter::Iterator;
506 self.0.request.locations = v.into_iter().map(|i| i.into()).collect();
507 self
508 }
509
510 pub fn set_workload_metadata_config<
512 T: Into<std::option::Option<crate::model::WorkloadMetadataConfig>>,
513 >(
514 mut self,
515 v: T,
516 ) -> Self {
517 self.0.request.workload_metadata_config = v.into();
518 self
519 }
520
521 pub fn set_upgrade_settings<
523 T: Into<std::option::Option<crate::model::node_pool::UpgradeSettings>>,
524 >(
525 mut self,
526 v: T,
527 ) -> Self {
528 self.0.request.upgrade_settings = v.into();
529 self
530 }
531
532 pub fn set_tags<T: Into<std::option::Option<crate::model::NetworkTags>>>(
534 mut self,
535 v: T,
536 ) -> Self {
537 self.0.request.tags = v.into();
538 self
539 }
540
541 pub fn set_taints<T: Into<std::option::Option<crate::model::NodeTaints>>>(
543 mut self,
544 v: T,
545 ) -> Self {
546 self.0.request.taints = v.into();
547 self
548 }
549
550 pub fn set_labels<T: Into<std::option::Option<crate::model::NodeLabels>>>(
552 mut self,
553 v: T,
554 ) -> Self {
555 self.0.request.labels = v.into();
556 self
557 }
558
559 pub fn set_linux_node_config<
561 T: Into<std::option::Option<crate::model::LinuxNodeConfig>>,
562 >(
563 mut self,
564 v: T,
565 ) -> Self {
566 self.0.request.linux_node_config = v.into();
567 self
568 }
569
570 pub fn set_kubelet_config<T: Into<std::option::Option<crate::model::NodeKubeletConfig>>>(
572 mut self,
573 v: T,
574 ) -> Self {
575 self.0.request.kubelet_config = v.into();
576 self
577 }
578
579 pub fn set_node_network_config<
581 T: Into<std::option::Option<crate::model::NodeNetworkConfig>>,
582 >(
583 mut self,
584 v: T,
585 ) -> Self {
586 self.0.request.node_network_config = v.into();
587 self
588 }
589
590 pub fn set_gcfs_config<T: Into<std::option::Option<crate::model::GcfsConfig>>>(
592 mut self,
593 v: T,
594 ) -> Self {
595 self.0.request.gcfs_config = v.into();
596 self
597 }
598
599 pub fn set_confidential_nodes<
601 T: Into<std::option::Option<crate::model::ConfidentialNodes>>,
602 >(
603 mut self,
604 v: T,
605 ) -> Self {
606 self.0.request.confidential_nodes = v.into();
607 self
608 }
609
610 pub fn set_gvnic<T: Into<std::option::Option<crate::model::VirtualNIC>>>(
612 mut self,
613 v: T,
614 ) -> Self {
615 self.0.request.gvnic = v.into();
616 self
617 }
618
619 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
621 self.0.request.etag = v.into();
622 self
623 }
624
625 pub fn set_fast_socket<T: Into<std::option::Option<crate::model::FastSocket>>>(
627 mut self,
628 v: T,
629 ) -> Self {
630 self.0.request.fast_socket = v.into();
631 self
632 }
633
634 pub fn set_logging_config<
636 T: Into<std::option::Option<crate::model::NodePoolLoggingConfig>>,
637 >(
638 mut self,
639 v: T,
640 ) -> Self {
641 self.0.request.logging_config = v.into();
642 self
643 }
644
645 pub fn set_resource_labels<T: Into<std::option::Option<crate::model::ResourceLabels>>>(
647 mut self,
648 v: T,
649 ) -> Self {
650 self.0.request.resource_labels = v.into();
651 self
652 }
653
654 pub fn set_windows_node_config<
656 T: Into<std::option::Option<crate::model::WindowsNodeConfig>>,
657 >(
658 mut self,
659 v: T,
660 ) -> Self {
661 self.0.request.windows_node_config = v.into();
662 self
663 }
664
665 pub fn set_accelerators<T, V>(mut self, v: T) -> Self
667 where
668 T: std::iter::IntoIterator<Item = V>,
669 V: std::convert::Into<crate::model::AcceleratorConfig>,
670 {
671 use std::iter::Iterator;
672 self.0.request.accelerators = v.into_iter().map(|i| i.into()).collect();
673 self
674 }
675
676 pub fn set_machine_type<T: Into<std::string::String>>(mut self, v: T) -> Self {
678 self.0.request.machine_type = v.into();
679 self
680 }
681
682 pub fn set_disk_type<T: Into<std::string::String>>(mut self, v: T) -> Self {
684 self.0.request.disk_type = v.into();
685 self
686 }
687
688 pub fn set_disk_size_gb<T: Into<i64>>(mut self, v: T) -> Self {
690 self.0.request.disk_size_gb = v.into();
691 self
692 }
693
694 pub fn set_resource_manager_tags<
696 T: Into<std::option::Option<crate::model::ResourceManagerTags>>,
697 >(
698 mut self,
699 v: T,
700 ) -> Self {
701 self.0.request.resource_manager_tags = v.into();
702 self
703 }
704
705 pub fn set_containerd_config<
707 T: Into<std::option::Option<crate::model::ContainerdConfig>>,
708 >(
709 mut self,
710 v: T,
711 ) -> Self {
712 self.0.request.containerd_config = v.into();
713 self
714 }
715
716 pub fn set_queued_provisioning<
718 T: Into<std::option::Option<crate::model::node_pool::QueuedProvisioning>>,
719 >(
720 mut self,
721 v: T,
722 ) -> Self {
723 self.0.request.queued_provisioning = v.into();
724 self
725 }
726
727 pub fn set_storage_pools<T, V>(mut self, v: T) -> Self
729 where
730 T: std::iter::IntoIterator<Item = V>,
731 V: std::convert::Into<std::string::String>,
732 {
733 use std::iter::Iterator;
734 self.0.request.storage_pools = v.into_iter().map(|i| i.into()).collect();
735 self
736 }
737 }
738
739 #[doc(hidden)]
740 impl gax::options::internal::RequestBuilder for UpdateNodePool {
741 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
742 &mut self.0.options
743 }
744 }
745
746 #[derive(Clone, Debug)]
763 pub struct SetNodePoolAutoscaling(RequestBuilder<crate::model::SetNodePoolAutoscalingRequest>);
764
765 impl SetNodePoolAutoscaling {
766 pub(crate) fn new(
767 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
768 ) -> Self {
769 Self(RequestBuilder::new(stub))
770 }
771
772 pub fn with_request<V: Into<crate::model::SetNodePoolAutoscalingRequest>>(
774 mut self,
775 v: V,
776 ) -> Self {
777 self.0.request = v.into();
778 self
779 }
780
781 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
783 self.0.options = v.into();
784 self
785 }
786
787 pub async fn send(self) -> Result<crate::model::Operation> {
789 (*self.0.stub)
790 .set_node_pool_autoscaling(self.0.request, self.0.options)
791 .await
792 .map(gax::response::Response::into_body)
793 }
794
795 #[deprecated]
797 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
798 self.0.request.project_id = v.into();
799 self
800 }
801
802 #[deprecated]
804 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
805 self.0.request.zone = v.into();
806 self
807 }
808
809 #[deprecated]
811 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
812 self.0.request.cluster_id = v.into();
813 self
814 }
815
816 #[deprecated]
818 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
819 self.0.request.node_pool_id = v.into();
820 self
821 }
822
823 pub fn set_autoscaling<T: Into<std::option::Option<crate::model::NodePoolAutoscaling>>>(
827 mut self,
828 v: T,
829 ) -> Self {
830 self.0.request.autoscaling = v.into();
831 self
832 }
833
834 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
836 self.0.request.name = v.into();
837 self
838 }
839 }
840
841 #[doc(hidden)]
842 impl gax::options::internal::RequestBuilder for SetNodePoolAutoscaling {
843 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
844 &mut self.0.options
845 }
846 }
847
848 #[derive(Clone, Debug)]
865 pub struct SetLoggingService(RequestBuilder<crate::model::SetLoggingServiceRequest>);
866
867 impl SetLoggingService {
868 pub(crate) fn new(
869 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
870 ) -> Self {
871 Self(RequestBuilder::new(stub))
872 }
873
874 pub fn with_request<V: Into<crate::model::SetLoggingServiceRequest>>(
876 mut self,
877 v: V,
878 ) -> Self {
879 self.0.request = v.into();
880 self
881 }
882
883 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
885 self.0.options = v.into();
886 self
887 }
888
889 pub async fn send(self) -> Result<crate::model::Operation> {
891 (*self.0.stub)
892 .set_logging_service(self.0.request, self.0.options)
893 .await
894 .map(gax::response::Response::into_body)
895 }
896
897 #[deprecated]
899 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
900 self.0.request.project_id = v.into();
901 self
902 }
903
904 #[deprecated]
906 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
907 self.0.request.zone = v.into();
908 self
909 }
910
911 #[deprecated]
913 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
914 self.0.request.cluster_id = v.into();
915 self
916 }
917
918 pub fn set_logging_service<T: Into<std::string::String>>(mut self, v: T) -> Self {
922 self.0.request.logging_service = v.into();
923 self
924 }
925
926 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
928 self.0.request.name = v.into();
929 self
930 }
931 }
932
933 #[doc(hidden)]
934 impl gax::options::internal::RequestBuilder for SetLoggingService {
935 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
936 &mut self.0.options
937 }
938 }
939
940 #[derive(Clone, Debug)]
957 pub struct SetMonitoringService(RequestBuilder<crate::model::SetMonitoringServiceRequest>);
958
959 impl SetMonitoringService {
960 pub(crate) fn new(
961 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
962 ) -> Self {
963 Self(RequestBuilder::new(stub))
964 }
965
966 pub fn with_request<V: Into<crate::model::SetMonitoringServiceRequest>>(
968 mut self,
969 v: V,
970 ) -> Self {
971 self.0.request = v.into();
972 self
973 }
974
975 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
977 self.0.options = v.into();
978 self
979 }
980
981 pub async fn send(self) -> Result<crate::model::Operation> {
983 (*self.0.stub)
984 .set_monitoring_service(self.0.request, self.0.options)
985 .await
986 .map(gax::response::Response::into_body)
987 }
988
989 #[deprecated]
991 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
992 self.0.request.project_id = v.into();
993 self
994 }
995
996 #[deprecated]
998 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
999 self.0.request.zone = v.into();
1000 self
1001 }
1002
1003 #[deprecated]
1005 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1006 self.0.request.cluster_id = v.into();
1007 self
1008 }
1009
1010 pub fn set_monitoring_service<T: Into<std::string::String>>(mut self, v: T) -> Self {
1014 self.0.request.monitoring_service = v.into();
1015 self
1016 }
1017
1018 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1020 self.0.request.name = v.into();
1021 self
1022 }
1023 }
1024
1025 #[doc(hidden)]
1026 impl gax::options::internal::RequestBuilder for SetMonitoringService {
1027 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1028 &mut self.0.options
1029 }
1030 }
1031
1032 #[derive(Clone, Debug)]
1049 pub struct SetAddonsConfig(RequestBuilder<crate::model::SetAddonsConfigRequest>);
1050
1051 impl SetAddonsConfig {
1052 pub(crate) fn new(
1053 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1054 ) -> Self {
1055 Self(RequestBuilder::new(stub))
1056 }
1057
1058 pub fn with_request<V: Into<crate::model::SetAddonsConfigRequest>>(mut self, v: V) -> Self {
1060 self.0.request = v.into();
1061 self
1062 }
1063
1064 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1066 self.0.options = v.into();
1067 self
1068 }
1069
1070 pub async fn send(self) -> Result<crate::model::Operation> {
1072 (*self.0.stub)
1073 .set_addons_config(self.0.request, self.0.options)
1074 .await
1075 .map(gax::response::Response::into_body)
1076 }
1077
1078 #[deprecated]
1080 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1081 self.0.request.project_id = v.into();
1082 self
1083 }
1084
1085 #[deprecated]
1087 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1088 self.0.request.zone = v.into();
1089 self
1090 }
1091
1092 #[deprecated]
1094 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1095 self.0.request.cluster_id = v.into();
1096 self
1097 }
1098
1099 pub fn set_addons_config<T: Into<std::option::Option<crate::model::AddonsConfig>>>(
1103 mut self,
1104 v: T,
1105 ) -> Self {
1106 self.0.request.addons_config = v.into();
1107 self
1108 }
1109
1110 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1112 self.0.request.name = v.into();
1113 self
1114 }
1115 }
1116
1117 #[doc(hidden)]
1118 impl gax::options::internal::RequestBuilder for SetAddonsConfig {
1119 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1120 &mut self.0.options
1121 }
1122 }
1123
1124 #[derive(Clone, Debug)]
1141 pub struct SetLocations(RequestBuilder<crate::model::SetLocationsRequest>);
1142
1143 impl SetLocations {
1144 pub(crate) fn new(
1145 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1146 ) -> Self {
1147 Self(RequestBuilder::new(stub))
1148 }
1149
1150 pub fn with_request<V: Into<crate::model::SetLocationsRequest>>(mut self, v: V) -> Self {
1152 self.0.request = v.into();
1153 self
1154 }
1155
1156 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1158 self.0.options = v.into();
1159 self
1160 }
1161
1162 pub async fn send(self) -> Result<crate::model::Operation> {
1164 (*self.0.stub)
1165 .set_locations(self.0.request, self.0.options)
1166 .await
1167 .map(gax::response::Response::into_body)
1168 }
1169
1170 #[deprecated]
1172 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1173 self.0.request.project_id = v.into();
1174 self
1175 }
1176
1177 #[deprecated]
1179 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1180 self.0.request.zone = v.into();
1181 self
1182 }
1183
1184 #[deprecated]
1186 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1187 self.0.request.cluster_id = v.into();
1188 self
1189 }
1190
1191 pub fn set_locations<T, V>(mut self, v: T) -> Self
1195 where
1196 T: std::iter::IntoIterator<Item = V>,
1197 V: std::convert::Into<std::string::String>,
1198 {
1199 use std::iter::Iterator;
1200 self.0.request.locations = v.into_iter().map(|i| i.into()).collect();
1201 self
1202 }
1203
1204 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1206 self.0.request.name = v.into();
1207 self
1208 }
1209 }
1210
1211 #[doc(hidden)]
1212 impl gax::options::internal::RequestBuilder for SetLocations {
1213 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1214 &mut self.0.options
1215 }
1216 }
1217
1218 #[derive(Clone, Debug)]
1235 pub struct UpdateMaster(RequestBuilder<crate::model::UpdateMasterRequest>);
1236
1237 impl UpdateMaster {
1238 pub(crate) fn new(
1239 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1240 ) -> Self {
1241 Self(RequestBuilder::new(stub))
1242 }
1243
1244 pub fn with_request<V: Into<crate::model::UpdateMasterRequest>>(mut self, v: V) -> Self {
1246 self.0.request = v.into();
1247 self
1248 }
1249
1250 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1252 self.0.options = v.into();
1253 self
1254 }
1255
1256 pub async fn send(self) -> Result<crate::model::Operation> {
1258 (*self.0.stub)
1259 .update_master(self.0.request, self.0.options)
1260 .await
1261 .map(gax::response::Response::into_body)
1262 }
1263
1264 #[deprecated]
1266 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1267 self.0.request.project_id = v.into();
1268 self
1269 }
1270
1271 #[deprecated]
1273 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1274 self.0.request.zone = v.into();
1275 self
1276 }
1277
1278 #[deprecated]
1280 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1281 self.0.request.cluster_id = v.into();
1282 self
1283 }
1284
1285 pub fn set_master_version<T: Into<std::string::String>>(mut self, v: T) -> Self {
1289 self.0.request.master_version = v.into();
1290 self
1291 }
1292
1293 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1295 self.0.request.name = v.into();
1296 self
1297 }
1298 }
1299
1300 #[doc(hidden)]
1301 impl gax::options::internal::RequestBuilder for UpdateMaster {
1302 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1303 &mut self.0.options
1304 }
1305 }
1306
1307 #[derive(Clone, Debug)]
1324 pub struct SetMasterAuth(RequestBuilder<crate::model::SetMasterAuthRequest>);
1325
1326 impl SetMasterAuth {
1327 pub(crate) fn new(
1328 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1329 ) -> Self {
1330 Self(RequestBuilder::new(stub))
1331 }
1332
1333 pub fn with_request<V: Into<crate::model::SetMasterAuthRequest>>(mut self, v: V) -> Self {
1335 self.0.request = v.into();
1336 self
1337 }
1338
1339 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1341 self.0.options = v.into();
1342 self
1343 }
1344
1345 pub async fn send(self) -> Result<crate::model::Operation> {
1347 (*self.0.stub)
1348 .set_master_auth(self.0.request, self.0.options)
1349 .await
1350 .map(gax::response::Response::into_body)
1351 }
1352
1353 #[deprecated]
1355 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1356 self.0.request.project_id = v.into();
1357 self
1358 }
1359
1360 #[deprecated]
1362 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1363 self.0.request.zone = v.into();
1364 self
1365 }
1366
1367 #[deprecated]
1369 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1370 self.0.request.cluster_id = v.into();
1371 self
1372 }
1373
1374 pub fn set_action<T: Into<crate::model::set_master_auth_request::Action>>(
1378 mut self,
1379 v: T,
1380 ) -> Self {
1381 self.0.request.action = v.into();
1382 self
1383 }
1384
1385 pub fn set_update<T: Into<std::option::Option<crate::model::MasterAuth>>>(
1389 mut self,
1390 v: T,
1391 ) -> Self {
1392 self.0.request.update = v.into();
1393 self
1394 }
1395
1396 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1398 self.0.request.name = v.into();
1399 self
1400 }
1401 }
1402
1403 #[doc(hidden)]
1404 impl gax::options::internal::RequestBuilder for SetMasterAuth {
1405 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1406 &mut self.0.options
1407 }
1408 }
1409
1410 #[derive(Clone, Debug)]
1427 pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
1428
1429 impl DeleteCluster {
1430 pub(crate) fn new(
1431 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1432 ) -> Self {
1433 Self(RequestBuilder::new(stub))
1434 }
1435
1436 pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
1438 self.0.request = v.into();
1439 self
1440 }
1441
1442 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1444 self.0.options = v.into();
1445 self
1446 }
1447
1448 pub async fn send(self) -> Result<crate::model::Operation> {
1450 (*self.0.stub)
1451 .delete_cluster(self.0.request, self.0.options)
1452 .await
1453 .map(gax::response::Response::into_body)
1454 }
1455
1456 #[deprecated]
1458 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1459 self.0.request.project_id = v.into();
1460 self
1461 }
1462
1463 #[deprecated]
1465 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1466 self.0.request.zone = v.into();
1467 self
1468 }
1469
1470 #[deprecated]
1472 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1473 self.0.request.cluster_id = v.into();
1474 self
1475 }
1476
1477 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1479 self.0.request.name = v.into();
1480 self
1481 }
1482 }
1483
1484 #[doc(hidden)]
1485 impl gax::options::internal::RequestBuilder for DeleteCluster {
1486 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1487 &mut self.0.options
1488 }
1489 }
1490
1491 #[derive(Clone, Debug)]
1508 pub struct ListOperations(RequestBuilder<crate::model::ListOperationsRequest>);
1509
1510 impl ListOperations {
1511 pub(crate) fn new(
1512 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1513 ) -> Self {
1514 Self(RequestBuilder::new(stub))
1515 }
1516
1517 pub fn with_request<V: Into<crate::model::ListOperationsRequest>>(mut self, v: V) -> Self {
1519 self.0.request = v.into();
1520 self
1521 }
1522
1523 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1525 self.0.options = v.into();
1526 self
1527 }
1528
1529 pub async fn send(self) -> Result<crate::model::ListOperationsResponse> {
1531 (*self.0.stub)
1532 .list_operations(self.0.request, self.0.options)
1533 .await
1534 .map(gax::response::Response::into_body)
1535 }
1536
1537 #[deprecated]
1539 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1540 self.0.request.project_id = v.into();
1541 self
1542 }
1543
1544 #[deprecated]
1546 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1547 self.0.request.zone = v.into();
1548 self
1549 }
1550
1551 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1553 self.0.request.parent = v.into();
1554 self
1555 }
1556 }
1557
1558 #[doc(hidden)]
1559 impl gax::options::internal::RequestBuilder for ListOperations {
1560 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1561 &mut self.0.options
1562 }
1563 }
1564
1565 #[derive(Clone, Debug)]
1582 pub struct GetOperation(RequestBuilder<crate::model::GetOperationRequest>);
1583
1584 impl GetOperation {
1585 pub(crate) fn new(
1586 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1587 ) -> Self {
1588 Self(RequestBuilder::new(stub))
1589 }
1590
1591 pub fn with_request<V: Into<crate::model::GetOperationRequest>>(mut self, v: V) -> Self {
1593 self.0.request = v.into();
1594 self
1595 }
1596
1597 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1599 self.0.options = v.into();
1600 self
1601 }
1602
1603 pub async fn send(self) -> Result<crate::model::Operation> {
1605 (*self.0.stub)
1606 .get_operation(self.0.request, self.0.options)
1607 .await
1608 .map(gax::response::Response::into_body)
1609 }
1610
1611 #[deprecated]
1613 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1614 self.0.request.project_id = v.into();
1615 self
1616 }
1617
1618 #[deprecated]
1620 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1621 self.0.request.zone = v.into();
1622 self
1623 }
1624
1625 #[deprecated]
1627 pub fn set_operation_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1628 self.0.request.operation_id = v.into();
1629 self
1630 }
1631
1632 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1634 self.0.request.name = v.into();
1635 self
1636 }
1637 }
1638
1639 #[doc(hidden)]
1640 impl gax::options::internal::RequestBuilder for GetOperation {
1641 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1642 &mut self.0.options
1643 }
1644 }
1645
1646 #[derive(Clone, Debug)]
1663 pub struct CancelOperation(RequestBuilder<crate::model::CancelOperationRequest>);
1664
1665 impl CancelOperation {
1666 pub(crate) fn new(
1667 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1668 ) -> Self {
1669 Self(RequestBuilder::new(stub))
1670 }
1671
1672 pub fn with_request<V: Into<crate::model::CancelOperationRequest>>(mut self, v: V) -> Self {
1674 self.0.request = v.into();
1675 self
1676 }
1677
1678 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1680 self.0.options = v.into();
1681 self
1682 }
1683
1684 pub async fn send(self) -> Result<()> {
1686 (*self.0.stub)
1687 .cancel_operation(self.0.request, self.0.options)
1688 .await
1689 .map(gax::response::Response::into_body)
1690 }
1691
1692 #[deprecated]
1694 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1695 self.0.request.project_id = v.into();
1696 self
1697 }
1698
1699 #[deprecated]
1701 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1702 self.0.request.zone = v.into();
1703 self
1704 }
1705
1706 #[deprecated]
1708 pub fn set_operation_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1709 self.0.request.operation_id = v.into();
1710 self
1711 }
1712
1713 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1715 self.0.request.name = v.into();
1716 self
1717 }
1718 }
1719
1720 #[doc(hidden)]
1721 impl gax::options::internal::RequestBuilder for CancelOperation {
1722 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1723 &mut self.0.options
1724 }
1725 }
1726
1727 #[derive(Clone, Debug)]
1744 pub struct GetServerConfig(RequestBuilder<crate::model::GetServerConfigRequest>);
1745
1746 impl GetServerConfig {
1747 pub(crate) fn new(
1748 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1749 ) -> Self {
1750 Self(RequestBuilder::new(stub))
1751 }
1752
1753 pub fn with_request<V: Into<crate::model::GetServerConfigRequest>>(mut self, v: V) -> Self {
1755 self.0.request = v.into();
1756 self
1757 }
1758
1759 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1761 self.0.options = v.into();
1762 self
1763 }
1764
1765 pub async fn send(self) -> Result<crate::model::ServerConfig> {
1767 (*self.0.stub)
1768 .get_server_config(self.0.request, self.0.options)
1769 .await
1770 .map(gax::response::Response::into_body)
1771 }
1772
1773 #[deprecated]
1775 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1776 self.0.request.project_id = v.into();
1777 self
1778 }
1779
1780 #[deprecated]
1782 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1783 self.0.request.zone = v.into();
1784 self
1785 }
1786
1787 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1789 self.0.request.name = v.into();
1790 self
1791 }
1792 }
1793
1794 #[doc(hidden)]
1795 impl gax::options::internal::RequestBuilder for GetServerConfig {
1796 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1797 &mut self.0.options
1798 }
1799 }
1800
1801 #[derive(Clone, Debug)]
1818 pub struct GetJSONWebKeys(RequestBuilder<crate::model::GetJSONWebKeysRequest>);
1819
1820 impl GetJSONWebKeys {
1821 pub(crate) fn new(
1822 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1823 ) -> Self {
1824 Self(RequestBuilder::new(stub))
1825 }
1826
1827 pub fn with_request<V: Into<crate::model::GetJSONWebKeysRequest>>(mut self, v: V) -> Self {
1829 self.0.request = v.into();
1830 self
1831 }
1832
1833 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1835 self.0.options = v.into();
1836 self
1837 }
1838
1839 pub async fn send(self) -> Result<crate::model::GetJSONWebKeysResponse> {
1841 (*self.0.stub)
1842 .get_json_web_keys(self.0.request, self.0.options)
1843 .await
1844 .map(gax::response::Response::into_body)
1845 }
1846
1847 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1849 self.0.request.parent = v.into();
1850 self
1851 }
1852 }
1853
1854 #[doc(hidden)]
1855 impl gax::options::internal::RequestBuilder for GetJSONWebKeys {
1856 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1857 &mut self.0.options
1858 }
1859 }
1860
1861 #[derive(Clone, Debug)]
1878 pub struct ListNodePools(RequestBuilder<crate::model::ListNodePoolsRequest>);
1879
1880 impl ListNodePools {
1881 pub(crate) fn new(
1882 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1883 ) -> Self {
1884 Self(RequestBuilder::new(stub))
1885 }
1886
1887 pub fn with_request<V: Into<crate::model::ListNodePoolsRequest>>(mut self, v: V) -> Self {
1889 self.0.request = v.into();
1890 self
1891 }
1892
1893 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1895 self.0.options = v.into();
1896 self
1897 }
1898
1899 pub async fn send(self) -> Result<crate::model::ListNodePoolsResponse> {
1901 (*self.0.stub)
1902 .list_node_pools(self.0.request, self.0.options)
1903 .await
1904 .map(gax::response::Response::into_body)
1905 }
1906
1907 #[deprecated]
1909 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1910 self.0.request.project_id = v.into();
1911 self
1912 }
1913
1914 #[deprecated]
1916 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1917 self.0.request.zone = v.into();
1918 self
1919 }
1920
1921 #[deprecated]
1923 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1924 self.0.request.cluster_id = v.into();
1925 self
1926 }
1927
1928 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1930 self.0.request.parent = v.into();
1931 self
1932 }
1933 }
1934
1935 #[doc(hidden)]
1936 impl gax::options::internal::RequestBuilder for ListNodePools {
1937 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1938 &mut self.0.options
1939 }
1940 }
1941
1942 #[derive(Clone, Debug)]
1959 pub struct GetNodePool(RequestBuilder<crate::model::GetNodePoolRequest>);
1960
1961 impl GetNodePool {
1962 pub(crate) fn new(
1963 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
1964 ) -> Self {
1965 Self(RequestBuilder::new(stub))
1966 }
1967
1968 pub fn with_request<V: Into<crate::model::GetNodePoolRequest>>(mut self, v: V) -> Self {
1970 self.0.request = v.into();
1971 self
1972 }
1973
1974 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1976 self.0.options = v.into();
1977 self
1978 }
1979
1980 pub async fn send(self) -> Result<crate::model::NodePool> {
1982 (*self.0.stub)
1983 .get_node_pool(self.0.request, self.0.options)
1984 .await
1985 .map(gax::response::Response::into_body)
1986 }
1987
1988 #[deprecated]
1990 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1991 self.0.request.project_id = v.into();
1992 self
1993 }
1994
1995 #[deprecated]
1997 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
1998 self.0.request.zone = v.into();
1999 self
2000 }
2001
2002 #[deprecated]
2004 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2005 self.0.request.cluster_id = v.into();
2006 self
2007 }
2008
2009 #[deprecated]
2011 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2012 self.0.request.node_pool_id = v.into();
2013 self
2014 }
2015
2016 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2018 self.0.request.name = v.into();
2019 self
2020 }
2021 }
2022
2023 #[doc(hidden)]
2024 impl gax::options::internal::RequestBuilder for GetNodePool {
2025 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2026 &mut self.0.options
2027 }
2028 }
2029
2030 #[derive(Clone, Debug)]
2047 pub struct CreateNodePool(RequestBuilder<crate::model::CreateNodePoolRequest>);
2048
2049 impl CreateNodePool {
2050 pub(crate) fn new(
2051 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2052 ) -> Self {
2053 Self(RequestBuilder::new(stub))
2054 }
2055
2056 pub fn with_request<V: Into<crate::model::CreateNodePoolRequest>>(mut self, v: V) -> Self {
2058 self.0.request = v.into();
2059 self
2060 }
2061
2062 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2064 self.0.options = v.into();
2065 self
2066 }
2067
2068 pub async fn send(self) -> Result<crate::model::Operation> {
2070 (*self.0.stub)
2071 .create_node_pool(self.0.request, self.0.options)
2072 .await
2073 .map(gax::response::Response::into_body)
2074 }
2075
2076 #[deprecated]
2078 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2079 self.0.request.project_id = v.into();
2080 self
2081 }
2082
2083 #[deprecated]
2085 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2086 self.0.request.zone = v.into();
2087 self
2088 }
2089
2090 #[deprecated]
2092 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2093 self.0.request.cluster_id = v.into();
2094 self
2095 }
2096
2097 pub fn set_node_pool<T: Into<std::option::Option<crate::model::NodePool>>>(
2101 mut self,
2102 v: T,
2103 ) -> Self {
2104 self.0.request.node_pool = v.into();
2105 self
2106 }
2107
2108 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2110 self.0.request.parent = v.into();
2111 self
2112 }
2113 }
2114
2115 #[doc(hidden)]
2116 impl gax::options::internal::RequestBuilder for CreateNodePool {
2117 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2118 &mut self.0.options
2119 }
2120 }
2121
2122 #[derive(Clone, Debug)]
2139 pub struct DeleteNodePool(RequestBuilder<crate::model::DeleteNodePoolRequest>);
2140
2141 impl DeleteNodePool {
2142 pub(crate) fn new(
2143 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2144 ) -> Self {
2145 Self(RequestBuilder::new(stub))
2146 }
2147
2148 pub fn with_request<V: Into<crate::model::DeleteNodePoolRequest>>(mut self, v: V) -> Self {
2150 self.0.request = v.into();
2151 self
2152 }
2153
2154 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2156 self.0.options = v.into();
2157 self
2158 }
2159
2160 pub async fn send(self) -> Result<crate::model::Operation> {
2162 (*self.0.stub)
2163 .delete_node_pool(self.0.request, self.0.options)
2164 .await
2165 .map(gax::response::Response::into_body)
2166 }
2167
2168 #[deprecated]
2170 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2171 self.0.request.project_id = v.into();
2172 self
2173 }
2174
2175 #[deprecated]
2177 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2178 self.0.request.zone = v.into();
2179 self
2180 }
2181
2182 #[deprecated]
2184 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2185 self.0.request.cluster_id = v.into();
2186 self
2187 }
2188
2189 #[deprecated]
2191 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2192 self.0.request.node_pool_id = v.into();
2193 self
2194 }
2195
2196 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2198 self.0.request.name = v.into();
2199 self
2200 }
2201 }
2202
2203 #[doc(hidden)]
2204 impl gax::options::internal::RequestBuilder for DeleteNodePool {
2205 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2206 &mut self.0.options
2207 }
2208 }
2209
2210 #[derive(Clone, Debug)]
2227 pub struct CompleteNodePoolUpgrade(
2228 RequestBuilder<crate::model::CompleteNodePoolUpgradeRequest>,
2229 );
2230
2231 impl CompleteNodePoolUpgrade {
2232 pub(crate) fn new(
2233 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2234 ) -> Self {
2235 Self(RequestBuilder::new(stub))
2236 }
2237
2238 pub fn with_request<V: Into<crate::model::CompleteNodePoolUpgradeRequest>>(
2240 mut self,
2241 v: V,
2242 ) -> Self {
2243 self.0.request = v.into();
2244 self
2245 }
2246
2247 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2249 self.0.options = v.into();
2250 self
2251 }
2252
2253 pub async fn send(self) -> Result<()> {
2255 (*self.0.stub)
2256 .complete_node_pool_upgrade(self.0.request, self.0.options)
2257 .await
2258 .map(gax::response::Response::into_body)
2259 }
2260
2261 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2263 self.0.request.name = v.into();
2264 self
2265 }
2266 }
2267
2268 #[doc(hidden)]
2269 impl gax::options::internal::RequestBuilder for CompleteNodePoolUpgrade {
2270 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2271 &mut self.0.options
2272 }
2273 }
2274
2275 #[derive(Clone, Debug)]
2292 pub struct RollbackNodePoolUpgrade(
2293 RequestBuilder<crate::model::RollbackNodePoolUpgradeRequest>,
2294 );
2295
2296 impl RollbackNodePoolUpgrade {
2297 pub(crate) fn new(
2298 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2299 ) -> Self {
2300 Self(RequestBuilder::new(stub))
2301 }
2302
2303 pub fn with_request<V: Into<crate::model::RollbackNodePoolUpgradeRequest>>(
2305 mut self,
2306 v: V,
2307 ) -> Self {
2308 self.0.request = v.into();
2309 self
2310 }
2311
2312 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2314 self.0.options = v.into();
2315 self
2316 }
2317
2318 pub async fn send(self) -> Result<crate::model::Operation> {
2320 (*self.0.stub)
2321 .rollback_node_pool_upgrade(self.0.request, self.0.options)
2322 .await
2323 .map(gax::response::Response::into_body)
2324 }
2325
2326 #[deprecated]
2328 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2329 self.0.request.project_id = v.into();
2330 self
2331 }
2332
2333 #[deprecated]
2335 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2336 self.0.request.zone = v.into();
2337 self
2338 }
2339
2340 #[deprecated]
2342 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2343 self.0.request.cluster_id = v.into();
2344 self
2345 }
2346
2347 #[deprecated]
2349 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2350 self.0.request.node_pool_id = v.into();
2351 self
2352 }
2353
2354 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2356 self.0.request.name = v.into();
2357 self
2358 }
2359
2360 pub fn set_respect_pdb<T: Into<bool>>(mut self, v: T) -> Self {
2362 self.0.request.respect_pdb = v.into();
2363 self
2364 }
2365 }
2366
2367 #[doc(hidden)]
2368 impl gax::options::internal::RequestBuilder for RollbackNodePoolUpgrade {
2369 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2370 &mut self.0.options
2371 }
2372 }
2373
2374 #[derive(Clone, Debug)]
2391 pub struct SetNodePoolManagement(RequestBuilder<crate::model::SetNodePoolManagementRequest>);
2392
2393 impl SetNodePoolManagement {
2394 pub(crate) fn new(
2395 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2396 ) -> Self {
2397 Self(RequestBuilder::new(stub))
2398 }
2399
2400 pub fn with_request<V: Into<crate::model::SetNodePoolManagementRequest>>(
2402 mut self,
2403 v: V,
2404 ) -> Self {
2405 self.0.request = v.into();
2406 self
2407 }
2408
2409 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2411 self.0.options = v.into();
2412 self
2413 }
2414
2415 pub async fn send(self) -> Result<crate::model::Operation> {
2417 (*self.0.stub)
2418 .set_node_pool_management(self.0.request, self.0.options)
2419 .await
2420 .map(gax::response::Response::into_body)
2421 }
2422
2423 #[deprecated]
2425 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2426 self.0.request.project_id = v.into();
2427 self
2428 }
2429
2430 #[deprecated]
2432 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2433 self.0.request.zone = v.into();
2434 self
2435 }
2436
2437 #[deprecated]
2439 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2440 self.0.request.cluster_id = v.into();
2441 self
2442 }
2443
2444 #[deprecated]
2446 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2447 self.0.request.node_pool_id = v.into();
2448 self
2449 }
2450
2451 pub fn set_management<T: Into<std::option::Option<crate::model::NodeManagement>>>(
2455 mut self,
2456 v: T,
2457 ) -> Self {
2458 self.0.request.management = v.into();
2459 self
2460 }
2461
2462 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2464 self.0.request.name = v.into();
2465 self
2466 }
2467 }
2468
2469 #[doc(hidden)]
2470 impl gax::options::internal::RequestBuilder for SetNodePoolManagement {
2471 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2472 &mut self.0.options
2473 }
2474 }
2475
2476 #[derive(Clone, Debug)]
2493 pub struct SetLabels(RequestBuilder<crate::model::SetLabelsRequest>);
2494
2495 impl SetLabels {
2496 pub(crate) fn new(
2497 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2498 ) -> Self {
2499 Self(RequestBuilder::new(stub))
2500 }
2501
2502 pub fn with_request<V: Into<crate::model::SetLabelsRequest>>(mut self, v: V) -> Self {
2504 self.0.request = v.into();
2505 self
2506 }
2507
2508 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2510 self.0.options = v.into();
2511 self
2512 }
2513
2514 pub async fn send(self) -> Result<crate::model::Operation> {
2516 (*self.0.stub)
2517 .set_labels(self.0.request, self.0.options)
2518 .await
2519 .map(gax::response::Response::into_body)
2520 }
2521
2522 #[deprecated]
2524 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2525 self.0.request.project_id = v.into();
2526 self
2527 }
2528
2529 #[deprecated]
2531 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2532 self.0.request.zone = v.into();
2533 self
2534 }
2535
2536 #[deprecated]
2538 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2539 self.0.request.cluster_id = v.into();
2540 self
2541 }
2542
2543 pub fn set_resource_labels<T, K, V>(mut self, v: T) -> Self
2547 where
2548 T: std::iter::IntoIterator<Item = (K, V)>,
2549 K: std::convert::Into<std::string::String>,
2550 V: std::convert::Into<std::string::String>,
2551 {
2552 self.0.request.resource_labels =
2553 v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2554 self
2555 }
2556
2557 pub fn set_label_fingerprint<T: Into<std::string::String>>(mut self, v: T) -> Self {
2561 self.0.request.label_fingerprint = v.into();
2562 self
2563 }
2564
2565 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2567 self.0.request.name = v.into();
2568 self
2569 }
2570 }
2571
2572 #[doc(hidden)]
2573 impl gax::options::internal::RequestBuilder for SetLabels {
2574 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2575 &mut self.0.options
2576 }
2577 }
2578
2579 #[derive(Clone, Debug)]
2596 pub struct SetLegacyAbac(RequestBuilder<crate::model::SetLegacyAbacRequest>);
2597
2598 impl SetLegacyAbac {
2599 pub(crate) fn new(
2600 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2601 ) -> Self {
2602 Self(RequestBuilder::new(stub))
2603 }
2604
2605 pub fn with_request<V: Into<crate::model::SetLegacyAbacRequest>>(mut self, v: V) -> Self {
2607 self.0.request = v.into();
2608 self
2609 }
2610
2611 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2613 self.0.options = v.into();
2614 self
2615 }
2616
2617 pub async fn send(self) -> Result<crate::model::Operation> {
2619 (*self.0.stub)
2620 .set_legacy_abac(self.0.request, self.0.options)
2621 .await
2622 .map(gax::response::Response::into_body)
2623 }
2624
2625 #[deprecated]
2627 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2628 self.0.request.project_id = v.into();
2629 self
2630 }
2631
2632 #[deprecated]
2634 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2635 self.0.request.zone = v.into();
2636 self
2637 }
2638
2639 #[deprecated]
2641 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2642 self.0.request.cluster_id = v.into();
2643 self
2644 }
2645
2646 pub fn set_enabled<T: Into<bool>>(mut self, v: T) -> Self {
2650 self.0.request.enabled = v.into();
2651 self
2652 }
2653
2654 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2656 self.0.request.name = v.into();
2657 self
2658 }
2659 }
2660
2661 #[doc(hidden)]
2662 impl gax::options::internal::RequestBuilder for SetLegacyAbac {
2663 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2664 &mut self.0.options
2665 }
2666 }
2667
2668 #[derive(Clone, Debug)]
2685 pub struct StartIPRotation(RequestBuilder<crate::model::StartIPRotationRequest>);
2686
2687 impl StartIPRotation {
2688 pub(crate) fn new(
2689 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2690 ) -> Self {
2691 Self(RequestBuilder::new(stub))
2692 }
2693
2694 pub fn with_request<V: Into<crate::model::StartIPRotationRequest>>(mut self, v: V) -> Self {
2696 self.0.request = v.into();
2697 self
2698 }
2699
2700 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2702 self.0.options = v.into();
2703 self
2704 }
2705
2706 pub async fn send(self) -> Result<crate::model::Operation> {
2708 (*self.0.stub)
2709 .start_ip_rotation(self.0.request, self.0.options)
2710 .await
2711 .map(gax::response::Response::into_body)
2712 }
2713
2714 #[deprecated]
2716 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2717 self.0.request.project_id = v.into();
2718 self
2719 }
2720
2721 #[deprecated]
2723 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2724 self.0.request.zone = v.into();
2725 self
2726 }
2727
2728 #[deprecated]
2730 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2731 self.0.request.cluster_id = v.into();
2732 self
2733 }
2734
2735 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2737 self.0.request.name = v.into();
2738 self
2739 }
2740
2741 pub fn set_rotate_credentials<T: Into<bool>>(mut self, v: T) -> Self {
2743 self.0.request.rotate_credentials = v.into();
2744 self
2745 }
2746 }
2747
2748 #[doc(hidden)]
2749 impl gax::options::internal::RequestBuilder for StartIPRotation {
2750 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2751 &mut self.0.options
2752 }
2753 }
2754
2755 #[derive(Clone, Debug)]
2772 pub struct CompleteIPRotation(RequestBuilder<crate::model::CompleteIPRotationRequest>);
2773
2774 impl CompleteIPRotation {
2775 pub(crate) fn new(
2776 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2777 ) -> Self {
2778 Self(RequestBuilder::new(stub))
2779 }
2780
2781 pub fn with_request<V: Into<crate::model::CompleteIPRotationRequest>>(
2783 mut self,
2784 v: V,
2785 ) -> Self {
2786 self.0.request = v.into();
2787 self
2788 }
2789
2790 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2792 self.0.options = v.into();
2793 self
2794 }
2795
2796 pub async fn send(self) -> Result<crate::model::Operation> {
2798 (*self.0.stub)
2799 .complete_ip_rotation(self.0.request, self.0.options)
2800 .await
2801 .map(gax::response::Response::into_body)
2802 }
2803
2804 #[deprecated]
2806 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2807 self.0.request.project_id = v.into();
2808 self
2809 }
2810
2811 #[deprecated]
2813 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2814 self.0.request.zone = v.into();
2815 self
2816 }
2817
2818 #[deprecated]
2820 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2821 self.0.request.cluster_id = v.into();
2822 self
2823 }
2824
2825 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2827 self.0.request.name = v.into();
2828 self
2829 }
2830 }
2831
2832 #[doc(hidden)]
2833 impl gax::options::internal::RequestBuilder for CompleteIPRotation {
2834 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2835 &mut self.0.options
2836 }
2837 }
2838
2839 #[derive(Clone, Debug)]
2856 pub struct SetNodePoolSize(RequestBuilder<crate::model::SetNodePoolSizeRequest>);
2857
2858 impl SetNodePoolSize {
2859 pub(crate) fn new(
2860 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2861 ) -> Self {
2862 Self(RequestBuilder::new(stub))
2863 }
2864
2865 pub fn with_request<V: Into<crate::model::SetNodePoolSizeRequest>>(mut self, v: V) -> Self {
2867 self.0.request = v.into();
2868 self
2869 }
2870
2871 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2873 self.0.options = v.into();
2874 self
2875 }
2876
2877 pub async fn send(self) -> Result<crate::model::Operation> {
2879 (*self.0.stub)
2880 .set_node_pool_size(self.0.request, self.0.options)
2881 .await
2882 .map(gax::response::Response::into_body)
2883 }
2884
2885 #[deprecated]
2887 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2888 self.0.request.project_id = v.into();
2889 self
2890 }
2891
2892 #[deprecated]
2894 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2895 self.0.request.zone = v.into();
2896 self
2897 }
2898
2899 #[deprecated]
2901 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2902 self.0.request.cluster_id = v.into();
2903 self
2904 }
2905
2906 #[deprecated]
2908 pub fn set_node_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2909 self.0.request.node_pool_id = v.into();
2910 self
2911 }
2912
2913 pub fn set_node_count<T: Into<i32>>(mut self, v: T) -> Self {
2917 self.0.request.node_count = v.into();
2918 self
2919 }
2920
2921 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2923 self.0.request.name = v.into();
2924 self
2925 }
2926 }
2927
2928 #[doc(hidden)]
2929 impl gax::options::internal::RequestBuilder for SetNodePoolSize {
2930 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2931 &mut self.0.options
2932 }
2933 }
2934
2935 #[derive(Clone, Debug)]
2952 pub struct SetNetworkPolicy(RequestBuilder<crate::model::SetNetworkPolicyRequest>);
2953
2954 impl SetNetworkPolicy {
2955 pub(crate) fn new(
2956 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
2957 ) -> Self {
2958 Self(RequestBuilder::new(stub))
2959 }
2960
2961 pub fn with_request<V: Into<crate::model::SetNetworkPolicyRequest>>(
2963 mut self,
2964 v: V,
2965 ) -> Self {
2966 self.0.request = v.into();
2967 self
2968 }
2969
2970 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2972 self.0.options = v.into();
2973 self
2974 }
2975
2976 pub async fn send(self) -> Result<crate::model::Operation> {
2978 (*self.0.stub)
2979 .set_network_policy(self.0.request, self.0.options)
2980 .await
2981 .map(gax::response::Response::into_body)
2982 }
2983
2984 #[deprecated]
2986 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2987 self.0.request.project_id = v.into();
2988 self
2989 }
2990
2991 #[deprecated]
2993 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
2994 self.0.request.zone = v.into();
2995 self
2996 }
2997
2998 #[deprecated]
3000 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3001 self.0.request.cluster_id = v.into();
3002 self
3003 }
3004
3005 pub fn set_network_policy<T: Into<std::option::Option<crate::model::NetworkPolicy>>>(
3009 mut self,
3010 v: T,
3011 ) -> Self {
3012 self.0.request.network_policy = v.into();
3013 self
3014 }
3015
3016 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3018 self.0.request.name = v.into();
3019 self
3020 }
3021 }
3022
3023 #[doc(hidden)]
3024 impl gax::options::internal::RequestBuilder for SetNetworkPolicy {
3025 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3026 &mut self.0.options
3027 }
3028 }
3029
3030 #[derive(Clone, Debug)]
3047 pub struct SetMaintenancePolicy(RequestBuilder<crate::model::SetMaintenancePolicyRequest>);
3048
3049 impl SetMaintenancePolicy {
3050 pub(crate) fn new(
3051 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3052 ) -> Self {
3053 Self(RequestBuilder::new(stub))
3054 }
3055
3056 pub fn with_request<V: Into<crate::model::SetMaintenancePolicyRequest>>(
3058 mut self,
3059 v: V,
3060 ) -> Self {
3061 self.0.request = v.into();
3062 self
3063 }
3064
3065 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3067 self.0.options = v.into();
3068 self
3069 }
3070
3071 pub async fn send(self) -> Result<crate::model::Operation> {
3073 (*self.0.stub)
3074 .set_maintenance_policy(self.0.request, self.0.options)
3075 .await
3076 .map(gax::response::Response::into_body)
3077 }
3078
3079 pub fn set_project_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3083 self.0.request.project_id = v.into();
3084 self
3085 }
3086
3087 pub fn set_zone<T: Into<std::string::String>>(mut self, v: T) -> Self {
3091 self.0.request.zone = v.into();
3092 self
3093 }
3094
3095 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3099 self.0.request.cluster_id = v.into();
3100 self
3101 }
3102
3103 pub fn set_maintenance_policy<
3107 T: Into<std::option::Option<crate::model::MaintenancePolicy>>,
3108 >(
3109 mut self,
3110 v: T,
3111 ) -> Self {
3112 self.0.request.maintenance_policy = v.into();
3113 self
3114 }
3115
3116 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3118 self.0.request.name = v.into();
3119 self
3120 }
3121 }
3122
3123 #[doc(hidden)]
3124 impl gax::options::internal::RequestBuilder for SetMaintenancePolicy {
3125 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3126 &mut self.0.options
3127 }
3128 }
3129
3130 #[derive(Clone, Debug)]
3151 pub struct ListUsableSubnetworks(RequestBuilder<crate::model::ListUsableSubnetworksRequest>);
3152
3153 impl ListUsableSubnetworks {
3154 pub(crate) fn new(
3155 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3156 ) -> Self {
3157 Self(RequestBuilder::new(stub))
3158 }
3159
3160 pub fn with_request<V: Into<crate::model::ListUsableSubnetworksRequest>>(
3162 mut self,
3163 v: V,
3164 ) -> Self {
3165 self.0.request = v.into();
3166 self
3167 }
3168
3169 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3171 self.0.options = v.into();
3172 self
3173 }
3174
3175 pub async fn send(self) -> Result<crate::model::ListUsableSubnetworksResponse> {
3177 (*self.0.stub)
3178 .list_usable_subnetworks(self.0.request, self.0.options)
3179 .await
3180 .map(gax::response::Response::into_body)
3181 }
3182
3183 pub fn by_page(
3185 self,
3186 ) -> impl gax::paginator::Paginator<crate::model::ListUsableSubnetworksResponse, gax::error::Error>
3187 {
3188 use std::clone::Clone;
3189 let token = self.0.request.page_token.clone();
3190 let execute = move |token: String| {
3191 let mut builder = self.clone();
3192 builder.0.request = builder.0.request.set_page_token(token);
3193 builder.send()
3194 };
3195 gax::paginator::internal::new_paginator(token, execute)
3196 }
3197
3198 pub fn by_item(
3200 self,
3201 ) -> impl gax::paginator::ItemPaginator<
3202 crate::model::ListUsableSubnetworksResponse,
3203 gax::error::Error,
3204 > {
3205 use gax::paginator::Paginator;
3206 self.by_page().items()
3207 }
3208
3209 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3211 self.0.request.parent = v.into();
3212 self
3213 }
3214
3215 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3217 self.0.request.filter = v.into();
3218 self
3219 }
3220
3221 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3223 self.0.request.page_size = v.into();
3224 self
3225 }
3226
3227 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3229 self.0.request.page_token = v.into();
3230 self
3231 }
3232 }
3233
3234 #[doc(hidden)]
3235 impl gax::options::internal::RequestBuilder for ListUsableSubnetworks {
3236 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3237 &mut self.0.options
3238 }
3239 }
3240
3241 #[derive(Clone, Debug)]
3258 pub struct CheckAutopilotCompatibility(
3259 RequestBuilder<crate::model::CheckAutopilotCompatibilityRequest>,
3260 );
3261
3262 impl CheckAutopilotCompatibility {
3263 pub(crate) fn new(
3264 stub: std::sync::Arc<dyn super::super::stub::dynamic::ClusterManager>,
3265 ) -> Self {
3266 Self(RequestBuilder::new(stub))
3267 }
3268
3269 pub fn with_request<V: Into<crate::model::CheckAutopilotCompatibilityRequest>>(
3271 mut self,
3272 v: V,
3273 ) -> Self {
3274 self.0.request = v.into();
3275 self
3276 }
3277
3278 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3280 self.0.options = v.into();
3281 self
3282 }
3283
3284 pub async fn send(self) -> Result<crate::model::CheckAutopilotCompatibilityResponse> {
3286 (*self.0.stub)
3287 .check_autopilot_compatibility(self.0.request, self.0.options)
3288 .await
3289 .map(gax::response::Response::into_body)
3290 }
3291
3292 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3294 self.0.request.name = v.into();
3295 self
3296 }
3297 }
3298
3299 #[doc(hidden)]
3300 impl gax::options::internal::RequestBuilder for CheckAutopilotCompatibility {
3301 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3302 &mut self.0.options
3303 }
3304 }
3305}