1#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gax;
23extern crate gaxi;
24extern crate iam_v1;
25extern crate lazy_static;
26extern crate location;
27extern crate longrunning;
28extern crate lro;
29extern crate reqwest;
30extern crate serde;
31extern crate serde_json;
32extern crate serde_with;
33extern crate std;
34extern crate tracing;
35extern crate wkt;
36
37#[serde_with::serde_as]
42#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
43#[serde(default, rename_all = "camelCase")]
44#[non_exhaustive]
45pub struct ListPrivateCloudsRequest {
46 #[serde(skip_serializing_if = "std::string::String::is_empty")]
52 pub parent: std::string::String,
53
54 pub page_size: i32,
59
60 #[serde(skip_serializing_if = "std::string::String::is_empty")]
66 pub page_token: std::string::String,
67
68 #[serde(skip_serializing_if = "std::string::String::is_empty")]
98 pub filter: std::string::String,
99
100 #[serde(skip_serializing_if = "std::string::String::is_empty")]
105 pub order_by: std::string::String,
106
107 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
108 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
109}
110
111impl ListPrivateCloudsRequest {
112 pub fn new() -> Self {
113 std::default::Default::default()
114 }
115
116 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
118 self.parent = v.into();
119 self
120 }
121
122 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
124 self.page_size = v.into();
125 self
126 }
127
128 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
130 self.page_token = v.into();
131 self
132 }
133
134 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
136 self.filter = v.into();
137 self
138 }
139
140 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
142 self.order_by = v.into();
143 self
144 }
145}
146
147impl wkt::message::Message for ListPrivateCloudsRequest {
148 fn typename() -> &'static str {
149 "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateCloudsRequest"
150 }
151}
152
153#[serde_with::serde_as]
158#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
159#[serde(default, rename_all = "camelCase")]
160#[non_exhaustive]
161pub struct ListPrivateCloudsResponse {
162 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
164 pub private_clouds: std::vec::Vec<crate::model::PrivateCloud>,
165
166 #[serde(skip_serializing_if = "std::string::String::is_empty")]
169 pub next_page_token: std::string::String,
170
171 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
174 pub unreachable: std::vec::Vec<std::string::String>,
175
176 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
177 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
178}
179
180impl ListPrivateCloudsResponse {
181 pub fn new() -> Self {
182 std::default::Default::default()
183 }
184
185 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
187 self.next_page_token = v.into();
188 self
189 }
190
191 pub fn set_private_clouds<T, V>(mut self, v: T) -> Self
193 where
194 T: std::iter::IntoIterator<Item = V>,
195 V: std::convert::Into<crate::model::PrivateCloud>,
196 {
197 use std::iter::Iterator;
198 self.private_clouds = v.into_iter().map(|i| i.into()).collect();
199 self
200 }
201
202 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
204 where
205 T: std::iter::IntoIterator<Item = V>,
206 V: std::convert::Into<std::string::String>,
207 {
208 use std::iter::Iterator;
209 self.unreachable = v.into_iter().map(|i| i.into()).collect();
210 self
211 }
212}
213
214impl wkt::message::Message for ListPrivateCloudsResponse {
215 fn typename() -> &'static str {
216 "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateCloudsResponse"
217 }
218}
219
220#[doc(hidden)]
221impl gax::paginator::internal::PageableResponse for ListPrivateCloudsResponse {
222 type PageItem = crate::model::PrivateCloud;
223
224 fn items(self) -> std::vec::Vec<Self::PageItem> {
225 self.private_clouds
226 }
227
228 fn next_page_token(&self) -> std::string::String {
229 use std::clone::Clone;
230 self.next_page_token.clone()
231 }
232}
233
234#[serde_with::serde_as]
239#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
240#[serde(default, rename_all = "camelCase")]
241#[non_exhaustive]
242pub struct GetPrivateCloudRequest {
243 #[serde(skip_serializing_if = "std::string::String::is_empty")]
249 pub name: std::string::String,
250
251 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
252 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
253}
254
255impl GetPrivateCloudRequest {
256 pub fn new() -> Self {
257 std::default::Default::default()
258 }
259
260 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
262 self.name = v.into();
263 self
264 }
265}
266
267impl wkt::message::Message for GetPrivateCloudRequest {
268 fn typename() -> &'static str {
269 "type.googleapis.com/google.cloud.vmwareengine.v1.GetPrivateCloudRequest"
270 }
271}
272
273#[serde_with::serde_as]
278#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
279#[serde(default, rename_all = "camelCase")]
280#[non_exhaustive]
281pub struct CreatePrivateCloudRequest {
282 #[serde(skip_serializing_if = "std::string::String::is_empty")]
288 pub parent: std::string::String,
289
290 #[serde(skip_serializing_if = "std::string::String::is_empty")]
302 pub private_cloud_id: std::string::String,
303
304 #[serde(skip_serializing_if = "std::option::Option::is_none")]
306 pub private_cloud: std::option::Option<crate::model::PrivateCloud>,
307
308 #[serde(skip_serializing_if = "std::string::String::is_empty")]
311 pub request_id: std::string::String,
312
313 pub validate_only: bool,
316
317 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
318 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
319}
320
321impl CreatePrivateCloudRequest {
322 pub fn new() -> Self {
323 std::default::Default::default()
324 }
325
326 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
328 self.parent = v.into();
329 self
330 }
331
332 pub fn set_private_cloud_id<T: std::convert::Into<std::string::String>>(
334 mut self,
335 v: T,
336 ) -> Self {
337 self.private_cloud_id = v.into();
338 self
339 }
340
341 pub fn set_private_cloud<
343 T: std::convert::Into<std::option::Option<crate::model::PrivateCloud>>,
344 >(
345 mut self,
346 v: T,
347 ) -> Self {
348 self.private_cloud = v.into();
349 self
350 }
351
352 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
354 self.request_id = v.into();
355 self
356 }
357
358 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
360 self.validate_only = v.into();
361 self
362 }
363}
364
365impl wkt::message::Message for CreatePrivateCloudRequest {
366 fn typename() -> &'static str {
367 "type.googleapis.com/google.cloud.vmwareengine.v1.CreatePrivateCloudRequest"
368 }
369}
370
371#[serde_with::serde_as]
376#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
377#[serde(default, rename_all = "camelCase")]
378#[non_exhaustive]
379pub struct UpdatePrivateCloudRequest {
380 #[serde(skip_serializing_if = "std::option::Option::is_none")]
382 pub private_cloud: std::option::Option<crate::model::PrivateCloud>,
383
384 #[serde(skip_serializing_if = "std::option::Option::is_none")]
390 pub update_mask: std::option::Option<wkt::FieldMask>,
391
392 #[serde(skip_serializing_if = "std::string::String::is_empty")]
395 pub request_id: std::string::String,
396
397 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
398 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
399}
400
401impl UpdatePrivateCloudRequest {
402 pub fn new() -> Self {
403 std::default::Default::default()
404 }
405
406 pub fn set_private_cloud<
408 T: std::convert::Into<std::option::Option<crate::model::PrivateCloud>>,
409 >(
410 mut self,
411 v: T,
412 ) -> Self {
413 self.private_cloud = v.into();
414 self
415 }
416
417 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
419 mut self,
420 v: T,
421 ) -> Self {
422 self.update_mask = v.into();
423 self
424 }
425
426 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
428 self.request_id = v.into();
429 self
430 }
431}
432
433impl wkt::message::Message for UpdatePrivateCloudRequest {
434 fn typename() -> &'static str {
435 "type.googleapis.com/google.cloud.vmwareengine.v1.UpdatePrivateCloudRequest"
436 }
437}
438
439#[serde_with::serde_as]
444#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
445#[serde(default, rename_all = "camelCase")]
446#[non_exhaustive]
447pub struct DeletePrivateCloudRequest {
448 #[serde(skip_serializing_if = "std::string::String::is_empty")]
454 pub name: std::string::String,
455
456 #[serde(skip_serializing_if = "std::string::String::is_empty")]
459 pub request_id: std::string::String,
460
461 pub force: bool,
467
468 #[serde(skip_serializing_if = "std::option::Option::is_none")]
479 pub delay_hours: std::option::Option<i32>,
480
481 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
482 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
483}
484
485impl DeletePrivateCloudRequest {
486 pub fn new() -> Self {
487 std::default::Default::default()
488 }
489
490 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
492 self.name = v.into();
493 self
494 }
495
496 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
498 self.request_id = v.into();
499 self
500 }
501
502 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
504 self.force = v.into();
505 self
506 }
507
508 pub fn set_delay_hours<T: std::convert::Into<std::option::Option<i32>>>(
510 mut self,
511 v: T,
512 ) -> Self {
513 self.delay_hours = v.into();
514 self
515 }
516}
517
518impl wkt::message::Message for DeletePrivateCloudRequest {
519 fn typename() -> &'static str {
520 "type.googleapis.com/google.cloud.vmwareengine.v1.DeletePrivateCloudRequest"
521 }
522}
523
524#[serde_with::serde_as]
529#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
530#[serde(default, rename_all = "camelCase")]
531#[non_exhaustive]
532pub struct UndeletePrivateCloudRequest {
533 #[serde(skip_serializing_if = "std::string::String::is_empty")]
539 pub name: std::string::String,
540
541 #[serde(skip_serializing_if = "std::string::String::is_empty")]
544 pub request_id: std::string::String,
545
546 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
547 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
548}
549
550impl UndeletePrivateCloudRequest {
551 pub fn new() -> Self {
552 std::default::Default::default()
553 }
554
555 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
557 self.name = v.into();
558 self
559 }
560
561 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
563 self.request_id = v.into();
564 self
565 }
566}
567
568impl wkt::message::Message for UndeletePrivateCloudRequest {
569 fn typename() -> &'static str {
570 "type.googleapis.com/google.cloud.vmwareengine.v1.UndeletePrivateCloudRequest"
571 }
572}
573
574#[serde_with::serde_as]
579#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
580#[serde(default, rename_all = "camelCase")]
581#[non_exhaustive]
582pub struct ListClustersRequest {
583 #[serde(skip_serializing_if = "std::string::String::is_empty")]
589 pub parent: std::string::String,
590
591 pub page_size: i32,
596
597 #[serde(skip_serializing_if = "std::string::String::is_empty")]
603 pub page_token: std::string::String,
604
605 #[serde(skip_serializing_if = "std::string::String::is_empty")]
622 pub filter: std::string::String,
623
624 #[serde(skip_serializing_if = "std::string::String::is_empty")]
629 pub order_by: std::string::String,
630
631 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
632 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
633}
634
635impl ListClustersRequest {
636 pub fn new() -> Self {
637 std::default::Default::default()
638 }
639
640 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
642 self.parent = v.into();
643 self
644 }
645
646 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
648 self.page_size = v.into();
649 self
650 }
651
652 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
654 self.page_token = v.into();
655 self
656 }
657
658 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
660 self.filter = v.into();
661 self
662 }
663
664 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
666 self.order_by = v.into();
667 self
668 }
669}
670
671impl wkt::message::Message for ListClustersRequest {
672 fn typename() -> &'static str {
673 "type.googleapis.com/google.cloud.vmwareengine.v1.ListClustersRequest"
674 }
675}
676
677#[serde_with::serde_as]
682#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
683#[serde(default, rename_all = "camelCase")]
684#[non_exhaustive]
685pub struct ListClustersResponse {
686 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
688 pub clusters: std::vec::Vec<crate::model::Cluster>,
689
690 #[serde(skip_serializing_if = "std::string::String::is_empty")]
693 pub next_page_token: std::string::String,
694
695 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
698 pub unreachable: std::vec::Vec<std::string::String>,
699
700 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
701 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
702}
703
704impl ListClustersResponse {
705 pub fn new() -> Self {
706 std::default::Default::default()
707 }
708
709 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
711 self.next_page_token = v.into();
712 self
713 }
714
715 pub fn set_clusters<T, V>(mut self, v: T) -> Self
717 where
718 T: std::iter::IntoIterator<Item = V>,
719 V: std::convert::Into<crate::model::Cluster>,
720 {
721 use std::iter::Iterator;
722 self.clusters = v.into_iter().map(|i| i.into()).collect();
723 self
724 }
725
726 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
728 where
729 T: std::iter::IntoIterator<Item = V>,
730 V: std::convert::Into<std::string::String>,
731 {
732 use std::iter::Iterator;
733 self.unreachable = v.into_iter().map(|i| i.into()).collect();
734 self
735 }
736}
737
738impl wkt::message::Message for ListClustersResponse {
739 fn typename() -> &'static str {
740 "type.googleapis.com/google.cloud.vmwareengine.v1.ListClustersResponse"
741 }
742}
743
744#[doc(hidden)]
745impl gax::paginator::internal::PageableResponse for ListClustersResponse {
746 type PageItem = crate::model::Cluster;
747
748 fn items(self) -> std::vec::Vec<Self::PageItem> {
749 self.clusters
750 }
751
752 fn next_page_token(&self) -> std::string::String {
753 use std::clone::Clone;
754 self.next_page_token.clone()
755 }
756}
757
758#[serde_with::serde_as]
763#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
764#[serde(default, rename_all = "camelCase")]
765#[non_exhaustive]
766pub struct GetClusterRequest {
767 #[serde(skip_serializing_if = "std::string::String::is_empty")]
773 pub name: std::string::String,
774
775 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
776 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
777}
778
779impl GetClusterRequest {
780 pub fn new() -> Self {
781 std::default::Default::default()
782 }
783
784 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
786 self.name = v.into();
787 self
788 }
789}
790
791impl wkt::message::Message for GetClusterRequest {
792 fn typename() -> &'static str {
793 "type.googleapis.com/google.cloud.vmwareengine.v1.GetClusterRequest"
794 }
795}
796
797#[serde_with::serde_as]
802#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
803#[serde(default, rename_all = "camelCase")]
804#[non_exhaustive]
805pub struct CreateClusterRequest {
806 #[serde(skip_serializing_if = "std::string::String::is_empty")]
812 pub parent: std::string::String,
813
814 #[serde(skip_serializing_if = "std::string::String::is_empty")]
826 pub cluster_id: std::string::String,
827
828 #[serde(skip_serializing_if = "std::option::Option::is_none")]
830 pub cluster: std::option::Option<crate::model::Cluster>,
831
832 #[serde(skip_serializing_if = "std::string::String::is_empty")]
835 pub request_id: std::string::String,
836
837 pub validate_only: bool,
840
841 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
842 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
843}
844
845impl CreateClusterRequest {
846 pub fn new() -> Self {
847 std::default::Default::default()
848 }
849
850 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
852 self.parent = v.into();
853 self
854 }
855
856 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
858 self.cluster_id = v.into();
859 self
860 }
861
862 pub fn set_cluster<T: std::convert::Into<std::option::Option<crate::model::Cluster>>>(
864 mut self,
865 v: T,
866 ) -> Self {
867 self.cluster = v.into();
868 self
869 }
870
871 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
873 self.request_id = v.into();
874 self
875 }
876
877 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
879 self.validate_only = v.into();
880 self
881 }
882}
883
884impl wkt::message::Message for CreateClusterRequest {
885 fn typename() -> &'static str {
886 "type.googleapis.com/google.cloud.vmwareengine.v1.CreateClusterRequest"
887 }
888}
889
890#[serde_with::serde_as]
895#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
896#[serde(default, rename_all = "camelCase")]
897#[non_exhaustive]
898pub struct UpdateClusterRequest {
899 #[serde(skip_serializing_if = "std::option::Option::is_none")]
905 pub update_mask: std::option::Option<wkt::FieldMask>,
906
907 #[serde(skip_serializing_if = "std::option::Option::is_none")]
909 pub cluster: std::option::Option<crate::model::Cluster>,
910
911 #[serde(skip_serializing_if = "std::string::String::is_empty")]
914 pub request_id: std::string::String,
915
916 pub validate_only: bool,
919
920 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
921 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
922}
923
924impl UpdateClusterRequest {
925 pub fn new() -> Self {
926 std::default::Default::default()
927 }
928
929 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
931 mut self,
932 v: T,
933 ) -> Self {
934 self.update_mask = v.into();
935 self
936 }
937
938 pub fn set_cluster<T: std::convert::Into<std::option::Option<crate::model::Cluster>>>(
940 mut self,
941 v: T,
942 ) -> Self {
943 self.cluster = v.into();
944 self
945 }
946
947 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
949 self.request_id = v.into();
950 self
951 }
952
953 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
955 self.validate_only = v.into();
956 self
957 }
958}
959
960impl wkt::message::Message for UpdateClusterRequest {
961 fn typename() -> &'static str {
962 "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateClusterRequest"
963 }
964}
965
966#[serde_with::serde_as]
971#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
972#[serde(default, rename_all = "camelCase")]
973#[non_exhaustive]
974pub struct DeleteClusterRequest {
975 #[serde(skip_serializing_if = "std::string::String::is_empty")]
981 pub name: std::string::String,
982
983 #[serde(skip_serializing_if = "std::string::String::is_empty")]
986 pub request_id: std::string::String,
987
988 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
989 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
990}
991
992impl DeleteClusterRequest {
993 pub fn new() -> Self {
994 std::default::Default::default()
995 }
996
997 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
999 self.name = v.into();
1000 self
1001 }
1002
1003 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1005 self.request_id = v.into();
1006 self
1007 }
1008}
1009
1010impl wkt::message::Message for DeleteClusterRequest {
1011 fn typename() -> &'static str {
1012 "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteClusterRequest"
1013 }
1014}
1015
1016#[serde_with::serde_as]
1021#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1022#[serde(default, rename_all = "camelCase")]
1023#[non_exhaustive]
1024pub struct ListNodesRequest {
1025 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1031 pub parent: std::string::String,
1032
1033 pub page_size: i32,
1038
1039 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1046 pub page_token: std::string::String,
1047
1048 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1049 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1050}
1051
1052impl ListNodesRequest {
1053 pub fn new() -> Self {
1054 std::default::Default::default()
1055 }
1056
1057 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1059 self.parent = v.into();
1060 self
1061 }
1062
1063 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1065 self.page_size = v.into();
1066 self
1067 }
1068
1069 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1071 self.page_token = v.into();
1072 self
1073 }
1074}
1075
1076impl wkt::message::Message for ListNodesRequest {
1077 fn typename() -> &'static str {
1078 "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodesRequest"
1079 }
1080}
1081
1082#[serde_with::serde_as]
1087#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1088#[serde(default, rename_all = "camelCase")]
1089#[non_exhaustive]
1090pub struct ListNodesResponse {
1091 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1093 pub nodes: std::vec::Vec<crate::model::Node>,
1094
1095 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1098 pub next_page_token: std::string::String,
1099
1100 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1101 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1102}
1103
1104impl ListNodesResponse {
1105 pub fn new() -> Self {
1106 std::default::Default::default()
1107 }
1108
1109 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1111 self.next_page_token = v.into();
1112 self
1113 }
1114
1115 pub fn set_nodes<T, V>(mut self, v: T) -> Self
1117 where
1118 T: std::iter::IntoIterator<Item = V>,
1119 V: std::convert::Into<crate::model::Node>,
1120 {
1121 use std::iter::Iterator;
1122 self.nodes = v.into_iter().map(|i| i.into()).collect();
1123 self
1124 }
1125}
1126
1127impl wkt::message::Message for ListNodesResponse {
1128 fn typename() -> &'static str {
1129 "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodesResponse"
1130 }
1131}
1132
1133#[doc(hidden)]
1134impl gax::paginator::internal::PageableResponse for ListNodesResponse {
1135 type PageItem = crate::model::Node;
1136
1137 fn items(self) -> std::vec::Vec<Self::PageItem> {
1138 self.nodes
1139 }
1140
1141 fn next_page_token(&self) -> std::string::String {
1142 use std::clone::Clone;
1143 self.next_page_token.clone()
1144 }
1145}
1146
1147#[serde_with::serde_as]
1152#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1153#[serde(default, rename_all = "camelCase")]
1154#[non_exhaustive]
1155pub struct GetNodeRequest {
1156 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1160 pub name: std::string::String,
1161
1162 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1163 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1164}
1165
1166impl GetNodeRequest {
1167 pub fn new() -> Self {
1168 std::default::Default::default()
1169 }
1170
1171 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1173 self.name = v.into();
1174 self
1175 }
1176}
1177
1178impl wkt::message::Message for GetNodeRequest {
1179 fn typename() -> &'static str {
1180 "type.googleapis.com/google.cloud.vmwareengine.v1.GetNodeRequest"
1181 }
1182}
1183
1184#[serde_with::serde_as]
1189#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1190#[serde(default, rename_all = "camelCase")]
1191#[non_exhaustive]
1192pub struct ListExternalAddressesRequest {
1193 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1200 pub parent: std::string::String,
1201
1202 pub page_size: i32,
1207
1208 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1214 pub page_token: std::string::String,
1215
1216 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1244 pub filter: std::string::String,
1245
1246 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1252 pub order_by: std::string::String,
1253
1254 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1255 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1256}
1257
1258impl ListExternalAddressesRequest {
1259 pub fn new() -> Self {
1260 std::default::Default::default()
1261 }
1262
1263 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1265 self.parent = v.into();
1266 self
1267 }
1268
1269 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1271 self.page_size = v.into();
1272 self
1273 }
1274
1275 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1277 self.page_token = v.into();
1278 self
1279 }
1280
1281 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1283 self.filter = v.into();
1284 self
1285 }
1286
1287 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1289 self.order_by = v.into();
1290 self
1291 }
1292}
1293
1294impl wkt::message::Message for ListExternalAddressesRequest {
1295 fn typename() -> &'static str {
1296 "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAddressesRequest"
1297 }
1298}
1299
1300#[serde_with::serde_as]
1305#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1306#[serde(default, rename_all = "camelCase")]
1307#[non_exhaustive]
1308pub struct ListExternalAddressesResponse {
1309 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1311 pub external_addresses: std::vec::Vec<crate::model::ExternalAddress>,
1312
1313 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1316 pub next_page_token: std::string::String,
1317
1318 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1321 pub unreachable: std::vec::Vec<std::string::String>,
1322
1323 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1324 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1325}
1326
1327impl ListExternalAddressesResponse {
1328 pub fn new() -> Self {
1329 std::default::Default::default()
1330 }
1331
1332 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1334 self.next_page_token = v.into();
1335 self
1336 }
1337
1338 pub fn set_external_addresses<T, V>(mut self, v: T) -> Self
1340 where
1341 T: std::iter::IntoIterator<Item = V>,
1342 V: std::convert::Into<crate::model::ExternalAddress>,
1343 {
1344 use std::iter::Iterator;
1345 self.external_addresses = v.into_iter().map(|i| i.into()).collect();
1346 self
1347 }
1348
1349 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1351 where
1352 T: std::iter::IntoIterator<Item = V>,
1353 V: std::convert::Into<std::string::String>,
1354 {
1355 use std::iter::Iterator;
1356 self.unreachable = v.into_iter().map(|i| i.into()).collect();
1357 self
1358 }
1359}
1360
1361impl wkt::message::Message for ListExternalAddressesResponse {
1362 fn typename() -> &'static str {
1363 "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAddressesResponse"
1364 }
1365}
1366
1367#[doc(hidden)]
1368impl gax::paginator::internal::PageableResponse for ListExternalAddressesResponse {
1369 type PageItem = crate::model::ExternalAddress;
1370
1371 fn items(self) -> std::vec::Vec<Self::PageItem> {
1372 self.external_addresses
1373 }
1374
1375 fn next_page_token(&self) -> std::string::String {
1376 use std::clone::Clone;
1377 self.next_page_token.clone()
1378 }
1379}
1380
1381#[serde_with::serde_as]
1386#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1387#[serde(default, rename_all = "camelCase")]
1388#[non_exhaustive]
1389pub struct FetchNetworkPolicyExternalAddressesRequest {
1390 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1396 pub network_policy: std::string::String,
1397
1398 pub page_size: i32,
1403
1404 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1412 pub page_token: std::string::String,
1413
1414 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1415 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1416}
1417
1418impl FetchNetworkPolicyExternalAddressesRequest {
1419 pub fn new() -> Self {
1420 std::default::Default::default()
1421 }
1422
1423 pub fn set_network_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1425 self.network_policy = v.into();
1426 self
1427 }
1428
1429 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1431 self.page_size = v.into();
1432 self
1433 }
1434
1435 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1437 self.page_token = v.into();
1438 self
1439 }
1440}
1441
1442impl wkt::message::Message for FetchNetworkPolicyExternalAddressesRequest {
1443 fn typename() -> &'static str {
1444 "type.googleapis.com/google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesRequest"
1445 }
1446}
1447
1448#[serde_with::serde_as]
1453#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1454#[serde(default, rename_all = "camelCase")]
1455#[non_exhaustive]
1456pub struct FetchNetworkPolicyExternalAddressesResponse {
1457 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1460 pub external_addresses: std::vec::Vec<crate::model::ExternalAddress>,
1461
1462 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1465 pub next_page_token: std::string::String,
1466
1467 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1468 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1469}
1470
1471impl FetchNetworkPolicyExternalAddressesResponse {
1472 pub fn new() -> Self {
1473 std::default::Default::default()
1474 }
1475
1476 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1478 self.next_page_token = v.into();
1479 self
1480 }
1481
1482 pub fn set_external_addresses<T, V>(mut self, v: T) -> Self
1484 where
1485 T: std::iter::IntoIterator<Item = V>,
1486 V: std::convert::Into<crate::model::ExternalAddress>,
1487 {
1488 use std::iter::Iterator;
1489 self.external_addresses = v.into_iter().map(|i| i.into()).collect();
1490 self
1491 }
1492}
1493
1494impl wkt::message::Message for FetchNetworkPolicyExternalAddressesResponse {
1495 fn typename() -> &'static str {
1496 "type.googleapis.com/google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesResponse"
1497 }
1498}
1499
1500#[doc(hidden)]
1501impl gax::paginator::internal::PageableResponse for FetchNetworkPolicyExternalAddressesResponse {
1502 type PageItem = crate::model::ExternalAddress;
1503
1504 fn items(self) -> std::vec::Vec<Self::PageItem> {
1505 self.external_addresses
1506 }
1507
1508 fn next_page_token(&self) -> std::string::String {
1509 use std::clone::Clone;
1510 self.next_page_token.clone()
1511 }
1512}
1513
1514#[serde_with::serde_as]
1519#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1520#[serde(default, rename_all = "camelCase")]
1521#[non_exhaustive]
1522pub struct GetExternalAddressRequest {
1523 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1529 pub name: std::string::String,
1530
1531 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1532 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1533}
1534
1535impl GetExternalAddressRequest {
1536 pub fn new() -> Self {
1537 std::default::Default::default()
1538 }
1539
1540 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1542 self.name = v.into();
1543 self
1544 }
1545}
1546
1547impl wkt::message::Message for GetExternalAddressRequest {
1548 fn typename() -> &'static str {
1549 "type.googleapis.com/google.cloud.vmwareengine.v1.GetExternalAddressRequest"
1550 }
1551}
1552
1553#[serde_with::serde_as]
1558#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1559#[serde(default, rename_all = "camelCase")]
1560#[non_exhaustive]
1561pub struct CreateExternalAddressRequest {
1562 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1569 pub parent: std::string::String,
1570
1571 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1573 pub external_address: std::option::Option<crate::model::ExternalAddress>,
1574
1575 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1587 pub external_address_id: std::string::String,
1588
1589 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1604 pub request_id: std::string::String,
1605
1606 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1607 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1608}
1609
1610impl CreateExternalAddressRequest {
1611 pub fn new() -> Self {
1612 std::default::Default::default()
1613 }
1614
1615 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1617 self.parent = v.into();
1618 self
1619 }
1620
1621 pub fn set_external_address<
1623 T: std::convert::Into<std::option::Option<crate::model::ExternalAddress>>,
1624 >(
1625 mut self,
1626 v: T,
1627 ) -> Self {
1628 self.external_address = v.into();
1629 self
1630 }
1631
1632 pub fn set_external_address_id<T: std::convert::Into<std::string::String>>(
1634 mut self,
1635 v: T,
1636 ) -> Self {
1637 self.external_address_id = v.into();
1638 self
1639 }
1640
1641 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1643 self.request_id = v.into();
1644 self
1645 }
1646}
1647
1648impl wkt::message::Message for CreateExternalAddressRequest {
1649 fn typename() -> &'static str {
1650 "type.googleapis.com/google.cloud.vmwareengine.v1.CreateExternalAddressRequest"
1651 }
1652}
1653
1654#[serde_with::serde_as]
1659#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1660#[serde(default, rename_all = "camelCase")]
1661#[non_exhaustive]
1662pub struct UpdateExternalAddressRequest {
1663 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1669 pub update_mask: std::option::Option<wkt::FieldMask>,
1670
1671 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1673 pub external_address: std::option::Option<crate::model::ExternalAddress>,
1674
1675 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1690 pub request_id: std::string::String,
1691
1692 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1693 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1694}
1695
1696impl UpdateExternalAddressRequest {
1697 pub fn new() -> Self {
1698 std::default::Default::default()
1699 }
1700
1701 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
1703 mut self,
1704 v: T,
1705 ) -> Self {
1706 self.update_mask = v.into();
1707 self
1708 }
1709
1710 pub fn set_external_address<
1712 T: std::convert::Into<std::option::Option<crate::model::ExternalAddress>>,
1713 >(
1714 mut self,
1715 v: T,
1716 ) -> Self {
1717 self.external_address = v.into();
1718 self
1719 }
1720
1721 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1723 self.request_id = v.into();
1724 self
1725 }
1726}
1727
1728impl wkt::message::Message for UpdateExternalAddressRequest {
1729 fn typename() -> &'static str {
1730 "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateExternalAddressRequest"
1731 }
1732}
1733
1734#[serde_with::serde_as]
1739#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1740#[serde(default, rename_all = "camelCase")]
1741#[non_exhaustive]
1742pub struct DeleteExternalAddressRequest {
1743 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1749 pub name: std::string::String,
1750
1751 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1766 pub request_id: std::string::String,
1767
1768 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1769 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1770}
1771
1772impl DeleteExternalAddressRequest {
1773 pub fn new() -> Self {
1774 std::default::Default::default()
1775 }
1776
1777 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1779 self.name = v.into();
1780 self
1781 }
1782
1783 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1785 self.request_id = v.into();
1786 self
1787 }
1788}
1789
1790impl wkt::message::Message for DeleteExternalAddressRequest {
1791 fn typename() -> &'static str {
1792 "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteExternalAddressRequest"
1793 }
1794}
1795
1796#[serde_with::serde_as]
1801#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1802#[serde(default, rename_all = "camelCase")]
1803#[non_exhaustive]
1804pub struct ListSubnetsRequest {
1805 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1812 pub parent: std::string::String,
1813
1814 pub page_size: i32,
1819
1820 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1826 pub page_token: std::string::String,
1827
1828 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1829 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1830}
1831
1832impl ListSubnetsRequest {
1833 pub fn new() -> Self {
1834 std::default::Default::default()
1835 }
1836
1837 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1839 self.parent = v.into();
1840 self
1841 }
1842
1843 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1845 self.page_size = v.into();
1846 self
1847 }
1848
1849 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1851 self.page_token = v.into();
1852 self
1853 }
1854}
1855
1856impl wkt::message::Message for ListSubnetsRequest {
1857 fn typename() -> &'static str {
1858 "type.googleapis.com/google.cloud.vmwareengine.v1.ListSubnetsRequest"
1859 }
1860}
1861
1862#[serde_with::serde_as]
1867#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1868#[serde(default, rename_all = "camelCase")]
1869#[non_exhaustive]
1870pub struct ListSubnetsResponse {
1871 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1873 pub subnets: std::vec::Vec<crate::model::Subnet>,
1874
1875 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1878 pub next_page_token: std::string::String,
1879
1880 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1883 pub unreachable: std::vec::Vec<std::string::String>,
1884
1885 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1886 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1887}
1888
1889impl ListSubnetsResponse {
1890 pub fn new() -> Self {
1891 std::default::Default::default()
1892 }
1893
1894 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1896 self.next_page_token = v.into();
1897 self
1898 }
1899
1900 pub fn set_subnets<T, V>(mut self, v: T) -> Self
1902 where
1903 T: std::iter::IntoIterator<Item = V>,
1904 V: std::convert::Into<crate::model::Subnet>,
1905 {
1906 use std::iter::Iterator;
1907 self.subnets = v.into_iter().map(|i| i.into()).collect();
1908 self
1909 }
1910
1911 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1913 where
1914 T: std::iter::IntoIterator<Item = V>,
1915 V: std::convert::Into<std::string::String>,
1916 {
1917 use std::iter::Iterator;
1918 self.unreachable = v.into_iter().map(|i| i.into()).collect();
1919 self
1920 }
1921}
1922
1923impl wkt::message::Message for ListSubnetsResponse {
1924 fn typename() -> &'static str {
1925 "type.googleapis.com/google.cloud.vmwareengine.v1.ListSubnetsResponse"
1926 }
1927}
1928
1929#[doc(hidden)]
1930impl gax::paginator::internal::PageableResponse for ListSubnetsResponse {
1931 type PageItem = crate::model::Subnet;
1932
1933 fn items(self) -> std::vec::Vec<Self::PageItem> {
1934 self.subnets
1935 }
1936
1937 fn next_page_token(&self) -> std::string::String {
1938 use std::clone::Clone;
1939 self.next_page_token.clone()
1940 }
1941}
1942
1943#[serde_with::serde_as]
1948#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1949#[serde(default, rename_all = "camelCase")]
1950#[non_exhaustive]
1951pub struct GetSubnetRequest {
1952 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1958 pub name: std::string::String,
1959
1960 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1961 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1962}
1963
1964impl GetSubnetRequest {
1965 pub fn new() -> Self {
1966 std::default::Default::default()
1967 }
1968
1969 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1971 self.name = v.into();
1972 self
1973 }
1974}
1975
1976impl wkt::message::Message for GetSubnetRequest {
1977 fn typename() -> &'static str {
1978 "type.googleapis.com/google.cloud.vmwareengine.v1.GetSubnetRequest"
1979 }
1980}
1981
1982#[serde_with::serde_as]
1987#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1988#[serde(default, rename_all = "camelCase")]
1989#[non_exhaustive]
1990pub struct UpdateSubnetRequest {
1991 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1997 pub update_mask: std::option::Option<wkt::FieldMask>,
1998
1999 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2001 pub subnet: std::option::Option<crate::model::Subnet>,
2002
2003 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2004 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2005}
2006
2007impl UpdateSubnetRequest {
2008 pub fn new() -> Self {
2009 std::default::Default::default()
2010 }
2011
2012 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
2014 mut self,
2015 v: T,
2016 ) -> Self {
2017 self.update_mask = v.into();
2018 self
2019 }
2020
2021 pub fn set_subnet<T: std::convert::Into<std::option::Option<crate::model::Subnet>>>(
2023 mut self,
2024 v: T,
2025 ) -> Self {
2026 self.subnet = v.into();
2027 self
2028 }
2029}
2030
2031impl wkt::message::Message for UpdateSubnetRequest {
2032 fn typename() -> &'static str {
2033 "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateSubnetRequest"
2034 }
2035}
2036
2037#[serde_with::serde_as]
2042#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2043#[serde(default, rename_all = "camelCase")]
2044#[non_exhaustive]
2045pub struct ListExternalAccessRulesRequest {
2046 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2052 pub parent: std::string::String,
2053
2054 pub page_size: i32,
2059
2060 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2067 pub page_token: std::string::String,
2068
2069 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2097 pub filter: std::string::String,
2098
2099 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2105 pub order_by: std::string::String,
2106
2107 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2108 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2109}
2110
2111impl ListExternalAccessRulesRequest {
2112 pub fn new() -> Self {
2113 std::default::Default::default()
2114 }
2115
2116 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2118 self.parent = v.into();
2119 self
2120 }
2121
2122 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2124 self.page_size = v.into();
2125 self
2126 }
2127
2128 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2130 self.page_token = v.into();
2131 self
2132 }
2133
2134 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2136 self.filter = v.into();
2137 self
2138 }
2139
2140 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2142 self.order_by = v.into();
2143 self
2144 }
2145}
2146
2147impl wkt::message::Message for ListExternalAccessRulesRequest {
2148 fn typename() -> &'static str {
2149 "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAccessRulesRequest"
2150 }
2151}
2152
2153#[serde_with::serde_as]
2158#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2159#[serde(default, rename_all = "camelCase")]
2160#[non_exhaustive]
2161pub struct ListExternalAccessRulesResponse {
2162 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2164 pub external_access_rules: std::vec::Vec<crate::model::ExternalAccessRule>,
2165
2166 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2169 pub next_page_token: std::string::String,
2170
2171 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2174 pub unreachable: std::vec::Vec<std::string::String>,
2175
2176 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2177 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2178}
2179
2180impl ListExternalAccessRulesResponse {
2181 pub fn new() -> Self {
2182 std::default::Default::default()
2183 }
2184
2185 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2187 self.next_page_token = v.into();
2188 self
2189 }
2190
2191 pub fn set_external_access_rules<T, V>(mut self, v: T) -> Self
2193 where
2194 T: std::iter::IntoIterator<Item = V>,
2195 V: std::convert::Into<crate::model::ExternalAccessRule>,
2196 {
2197 use std::iter::Iterator;
2198 self.external_access_rules = v.into_iter().map(|i| i.into()).collect();
2199 self
2200 }
2201
2202 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2204 where
2205 T: std::iter::IntoIterator<Item = V>,
2206 V: std::convert::Into<std::string::String>,
2207 {
2208 use std::iter::Iterator;
2209 self.unreachable = v.into_iter().map(|i| i.into()).collect();
2210 self
2211 }
2212}
2213
2214impl wkt::message::Message for ListExternalAccessRulesResponse {
2215 fn typename() -> &'static str {
2216 "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAccessRulesResponse"
2217 }
2218}
2219
2220#[doc(hidden)]
2221impl gax::paginator::internal::PageableResponse for ListExternalAccessRulesResponse {
2222 type PageItem = crate::model::ExternalAccessRule;
2223
2224 fn items(self) -> std::vec::Vec<Self::PageItem> {
2225 self.external_access_rules
2226 }
2227
2228 fn next_page_token(&self) -> std::string::String {
2229 use std::clone::Clone;
2230 self.next_page_token.clone()
2231 }
2232}
2233
2234#[serde_with::serde_as]
2239#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2240#[serde(default, rename_all = "camelCase")]
2241#[non_exhaustive]
2242pub struct GetExternalAccessRuleRequest {
2243 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2249 pub name: std::string::String,
2250
2251 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2252 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2253}
2254
2255impl GetExternalAccessRuleRequest {
2256 pub fn new() -> Self {
2257 std::default::Default::default()
2258 }
2259
2260 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2262 self.name = v.into();
2263 self
2264 }
2265}
2266
2267impl wkt::message::Message for GetExternalAccessRuleRequest {
2268 fn typename() -> &'static str {
2269 "type.googleapis.com/google.cloud.vmwareengine.v1.GetExternalAccessRuleRequest"
2270 }
2271}
2272
2273#[serde_with::serde_as]
2278#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2279#[serde(default, rename_all = "camelCase")]
2280#[non_exhaustive]
2281pub struct CreateExternalAccessRuleRequest {
2282 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2289 pub parent: std::string::String,
2290
2291 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2293 pub external_access_rule: std::option::Option<crate::model::ExternalAccessRule>,
2294
2295 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2307 pub external_access_rule_id: std::string::String,
2308
2309 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2324 pub request_id: std::string::String,
2325
2326 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2327 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2328}
2329
2330impl CreateExternalAccessRuleRequest {
2331 pub fn new() -> Self {
2332 std::default::Default::default()
2333 }
2334
2335 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2337 self.parent = v.into();
2338 self
2339 }
2340
2341 pub fn set_external_access_rule<
2343 T: std::convert::Into<std::option::Option<crate::model::ExternalAccessRule>>,
2344 >(
2345 mut self,
2346 v: T,
2347 ) -> Self {
2348 self.external_access_rule = v.into();
2349 self
2350 }
2351
2352 pub fn set_external_access_rule_id<T: std::convert::Into<std::string::String>>(
2354 mut self,
2355 v: T,
2356 ) -> Self {
2357 self.external_access_rule_id = v.into();
2358 self
2359 }
2360
2361 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2363 self.request_id = v.into();
2364 self
2365 }
2366}
2367
2368impl wkt::message::Message for CreateExternalAccessRuleRequest {
2369 fn typename() -> &'static str {
2370 "type.googleapis.com/google.cloud.vmwareengine.v1.CreateExternalAccessRuleRequest"
2371 }
2372}
2373
2374#[serde_with::serde_as]
2379#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2380#[serde(default, rename_all = "camelCase")]
2381#[non_exhaustive]
2382pub struct UpdateExternalAccessRuleRequest {
2383 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2389 pub update_mask: std::option::Option<wkt::FieldMask>,
2390
2391 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2393 pub external_access_rule: std::option::Option<crate::model::ExternalAccessRule>,
2394
2395 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2410 pub request_id: std::string::String,
2411
2412 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2413 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2414}
2415
2416impl UpdateExternalAccessRuleRequest {
2417 pub fn new() -> Self {
2418 std::default::Default::default()
2419 }
2420
2421 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
2423 mut self,
2424 v: T,
2425 ) -> Self {
2426 self.update_mask = v.into();
2427 self
2428 }
2429
2430 pub fn set_external_access_rule<
2432 T: std::convert::Into<std::option::Option<crate::model::ExternalAccessRule>>,
2433 >(
2434 mut self,
2435 v: T,
2436 ) -> Self {
2437 self.external_access_rule = v.into();
2438 self
2439 }
2440
2441 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2443 self.request_id = v.into();
2444 self
2445 }
2446}
2447
2448impl wkt::message::Message for UpdateExternalAccessRuleRequest {
2449 fn typename() -> &'static str {
2450 "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateExternalAccessRuleRequest"
2451 }
2452}
2453
2454#[serde_with::serde_as]
2459#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2460#[serde(default, rename_all = "camelCase")]
2461#[non_exhaustive]
2462pub struct DeleteExternalAccessRuleRequest {
2463 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2469 pub name: std::string::String,
2470
2471 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2486 pub request_id: std::string::String,
2487
2488 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2489 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2490}
2491
2492impl DeleteExternalAccessRuleRequest {
2493 pub fn new() -> Self {
2494 std::default::Default::default()
2495 }
2496
2497 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2499 self.name = v.into();
2500 self
2501 }
2502
2503 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2505 self.request_id = v.into();
2506 self
2507 }
2508}
2509
2510impl wkt::message::Message for DeleteExternalAccessRuleRequest {
2511 fn typename() -> &'static str {
2512 "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteExternalAccessRuleRequest"
2513 }
2514}
2515
2516#[serde_with::serde_as]
2521#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2522#[serde(default, rename_all = "camelCase")]
2523#[non_exhaustive]
2524pub struct ListLoggingServersRequest {
2525 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2532 pub parent: std::string::String,
2533
2534 pub page_size: i32,
2539
2540 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2547 pub page_token: std::string::String,
2548
2549 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2577 pub filter: std::string::String,
2578
2579 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2585 pub order_by: std::string::String,
2586
2587 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2588 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2589}
2590
2591impl ListLoggingServersRequest {
2592 pub fn new() -> Self {
2593 std::default::Default::default()
2594 }
2595
2596 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2598 self.parent = v.into();
2599 self
2600 }
2601
2602 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2604 self.page_size = v.into();
2605 self
2606 }
2607
2608 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2610 self.page_token = v.into();
2611 self
2612 }
2613
2614 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2616 self.filter = v.into();
2617 self
2618 }
2619
2620 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2622 self.order_by = v.into();
2623 self
2624 }
2625}
2626
2627impl wkt::message::Message for ListLoggingServersRequest {
2628 fn typename() -> &'static str {
2629 "type.googleapis.com/google.cloud.vmwareengine.v1.ListLoggingServersRequest"
2630 }
2631}
2632
2633#[serde_with::serde_as]
2638#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2639#[serde(default, rename_all = "camelCase")]
2640#[non_exhaustive]
2641pub struct ListLoggingServersResponse {
2642 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2644 pub logging_servers: std::vec::Vec<crate::model::LoggingServer>,
2645
2646 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2649 pub next_page_token: std::string::String,
2650
2651 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2654 pub unreachable: std::vec::Vec<std::string::String>,
2655
2656 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2657 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2658}
2659
2660impl ListLoggingServersResponse {
2661 pub fn new() -> Self {
2662 std::default::Default::default()
2663 }
2664
2665 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2667 self.next_page_token = v.into();
2668 self
2669 }
2670
2671 pub fn set_logging_servers<T, V>(mut self, v: T) -> Self
2673 where
2674 T: std::iter::IntoIterator<Item = V>,
2675 V: std::convert::Into<crate::model::LoggingServer>,
2676 {
2677 use std::iter::Iterator;
2678 self.logging_servers = v.into_iter().map(|i| i.into()).collect();
2679 self
2680 }
2681
2682 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2684 where
2685 T: std::iter::IntoIterator<Item = V>,
2686 V: std::convert::Into<std::string::String>,
2687 {
2688 use std::iter::Iterator;
2689 self.unreachable = v.into_iter().map(|i| i.into()).collect();
2690 self
2691 }
2692}
2693
2694impl wkt::message::Message for ListLoggingServersResponse {
2695 fn typename() -> &'static str {
2696 "type.googleapis.com/google.cloud.vmwareengine.v1.ListLoggingServersResponse"
2697 }
2698}
2699
2700#[doc(hidden)]
2701impl gax::paginator::internal::PageableResponse for ListLoggingServersResponse {
2702 type PageItem = crate::model::LoggingServer;
2703
2704 fn items(self) -> std::vec::Vec<Self::PageItem> {
2705 self.logging_servers
2706 }
2707
2708 fn next_page_token(&self) -> std::string::String {
2709 use std::clone::Clone;
2710 self.next_page_token.clone()
2711 }
2712}
2713
2714#[serde_with::serde_as]
2719#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2720#[serde(default, rename_all = "camelCase")]
2721#[non_exhaustive]
2722pub struct GetLoggingServerRequest {
2723 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2729 pub name: std::string::String,
2730
2731 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2732 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2733}
2734
2735impl GetLoggingServerRequest {
2736 pub fn new() -> Self {
2737 std::default::Default::default()
2738 }
2739
2740 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2742 self.name = v.into();
2743 self
2744 }
2745}
2746
2747impl wkt::message::Message for GetLoggingServerRequest {
2748 fn typename() -> &'static str {
2749 "type.googleapis.com/google.cloud.vmwareengine.v1.GetLoggingServerRequest"
2750 }
2751}
2752
2753#[serde_with::serde_as]
2758#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2759#[serde(default, rename_all = "camelCase")]
2760#[non_exhaustive]
2761pub struct CreateLoggingServerRequest {
2762 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2769 pub parent: std::string::String,
2770
2771 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2773 pub logging_server: std::option::Option<crate::model::LoggingServer>,
2774
2775 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2787 pub logging_server_id: std::string::String,
2788
2789 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2804 pub request_id: std::string::String,
2805
2806 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2807 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2808}
2809
2810impl CreateLoggingServerRequest {
2811 pub fn new() -> Self {
2812 std::default::Default::default()
2813 }
2814
2815 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2817 self.parent = v.into();
2818 self
2819 }
2820
2821 pub fn set_logging_server<
2823 T: std::convert::Into<std::option::Option<crate::model::LoggingServer>>,
2824 >(
2825 mut self,
2826 v: T,
2827 ) -> Self {
2828 self.logging_server = v.into();
2829 self
2830 }
2831
2832 pub fn set_logging_server_id<T: std::convert::Into<std::string::String>>(
2834 mut self,
2835 v: T,
2836 ) -> Self {
2837 self.logging_server_id = v.into();
2838 self
2839 }
2840
2841 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2843 self.request_id = v.into();
2844 self
2845 }
2846}
2847
2848impl wkt::message::Message for CreateLoggingServerRequest {
2849 fn typename() -> &'static str {
2850 "type.googleapis.com/google.cloud.vmwareengine.v1.CreateLoggingServerRequest"
2851 }
2852}
2853
2854#[serde_with::serde_as]
2859#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2860#[serde(default, rename_all = "camelCase")]
2861#[non_exhaustive]
2862pub struct UpdateLoggingServerRequest {
2863 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2869 pub update_mask: std::option::Option<wkt::FieldMask>,
2870
2871 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2873 pub logging_server: std::option::Option<crate::model::LoggingServer>,
2874
2875 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2890 pub request_id: std::string::String,
2891
2892 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2893 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2894}
2895
2896impl UpdateLoggingServerRequest {
2897 pub fn new() -> Self {
2898 std::default::Default::default()
2899 }
2900
2901 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
2903 mut self,
2904 v: T,
2905 ) -> Self {
2906 self.update_mask = v.into();
2907 self
2908 }
2909
2910 pub fn set_logging_server<
2912 T: std::convert::Into<std::option::Option<crate::model::LoggingServer>>,
2913 >(
2914 mut self,
2915 v: T,
2916 ) -> Self {
2917 self.logging_server = v.into();
2918 self
2919 }
2920
2921 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2923 self.request_id = v.into();
2924 self
2925 }
2926}
2927
2928impl wkt::message::Message for UpdateLoggingServerRequest {
2929 fn typename() -> &'static str {
2930 "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateLoggingServerRequest"
2931 }
2932}
2933
2934#[serde_with::serde_as]
2939#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2940#[serde(default, rename_all = "camelCase")]
2941#[non_exhaustive]
2942pub struct DeleteLoggingServerRequest {
2943 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2949 pub name: std::string::String,
2950
2951 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2966 pub request_id: std::string::String,
2967
2968 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2969 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2970}
2971
2972impl DeleteLoggingServerRequest {
2973 pub fn new() -> Self {
2974 std::default::Default::default()
2975 }
2976
2977 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2979 self.name = v.into();
2980 self
2981 }
2982
2983 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2985 self.request_id = v.into();
2986 self
2987 }
2988}
2989
2990impl wkt::message::Message for DeleteLoggingServerRequest {
2991 fn typename() -> &'static str {
2992 "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteLoggingServerRequest"
2993 }
2994}
2995
2996#[serde_with::serde_as]
2998#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2999#[serde(default, rename_all = "camelCase")]
3000#[non_exhaustive]
3001pub struct OperationMetadata {
3002 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3004 pub create_time: std::option::Option<wkt::Timestamp>,
3005
3006 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3008 pub end_time: std::option::Option<wkt::Timestamp>,
3009
3010 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3012 pub target: std::string::String,
3013
3014 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3016 pub verb: std::string::String,
3017
3018 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3020 pub status_message: std::string::String,
3021
3022 pub requested_cancellation: bool,
3031
3032 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3034 pub api_version: std::string::String,
3035
3036 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3037 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3038}
3039
3040impl OperationMetadata {
3041 pub fn new() -> Self {
3042 std::default::Default::default()
3043 }
3044
3045 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3047 mut self,
3048 v: T,
3049 ) -> Self {
3050 self.create_time = v.into();
3051 self
3052 }
3053
3054 pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3056 mut self,
3057 v: T,
3058 ) -> Self {
3059 self.end_time = v.into();
3060 self
3061 }
3062
3063 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3065 self.target = v.into();
3066 self
3067 }
3068
3069 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3071 self.verb = v.into();
3072 self
3073 }
3074
3075 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3077 self.status_message = v.into();
3078 self
3079 }
3080
3081 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3083 self.requested_cancellation = v.into();
3084 self
3085 }
3086
3087 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3089 self.api_version = v.into();
3090 self
3091 }
3092}
3093
3094impl wkt::message::Message for OperationMetadata {
3095 fn typename() -> &'static str {
3096 "type.googleapis.com/google.cloud.vmwareengine.v1.OperationMetadata"
3097 }
3098}
3099
3100#[serde_with::serde_as]
3105#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3106#[serde(default, rename_all = "camelCase")]
3107#[non_exhaustive]
3108pub struct ListNodeTypesRequest {
3109 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3115 pub parent: std::string::String,
3116
3117 pub page_size: i32,
3122
3123 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3129 pub page_token: std::string::String,
3130
3131 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3159 pub filter: std::string::String,
3160
3161 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3162 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3163}
3164
3165impl ListNodeTypesRequest {
3166 pub fn new() -> Self {
3167 std::default::Default::default()
3168 }
3169
3170 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3172 self.parent = v.into();
3173 self
3174 }
3175
3176 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3178 self.page_size = v.into();
3179 self
3180 }
3181
3182 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3184 self.page_token = v.into();
3185 self
3186 }
3187
3188 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3190 self.filter = v.into();
3191 self
3192 }
3193}
3194
3195impl wkt::message::Message for ListNodeTypesRequest {
3196 fn typename() -> &'static str {
3197 "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodeTypesRequest"
3198 }
3199}
3200
3201#[serde_with::serde_as]
3206#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3207#[serde(default, rename_all = "camelCase")]
3208#[non_exhaustive]
3209pub struct ListNodeTypesResponse {
3210 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3212 pub node_types: std::vec::Vec<crate::model::NodeType>,
3213
3214 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3217 pub next_page_token: std::string::String,
3218
3219 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3222 pub unreachable: std::vec::Vec<std::string::String>,
3223
3224 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3225 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3226}
3227
3228impl ListNodeTypesResponse {
3229 pub fn new() -> Self {
3230 std::default::Default::default()
3231 }
3232
3233 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3235 self.next_page_token = v.into();
3236 self
3237 }
3238
3239 pub fn set_node_types<T, V>(mut self, v: T) -> Self
3241 where
3242 T: std::iter::IntoIterator<Item = V>,
3243 V: std::convert::Into<crate::model::NodeType>,
3244 {
3245 use std::iter::Iterator;
3246 self.node_types = v.into_iter().map(|i| i.into()).collect();
3247 self
3248 }
3249
3250 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3252 where
3253 T: std::iter::IntoIterator<Item = V>,
3254 V: std::convert::Into<std::string::String>,
3255 {
3256 use std::iter::Iterator;
3257 self.unreachable = v.into_iter().map(|i| i.into()).collect();
3258 self
3259 }
3260}
3261
3262impl wkt::message::Message for ListNodeTypesResponse {
3263 fn typename() -> &'static str {
3264 "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodeTypesResponse"
3265 }
3266}
3267
3268#[doc(hidden)]
3269impl gax::paginator::internal::PageableResponse for ListNodeTypesResponse {
3270 type PageItem = crate::model::NodeType;
3271
3272 fn items(self) -> std::vec::Vec<Self::PageItem> {
3273 self.node_types
3274 }
3275
3276 fn next_page_token(&self) -> std::string::String {
3277 use std::clone::Clone;
3278 self.next_page_token.clone()
3279 }
3280}
3281
3282#[serde_with::serde_as]
3287#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3288#[serde(default, rename_all = "camelCase")]
3289#[non_exhaustive]
3290pub struct GetNodeTypeRequest {
3291 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3297 pub name: std::string::String,
3298
3299 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3300 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3301}
3302
3303impl GetNodeTypeRequest {
3304 pub fn new() -> Self {
3305 std::default::Default::default()
3306 }
3307
3308 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3310 self.name = v.into();
3311 self
3312 }
3313}
3314
3315impl wkt::message::Message for GetNodeTypeRequest {
3316 fn typename() -> &'static str {
3317 "type.googleapis.com/google.cloud.vmwareengine.v1.GetNodeTypeRequest"
3318 }
3319}
3320
3321#[serde_with::serde_as]
3326#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3327#[serde(default, rename_all = "camelCase")]
3328#[non_exhaustive]
3329pub struct ShowNsxCredentialsRequest {
3330 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3337 pub private_cloud: std::string::String,
3338
3339 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3340 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3341}
3342
3343impl ShowNsxCredentialsRequest {
3344 pub fn new() -> Self {
3345 std::default::Default::default()
3346 }
3347
3348 pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3350 self.private_cloud = v.into();
3351 self
3352 }
3353}
3354
3355impl wkt::message::Message for ShowNsxCredentialsRequest {
3356 fn typename() -> &'static str {
3357 "type.googleapis.com/google.cloud.vmwareengine.v1.ShowNsxCredentialsRequest"
3358 }
3359}
3360
3361#[serde_with::serde_as]
3366#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3367#[serde(default, rename_all = "camelCase")]
3368#[non_exhaustive]
3369pub struct ShowVcenterCredentialsRequest {
3370 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3377 pub private_cloud: std::string::String,
3378
3379 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3390 pub username: std::string::String,
3391
3392 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3393 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3394}
3395
3396impl ShowVcenterCredentialsRequest {
3397 pub fn new() -> Self {
3398 std::default::Default::default()
3399 }
3400
3401 pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3403 self.private_cloud = v.into();
3404 self
3405 }
3406
3407 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3409 self.username = v.into();
3410 self
3411 }
3412}
3413
3414impl wkt::message::Message for ShowVcenterCredentialsRequest {
3415 fn typename() -> &'static str {
3416 "type.googleapis.com/google.cloud.vmwareengine.v1.ShowVcenterCredentialsRequest"
3417 }
3418}
3419
3420#[serde_with::serde_as]
3425#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3426#[serde(default, rename_all = "camelCase")]
3427#[non_exhaustive]
3428pub struct ResetNsxCredentialsRequest {
3429 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3436 pub private_cloud: std::string::String,
3437
3438 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3453 pub request_id: std::string::String,
3454
3455 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3456 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3457}
3458
3459impl ResetNsxCredentialsRequest {
3460 pub fn new() -> Self {
3461 std::default::Default::default()
3462 }
3463
3464 pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3466 self.private_cloud = v.into();
3467 self
3468 }
3469
3470 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3472 self.request_id = v.into();
3473 self
3474 }
3475}
3476
3477impl wkt::message::Message for ResetNsxCredentialsRequest {
3478 fn typename() -> &'static str {
3479 "type.googleapis.com/google.cloud.vmwareengine.v1.ResetNsxCredentialsRequest"
3480 }
3481}
3482
3483#[serde_with::serde_as]
3488#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3489#[serde(default, rename_all = "camelCase")]
3490#[non_exhaustive]
3491pub struct ResetVcenterCredentialsRequest {
3492 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3499 pub private_cloud: std::string::String,
3500
3501 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3516 pub request_id: std::string::String,
3517
3518 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3528 pub username: std::string::String,
3529
3530 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3531 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3532}
3533
3534impl ResetVcenterCredentialsRequest {
3535 pub fn new() -> Self {
3536 std::default::Default::default()
3537 }
3538
3539 pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3541 self.private_cloud = v.into();
3542 self
3543 }
3544
3545 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3547 self.request_id = v.into();
3548 self
3549 }
3550
3551 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3553 self.username = v.into();
3554 self
3555 }
3556}
3557
3558impl wkt::message::Message for ResetVcenterCredentialsRequest {
3559 fn typename() -> &'static str {
3560 "type.googleapis.com/google.cloud.vmwareengine.v1.ResetVcenterCredentialsRequest"
3561 }
3562}
3563
3564#[serde_with::serde_as]
3569#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3570#[serde(default, rename_all = "camelCase")]
3571#[non_exhaustive]
3572pub struct ListHcxActivationKeysResponse {
3573 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3575 pub hcx_activation_keys: std::vec::Vec<crate::model::HcxActivationKey>,
3576
3577 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3580 pub next_page_token: std::string::String,
3581
3582 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3585 pub unreachable: std::vec::Vec<std::string::String>,
3586
3587 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3588 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3589}
3590
3591impl ListHcxActivationKeysResponse {
3592 pub fn new() -> Self {
3593 std::default::Default::default()
3594 }
3595
3596 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3598 self.next_page_token = v.into();
3599 self
3600 }
3601
3602 pub fn set_hcx_activation_keys<T, V>(mut self, v: T) -> Self
3604 where
3605 T: std::iter::IntoIterator<Item = V>,
3606 V: std::convert::Into<crate::model::HcxActivationKey>,
3607 {
3608 use std::iter::Iterator;
3609 self.hcx_activation_keys = v.into_iter().map(|i| i.into()).collect();
3610 self
3611 }
3612
3613 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3615 where
3616 T: std::iter::IntoIterator<Item = V>,
3617 V: std::convert::Into<std::string::String>,
3618 {
3619 use std::iter::Iterator;
3620 self.unreachable = v.into_iter().map(|i| i.into()).collect();
3621 self
3622 }
3623}
3624
3625impl wkt::message::Message for ListHcxActivationKeysResponse {
3626 fn typename() -> &'static str {
3627 "type.googleapis.com/google.cloud.vmwareengine.v1.ListHcxActivationKeysResponse"
3628 }
3629}
3630
3631#[doc(hidden)]
3632impl gax::paginator::internal::PageableResponse for ListHcxActivationKeysResponse {
3633 type PageItem = crate::model::HcxActivationKey;
3634
3635 fn items(self) -> std::vec::Vec<Self::PageItem> {
3636 self.hcx_activation_keys
3637 }
3638
3639 fn next_page_token(&self) -> std::string::String {
3640 use std::clone::Clone;
3641 self.next_page_token.clone()
3642 }
3643}
3644
3645#[serde_with::serde_as]
3650#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3651#[serde(default, rename_all = "camelCase")]
3652#[non_exhaustive]
3653pub struct ListHcxActivationKeysRequest {
3654 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3661 pub parent: std::string::String,
3662
3663 pub page_size: i32,
3668
3669 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3676 pub page_token: std::string::String,
3677
3678 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3679 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3680}
3681
3682impl ListHcxActivationKeysRequest {
3683 pub fn new() -> Self {
3684 std::default::Default::default()
3685 }
3686
3687 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3689 self.parent = v.into();
3690 self
3691 }
3692
3693 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3695 self.page_size = v.into();
3696 self
3697 }
3698
3699 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3701 self.page_token = v.into();
3702 self
3703 }
3704}
3705
3706impl wkt::message::Message for ListHcxActivationKeysRequest {
3707 fn typename() -> &'static str {
3708 "type.googleapis.com/google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest"
3709 }
3710}
3711
3712#[serde_with::serde_as]
3714#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3715#[serde(default, rename_all = "camelCase")]
3716#[non_exhaustive]
3717pub struct GetHcxActivationKeyRequest {
3718 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3724 pub name: std::string::String,
3725
3726 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3727 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3728}
3729
3730impl GetHcxActivationKeyRequest {
3731 pub fn new() -> Self {
3732 std::default::Default::default()
3733 }
3734
3735 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3737 self.name = v.into();
3738 self
3739 }
3740}
3741
3742impl wkt::message::Message for GetHcxActivationKeyRequest {
3743 fn typename() -> &'static str {
3744 "type.googleapis.com/google.cloud.vmwareengine.v1.GetHcxActivationKeyRequest"
3745 }
3746}
3747
3748#[serde_with::serde_as]
3753#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3754#[serde(default, rename_all = "camelCase")]
3755#[non_exhaustive]
3756pub struct CreateHcxActivationKeyRequest {
3757 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3763 pub parent: std::string::String,
3764
3765 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3768 pub hcx_activation_key: std::option::Option<crate::model::HcxActivationKey>,
3769
3770 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3782 pub hcx_activation_key_id: std::string::String,
3783
3784 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3799 pub request_id: std::string::String,
3800
3801 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3802 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3803}
3804
3805impl CreateHcxActivationKeyRequest {
3806 pub fn new() -> Self {
3807 std::default::Default::default()
3808 }
3809
3810 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3812 self.parent = v.into();
3813 self
3814 }
3815
3816 pub fn set_hcx_activation_key<
3818 T: std::convert::Into<std::option::Option<crate::model::HcxActivationKey>>,
3819 >(
3820 mut self,
3821 v: T,
3822 ) -> Self {
3823 self.hcx_activation_key = v.into();
3824 self
3825 }
3826
3827 pub fn set_hcx_activation_key_id<T: std::convert::Into<std::string::String>>(
3829 mut self,
3830 v: T,
3831 ) -> Self {
3832 self.hcx_activation_key_id = v.into();
3833 self
3834 }
3835
3836 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3838 self.request_id = v.into();
3839 self
3840 }
3841}
3842
3843impl wkt::message::Message for CreateHcxActivationKeyRequest {
3844 fn typename() -> &'static str {
3845 "type.googleapis.com/google.cloud.vmwareengine.v1.CreateHcxActivationKeyRequest"
3846 }
3847}
3848
3849#[serde_with::serde_as]
3854#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3855#[serde(default, rename_all = "camelCase")]
3856#[non_exhaustive]
3857pub struct GetDnsForwardingRequest {
3858 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3864 pub name: std::string::String,
3865
3866 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3867 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3868}
3869
3870impl GetDnsForwardingRequest {
3871 pub fn new() -> Self {
3872 std::default::Default::default()
3873 }
3874
3875 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3877 self.name = v.into();
3878 self
3879 }
3880}
3881
3882impl wkt::message::Message for GetDnsForwardingRequest {
3883 fn typename() -> &'static str {
3884 "type.googleapis.com/google.cloud.vmwareengine.v1.GetDnsForwardingRequest"
3885 }
3886}
3887
3888#[serde_with::serde_as]
3893#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3894#[serde(default, rename_all = "camelCase")]
3895#[non_exhaustive]
3896pub struct UpdateDnsForwardingRequest {
3897 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3899 pub dns_forwarding: std::option::Option<crate::model::DnsForwarding>,
3900
3901 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3907 pub update_mask: std::option::Option<wkt::FieldMask>,
3908
3909 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3924 pub request_id: std::string::String,
3925
3926 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3927 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3928}
3929
3930impl UpdateDnsForwardingRequest {
3931 pub fn new() -> Self {
3932 std::default::Default::default()
3933 }
3934
3935 pub fn set_dns_forwarding<
3937 T: std::convert::Into<std::option::Option<crate::model::DnsForwarding>>,
3938 >(
3939 mut self,
3940 v: T,
3941 ) -> Self {
3942 self.dns_forwarding = v.into();
3943 self
3944 }
3945
3946 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
3948 mut self,
3949 v: T,
3950 ) -> Self {
3951 self.update_mask = v.into();
3952 self
3953 }
3954
3955 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3957 self.request_id = v.into();
3958 self
3959 }
3960}
3961
3962impl wkt::message::Message for UpdateDnsForwardingRequest {
3963 fn typename() -> &'static str {
3964 "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateDnsForwardingRequest"
3965 }
3966}
3967
3968#[serde_with::serde_as]
3973#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3974#[serde(default, rename_all = "camelCase")]
3975#[non_exhaustive]
3976pub struct CreateNetworkPeeringRequest {
3977 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3983 pub parent: std::string::String,
3984
3985 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3997 pub network_peering_id: std::string::String,
3998
3999 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4001 pub network_peering: std::option::Option<crate::model::NetworkPeering>,
4002
4003 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4018 pub request_id: std::string::String,
4019
4020 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4021 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4022}
4023
4024impl CreateNetworkPeeringRequest {
4025 pub fn new() -> Self {
4026 std::default::Default::default()
4027 }
4028
4029 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4031 self.parent = v.into();
4032 self
4033 }
4034
4035 pub fn set_network_peering_id<T: std::convert::Into<std::string::String>>(
4037 mut self,
4038 v: T,
4039 ) -> Self {
4040 self.network_peering_id = v.into();
4041 self
4042 }
4043
4044 pub fn set_network_peering<
4046 T: std::convert::Into<std::option::Option<crate::model::NetworkPeering>>,
4047 >(
4048 mut self,
4049 v: T,
4050 ) -> Self {
4051 self.network_peering = v.into();
4052 self
4053 }
4054
4055 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4057 self.request_id = v.into();
4058 self
4059 }
4060}
4061
4062impl wkt::message::Message for CreateNetworkPeeringRequest {
4063 fn typename() -> &'static str {
4064 "type.googleapis.com/google.cloud.vmwareengine.v1.CreateNetworkPeeringRequest"
4065 }
4066}
4067
4068#[serde_with::serde_as]
4073#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4074#[serde(default, rename_all = "camelCase")]
4075#[non_exhaustive]
4076pub struct DeleteNetworkPeeringRequest {
4077 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4083 pub name: std::string::String,
4084
4085 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4100 pub request_id: std::string::String,
4101
4102 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4103 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4104}
4105
4106impl DeleteNetworkPeeringRequest {
4107 pub fn new() -> Self {
4108 std::default::Default::default()
4109 }
4110
4111 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4113 self.name = v.into();
4114 self
4115 }
4116
4117 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4119 self.request_id = v.into();
4120 self
4121 }
4122}
4123
4124impl wkt::message::Message for DeleteNetworkPeeringRequest {
4125 fn typename() -> &'static str {
4126 "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteNetworkPeeringRequest"
4127 }
4128}
4129
4130#[serde_with::serde_as]
4135#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4136#[serde(default, rename_all = "camelCase")]
4137#[non_exhaustive]
4138pub struct GetNetworkPeeringRequest {
4139 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4145 pub name: std::string::String,
4146
4147 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4148 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4149}
4150
4151impl GetNetworkPeeringRequest {
4152 pub fn new() -> Self {
4153 std::default::Default::default()
4154 }
4155
4156 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4158 self.name = v.into();
4159 self
4160 }
4161}
4162
4163impl wkt::message::Message for GetNetworkPeeringRequest {
4164 fn typename() -> &'static str {
4165 "type.googleapis.com/google.cloud.vmwareengine.v1.GetNetworkPeeringRequest"
4166 }
4167}
4168
4169#[serde_with::serde_as]
4174#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4175#[serde(default, rename_all = "camelCase")]
4176#[non_exhaustive]
4177pub struct ListNetworkPeeringsRequest {
4178 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4183 pub parent: std::string::String,
4184
4185 pub page_size: i32,
4189
4190 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4197 pub page_token: std::string::String,
4198
4199 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4227 pub filter: std::string::String,
4228
4229 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4235 pub order_by: std::string::String,
4236
4237 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4238 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4239}
4240
4241impl ListNetworkPeeringsRequest {
4242 pub fn new() -> Self {
4243 std::default::Default::default()
4244 }
4245
4246 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4248 self.parent = v.into();
4249 self
4250 }
4251
4252 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4254 self.page_size = v.into();
4255 self
4256 }
4257
4258 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4260 self.page_token = v.into();
4261 self
4262 }
4263
4264 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4266 self.filter = v.into();
4267 self
4268 }
4269
4270 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4272 self.order_by = v.into();
4273 self
4274 }
4275}
4276
4277impl wkt::message::Message for ListNetworkPeeringsRequest {
4278 fn typename() -> &'static str {
4279 "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPeeringsRequest"
4280 }
4281}
4282
4283#[serde_with::serde_as]
4288#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4289#[serde(default, rename_all = "camelCase")]
4290#[non_exhaustive]
4291pub struct UpdateNetworkPeeringRequest {
4292 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4294 pub network_peering: std::option::Option<crate::model::NetworkPeering>,
4295
4296 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4302 pub update_mask: std::option::Option<wkt::FieldMask>,
4303
4304 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4319 pub request_id: std::string::String,
4320
4321 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4322 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4323}
4324
4325impl UpdateNetworkPeeringRequest {
4326 pub fn new() -> Self {
4327 std::default::Default::default()
4328 }
4329
4330 pub fn set_network_peering<
4332 T: std::convert::Into<std::option::Option<crate::model::NetworkPeering>>,
4333 >(
4334 mut self,
4335 v: T,
4336 ) -> Self {
4337 self.network_peering = v.into();
4338 self
4339 }
4340
4341 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
4343 mut self,
4344 v: T,
4345 ) -> Self {
4346 self.update_mask = v.into();
4347 self
4348 }
4349
4350 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4352 self.request_id = v.into();
4353 self
4354 }
4355}
4356
4357impl wkt::message::Message for UpdateNetworkPeeringRequest {
4358 fn typename() -> &'static str {
4359 "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateNetworkPeeringRequest"
4360 }
4361}
4362
4363#[serde_with::serde_as]
4368#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4369#[serde(default, rename_all = "camelCase")]
4370#[non_exhaustive]
4371pub struct ListNetworkPeeringsResponse {
4372 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4374 pub network_peerings: std::vec::Vec<crate::model::NetworkPeering>,
4375
4376 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4379 pub next_page_token: std::string::String,
4380
4381 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4383 pub unreachable: std::vec::Vec<std::string::String>,
4384
4385 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4386 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4387}
4388
4389impl ListNetworkPeeringsResponse {
4390 pub fn new() -> Self {
4391 std::default::Default::default()
4392 }
4393
4394 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4396 self.next_page_token = v.into();
4397 self
4398 }
4399
4400 pub fn set_network_peerings<T, V>(mut self, v: T) -> Self
4402 where
4403 T: std::iter::IntoIterator<Item = V>,
4404 V: std::convert::Into<crate::model::NetworkPeering>,
4405 {
4406 use std::iter::Iterator;
4407 self.network_peerings = v.into_iter().map(|i| i.into()).collect();
4408 self
4409 }
4410
4411 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4413 where
4414 T: std::iter::IntoIterator<Item = V>,
4415 V: std::convert::Into<std::string::String>,
4416 {
4417 use std::iter::Iterator;
4418 self.unreachable = v.into_iter().map(|i| i.into()).collect();
4419 self
4420 }
4421}
4422
4423impl wkt::message::Message for ListNetworkPeeringsResponse {
4424 fn typename() -> &'static str {
4425 "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPeeringsResponse"
4426 }
4427}
4428
4429#[doc(hidden)]
4430impl gax::paginator::internal::PageableResponse for ListNetworkPeeringsResponse {
4431 type PageItem = crate::model::NetworkPeering;
4432
4433 fn items(self) -> std::vec::Vec<Self::PageItem> {
4434 self.network_peerings
4435 }
4436
4437 fn next_page_token(&self) -> std::string::String {
4438 use std::clone::Clone;
4439 self.next_page_token.clone()
4440 }
4441}
4442
4443#[serde_with::serde_as]
4448#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4449#[serde(default, rename_all = "camelCase")]
4450#[non_exhaustive]
4451pub struct ListPeeringRoutesRequest {
4452 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4457 pub parent: std::string::String,
4458
4459 pub page_size: i32,
4464
4465 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4470 pub page_token: std::string::String,
4471
4472 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4478 pub filter: std::string::String,
4479
4480 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4481 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4482}
4483
4484impl ListPeeringRoutesRequest {
4485 pub fn new() -> Self {
4486 std::default::Default::default()
4487 }
4488
4489 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4491 self.parent = v.into();
4492 self
4493 }
4494
4495 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4497 self.page_size = v.into();
4498 self
4499 }
4500
4501 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4503 self.page_token = v.into();
4504 self
4505 }
4506
4507 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4509 self.filter = v.into();
4510 self
4511 }
4512}
4513
4514impl wkt::message::Message for ListPeeringRoutesRequest {
4515 fn typename() -> &'static str {
4516 "type.googleapis.com/google.cloud.vmwareengine.v1.ListPeeringRoutesRequest"
4517 }
4518}
4519
4520#[serde_with::serde_as]
4525#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4526#[serde(default, rename_all = "camelCase")]
4527#[non_exhaustive]
4528pub struct ListPeeringRoutesResponse {
4529 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4531 pub peering_routes: std::vec::Vec<crate::model::PeeringRoute>,
4532
4533 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4536 pub next_page_token: std::string::String,
4537
4538 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4539 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4540}
4541
4542impl ListPeeringRoutesResponse {
4543 pub fn new() -> Self {
4544 std::default::Default::default()
4545 }
4546
4547 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4549 self.next_page_token = v.into();
4550 self
4551 }
4552
4553 pub fn set_peering_routes<T, V>(mut self, v: T) -> Self
4555 where
4556 T: std::iter::IntoIterator<Item = V>,
4557 V: std::convert::Into<crate::model::PeeringRoute>,
4558 {
4559 use std::iter::Iterator;
4560 self.peering_routes = v.into_iter().map(|i| i.into()).collect();
4561 self
4562 }
4563}
4564
4565impl wkt::message::Message for ListPeeringRoutesResponse {
4566 fn typename() -> &'static str {
4567 "type.googleapis.com/google.cloud.vmwareengine.v1.ListPeeringRoutesResponse"
4568 }
4569}
4570
4571#[doc(hidden)]
4572impl gax::paginator::internal::PageableResponse for ListPeeringRoutesResponse {
4573 type PageItem = crate::model::PeeringRoute;
4574
4575 fn items(self) -> std::vec::Vec<Self::PageItem> {
4576 self.peering_routes
4577 }
4578
4579 fn next_page_token(&self) -> std::string::String {
4580 use std::clone::Clone;
4581 self.next_page_token.clone()
4582 }
4583}
4584
4585#[serde_with::serde_as]
4590#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4591#[serde(default, rename_all = "camelCase")]
4592#[non_exhaustive]
4593pub struct ListNetworkPoliciesRequest {
4594 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4599 pub parent: std::string::String,
4600
4601 pub page_size: i32,
4606
4607 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4614 pub page_token: std::string::String,
4615
4616 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4644 pub filter: std::string::String,
4645
4646 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4652 pub order_by: std::string::String,
4653
4654 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4655 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4656}
4657
4658impl ListNetworkPoliciesRequest {
4659 pub fn new() -> Self {
4660 std::default::Default::default()
4661 }
4662
4663 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4665 self.parent = v.into();
4666 self
4667 }
4668
4669 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4671 self.page_size = v.into();
4672 self
4673 }
4674
4675 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4677 self.page_token = v.into();
4678 self
4679 }
4680
4681 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4683 self.filter = v.into();
4684 self
4685 }
4686
4687 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4689 self.order_by = v.into();
4690 self
4691 }
4692}
4693
4694impl wkt::message::Message for ListNetworkPoliciesRequest {
4695 fn typename() -> &'static str {
4696 "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest"
4697 }
4698}
4699
4700#[serde_with::serde_as]
4705#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4706#[serde(default, rename_all = "camelCase")]
4707#[non_exhaustive]
4708pub struct ListNetworkPoliciesResponse {
4709 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4711 pub network_policies: std::vec::Vec<crate::model::NetworkPolicy>,
4712
4713 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4716 pub next_page_token: std::string::String,
4717
4718 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4721 pub unreachable: std::vec::Vec<std::string::String>,
4722
4723 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4724 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4725}
4726
4727impl ListNetworkPoliciesResponse {
4728 pub fn new() -> Self {
4729 std::default::Default::default()
4730 }
4731
4732 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4734 self.next_page_token = v.into();
4735 self
4736 }
4737
4738 pub fn set_network_policies<T, V>(mut self, v: T) -> Self
4740 where
4741 T: std::iter::IntoIterator<Item = V>,
4742 V: std::convert::Into<crate::model::NetworkPolicy>,
4743 {
4744 use std::iter::Iterator;
4745 self.network_policies = v.into_iter().map(|i| i.into()).collect();
4746 self
4747 }
4748
4749 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4751 where
4752 T: std::iter::IntoIterator<Item = V>,
4753 V: std::convert::Into<std::string::String>,
4754 {
4755 use std::iter::Iterator;
4756 self.unreachable = v.into_iter().map(|i| i.into()).collect();
4757 self
4758 }
4759}
4760
4761impl wkt::message::Message for ListNetworkPoliciesResponse {
4762 fn typename() -> &'static str {
4763 "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPoliciesResponse"
4764 }
4765}
4766
4767#[doc(hidden)]
4768impl gax::paginator::internal::PageableResponse for ListNetworkPoliciesResponse {
4769 type PageItem = crate::model::NetworkPolicy;
4770
4771 fn items(self) -> std::vec::Vec<Self::PageItem> {
4772 self.network_policies
4773 }
4774
4775 fn next_page_token(&self) -> std::string::String {
4776 use std::clone::Clone;
4777 self.next_page_token.clone()
4778 }
4779}
4780
4781#[serde_with::serde_as]
4786#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4787#[serde(default, rename_all = "camelCase")]
4788#[non_exhaustive]
4789pub struct GetNetworkPolicyRequest {
4790 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4796 pub name: std::string::String,
4797
4798 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4799 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4800}
4801
4802impl GetNetworkPolicyRequest {
4803 pub fn new() -> Self {
4804 std::default::Default::default()
4805 }
4806
4807 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4809 self.name = v.into();
4810 self
4811 }
4812}
4813
4814impl wkt::message::Message for GetNetworkPolicyRequest {
4815 fn typename() -> &'static str {
4816 "type.googleapis.com/google.cloud.vmwareengine.v1.GetNetworkPolicyRequest"
4817 }
4818}
4819
4820#[serde_with::serde_as]
4825#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4826#[serde(default, rename_all = "camelCase")]
4827#[non_exhaustive]
4828pub struct UpdateNetworkPolicyRequest {
4829 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4831 pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
4832
4833 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4839 pub update_mask: std::option::Option<wkt::FieldMask>,
4840
4841 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4856 pub request_id: std::string::String,
4857
4858 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4859 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4860}
4861
4862impl UpdateNetworkPolicyRequest {
4863 pub fn new() -> Self {
4864 std::default::Default::default()
4865 }
4866
4867 pub fn set_network_policy<
4869 T: std::convert::Into<std::option::Option<crate::model::NetworkPolicy>>,
4870 >(
4871 mut self,
4872 v: T,
4873 ) -> Self {
4874 self.network_policy = v.into();
4875 self
4876 }
4877
4878 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
4880 mut self,
4881 v: T,
4882 ) -> Self {
4883 self.update_mask = v.into();
4884 self
4885 }
4886
4887 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4889 self.request_id = v.into();
4890 self
4891 }
4892}
4893
4894impl wkt::message::Message for UpdateNetworkPolicyRequest {
4895 fn typename() -> &'static str {
4896 "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateNetworkPolicyRequest"
4897 }
4898}
4899
4900#[serde_with::serde_as]
4905#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4906#[serde(default, rename_all = "camelCase")]
4907#[non_exhaustive]
4908pub struct CreateNetworkPolicyRequest {
4909 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4916 pub parent: std::string::String,
4917
4918 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4931 pub network_policy_id: std::string::String,
4932
4933 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4935 pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
4936
4937 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4952 pub request_id: std::string::String,
4953
4954 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4955 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4956}
4957
4958impl CreateNetworkPolicyRequest {
4959 pub fn new() -> Self {
4960 std::default::Default::default()
4961 }
4962
4963 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4965 self.parent = v.into();
4966 self
4967 }
4968
4969 pub fn set_network_policy_id<T: std::convert::Into<std::string::String>>(
4971 mut self,
4972 v: T,
4973 ) -> Self {
4974 self.network_policy_id = v.into();
4975 self
4976 }
4977
4978 pub fn set_network_policy<
4980 T: std::convert::Into<std::option::Option<crate::model::NetworkPolicy>>,
4981 >(
4982 mut self,
4983 v: T,
4984 ) -> Self {
4985 self.network_policy = v.into();
4986 self
4987 }
4988
4989 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4991 self.request_id = v.into();
4992 self
4993 }
4994}
4995
4996impl wkt::message::Message for CreateNetworkPolicyRequest {
4997 fn typename() -> &'static str {
4998 "type.googleapis.com/google.cloud.vmwareengine.v1.CreateNetworkPolicyRequest"
4999 }
5000}
5001
5002#[serde_with::serde_as]
5007#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5008#[serde(default, rename_all = "camelCase")]
5009#[non_exhaustive]
5010pub struct DeleteNetworkPolicyRequest {
5011 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5017 pub name: std::string::String,
5018
5019 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5034 pub request_id: std::string::String,
5035
5036 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5037 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5038}
5039
5040impl DeleteNetworkPolicyRequest {
5041 pub fn new() -> Self {
5042 std::default::Default::default()
5043 }
5044
5045 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5047 self.name = v.into();
5048 self
5049 }
5050
5051 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5053 self.request_id = v.into();
5054 self
5055 }
5056}
5057
5058impl wkt::message::Message for DeleteNetworkPolicyRequest {
5059 fn typename() -> &'static str {
5060 "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteNetworkPolicyRequest"
5061 }
5062}
5063
5064#[serde_with::serde_as]
5069#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5070#[serde(default, rename_all = "camelCase")]
5071#[non_exhaustive]
5072pub struct ListManagementDnsZoneBindingsRequest {
5073 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5080 pub parent: std::string::String,
5081
5082 pub page_size: i32,
5087
5088 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5095 pub page_token: std::string::String,
5096
5097 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5125 pub filter: std::string::String,
5126
5127 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5133 pub order_by: std::string::String,
5134
5135 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5136 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5137}
5138
5139impl ListManagementDnsZoneBindingsRequest {
5140 pub fn new() -> Self {
5141 std::default::Default::default()
5142 }
5143
5144 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5146 self.parent = v.into();
5147 self
5148 }
5149
5150 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5152 self.page_size = v.into();
5153 self
5154 }
5155
5156 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5158 self.page_token = v.into();
5159 self
5160 }
5161
5162 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5164 self.filter = v.into();
5165 self
5166 }
5167
5168 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5170 self.order_by = v.into();
5171 self
5172 }
5173}
5174
5175impl wkt::message::Message for ListManagementDnsZoneBindingsRequest {
5176 fn typename() -> &'static str {
5177 "type.googleapis.com/google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsRequest"
5178 }
5179}
5180
5181#[serde_with::serde_as]
5186#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5187#[serde(default, rename_all = "camelCase")]
5188#[non_exhaustive]
5189pub struct ListManagementDnsZoneBindingsResponse {
5190 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5192 pub management_dns_zone_bindings: std::vec::Vec<crate::model::ManagementDnsZoneBinding>,
5193
5194 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5197 pub next_page_token: std::string::String,
5198
5199 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5202 pub unreachable: std::vec::Vec<std::string::String>,
5203
5204 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5205 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5206}
5207
5208impl ListManagementDnsZoneBindingsResponse {
5209 pub fn new() -> Self {
5210 std::default::Default::default()
5211 }
5212
5213 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5215 self.next_page_token = v.into();
5216 self
5217 }
5218
5219 pub fn set_management_dns_zone_bindings<T, V>(mut self, v: T) -> Self
5221 where
5222 T: std::iter::IntoIterator<Item = V>,
5223 V: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
5224 {
5225 use std::iter::Iterator;
5226 self.management_dns_zone_bindings = v.into_iter().map(|i| i.into()).collect();
5227 self
5228 }
5229
5230 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5232 where
5233 T: std::iter::IntoIterator<Item = V>,
5234 V: std::convert::Into<std::string::String>,
5235 {
5236 use std::iter::Iterator;
5237 self.unreachable = v.into_iter().map(|i| i.into()).collect();
5238 self
5239 }
5240}
5241
5242impl wkt::message::Message for ListManagementDnsZoneBindingsResponse {
5243 fn typename() -> &'static str {
5244 "type.googleapis.com/google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsResponse"
5245 }
5246}
5247
5248#[doc(hidden)]
5249impl gax::paginator::internal::PageableResponse for ListManagementDnsZoneBindingsResponse {
5250 type PageItem = crate::model::ManagementDnsZoneBinding;
5251
5252 fn items(self) -> std::vec::Vec<Self::PageItem> {
5253 self.management_dns_zone_bindings
5254 }
5255
5256 fn next_page_token(&self) -> std::string::String {
5257 use std::clone::Clone;
5258 self.next_page_token.clone()
5259 }
5260}
5261
5262#[serde_with::serde_as]
5267#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5268#[serde(default, rename_all = "camelCase")]
5269#[non_exhaustive]
5270pub struct GetManagementDnsZoneBindingRequest {
5271 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5277 pub name: std::string::String,
5278
5279 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5280 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5281}
5282
5283impl GetManagementDnsZoneBindingRequest {
5284 pub fn new() -> Self {
5285 std::default::Default::default()
5286 }
5287
5288 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5290 self.name = v.into();
5291 self
5292 }
5293}
5294
5295impl wkt::message::Message for GetManagementDnsZoneBindingRequest {
5296 fn typename() -> &'static str {
5297 "type.googleapis.com/google.cloud.vmwareengine.v1.GetManagementDnsZoneBindingRequest"
5298 }
5299}
5300
5301#[serde_with::serde_as]
5303#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5304#[serde(default, rename_all = "camelCase")]
5305#[non_exhaustive]
5306pub struct CreateManagementDnsZoneBindingRequest {
5307 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5314 pub parent: std::string::String,
5315
5316 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5318 pub management_dns_zone_binding: std::option::Option<crate::model::ManagementDnsZoneBinding>,
5319
5320 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5333 pub management_dns_zone_binding_id: std::string::String,
5334
5335 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5350 pub request_id: std::string::String,
5351
5352 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5353 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5354}
5355
5356impl CreateManagementDnsZoneBindingRequest {
5357 pub fn new() -> Self {
5358 std::default::Default::default()
5359 }
5360
5361 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5363 self.parent = v.into();
5364 self
5365 }
5366
5367 pub fn set_management_dns_zone_binding<
5369 T: std::convert::Into<std::option::Option<crate::model::ManagementDnsZoneBinding>>,
5370 >(
5371 mut self,
5372 v: T,
5373 ) -> Self {
5374 self.management_dns_zone_binding = v.into();
5375 self
5376 }
5377
5378 pub fn set_management_dns_zone_binding_id<T: std::convert::Into<std::string::String>>(
5380 mut self,
5381 v: T,
5382 ) -> Self {
5383 self.management_dns_zone_binding_id = v.into();
5384 self
5385 }
5386
5387 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5389 self.request_id = v.into();
5390 self
5391 }
5392}
5393
5394impl wkt::message::Message for CreateManagementDnsZoneBindingRequest {
5395 fn typename() -> &'static str {
5396 "type.googleapis.com/google.cloud.vmwareengine.v1.CreateManagementDnsZoneBindingRequest"
5397 }
5398}
5399
5400#[serde_with::serde_as]
5405#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5406#[serde(default, rename_all = "camelCase")]
5407#[non_exhaustive]
5408pub struct UpdateManagementDnsZoneBindingRequest {
5409 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5415 pub update_mask: std::option::Option<wkt::FieldMask>,
5416
5417 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5419 pub management_dns_zone_binding: std::option::Option<crate::model::ManagementDnsZoneBinding>,
5420
5421 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5436 pub request_id: std::string::String,
5437
5438 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5439 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5440}
5441
5442impl UpdateManagementDnsZoneBindingRequest {
5443 pub fn new() -> Self {
5444 std::default::Default::default()
5445 }
5446
5447 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
5449 mut self,
5450 v: T,
5451 ) -> Self {
5452 self.update_mask = v.into();
5453 self
5454 }
5455
5456 pub fn set_management_dns_zone_binding<
5458 T: std::convert::Into<std::option::Option<crate::model::ManagementDnsZoneBinding>>,
5459 >(
5460 mut self,
5461 v: T,
5462 ) -> Self {
5463 self.management_dns_zone_binding = v.into();
5464 self
5465 }
5466
5467 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5469 self.request_id = v.into();
5470 self
5471 }
5472}
5473
5474impl wkt::message::Message for UpdateManagementDnsZoneBindingRequest {
5475 fn typename() -> &'static str {
5476 "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateManagementDnsZoneBindingRequest"
5477 }
5478}
5479
5480#[serde_with::serde_as]
5485#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5486#[serde(default, rename_all = "camelCase")]
5487#[non_exhaustive]
5488pub struct DeleteManagementDnsZoneBindingRequest {
5489 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5495 pub name: std::string::String,
5496
5497 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5512 pub request_id: std::string::String,
5513
5514 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5515 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5516}
5517
5518impl DeleteManagementDnsZoneBindingRequest {
5519 pub fn new() -> Self {
5520 std::default::Default::default()
5521 }
5522
5523 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5525 self.name = v.into();
5526 self
5527 }
5528
5529 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5531 self.request_id = v.into();
5532 self
5533 }
5534}
5535
5536impl wkt::message::Message for DeleteManagementDnsZoneBindingRequest {
5537 fn typename() -> &'static str {
5538 "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteManagementDnsZoneBindingRequest"
5539 }
5540}
5541
5542#[serde_with::serde_as]
5544#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5545#[serde(default, rename_all = "camelCase")]
5546#[non_exhaustive]
5547pub struct RepairManagementDnsZoneBindingRequest {
5548 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5554 pub name: std::string::String,
5555
5556 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5571 pub request_id: std::string::String,
5572
5573 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5574 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5575}
5576
5577impl RepairManagementDnsZoneBindingRequest {
5578 pub fn new() -> Self {
5579 std::default::Default::default()
5580 }
5581
5582 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5584 self.name = v.into();
5585 self
5586 }
5587
5588 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5590 self.request_id = v.into();
5591 self
5592 }
5593}
5594
5595impl wkt::message::Message for RepairManagementDnsZoneBindingRequest {
5596 fn typename() -> &'static str {
5597 "type.googleapis.com/google.cloud.vmwareengine.v1.RepairManagementDnsZoneBindingRequest"
5598 }
5599}
5600
5601#[serde_with::serde_as]
5606#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5607#[serde(default, rename_all = "camelCase")]
5608#[non_exhaustive]
5609pub struct CreateVmwareEngineNetworkRequest {
5610 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5618 pub parent: std::string::String,
5619
5620 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5635 pub vmware_engine_network_id: std::string::String,
5636
5637 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5639 pub vmware_engine_network: std::option::Option<crate::model::VmwareEngineNetwork>,
5640
5641 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5656 pub request_id: std::string::String,
5657
5658 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5659 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5660}
5661
5662impl CreateVmwareEngineNetworkRequest {
5663 pub fn new() -> Self {
5664 std::default::Default::default()
5665 }
5666
5667 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5669 self.parent = v.into();
5670 self
5671 }
5672
5673 pub fn set_vmware_engine_network_id<T: std::convert::Into<std::string::String>>(
5675 mut self,
5676 v: T,
5677 ) -> Self {
5678 self.vmware_engine_network_id = v.into();
5679 self
5680 }
5681
5682 pub fn set_vmware_engine_network<
5684 T: std::convert::Into<std::option::Option<crate::model::VmwareEngineNetwork>>,
5685 >(
5686 mut self,
5687 v: T,
5688 ) -> Self {
5689 self.vmware_engine_network = v.into();
5690 self
5691 }
5692
5693 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5695 self.request_id = v.into();
5696 self
5697 }
5698}
5699
5700impl wkt::message::Message for CreateVmwareEngineNetworkRequest {
5701 fn typename() -> &'static str {
5702 "type.googleapis.com/google.cloud.vmwareengine.v1.CreateVmwareEngineNetworkRequest"
5703 }
5704}
5705
5706#[serde_with::serde_as]
5711#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5712#[serde(default, rename_all = "camelCase")]
5713#[non_exhaustive]
5714pub struct UpdateVmwareEngineNetworkRequest {
5715 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5717 pub vmware_engine_network: std::option::Option<crate::model::VmwareEngineNetwork>,
5718
5719 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5726 pub update_mask: std::option::Option<wkt::FieldMask>,
5727
5728 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5743 pub request_id: std::string::String,
5744
5745 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5746 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5747}
5748
5749impl UpdateVmwareEngineNetworkRequest {
5750 pub fn new() -> Self {
5751 std::default::Default::default()
5752 }
5753
5754 pub fn set_vmware_engine_network<
5756 T: std::convert::Into<std::option::Option<crate::model::VmwareEngineNetwork>>,
5757 >(
5758 mut self,
5759 v: T,
5760 ) -> Self {
5761 self.vmware_engine_network = v.into();
5762 self
5763 }
5764
5765 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
5767 mut self,
5768 v: T,
5769 ) -> Self {
5770 self.update_mask = v.into();
5771 self
5772 }
5773
5774 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5776 self.request_id = v.into();
5777 self
5778 }
5779}
5780
5781impl wkt::message::Message for UpdateVmwareEngineNetworkRequest {
5782 fn typename() -> &'static str {
5783 "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateVmwareEngineNetworkRequest"
5784 }
5785}
5786
5787#[serde_with::serde_as]
5792#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5793#[serde(default, rename_all = "camelCase")]
5794#[non_exhaustive]
5795pub struct DeleteVmwareEngineNetworkRequest {
5796 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5802 pub name: std::string::String,
5803
5804 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5819 pub request_id: std::string::String,
5820
5821 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5826 pub etag: std::string::String,
5827
5828 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5829 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5830}
5831
5832impl DeleteVmwareEngineNetworkRequest {
5833 pub fn new() -> Self {
5834 std::default::Default::default()
5835 }
5836
5837 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5839 self.name = v.into();
5840 self
5841 }
5842
5843 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5845 self.request_id = v.into();
5846 self
5847 }
5848
5849 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5851 self.etag = v.into();
5852 self
5853 }
5854}
5855
5856impl wkt::message::Message for DeleteVmwareEngineNetworkRequest {
5857 fn typename() -> &'static str {
5858 "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteVmwareEngineNetworkRequest"
5859 }
5860}
5861
5862#[serde_with::serde_as]
5867#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5868#[serde(default, rename_all = "camelCase")]
5869#[non_exhaustive]
5870pub struct GetVmwareEngineNetworkRequest {
5871 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5877 pub name: std::string::String,
5878
5879 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5880 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5881}
5882
5883impl GetVmwareEngineNetworkRequest {
5884 pub fn new() -> Self {
5885 std::default::Default::default()
5886 }
5887
5888 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5890 self.name = v.into();
5891 self
5892 }
5893}
5894
5895impl wkt::message::Message for GetVmwareEngineNetworkRequest {
5896 fn typename() -> &'static str {
5897 "type.googleapis.com/google.cloud.vmwareengine.v1.GetVmwareEngineNetworkRequest"
5898 }
5899}
5900
5901#[serde_with::serde_as]
5906#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5907#[serde(default, rename_all = "camelCase")]
5908#[non_exhaustive]
5909pub struct ListVmwareEngineNetworksRequest {
5910 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5915 pub parent: std::string::String,
5916
5917 pub page_size: i32,
5921
5922 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5929 pub page_token: std::string::String,
5930
5931 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5959 pub filter: std::string::String,
5960
5961 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5967 pub order_by: std::string::String,
5968
5969 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5970 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5971}
5972
5973impl ListVmwareEngineNetworksRequest {
5974 pub fn new() -> Self {
5975 std::default::Default::default()
5976 }
5977
5978 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5980 self.parent = v.into();
5981 self
5982 }
5983
5984 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5986 self.page_size = v.into();
5987 self
5988 }
5989
5990 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5992 self.page_token = v.into();
5993 self
5994 }
5995
5996 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5998 self.filter = v.into();
5999 self
6000 }
6001
6002 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6004 self.order_by = v.into();
6005 self
6006 }
6007}
6008
6009impl wkt::message::Message for ListVmwareEngineNetworksRequest {
6010 fn typename() -> &'static str {
6011 "type.googleapis.com/google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest"
6012 }
6013}
6014
6015#[serde_with::serde_as]
6020#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6021#[serde(default, rename_all = "camelCase")]
6022#[non_exhaustive]
6023pub struct ListVmwareEngineNetworksResponse {
6024 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6026 pub vmware_engine_networks: std::vec::Vec<crate::model::VmwareEngineNetwork>,
6027
6028 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6031 pub next_page_token: std::string::String,
6032
6033 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6035 pub unreachable: std::vec::Vec<std::string::String>,
6036
6037 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6038 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6039}
6040
6041impl ListVmwareEngineNetworksResponse {
6042 pub fn new() -> Self {
6043 std::default::Default::default()
6044 }
6045
6046 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6048 self.next_page_token = v.into();
6049 self
6050 }
6051
6052 pub fn set_vmware_engine_networks<T, V>(mut self, v: T) -> Self
6054 where
6055 T: std::iter::IntoIterator<Item = V>,
6056 V: std::convert::Into<crate::model::VmwareEngineNetwork>,
6057 {
6058 use std::iter::Iterator;
6059 self.vmware_engine_networks = v.into_iter().map(|i| i.into()).collect();
6060 self
6061 }
6062
6063 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6065 where
6066 T: std::iter::IntoIterator<Item = V>,
6067 V: std::convert::Into<std::string::String>,
6068 {
6069 use std::iter::Iterator;
6070 self.unreachable = v.into_iter().map(|i| i.into()).collect();
6071 self
6072 }
6073}
6074
6075impl wkt::message::Message for ListVmwareEngineNetworksResponse {
6076 fn typename() -> &'static str {
6077 "type.googleapis.com/google.cloud.vmwareengine.v1.ListVmwareEngineNetworksResponse"
6078 }
6079}
6080
6081#[doc(hidden)]
6082impl gax::paginator::internal::PageableResponse for ListVmwareEngineNetworksResponse {
6083 type PageItem = crate::model::VmwareEngineNetwork;
6084
6085 fn items(self) -> std::vec::Vec<Self::PageItem> {
6086 self.vmware_engine_networks
6087 }
6088
6089 fn next_page_token(&self) -> std::string::String {
6090 use std::clone::Clone;
6091 self.next_page_token.clone()
6092 }
6093}
6094
6095#[serde_with::serde_as]
6100#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6101#[serde(default, rename_all = "camelCase")]
6102#[non_exhaustive]
6103pub struct CreatePrivateConnectionRequest {
6104 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6110 pub parent: std::string::String,
6111
6112 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6124 pub private_connection_id: std::string::String,
6125
6126 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6128 pub private_connection: std::option::Option<crate::model::PrivateConnection>,
6129
6130 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6145 pub request_id: std::string::String,
6146
6147 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6148 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6149}
6150
6151impl CreatePrivateConnectionRequest {
6152 pub fn new() -> Self {
6153 std::default::Default::default()
6154 }
6155
6156 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6158 self.parent = v.into();
6159 self
6160 }
6161
6162 pub fn set_private_connection_id<T: std::convert::Into<std::string::String>>(
6164 mut self,
6165 v: T,
6166 ) -> Self {
6167 self.private_connection_id = v.into();
6168 self
6169 }
6170
6171 pub fn set_private_connection<
6173 T: std::convert::Into<std::option::Option<crate::model::PrivateConnection>>,
6174 >(
6175 mut self,
6176 v: T,
6177 ) -> Self {
6178 self.private_connection = v.into();
6179 self
6180 }
6181
6182 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6184 self.request_id = v.into();
6185 self
6186 }
6187}
6188
6189impl wkt::message::Message for CreatePrivateConnectionRequest {
6190 fn typename() -> &'static str {
6191 "type.googleapis.com/google.cloud.vmwareengine.v1.CreatePrivateConnectionRequest"
6192 }
6193}
6194
6195#[serde_with::serde_as]
6200#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6201#[serde(default, rename_all = "camelCase")]
6202#[non_exhaustive]
6203pub struct GetPrivateConnectionRequest {
6204 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6210 pub name: std::string::String,
6211
6212 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6213 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6214}
6215
6216impl GetPrivateConnectionRequest {
6217 pub fn new() -> Self {
6218 std::default::Default::default()
6219 }
6220
6221 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6223 self.name = v.into();
6224 self
6225 }
6226}
6227
6228impl wkt::message::Message for GetPrivateConnectionRequest {
6229 fn typename() -> &'static str {
6230 "type.googleapis.com/google.cloud.vmwareengine.v1.GetPrivateConnectionRequest"
6231 }
6232}
6233
6234#[serde_with::serde_as]
6239#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6240#[serde(default, rename_all = "camelCase")]
6241#[non_exhaustive]
6242pub struct ListPrivateConnectionsRequest {
6243 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6248 pub parent: std::string::String,
6249
6250 pub page_size: i32,
6254
6255 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6262 pub page_token: std::string::String,
6263
6264 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6292 pub filter: std::string::String,
6293
6294 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6300 pub order_by: std::string::String,
6301
6302 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6303 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6304}
6305
6306impl ListPrivateConnectionsRequest {
6307 pub fn new() -> Self {
6308 std::default::Default::default()
6309 }
6310
6311 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6313 self.parent = v.into();
6314 self
6315 }
6316
6317 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6319 self.page_size = v.into();
6320 self
6321 }
6322
6323 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6325 self.page_token = v.into();
6326 self
6327 }
6328
6329 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6331 self.filter = v.into();
6332 self
6333 }
6334
6335 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6337 self.order_by = v.into();
6338 self
6339 }
6340}
6341
6342impl wkt::message::Message for ListPrivateConnectionsRequest {
6343 fn typename() -> &'static str {
6344 "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionsRequest"
6345 }
6346}
6347
6348#[serde_with::serde_as]
6353#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6354#[serde(default, rename_all = "camelCase")]
6355#[non_exhaustive]
6356pub struct ListPrivateConnectionsResponse {
6357 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6359 pub private_connections: std::vec::Vec<crate::model::PrivateConnection>,
6360
6361 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6364 pub next_page_token: std::string::String,
6365
6366 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6368 pub unreachable: std::vec::Vec<std::string::String>,
6369
6370 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6371 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6372}
6373
6374impl ListPrivateConnectionsResponse {
6375 pub fn new() -> Self {
6376 std::default::Default::default()
6377 }
6378
6379 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6381 self.next_page_token = v.into();
6382 self
6383 }
6384
6385 pub fn set_private_connections<T, V>(mut self, v: T) -> Self
6387 where
6388 T: std::iter::IntoIterator<Item = V>,
6389 V: std::convert::Into<crate::model::PrivateConnection>,
6390 {
6391 use std::iter::Iterator;
6392 self.private_connections = v.into_iter().map(|i| i.into()).collect();
6393 self
6394 }
6395
6396 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6398 where
6399 T: std::iter::IntoIterator<Item = V>,
6400 V: std::convert::Into<std::string::String>,
6401 {
6402 use std::iter::Iterator;
6403 self.unreachable = v.into_iter().map(|i| i.into()).collect();
6404 self
6405 }
6406}
6407
6408impl wkt::message::Message for ListPrivateConnectionsResponse {
6409 fn typename() -> &'static str {
6410 "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionsResponse"
6411 }
6412}
6413
6414#[doc(hidden)]
6415impl gax::paginator::internal::PageableResponse for ListPrivateConnectionsResponse {
6416 type PageItem = crate::model::PrivateConnection;
6417
6418 fn items(self) -> std::vec::Vec<Self::PageItem> {
6419 self.private_connections
6420 }
6421
6422 fn next_page_token(&self) -> std::string::String {
6423 use std::clone::Clone;
6424 self.next_page_token.clone()
6425 }
6426}
6427
6428#[serde_with::serde_as]
6433#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6434#[serde(default, rename_all = "camelCase")]
6435#[non_exhaustive]
6436pub struct UpdatePrivateConnectionRequest {
6437 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6439 pub private_connection: std::option::Option<crate::model::PrivateConnection>,
6440
6441 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6447 pub update_mask: std::option::Option<wkt::FieldMask>,
6448
6449 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6464 pub request_id: std::string::String,
6465
6466 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6467 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6468}
6469
6470impl UpdatePrivateConnectionRequest {
6471 pub fn new() -> Self {
6472 std::default::Default::default()
6473 }
6474
6475 pub fn set_private_connection<
6477 T: std::convert::Into<std::option::Option<crate::model::PrivateConnection>>,
6478 >(
6479 mut self,
6480 v: T,
6481 ) -> Self {
6482 self.private_connection = v.into();
6483 self
6484 }
6485
6486 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
6488 mut self,
6489 v: T,
6490 ) -> Self {
6491 self.update_mask = v.into();
6492 self
6493 }
6494
6495 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6497 self.request_id = v.into();
6498 self
6499 }
6500}
6501
6502impl wkt::message::Message for UpdatePrivateConnectionRequest {
6503 fn typename() -> &'static str {
6504 "type.googleapis.com/google.cloud.vmwareengine.v1.UpdatePrivateConnectionRequest"
6505 }
6506}
6507
6508#[serde_with::serde_as]
6513#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6514#[serde(default, rename_all = "camelCase")]
6515#[non_exhaustive]
6516pub struct DeletePrivateConnectionRequest {
6517 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6523 pub name: std::string::String,
6524
6525 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6540 pub request_id: std::string::String,
6541
6542 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6543 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6544}
6545
6546impl DeletePrivateConnectionRequest {
6547 pub fn new() -> Self {
6548 std::default::Default::default()
6549 }
6550
6551 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6553 self.name = v.into();
6554 self
6555 }
6556
6557 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6559 self.request_id = v.into();
6560 self
6561 }
6562}
6563
6564impl wkt::message::Message for DeletePrivateConnectionRequest {
6565 fn typename() -> &'static str {
6566 "type.googleapis.com/google.cloud.vmwareengine.v1.DeletePrivateConnectionRequest"
6567 }
6568}
6569
6570#[serde_with::serde_as]
6575#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6576#[serde(default, rename_all = "camelCase")]
6577#[non_exhaustive]
6578pub struct ListPrivateConnectionPeeringRoutesRequest {
6579 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6584 pub parent: std::string::String,
6585
6586 pub page_size: i32,
6591
6592 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6597 pub page_token: std::string::String,
6598
6599 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6600 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6601}
6602
6603impl ListPrivateConnectionPeeringRoutesRequest {
6604 pub fn new() -> Self {
6605 std::default::Default::default()
6606 }
6607
6608 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6610 self.parent = v.into();
6611 self
6612 }
6613
6614 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6616 self.page_size = v.into();
6617 self
6618 }
6619
6620 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6622 self.page_token = v.into();
6623 self
6624 }
6625}
6626
6627impl wkt::message::Message for ListPrivateConnectionPeeringRoutesRequest {
6628 fn typename() -> &'static str {
6629 "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesRequest"
6630 }
6631}
6632
6633#[serde_with::serde_as]
6638#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6639#[serde(default, rename_all = "camelCase")]
6640#[non_exhaustive]
6641pub struct ListPrivateConnectionPeeringRoutesResponse {
6642 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6644 pub peering_routes: std::vec::Vec<crate::model::PeeringRoute>,
6645
6646 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6649 pub next_page_token: std::string::String,
6650
6651 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6652 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6653}
6654
6655impl ListPrivateConnectionPeeringRoutesResponse {
6656 pub fn new() -> Self {
6657 std::default::Default::default()
6658 }
6659
6660 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6662 self.next_page_token = v.into();
6663 self
6664 }
6665
6666 pub fn set_peering_routes<T, V>(mut self, v: T) -> Self
6668 where
6669 T: std::iter::IntoIterator<Item = V>,
6670 V: std::convert::Into<crate::model::PeeringRoute>,
6671 {
6672 use std::iter::Iterator;
6673 self.peering_routes = v.into_iter().map(|i| i.into()).collect();
6674 self
6675 }
6676}
6677
6678impl wkt::message::Message for ListPrivateConnectionPeeringRoutesResponse {
6679 fn typename() -> &'static str {
6680 "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesResponse"
6681 }
6682}
6683
6684#[doc(hidden)]
6685impl gax::paginator::internal::PageableResponse for ListPrivateConnectionPeeringRoutesResponse {
6686 type PageItem = crate::model::PeeringRoute;
6687
6688 fn items(self) -> std::vec::Vec<Self::PageItem> {
6689 self.peering_routes
6690 }
6691
6692 fn next_page_token(&self) -> std::string::String {
6693 use std::clone::Clone;
6694 self.next_page_token.clone()
6695 }
6696}
6697
6698#[serde_with::serde_as]
6703#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6704#[serde(default, rename_all = "camelCase")]
6705#[non_exhaustive]
6706pub struct GrantDnsBindPermissionRequest {
6707 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6714 pub name: std::string::String,
6715
6716 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6720 pub principal: std::option::Option<crate::model::Principal>,
6721
6722 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6737 pub request_id: std::string::String,
6738
6739 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6740 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6741}
6742
6743impl GrantDnsBindPermissionRequest {
6744 pub fn new() -> Self {
6745 std::default::Default::default()
6746 }
6747
6748 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6750 self.name = v.into();
6751 self
6752 }
6753
6754 pub fn set_principal<T: std::convert::Into<std::option::Option<crate::model::Principal>>>(
6756 mut self,
6757 v: T,
6758 ) -> Self {
6759 self.principal = v.into();
6760 self
6761 }
6762
6763 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6765 self.request_id = v.into();
6766 self
6767 }
6768}
6769
6770impl wkt::message::Message for GrantDnsBindPermissionRequest {
6771 fn typename() -> &'static str {
6772 "type.googleapis.com/google.cloud.vmwareengine.v1.GrantDnsBindPermissionRequest"
6773 }
6774}
6775
6776#[serde_with::serde_as]
6781#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6782#[serde(default, rename_all = "camelCase")]
6783#[non_exhaustive]
6784pub struct RevokeDnsBindPermissionRequest {
6785 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6792 pub name: std::string::String,
6793
6794 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6798 pub principal: std::option::Option<crate::model::Principal>,
6799
6800 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6815 pub request_id: std::string::String,
6816
6817 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6818 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6819}
6820
6821impl RevokeDnsBindPermissionRequest {
6822 pub fn new() -> Self {
6823 std::default::Default::default()
6824 }
6825
6826 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6828 self.name = v.into();
6829 self
6830 }
6831
6832 pub fn set_principal<T: std::convert::Into<std::option::Option<crate::model::Principal>>>(
6834 mut self,
6835 v: T,
6836 ) -> Self {
6837 self.principal = v.into();
6838 self
6839 }
6840
6841 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6843 self.request_id = v.into();
6844 self
6845 }
6846}
6847
6848impl wkt::message::Message for RevokeDnsBindPermissionRequest {
6849 fn typename() -> &'static str {
6850 "type.googleapis.com/google.cloud.vmwareengine.v1.RevokeDnsBindPermissionRequest"
6851 }
6852}
6853
6854#[serde_with::serde_as]
6859#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6860#[serde(default, rename_all = "camelCase")]
6861#[non_exhaustive]
6862pub struct GetDnsBindPermissionRequest {
6863 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6870 pub name: std::string::String,
6871
6872 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6873 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6874}
6875
6876impl GetDnsBindPermissionRequest {
6877 pub fn new() -> Self {
6878 std::default::Default::default()
6879 }
6880
6881 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6883 self.name = v.into();
6884 self
6885 }
6886}
6887
6888impl wkt::message::Message for GetDnsBindPermissionRequest {
6889 fn typename() -> &'static str {
6890 "type.googleapis.com/google.cloud.vmwareengine.v1.GetDnsBindPermissionRequest"
6891 }
6892}
6893
6894#[serde_with::serde_as]
6897#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6898#[serde(default, rename_all = "camelCase")]
6899#[non_exhaustive]
6900pub struct NetworkConfig {
6901 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6903 pub management_cidr: std::string::String,
6904
6905 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6910 pub vmware_engine_network: std::string::String,
6911
6912 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6915 pub vmware_engine_network_canonical: std::string::String,
6916
6917 pub management_ip_address_layout_version: i32,
6927
6928 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6933 pub dns_server_ip: std::string::String,
6934
6935 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6936 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6937}
6938
6939impl NetworkConfig {
6940 pub fn new() -> Self {
6941 std::default::Default::default()
6942 }
6943
6944 pub fn set_management_cidr<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6946 self.management_cidr = v.into();
6947 self
6948 }
6949
6950 pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
6952 mut self,
6953 v: T,
6954 ) -> Self {
6955 self.vmware_engine_network = v.into();
6956 self
6957 }
6958
6959 pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
6961 mut self,
6962 v: T,
6963 ) -> Self {
6964 self.vmware_engine_network_canonical = v.into();
6965 self
6966 }
6967
6968 pub fn set_management_ip_address_layout_version<T: std::convert::Into<i32>>(
6970 mut self,
6971 v: T,
6972 ) -> Self {
6973 self.management_ip_address_layout_version = v.into();
6974 self
6975 }
6976
6977 pub fn set_dns_server_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6979 self.dns_server_ip = v.into();
6980 self
6981 }
6982}
6983
6984impl wkt::message::Message for NetworkConfig {
6985 fn typename() -> &'static str {
6986 "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkConfig"
6987 }
6988}
6989
6990#[serde_with::serde_as]
6992#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6993#[serde(default, rename_all = "camelCase")]
6994#[non_exhaustive]
6995pub struct NodeTypeConfig {
6996 pub node_count: i32,
6998
6999 pub custom_core_count: i32,
7004
7005 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7006 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7007}
7008
7009impl NodeTypeConfig {
7010 pub fn new() -> Self {
7011 std::default::Default::default()
7012 }
7013
7014 pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7016 self.node_count = v.into();
7017 self
7018 }
7019
7020 pub fn set_custom_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7022 self.custom_core_count = v.into();
7023 self
7024 }
7025}
7026
7027impl wkt::message::Message for NodeTypeConfig {
7028 fn typename() -> &'static str {
7029 "type.googleapis.com/google.cloud.vmwareengine.v1.NodeTypeConfig"
7030 }
7031}
7032
7033#[serde_with::serde_as]
7035#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7036#[serde(default, rename_all = "camelCase")]
7037#[non_exhaustive]
7038pub struct StretchedClusterConfig {
7039 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7045 pub preferred_location: std::string::String,
7046
7047 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7053 pub secondary_location: std::string::String,
7054
7055 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7056 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7057}
7058
7059impl StretchedClusterConfig {
7060 pub fn new() -> Self {
7061 std::default::Default::default()
7062 }
7063
7064 pub fn set_preferred_location<T: std::convert::Into<std::string::String>>(
7066 mut self,
7067 v: T,
7068 ) -> Self {
7069 self.preferred_location = v.into();
7070 self
7071 }
7072
7073 pub fn set_secondary_location<T: std::convert::Into<std::string::String>>(
7075 mut self,
7076 v: T,
7077 ) -> Self {
7078 self.secondary_location = v.into();
7079 self
7080 }
7081}
7082
7083impl wkt::message::Message for StretchedClusterConfig {
7084 fn typename() -> &'static str {
7085 "type.googleapis.com/google.cloud.vmwareengine.v1.StretchedClusterConfig"
7086 }
7087}
7088
7089#[serde_with::serde_as]
7093#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7094#[serde(default, rename_all = "camelCase")]
7095#[non_exhaustive]
7096pub struct PrivateCloud {
7097 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7103 pub name: std::string::String,
7104
7105 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7107 pub create_time: std::option::Option<wkt::Timestamp>,
7108
7109 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7111 pub update_time: std::option::Option<wkt::Timestamp>,
7112
7113 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7115 pub delete_time: std::option::Option<wkt::Timestamp>,
7116
7117 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7119 pub expire_time: std::option::Option<wkt::Timestamp>,
7120
7121 pub state: crate::model::private_cloud::State,
7124
7125 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7127 pub network_config: std::option::Option<crate::model::NetworkConfig>,
7128
7129 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7136 pub management_cluster: std::option::Option<crate::model::private_cloud::ManagementCluster>,
7137
7138 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7140 pub description: std::string::String,
7141
7142 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7144 pub hcx: std::option::Option<crate::model::Hcx>,
7145
7146 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7148 pub nsx: std::option::Option<crate::model::Nsx>,
7149
7150 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7152 pub vcenter: std::option::Option<crate::model::Vcenter>,
7153
7154 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7156 pub uid: std::string::String,
7157
7158 #[serde(rename = "type")]
7160 pub r#type: crate::model::private_cloud::Type,
7161
7162 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7163 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7164}
7165
7166impl PrivateCloud {
7167 pub fn new() -> Self {
7168 std::default::Default::default()
7169 }
7170
7171 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7173 self.name = v.into();
7174 self
7175 }
7176
7177 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7179 mut self,
7180 v: T,
7181 ) -> Self {
7182 self.create_time = v.into();
7183 self
7184 }
7185
7186 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7188 mut self,
7189 v: T,
7190 ) -> Self {
7191 self.update_time = v.into();
7192 self
7193 }
7194
7195 pub fn set_delete_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7197 mut self,
7198 v: T,
7199 ) -> Self {
7200 self.delete_time = v.into();
7201 self
7202 }
7203
7204 pub fn set_expire_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7206 mut self,
7207 v: T,
7208 ) -> Self {
7209 self.expire_time = v.into();
7210 self
7211 }
7212
7213 pub fn set_state<T: std::convert::Into<crate::model::private_cloud::State>>(
7215 mut self,
7216 v: T,
7217 ) -> Self {
7218 self.state = v.into();
7219 self
7220 }
7221
7222 pub fn set_network_config<
7224 T: std::convert::Into<std::option::Option<crate::model::NetworkConfig>>,
7225 >(
7226 mut self,
7227 v: T,
7228 ) -> Self {
7229 self.network_config = v.into();
7230 self
7231 }
7232
7233 pub fn set_management_cluster<
7235 T: std::convert::Into<std::option::Option<crate::model::private_cloud::ManagementCluster>>,
7236 >(
7237 mut self,
7238 v: T,
7239 ) -> Self {
7240 self.management_cluster = v.into();
7241 self
7242 }
7243
7244 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7246 self.description = v.into();
7247 self
7248 }
7249
7250 pub fn set_hcx<T: std::convert::Into<std::option::Option<crate::model::Hcx>>>(
7252 mut self,
7253 v: T,
7254 ) -> Self {
7255 self.hcx = v.into();
7256 self
7257 }
7258
7259 pub fn set_nsx<T: std::convert::Into<std::option::Option<crate::model::Nsx>>>(
7261 mut self,
7262 v: T,
7263 ) -> Self {
7264 self.nsx = v.into();
7265 self
7266 }
7267
7268 pub fn set_vcenter<T: std::convert::Into<std::option::Option<crate::model::Vcenter>>>(
7270 mut self,
7271 v: T,
7272 ) -> Self {
7273 self.vcenter = v.into();
7274 self
7275 }
7276
7277 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7279 self.uid = v.into();
7280 self
7281 }
7282
7283 pub fn set_type<T: std::convert::Into<crate::model::private_cloud::Type>>(
7285 mut self,
7286 v: T,
7287 ) -> Self {
7288 self.r#type = v.into();
7289 self
7290 }
7291}
7292
7293impl wkt::message::Message for PrivateCloud {
7294 fn typename() -> &'static str {
7295 "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateCloud"
7296 }
7297}
7298
7299pub mod private_cloud {
7301 #[allow(unused_imports)]
7302 use super::*;
7303
7304 #[serde_with::serde_as]
7306 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7307 #[serde(default, rename_all = "camelCase")]
7308 #[non_exhaustive]
7309 pub struct ManagementCluster {
7310 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7320 pub cluster_id: std::string::String,
7321
7322 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
7325 pub node_type_configs:
7326 std::collections::HashMap<std::string::String, crate::model::NodeTypeConfig>,
7327
7328 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7331 pub stretched_cluster_config: std::option::Option<crate::model::StretchedClusterConfig>,
7332
7333 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7334 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7335 }
7336
7337 impl ManagementCluster {
7338 pub fn new() -> Self {
7339 std::default::Default::default()
7340 }
7341
7342 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7344 self.cluster_id = v.into();
7345 self
7346 }
7347
7348 pub fn set_stretched_cluster_config<
7350 T: std::convert::Into<std::option::Option<crate::model::StretchedClusterConfig>>,
7351 >(
7352 mut self,
7353 v: T,
7354 ) -> Self {
7355 self.stretched_cluster_config = v.into();
7356 self
7357 }
7358
7359 pub fn set_node_type_configs<T, K, V>(mut self, v: T) -> Self
7361 where
7362 T: std::iter::IntoIterator<Item = (K, V)>,
7363 K: std::convert::Into<std::string::String>,
7364 V: std::convert::Into<crate::model::NodeTypeConfig>,
7365 {
7366 use std::iter::Iterator;
7367 self.node_type_configs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7368 self
7369 }
7370 }
7371
7372 impl wkt::message::Message for ManagementCluster {
7373 fn typename() -> &'static str {
7374 "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster"
7375 }
7376 }
7377
7378 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
7380 pub struct State(i32);
7381
7382 impl State {
7383 pub const STATE_UNSPECIFIED: State = State::new(0);
7385
7386 pub const ACTIVE: State = State::new(1);
7388
7389 pub const CREATING: State = State::new(2);
7391
7392 pub const UPDATING: State = State::new(3);
7394
7395 pub const FAILED: State = State::new(5);
7397
7398 pub const DELETED: State = State::new(6);
7401
7402 pub const PURGING: State = State::new(7);
7405
7406 pub(crate) const fn new(value: i32) -> Self {
7408 Self(value)
7409 }
7410
7411 pub fn value(&self) -> i32 {
7413 self.0
7414 }
7415
7416 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
7418 match self.0 {
7419 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
7420 1 => std::borrow::Cow::Borrowed("ACTIVE"),
7421 2 => std::borrow::Cow::Borrowed("CREATING"),
7422 3 => std::borrow::Cow::Borrowed("UPDATING"),
7423 5 => std::borrow::Cow::Borrowed("FAILED"),
7424 6 => std::borrow::Cow::Borrowed("DELETED"),
7425 7 => std::borrow::Cow::Borrowed("PURGING"),
7426 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
7427 }
7428 }
7429
7430 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
7432 match name {
7433 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
7434 "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
7435 "CREATING" => std::option::Option::Some(Self::CREATING),
7436 "UPDATING" => std::option::Option::Some(Self::UPDATING),
7437 "FAILED" => std::option::Option::Some(Self::FAILED),
7438 "DELETED" => std::option::Option::Some(Self::DELETED),
7439 "PURGING" => std::option::Option::Some(Self::PURGING),
7440 _ => std::option::Option::None,
7441 }
7442 }
7443 }
7444
7445 impl std::convert::From<i32> for State {
7446 fn from(value: i32) -> Self {
7447 Self::new(value)
7448 }
7449 }
7450
7451 impl std::default::Default for State {
7452 fn default() -> Self {
7453 Self::new(0)
7454 }
7455 }
7456
7457 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
7459 pub struct Type(i32);
7460
7461 impl Type {
7462 pub const STANDARD: Type = Type::new(0);
7464
7465 pub const TIME_LIMITED: Type = Type::new(1);
7470
7471 pub const STRETCHED: Type = Type::new(2);
7474
7475 pub(crate) const fn new(value: i32) -> Self {
7477 Self(value)
7478 }
7479
7480 pub fn value(&self) -> i32 {
7482 self.0
7483 }
7484
7485 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
7487 match self.0 {
7488 0 => std::borrow::Cow::Borrowed("STANDARD"),
7489 1 => std::borrow::Cow::Borrowed("TIME_LIMITED"),
7490 2 => std::borrow::Cow::Borrowed("STRETCHED"),
7491 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
7492 }
7493 }
7494
7495 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
7497 match name {
7498 "STANDARD" => std::option::Option::Some(Self::STANDARD),
7499 "TIME_LIMITED" => std::option::Option::Some(Self::TIME_LIMITED),
7500 "STRETCHED" => std::option::Option::Some(Self::STRETCHED),
7501 _ => std::option::Option::None,
7502 }
7503 }
7504 }
7505
7506 impl std::convert::From<i32> for Type {
7507 fn from(value: i32) -> Self {
7508 Self::new(value)
7509 }
7510 }
7511
7512 impl std::default::Default for Type {
7513 fn default() -> Self {
7514 Self::new(0)
7515 }
7516 }
7517}
7518
7519#[serde_with::serde_as]
7521#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7522#[serde(default, rename_all = "camelCase")]
7523#[non_exhaustive]
7524pub struct Cluster {
7525 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7531 pub name: std::string::String,
7532
7533 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7535 pub create_time: std::option::Option<wkt::Timestamp>,
7536
7537 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7539 pub update_time: std::option::Option<wkt::Timestamp>,
7540
7541 pub state: crate::model::cluster::State,
7543
7544 pub management: bool,
7548
7549 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7551 pub autoscaling_settings: std::option::Option<crate::model::AutoscalingSettings>,
7552
7553 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7555 pub uid: std::string::String,
7556
7557 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
7560 pub node_type_configs:
7561 std::collections::HashMap<std::string::String, crate::model::NodeTypeConfig>,
7562
7563 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7566 pub stretched_cluster_config: std::option::Option<crate::model::StretchedClusterConfig>,
7567
7568 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7569 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7570}
7571
7572impl Cluster {
7573 pub fn new() -> Self {
7574 std::default::Default::default()
7575 }
7576
7577 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7579 self.name = v.into();
7580 self
7581 }
7582
7583 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7585 mut self,
7586 v: T,
7587 ) -> Self {
7588 self.create_time = v.into();
7589 self
7590 }
7591
7592 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7594 mut self,
7595 v: T,
7596 ) -> Self {
7597 self.update_time = v.into();
7598 self
7599 }
7600
7601 pub fn set_state<T: std::convert::Into<crate::model::cluster::State>>(mut self, v: T) -> Self {
7603 self.state = v.into();
7604 self
7605 }
7606
7607 pub fn set_management<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7609 self.management = v.into();
7610 self
7611 }
7612
7613 pub fn set_autoscaling_settings<
7615 T: std::convert::Into<std::option::Option<crate::model::AutoscalingSettings>>,
7616 >(
7617 mut self,
7618 v: T,
7619 ) -> Self {
7620 self.autoscaling_settings = v.into();
7621 self
7622 }
7623
7624 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7626 self.uid = v.into();
7627 self
7628 }
7629
7630 pub fn set_stretched_cluster_config<
7632 T: std::convert::Into<std::option::Option<crate::model::StretchedClusterConfig>>,
7633 >(
7634 mut self,
7635 v: T,
7636 ) -> Self {
7637 self.stretched_cluster_config = v.into();
7638 self
7639 }
7640
7641 pub fn set_node_type_configs<T, K, V>(mut self, v: T) -> Self
7643 where
7644 T: std::iter::IntoIterator<Item = (K, V)>,
7645 K: std::convert::Into<std::string::String>,
7646 V: std::convert::Into<crate::model::NodeTypeConfig>,
7647 {
7648 use std::iter::Iterator;
7649 self.node_type_configs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7650 self
7651 }
7652}
7653
7654impl wkt::message::Message for Cluster {
7655 fn typename() -> &'static str {
7656 "type.googleapis.com/google.cloud.vmwareengine.v1.Cluster"
7657 }
7658}
7659
7660pub mod cluster {
7662 #[allow(unused_imports)]
7663 use super::*;
7664
7665 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
7667 pub struct State(i32);
7668
7669 impl State {
7670 pub const STATE_UNSPECIFIED: State = State::new(0);
7672
7673 pub const ACTIVE: State = State::new(1);
7675
7676 pub const CREATING: State = State::new(2);
7678
7679 pub const UPDATING: State = State::new(3);
7682
7683 pub const DELETING: State = State::new(4);
7685
7686 pub const REPAIRING: State = State::new(5);
7689
7690 pub(crate) const fn new(value: i32) -> Self {
7692 Self(value)
7693 }
7694
7695 pub fn value(&self) -> i32 {
7697 self.0
7698 }
7699
7700 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
7702 match self.0 {
7703 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
7704 1 => std::borrow::Cow::Borrowed("ACTIVE"),
7705 2 => std::borrow::Cow::Borrowed("CREATING"),
7706 3 => std::borrow::Cow::Borrowed("UPDATING"),
7707 4 => std::borrow::Cow::Borrowed("DELETING"),
7708 5 => std::borrow::Cow::Borrowed("REPAIRING"),
7709 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
7710 }
7711 }
7712
7713 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
7715 match name {
7716 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
7717 "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
7718 "CREATING" => std::option::Option::Some(Self::CREATING),
7719 "UPDATING" => std::option::Option::Some(Self::UPDATING),
7720 "DELETING" => std::option::Option::Some(Self::DELETING),
7721 "REPAIRING" => std::option::Option::Some(Self::REPAIRING),
7722 _ => std::option::Option::None,
7723 }
7724 }
7725 }
7726
7727 impl std::convert::From<i32> for State {
7728 fn from(value: i32) -> Self {
7729 Self::new(value)
7730 }
7731 }
7732
7733 impl std::default::Default for State {
7734 fn default() -> Self {
7735 Self::new(0)
7736 }
7737 }
7738}
7739
7740#[serde_with::serde_as]
7742#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7743#[serde(default, rename_all = "camelCase")]
7744#[non_exhaustive]
7745pub struct Node {
7746 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7752 pub name: std::string::String,
7753
7754 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7756 pub fqdn: std::string::String,
7757
7758 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7760 pub internal_ip: std::string::String,
7761
7762 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7766 pub node_type_id: std::string::String,
7767
7768 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7771 pub version: std::string::String,
7772
7773 #[serde_as(as = "serde_with::DisplayFromStr")]
7775 pub custom_core_count: i64,
7776
7777 pub state: crate::model::node::State,
7779
7780 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7781 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7782}
7783
7784impl Node {
7785 pub fn new() -> Self {
7786 std::default::Default::default()
7787 }
7788
7789 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7791 self.name = v.into();
7792 self
7793 }
7794
7795 pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7797 self.fqdn = v.into();
7798 self
7799 }
7800
7801 pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7803 self.internal_ip = v.into();
7804 self
7805 }
7806
7807 pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7809 self.node_type_id = v.into();
7810 self
7811 }
7812
7813 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7815 self.version = v.into();
7816 self
7817 }
7818
7819 pub fn set_custom_core_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7821 self.custom_core_count = v.into();
7822 self
7823 }
7824
7825 pub fn set_state<T: std::convert::Into<crate::model::node::State>>(mut self, v: T) -> Self {
7827 self.state = v.into();
7828 self
7829 }
7830}
7831
7832impl wkt::message::Message for Node {
7833 fn typename() -> &'static str {
7834 "type.googleapis.com/google.cloud.vmwareengine.v1.Node"
7835 }
7836}
7837
7838pub mod node {
7840 #[allow(unused_imports)]
7841 use super::*;
7842
7843 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
7845 pub struct State(i32);
7846
7847 impl State {
7848 pub const STATE_UNSPECIFIED: State = State::new(0);
7850
7851 pub const ACTIVE: State = State::new(1);
7853
7854 pub const CREATING: State = State::new(2);
7856
7857 pub const FAILED: State = State::new(3);
7859
7860 pub const UPGRADING: State = State::new(4);
7862
7863 pub(crate) const fn new(value: i32) -> Self {
7865 Self(value)
7866 }
7867
7868 pub fn value(&self) -> i32 {
7870 self.0
7871 }
7872
7873 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
7875 match self.0 {
7876 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
7877 1 => std::borrow::Cow::Borrowed("ACTIVE"),
7878 2 => std::borrow::Cow::Borrowed("CREATING"),
7879 3 => std::borrow::Cow::Borrowed("FAILED"),
7880 4 => std::borrow::Cow::Borrowed("UPGRADING"),
7881 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
7882 }
7883 }
7884
7885 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
7887 match name {
7888 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
7889 "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
7890 "CREATING" => std::option::Option::Some(Self::CREATING),
7891 "FAILED" => std::option::Option::Some(Self::FAILED),
7892 "UPGRADING" => std::option::Option::Some(Self::UPGRADING),
7893 _ => std::option::Option::None,
7894 }
7895 }
7896 }
7897
7898 impl std::convert::From<i32> for State {
7899 fn from(value: i32) -> Self {
7900 Self::new(value)
7901 }
7902 }
7903
7904 impl std::default::Default for State {
7905 fn default() -> Self {
7906 Self::new(0)
7907 }
7908 }
7909}
7910
7911#[serde_with::serde_as]
7914#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7915#[serde(default, rename_all = "camelCase")]
7916#[non_exhaustive]
7917pub struct ExternalAddress {
7918 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7924 pub name: std::string::String,
7925
7926 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7928 pub create_time: std::option::Option<wkt::Timestamp>,
7929
7930 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7932 pub update_time: std::option::Option<wkt::Timestamp>,
7933
7934 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7936 pub internal_ip: std::string::String,
7937
7938 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7940 pub external_ip: std::string::String,
7941
7942 pub state: crate::model::external_address::State,
7944
7945 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7947 pub uid: std::string::String,
7948
7949 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7951 pub description: std::string::String,
7952
7953 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7954 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7955}
7956
7957impl ExternalAddress {
7958 pub fn new() -> Self {
7959 std::default::Default::default()
7960 }
7961
7962 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7964 self.name = v.into();
7965 self
7966 }
7967
7968 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7970 mut self,
7971 v: T,
7972 ) -> Self {
7973 self.create_time = v.into();
7974 self
7975 }
7976
7977 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7979 mut self,
7980 v: T,
7981 ) -> Self {
7982 self.update_time = v.into();
7983 self
7984 }
7985
7986 pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7988 self.internal_ip = v.into();
7989 self
7990 }
7991
7992 pub fn set_external_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7994 self.external_ip = v.into();
7995 self
7996 }
7997
7998 pub fn set_state<T: std::convert::Into<crate::model::external_address::State>>(
8000 mut self,
8001 v: T,
8002 ) -> Self {
8003 self.state = v.into();
8004 self
8005 }
8006
8007 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8009 self.uid = v.into();
8010 self
8011 }
8012
8013 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8015 self.description = v.into();
8016 self
8017 }
8018}
8019
8020impl wkt::message::Message for ExternalAddress {
8021 fn typename() -> &'static str {
8022 "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAddress"
8023 }
8024}
8025
8026pub mod external_address {
8028 #[allow(unused_imports)]
8029 use super::*;
8030
8031 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8033 pub struct State(i32);
8034
8035 impl State {
8036 pub const STATE_UNSPECIFIED: State = State::new(0);
8038
8039 pub const ACTIVE: State = State::new(1);
8041
8042 pub const CREATING: State = State::new(2);
8044
8045 pub const UPDATING: State = State::new(3);
8047
8048 pub const DELETING: State = State::new(4);
8050
8051 pub(crate) const fn new(value: i32) -> Self {
8053 Self(value)
8054 }
8055
8056 pub fn value(&self) -> i32 {
8058 self.0
8059 }
8060
8061 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8063 match self.0 {
8064 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
8065 1 => std::borrow::Cow::Borrowed("ACTIVE"),
8066 2 => std::borrow::Cow::Borrowed("CREATING"),
8067 3 => std::borrow::Cow::Borrowed("UPDATING"),
8068 4 => std::borrow::Cow::Borrowed("DELETING"),
8069 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8070 }
8071 }
8072
8073 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8075 match name {
8076 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
8077 "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
8078 "CREATING" => std::option::Option::Some(Self::CREATING),
8079 "UPDATING" => std::option::Option::Some(Self::UPDATING),
8080 "DELETING" => std::option::Option::Some(Self::DELETING),
8081 _ => std::option::Option::None,
8082 }
8083 }
8084 }
8085
8086 impl std::convert::From<i32> for State {
8087 fn from(value: i32) -> Self {
8088 Self::new(value)
8089 }
8090 }
8091
8092 impl std::default::Default for State {
8093 fn default() -> Self {
8094 Self::new(0)
8095 }
8096 }
8097}
8098
8099#[serde_with::serde_as]
8102#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8103#[serde(default, rename_all = "camelCase")]
8104#[non_exhaustive]
8105pub struct Subnet {
8106 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8112 pub name: std::string::String,
8113
8114 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8116 pub ip_cidr_range: std::string::String,
8117
8118 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8121 pub gateway_ip: std::string::String,
8122
8123 #[serde(rename = "type")]
8126 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8127 pub r#type: std::string::String,
8128
8129 pub state: crate::model::subnet::State,
8131
8132 pub vlan_id: i32,
8134
8135 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8136 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8137}
8138
8139impl Subnet {
8140 pub fn new() -> Self {
8141 std::default::Default::default()
8142 }
8143
8144 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8146 self.name = v.into();
8147 self
8148 }
8149
8150 pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8152 self.ip_cidr_range = v.into();
8153 self
8154 }
8155
8156 pub fn set_gateway_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8158 self.gateway_ip = v.into();
8159 self
8160 }
8161
8162 pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8164 self.r#type = v.into();
8165 self
8166 }
8167
8168 pub fn set_state<T: std::convert::Into<crate::model::subnet::State>>(mut self, v: T) -> Self {
8170 self.state = v.into();
8171 self
8172 }
8173
8174 pub fn set_vlan_id<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8176 self.vlan_id = v.into();
8177 self
8178 }
8179}
8180
8181impl wkt::message::Message for Subnet {
8182 fn typename() -> &'static str {
8183 "type.googleapis.com/google.cloud.vmwareengine.v1.Subnet"
8184 }
8185}
8186
8187pub mod subnet {
8189 #[allow(unused_imports)]
8190 use super::*;
8191
8192 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8194 pub struct State(i32);
8195
8196 impl State {
8197 pub const STATE_UNSPECIFIED: State = State::new(0);
8199
8200 pub const ACTIVE: State = State::new(1);
8202
8203 pub const CREATING: State = State::new(2);
8205
8206 pub const UPDATING: State = State::new(3);
8208
8209 pub const DELETING: State = State::new(4);
8211
8212 pub const RECONCILING: State = State::new(5);
8214
8215 pub const FAILED: State = State::new(6);
8218
8219 pub(crate) const fn new(value: i32) -> Self {
8221 Self(value)
8222 }
8223
8224 pub fn value(&self) -> i32 {
8226 self.0
8227 }
8228
8229 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8231 match self.0 {
8232 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
8233 1 => std::borrow::Cow::Borrowed("ACTIVE"),
8234 2 => std::borrow::Cow::Borrowed("CREATING"),
8235 3 => std::borrow::Cow::Borrowed("UPDATING"),
8236 4 => std::borrow::Cow::Borrowed("DELETING"),
8237 5 => std::borrow::Cow::Borrowed("RECONCILING"),
8238 6 => std::borrow::Cow::Borrowed("FAILED"),
8239 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8240 }
8241 }
8242
8243 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8245 match name {
8246 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
8247 "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
8248 "CREATING" => std::option::Option::Some(Self::CREATING),
8249 "UPDATING" => std::option::Option::Some(Self::UPDATING),
8250 "DELETING" => std::option::Option::Some(Self::DELETING),
8251 "RECONCILING" => std::option::Option::Some(Self::RECONCILING),
8252 "FAILED" => std::option::Option::Some(Self::FAILED),
8253 _ => std::option::Option::None,
8254 }
8255 }
8256 }
8257
8258 impl std::convert::From<i32> for State {
8259 fn from(value: i32) -> Self {
8260 Self::new(value)
8261 }
8262 }
8263
8264 impl std::default::Default for State {
8265 fn default() -> Self {
8266 Self::new(0)
8267 }
8268 }
8269}
8270
8271#[serde_with::serde_as]
8274#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8275#[serde(default, rename_all = "camelCase")]
8276#[non_exhaustive]
8277pub struct ExternalAccessRule {
8278 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8284 pub name: std::string::String,
8285
8286 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8288 pub create_time: std::option::Option<wkt::Timestamp>,
8289
8290 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8292 pub update_time: std::option::Option<wkt::Timestamp>,
8293
8294 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8296 pub description: std::string::String,
8297
8298 pub priority: i32,
8306
8307 pub action: crate::model::external_access_rule::Action,
8309
8310 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8314 pub ip_protocol: std::string::String,
8315
8316 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
8323 pub source_ip_ranges: std::vec::Vec<crate::model::external_access_rule::IpRange>,
8324
8325 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
8331 pub source_ports: std::vec::Vec<std::string::String>,
8332
8333 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
8341 pub destination_ip_ranges: std::vec::Vec<crate::model::external_access_rule::IpRange>,
8342
8343 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
8349 pub destination_ports: std::vec::Vec<std::string::String>,
8350
8351 pub state: crate::model::external_access_rule::State,
8353
8354 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8356 pub uid: std::string::String,
8357
8358 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8359 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8360}
8361
8362impl ExternalAccessRule {
8363 pub fn new() -> Self {
8364 std::default::Default::default()
8365 }
8366
8367 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8369 self.name = v.into();
8370 self
8371 }
8372
8373 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
8375 mut self,
8376 v: T,
8377 ) -> Self {
8378 self.create_time = v.into();
8379 self
8380 }
8381
8382 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
8384 mut self,
8385 v: T,
8386 ) -> Self {
8387 self.update_time = v.into();
8388 self
8389 }
8390
8391 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8393 self.description = v.into();
8394 self
8395 }
8396
8397 pub fn set_priority<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8399 self.priority = v.into();
8400 self
8401 }
8402
8403 pub fn set_action<T: std::convert::Into<crate::model::external_access_rule::Action>>(
8405 mut self,
8406 v: T,
8407 ) -> Self {
8408 self.action = v.into();
8409 self
8410 }
8411
8412 pub fn set_ip_protocol<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8414 self.ip_protocol = v.into();
8415 self
8416 }
8417
8418 pub fn set_state<T: std::convert::Into<crate::model::external_access_rule::State>>(
8420 mut self,
8421 v: T,
8422 ) -> Self {
8423 self.state = v.into();
8424 self
8425 }
8426
8427 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8429 self.uid = v.into();
8430 self
8431 }
8432
8433 pub fn set_source_ip_ranges<T, V>(mut self, v: T) -> Self
8435 where
8436 T: std::iter::IntoIterator<Item = V>,
8437 V: std::convert::Into<crate::model::external_access_rule::IpRange>,
8438 {
8439 use std::iter::Iterator;
8440 self.source_ip_ranges = v.into_iter().map(|i| i.into()).collect();
8441 self
8442 }
8443
8444 pub fn set_source_ports<T, V>(mut self, v: T) -> Self
8446 where
8447 T: std::iter::IntoIterator<Item = V>,
8448 V: std::convert::Into<std::string::String>,
8449 {
8450 use std::iter::Iterator;
8451 self.source_ports = v.into_iter().map(|i| i.into()).collect();
8452 self
8453 }
8454
8455 pub fn set_destination_ip_ranges<T, V>(mut self, v: T) -> Self
8457 where
8458 T: std::iter::IntoIterator<Item = V>,
8459 V: std::convert::Into<crate::model::external_access_rule::IpRange>,
8460 {
8461 use std::iter::Iterator;
8462 self.destination_ip_ranges = v.into_iter().map(|i| i.into()).collect();
8463 self
8464 }
8465
8466 pub fn set_destination_ports<T, V>(mut self, v: T) -> Self
8468 where
8469 T: std::iter::IntoIterator<Item = V>,
8470 V: std::convert::Into<std::string::String>,
8471 {
8472 use std::iter::Iterator;
8473 self.destination_ports = v.into_iter().map(|i| i.into()).collect();
8474 self
8475 }
8476}
8477
8478impl wkt::message::Message for ExternalAccessRule {
8479 fn typename() -> &'static str {
8480 "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAccessRule"
8481 }
8482}
8483
8484pub mod external_access_rule {
8486 #[allow(unused_imports)]
8487 use super::*;
8488
8489 #[serde_with::serde_as]
8491 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8492 #[serde(default, rename_all = "camelCase")]
8493 #[non_exhaustive]
8494 pub struct IpRange {
8495 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
8496 pub ip_range: std::option::Option<crate::model::external_access_rule::ip_range::IpRange>,
8497
8498 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8499 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8500 }
8501
8502 impl IpRange {
8503 pub fn new() -> Self {
8504 std::default::Default::default()
8505 }
8506
8507 pub fn set_ip_range<
8512 T: std::convert::Into<
8513 std::option::Option<crate::model::external_access_rule::ip_range::IpRange>,
8514 >,
8515 >(
8516 mut self,
8517 v: T,
8518 ) -> Self {
8519 self.ip_range = v.into();
8520 self
8521 }
8522
8523 pub fn ip_address(&self) -> std::option::Option<&std::string::String> {
8527 #[allow(unreachable_patterns)]
8528 self.ip_range.as_ref().and_then(|v| match v {
8529 crate::model::external_access_rule::ip_range::IpRange::IpAddress(v) => {
8530 std::option::Option::Some(v)
8531 }
8532 _ => std::option::Option::None,
8533 })
8534 }
8535
8536 pub fn ip_address_range(&self) -> std::option::Option<&std::string::String> {
8540 #[allow(unreachable_patterns)]
8541 self.ip_range.as_ref().and_then(|v| match v {
8542 crate::model::external_access_rule::ip_range::IpRange::IpAddressRange(v) => {
8543 std::option::Option::Some(v)
8544 }
8545 _ => std::option::Option::None,
8546 })
8547 }
8548
8549 pub fn external_address(&self) -> std::option::Option<&std::string::String> {
8553 #[allow(unreachable_patterns)]
8554 self.ip_range.as_ref().and_then(|v| match v {
8555 crate::model::external_access_rule::ip_range::IpRange::ExternalAddress(v) => {
8556 std::option::Option::Some(v)
8557 }
8558 _ => std::option::Option::None,
8559 })
8560 }
8561
8562 pub fn set_ip_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8568 self.ip_range = std::option::Option::Some(
8569 crate::model::external_access_rule::ip_range::IpRange::IpAddress(v.into()),
8570 );
8571 self
8572 }
8573
8574 pub fn set_ip_address_range<T: std::convert::Into<std::string::String>>(
8580 mut self,
8581 v: T,
8582 ) -> Self {
8583 self.ip_range = std::option::Option::Some(
8584 crate::model::external_access_rule::ip_range::IpRange::IpAddressRange(v.into()),
8585 );
8586 self
8587 }
8588
8589 pub fn set_external_address<T: std::convert::Into<std::string::String>>(
8595 mut self,
8596 v: T,
8597 ) -> Self {
8598 self.ip_range = std::option::Option::Some(
8599 crate::model::external_access_rule::ip_range::IpRange::ExternalAddress(v.into()),
8600 );
8601 self
8602 }
8603 }
8604
8605 impl wkt::message::Message for IpRange {
8606 fn typename() -> &'static str {
8607 "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange"
8608 }
8609 }
8610
8611 pub mod ip_range {
8613 #[allow(unused_imports)]
8614 use super::*;
8615
8616 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8617 #[serde(rename_all = "camelCase")]
8618 #[non_exhaustive]
8619 pub enum IpRange {
8620 IpAddress(std::string::String),
8622 IpAddressRange(std::string::String),
8624 ExternalAddress(std::string::String),
8631 }
8632 }
8633
8634 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8637 pub struct Action(i32);
8638
8639 impl Action {
8640 pub const ACTION_UNSPECIFIED: Action = Action::new(0);
8642
8643 pub const ALLOW: Action = Action::new(1);
8645
8646 pub const DENY: Action = Action::new(2);
8648
8649 pub(crate) const fn new(value: i32) -> Self {
8651 Self(value)
8652 }
8653
8654 pub fn value(&self) -> i32 {
8656 self.0
8657 }
8658
8659 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8661 match self.0 {
8662 0 => std::borrow::Cow::Borrowed("ACTION_UNSPECIFIED"),
8663 1 => std::borrow::Cow::Borrowed("ALLOW"),
8664 2 => std::borrow::Cow::Borrowed("DENY"),
8665 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8666 }
8667 }
8668
8669 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8671 match name {
8672 "ACTION_UNSPECIFIED" => std::option::Option::Some(Self::ACTION_UNSPECIFIED),
8673 "ALLOW" => std::option::Option::Some(Self::ALLOW),
8674 "DENY" => std::option::Option::Some(Self::DENY),
8675 _ => std::option::Option::None,
8676 }
8677 }
8678 }
8679
8680 impl std::convert::From<i32> for Action {
8681 fn from(value: i32) -> Self {
8682 Self::new(value)
8683 }
8684 }
8685
8686 impl std::default::Default for Action {
8687 fn default() -> Self {
8688 Self::new(0)
8689 }
8690 }
8691
8692 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8694 pub struct State(i32);
8695
8696 impl State {
8697 pub const STATE_UNSPECIFIED: State = State::new(0);
8699
8700 pub const ACTIVE: State = State::new(1);
8702
8703 pub const CREATING: State = State::new(2);
8705
8706 pub const UPDATING: State = State::new(3);
8708
8709 pub const DELETING: State = State::new(4);
8711
8712 pub(crate) const fn new(value: i32) -> Self {
8714 Self(value)
8715 }
8716
8717 pub fn value(&self) -> i32 {
8719 self.0
8720 }
8721
8722 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8724 match self.0 {
8725 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
8726 1 => std::borrow::Cow::Borrowed("ACTIVE"),
8727 2 => std::borrow::Cow::Borrowed("CREATING"),
8728 3 => std::borrow::Cow::Borrowed("UPDATING"),
8729 4 => std::borrow::Cow::Borrowed("DELETING"),
8730 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8731 }
8732 }
8733
8734 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8736 match name {
8737 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
8738 "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
8739 "CREATING" => std::option::Option::Some(Self::CREATING),
8740 "UPDATING" => std::option::Option::Some(Self::UPDATING),
8741 "DELETING" => std::option::Option::Some(Self::DELETING),
8742 _ => std::option::Option::None,
8743 }
8744 }
8745 }
8746
8747 impl std::convert::From<i32> for State {
8748 fn from(value: i32) -> Self {
8749 Self::new(value)
8750 }
8751 }
8752
8753 impl std::default::Default for State {
8754 fn default() -> Self {
8755 Self::new(0)
8756 }
8757 }
8758}
8759
8760#[serde_with::serde_as]
8762#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8763#[serde(default, rename_all = "camelCase")]
8764#[non_exhaustive]
8765pub struct LoggingServer {
8766 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8772 pub name: std::string::String,
8773
8774 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8776 pub create_time: std::option::Option<wkt::Timestamp>,
8777
8778 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8780 pub update_time: std::option::Option<wkt::Timestamp>,
8781
8782 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8785 pub hostname: std::string::String,
8786
8787 pub port: i32,
8789
8790 pub protocol: crate::model::logging_server::Protocol,
8792
8793 pub source_type: crate::model::logging_server::SourceType,
8796
8797 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8799 pub uid: std::string::String,
8800
8801 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8802 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8803}
8804
8805impl LoggingServer {
8806 pub fn new() -> Self {
8807 std::default::Default::default()
8808 }
8809
8810 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8812 self.name = v.into();
8813 self
8814 }
8815
8816 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
8818 mut self,
8819 v: T,
8820 ) -> Self {
8821 self.create_time = v.into();
8822 self
8823 }
8824
8825 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
8827 mut self,
8828 v: T,
8829 ) -> Self {
8830 self.update_time = v.into();
8831 self
8832 }
8833
8834 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8836 self.hostname = v.into();
8837 self
8838 }
8839
8840 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8842 self.port = v.into();
8843 self
8844 }
8845
8846 pub fn set_protocol<T: std::convert::Into<crate::model::logging_server::Protocol>>(
8848 mut self,
8849 v: T,
8850 ) -> Self {
8851 self.protocol = v.into();
8852 self
8853 }
8854
8855 pub fn set_source_type<T: std::convert::Into<crate::model::logging_server::SourceType>>(
8857 mut self,
8858 v: T,
8859 ) -> Self {
8860 self.source_type = v.into();
8861 self
8862 }
8863
8864 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8866 self.uid = v.into();
8867 self
8868 }
8869}
8870
8871impl wkt::message::Message for LoggingServer {
8872 fn typename() -> &'static str {
8873 "type.googleapis.com/google.cloud.vmwareengine.v1.LoggingServer"
8874 }
8875}
8876
8877pub mod logging_server {
8879 #[allow(unused_imports)]
8880 use super::*;
8881
8882 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8885 pub struct Protocol(i32);
8886
8887 impl Protocol {
8888 pub const PROTOCOL_UNSPECIFIED: Protocol = Protocol::new(0);
8890
8891 pub const UDP: Protocol = Protocol::new(1);
8893
8894 pub const TCP: Protocol = Protocol::new(2);
8896
8897 pub const TLS: Protocol = Protocol::new(3);
8899
8900 pub const SSL: Protocol = Protocol::new(4);
8902
8903 pub const RELP: Protocol = Protocol::new(5);
8905
8906 pub(crate) const fn new(value: i32) -> Self {
8908 Self(value)
8909 }
8910
8911 pub fn value(&self) -> i32 {
8913 self.0
8914 }
8915
8916 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8918 match self.0 {
8919 0 => std::borrow::Cow::Borrowed("PROTOCOL_UNSPECIFIED"),
8920 1 => std::borrow::Cow::Borrowed("UDP"),
8921 2 => std::borrow::Cow::Borrowed("TCP"),
8922 3 => std::borrow::Cow::Borrowed("TLS"),
8923 4 => std::borrow::Cow::Borrowed("SSL"),
8924 5 => std::borrow::Cow::Borrowed("RELP"),
8925 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8926 }
8927 }
8928
8929 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8931 match name {
8932 "PROTOCOL_UNSPECIFIED" => std::option::Option::Some(Self::PROTOCOL_UNSPECIFIED),
8933 "UDP" => std::option::Option::Some(Self::UDP),
8934 "TCP" => std::option::Option::Some(Self::TCP),
8935 "TLS" => std::option::Option::Some(Self::TLS),
8936 "SSL" => std::option::Option::Some(Self::SSL),
8937 "RELP" => std::option::Option::Some(Self::RELP),
8938 _ => std::option::Option::None,
8939 }
8940 }
8941 }
8942
8943 impl std::convert::From<i32> for Protocol {
8944 fn from(value: i32) -> Self {
8945 Self::new(value)
8946 }
8947 }
8948
8949 impl std::default::Default for Protocol {
8950 fn default() -> Self {
8951 Self::new(0)
8952 }
8953 }
8954
8955 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8957 pub struct SourceType(i32);
8958
8959 impl SourceType {
8960 pub const SOURCE_TYPE_UNSPECIFIED: SourceType = SourceType::new(0);
8962
8963 pub const ESXI: SourceType = SourceType::new(1);
8965
8966 pub const VCSA: SourceType = SourceType::new(2);
8968
8969 pub(crate) const fn new(value: i32) -> Self {
8971 Self(value)
8972 }
8973
8974 pub fn value(&self) -> i32 {
8976 self.0
8977 }
8978
8979 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8981 match self.0 {
8982 0 => std::borrow::Cow::Borrowed("SOURCE_TYPE_UNSPECIFIED"),
8983 1 => std::borrow::Cow::Borrowed("ESXI"),
8984 2 => std::borrow::Cow::Borrowed("VCSA"),
8985 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8986 }
8987 }
8988
8989 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8991 match name {
8992 "SOURCE_TYPE_UNSPECIFIED" => {
8993 std::option::Option::Some(Self::SOURCE_TYPE_UNSPECIFIED)
8994 }
8995 "ESXI" => std::option::Option::Some(Self::ESXI),
8996 "VCSA" => std::option::Option::Some(Self::VCSA),
8997 _ => std::option::Option::None,
8998 }
8999 }
9000 }
9001
9002 impl std::convert::From<i32> for SourceType {
9003 fn from(value: i32) -> Self {
9004 Self::new(value)
9005 }
9006 }
9007
9008 impl std::default::Default for SourceType {
9009 fn default() -> Self {
9010 Self::new(0)
9011 }
9012 }
9013}
9014
9015#[serde_with::serde_as]
9017#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9018#[serde(default, rename_all = "camelCase")]
9019#[non_exhaustive]
9020pub struct NodeType {
9021 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9027 pub name: std::string::String,
9028
9029 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9032 pub node_type_id: std::string::String,
9033
9034 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9037 pub display_name: std::string::String,
9038
9039 pub virtual_cpu_count: i32,
9041
9042 pub total_core_count: i32,
9044
9045 pub memory_gb: i32,
9047
9048 pub disk_size_gb: i32,
9050
9051 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9053 pub available_custom_core_counts: std::vec::Vec<i32>,
9054
9055 pub kind: crate::model::node_type::Kind,
9057
9058 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9062 pub families: std::vec::Vec<std::string::String>,
9063
9064 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9066 pub capabilities: std::vec::Vec<crate::model::node_type::Capability>,
9067
9068 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9069 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9070}
9071
9072impl NodeType {
9073 pub fn new() -> Self {
9074 std::default::Default::default()
9075 }
9076
9077 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9079 self.name = v.into();
9080 self
9081 }
9082
9083 pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9085 self.node_type_id = v.into();
9086 self
9087 }
9088
9089 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9091 self.display_name = v.into();
9092 self
9093 }
9094
9095 pub fn set_virtual_cpu_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9097 self.virtual_cpu_count = v.into();
9098 self
9099 }
9100
9101 pub fn set_total_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9103 self.total_core_count = v.into();
9104 self
9105 }
9106
9107 pub fn set_memory_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9109 self.memory_gb = v.into();
9110 self
9111 }
9112
9113 pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9115 self.disk_size_gb = v.into();
9116 self
9117 }
9118
9119 pub fn set_kind<T: std::convert::Into<crate::model::node_type::Kind>>(mut self, v: T) -> Self {
9121 self.kind = v.into();
9122 self
9123 }
9124
9125 pub fn set_available_custom_core_counts<T, V>(mut self, v: T) -> Self
9127 where
9128 T: std::iter::IntoIterator<Item = V>,
9129 V: std::convert::Into<i32>,
9130 {
9131 use std::iter::Iterator;
9132 self.available_custom_core_counts = v.into_iter().map(|i| i.into()).collect();
9133 self
9134 }
9135
9136 pub fn set_families<T, V>(mut self, v: T) -> Self
9138 where
9139 T: std::iter::IntoIterator<Item = V>,
9140 V: std::convert::Into<std::string::String>,
9141 {
9142 use std::iter::Iterator;
9143 self.families = v.into_iter().map(|i| i.into()).collect();
9144 self
9145 }
9146
9147 pub fn set_capabilities<T, V>(mut self, v: T) -> Self
9149 where
9150 T: std::iter::IntoIterator<Item = V>,
9151 V: std::convert::Into<crate::model::node_type::Capability>,
9152 {
9153 use std::iter::Iterator;
9154 self.capabilities = v.into_iter().map(|i| i.into()).collect();
9155 self
9156 }
9157}
9158
9159impl wkt::message::Message for NodeType {
9160 fn typename() -> &'static str {
9161 "type.googleapis.com/google.cloud.vmwareengine.v1.NodeType"
9162 }
9163}
9164
9165pub mod node_type {
9167 #[allow(unused_imports)]
9168 use super::*;
9169
9170 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
9172 pub struct Kind(i32);
9173
9174 impl Kind {
9175 pub const KIND_UNSPECIFIED: Kind = Kind::new(0);
9177
9178 pub const STANDARD: Kind = Kind::new(1);
9180
9181 pub const STORAGE_ONLY: Kind = Kind::new(2);
9183
9184 pub(crate) const fn new(value: i32) -> Self {
9186 Self(value)
9187 }
9188
9189 pub fn value(&self) -> i32 {
9191 self.0
9192 }
9193
9194 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
9196 match self.0 {
9197 0 => std::borrow::Cow::Borrowed("KIND_UNSPECIFIED"),
9198 1 => std::borrow::Cow::Borrowed("STANDARD"),
9199 2 => std::borrow::Cow::Borrowed("STORAGE_ONLY"),
9200 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
9201 }
9202 }
9203
9204 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
9206 match name {
9207 "KIND_UNSPECIFIED" => std::option::Option::Some(Self::KIND_UNSPECIFIED),
9208 "STANDARD" => std::option::Option::Some(Self::STANDARD),
9209 "STORAGE_ONLY" => std::option::Option::Some(Self::STORAGE_ONLY),
9210 _ => std::option::Option::None,
9211 }
9212 }
9213 }
9214
9215 impl std::convert::From<i32> for Kind {
9216 fn from(value: i32) -> Self {
9217 Self::new(value)
9218 }
9219 }
9220
9221 impl std::default::Default for Kind {
9222 fn default() -> Self {
9223 Self::new(0)
9224 }
9225 }
9226
9227 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
9229 pub struct Capability(i32);
9230
9231 impl Capability {
9232 pub const CAPABILITY_UNSPECIFIED: Capability = Capability::new(0);
9235
9236 pub const STRETCHED_CLUSTERS: Capability = Capability::new(1);
9238
9239 pub(crate) const fn new(value: i32) -> Self {
9241 Self(value)
9242 }
9243
9244 pub fn value(&self) -> i32 {
9246 self.0
9247 }
9248
9249 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
9251 match self.0 {
9252 0 => std::borrow::Cow::Borrowed("CAPABILITY_UNSPECIFIED"),
9253 1 => std::borrow::Cow::Borrowed("STRETCHED_CLUSTERS"),
9254 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
9255 }
9256 }
9257
9258 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
9260 match name {
9261 "CAPABILITY_UNSPECIFIED" => std::option::Option::Some(Self::CAPABILITY_UNSPECIFIED),
9262 "STRETCHED_CLUSTERS" => std::option::Option::Some(Self::STRETCHED_CLUSTERS),
9263 _ => std::option::Option::None,
9264 }
9265 }
9266 }
9267
9268 impl std::convert::From<i32> for Capability {
9269 fn from(value: i32) -> Self {
9270 Self::new(value)
9271 }
9272 }
9273
9274 impl std::default::Default for Capability {
9275 fn default() -> Self {
9276 Self::new(0)
9277 }
9278 }
9279}
9280
9281#[serde_with::serde_as]
9283#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9284#[serde(default, rename_all = "camelCase")]
9285#[non_exhaustive]
9286pub struct Credentials {
9287 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9289 pub username: std::string::String,
9290
9291 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9293 pub password: std::string::String,
9294
9295 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9296 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9297}
9298
9299impl Credentials {
9300 pub fn new() -> Self {
9301 std::default::Default::default()
9302 }
9303
9304 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9306 self.username = v.into();
9307 self
9308 }
9309
9310 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9312 self.password = v.into();
9313 self
9314 }
9315}
9316
9317impl wkt::message::Message for Credentials {
9318 fn typename() -> &'static str {
9319 "type.googleapis.com/google.cloud.vmwareengine.v1.Credentials"
9320 }
9321}
9322
9323#[serde_with::serde_as]
9335#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9336#[serde(default, rename_all = "camelCase")]
9337#[non_exhaustive]
9338pub struct HcxActivationKey {
9339 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9345 pub name: std::string::String,
9346
9347 #[serde(skip_serializing_if = "std::option::Option::is_none")]
9349 pub create_time: std::option::Option<wkt::Timestamp>,
9350
9351 pub state: crate::model::hcx_activation_key::State,
9353
9354 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9356 pub activation_key: std::string::String,
9357
9358 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9360 pub uid: std::string::String,
9361
9362 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9363 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9364}
9365
9366impl HcxActivationKey {
9367 pub fn new() -> Self {
9368 std::default::Default::default()
9369 }
9370
9371 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9373 self.name = v.into();
9374 self
9375 }
9376
9377 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
9379 mut self,
9380 v: T,
9381 ) -> Self {
9382 self.create_time = v.into();
9383 self
9384 }
9385
9386 pub fn set_state<T: std::convert::Into<crate::model::hcx_activation_key::State>>(
9388 mut self,
9389 v: T,
9390 ) -> Self {
9391 self.state = v.into();
9392 self
9393 }
9394
9395 pub fn set_activation_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9397 self.activation_key = v.into();
9398 self
9399 }
9400
9401 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9403 self.uid = v.into();
9404 self
9405 }
9406}
9407
9408impl wkt::message::Message for HcxActivationKey {
9409 fn typename() -> &'static str {
9410 "type.googleapis.com/google.cloud.vmwareengine.v1.HcxActivationKey"
9411 }
9412}
9413
9414pub mod hcx_activation_key {
9416 #[allow(unused_imports)]
9417 use super::*;
9418
9419 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
9421 pub struct State(i32);
9422
9423 impl State {
9424 pub const STATE_UNSPECIFIED: State = State::new(0);
9426
9427 pub const AVAILABLE: State = State::new(1);
9429
9430 pub const CONSUMED: State = State::new(2);
9432
9433 pub const CREATING: State = State::new(3);
9435
9436 pub(crate) const fn new(value: i32) -> Self {
9438 Self(value)
9439 }
9440
9441 pub fn value(&self) -> i32 {
9443 self.0
9444 }
9445
9446 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
9448 match self.0 {
9449 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
9450 1 => std::borrow::Cow::Borrowed("AVAILABLE"),
9451 2 => std::borrow::Cow::Borrowed("CONSUMED"),
9452 3 => std::borrow::Cow::Borrowed("CREATING"),
9453 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
9454 }
9455 }
9456
9457 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
9459 match name {
9460 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
9461 "AVAILABLE" => std::option::Option::Some(Self::AVAILABLE),
9462 "CONSUMED" => std::option::Option::Some(Self::CONSUMED),
9463 "CREATING" => std::option::Option::Some(Self::CREATING),
9464 _ => std::option::Option::None,
9465 }
9466 }
9467 }
9468
9469 impl std::convert::From<i32> for State {
9470 fn from(value: i32) -> Self {
9471 Self::new(value)
9472 }
9473 }
9474
9475 impl std::default::Default for State {
9476 fn default() -> Self {
9477 Self::new(0)
9478 }
9479 }
9480}
9481
9482#[serde_with::serde_as]
9484#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9485#[serde(default, rename_all = "camelCase")]
9486#[non_exhaustive]
9487pub struct Hcx {
9488 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9490 pub internal_ip: std::string::String,
9491
9492 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9494 pub version: std::string::String,
9495
9496 pub state: crate::model::hcx::State,
9498
9499 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9501 pub fqdn: std::string::String,
9502
9503 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9504 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9505}
9506
9507impl Hcx {
9508 pub fn new() -> Self {
9509 std::default::Default::default()
9510 }
9511
9512 pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9514 self.internal_ip = v.into();
9515 self
9516 }
9517
9518 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9520 self.version = v.into();
9521 self
9522 }
9523
9524 pub fn set_state<T: std::convert::Into<crate::model::hcx::State>>(mut self, v: T) -> Self {
9526 self.state = v.into();
9527 self
9528 }
9529
9530 pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9532 self.fqdn = v.into();
9533 self
9534 }
9535}
9536
9537impl wkt::message::Message for Hcx {
9538 fn typename() -> &'static str {
9539 "type.googleapis.com/google.cloud.vmwareengine.v1.Hcx"
9540 }
9541}
9542
9543pub mod hcx {
9545 #[allow(unused_imports)]
9546 use super::*;
9547
9548 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
9550 pub struct State(i32);
9551
9552 impl State {
9553 pub const STATE_UNSPECIFIED: State = State::new(0);
9555
9556 pub const ACTIVE: State = State::new(1);
9558
9559 pub const CREATING: State = State::new(2);
9561
9562 pub const ACTIVATING: State = State::new(3);
9564
9565 pub(crate) const fn new(value: i32) -> Self {
9567 Self(value)
9568 }
9569
9570 pub fn value(&self) -> i32 {
9572 self.0
9573 }
9574
9575 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
9577 match self.0 {
9578 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
9579 1 => std::borrow::Cow::Borrowed("ACTIVE"),
9580 2 => std::borrow::Cow::Borrowed("CREATING"),
9581 3 => std::borrow::Cow::Borrowed("ACTIVATING"),
9582 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
9583 }
9584 }
9585
9586 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
9588 match name {
9589 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
9590 "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
9591 "CREATING" => std::option::Option::Some(Self::CREATING),
9592 "ACTIVATING" => std::option::Option::Some(Self::ACTIVATING),
9593 _ => std::option::Option::None,
9594 }
9595 }
9596 }
9597
9598 impl std::convert::From<i32> for State {
9599 fn from(value: i32) -> Self {
9600 Self::new(value)
9601 }
9602 }
9603
9604 impl std::default::Default for State {
9605 fn default() -> Self {
9606 Self::new(0)
9607 }
9608 }
9609}
9610
9611#[serde_with::serde_as]
9613#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9614#[serde(default, rename_all = "camelCase")]
9615#[non_exhaustive]
9616pub struct Nsx {
9617 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9619 pub internal_ip: std::string::String,
9620
9621 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9623 pub version: std::string::String,
9624
9625 pub state: crate::model::nsx::State,
9627
9628 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9630 pub fqdn: std::string::String,
9631
9632 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9633 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9634}
9635
9636impl Nsx {
9637 pub fn new() -> Self {
9638 std::default::Default::default()
9639 }
9640
9641 pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9643 self.internal_ip = v.into();
9644 self
9645 }
9646
9647 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9649 self.version = v.into();
9650 self
9651 }
9652
9653 pub fn set_state<T: std::convert::Into<crate::model::nsx::State>>(mut self, v: T) -> Self {
9655 self.state = v.into();
9656 self
9657 }
9658
9659 pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9661 self.fqdn = v.into();
9662 self
9663 }
9664}
9665
9666impl wkt::message::Message for Nsx {
9667 fn typename() -> &'static str {
9668 "type.googleapis.com/google.cloud.vmwareengine.v1.Nsx"
9669 }
9670}
9671
9672pub mod nsx {
9674 #[allow(unused_imports)]
9675 use super::*;
9676
9677 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
9679 pub struct State(i32);
9680
9681 impl State {
9682 pub const STATE_UNSPECIFIED: State = State::new(0);
9684
9685 pub const ACTIVE: State = State::new(1);
9687
9688 pub const CREATING: State = State::new(2);
9690
9691 pub(crate) const fn new(value: i32) -> Self {
9693 Self(value)
9694 }
9695
9696 pub fn value(&self) -> i32 {
9698 self.0
9699 }
9700
9701 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
9703 match self.0 {
9704 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
9705 1 => std::borrow::Cow::Borrowed("ACTIVE"),
9706 2 => std::borrow::Cow::Borrowed("CREATING"),
9707 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
9708 }
9709 }
9710
9711 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
9713 match name {
9714 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
9715 "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
9716 "CREATING" => std::option::Option::Some(Self::CREATING),
9717 _ => std::option::Option::None,
9718 }
9719 }
9720 }
9721
9722 impl std::convert::From<i32> for State {
9723 fn from(value: i32) -> Self {
9724 Self::new(value)
9725 }
9726 }
9727
9728 impl std::default::Default for State {
9729 fn default() -> Self {
9730 Self::new(0)
9731 }
9732 }
9733}
9734
9735#[serde_with::serde_as]
9737#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9738#[serde(default, rename_all = "camelCase")]
9739#[non_exhaustive]
9740pub struct Vcenter {
9741 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9743 pub internal_ip: std::string::String,
9744
9745 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9747 pub version: std::string::String,
9748
9749 pub state: crate::model::vcenter::State,
9751
9752 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9754 pub fqdn: std::string::String,
9755
9756 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9757 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9758}
9759
9760impl Vcenter {
9761 pub fn new() -> Self {
9762 std::default::Default::default()
9763 }
9764
9765 pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9767 self.internal_ip = v.into();
9768 self
9769 }
9770
9771 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9773 self.version = v.into();
9774 self
9775 }
9776
9777 pub fn set_state<T: std::convert::Into<crate::model::vcenter::State>>(mut self, v: T) -> Self {
9779 self.state = v.into();
9780 self
9781 }
9782
9783 pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9785 self.fqdn = v.into();
9786 self
9787 }
9788}
9789
9790impl wkt::message::Message for Vcenter {
9791 fn typename() -> &'static str {
9792 "type.googleapis.com/google.cloud.vmwareengine.v1.Vcenter"
9793 }
9794}
9795
9796pub mod vcenter {
9798 #[allow(unused_imports)]
9799 use super::*;
9800
9801 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
9803 pub struct State(i32);
9804
9805 impl State {
9806 pub const STATE_UNSPECIFIED: State = State::new(0);
9808
9809 pub const ACTIVE: State = State::new(1);
9811
9812 pub const CREATING: State = State::new(2);
9814
9815 pub(crate) const fn new(value: i32) -> Self {
9817 Self(value)
9818 }
9819
9820 pub fn value(&self) -> i32 {
9822 self.0
9823 }
9824
9825 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
9827 match self.0 {
9828 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
9829 1 => std::borrow::Cow::Borrowed("ACTIVE"),
9830 2 => std::borrow::Cow::Borrowed("CREATING"),
9831 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
9832 }
9833 }
9834
9835 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
9837 match name {
9838 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
9839 "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
9840 "CREATING" => std::option::Option::Some(Self::CREATING),
9841 _ => std::option::Option::None,
9842 }
9843 }
9844 }
9845
9846 impl std::convert::From<i32> for State {
9847 fn from(value: i32) -> Self {
9848 Self::new(value)
9849 }
9850 }
9851
9852 impl std::default::Default for State {
9853 fn default() -> Self {
9854 Self::new(0)
9855 }
9856 }
9857}
9858
9859#[serde_with::serde_as]
9862#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9863#[serde(default, rename_all = "camelCase")]
9864#[non_exhaustive]
9865pub struct AutoscalingSettings {
9866 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
9880 pub autoscaling_policies: std::collections::HashMap<
9881 std::string::String,
9882 crate::model::autoscaling_settings::AutoscalingPolicy,
9883 >,
9884
9885 pub min_cluster_node_count: i32,
9888
9889 pub max_cluster_node_count: i32,
9892
9893 #[serde(skip_serializing_if = "std::option::Option::is_none")]
9898 pub cool_down_period: std::option::Option<wkt::Duration>,
9899
9900 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9901 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9902}
9903
9904impl AutoscalingSettings {
9905 pub fn new() -> Self {
9906 std::default::Default::default()
9907 }
9908
9909 pub fn set_min_cluster_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9911 self.min_cluster_node_count = v.into();
9912 self
9913 }
9914
9915 pub fn set_max_cluster_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9917 self.max_cluster_node_count = v.into();
9918 self
9919 }
9920
9921 pub fn set_cool_down_period<T: std::convert::Into<std::option::Option<wkt::Duration>>>(
9923 mut self,
9924 v: T,
9925 ) -> Self {
9926 self.cool_down_period = v.into();
9927 self
9928 }
9929
9930 pub fn set_autoscaling_policies<T, K, V>(mut self, v: T) -> Self
9932 where
9933 T: std::iter::IntoIterator<Item = (K, V)>,
9934 K: std::convert::Into<std::string::String>,
9935 V: std::convert::Into<crate::model::autoscaling_settings::AutoscalingPolicy>,
9936 {
9937 use std::iter::Iterator;
9938 self.autoscaling_policies = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9939 self
9940 }
9941}
9942
9943impl wkt::message::Message for AutoscalingSettings {
9944 fn typename() -> &'static str {
9945 "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings"
9946 }
9947}
9948
9949pub mod autoscaling_settings {
9951 #[allow(unused_imports)]
9952 use super::*;
9953
9954 #[serde_with::serde_as]
9957 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9958 #[serde(default, rename_all = "camelCase")]
9959 #[non_exhaustive]
9960 pub struct Thresholds {
9961 pub scale_out: i32,
9963
9964 pub scale_in: i32,
9966
9967 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9968 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9969 }
9970
9971 impl Thresholds {
9972 pub fn new() -> Self {
9973 std::default::Default::default()
9974 }
9975
9976 pub fn set_scale_out<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9978 self.scale_out = v.into();
9979 self
9980 }
9981
9982 pub fn set_scale_in<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9984 self.scale_in = v.into();
9985 self
9986 }
9987 }
9988
9989 impl wkt::message::Message for Thresholds {
9990 fn typename() -> &'static str {
9991 "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds"
9992 }
9993 }
9994
9995 #[serde_with::serde_as]
10002 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10003 #[serde(default, rename_all = "camelCase")]
10004 #[non_exhaustive]
10005 pub struct AutoscalingPolicy {
10006 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10009 pub node_type_id: std::string::String,
10010
10011 pub scale_out_size: i32,
10016
10017 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10019 pub cpu_thresholds: std::option::Option<crate::model::autoscaling_settings::Thresholds>,
10020
10021 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10023 pub granted_memory_thresholds:
10024 std::option::Option<crate::model::autoscaling_settings::Thresholds>,
10025
10026 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10028 pub consumed_memory_thresholds:
10029 std::option::Option<crate::model::autoscaling_settings::Thresholds>,
10030
10031 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10034 pub storage_thresholds: std::option::Option<crate::model::autoscaling_settings::Thresholds>,
10035
10036 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10037 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10038 }
10039
10040 impl AutoscalingPolicy {
10041 pub fn new() -> Self {
10042 std::default::Default::default()
10043 }
10044
10045 pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(
10047 mut self,
10048 v: T,
10049 ) -> Self {
10050 self.node_type_id = v.into();
10051 self
10052 }
10053
10054 pub fn set_scale_out_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10056 self.scale_out_size = v.into();
10057 self
10058 }
10059
10060 pub fn set_cpu_thresholds<
10062 T: std::convert::Into<std::option::Option<crate::model::autoscaling_settings::Thresholds>>,
10063 >(
10064 mut self,
10065 v: T,
10066 ) -> Self {
10067 self.cpu_thresholds = v.into();
10068 self
10069 }
10070
10071 pub fn set_granted_memory_thresholds<
10073 T: std::convert::Into<std::option::Option<crate::model::autoscaling_settings::Thresholds>>,
10074 >(
10075 mut self,
10076 v: T,
10077 ) -> Self {
10078 self.granted_memory_thresholds = v.into();
10079 self
10080 }
10081
10082 pub fn set_consumed_memory_thresholds<
10084 T: std::convert::Into<std::option::Option<crate::model::autoscaling_settings::Thresholds>>,
10085 >(
10086 mut self,
10087 v: T,
10088 ) -> Self {
10089 self.consumed_memory_thresholds = v.into();
10090 self
10091 }
10092
10093 pub fn set_storage_thresholds<
10095 T: std::convert::Into<std::option::Option<crate::model::autoscaling_settings::Thresholds>>,
10096 >(
10097 mut self,
10098 v: T,
10099 ) -> Self {
10100 self.storage_thresholds = v.into();
10101 self
10102 }
10103 }
10104
10105 impl wkt::message::Message for AutoscalingPolicy {
10106 fn typename() -> &'static str {
10107 "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings.AutoscalingPolicy"
10108 }
10109 }
10110}
10111
10112#[serde_with::serde_as]
10116#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10117#[serde(default, rename_all = "camelCase")]
10118#[non_exhaustive]
10119pub struct DnsForwarding {
10120 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10126 pub name: std::string::String,
10127
10128 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10130 pub create_time: std::option::Option<wkt::Timestamp>,
10131
10132 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10134 pub update_time: std::option::Option<wkt::Timestamp>,
10135
10136 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
10138 pub forwarding_rules: std::vec::Vec<crate::model::dns_forwarding::ForwardingRule>,
10139
10140 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10141 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10142}
10143
10144impl DnsForwarding {
10145 pub fn new() -> Self {
10146 std::default::Default::default()
10147 }
10148
10149 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10151 self.name = v.into();
10152 self
10153 }
10154
10155 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10157 mut self,
10158 v: T,
10159 ) -> Self {
10160 self.create_time = v.into();
10161 self
10162 }
10163
10164 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10166 mut self,
10167 v: T,
10168 ) -> Self {
10169 self.update_time = v.into();
10170 self
10171 }
10172
10173 pub fn set_forwarding_rules<T, V>(mut self, v: T) -> Self
10175 where
10176 T: std::iter::IntoIterator<Item = V>,
10177 V: std::convert::Into<crate::model::dns_forwarding::ForwardingRule>,
10178 {
10179 use std::iter::Iterator;
10180 self.forwarding_rules = v.into_iter().map(|i| i.into()).collect();
10181 self
10182 }
10183}
10184
10185impl wkt::message::Message for DnsForwarding {
10186 fn typename() -> &'static str {
10187 "type.googleapis.com/google.cloud.vmwareengine.v1.DnsForwarding"
10188 }
10189}
10190
10191pub mod dns_forwarding {
10193 #[allow(unused_imports)]
10194 use super::*;
10195
10196 #[serde_with::serde_as]
10201 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10202 #[serde(default, rename_all = "camelCase")]
10203 #[non_exhaustive]
10204 pub struct ForwardingRule {
10205 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10207 pub domain: std::string::String,
10208
10209 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
10211 pub name_servers: std::vec::Vec<std::string::String>,
10212
10213 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10214 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10215 }
10216
10217 impl ForwardingRule {
10218 pub fn new() -> Self {
10219 std::default::Default::default()
10220 }
10221
10222 pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10224 self.domain = v.into();
10225 self
10226 }
10227
10228 pub fn set_name_servers<T, V>(mut self, v: T) -> Self
10230 where
10231 T: std::iter::IntoIterator<Item = V>,
10232 V: std::convert::Into<std::string::String>,
10233 {
10234 use std::iter::Iterator;
10235 self.name_servers = v.into_iter().map(|i| i.into()).collect();
10236 self
10237 }
10238 }
10239
10240 impl wkt::message::Message for ForwardingRule {
10241 fn typename() -> &'static str {
10242 "type.googleapis.com/google.cloud.vmwareengine.v1.DnsForwarding.ForwardingRule"
10243 }
10244 }
10245}
10246
10247#[serde_with::serde_as]
10249#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10250#[serde(default, rename_all = "camelCase")]
10251#[non_exhaustive]
10252pub struct NetworkPeering {
10253 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10260 pub name: std::string::String,
10261
10262 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10264 pub create_time: std::option::Option<wkt::Timestamp>,
10265
10266 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10268 pub update_time: std::option::Option<wkt::Timestamp>,
10269
10270 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10279 pub peer_network: std::string::String,
10280
10281 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10284 pub export_custom_routes: std::option::Option<bool>,
10285
10286 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10289 pub import_custom_routes: std::option::Option<bool>,
10290
10291 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10297 pub exchange_subnet_routes: std::option::Option<bool>,
10298
10299 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10304 pub export_custom_routes_with_public_ip: std::option::Option<bool>,
10305
10306 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10311 pub import_custom_routes_with_public_ip: std::option::Option<bool>,
10312
10313 pub state: crate::model::network_peering::State,
10317
10318 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10321 pub state_details: std::string::String,
10322
10323 pub peer_mtu: i32,
10327
10328 pub peer_network_type: crate::model::network_peering::PeerNetworkType,
10330
10331 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10333 pub uid: std::string::String,
10334
10335 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10340 pub vmware_engine_network: std::string::String,
10341
10342 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10344 pub description: std::string::String,
10345
10346 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10347 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10348}
10349
10350impl NetworkPeering {
10351 pub fn new() -> Self {
10352 std::default::Default::default()
10353 }
10354
10355 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10357 self.name = v.into();
10358 self
10359 }
10360
10361 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10363 mut self,
10364 v: T,
10365 ) -> Self {
10366 self.create_time = v.into();
10367 self
10368 }
10369
10370 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10372 mut self,
10373 v: T,
10374 ) -> Self {
10375 self.update_time = v.into();
10376 self
10377 }
10378
10379 pub fn set_peer_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10381 self.peer_network = v.into();
10382 self
10383 }
10384
10385 pub fn set_export_custom_routes<T: std::convert::Into<std::option::Option<bool>>>(
10387 mut self,
10388 v: T,
10389 ) -> Self {
10390 self.export_custom_routes = v.into();
10391 self
10392 }
10393
10394 pub fn set_import_custom_routes<T: std::convert::Into<std::option::Option<bool>>>(
10396 mut self,
10397 v: T,
10398 ) -> Self {
10399 self.import_custom_routes = v.into();
10400 self
10401 }
10402
10403 pub fn set_exchange_subnet_routes<T: std::convert::Into<std::option::Option<bool>>>(
10405 mut self,
10406 v: T,
10407 ) -> Self {
10408 self.exchange_subnet_routes = v.into();
10409 self
10410 }
10411
10412 pub fn set_export_custom_routes_with_public_ip<
10414 T: std::convert::Into<std::option::Option<bool>>,
10415 >(
10416 mut self,
10417 v: T,
10418 ) -> Self {
10419 self.export_custom_routes_with_public_ip = v.into();
10420 self
10421 }
10422
10423 pub fn set_import_custom_routes_with_public_ip<
10425 T: std::convert::Into<std::option::Option<bool>>,
10426 >(
10427 mut self,
10428 v: T,
10429 ) -> Self {
10430 self.import_custom_routes_with_public_ip = v.into();
10431 self
10432 }
10433
10434 pub fn set_state<T: std::convert::Into<crate::model::network_peering::State>>(
10436 mut self,
10437 v: T,
10438 ) -> Self {
10439 self.state = v.into();
10440 self
10441 }
10442
10443 pub fn set_state_details<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10445 self.state_details = v.into();
10446 self
10447 }
10448
10449 pub fn set_peer_mtu<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10451 self.peer_mtu = v.into();
10452 self
10453 }
10454
10455 pub fn set_peer_network_type<
10457 T: std::convert::Into<crate::model::network_peering::PeerNetworkType>,
10458 >(
10459 mut self,
10460 v: T,
10461 ) -> Self {
10462 self.peer_network_type = v.into();
10463 self
10464 }
10465
10466 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10468 self.uid = v.into();
10469 self
10470 }
10471
10472 pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
10474 mut self,
10475 v: T,
10476 ) -> Self {
10477 self.vmware_engine_network = v.into();
10478 self
10479 }
10480
10481 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10483 self.description = v.into();
10484 self
10485 }
10486}
10487
10488impl wkt::message::Message for NetworkPeering {
10489 fn typename() -> &'static str {
10490 "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPeering"
10491 }
10492}
10493
10494pub mod network_peering {
10496 #[allow(unused_imports)]
10497 use super::*;
10498
10499 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
10501 pub struct State(i32);
10502
10503 impl State {
10504 pub const STATE_UNSPECIFIED: State = State::new(0);
10506
10507 pub const INACTIVE: State = State::new(1);
10509
10510 pub const ACTIVE: State = State::new(2);
10512
10513 pub const CREATING: State = State::new(3);
10515
10516 pub const DELETING: State = State::new(4);
10518
10519 pub(crate) const fn new(value: i32) -> Self {
10521 Self(value)
10522 }
10523
10524 pub fn value(&self) -> i32 {
10526 self.0
10527 }
10528
10529 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
10531 match self.0 {
10532 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
10533 1 => std::borrow::Cow::Borrowed("INACTIVE"),
10534 2 => std::borrow::Cow::Borrowed("ACTIVE"),
10535 3 => std::borrow::Cow::Borrowed("CREATING"),
10536 4 => std::borrow::Cow::Borrowed("DELETING"),
10537 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
10538 }
10539 }
10540
10541 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
10543 match name {
10544 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
10545 "INACTIVE" => std::option::Option::Some(Self::INACTIVE),
10546 "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
10547 "CREATING" => std::option::Option::Some(Self::CREATING),
10548 "DELETING" => std::option::Option::Some(Self::DELETING),
10549 _ => std::option::Option::None,
10550 }
10551 }
10552 }
10553
10554 impl std::convert::From<i32> for State {
10555 fn from(value: i32) -> Self {
10556 Self::new(value)
10557 }
10558 }
10559
10560 impl std::default::Default for State {
10561 fn default() -> Self {
10562 Self::new(0)
10563 }
10564 }
10565
10566 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
10568 pub struct PeerNetworkType(i32);
10569
10570 impl PeerNetworkType {
10571 pub const PEER_NETWORK_TYPE_UNSPECIFIED: PeerNetworkType = PeerNetworkType::new(0);
10573
10574 pub const STANDARD: PeerNetworkType = PeerNetworkType::new(1);
10578
10579 pub const VMWARE_ENGINE_NETWORK: PeerNetworkType = PeerNetworkType::new(2);
10581
10582 pub const PRIVATE_SERVICES_ACCESS: PeerNetworkType = PeerNetworkType::new(3);
10585
10586 pub const NETAPP_CLOUD_VOLUMES: PeerNetworkType = PeerNetworkType::new(4);
10588
10589 pub const THIRD_PARTY_SERVICE: PeerNetworkType = PeerNetworkType::new(5);
10593
10594 pub const DELL_POWERSCALE: PeerNetworkType = PeerNetworkType::new(6);
10596
10597 pub const GOOGLE_CLOUD_NETAPP_VOLUMES: PeerNetworkType = PeerNetworkType::new(7);
10599
10600 pub(crate) const fn new(value: i32) -> Self {
10602 Self(value)
10603 }
10604
10605 pub fn value(&self) -> i32 {
10607 self.0
10608 }
10609
10610 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
10612 match self.0 {
10613 0 => std::borrow::Cow::Borrowed("PEER_NETWORK_TYPE_UNSPECIFIED"),
10614 1 => std::borrow::Cow::Borrowed("STANDARD"),
10615 2 => std::borrow::Cow::Borrowed("VMWARE_ENGINE_NETWORK"),
10616 3 => std::borrow::Cow::Borrowed("PRIVATE_SERVICES_ACCESS"),
10617 4 => std::borrow::Cow::Borrowed("NETAPP_CLOUD_VOLUMES"),
10618 5 => std::borrow::Cow::Borrowed("THIRD_PARTY_SERVICE"),
10619 6 => std::borrow::Cow::Borrowed("DELL_POWERSCALE"),
10620 7 => std::borrow::Cow::Borrowed("GOOGLE_CLOUD_NETAPP_VOLUMES"),
10621 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
10622 }
10623 }
10624
10625 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
10627 match name {
10628 "PEER_NETWORK_TYPE_UNSPECIFIED" => {
10629 std::option::Option::Some(Self::PEER_NETWORK_TYPE_UNSPECIFIED)
10630 }
10631 "STANDARD" => std::option::Option::Some(Self::STANDARD),
10632 "VMWARE_ENGINE_NETWORK" => std::option::Option::Some(Self::VMWARE_ENGINE_NETWORK),
10633 "PRIVATE_SERVICES_ACCESS" => {
10634 std::option::Option::Some(Self::PRIVATE_SERVICES_ACCESS)
10635 }
10636 "NETAPP_CLOUD_VOLUMES" => std::option::Option::Some(Self::NETAPP_CLOUD_VOLUMES),
10637 "THIRD_PARTY_SERVICE" => std::option::Option::Some(Self::THIRD_PARTY_SERVICE),
10638 "DELL_POWERSCALE" => std::option::Option::Some(Self::DELL_POWERSCALE),
10639 "GOOGLE_CLOUD_NETAPP_VOLUMES" => {
10640 std::option::Option::Some(Self::GOOGLE_CLOUD_NETAPP_VOLUMES)
10641 }
10642 _ => std::option::Option::None,
10643 }
10644 }
10645 }
10646
10647 impl std::convert::From<i32> for PeerNetworkType {
10648 fn from(value: i32) -> Self {
10649 Self::new(value)
10650 }
10651 }
10652
10653 impl std::default::Default for PeerNetworkType {
10654 fn default() -> Self {
10655 Self::new(0)
10656 }
10657 }
10658}
10659
10660#[serde_with::serde_as]
10662#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10663#[serde(default, rename_all = "camelCase")]
10664#[non_exhaustive]
10665pub struct PeeringRoute {
10666 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10668 pub dest_range: std::string::String,
10669
10670 #[serde(rename = "type")]
10672 pub r#type: crate::model::peering_route::Type,
10673
10674 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10677 pub next_hop_region: std::string::String,
10678
10679 #[serde_as(as = "serde_with::DisplayFromStr")]
10681 pub priority: i64,
10682
10683 pub imported: bool,
10689
10690 pub direction: crate::model::peering_route::Direction,
10697
10698 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10699 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10700}
10701
10702impl PeeringRoute {
10703 pub fn new() -> Self {
10704 std::default::Default::default()
10705 }
10706
10707 pub fn set_dest_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10709 self.dest_range = v.into();
10710 self
10711 }
10712
10713 pub fn set_type<T: std::convert::Into<crate::model::peering_route::Type>>(
10715 mut self,
10716 v: T,
10717 ) -> Self {
10718 self.r#type = v.into();
10719 self
10720 }
10721
10722 pub fn set_next_hop_region<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10724 self.next_hop_region = v.into();
10725 self
10726 }
10727
10728 pub fn set_priority<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10730 self.priority = v.into();
10731 self
10732 }
10733
10734 pub fn set_imported<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10736 self.imported = v.into();
10737 self
10738 }
10739
10740 pub fn set_direction<T: std::convert::Into<crate::model::peering_route::Direction>>(
10742 mut self,
10743 v: T,
10744 ) -> Self {
10745 self.direction = v.into();
10746 self
10747 }
10748}
10749
10750impl wkt::message::Message for PeeringRoute {
10751 fn typename() -> &'static str {
10752 "type.googleapis.com/google.cloud.vmwareengine.v1.PeeringRoute"
10753 }
10754}
10755
10756pub mod peering_route {
10758 #[allow(unused_imports)]
10759 use super::*;
10760
10761 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
10763 pub struct Type(i32);
10764
10765 impl Type {
10766 pub const TYPE_UNSPECIFIED: Type = Type::new(0);
10768
10769 pub const DYNAMIC_PEERING_ROUTE: Type = Type::new(1);
10771
10772 pub const STATIC_PEERING_ROUTE: Type = Type::new(2);
10774
10775 pub const SUBNET_PEERING_ROUTE: Type = Type::new(3);
10778
10779 pub(crate) const fn new(value: i32) -> Self {
10781 Self(value)
10782 }
10783
10784 pub fn value(&self) -> i32 {
10786 self.0
10787 }
10788
10789 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
10791 match self.0 {
10792 0 => std::borrow::Cow::Borrowed("TYPE_UNSPECIFIED"),
10793 1 => std::borrow::Cow::Borrowed("DYNAMIC_PEERING_ROUTE"),
10794 2 => std::borrow::Cow::Borrowed("STATIC_PEERING_ROUTE"),
10795 3 => std::borrow::Cow::Borrowed("SUBNET_PEERING_ROUTE"),
10796 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
10797 }
10798 }
10799
10800 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
10802 match name {
10803 "TYPE_UNSPECIFIED" => std::option::Option::Some(Self::TYPE_UNSPECIFIED),
10804 "DYNAMIC_PEERING_ROUTE" => std::option::Option::Some(Self::DYNAMIC_PEERING_ROUTE),
10805 "STATIC_PEERING_ROUTE" => std::option::Option::Some(Self::STATIC_PEERING_ROUTE),
10806 "SUBNET_PEERING_ROUTE" => std::option::Option::Some(Self::SUBNET_PEERING_ROUTE),
10807 _ => std::option::Option::None,
10808 }
10809 }
10810 }
10811
10812 impl std::convert::From<i32> for Type {
10813 fn from(value: i32) -> Self {
10814 Self::new(value)
10815 }
10816 }
10817
10818 impl std::default::Default for Type {
10819 fn default() -> Self {
10820 Self::new(0)
10821 }
10822 }
10823
10824 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
10826 pub struct Direction(i32);
10827
10828 impl Direction {
10829 pub const DIRECTION_UNSPECIFIED: Direction = Direction::new(0);
10831
10832 pub const INCOMING: Direction = Direction::new(1);
10834
10835 pub const OUTGOING: Direction = Direction::new(2);
10837
10838 pub(crate) const fn new(value: i32) -> Self {
10840 Self(value)
10841 }
10842
10843 pub fn value(&self) -> i32 {
10845 self.0
10846 }
10847
10848 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
10850 match self.0 {
10851 0 => std::borrow::Cow::Borrowed("DIRECTION_UNSPECIFIED"),
10852 1 => std::borrow::Cow::Borrowed("INCOMING"),
10853 2 => std::borrow::Cow::Borrowed("OUTGOING"),
10854 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
10855 }
10856 }
10857
10858 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
10860 match name {
10861 "DIRECTION_UNSPECIFIED" => std::option::Option::Some(Self::DIRECTION_UNSPECIFIED),
10862 "INCOMING" => std::option::Option::Some(Self::INCOMING),
10863 "OUTGOING" => std::option::Option::Some(Self::OUTGOING),
10864 _ => std::option::Option::None,
10865 }
10866 }
10867 }
10868
10869 impl std::convert::From<i32> for Direction {
10870 fn from(value: i32) -> Self {
10871 Self::new(value)
10872 }
10873 }
10874
10875 impl std::default::Default for Direction {
10876 fn default() -> Self {
10877 Self::new(0)
10878 }
10879 }
10880}
10881
10882#[serde_with::serde_as]
10889#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10890#[serde(default, rename_all = "camelCase")]
10891#[non_exhaustive]
10892pub struct NetworkPolicy {
10893 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10899 pub name: std::string::String,
10900
10901 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10903 pub create_time: std::option::Option<wkt::Timestamp>,
10904
10905 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10907 pub update_time: std::option::Option<wkt::Timestamp>,
10908
10909 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10911 pub internet_access: std::option::Option<crate::model::network_policy::NetworkService>,
10912
10913 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10917 pub external_ip: std::option::Option<crate::model::network_policy::NetworkService>,
10918
10919 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10924 pub edge_services_cidr: std::string::String,
10925
10926 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10928 pub uid: std::string::String,
10929
10930 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10935 pub vmware_engine_network: std::string::String,
10936
10937 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10939 pub description: std::string::String,
10940
10941 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10944 pub vmware_engine_network_canonical: std::string::String,
10945
10946 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10947 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10948}
10949
10950impl NetworkPolicy {
10951 pub fn new() -> Self {
10952 std::default::Default::default()
10953 }
10954
10955 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10957 self.name = v.into();
10958 self
10959 }
10960
10961 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10963 mut self,
10964 v: T,
10965 ) -> Self {
10966 self.create_time = v.into();
10967 self
10968 }
10969
10970 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10972 mut self,
10973 v: T,
10974 ) -> Self {
10975 self.update_time = v.into();
10976 self
10977 }
10978
10979 pub fn set_internet_access<
10981 T: std::convert::Into<std::option::Option<crate::model::network_policy::NetworkService>>,
10982 >(
10983 mut self,
10984 v: T,
10985 ) -> Self {
10986 self.internet_access = v.into();
10987 self
10988 }
10989
10990 pub fn set_external_ip<
10992 T: std::convert::Into<std::option::Option<crate::model::network_policy::NetworkService>>,
10993 >(
10994 mut self,
10995 v: T,
10996 ) -> Self {
10997 self.external_ip = v.into();
10998 self
10999 }
11000
11001 pub fn set_edge_services_cidr<T: std::convert::Into<std::string::String>>(
11003 mut self,
11004 v: T,
11005 ) -> Self {
11006 self.edge_services_cidr = v.into();
11007 self
11008 }
11009
11010 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11012 self.uid = v.into();
11013 self
11014 }
11015
11016 pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
11018 mut self,
11019 v: T,
11020 ) -> Self {
11021 self.vmware_engine_network = v.into();
11022 self
11023 }
11024
11025 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11027 self.description = v.into();
11028 self
11029 }
11030
11031 pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
11033 mut self,
11034 v: T,
11035 ) -> Self {
11036 self.vmware_engine_network_canonical = v.into();
11037 self
11038 }
11039}
11040
11041impl wkt::message::Message for NetworkPolicy {
11042 fn typename() -> &'static str {
11043 "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPolicy"
11044 }
11045}
11046
11047pub mod network_policy {
11049 #[allow(unused_imports)]
11050 use super::*;
11051
11052 #[serde_with::serde_as]
11058 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11059 #[serde(default, rename_all = "camelCase")]
11060 #[non_exhaustive]
11061 pub struct NetworkService {
11062 pub enabled: bool,
11064
11065 pub state: crate::model::network_policy::network_service::State,
11068
11069 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11070 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11071 }
11072
11073 impl NetworkService {
11074 pub fn new() -> Self {
11075 std::default::Default::default()
11076 }
11077
11078 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11080 self.enabled = v.into();
11081 self
11082 }
11083
11084 pub fn set_state<
11086 T: std::convert::Into<crate::model::network_policy::network_service::State>,
11087 >(
11088 mut self,
11089 v: T,
11090 ) -> Self {
11091 self.state = v.into();
11092 self
11093 }
11094 }
11095
11096 impl wkt::message::Message for NetworkService {
11097 fn typename() -> &'static str {
11098 "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService"
11099 }
11100 }
11101
11102 pub mod network_service {
11104 #[allow(unused_imports)]
11105 use super::*;
11106
11107 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
11110 pub struct State(i32);
11111
11112 impl State {
11113 pub const STATE_UNSPECIFIED: State = State::new(0);
11115
11116 pub const UNPROVISIONED: State = State::new(1);
11118
11119 pub const RECONCILING: State = State::new(2);
11121
11122 pub const ACTIVE: State = State::new(3);
11124
11125 pub(crate) const fn new(value: i32) -> Self {
11127 Self(value)
11128 }
11129
11130 pub fn value(&self) -> i32 {
11132 self.0
11133 }
11134
11135 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
11137 match self.0 {
11138 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
11139 1 => std::borrow::Cow::Borrowed("UNPROVISIONED"),
11140 2 => std::borrow::Cow::Borrowed("RECONCILING"),
11141 3 => std::borrow::Cow::Borrowed("ACTIVE"),
11142 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
11143 }
11144 }
11145
11146 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
11148 match name {
11149 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
11150 "UNPROVISIONED" => std::option::Option::Some(Self::UNPROVISIONED),
11151 "RECONCILING" => std::option::Option::Some(Self::RECONCILING),
11152 "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
11153 _ => std::option::Option::None,
11154 }
11155 }
11156 }
11157
11158 impl std::convert::From<i32> for State {
11159 fn from(value: i32) -> Self {
11160 Self::new(value)
11161 }
11162 }
11163
11164 impl std::default::Default for State {
11165 fn default() -> Self {
11166 Self::new(0)
11167 }
11168 }
11169 }
11170}
11171
11172#[serde_with::serde_as]
11178#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11179#[serde(default, rename_all = "camelCase")]
11180#[non_exhaustive]
11181pub struct ManagementDnsZoneBinding {
11182 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11188 pub name: std::string::String,
11189
11190 #[serde(skip_serializing_if = "std::option::Option::is_none")]
11192 pub create_time: std::option::Option<wkt::Timestamp>,
11193
11194 #[serde(skip_serializing_if = "std::option::Option::is_none")]
11196 pub update_time: std::option::Option<wkt::Timestamp>,
11197
11198 pub state: crate::model::management_dns_zone_binding::State,
11200
11201 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11203 pub description: std::string::String,
11204
11205 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11207 pub uid: std::string::String,
11208
11209 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
11213 pub bind_network: std::option::Option<crate::model::management_dns_zone_binding::BindNetwork>,
11214
11215 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11216 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11217}
11218
11219impl ManagementDnsZoneBinding {
11220 pub fn new() -> Self {
11221 std::default::Default::default()
11222 }
11223
11224 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11226 self.name = v.into();
11227 self
11228 }
11229
11230 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
11232 mut self,
11233 v: T,
11234 ) -> Self {
11235 self.create_time = v.into();
11236 self
11237 }
11238
11239 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
11241 mut self,
11242 v: T,
11243 ) -> Self {
11244 self.update_time = v.into();
11245 self
11246 }
11247
11248 pub fn set_state<T: std::convert::Into<crate::model::management_dns_zone_binding::State>>(
11250 mut self,
11251 v: T,
11252 ) -> Self {
11253 self.state = v.into();
11254 self
11255 }
11256
11257 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11259 self.description = v.into();
11260 self
11261 }
11262
11263 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11265 self.uid = v.into();
11266 self
11267 }
11268
11269 pub fn set_bind_network<
11274 T: std::convert::Into<
11275 std::option::Option<crate::model::management_dns_zone_binding::BindNetwork>,
11276 >,
11277 >(
11278 mut self,
11279 v: T,
11280 ) -> Self {
11281 self.bind_network = v.into();
11282 self
11283 }
11284
11285 pub fn vpc_network(&self) -> std::option::Option<&std::string::String> {
11289 #[allow(unreachable_patterns)]
11290 self.bind_network.as_ref().and_then(|v| match v {
11291 crate::model::management_dns_zone_binding::BindNetwork::VpcNetwork(v) => {
11292 std::option::Option::Some(v)
11293 }
11294 _ => std::option::Option::None,
11295 })
11296 }
11297
11298 pub fn vmware_engine_network(&self) -> std::option::Option<&std::string::String> {
11302 #[allow(unreachable_patterns)]
11303 self.bind_network.as_ref().and_then(|v| match v {
11304 crate::model::management_dns_zone_binding::BindNetwork::VmwareEngineNetwork(v) => {
11305 std::option::Option::Some(v)
11306 }
11307 _ => std::option::Option::None,
11308 })
11309 }
11310
11311 pub fn set_vpc_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11317 self.bind_network = std::option::Option::Some(
11318 crate::model::management_dns_zone_binding::BindNetwork::VpcNetwork(v.into()),
11319 );
11320 self
11321 }
11322
11323 pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
11329 mut self,
11330 v: T,
11331 ) -> Self {
11332 self.bind_network = std::option::Option::Some(
11333 crate::model::management_dns_zone_binding::BindNetwork::VmwareEngineNetwork(v.into()),
11334 );
11335 self
11336 }
11337}
11338
11339impl wkt::message::Message for ManagementDnsZoneBinding {
11340 fn typename() -> &'static str {
11341 "type.googleapis.com/google.cloud.vmwareengine.v1.ManagementDnsZoneBinding"
11342 }
11343}
11344
11345pub mod management_dns_zone_binding {
11347 #[allow(unused_imports)]
11348 use super::*;
11349
11350 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
11353 pub struct State(i32);
11354
11355 impl State {
11356 pub const STATE_UNSPECIFIED: State = State::new(0);
11358
11359 pub const ACTIVE: State = State::new(1);
11361
11362 pub const CREATING: State = State::new(2);
11364
11365 pub const UPDATING: State = State::new(3);
11367
11368 pub const DELETING: State = State::new(4);
11370
11371 pub const FAILED: State = State::new(5);
11373
11374 pub(crate) const fn new(value: i32) -> Self {
11376 Self(value)
11377 }
11378
11379 pub fn value(&self) -> i32 {
11381 self.0
11382 }
11383
11384 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
11386 match self.0 {
11387 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
11388 1 => std::borrow::Cow::Borrowed("ACTIVE"),
11389 2 => std::borrow::Cow::Borrowed("CREATING"),
11390 3 => std::borrow::Cow::Borrowed("UPDATING"),
11391 4 => std::borrow::Cow::Borrowed("DELETING"),
11392 5 => std::borrow::Cow::Borrowed("FAILED"),
11393 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
11394 }
11395 }
11396
11397 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
11399 match name {
11400 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
11401 "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
11402 "CREATING" => std::option::Option::Some(Self::CREATING),
11403 "UPDATING" => std::option::Option::Some(Self::UPDATING),
11404 "DELETING" => std::option::Option::Some(Self::DELETING),
11405 "FAILED" => std::option::Option::Some(Self::FAILED),
11406 _ => std::option::Option::None,
11407 }
11408 }
11409 }
11410
11411 impl std::convert::From<i32> for State {
11412 fn from(value: i32) -> Self {
11413 Self::new(value)
11414 }
11415 }
11416
11417 impl std::default::Default for State {
11418 fn default() -> Self {
11419 Self::new(0)
11420 }
11421 }
11422
11423 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
11427 #[serde(rename_all = "camelCase")]
11428 #[non_exhaustive]
11429 pub enum BindNetwork {
11430 VpcNetwork(std::string::String),
11435 VmwareEngineNetwork(std::string::String),
11440 }
11441}
11442
11443#[serde_with::serde_as]
11446#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11447#[serde(default, rename_all = "camelCase")]
11448#[non_exhaustive]
11449pub struct VmwareEngineNetwork {
11450 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11456 pub name: std::string::String,
11457
11458 #[serde(skip_serializing_if = "std::option::Option::is_none")]
11460 pub create_time: std::option::Option<wkt::Timestamp>,
11461
11462 #[serde(skip_serializing_if = "std::option::Option::is_none")]
11464 pub update_time: std::option::Option<wkt::Timestamp>,
11465
11466 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11468 pub description: std::string::String,
11469
11470 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
11474 pub vpc_networks: std::vec::Vec<crate::model::vmware_engine_network::VpcNetwork>,
11475
11476 pub state: crate::model::vmware_engine_network::State,
11478
11479 #[serde(rename = "type")]
11481 pub r#type: crate::model::vmware_engine_network::Type,
11482
11483 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11485 pub uid: std::string::String,
11486
11487 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11492 pub etag: std::string::String,
11493
11494 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11495 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11496}
11497
11498impl VmwareEngineNetwork {
11499 pub fn new() -> Self {
11500 std::default::Default::default()
11501 }
11502
11503 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11505 self.name = v.into();
11506 self
11507 }
11508
11509 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
11511 mut self,
11512 v: T,
11513 ) -> Self {
11514 self.create_time = v.into();
11515 self
11516 }
11517
11518 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
11520 mut self,
11521 v: T,
11522 ) -> Self {
11523 self.update_time = v.into();
11524 self
11525 }
11526
11527 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11529 self.description = v.into();
11530 self
11531 }
11532
11533 pub fn set_state<T: std::convert::Into<crate::model::vmware_engine_network::State>>(
11535 mut self,
11536 v: T,
11537 ) -> Self {
11538 self.state = v.into();
11539 self
11540 }
11541
11542 pub fn set_type<T: std::convert::Into<crate::model::vmware_engine_network::Type>>(
11544 mut self,
11545 v: T,
11546 ) -> Self {
11547 self.r#type = v.into();
11548 self
11549 }
11550
11551 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11553 self.uid = v.into();
11554 self
11555 }
11556
11557 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11559 self.etag = v.into();
11560 self
11561 }
11562
11563 pub fn set_vpc_networks<T, V>(mut self, v: T) -> Self
11565 where
11566 T: std::iter::IntoIterator<Item = V>,
11567 V: std::convert::Into<crate::model::vmware_engine_network::VpcNetwork>,
11568 {
11569 use std::iter::Iterator;
11570 self.vpc_networks = v.into_iter().map(|i| i.into()).collect();
11571 self
11572 }
11573}
11574
11575impl wkt::message::Message for VmwareEngineNetwork {
11576 fn typename() -> &'static str {
11577 "type.googleapis.com/google.cloud.vmwareengine.v1.VmwareEngineNetwork"
11578 }
11579}
11580
11581pub mod vmware_engine_network {
11583 #[allow(unused_imports)]
11584 use super::*;
11585
11586 #[serde_with::serde_as]
11589 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11590 #[serde(default, rename_all = "camelCase")]
11591 #[non_exhaustive]
11592 pub struct VpcNetwork {
11593 #[serde(rename = "type")]
11596 pub r#type: crate::model::vmware_engine_network::vpc_network::Type,
11597
11598 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11602 pub network: std::string::String,
11603
11604 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11605 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11606 }
11607
11608 impl VpcNetwork {
11609 pub fn new() -> Self {
11610 std::default::Default::default()
11611 }
11612
11613 pub fn set_type<
11615 T: std::convert::Into<crate::model::vmware_engine_network::vpc_network::Type>,
11616 >(
11617 mut self,
11618 v: T,
11619 ) -> Self {
11620 self.r#type = v.into();
11621 self
11622 }
11623
11624 pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11626 self.network = v.into();
11627 self
11628 }
11629 }
11630
11631 impl wkt::message::Message for VpcNetwork {
11632 fn typename() -> &'static str {
11633 "type.googleapis.com/google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork"
11634 }
11635 }
11636
11637 pub mod vpc_network {
11639 #[allow(unused_imports)]
11640 use super::*;
11641
11642 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
11645 pub struct Type(i32);
11646
11647 impl Type {
11648 pub const TYPE_UNSPECIFIED: Type = Type::new(0);
11650
11651 pub const INTRANET: Type = Type::new(1);
11656
11657 pub const INTERNET: Type = Type::new(2);
11659
11660 pub const GOOGLE_CLOUD: Type = Type::new(3);
11663
11664 pub(crate) const fn new(value: i32) -> Self {
11666 Self(value)
11667 }
11668
11669 pub fn value(&self) -> i32 {
11671 self.0
11672 }
11673
11674 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
11676 match self.0 {
11677 0 => std::borrow::Cow::Borrowed("TYPE_UNSPECIFIED"),
11678 1 => std::borrow::Cow::Borrowed("INTRANET"),
11679 2 => std::borrow::Cow::Borrowed("INTERNET"),
11680 3 => std::borrow::Cow::Borrowed("GOOGLE_CLOUD"),
11681 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
11682 }
11683 }
11684
11685 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
11687 match name {
11688 "TYPE_UNSPECIFIED" => std::option::Option::Some(Self::TYPE_UNSPECIFIED),
11689 "INTRANET" => std::option::Option::Some(Self::INTRANET),
11690 "INTERNET" => std::option::Option::Some(Self::INTERNET),
11691 "GOOGLE_CLOUD" => std::option::Option::Some(Self::GOOGLE_CLOUD),
11692 _ => std::option::Option::None,
11693 }
11694 }
11695 }
11696
11697 impl std::convert::From<i32> for Type {
11698 fn from(value: i32) -> Self {
11699 Self::new(value)
11700 }
11701 }
11702
11703 impl std::default::Default for Type {
11704 fn default() -> Self {
11705 Self::new(0)
11706 }
11707 }
11708 }
11709
11710 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
11712 pub struct State(i32);
11713
11714 impl State {
11715 pub const STATE_UNSPECIFIED: State = State::new(0);
11717
11718 pub const CREATING: State = State::new(1);
11720
11721 pub const ACTIVE: State = State::new(2);
11723
11724 pub const UPDATING: State = State::new(3);
11726
11727 pub const DELETING: State = State::new(4);
11729
11730 pub(crate) const fn new(value: i32) -> Self {
11732 Self(value)
11733 }
11734
11735 pub fn value(&self) -> i32 {
11737 self.0
11738 }
11739
11740 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
11742 match self.0 {
11743 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
11744 1 => std::borrow::Cow::Borrowed("CREATING"),
11745 2 => std::borrow::Cow::Borrowed("ACTIVE"),
11746 3 => std::borrow::Cow::Borrowed("UPDATING"),
11747 4 => std::borrow::Cow::Borrowed("DELETING"),
11748 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
11749 }
11750 }
11751
11752 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
11754 match name {
11755 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
11756 "CREATING" => std::option::Option::Some(Self::CREATING),
11757 "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
11758 "UPDATING" => std::option::Option::Some(Self::UPDATING),
11759 "DELETING" => std::option::Option::Some(Self::DELETING),
11760 _ => std::option::Option::None,
11761 }
11762 }
11763 }
11764
11765 impl std::convert::From<i32> for State {
11766 fn from(value: i32) -> Self {
11767 Self::new(value)
11768 }
11769 }
11770
11771 impl std::default::Default for State {
11772 fn default() -> Self {
11773 Self::new(0)
11774 }
11775 }
11776
11777 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
11779 pub struct Type(i32);
11780
11781 impl Type {
11782 pub const TYPE_UNSPECIFIED: Type = Type::new(0);
11784
11785 pub const LEGACY: Type = Type::new(1);
11789
11790 pub const STANDARD: Type = Type::new(2);
11792
11793 pub(crate) const fn new(value: i32) -> Self {
11795 Self(value)
11796 }
11797
11798 pub fn value(&self) -> i32 {
11800 self.0
11801 }
11802
11803 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
11805 match self.0 {
11806 0 => std::borrow::Cow::Borrowed("TYPE_UNSPECIFIED"),
11807 1 => std::borrow::Cow::Borrowed("LEGACY"),
11808 2 => std::borrow::Cow::Borrowed("STANDARD"),
11809 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
11810 }
11811 }
11812
11813 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
11815 match name {
11816 "TYPE_UNSPECIFIED" => std::option::Option::Some(Self::TYPE_UNSPECIFIED),
11817 "LEGACY" => std::option::Option::Some(Self::LEGACY),
11818 "STANDARD" => std::option::Option::Some(Self::STANDARD),
11819 _ => std::option::Option::None,
11820 }
11821 }
11822 }
11823
11824 impl std::convert::From<i32> for Type {
11825 fn from(value: i32) -> Self {
11826 Self::new(value)
11827 }
11828 }
11829
11830 impl std::default::Default for Type {
11831 fn default() -> Self {
11832 Self::new(0)
11833 }
11834 }
11835}
11836
11837#[serde_with::serde_as]
11840#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11841#[serde(default, rename_all = "camelCase")]
11842#[non_exhaustive]
11843pub struct PrivateConnection {
11844 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11850 pub name: std::string::String,
11851
11852 #[serde(skip_serializing_if = "std::option::Option::is_none")]
11854 pub create_time: std::option::Option<wkt::Timestamp>,
11855
11856 #[serde(skip_serializing_if = "std::option::Option::is_none")]
11858 pub update_time: std::option::Option<wkt::Timestamp>,
11859
11860 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11862 pub description: std::string::String,
11863
11864 pub state: crate::model::private_connection::State,
11866
11867 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11875 pub vmware_engine_network: std::string::String,
11876
11877 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11880 pub vmware_engine_network_canonical: std::string::String,
11881
11882 #[serde(rename = "type")]
11884 pub r#type: crate::model::private_connection::Type,
11885
11886 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11889 pub peering_id: std::string::String,
11890
11891 pub routing_mode: crate::model::private_connection::RoutingMode,
11896
11897 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11899 pub uid: std::string::String,
11900
11901 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11914 pub service_network: std::string::String,
11915
11916 pub peering_state: crate::model::private_connection::PeeringState,
11919
11920 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11921 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11922}
11923
11924impl PrivateConnection {
11925 pub fn new() -> Self {
11926 std::default::Default::default()
11927 }
11928
11929 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11931 self.name = v.into();
11932 self
11933 }
11934
11935 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
11937 mut self,
11938 v: T,
11939 ) -> Self {
11940 self.create_time = v.into();
11941 self
11942 }
11943
11944 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
11946 mut self,
11947 v: T,
11948 ) -> Self {
11949 self.update_time = v.into();
11950 self
11951 }
11952
11953 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11955 self.description = v.into();
11956 self
11957 }
11958
11959 pub fn set_state<T: std::convert::Into<crate::model::private_connection::State>>(
11961 mut self,
11962 v: T,
11963 ) -> Self {
11964 self.state = v.into();
11965 self
11966 }
11967
11968 pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
11970 mut self,
11971 v: T,
11972 ) -> Self {
11973 self.vmware_engine_network = v.into();
11974 self
11975 }
11976
11977 pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
11979 mut self,
11980 v: T,
11981 ) -> Self {
11982 self.vmware_engine_network_canonical = v.into();
11983 self
11984 }
11985
11986 pub fn set_type<T: std::convert::Into<crate::model::private_connection::Type>>(
11988 mut self,
11989 v: T,
11990 ) -> Self {
11991 self.r#type = v.into();
11992 self
11993 }
11994
11995 pub fn set_peering_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11997 self.peering_id = v.into();
11998 self
11999 }
12000
12001 pub fn set_routing_mode<
12003 T: std::convert::Into<crate::model::private_connection::RoutingMode>,
12004 >(
12005 mut self,
12006 v: T,
12007 ) -> Self {
12008 self.routing_mode = v.into();
12009 self
12010 }
12011
12012 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12014 self.uid = v.into();
12015 self
12016 }
12017
12018 pub fn set_service_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12020 self.service_network = v.into();
12021 self
12022 }
12023
12024 pub fn set_peering_state<
12026 T: std::convert::Into<crate::model::private_connection::PeeringState>,
12027 >(
12028 mut self,
12029 v: T,
12030 ) -> Self {
12031 self.peering_state = v.into();
12032 self
12033 }
12034}
12035
12036impl wkt::message::Message for PrivateConnection {
12037 fn typename() -> &'static str {
12038 "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateConnection"
12039 }
12040}
12041
12042pub mod private_connection {
12044 #[allow(unused_imports)]
12045 use super::*;
12046
12047 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
12049 pub struct State(i32);
12050
12051 impl State {
12052 pub const STATE_UNSPECIFIED: State = State::new(0);
12054
12055 pub const CREATING: State = State::new(1);
12057
12058 pub const ACTIVE: State = State::new(2);
12060
12061 pub const UPDATING: State = State::new(3);
12063
12064 pub const DELETING: State = State::new(4);
12066
12067 pub const UNPROVISIONED: State = State::new(5);
12070
12071 pub const FAILED: State = State::new(6);
12073
12074 pub(crate) const fn new(value: i32) -> Self {
12076 Self(value)
12077 }
12078
12079 pub fn value(&self) -> i32 {
12081 self.0
12082 }
12083
12084 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
12086 match self.0 {
12087 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
12088 1 => std::borrow::Cow::Borrowed("CREATING"),
12089 2 => std::borrow::Cow::Borrowed("ACTIVE"),
12090 3 => std::borrow::Cow::Borrowed("UPDATING"),
12091 4 => std::borrow::Cow::Borrowed("DELETING"),
12092 5 => std::borrow::Cow::Borrowed("UNPROVISIONED"),
12093 6 => std::borrow::Cow::Borrowed("FAILED"),
12094 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
12095 }
12096 }
12097
12098 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
12100 match name {
12101 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
12102 "CREATING" => std::option::Option::Some(Self::CREATING),
12103 "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
12104 "UPDATING" => std::option::Option::Some(Self::UPDATING),
12105 "DELETING" => std::option::Option::Some(Self::DELETING),
12106 "UNPROVISIONED" => std::option::Option::Some(Self::UNPROVISIONED),
12107 "FAILED" => std::option::Option::Some(Self::FAILED),
12108 _ => std::option::Option::None,
12109 }
12110 }
12111 }
12112
12113 impl std::convert::From<i32> for State {
12114 fn from(value: i32) -> Self {
12115 Self::new(value)
12116 }
12117 }
12118
12119 impl std::default::Default for State {
12120 fn default() -> Self {
12121 Self::new(0)
12122 }
12123 }
12124
12125 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
12127 pub struct Type(i32);
12128
12129 impl Type {
12130 pub const TYPE_UNSPECIFIED: Type = Type::new(0);
12132
12133 pub const PRIVATE_SERVICE_ACCESS: Type = Type::new(1);
12136
12137 pub const NETAPP_CLOUD_VOLUMES: Type = Type::new(2);
12139
12140 pub const DELL_POWERSCALE: Type = Type::new(3);
12142
12143 pub const THIRD_PARTY_SERVICE: Type = Type::new(4);
12145
12146 pub(crate) const fn new(value: i32) -> Self {
12148 Self(value)
12149 }
12150
12151 pub fn value(&self) -> i32 {
12153 self.0
12154 }
12155
12156 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
12158 match self.0 {
12159 0 => std::borrow::Cow::Borrowed("TYPE_UNSPECIFIED"),
12160 1 => std::borrow::Cow::Borrowed("PRIVATE_SERVICE_ACCESS"),
12161 2 => std::borrow::Cow::Borrowed("NETAPP_CLOUD_VOLUMES"),
12162 3 => std::borrow::Cow::Borrowed("DELL_POWERSCALE"),
12163 4 => std::borrow::Cow::Borrowed("THIRD_PARTY_SERVICE"),
12164 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
12165 }
12166 }
12167
12168 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
12170 match name {
12171 "TYPE_UNSPECIFIED" => std::option::Option::Some(Self::TYPE_UNSPECIFIED),
12172 "PRIVATE_SERVICE_ACCESS" => std::option::Option::Some(Self::PRIVATE_SERVICE_ACCESS),
12173 "NETAPP_CLOUD_VOLUMES" => std::option::Option::Some(Self::NETAPP_CLOUD_VOLUMES),
12174 "DELL_POWERSCALE" => std::option::Option::Some(Self::DELL_POWERSCALE),
12175 "THIRD_PARTY_SERVICE" => std::option::Option::Some(Self::THIRD_PARTY_SERVICE),
12176 _ => std::option::Option::None,
12177 }
12178 }
12179 }
12180
12181 impl std::convert::From<i32> for Type {
12182 fn from(value: i32) -> Self {
12183 Self::new(value)
12184 }
12185 }
12186
12187 impl std::default::Default for Type {
12188 fn default() -> Self {
12189 Self::new(0)
12190 }
12191 }
12192
12193 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
12195 pub struct RoutingMode(i32);
12196
12197 impl RoutingMode {
12198 pub const ROUTING_MODE_UNSPECIFIED: RoutingMode = RoutingMode::new(0);
12200
12201 pub const GLOBAL: RoutingMode = RoutingMode::new(1);
12203
12204 pub const REGIONAL: RoutingMode = RoutingMode::new(2);
12206
12207 pub(crate) const fn new(value: i32) -> Self {
12209 Self(value)
12210 }
12211
12212 pub fn value(&self) -> i32 {
12214 self.0
12215 }
12216
12217 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
12219 match self.0 {
12220 0 => std::borrow::Cow::Borrowed("ROUTING_MODE_UNSPECIFIED"),
12221 1 => std::borrow::Cow::Borrowed("GLOBAL"),
12222 2 => std::borrow::Cow::Borrowed("REGIONAL"),
12223 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
12224 }
12225 }
12226
12227 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
12229 match name {
12230 "ROUTING_MODE_UNSPECIFIED" => {
12231 std::option::Option::Some(Self::ROUTING_MODE_UNSPECIFIED)
12232 }
12233 "GLOBAL" => std::option::Option::Some(Self::GLOBAL),
12234 "REGIONAL" => std::option::Option::Some(Self::REGIONAL),
12235 _ => std::option::Option::None,
12236 }
12237 }
12238 }
12239
12240 impl std::convert::From<i32> for RoutingMode {
12241 fn from(value: i32) -> Self {
12242 Self::new(value)
12243 }
12244 }
12245
12246 impl std::default::Default for RoutingMode {
12247 fn default() -> Self {
12248 Self::new(0)
12249 }
12250 }
12251
12252 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
12255 pub struct PeeringState(i32);
12256
12257 impl PeeringState {
12258 pub const PEERING_STATE_UNSPECIFIED: PeeringState = PeeringState::new(0);
12261
12262 pub const PEERING_ACTIVE: PeeringState = PeeringState::new(1);
12264
12265 pub const PEERING_INACTIVE: PeeringState = PeeringState::new(2);
12267
12268 pub(crate) const fn new(value: i32) -> Self {
12270 Self(value)
12271 }
12272
12273 pub fn value(&self) -> i32 {
12275 self.0
12276 }
12277
12278 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
12280 match self.0 {
12281 0 => std::borrow::Cow::Borrowed("PEERING_STATE_UNSPECIFIED"),
12282 1 => std::borrow::Cow::Borrowed("PEERING_ACTIVE"),
12283 2 => std::borrow::Cow::Borrowed("PEERING_INACTIVE"),
12284 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
12285 }
12286 }
12287
12288 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
12290 match name {
12291 "PEERING_STATE_UNSPECIFIED" => {
12292 std::option::Option::Some(Self::PEERING_STATE_UNSPECIFIED)
12293 }
12294 "PEERING_ACTIVE" => std::option::Option::Some(Self::PEERING_ACTIVE),
12295 "PEERING_INACTIVE" => std::option::Option::Some(Self::PEERING_INACTIVE),
12296 _ => std::option::Option::None,
12297 }
12298 }
12299 }
12300
12301 impl std::convert::From<i32> for PeeringState {
12302 fn from(value: i32) -> Self {
12303 Self::new(value)
12304 }
12305 }
12306
12307 impl std::default::Default for PeeringState {
12308 fn default() -> Self {
12309 Self::new(0)
12310 }
12311 }
12312}
12313
12314#[serde_with::serde_as]
12320#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12321#[serde(default, rename_all = "camelCase")]
12322#[non_exhaustive]
12323pub struct LocationMetadata {
12324 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
12326 pub capabilities: std::vec::Vec<crate::model::location_metadata::Capability>,
12327
12328 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12329 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12330}
12331
12332impl LocationMetadata {
12333 pub fn new() -> Self {
12334 std::default::Default::default()
12335 }
12336
12337 pub fn set_capabilities<T, V>(mut self, v: T) -> Self
12339 where
12340 T: std::iter::IntoIterator<Item = V>,
12341 V: std::convert::Into<crate::model::location_metadata::Capability>,
12342 {
12343 use std::iter::Iterator;
12344 self.capabilities = v.into_iter().map(|i| i.into()).collect();
12345 self
12346 }
12347}
12348
12349impl wkt::message::Message for LocationMetadata {
12350 fn typename() -> &'static str {
12351 "type.googleapis.com/google.cloud.vmwareengine.v1.LocationMetadata"
12352 }
12353}
12354
12355pub mod location_metadata {
12357 #[allow(unused_imports)]
12358 use super::*;
12359
12360 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
12362 pub struct Capability(i32);
12363
12364 impl Capability {
12365 pub const CAPABILITY_UNSPECIFIED: Capability = Capability::new(0);
12368
12369 pub const STRETCHED_CLUSTERS: Capability = Capability::new(1);
12371
12372 pub(crate) const fn new(value: i32) -> Self {
12374 Self(value)
12375 }
12376
12377 pub fn value(&self) -> i32 {
12379 self.0
12380 }
12381
12382 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
12384 match self.0 {
12385 0 => std::borrow::Cow::Borrowed("CAPABILITY_UNSPECIFIED"),
12386 1 => std::borrow::Cow::Borrowed("STRETCHED_CLUSTERS"),
12387 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
12388 }
12389 }
12390
12391 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
12393 match name {
12394 "CAPABILITY_UNSPECIFIED" => std::option::Option::Some(Self::CAPABILITY_UNSPECIFIED),
12395 "STRETCHED_CLUSTERS" => std::option::Option::Some(Self::STRETCHED_CLUSTERS),
12396 _ => std::option::Option::None,
12397 }
12398 }
12399 }
12400
12401 impl std::convert::From<i32> for Capability {
12402 fn from(value: i32) -> Self {
12403 Self::new(value)
12404 }
12405 }
12406
12407 impl std::default::Default for Capability {
12408 fn default() -> Self {
12409 Self::new(0)
12410 }
12411 }
12412}
12413
12414#[serde_with::serde_as]
12417#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12418#[serde(default, rename_all = "camelCase")]
12419#[non_exhaustive]
12420pub struct DnsBindPermission {
12421 #[serde(skip_serializing_if = "std::string::String::is_empty")]
12429 pub name: std::string::String,
12430
12431 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
12434 pub principals: std::vec::Vec<crate::model::Principal>,
12435
12436 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12437 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12438}
12439
12440impl DnsBindPermission {
12441 pub fn new() -> Self {
12442 std::default::Default::default()
12443 }
12444
12445 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12447 self.name = v.into();
12448 self
12449 }
12450
12451 pub fn set_principals<T, V>(mut self, v: T) -> Self
12453 where
12454 T: std::iter::IntoIterator<Item = V>,
12455 V: std::convert::Into<crate::model::Principal>,
12456 {
12457 use std::iter::Iterator;
12458 self.principals = v.into_iter().map(|i| i.into()).collect();
12459 self
12460 }
12461}
12462
12463impl wkt::message::Message for DnsBindPermission {
12464 fn typename() -> &'static str {
12465 "type.googleapis.com/google.cloud.vmwareengine.v1.DnsBindPermission"
12466 }
12467}
12468
12469#[serde_with::serde_as]
12472#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12473#[serde(default, rename_all = "camelCase")]
12474#[non_exhaustive]
12475pub struct Principal {
12476 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
12480 pub principal: std::option::Option<crate::model::principal::Principal>,
12481
12482 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12483 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12484}
12485
12486impl Principal {
12487 pub fn new() -> Self {
12488 std::default::Default::default()
12489 }
12490
12491 pub fn set_principal<
12496 T: std::convert::Into<std::option::Option<crate::model::principal::Principal>>,
12497 >(
12498 mut self,
12499 v: T,
12500 ) -> Self {
12501 self.principal = v.into();
12502 self
12503 }
12504
12505 pub fn user(&self) -> std::option::Option<&std::string::String> {
12509 #[allow(unreachable_patterns)]
12510 self.principal.as_ref().and_then(|v| match v {
12511 crate::model::principal::Principal::User(v) => std::option::Option::Some(v),
12512 _ => std::option::Option::None,
12513 })
12514 }
12515
12516 pub fn service_account(&self) -> std::option::Option<&std::string::String> {
12520 #[allow(unreachable_patterns)]
12521 self.principal.as_ref().and_then(|v| match v {
12522 crate::model::principal::Principal::ServiceAccount(v) => std::option::Option::Some(v),
12523 _ => std::option::Option::None,
12524 })
12525 }
12526
12527 pub fn set_user<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12533 self.principal =
12534 std::option::Option::Some(crate::model::principal::Principal::User(v.into()));
12535 self
12536 }
12537
12538 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12544 self.principal =
12545 std::option::Option::Some(crate::model::principal::Principal::ServiceAccount(v.into()));
12546 self
12547 }
12548}
12549
12550impl wkt::message::Message for Principal {
12551 fn typename() -> &'static str {
12552 "type.googleapis.com/google.cloud.vmwareengine.v1.Principal"
12553 }
12554}
12555
12556pub mod principal {
12558 #[allow(unused_imports)]
12559 use super::*;
12560
12561 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
12565 #[serde(rename_all = "camelCase")]
12566 #[non_exhaustive]
12567 pub enum Principal {
12568 User(std::string::String),
12570 ServiceAccount(std::string::String),
12572 }
12573}