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 iam_v1;
24extern crate lazy_static;
25extern crate location;
26extern crate longrunning;
27extern crate lro;
28extern crate reqwest;
29extern crate serde;
30extern crate serde_json;
31extern crate serde_with;
32extern crate std;
33extern crate tracing;
34extern crate wkt;
35
36#[serde_with::serde_as]
38#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
39#[serde(default, rename_all = "camelCase")]
40#[non_exhaustive]
41pub struct OperationMetadata {
42 #[serde(skip_serializing_if = "std::option::Option::is_none")]
44 pub create_time: std::option::Option<wkt::Timestamp>,
45
46 #[serde(skip_serializing_if = "std::option::Option::is_none")]
48 pub end_time: std::option::Option<wkt::Timestamp>,
49
50 #[serde(skip_serializing_if = "std::string::String::is_empty")]
52 pub target: std::string::String,
53
54 #[serde(skip_serializing_if = "std::string::String::is_empty")]
56 pub verb: std::string::String,
57
58 #[serde(skip_serializing_if = "std::string::String::is_empty")]
60 pub status_message: std::string::String,
61
62 pub requested_cancellation: bool,
70
71 #[serde(skip_serializing_if = "std::string::String::is_empty")]
73 pub api_version: std::string::String,
74}
75
76impl OperationMetadata {
77 pub fn new() -> Self {
78 std::default::Default::default()
79 }
80
81 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
83 mut self,
84 v: T,
85 ) -> Self {
86 self.create_time = v.into();
87 self
88 }
89
90 pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
92 mut self,
93 v: T,
94 ) -> Self {
95 self.end_time = v.into();
96 self
97 }
98
99 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
101 self.target = v.into();
102 self
103 }
104
105 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
107 self.verb = v.into();
108 self
109 }
110
111 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
113 self.status_message = v.into();
114 self
115 }
116
117 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
119 self.requested_cancellation = v.into();
120 self
121 }
122
123 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
125 self.api_version = v.into();
126 self
127 }
128}
129
130impl wkt::message::Message for OperationMetadata {
131 fn typename() -> &'static str {
132 "type.googleapis.com/google.cloud.networkconnectivity.v1.OperationMetadata"
133 }
134}
135
136#[serde_with::serde_as]
143#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
144#[serde(default, rename_all = "camelCase")]
145#[non_exhaustive]
146pub struct Hub {
147 #[serde(skip_serializing_if = "std::string::String::is_empty")]
151 pub name: std::string::String,
152
153 #[serde(skip_serializing_if = "std::option::Option::is_none")]
155 pub create_time: std::option::Option<wkt::Timestamp>,
156
157 #[serde(skip_serializing_if = "std::option::Option::is_none")]
159 pub update_time: std::option::Option<wkt::Timestamp>,
160
161 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
165 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
166
167 #[serde(skip_serializing_if = "std::string::String::is_empty")]
169 pub description: std::string::String,
170
171 #[serde(skip_serializing_if = "std::string::String::is_empty")]
175 pub unique_id: std::string::String,
176
177 pub state: crate::model::State,
179
180 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
185 pub routing_vpcs: std::vec::Vec<crate::model::RoutingVPC>,
186
187 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
194 pub route_tables: std::vec::Vec<std::string::String>,
195
196 #[serde(skip_serializing_if = "std::option::Option::is_none")]
202 pub spoke_summary: std::option::Option<crate::model::SpokeSummary>,
203
204 pub policy_mode: crate::model::PolicyMode,
208
209 pub preset_topology: crate::model::PresetTopology,
215
216 #[serde(skip_serializing_if = "std::option::Option::is_none")]
221 pub export_psc: std::option::Option<bool>,
222}
223
224impl Hub {
225 pub fn new() -> Self {
226 std::default::Default::default()
227 }
228
229 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
231 self.name = v.into();
232 self
233 }
234
235 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
237 mut self,
238 v: T,
239 ) -> Self {
240 self.create_time = v.into();
241 self
242 }
243
244 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
246 mut self,
247 v: T,
248 ) -> Self {
249 self.update_time = v.into();
250 self
251 }
252
253 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
255 self.description = v.into();
256 self
257 }
258
259 pub fn set_unique_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
261 self.unique_id = v.into();
262 self
263 }
264
265 pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
267 self.state = v.into();
268 self
269 }
270
271 pub fn set_spoke_summary<
273 T: std::convert::Into<std::option::Option<crate::model::SpokeSummary>>,
274 >(
275 mut self,
276 v: T,
277 ) -> Self {
278 self.spoke_summary = v.into();
279 self
280 }
281
282 pub fn set_policy_mode<T: std::convert::Into<crate::model::PolicyMode>>(
284 mut self,
285 v: T,
286 ) -> Self {
287 self.policy_mode = v.into();
288 self
289 }
290
291 pub fn set_preset_topology<T: std::convert::Into<crate::model::PresetTopology>>(
293 mut self,
294 v: T,
295 ) -> Self {
296 self.preset_topology = v.into();
297 self
298 }
299
300 pub fn set_export_psc<T: std::convert::Into<std::option::Option<bool>>>(
302 mut self,
303 v: T,
304 ) -> Self {
305 self.export_psc = v.into();
306 self
307 }
308
309 pub fn set_routing_vpcs<T, V>(mut self, v: T) -> Self
311 where
312 T: std::iter::IntoIterator<Item = V>,
313 V: std::convert::Into<crate::model::RoutingVPC>,
314 {
315 use std::iter::Iterator;
316 self.routing_vpcs = v.into_iter().map(|i| i.into()).collect();
317 self
318 }
319
320 pub fn set_route_tables<T, V>(mut self, v: T) -> Self
322 where
323 T: std::iter::IntoIterator<Item = V>,
324 V: std::convert::Into<std::string::String>,
325 {
326 use std::iter::Iterator;
327 self.route_tables = v.into_iter().map(|i| i.into()).collect();
328 self
329 }
330
331 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
333 where
334 T: std::iter::IntoIterator<Item = (K, V)>,
335 K: std::convert::Into<std::string::String>,
336 V: std::convert::Into<std::string::String>,
337 {
338 use std::iter::Iterator;
339 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
340 self
341 }
342}
343
344impl wkt::message::Message for Hub {
345 fn typename() -> &'static str {
346 "type.googleapis.com/google.cloud.networkconnectivity.v1.Hub"
347 }
348}
349
350#[serde_with::serde_as]
353#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
354#[serde(default, rename_all = "camelCase")]
355#[non_exhaustive]
356pub struct RoutingVPC {
357 #[serde(skip_serializing_if = "std::string::String::is_empty")]
359 pub uri: std::string::String,
360
361 pub required_for_new_site_to_site_data_transfer_spokes: bool,
367}
368
369impl RoutingVPC {
370 pub fn new() -> Self {
371 std::default::Default::default()
372 }
373
374 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
376 self.uri = v.into();
377 self
378 }
379
380 pub fn set_required_for_new_site_to_site_data_transfer_spokes<T: std::convert::Into<bool>>(
382 mut self,
383 v: T,
384 ) -> Self {
385 self.required_for_new_site_to_site_data_transfer_spokes = v.into();
386 self
387 }
388}
389
390impl wkt::message::Message for RoutingVPC {
391 fn typename() -> &'static str {
392 "type.googleapis.com/google.cloud.networkconnectivity.v1.RoutingVPC"
393 }
394}
395
396#[serde_with::serde_as]
407#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
408#[serde(default, rename_all = "camelCase")]
409#[non_exhaustive]
410pub struct Spoke {
411 #[serde(skip_serializing_if = "std::string::String::is_empty")]
415 pub name: std::string::String,
416
417 #[serde(skip_serializing_if = "std::option::Option::is_none")]
419 pub create_time: std::option::Option<wkt::Timestamp>,
420
421 #[serde(skip_serializing_if = "std::option::Option::is_none")]
423 pub update_time: std::option::Option<wkt::Timestamp>,
424
425 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
429 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
430
431 #[serde(skip_serializing_if = "std::string::String::is_empty")]
433 pub description: std::string::String,
434
435 #[serde(skip_serializing_if = "std::string::String::is_empty")]
437 pub hub: std::string::String,
438
439 #[serde(skip_serializing_if = "std::string::String::is_empty")]
441 pub group: std::string::String,
442
443 #[serde(skip_serializing_if = "std::option::Option::is_none")]
445 pub linked_vpn_tunnels: std::option::Option<crate::model::LinkedVpnTunnels>,
446
447 #[serde(skip_serializing_if = "std::option::Option::is_none")]
449 pub linked_interconnect_attachments:
450 std::option::Option<crate::model::LinkedInterconnectAttachments>,
451
452 #[serde(skip_serializing_if = "std::option::Option::is_none")]
454 pub linked_router_appliance_instances:
455 std::option::Option<crate::model::LinkedRouterApplianceInstances>,
456
457 #[serde(skip_serializing_if = "std::option::Option::is_none")]
459 pub linked_vpc_network: std::option::Option<crate::model::LinkedVpcNetwork>,
460
461 #[serde(skip_serializing_if = "std::option::Option::is_none")]
463 pub linked_producer_vpc_network: std::option::Option<crate::model::LinkedProducerVpcNetwork>,
464
465 #[serde(skip_serializing_if = "std::string::String::is_empty")]
469 pub unique_id: std::string::String,
470
471 pub state: crate::model::State,
473
474 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
477 pub reasons: std::vec::Vec<crate::model::spoke::StateReason>,
478
479 pub spoke_type: crate::model::SpokeType,
481}
482
483impl Spoke {
484 pub fn new() -> Self {
485 std::default::Default::default()
486 }
487
488 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
490 self.name = v.into();
491 self
492 }
493
494 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
496 mut self,
497 v: T,
498 ) -> Self {
499 self.create_time = v.into();
500 self
501 }
502
503 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
505 mut self,
506 v: T,
507 ) -> Self {
508 self.update_time = v.into();
509 self
510 }
511
512 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
514 self.description = v.into();
515 self
516 }
517
518 pub fn set_hub<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
520 self.hub = v.into();
521 self
522 }
523
524 pub fn set_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
526 self.group = v.into();
527 self
528 }
529
530 pub fn set_linked_vpn_tunnels<
532 T: std::convert::Into<std::option::Option<crate::model::LinkedVpnTunnels>>,
533 >(
534 mut self,
535 v: T,
536 ) -> Self {
537 self.linked_vpn_tunnels = v.into();
538 self
539 }
540
541 pub fn set_linked_interconnect_attachments<
543 T: std::convert::Into<std::option::Option<crate::model::LinkedInterconnectAttachments>>,
544 >(
545 mut self,
546 v: T,
547 ) -> Self {
548 self.linked_interconnect_attachments = v.into();
549 self
550 }
551
552 pub fn set_linked_router_appliance_instances<
554 T: std::convert::Into<std::option::Option<crate::model::LinkedRouterApplianceInstances>>,
555 >(
556 mut self,
557 v: T,
558 ) -> Self {
559 self.linked_router_appliance_instances = v.into();
560 self
561 }
562
563 pub fn set_linked_vpc_network<
565 T: std::convert::Into<std::option::Option<crate::model::LinkedVpcNetwork>>,
566 >(
567 mut self,
568 v: T,
569 ) -> Self {
570 self.linked_vpc_network = v.into();
571 self
572 }
573
574 pub fn set_linked_producer_vpc_network<
576 T: std::convert::Into<std::option::Option<crate::model::LinkedProducerVpcNetwork>>,
577 >(
578 mut self,
579 v: T,
580 ) -> Self {
581 self.linked_producer_vpc_network = v.into();
582 self
583 }
584
585 pub fn set_unique_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
587 self.unique_id = v.into();
588 self
589 }
590
591 pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
593 self.state = v.into();
594 self
595 }
596
597 pub fn set_spoke_type<T: std::convert::Into<crate::model::SpokeType>>(mut self, v: T) -> Self {
599 self.spoke_type = v.into();
600 self
601 }
602
603 pub fn set_reasons<T, V>(mut self, v: T) -> Self
605 where
606 T: std::iter::IntoIterator<Item = V>,
607 V: std::convert::Into<crate::model::spoke::StateReason>,
608 {
609 use std::iter::Iterator;
610 self.reasons = v.into_iter().map(|i| i.into()).collect();
611 self
612 }
613
614 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
616 where
617 T: std::iter::IntoIterator<Item = (K, V)>,
618 K: std::convert::Into<std::string::String>,
619 V: std::convert::Into<std::string::String>,
620 {
621 use std::iter::Iterator;
622 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
623 self
624 }
625}
626
627impl wkt::message::Message for Spoke {
628 fn typename() -> &'static str {
629 "type.googleapis.com/google.cloud.networkconnectivity.v1.Spoke"
630 }
631}
632
633pub mod spoke {
635 #[allow(unused_imports)]
636 use super::*;
637
638 #[serde_with::serde_as]
640 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
641 #[serde(default, rename_all = "camelCase")]
642 #[non_exhaustive]
643 pub struct StateReason {
644 pub code: crate::model::spoke::state_reason::Code,
646
647 #[serde(skip_serializing_if = "std::string::String::is_empty")]
649 pub message: std::string::String,
650
651 #[serde(skip_serializing_if = "std::string::String::is_empty")]
653 pub user_details: std::string::String,
654 }
655
656 impl StateReason {
657 pub fn new() -> Self {
658 std::default::Default::default()
659 }
660
661 pub fn set_code<T: std::convert::Into<crate::model::spoke::state_reason::Code>>(
663 mut self,
664 v: T,
665 ) -> Self {
666 self.code = v.into();
667 self
668 }
669
670 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
672 self.message = v.into();
673 self
674 }
675
676 pub fn set_user_details<T: std::convert::Into<std::string::String>>(
678 mut self,
679 v: T,
680 ) -> Self {
681 self.user_details = v.into();
682 self
683 }
684 }
685
686 impl wkt::message::Message for StateReason {
687 fn typename() -> &'static str {
688 "type.googleapis.com/google.cloud.networkconnectivity.v1.Spoke.StateReason"
689 }
690 }
691
692 pub mod state_reason {
694 #[allow(unused_imports)]
695 use super::*;
696
697 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
699 pub struct Code(std::borrow::Cow<'static, str>);
700
701 impl Code {
702 pub const fn new(v: &'static str) -> Self {
704 Self(std::borrow::Cow::Borrowed(v))
705 }
706
707 pub fn value(&self) -> &str {
709 &self.0
710 }
711 }
712
713 pub mod code {
715 use super::Code;
716
717 pub const CODE_UNSPECIFIED: Code = Code::new("CODE_UNSPECIFIED");
719
720 pub const PENDING_REVIEW: Code = Code::new("PENDING_REVIEW");
722
723 pub const REJECTED: Code = Code::new("REJECTED");
725
726 pub const PAUSED: Code = Code::new("PAUSED");
728
729 pub const FAILED: Code = Code::new("FAILED");
732 }
733
734 impl std::convert::From<std::string::String> for Code {
735 fn from(value: std::string::String) -> Self {
736 Self(std::borrow::Cow::Owned(value))
737 }
738 }
739 }
740}
741
742#[serde_with::serde_as]
743#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
744#[serde(default, rename_all = "camelCase")]
745#[non_exhaustive]
746pub struct RouteTable {
747 #[serde(skip_serializing_if = "std::string::String::is_empty")]
751 pub name: std::string::String,
752
753 #[serde(skip_serializing_if = "std::option::Option::is_none")]
755 pub create_time: std::option::Option<wkt::Timestamp>,
756
757 #[serde(skip_serializing_if = "std::option::Option::is_none")]
759 pub update_time: std::option::Option<wkt::Timestamp>,
760
761 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
765 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
766
767 #[serde(skip_serializing_if = "std::string::String::is_empty")]
769 pub description: std::string::String,
770
771 #[serde(skip_serializing_if = "std::string::String::is_empty")]
776 pub uid: std::string::String,
777
778 pub state: crate::model::State,
780}
781
782impl RouteTable {
783 pub fn new() -> Self {
784 std::default::Default::default()
785 }
786
787 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
789 self.name = v.into();
790 self
791 }
792
793 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
795 mut self,
796 v: T,
797 ) -> Self {
798 self.create_time = v.into();
799 self
800 }
801
802 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
804 mut self,
805 v: T,
806 ) -> Self {
807 self.update_time = v.into();
808 self
809 }
810
811 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
813 self.description = v.into();
814 self
815 }
816
817 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
819 self.uid = v.into();
820 self
821 }
822
823 pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
825 self.state = v.into();
826 self
827 }
828
829 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
831 where
832 T: std::iter::IntoIterator<Item = (K, V)>,
833 K: std::convert::Into<std::string::String>,
834 V: std::convert::Into<std::string::String>,
835 {
836 use std::iter::Iterator;
837 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
838 self
839 }
840}
841
842impl wkt::message::Message for RouteTable {
843 fn typename() -> &'static str {
844 "type.googleapis.com/google.cloud.networkconnectivity.v1.RouteTable"
845 }
846}
847
848#[serde_with::serde_as]
851#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
852#[serde(default, rename_all = "camelCase")]
853#[non_exhaustive]
854pub struct Route {
855 #[serde(skip_serializing_if = "std::string::String::is_empty")]
859 pub name: std::string::String,
860
861 #[serde(skip_serializing_if = "std::option::Option::is_none")]
863 pub create_time: std::option::Option<wkt::Timestamp>,
864
865 #[serde(skip_serializing_if = "std::option::Option::is_none")]
867 pub update_time: std::option::Option<wkt::Timestamp>,
868
869 #[serde(skip_serializing_if = "std::string::String::is_empty")]
871 pub ip_cidr_range: std::string::String,
872
873 #[serde(rename = "type")]
876 pub r#type: crate::model::RouteType,
877
878 #[serde(skip_serializing_if = "std::option::Option::is_none")]
880 pub next_hop_vpc_network: std::option::Option<crate::model::NextHopVpcNetwork>,
881
882 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
886 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
887
888 #[serde(skip_serializing_if = "std::string::String::is_empty")]
890 pub description: std::string::String,
891
892 #[serde(skip_serializing_if = "std::string::String::is_empty")]
897 pub uid: std::string::String,
898
899 pub state: crate::model::State,
901
902 #[serde(skip_serializing_if = "std::string::String::is_empty")]
905 pub spoke: std::string::String,
906
907 #[serde(skip_serializing_if = "std::string::String::is_empty")]
911 pub location: std::string::String,
912
913 #[serde_as(as = "serde_with::DisplayFromStr")]
917 pub priority: i64,
918
919 #[serde(skip_serializing_if = "std::option::Option::is_none")]
921 pub next_hop_vpn_tunnel: std::option::Option<crate::model::NextHopVPNTunnel>,
922
923 #[serde(skip_serializing_if = "std::option::Option::is_none")]
926 pub next_hop_router_appliance_instance:
927 std::option::Option<crate::model::NextHopRouterApplianceInstance>,
928
929 #[serde(skip_serializing_if = "std::option::Option::is_none")]
931 pub next_hop_interconnect_attachment:
932 std::option::Option<crate::model::NextHopInterconnectAttachment>,
933}
934
935impl Route {
936 pub fn new() -> Self {
937 std::default::Default::default()
938 }
939
940 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
942 self.name = v.into();
943 self
944 }
945
946 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
948 mut self,
949 v: T,
950 ) -> Self {
951 self.create_time = v.into();
952 self
953 }
954
955 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
957 mut self,
958 v: T,
959 ) -> Self {
960 self.update_time = v.into();
961 self
962 }
963
964 pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
966 self.ip_cidr_range = v.into();
967 self
968 }
969
970 pub fn set_type<T: std::convert::Into<crate::model::RouteType>>(mut self, v: T) -> Self {
972 self.r#type = v.into();
973 self
974 }
975
976 pub fn set_next_hop_vpc_network<
978 T: std::convert::Into<std::option::Option<crate::model::NextHopVpcNetwork>>,
979 >(
980 mut self,
981 v: T,
982 ) -> Self {
983 self.next_hop_vpc_network = v.into();
984 self
985 }
986
987 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
989 self.description = v.into();
990 self
991 }
992
993 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
995 self.uid = v.into();
996 self
997 }
998
999 pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
1001 self.state = v.into();
1002 self
1003 }
1004
1005 pub fn set_spoke<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1007 self.spoke = v.into();
1008 self
1009 }
1010
1011 pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1013 self.location = v.into();
1014 self
1015 }
1016
1017 pub fn set_priority<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1019 self.priority = v.into();
1020 self
1021 }
1022
1023 pub fn set_next_hop_vpn_tunnel<
1025 T: std::convert::Into<std::option::Option<crate::model::NextHopVPNTunnel>>,
1026 >(
1027 mut self,
1028 v: T,
1029 ) -> Self {
1030 self.next_hop_vpn_tunnel = v.into();
1031 self
1032 }
1033
1034 pub fn set_next_hop_router_appliance_instance<
1036 T: std::convert::Into<std::option::Option<crate::model::NextHopRouterApplianceInstance>>,
1037 >(
1038 mut self,
1039 v: T,
1040 ) -> Self {
1041 self.next_hop_router_appliance_instance = v.into();
1042 self
1043 }
1044
1045 pub fn set_next_hop_interconnect_attachment<
1047 T: std::convert::Into<std::option::Option<crate::model::NextHopInterconnectAttachment>>,
1048 >(
1049 mut self,
1050 v: T,
1051 ) -> Self {
1052 self.next_hop_interconnect_attachment = v.into();
1053 self
1054 }
1055
1056 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1058 where
1059 T: std::iter::IntoIterator<Item = (K, V)>,
1060 K: std::convert::Into<std::string::String>,
1061 V: std::convert::Into<std::string::String>,
1062 {
1063 use std::iter::Iterator;
1064 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1065 self
1066 }
1067}
1068
1069impl wkt::message::Message for Route {
1070 fn typename() -> &'static str {
1071 "type.googleapis.com/google.cloud.networkconnectivity.v1.Route"
1072 }
1073}
1074
1075#[serde_with::serde_as]
1077#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1078#[serde(default, rename_all = "camelCase")]
1079#[non_exhaustive]
1080pub struct Group {
1081 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1085 pub name: std::string::String,
1086
1087 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1089 pub create_time: std::option::Option<wkt::Timestamp>,
1090
1091 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1093 pub update_time: std::option::Option<wkt::Timestamp>,
1094
1095 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
1099 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1100
1101 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1103 pub description: std::string::String,
1104
1105 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1110 pub uid: std::string::String,
1111
1112 pub state: crate::model::State,
1114
1115 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1117 pub auto_accept: std::option::Option<crate::model::AutoAccept>,
1118
1119 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1123 pub route_table: std::string::String,
1124}
1125
1126impl Group {
1127 pub fn new() -> Self {
1128 std::default::Default::default()
1129 }
1130
1131 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1133 self.name = v.into();
1134 self
1135 }
1136
1137 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1139 mut self,
1140 v: T,
1141 ) -> Self {
1142 self.create_time = v.into();
1143 self
1144 }
1145
1146 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1148 mut self,
1149 v: T,
1150 ) -> Self {
1151 self.update_time = v.into();
1152 self
1153 }
1154
1155 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1157 self.description = v.into();
1158 self
1159 }
1160
1161 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1163 self.uid = v.into();
1164 self
1165 }
1166
1167 pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
1169 self.state = v.into();
1170 self
1171 }
1172
1173 pub fn set_auto_accept<T: std::convert::Into<std::option::Option<crate::model::AutoAccept>>>(
1175 mut self,
1176 v: T,
1177 ) -> Self {
1178 self.auto_accept = v.into();
1179 self
1180 }
1181
1182 pub fn set_route_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1184 self.route_table = v.into();
1185 self
1186 }
1187
1188 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1190 where
1191 T: std::iter::IntoIterator<Item = (K, V)>,
1192 K: std::convert::Into<std::string::String>,
1193 V: std::convert::Into<std::string::String>,
1194 {
1195 use std::iter::Iterator;
1196 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1197 self
1198 }
1199}
1200
1201impl wkt::message::Message for Group {
1202 fn typename() -> &'static str {
1203 "type.googleapis.com/google.cloud.networkconnectivity.v1.Group"
1204 }
1205}
1206
1207#[serde_with::serde_as]
1215#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1216#[serde(default, rename_all = "camelCase")]
1217#[non_exhaustive]
1218pub struct AutoAccept {
1219 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1223 pub auto_accept_projects: std::vec::Vec<std::string::String>,
1224}
1225
1226impl AutoAccept {
1227 pub fn new() -> Self {
1228 std::default::Default::default()
1229 }
1230
1231 pub fn set_auto_accept_projects<T, V>(mut self, v: T) -> Self
1233 where
1234 T: std::iter::IntoIterator<Item = V>,
1235 V: std::convert::Into<std::string::String>,
1236 {
1237 use std::iter::Iterator;
1238 self.auto_accept_projects = v.into_iter().map(|i| i.into()).collect();
1239 self
1240 }
1241}
1242
1243impl wkt::message::Message for AutoAccept {
1244 fn typename() -> &'static str {
1245 "type.googleapis.com/google.cloud.networkconnectivity.v1.AutoAccept"
1246 }
1247}
1248
1249#[serde_with::serde_as]
1255#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1256#[serde(default, rename_all = "camelCase")]
1257#[non_exhaustive]
1258pub struct ListHubsRequest {
1259 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1261 pub parent: std::string::String,
1262
1263 pub page_size: i32,
1265
1266 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1268 pub page_token: std::string::String,
1269
1270 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1272 pub filter: std::string::String,
1273
1274 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1276 pub order_by: std::string::String,
1277}
1278
1279impl ListHubsRequest {
1280 pub fn new() -> Self {
1281 std::default::Default::default()
1282 }
1283
1284 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1286 self.parent = v.into();
1287 self
1288 }
1289
1290 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1292 self.page_size = v.into();
1293 self
1294 }
1295
1296 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1298 self.page_token = v.into();
1299 self
1300 }
1301
1302 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1304 self.filter = v.into();
1305 self
1306 }
1307
1308 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1310 self.order_by = v.into();
1311 self
1312 }
1313}
1314
1315impl wkt::message::Message for ListHubsRequest {
1316 fn typename() -> &'static str {
1317 "type.googleapis.com/google.cloud.networkconnectivity.v1.ListHubsRequest"
1318 }
1319}
1320
1321#[serde_with::serde_as]
1327#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1328#[serde(default, rename_all = "camelCase")]
1329#[non_exhaustive]
1330pub struct ListHubsResponse {
1331 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1333 pub hubs: std::vec::Vec<crate::model::Hub>,
1334
1335 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1339 pub next_page_token: std::string::String,
1340
1341 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1343 pub unreachable: std::vec::Vec<std::string::String>,
1344}
1345
1346impl ListHubsResponse {
1347 pub fn new() -> Self {
1348 std::default::Default::default()
1349 }
1350
1351 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1353 self.next_page_token = v.into();
1354 self
1355 }
1356
1357 pub fn set_hubs<T, V>(mut self, v: T) -> Self
1359 where
1360 T: std::iter::IntoIterator<Item = V>,
1361 V: std::convert::Into<crate::model::Hub>,
1362 {
1363 use std::iter::Iterator;
1364 self.hubs = v.into_iter().map(|i| i.into()).collect();
1365 self
1366 }
1367
1368 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1370 where
1371 T: std::iter::IntoIterator<Item = V>,
1372 V: std::convert::Into<std::string::String>,
1373 {
1374 use std::iter::Iterator;
1375 self.unreachable = v.into_iter().map(|i| i.into()).collect();
1376 self
1377 }
1378}
1379
1380impl wkt::message::Message for ListHubsResponse {
1381 fn typename() -> &'static str {
1382 "type.googleapis.com/google.cloud.networkconnectivity.v1.ListHubsResponse"
1383 }
1384}
1385
1386#[cfg(feature = "unstable-stream")]
1387impl gax::paginator::PageableResponse for ListHubsResponse {
1388 type PageItem = crate::model::Hub;
1389
1390 fn items(self) -> std::vec::Vec<Self::PageItem> {
1391 self.hubs
1392 }
1393
1394 fn next_page_token(&self) -> std::string::String {
1395 gax::paginator::extract_token(&self.next_page_token)
1396 }
1397}
1398
1399#[serde_with::serde_as]
1405#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1406#[serde(default, rename_all = "camelCase")]
1407#[non_exhaustive]
1408pub struct GetHubRequest {
1409 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1411 pub name: std::string::String,
1412}
1413
1414impl GetHubRequest {
1415 pub fn new() -> Self {
1416 std::default::Default::default()
1417 }
1418
1419 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1421 self.name = v.into();
1422 self
1423 }
1424}
1425
1426impl wkt::message::Message for GetHubRequest {
1427 fn typename() -> &'static str {
1428 "type.googleapis.com/google.cloud.networkconnectivity.v1.GetHubRequest"
1429 }
1430}
1431
1432#[serde_with::serde_as]
1438#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1439#[serde(default, rename_all = "camelCase")]
1440#[non_exhaustive]
1441pub struct CreateHubRequest {
1442 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1444 pub parent: std::string::String,
1445
1446 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1448 pub hub_id: std::string::String,
1449
1450 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1452 pub hub: std::option::Option<crate::model::Hub>,
1453
1454 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1469 pub request_id: std::string::String,
1470}
1471
1472impl CreateHubRequest {
1473 pub fn new() -> Self {
1474 std::default::Default::default()
1475 }
1476
1477 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1479 self.parent = v.into();
1480 self
1481 }
1482
1483 pub fn set_hub_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1485 self.hub_id = v.into();
1486 self
1487 }
1488
1489 pub fn set_hub<T: std::convert::Into<std::option::Option<crate::model::Hub>>>(
1491 mut self,
1492 v: T,
1493 ) -> Self {
1494 self.hub = v.into();
1495 self
1496 }
1497
1498 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1500 self.request_id = v.into();
1501 self
1502 }
1503}
1504
1505impl wkt::message::Message for CreateHubRequest {
1506 fn typename() -> &'static str {
1507 "type.googleapis.com/google.cloud.networkconnectivity.v1.CreateHubRequest"
1508 }
1509}
1510
1511#[serde_with::serde_as]
1517#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1518#[serde(default, rename_all = "camelCase")]
1519#[non_exhaustive]
1520pub struct UpdateHubRequest {
1521 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1527 pub update_mask: std::option::Option<wkt::FieldMask>,
1528
1529 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1531 pub hub: std::option::Option<crate::model::Hub>,
1532
1533 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1548 pub request_id: std::string::String,
1549}
1550
1551impl UpdateHubRequest {
1552 pub fn new() -> Self {
1553 std::default::Default::default()
1554 }
1555
1556 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
1558 mut self,
1559 v: T,
1560 ) -> Self {
1561 self.update_mask = v.into();
1562 self
1563 }
1564
1565 pub fn set_hub<T: std::convert::Into<std::option::Option<crate::model::Hub>>>(
1567 mut self,
1568 v: T,
1569 ) -> Self {
1570 self.hub = v.into();
1571 self
1572 }
1573
1574 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1576 self.request_id = v.into();
1577 self
1578 }
1579}
1580
1581impl wkt::message::Message for UpdateHubRequest {
1582 fn typename() -> &'static str {
1583 "type.googleapis.com/google.cloud.networkconnectivity.v1.UpdateHubRequest"
1584 }
1585}
1586
1587#[serde_with::serde_as]
1592#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1593#[serde(default, rename_all = "camelCase")]
1594#[non_exhaustive]
1595pub struct DeleteHubRequest {
1596 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1598 pub name: std::string::String,
1599
1600 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1615 pub request_id: std::string::String,
1616}
1617
1618impl DeleteHubRequest {
1619 pub fn new() -> Self {
1620 std::default::Default::default()
1621 }
1622
1623 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1625 self.name = v.into();
1626 self
1627 }
1628
1629 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1631 self.request_id = v.into();
1632 self
1633 }
1634}
1635
1636impl wkt::message::Message for DeleteHubRequest {
1637 fn typename() -> &'static str {
1638 "type.googleapis.com/google.cloud.networkconnectivity.v1.DeleteHubRequest"
1639 }
1640}
1641
1642#[serde_with::serde_as]
1647#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1648#[serde(default, rename_all = "camelCase")]
1649#[non_exhaustive]
1650pub struct ListHubSpokesRequest {
1651 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1653 pub name: std::string::String,
1654
1655 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1664 pub spoke_locations: std::vec::Vec<std::string::String>,
1665
1666 pub page_size: i32,
1668
1669 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1671 pub page_token: std::string::String,
1672
1673 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1675 pub filter: std::string::String,
1676
1677 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1679 pub order_by: std::string::String,
1680
1681 pub view: crate::model::list_hub_spokes_request::SpokeView,
1685}
1686
1687impl ListHubSpokesRequest {
1688 pub fn new() -> Self {
1689 std::default::Default::default()
1690 }
1691
1692 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1694 self.name = v.into();
1695 self
1696 }
1697
1698 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1700 self.page_size = v.into();
1701 self
1702 }
1703
1704 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1706 self.page_token = v.into();
1707 self
1708 }
1709
1710 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1712 self.filter = v.into();
1713 self
1714 }
1715
1716 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1718 self.order_by = v.into();
1719 self
1720 }
1721
1722 pub fn set_view<T: std::convert::Into<crate::model::list_hub_spokes_request::SpokeView>>(
1724 mut self,
1725 v: T,
1726 ) -> Self {
1727 self.view = v.into();
1728 self
1729 }
1730
1731 pub fn set_spoke_locations<T, V>(mut self, v: T) -> Self
1733 where
1734 T: std::iter::IntoIterator<Item = V>,
1735 V: std::convert::Into<std::string::String>,
1736 {
1737 use std::iter::Iterator;
1738 self.spoke_locations = v.into_iter().map(|i| i.into()).collect();
1739 self
1740 }
1741}
1742
1743impl wkt::message::Message for ListHubSpokesRequest {
1744 fn typename() -> &'static str {
1745 "type.googleapis.com/google.cloud.networkconnectivity.v1.ListHubSpokesRequest"
1746 }
1747}
1748
1749pub mod list_hub_spokes_request {
1751 #[allow(unused_imports)]
1752 use super::*;
1753
1754 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1756 pub struct SpokeView(std::borrow::Cow<'static, str>);
1757
1758 impl SpokeView {
1759 pub const fn new(v: &'static str) -> Self {
1761 Self(std::borrow::Cow::Borrowed(v))
1762 }
1763
1764 pub fn value(&self) -> &str {
1766 &self.0
1767 }
1768 }
1769
1770 pub mod spoke_view {
1772 use super::SpokeView;
1773
1774 pub const SPOKE_VIEW_UNSPECIFIED: SpokeView = SpokeView::new("SPOKE_VIEW_UNSPECIFIED");
1777
1778 pub const BASIC: SpokeView = SpokeView::new("BASIC");
1781
1782 pub const DETAILED: SpokeView = SpokeView::new("DETAILED");
1786 }
1787
1788 impl std::convert::From<std::string::String> for SpokeView {
1789 fn from(value: std::string::String) -> Self {
1790 Self(std::borrow::Cow::Owned(value))
1791 }
1792 }
1793}
1794
1795#[serde_with::serde_as]
1800#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1801#[serde(default, rename_all = "camelCase")]
1802#[non_exhaustive]
1803pub struct ListHubSpokesResponse {
1804 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1808 pub spokes: std::vec::Vec<crate::model::Spoke>,
1809
1810 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1814 pub next_page_token: std::string::String,
1815
1816 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1818 pub unreachable: std::vec::Vec<std::string::String>,
1819}
1820
1821impl ListHubSpokesResponse {
1822 pub fn new() -> Self {
1823 std::default::Default::default()
1824 }
1825
1826 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1828 self.next_page_token = v.into();
1829 self
1830 }
1831
1832 pub fn set_spokes<T, V>(mut self, v: T) -> Self
1834 where
1835 T: std::iter::IntoIterator<Item = V>,
1836 V: std::convert::Into<crate::model::Spoke>,
1837 {
1838 use std::iter::Iterator;
1839 self.spokes = v.into_iter().map(|i| i.into()).collect();
1840 self
1841 }
1842
1843 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1845 where
1846 T: std::iter::IntoIterator<Item = V>,
1847 V: std::convert::Into<std::string::String>,
1848 {
1849 use std::iter::Iterator;
1850 self.unreachable = v.into_iter().map(|i| i.into()).collect();
1851 self
1852 }
1853}
1854
1855impl wkt::message::Message for ListHubSpokesResponse {
1856 fn typename() -> &'static str {
1857 "type.googleapis.com/google.cloud.networkconnectivity.v1.ListHubSpokesResponse"
1858 }
1859}
1860
1861#[cfg(feature = "unstable-stream")]
1862impl gax::paginator::PageableResponse for ListHubSpokesResponse {
1863 type PageItem = crate::model::Spoke;
1864
1865 fn items(self) -> std::vec::Vec<Self::PageItem> {
1866 self.spokes
1867 }
1868
1869 fn next_page_token(&self) -> std::string::String {
1870 gax::paginator::extract_token(&self.next_page_token)
1871 }
1872}
1873
1874#[serde_with::serde_as]
1879#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1880#[serde(default, rename_all = "camelCase")]
1881#[non_exhaustive]
1882pub struct QueryHubStatusRequest {
1883 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1885 pub name: std::string::String,
1886
1887 pub page_size: i32,
1889
1890 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1892 pub page_token: std::string::String,
1893
1894 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1905 pub filter: std::string::String,
1906
1907 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1919 pub order_by: std::string::String,
1920
1921 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1931 pub group_by: std::string::String,
1932}
1933
1934impl QueryHubStatusRequest {
1935 pub fn new() -> Self {
1936 std::default::Default::default()
1937 }
1938
1939 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1941 self.name = v.into();
1942 self
1943 }
1944
1945 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1947 self.page_size = v.into();
1948 self
1949 }
1950
1951 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1953 self.page_token = v.into();
1954 self
1955 }
1956
1957 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1959 self.filter = v.into();
1960 self
1961 }
1962
1963 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1965 self.order_by = v.into();
1966 self
1967 }
1968
1969 pub fn set_group_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1971 self.group_by = v.into();
1972 self
1973 }
1974}
1975
1976impl wkt::message::Message for QueryHubStatusRequest {
1977 fn typename() -> &'static str {
1978 "type.googleapis.com/google.cloud.networkconnectivity.v1.QueryHubStatusRequest"
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 QueryHubStatusResponse {
1991 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1993 pub hub_status_entries: std::vec::Vec<crate::model::HubStatusEntry>,
1994
1995 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1999 pub next_page_token: std::string::String,
2000}
2001
2002impl QueryHubStatusResponse {
2003 pub fn new() -> Self {
2004 std::default::Default::default()
2005 }
2006
2007 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2009 self.next_page_token = v.into();
2010 self
2011 }
2012
2013 pub fn set_hub_status_entries<T, V>(mut self, v: T) -> Self
2015 where
2016 T: std::iter::IntoIterator<Item = V>,
2017 V: std::convert::Into<crate::model::HubStatusEntry>,
2018 {
2019 use std::iter::Iterator;
2020 self.hub_status_entries = v.into_iter().map(|i| i.into()).collect();
2021 self
2022 }
2023}
2024
2025impl wkt::message::Message for QueryHubStatusResponse {
2026 fn typename() -> &'static str {
2027 "type.googleapis.com/google.cloud.networkconnectivity.v1.QueryHubStatusResponse"
2028 }
2029}
2030
2031#[cfg(feature = "unstable-stream")]
2032impl gax::paginator::PageableResponse for QueryHubStatusResponse {
2033 type PageItem = crate::model::HubStatusEntry;
2034
2035 fn items(self) -> std::vec::Vec<Self::PageItem> {
2036 self.hub_status_entries
2037 }
2038
2039 fn next_page_token(&self) -> std::string::String {
2040 gax::paginator::extract_token(&self.next_page_token)
2041 }
2042}
2043
2044#[serde_with::serde_as]
2047#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2048#[serde(default, rename_all = "camelCase")]
2049#[non_exhaustive]
2050pub struct HubStatusEntry {
2051 pub count: i32,
2055
2056 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2059 pub group_by: std::string::String,
2060
2061 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2063 pub psc_propagation_status: std::option::Option<crate::model::PscPropagationStatus>,
2064}
2065
2066impl HubStatusEntry {
2067 pub fn new() -> Self {
2068 std::default::Default::default()
2069 }
2070
2071 pub fn set_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2073 self.count = v.into();
2074 self
2075 }
2076
2077 pub fn set_group_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2079 self.group_by = v.into();
2080 self
2081 }
2082
2083 pub fn set_psc_propagation_status<
2085 T: std::convert::Into<std::option::Option<crate::model::PscPropagationStatus>>,
2086 >(
2087 mut self,
2088 v: T,
2089 ) -> Self {
2090 self.psc_propagation_status = v.into();
2091 self
2092 }
2093}
2094
2095impl wkt::message::Message for HubStatusEntry {
2096 fn typename() -> &'static str {
2097 "type.googleapis.com/google.cloud.networkconnectivity.v1.HubStatusEntry"
2098 }
2099}
2100
2101#[serde_with::serde_as]
2104#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2105#[serde(default, rename_all = "camelCase")]
2106#[non_exhaustive]
2107pub struct PscPropagationStatus {
2108 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2110 pub source_spoke: std::string::String,
2111
2112 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2114 pub source_group: std::string::String,
2115
2116 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2118 pub source_forwarding_rule: std::string::String,
2119
2120 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2122 pub target_spoke: std::string::String,
2123
2124 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2126 pub target_group: std::string::String,
2127
2128 pub code: crate::model::psc_propagation_status::Code,
2130
2131 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2134 pub message: std::string::String,
2135}
2136
2137impl PscPropagationStatus {
2138 pub fn new() -> Self {
2139 std::default::Default::default()
2140 }
2141
2142 pub fn set_source_spoke<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2144 self.source_spoke = v.into();
2145 self
2146 }
2147
2148 pub fn set_source_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2150 self.source_group = v.into();
2151 self
2152 }
2153
2154 pub fn set_source_forwarding_rule<T: std::convert::Into<std::string::String>>(
2156 mut self,
2157 v: T,
2158 ) -> Self {
2159 self.source_forwarding_rule = v.into();
2160 self
2161 }
2162
2163 pub fn set_target_spoke<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2165 self.target_spoke = v.into();
2166 self
2167 }
2168
2169 pub fn set_target_group<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2171 self.target_group = v.into();
2172 self
2173 }
2174
2175 pub fn set_code<T: std::convert::Into<crate::model::psc_propagation_status::Code>>(
2177 mut self,
2178 v: T,
2179 ) -> Self {
2180 self.code = v.into();
2181 self
2182 }
2183
2184 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2186 self.message = v.into();
2187 self
2188 }
2189}
2190
2191impl wkt::message::Message for PscPropagationStatus {
2192 fn typename() -> &'static str {
2193 "type.googleapis.com/google.cloud.networkconnectivity.v1.PscPropagationStatus"
2194 }
2195}
2196
2197pub mod psc_propagation_status {
2199 #[allow(unused_imports)]
2200 use super::*;
2201
2202 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2205 pub struct Code(std::borrow::Cow<'static, str>);
2206
2207 impl Code {
2208 pub const fn new(v: &'static str) -> Self {
2210 Self(std::borrow::Cow::Borrowed(v))
2211 }
2212
2213 pub fn value(&self) -> &str {
2215 &self.0
2216 }
2217 }
2218
2219 pub mod code {
2221 use super::Code;
2222
2223 pub const CODE_UNSPECIFIED: Code = Code::new("CODE_UNSPECIFIED");
2225
2226 pub const READY: Code = Code::new("READY");
2228
2229 pub const PROPAGATING: Code = Code::new("PROPAGATING");
2232
2233 pub const ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED: Code =
2237 Code::new("ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED");
2238
2239 pub const ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED: Code =
2244 Code::new("ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED");
2245
2246 pub const ERROR_PRODUCER_QUOTA_EXCEEDED: Code = Code::new("ERROR_PRODUCER_QUOTA_EXCEEDED");
2250
2251 pub const ERROR_CONSUMER_QUOTA_EXCEEDED: Code = Code::new("ERROR_CONSUMER_QUOTA_EXCEEDED");
2255 }
2256
2257 impl std::convert::From<std::string::String> for Code {
2258 fn from(value: std::string::String) -> Self {
2259 Self(std::borrow::Cow::Owned(value))
2260 }
2261 }
2262}
2263
2264#[serde_with::serde_as]
2269#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2270#[serde(default, rename_all = "camelCase")]
2271#[non_exhaustive]
2272pub struct ListSpokesRequest {
2273 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2275 pub parent: std::string::String,
2276
2277 pub page_size: i32,
2279
2280 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2282 pub page_token: std::string::String,
2283
2284 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2286 pub filter: std::string::String,
2287
2288 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2290 pub order_by: std::string::String,
2291}
2292
2293impl ListSpokesRequest {
2294 pub fn new() -> Self {
2295 std::default::Default::default()
2296 }
2297
2298 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2300 self.parent = v.into();
2301 self
2302 }
2303
2304 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2306 self.page_size = v.into();
2307 self
2308 }
2309
2310 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2312 self.page_token = v.into();
2313 self
2314 }
2315
2316 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2318 self.filter = v.into();
2319 self
2320 }
2321
2322 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2324 self.order_by = v.into();
2325 self
2326 }
2327}
2328
2329impl wkt::message::Message for ListSpokesRequest {
2330 fn typename() -> &'static str {
2331 "type.googleapis.com/google.cloud.networkconnectivity.v1.ListSpokesRequest"
2332 }
2333}
2334
2335#[serde_with::serde_as]
2340#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2341#[serde(default, rename_all = "camelCase")]
2342#[non_exhaustive]
2343pub struct ListSpokesResponse {
2344 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2346 pub spokes: std::vec::Vec<crate::model::Spoke>,
2347
2348 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2352 pub next_page_token: std::string::String,
2353
2354 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2356 pub unreachable: std::vec::Vec<std::string::String>,
2357}
2358
2359impl ListSpokesResponse {
2360 pub fn new() -> Self {
2361 std::default::Default::default()
2362 }
2363
2364 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2366 self.next_page_token = v.into();
2367 self
2368 }
2369
2370 pub fn set_spokes<T, V>(mut self, v: T) -> Self
2372 where
2373 T: std::iter::IntoIterator<Item = V>,
2374 V: std::convert::Into<crate::model::Spoke>,
2375 {
2376 use std::iter::Iterator;
2377 self.spokes = v.into_iter().map(|i| i.into()).collect();
2378 self
2379 }
2380
2381 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2383 where
2384 T: std::iter::IntoIterator<Item = V>,
2385 V: std::convert::Into<std::string::String>,
2386 {
2387 use std::iter::Iterator;
2388 self.unreachable = v.into_iter().map(|i| i.into()).collect();
2389 self
2390 }
2391}
2392
2393impl wkt::message::Message for ListSpokesResponse {
2394 fn typename() -> &'static str {
2395 "type.googleapis.com/google.cloud.networkconnectivity.v1.ListSpokesResponse"
2396 }
2397}
2398
2399#[cfg(feature = "unstable-stream")]
2400impl gax::paginator::PageableResponse for ListSpokesResponse {
2401 type PageItem = crate::model::Spoke;
2402
2403 fn items(self) -> std::vec::Vec<Self::PageItem> {
2404 self.spokes
2405 }
2406
2407 fn next_page_token(&self) -> std::string::String {
2408 gax::paginator::extract_token(&self.next_page_token)
2409 }
2410}
2411
2412#[serde_with::serde_as]
2417#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2418#[serde(default, rename_all = "camelCase")]
2419#[non_exhaustive]
2420pub struct GetSpokeRequest {
2421 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2423 pub name: std::string::String,
2424}
2425
2426impl GetSpokeRequest {
2427 pub fn new() -> Self {
2428 std::default::Default::default()
2429 }
2430
2431 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2433 self.name = v.into();
2434 self
2435 }
2436}
2437
2438impl wkt::message::Message for GetSpokeRequest {
2439 fn typename() -> &'static str {
2440 "type.googleapis.com/google.cloud.networkconnectivity.v1.GetSpokeRequest"
2441 }
2442}
2443
2444#[serde_with::serde_as]
2449#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2450#[serde(default, rename_all = "camelCase")]
2451#[non_exhaustive]
2452pub struct CreateSpokeRequest {
2453 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2455 pub parent: std::string::String,
2456
2457 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2459 pub spoke_id: std::string::String,
2460
2461 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2463 pub spoke: std::option::Option<crate::model::Spoke>,
2464
2465 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2480 pub request_id: std::string::String,
2481}
2482
2483impl CreateSpokeRequest {
2484 pub fn new() -> Self {
2485 std::default::Default::default()
2486 }
2487
2488 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2490 self.parent = v.into();
2491 self
2492 }
2493
2494 pub fn set_spoke_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2496 self.spoke_id = v.into();
2497 self
2498 }
2499
2500 pub fn set_spoke<T: std::convert::Into<std::option::Option<crate::model::Spoke>>>(
2502 mut self,
2503 v: T,
2504 ) -> Self {
2505 self.spoke = v.into();
2506 self
2507 }
2508
2509 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2511 self.request_id = v.into();
2512 self
2513 }
2514}
2515
2516impl wkt::message::Message for CreateSpokeRequest {
2517 fn typename() -> &'static str {
2518 "type.googleapis.com/google.cloud.networkconnectivity.v1.CreateSpokeRequest"
2519 }
2520}
2521
2522#[serde_with::serde_as]
2528#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2529#[serde(default, rename_all = "camelCase")]
2530#[non_exhaustive]
2531pub struct UpdateSpokeRequest {
2532 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2538 pub update_mask: std::option::Option<wkt::FieldMask>,
2539
2540 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2542 pub spoke: std::option::Option<crate::model::Spoke>,
2543
2544 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2559 pub request_id: std::string::String,
2560}
2561
2562impl UpdateSpokeRequest {
2563 pub fn new() -> Self {
2564 std::default::Default::default()
2565 }
2566
2567 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
2569 mut self,
2570 v: T,
2571 ) -> Self {
2572 self.update_mask = v.into();
2573 self
2574 }
2575
2576 pub fn set_spoke<T: std::convert::Into<std::option::Option<crate::model::Spoke>>>(
2578 mut self,
2579 v: T,
2580 ) -> Self {
2581 self.spoke = v.into();
2582 self
2583 }
2584
2585 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2587 self.request_id = v.into();
2588 self
2589 }
2590}
2591
2592impl wkt::message::Message for UpdateSpokeRequest {
2593 fn typename() -> &'static str {
2594 "type.googleapis.com/google.cloud.networkconnectivity.v1.UpdateSpokeRequest"
2595 }
2596}
2597
2598#[serde_with::serde_as]
2603#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2604#[serde(default, rename_all = "camelCase")]
2605#[non_exhaustive]
2606pub struct DeleteSpokeRequest {
2607 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2609 pub name: std::string::String,
2610
2611 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2626 pub request_id: std::string::String,
2627}
2628
2629impl DeleteSpokeRequest {
2630 pub fn new() -> Self {
2631 std::default::Default::default()
2632 }
2633
2634 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2636 self.name = v.into();
2637 self
2638 }
2639
2640 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2642 self.request_id = v.into();
2643 self
2644 }
2645}
2646
2647impl wkt::message::Message for DeleteSpokeRequest {
2648 fn typename() -> &'static str {
2649 "type.googleapis.com/google.cloud.networkconnectivity.v1.DeleteSpokeRequest"
2650 }
2651}
2652
2653#[serde_with::serde_as]
2658#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2659#[serde(default, rename_all = "camelCase")]
2660#[non_exhaustive]
2661pub struct AcceptHubSpokeRequest {
2662 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2664 pub name: std::string::String,
2665
2666 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2668 pub spoke_uri: std::string::String,
2669
2670 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2685 pub request_id: std::string::String,
2686}
2687
2688impl AcceptHubSpokeRequest {
2689 pub fn new() -> Self {
2690 std::default::Default::default()
2691 }
2692
2693 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2695 self.name = v.into();
2696 self
2697 }
2698
2699 pub fn set_spoke_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2701 self.spoke_uri = v.into();
2702 self
2703 }
2704
2705 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2707 self.request_id = v.into();
2708 self
2709 }
2710}
2711
2712impl wkt::message::Message for AcceptHubSpokeRequest {
2713 fn typename() -> &'static str {
2714 "type.googleapis.com/google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest"
2715 }
2716}
2717
2718#[serde_with::serde_as]
2723#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2724#[serde(default, rename_all = "camelCase")]
2725#[non_exhaustive]
2726pub struct AcceptHubSpokeResponse {
2727 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2729 pub spoke: std::option::Option<crate::model::Spoke>,
2730}
2731
2732impl AcceptHubSpokeResponse {
2733 pub fn new() -> Self {
2734 std::default::Default::default()
2735 }
2736
2737 pub fn set_spoke<T: std::convert::Into<std::option::Option<crate::model::Spoke>>>(
2739 mut self,
2740 v: T,
2741 ) -> Self {
2742 self.spoke = v.into();
2743 self
2744 }
2745}
2746
2747impl wkt::message::Message for AcceptHubSpokeResponse {
2748 fn typename() -> &'static str {
2749 "type.googleapis.com/google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse"
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 RejectHubSpokeRequest {
2762 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2764 pub name: std::string::String,
2765
2766 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2768 pub spoke_uri: std::string::String,
2769
2770 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2785 pub request_id: std::string::String,
2786
2787 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2789 pub details: std::string::String,
2790}
2791
2792impl RejectHubSpokeRequest {
2793 pub fn new() -> Self {
2794 std::default::Default::default()
2795 }
2796
2797 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2799 self.name = v.into();
2800 self
2801 }
2802
2803 pub fn set_spoke_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2805 self.spoke_uri = v.into();
2806 self
2807 }
2808
2809 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2811 self.request_id = v.into();
2812 self
2813 }
2814
2815 pub fn set_details<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2817 self.details = v.into();
2818 self
2819 }
2820}
2821
2822impl wkt::message::Message for RejectHubSpokeRequest {
2823 fn typename() -> &'static str {
2824 "type.googleapis.com/google.cloud.networkconnectivity.v1.RejectHubSpokeRequest"
2825 }
2826}
2827
2828#[serde_with::serde_as]
2833#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2834#[serde(default, rename_all = "camelCase")]
2835#[non_exhaustive]
2836pub struct RejectHubSpokeResponse {
2837 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2839 pub spoke: std::option::Option<crate::model::Spoke>,
2840}
2841
2842impl RejectHubSpokeResponse {
2843 pub fn new() -> Self {
2844 std::default::Default::default()
2845 }
2846
2847 pub fn set_spoke<T: std::convert::Into<std::option::Option<crate::model::Spoke>>>(
2849 mut self,
2850 v: T,
2851 ) -> Self {
2852 self.spoke = v.into();
2853 self
2854 }
2855}
2856
2857impl wkt::message::Message for RejectHubSpokeResponse {
2858 fn typename() -> &'static str {
2859 "type.googleapis.com/google.cloud.networkconnectivity.v1.RejectHubSpokeResponse"
2860 }
2861}
2862
2863#[serde_with::serde_as]
2868#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2869#[serde(default, rename_all = "camelCase")]
2870#[non_exhaustive]
2871pub struct GetRouteTableRequest {
2872 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2874 pub name: std::string::String,
2875}
2876
2877impl GetRouteTableRequest {
2878 pub fn new() -> Self {
2879 std::default::Default::default()
2880 }
2881
2882 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2884 self.name = v.into();
2885 self
2886 }
2887}
2888
2889impl wkt::message::Message for GetRouteTableRequest {
2890 fn typename() -> &'static str {
2891 "type.googleapis.com/google.cloud.networkconnectivity.v1.GetRouteTableRequest"
2892 }
2893}
2894
2895#[serde_with::serde_as]
2900#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2901#[serde(default, rename_all = "camelCase")]
2902#[non_exhaustive]
2903pub struct GetRouteRequest {
2904 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2906 pub name: std::string::String,
2907}
2908
2909impl GetRouteRequest {
2910 pub fn new() -> Self {
2911 std::default::Default::default()
2912 }
2913
2914 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2916 self.name = v.into();
2917 self
2918 }
2919}
2920
2921impl wkt::message::Message for GetRouteRequest {
2922 fn typename() -> &'static str {
2923 "type.googleapis.com/google.cloud.networkconnectivity.v1.GetRouteRequest"
2924 }
2925}
2926
2927#[serde_with::serde_as]
2933#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2934#[serde(default, rename_all = "camelCase")]
2935#[non_exhaustive]
2936pub struct ListRoutesRequest {
2937 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2939 pub parent: std::string::String,
2940
2941 pub page_size: i32,
2943
2944 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2946 pub page_token: std::string::String,
2947
2948 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2950 pub filter: std::string::String,
2951
2952 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2954 pub order_by: std::string::String,
2955}
2956
2957impl ListRoutesRequest {
2958 pub fn new() -> Self {
2959 std::default::Default::default()
2960 }
2961
2962 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2964 self.parent = v.into();
2965 self
2966 }
2967
2968 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2970 self.page_size = v.into();
2971 self
2972 }
2973
2974 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2976 self.page_token = v.into();
2977 self
2978 }
2979
2980 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2982 self.filter = v.into();
2983 self
2984 }
2985
2986 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2988 self.order_by = v.into();
2989 self
2990 }
2991}
2992
2993impl wkt::message::Message for ListRoutesRequest {
2994 fn typename() -> &'static str {
2995 "type.googleapis.com/google.cloud.networkconnectivity.v1.ListRoutesRequest"
2996 }
2997}
2998
2999#[serde_with::serde_as]
3005#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3006#[serde(default, rename_all = "camelCase")]
3007#[non_exhaustive]
3008pub struct ListRoutesResponse {
3009 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3011 pub routes: std::vec::Vec<crate::model::Route>,
3012
3013 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3017 pub next_page_token: std::string::String,
3018
3019 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3021 pub unreachable: std::vec::Vec<std::string::String>,
3022}
3023
3024impl ListRoutesResponse {
3025 pub fn new() -> Self {
3026 std::default::Default::default()
3027 }
3028
3029 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3031 self.next_page_token = v.into();
3032 self
3033 }
3034
3035 pub fn set_routes<T, V>(mut self, v: T) -> Self
3037 where
3038 T: std::iter::IntoIterator<Item = V>,
3039 V: std::convert::Into<crate::model::Route>,
3040 {
3041 use std::iter::Iterator;
3042 self.routes = v.into_iter().map(|i| i.into()).collect();
3043 self
3044 }
3045
3046 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3048 where
3049 T: std::iter::IntoIterator<Item = V>,
3050 V: std::convert::Into<std::string::String>,
3051 {
3052 use std::iter::Iterator;
3053 self.unreachable = v.into_iter().map(|i| i.into()).collect();
3054 self
3055 }
3056}
3057
3058impl wkt::message::Message for ListRoutesResponse {
3059 fn typename() -> &'static str {
3060 "type.googleapis.com/google.cloud.networkconnectivity.v1.ListRoutesResponse"
3061 }
3062}
3063
3064#[cfg(feature = "unstable-stream")]
3065impl gax::paginator::PageableResponse for ListRoutesResponse {
3066 type PageItem = crate::model::Route;
3067
3068 fn items(self) -> std::vec::Vec<Self::PageItem> {
3069 self.routes
3070 }
3071
3072 fn next_page_token(&self) -> std::string::String {
3073 gax::paginator::extract_token(&self.next_page_token)
3074 }
3075}
3076
3077#[serde_with::serde_as]
3083#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3084#[serde(default, rename_all = "camelCase")]
3085#[non_exhaustive]
3086pub struct ListRouteTablesRequest {
3087 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3089 pub parent: std::string::String,
3090
3091 pub page_size: i32,
3093
3094 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3096 pub page_token: std::string::String,
3097
3098 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3100 pub filter: std::string::String,
3101
3102 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3104 pub order_by: std::string::String,
3105}
3106
3107impl ListRouteTablesRequest {
3108 pub fn new() -> Self {
3109 std::default::Default::default()
3110 }
3111
3112 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3114 self.parent = v.into();
3115 self
3116 }
3117
3118 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3120 self.page_size = v.into();
3121 self
3122 }
3123
3124 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3126 self.page_token = v.into();
3127 self
3128 }
3129
3130 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3132 self.filter = v.into();
3133 self
3134 }
3135
3136 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3138 self.order_by = v.into();
3139 self
3140 }
3141}
3142
3143impl wkt::message::Message for ListRouteTablesRequest {
3144 fn typename() -> &'static str {
3145 "type.googleapis.com/google.cloud.networkconnectivity.v1.ListRouteTablesRequest"
3146 }
3147}
3148
3149#[serde_with::serde_as]
3155#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3156#[serde(default, rename_all = "camelCase")]
3157#[non_exhaustive]
3158pub struct ListRouteTablesResponse {
3159 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3161 pub route_tables: std::vec::Vec<crate::model::RouteTable>,
3162
3163 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3167 pub next_page_token: std::string::String,
3168
3169 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3171 pub unreachable: std::vec::Vec<std::string::String>,
3172}
3173
3174impl ListRouteTablesResponse {
3175 pub fn new() -> Self {
3176 std::default::Default::default()
3177 }
3178
3179 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3181 self.next_page_token = v.into();
3182 self
3183 }
3184
3185 pub fn set_route_tables<T, V>(mut self, v: T) -> Self
3187 where
3188 T: std::iter::IntoIterator<Item = V>,
3189 V: std::convert::Into<crate::model::RouteTable>,
3190 {
3191 use std::iter::Iterator;
3192 self.route_tables = v.into_iter().map(|i| i.into()).collect();
3193 self
3194 }
3195
3196 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3198 where
3199 T: std::iter::IntoIterator<Item = V>,
3200 V: std::convert::Into<std::string::String>,
3201 {
3202 use std::iter::Iterator;
3203 self.unreachable = v.into_iter().map(|i| i.into()).collect();
3204 self
3205 }
3206}
3207
3208impl wkt::message::Message for ListRouteTablesResponse {
3209 fn typename() -> &'static str {
3210 "type.googleapis.com/google.cloud.networkconnectivity.v1.ListRouteTablesResponse"
3211 }
3212}
3213
3214#[cfg(feature = "unstable-stream")]
3215impl gax::paginator::PageableResponse for ListRouteTablesResponse {
3216 type PageItem = crate::model::RouteTable;
3217
3218 fn items(self) -> std::vec::Vec<Self::PageItem> {
3219 self.route_tables
3220 }
3221
3222 fn next_page_token(&self) -> std::string::String {
3223 gax::paginator::extract_token(&self.next_page_token)
3224 }
3225}
3226
3227#[serde_with::serde_as]
3233#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3234#[serde(default, rename_all = "camelCase")]
3235#[non_exhaustive]
3236pub struct ListGroupsRequest {
3237 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3239 pub parent: std::string::String,
3240
3241 pub page_size: i32,
3243
3244 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3246 pub page_token: std::string::String,
3247
3248 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3250 pub filter: std::string::String,
3251
3252 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3254 pub order_by: std::string::String,
3255}
3256
3257impl ListGroupsRequest {
3258 pub fn new() -> Self {
3259 std::default::Default::default()
3260 }
3261
3262 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3264 self.parent = v.into();
3265 self
3266 }
3267
3268 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3270 self.page_size = v.into();
3271 self
3272 }
3273
3274 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3276 self.page_token = v.into();
3277 self
3278 }
3279
3280 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3282 self.filter = v.into();
3283 self
3284 }
3285
3286 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3288 self.order_by = v.into();
3289 self
3290 }
3291}
3292
3293impl wkt::message::Message for ListGroupsRequest {
3294 fn typename() -> &'static str {
3295 "type.googleapis.com/google.cloud.networkconnectivity.v1.ListGroupsRequest"
3296 }
3297}
3298
3299#[serde_with::serde_as]
3305#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3306#[serde(default, rename_all = "camelCase")]
3307#[non_exhaustive]
3308pub struct ListGroupsResponse {
3309 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3311 pub groups: std::vec::Vec<crate::model::Group>,
3312
3313 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3317 pub next_page_token: std::string::String,
3318
3319 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3321 pub unreachable: std::vec::Vec<std::string::String>,
3322}
3323
3324impl ListGroupsResponse {
3325 pub fn new() -> Self {
3326 std::default::Default::default()
3327 }
3328
3329 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3331 self.next_page_token = v.into();
3332 self
3333 }
3334
3335 pub fn set_groups<T, V>(mut self, v: T) -> Self
3337 where
3338 T: std::iter::IntoIterator<Item = V>,
3339 V: std::convert::Into<crate::model::Group>,
3340 {
3341 use std::iter::Iterator;
3342 self.groups = v.into_iter().map(|i| i.into()).collect();
3343 self
3344 }
3345
3346 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3348 where
3349 T: std::iter::IntoIterator<Item = V>,
3350 V: std::convert::Into<std::string::String>,
3351 {
3352 use std::iter::Iterator;
3353 self.unreachable = v.into_iter().map(|i| i.into()).collect();
3354 self
3355 }
3356}
3357
3358impl wkt::message::Message for ListGroupsResponse {
3359 fn typename() -> &'static str {
3360 "type.googleapis.com/google.cloud.networkconnectivity.v1.ListGroupsResponse"
3361 }
3362}
3363
3364#[cfg(feature = "unstable-stream")]
3365impl gax::paginator::PageableResponse for ListGroupsResponse {
3366 type PageItem = crate::model::Group;
3367
3368 fn items(self) -> std::vec::Vec<Self::PageItem> {
3369 self.groups
3370 }
3371
3372 fn next_page_token(&self) -> std::string::String {
3373 gax::paginator::extract_token(&self.next_page_token)
3374 }
3375}
3376
3377#[serde_with::serde_as]
3382#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3383#[serde(default, rename_all = "camelCase")]
3384#[non_exhaustive]
3385pub struct LinkedVpnTunnels {
3386 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3388 pub uris: std::vec::Vec<std::string::String>,
3389
3390 pub site_to_site_data_transfer: bool,
3394
3395 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3397 pub vpc_network: std::string::String,
3398
3399 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3403 pub include_import_ranges: std::vec::Vec<std::string::String>,
3404}
3405
3406impl LinkedVpnTunnels {
3407 pub fn new() -> Self {
3408 std::default::Default::default()
3409 }
3410
3411 pub fn set_site_to_site_data_transfer<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3413 self.site_to_site_data_transfer = v.into();
3414 self
3415 }
3416
3417 pub fn set_vpc_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3419 self.vpc_network = v.into();
3420 self
3421 }
3422
3423 pub fn set_uris<T, V>(mut self, v: T) -> Self
3425 where
3426 T: std::iter::IntoIterator<Item = V>,
3427 V: std::convert::Into<std::string::String>,
3428 {
3429 use std::iter::Iterator;
3430 self.uris = v.into_iter().map(|i| i.into()).collect();
3431 self
3432 }
3433
3434 pub fn set_include_import_ranges<T, V>(mut self, v: T) -> Self
3436 where
3437 T: std::iter::IntoIterator<Item = V>,
3438 V: std::convert::Into<std::string::String>,
3439 {
3440 use std::iter::Iterator;
3441 self.include_import_ranges = v.into_iter().map(|i| i.into()).collect();
3442 self
3443 }
3444}
3445
3446impl wkt::message::Message for LinkedVpnTunnels {
3447 fn typename() -> &'static str {
3448 "type.googleapis.com/google.cloud.networkconnectivity.v1.LinkedVpnTunnels"
3449 }
3450}
3451
3452#[serde_with::serde_as]
3457#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3458#[serde(default, rename_all = "camelCase")]
3459#[non_exhaustive]
3460pub struct LinkedInterconnectAttachments {
3461 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3463 pub uris: std::vec::Vec<std::string::String>,
3464
3465 pub site_to_site_data_transfer: bool,
3469
3470 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3472 pub vpc_network: std::string::String,
3473
3474 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3478 pub include_import_ranges: std::vec::Vec<std::string::String>,
3479}
3480
3481impl LinkedInterconnectAttachments {
3482 pub fn new() -> Self {
3483 std::default::Default::default()
3484 }
3485
3486 pub fn set_site_to_site_data_transfer<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3488 self.site_to_site_data_transfer = v.into();
3489 self
3490 }
3491
3492 pub fn set_vpc_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3494 self.vpc_network = v.into();
3495 self
3496 }
3497
3498 pub fn set_uris<T, V>(mut self, v: T) -> Self
3500 where
3501 T: std::iter::IntoIterator<Item = V>,
3502 V: std::convert::Into<std::string::String>,
3503 {
3504 use std::iter::Iterator;
3505 self.uris = v.into_iter().map(|i| i.into()).collect();
3506 self
3507 }
3508
3509 pub fn set_include_import_ranges<T, V>(mut self, v: T) -> Self
3511 where
3512 T: std::iter::IntoIterator<Item = V>,
3513 V: std::convert::Into<std::string::String>,
3514 {
3515 use std::iter::Iterator;
3516 self.include_import_ranges = v.into_iter().map(|i| i.into()).collect();
3517 self
3518 }
3519}
3520
3521impl wkt::message::Message for LinkedInterconnectAttachments {
3522 fn typename() -> &'static str {
3523 "type.googleapis.com/google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments"
3524 }
3525}
3526
3527#[serde_with::serde_as]
3532#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3533#[serde(default, rename_all = "camelCase")]
3534#[non_exhaustive]
3535pub struct LinkedRouterApplianceInstances {
3536 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3538 pub instances: std::vec::Vec<crate::model::RouterApplianceInstance>,
3539
3540 pub site_to_site_data_transfer: bool,
3544
3545 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3548 pub vpc_network: std::string::String,
3549
3550 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3554 pub include_import_ranges: std::vec::Vec<std::string::String>,
3555}
3556
3557impl LinkedRouterApplianceInstances {
3558 pub fn new() -> Self {
3559 std::default::Default::default()
3560 }
3561
3562 pub fn set_site_to_site_data_transfer<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3564 self.site_to_site_data_transfer = v.into();
3565 self
3566 }
3567
3568 pub fn set_vpc_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3570 self.vpc_network = v.into();
3571 self
3572 }
3573
3574 pub fn set_instances<T, V>(mut self, v: T) -> Self
3576 where
3577 T: std::iter::IntoIterator<Item = V>,
3578 V: std::convert::Into<crate::model::RouterApplianceInstance>,
3579 {
3580 use std::iter::Iterator;
3581 self.instances = v.into_iter().map(|i| i.into()).collect();
3582 self
3583 }
3584
3585 pub fn set_include_import_ranges<T, V>(mut self, v: T) -> Self
3587 where
3588 T: std::iter::IntoIterator<Item = V>,
3589 V: std::convert::Into<std::string::String>,
3590 {
3591 use std::iter::Iterator;
3592 self.include_import_ranges = v.into_iter().map(|i| i.into()).collect();
3593 self
3594 }
3595}
3596
3597impl wkt::message::Message for LinkedRouterApplianceInstances {
3598 fn typename() -> &'static str {
3599 "type.googleapis.com/google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances"
3600 }
3601}
3602
3603#[serde_with::serde_as]
3605#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3606#[serde(default, rename_all = "camelCase")]
3607#[non_exhaustive]
3608pub struct LinkedVpcNetwork {
3609 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3611 pub uri: std::string::String,
3612
3613 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3615 pub exclude_export_ranges: std::vec::Vec<std::string::String>,
3616
3617 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3619 pub include_export_ranges: std::vec::Vec<std::string::String>,
3620
3621 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3625 pub producer_vpc_spokes: std::vec::Vec<std::string::String>,
3626}
3627
3628impl LinkedVpcNetwork {
3629 pub fn new() -> Self {
3630 std::default::Default::default()
3631 }
3632
3633 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3635 self.uri = v.into();
3636 self
3637 }
3638
3639 pub fn set_exclude_export_ranges<T, V>(mut self, v: T) -> Self
3641 where
3642 T: std::iter::IntoIterator<Item = V>,
3643 V: std::convert::Into<std::string::String>,
3644 {
3645 use std::iter::Iterator;
3646 self.exclude_export_ranges = v.into_iter().map(|i| i.into()).collect();
3647 self
3648 }
3649
3650 pub fn set_include_export_ranges<T, V>(mut self, v: T) -> Self
3652 where
3653 T: std::iter::IntoIterator<Item = V>,
3654 V: std::convert::Into<std::string::String>,
3655 {
3656 use std::iter::Iterator;
3657 self.include_export_ranges = v.into_iter().map(|i| i.into()).collect();
3658 self
3659 }
3660
3661 pub fn set_producer_vpc_spokes<T, V>(mut self, v: T) -> Self
3663 where
3664 T: std::iter::IntoIterator<Item = V>,
3665 V: std::convert::Into<std::string::String>,
3666 {
3667 use std::iter::Iterator;
3668 self.producer_vpc_spokes = v.into_iter().map(|i| i.into()).collect();
3669 self
3670 }
3671}
3672
3673impl wkt::message::Message for LinkedVpcNetwork {
3674 fn typename() -> &'static str {
3675 "type.googleapis.com/google.cloud.networkconnectivity.v1.LinkedVpcNetwork"
3676 }
3677}
3678
3679#[serde_with::serde_as]
3680#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3681#[serde(default, rename_all = "camelCase")]
3682#[non_exhaustive]
3683pub struct LinkedProducerVpcNetwork {
3684 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3687 pub network: std::string::String,
3688
3689 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3691 pub service_consumer_vpc_spoke: std::string::String,
3692
3693 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3697 pub peering: std::string::String,
3698
3699 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3701 pub producer_network: std::string::String,
3702
3703 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3705 pub exclude_export_ranges: std::vec::Vec<std::string::String>,
3706
3707 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3709 pub include_export_ranges: std::vec::Vec<std::string::String>,
3710}
3711
3712impl LinkedProducerVpcNetwork {
3713 pub fn new() -> Self {
3714 std::default::Default::default()
3715 }
3716
3717 pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3719 self.network = v.into();
3720 self
3721 }
3722
3723 pub fn set_service_consumer_vpc_spoke<T: std::convert::Into<std::string::String>>(
3725 mut self,
3726 v: T,
3727 ) -> Self {
3728 self.service_consumer_vpc_spoke = v.into();
3729 self
3730 }
3731
3732 pub fn set_peering<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3734 self.peering = v.into();
3735 self
3736 }
3737
3738 pub fn set_producer_network<T: std::convert::Into<std::string::String>>(
3740 mut self,
3741 v: T,
3742 ) -> Self {
3743 self.producer_network = v.into();
3744 self
3745 }
3746
3747 pub fn set_exclude_export_ranges<T, V>(mut self, v: T) -> Self
3749 where
3750 T: std::iter::IntoIterator<Item = V>,
3751 V: std::convert::Into<std::string::String>,
3752 {
3753 use std::iter::Iterator;
3754 self.exclude_export_ranges = v.into_iter().map(|i| i.into()).collect();
3755 self
3756 }
3757
3758 pub fn set_include_export_ranges<T, V>(mut self, v: T) -> Self
3760 where
3761 T: std::iter::IntoIterator<Item = V>,
3762 V: std::convert::Into<std::string::String>,
3763 {
3764 use std::iter::Iterator;
3765 self.include_export_ranges = v.into_iter().map(|i| i.into()).collect();
3766 self
3767 }
3768}
3769
3770impl wkt::message::Message for LinkedProducerVpcNetwork {
3771 fn typename() -> &'static str {
3772 "type.googleapis.com/google.cloud.networkconnectivity.v1.LinkedProducerVpcNetwork"
3773 }
3774}
3775
3776#[serde_with::serde_as]
3781#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3782#[serde(default, rename_all = "camelCase")]
3783#[non_exhaustive]
3784pub struct RouterApplianceInstance {
3785 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3787 pub virtual_machine: std::string::String,
3788
3789 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3791 pub ip_address: std::string::String,
3792}
3793
3794impl RouterApplianceInstance {
3795 pub fn new() -> Self {
3796 std::default::Default::default()
3797 }
3798
3799 pub fn set_virtual_machine<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3801 self.virtual_machine = v.into();
3802 self
3803 }
3804
3805 pub fn set_ip_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3807 self.ip_address = v.into();
3808 self
3809 }
3810}
3811
3812impl wkt::message::Message for RouterApplianceInstance {
3813 fn typename() -> &'static str {
3814 "type.googleapis.com/google.cloud.networkconnectivity.v1.RouterApplianceInstance"
3815 }
3816}
3817
3818#[serde_with::serde_as]
3820#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3821#[serde(default, rename_all = "camelCase")]
3822#[non_exhaustive]
3823pub struct LocationMetadata {
3824 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3826 pub location_features: std::vec::Vec<crate::model::LocationFeature>,
3827}
3828
3829impl LocationMetadata {
3830 pub fn new() -> Self {
3831 std::default::Default::default()
3832 }
3833
3834 pub fn set_location_features<T, V>(mut self, v: T) -> Self
3836 where
3837 T: std::iter::IntoIterator<Item = V>,
3838 V: std::convert::Into<crate::model::LocationFeature>,
3839 {
3840 use std::iter::Iterator;
3841 self.location_features = v.into_iter().map(|i| i.into()).collect();
3842 self
3843 }
3844}
3845
3846impl wkt::message::Message for LocationMetadata {
3847 fn typename() -> &'static str {
3848 "type.googleapis.com/google.cloud.networkconnectivity.v1.LocationMetadata"
3849 }
3850}
3851
3852#[serde_with::serde_as]
3853#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3854#[serde(default, rename_all = "camelCase")]
3855#[non_exhaustive]
3856pub struct NextHopVpcNetwork {
3857 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3859 pub uri: std::string::String,
3860}
3861
3862impl NextHopVpcNetwork {
3863 pub fn new() -> Self {
3864 std::default::Default::default()
3865 }
3866
3867 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3869 self.uri = v.into();
3870 self
3871 }
3872}
3873
3874impl wkt::message::Message for NextHopVpcNetwork {
3875 fn typename() -> &'static str {
3876 "type.googleapis.com/google.cloud.networkconnectivity.v1.NextHopVpcNetwork"
3877 }
3878}
3879
3880#[serde_with::serde_as]
3882#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3883#[serde(default, rename_all = "camelCase")]
3884#[non_exhaustive]
3885pub struct NextHopVPNTunnel {
3886 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3888 pub uri: std::string::String,
3889
3890 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3892 pub vpc_network: std::string::String,
3893
3894 pub site_to_site_data_transfer: bool,
3898}
3899
3900impl NextHopVPNTunnel {
3901 pub fn new() -> Self {
3902 std::default::Default::default()
3903 }
3904
3905 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3907 self.uri = v.into();
3908 self
3909 }
3910
3911 pub fn set_vpc_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3913 self.vpc_network = v.into();
3914 self
3915 }
3916
3917 pub fn set_site_to_site_data_transfer<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3919 self.site_to_site_data_transfer = v.into();
3920 self
3921 }
3922}
3923
3924impl wkt::message::Message for NextHopVPNTunnel {
3925 fn typename() -> &'static str {
3926 "type.googleapis.com/google.cloud.networkconnectivity.v1.NextHopVPNTunnel"
3927 }
3928}
3929
3930#[serde_with::serde_as]
3932#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3933#[serde(default, rename_all = "camelCase")]
3934#[non_exhaustive]
3935pub struct NextHopRouterApplianceInstance {
3936 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3938 pub uri: std::string::String,
3939
3940 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3942 pub vpc_network: std::string::String,
3943
3944 pub site_to_site_data_transfer: bool,
3948}
3949
3950impl NextHopRouterApplianceInstance {
3951 pub fn new() -> Self {
3952 std::default::Default::default()
3953 }
3954
3955 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3957 self.uri = v.into();
3958 self
3959 }
3960
3961 pub fn set_vpc_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3963 self.vpc_network = v.into();
3964 self
3965 }
3966
3967 pub fn set_site_to_site_data_transfer<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3969 self.site_to_site_data_transfer = v.into();
3970 self
3971 }
3972}
3973
3974impl wkt::message::Message for NextHopRouterApplianceInstance {
3975 fn typename() -> &'static str {
3976 "type.googleapis.com/google.cloud.networkconnectivity.v1.NextHopRouterApplianceInstance"
3977 }
3978}
3979
3980#[serde_with::serde_as]
3982#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3983#[serde(default, rename_all = "camelCase")]
3984#[non_exhaustive]
3985pub struct NextHopInterconnectAttachment {
3986 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3988 pub uri: std::string::String,
3989
3990 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3992 pub vpc_network: std::string::String,
3993
3994 pub site_to_site_data_transfer: bool,
3999}
4000
4001impl NextHopInterconnectAttachment {
4002 pub fn new() -> Self {
4003 std::default::Default::default()
4004 }
4005
4006 pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4008 self.uri = v.into();
4009 self
4010 }
4011
4012 pub fn set_vpc_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4014 self.vpc_network = v.into();
4015 self
4016 }
4017
4018 pub fn set_site_to_site_data_transfer<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4020 self.site_to_site_data_transfer = v.into();
4021 self
4022 }
4023}
4024
4025impl wkt::message::Message for NextHopInterconnectAttachment {
4026 fn typename() -> &'static str {
4027 "type.googleapis.com/google.cloud.networkconnectivity.v1.NextHopInterconnectAttachment"
4028 }
4029}
4030
4031#[serde_with::serde_as]
4037#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4038#[serde(default, rename_all = "camelCase")]
4039#[non_exhaustive]
4040pub struct SpokeSummary {
4041 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4044 pub spoke_type_counts: std::vec::Vec<crate::model::spoke_summary::SpokeTypeCount>,
4045
4046 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4049 pub spoke_state_counts: std::vec::Vec<crate::model::spoke_summary::SpokeStateCount>,
4050
4051 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4054 pub spoke_state_reason_counts:
4055 std::vec::Vec<crate::model::spoke_summary::SpokeStateReasonCount>,
4056}
4057
4058impl SpokeSummary {
4059 pub fn new() -> Self {
4060 std::default::Default::default()
4061 }
4062
4063 pub fn set_spoke_type_counts<T, V>(mut self, v: T) -> Self
4065 where
4066 T: std::iter::IntoIterator<Item = V>,
4067 V: std::convert::Into<crate::model::spoke_summary::SpokeTypeCount>,
4068 {
4069 use std::iter::Iterator;
4070 self.spoke_type_counts = v.into_iter().map(|i| i.into()).collect();
4071 self
4072 }
4073
4074 pub fn set_spoke_state_counts<T, V>(mut self, v: T) -> Self
4076 where
4077 T: std::iter::IntoIterator<Item = V>,
4078 V: std::convert::Into<crate::model::spoke_summary::SpokeStateCount>,
4079 {
4080 use std::iter::Iterator;
4081 self.spoke_state_counts = v.into_iter().map(|i| i.into()).collect();
4082 self
4083 }
4084
4085 pub fn set_spoke_state_reason_counts<T, V>(mut self, v: T) -> Self
4087 where
4088 T: std::iter::IntoIterator<Item = V>,
4089 V: std::convert::Into<crate::model::spoke_summary::SpokeStateReasonCount>,
4090 {
4091 use std::iter::Iterator;
4092 self.spoke_state_reason_counts = v.into_iter().map(|i| i.into()).collect();
4093 self
4094 }
4095}
4096
4097impl wkt::message::Message for SpokeSummary {
4098 fn typename() -> &'static str {
4099 "type.googleapis.com/google.cloud.networkconnectivity.v1.SpokeSummary"
4100 }
4101}
4102
4103pub mod spoke_summary {
4105 #[allow(unused_imports)]
4106 use super::*;
4107
4108 #[serde_with::serde_as]
4112 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4113 #[serde(default, rename_all = "camelCase")]
4114 #[non_exhaustive]
4115 pub struct SpokeTypeCount {
4116 pub spoke_type: crate::model::SpokeType,
4118
4119 #[serde_as(as = "serde_with::DisplayFromStr")]
4122 pub count: i64,
4123 }
4124
4125 impl SpokeTypeCount {
4126 pub fn new() -> Self {
4127 std::default::Default::default()
4128 }
4129
4130 pub fn set_spoke_type<T: std::convert::Into<crate::model::SpokeType>>(
4132 mut self,
4133 v: T,
4134 ) -> Self {
4135 self.spoke_type = v.into();
4136 self
4137 }
4138
4139 pub fn set_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
4141 self.count = v.into();
4142 self
4143 }
4144 }
4145
4146 impl wkt::message::Message for SpokeTypeCount {
4147 fn typename() -> &'static str {
4148 "type.googleapis.com/google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount"
4149 }
4150 }
4151
4152 #[serde_with::serde_as]
4155 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4156 #[serde(default, rename_all = "camelCase")]
4157 #[non_exhaustive]
4158 pub struct SpokeStateCount {
4159 pub state: crate::model::State,
4161
4162 #[serde_as(as = "serde_with::DisplayFromStr")]
4165 pub count: i64,
4166 }
4167
4168 impl SpokeStateCount {
4169 pub fn new() -> Self {
4170 std::default::Default::default()
4171 }
4172
4173 pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
4175 self.state = v.into();
4176 self
4177 }
4178
4179 pub fn set_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
4181 self.count = v.into();
4182 self
4183 }
4184 }
4185
4186 impl wkt::message::Message for SpokeStateCount {
4187 fn typename() -> &'static str {
4188 "type.googleapis.com/google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount"
4189 }
4190 }
4191
4192 #[serde_with::serde_as]
4194 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4195 #[serde(default, rename_all = "camelCase")]
4196 #[non_exhaustive]
4197 pub struct SpokeStateReasonCount {
4198 pub state_reason_code: crate::model::spoke::state_reason::Code,
4200
4201 #[serde_as(as = "serde_with::DisplayFromStr")]
4204 pub count: i64,
4205 }
4206
4207 impl SpokeStateReasonCount {
4208 pub fn new() -> Self {
4209 std::default::Default::default()
4210 }
4211
4212 pub fn set_state_reason_code<
4214 T: std::convert::Into<crate::model::spoke::state_reason::Code>,
4215 >(
4216 mut self,
4217 v: T,
4218 ) -> Self {
4219 self.state_reason_code = v.into();
4220 self
4221 }
4222
4223 pub fn set_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
4225 self.count = v.into();
4226 self
4227 }
4228 }
4229
4230 impl wkt::message::Message for SpokeStateReasonCount {
4231 fn typename() -> &'static str {
4232 "type.googleapis.com/google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount"
4233 }
4234 }
4235}
4236
4237#[serde_with::serde_as]
4242#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4243#[serde(default, rename_all = "camelCase")]
4244#[non_exhaustive]
4245pub struct GetGroupRequest {
4246 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4248 pub name: std::string::String,
4249}
4250
4251impl GetGroupRequest {
4252 pub fn new() -> Self {
4253 std::default::Default::default()
4254 }
4255
4256 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4258 self.name = v.into();
4259 self
4260 }
4261}
4262
4263impl wkt::message::Message for GetGroupRequest {
4264 fn typename() -> &'static str {
4265 "type.googleapis.com/google.cloud.networkconnectivity.v1.GetGroupRequest"
4266 }
4267}
4268
4269#[serde_with::serde_as]
4275#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4276#[serde(default, rename_all = "camelCase")]
4277#[non_exhaustive]
4278pub struct UpdateGroupRequest {
4279 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4285 pub update_mask: std::option::Option<wkt::FieldMask>,
4286
4287 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4289 pub group: std::option::Option<crate::model::Group>,
4290
4291 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4306 pub request_id: std::string::String,
4307}
4308
4309impl UpdateGroupRequest {
4310 pub fn new() -> Self {
4311 std::default::Default::default()
4312 }
4313
4314 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
4316 mut self,
4317 v: T,
4318 ) -> Self {
4319 self.update_mask = v.into();
4320 self
4321 }
4322
4323 pub fn set_group<T: std::convert::Into<std::option::Option<crate::model::Group>>>(
4325 mut self,
4326 v: T,
4327 ) -> Self {
4328 self.group = v.into();
4329 self
4330 }
4331
4332 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4334 self.request_id = v.into();
4335 self
4336 }
4337}
4338
4339impl wkt::message::Message for UpdateGroupRequest {
4340 fn typename() -> &'static str {
4341 "type.googleapis.com/google.cloud.networkconnectivity.v1.UpdateGroupRequest"
4342 }
4343}
4344
4345#[serde_with::serde_as]
4351#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4352#[serde(default, rename_all = "camelCase")]
4353#[non_exhaustive]
4354pub struct PolicyBasedRoute {
4355 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4358 pub name: std::string::String,
4359
4360 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4362 pub create_time: std::option::Option<wkt::Timestamp>,
4363
4364 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4366 pub update_time: std::option::Option<wkt::Timestamp>,
4367
4368 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
4370 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4371
4372 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4375 pub description: std::string::String,
4376
4377 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4380 pub network: std::string::String,
4381
4382 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4384 pub filter: std::option::Option<crate::model::policy_based_route::Filter>,
4385
4386 pub priority: i32,
4392
4393 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4396 pub warnings: std::vec::Vec<crate::model::policy_based_route::Warnings>,
4397
4398 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4400 pub self_link: std::string::String,
4401
4402 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4405 pub kind: std::string::String,
4406
4407 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
4411 pub target: std::option::Option<crate::model::policy_based_route::Target>,
4412
4413 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
4414 pub next_hop: std::option::Option<crate::model::policy_based_route::NextHop>,
4415}
4416
4417impl PolicyBasedRoute {
4418 pub fn new() -> Self {
4419 std::default::Default::default()
4420 }
4421
4422 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4424 self.name = v.into();
4425 self
4426 }
4427
4428 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
4430 mut self,
4431 v: T,
4432 ) -> Self {
4433 self.create_time = v.into();
4434 self
4435 }
4436
4437 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
4439 mut self,
4440 v: T,
4441 ) -> Self {
4442 self.update_time = v.into();
4443 self
4444 }
4445
4446 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4448 self.description = v.into();
4449 self
4450 }
4451
4452 pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4454 self.network = v.into();
4455 self
4456 }
4457
4458 pub fn set_filter<
4460 T: std::convert::Into<std::option::Option<crate::model::policy_based_route::Filter>>,
4461 >(
4462 mut self,
4463 v: T,
4464 ) -> Self {
4465 self.filter = v.into();
4466 self
4467 }
4468
4469 pub fn set_priority<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4471 self.priority = v.into();
4472 self
4473 }
4474
4475 pub fn set_self_link<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4477 self.self_link = v.into();
4478 self
4479 }
4480
4481 pub fn set_kind<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4483 self.kind = v.into();
4484 self
4485 }
4486
4487 pub fn set_warnings<T, V>(mut self, v: T) -> Self
4489 where
4490 T: std::iter::IntoIterator<Item = V>,
4491 V: std::convert::Into<crate::model::policy_based_route::Warnings>,
4492 {
4493 use std::iter::Iterator;
4494 self.warnings = v.into_iter().map(|i| i.into()).collect();
4495 self
4496 }
4497
4498 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
4500 where
4501 T: std::iter::IntoIterator<Item = (K, V)>,
4502 K: std::convert::Into<std::string::String>,
4503 V: std::convert::Into<std::string::String>,
4504 {
4505 use std::iter::Iterator;
4506 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4507 self
4508 }
4509
4510 pub fn set_target<
4512 T: std::convert::Into<std::option::Option<crate::model::policy_based_route::Target>>,
4513 >(
4514 mut self,
4515 v: T,
4516 ) -> Self {
4517 self.target = v.into();
4518 self
4519 }
4520
4521 pub fn get_virtual_machine(
4525 &self,
4526 ) -> std::option::Option<&std::boxed::Box<crate::model::policy_based_route::VirtualMachine>>
4527 {
4528 #[allow(unreachable_patterns)]
4529 self.target.as_ref().and_then(|v| match v {
4530 crate::model::policy_based_route::Target::VirtualMachine(v) => {
4531 std::option::Option::Some(v)
4532 }
4533 _ => std::option::Option::None,
4534 })
4535 }
4536
4537 pub fn get_interconnect_attachment(
4541 &self,
4542 ) -> std::option::Option<
4543 &std::boxed::Box<crate::model::policy_based_route::InterconnectAttachment>,
4544 > {
4545 #[allow(unreachable_patterns)]
4546 self.target.as_ref().and_then(|v| match v {
4547 crate::model::policy_based_route::Target::InterconnectAttachment(v) => {
4548 std::option::Option::Some(v)
4549 }
4550 _ => std::option::Option::None,
4551 })
4552 }
4553
4554 pub fn set_virtual_machine<
4560 T: std::convert::Into<std::boxed::Box<crate::model::policy_based_route::VirtualMachine>>,
4561 >(
4562 mut self,
4563 v: T,
4564 ) -> Self {
4565 self.target = std::option::Option::Some(
4566 crate::model::policy_based_route::Target::VirtualMachine(v.into()),
4567 );
4568 self
4569 }
4570
4571 pub fn set_interconnect_attachment<
4577 T: std::convert::Into<
4578 std::boxed::Box<crate::model::policy_based_route::InterconnectAttachment>,
4579 >,
4580 >(
4581 mut self,
4582 v: T,
4583 ) -> Self {
4584 self.target = std::option::Option::Some(
4585 crate::model::policy_based_route::Target::InterconnectAttachment(v.into()),
4586 );
4587 self
4588 }
4589
4590 pub fn set_next_hop<
4592 T: std::convert::Into<std::option::Option<crate::model::policy_based_route::NextHop>>,
4593 >(
4594 mut self,
4595 v: T,
4596 ) -> Self {
4597 self.next_hop = v.into();
4598 self
4599 }
4600
4601 pub fn get_next_hop_ilb_ip(&self) -> std::option::Option<&std::string::String> {
4605 #[allow(unreachable_patterns)]
4606 self.next_hop.as_ref().and_then(|v| match v {
4607 crate::model::policy_based_route::NextHop::NextHopIlbIp(v) => {
4608 std::option::Option::Some(v)
4609 }
4610 _ => std::option::Option::None,
4611 })
4612 }
4613
4614 pub fn get_next_hop_other_routes(
4618 &self,
4619 ) -> std::option::Option<&crate::model::policy_based_route::OtherRoutes> {
4620 #[allow(unreachable_patterns)]
4621 self.next_hop.as_ref().and_then(|v| match v {
4622 crate::model::policy_based_route::NextHop::NextHopOtherRoutes(v) => {
4623 std::option::Option::Some(v)
4624 }
4625 _ => std::option::Option::None,
4626 })
4627 }
4628
4629 pub fn set_next_hop_ilb_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4635 self.next_hop = std::option::Option::Some(
4636 crate::model::policy_based_route::NextHop::NextHopIlbIp(v.into()),
4637 );
4638 self
4639 }
4640
4641 pub fn set_next_hop_other_routes<
4647 T: std::convert::Into<crate::model::policy_based_route::OtherRoutes>,
4648 >(
4649 mut self,
4650 v: T,
4651 ) -> Self {
4652 self.next_hop = std::option::Option::Some(
4653 crate::model::policy_based_route::NextHop::NextHopOtherRoutes(v.into()),
4654 );
4655 self
4656 }
4657}
4658
4659impl wkt::message::Message for PolicyBasedRoute {
4660 fn typename() -> &'static str {
4661 "type.googleapis.com/google.cloud.networkconnectivity.v1.PolicyBasedRoute"
4662 }
4663}
4664
4665pub mod policy_based_route {
4667 #[allow(unused_imports)]
4668 use super::*;
4669
4670 #[serde_with::serde_as]
4672 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4673 #[serde(default, rename_all = "camelCase")]
4674 #[non_exhaustive]
4675 pub struct VirtualMachine {
4676 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4680 pub tags: std::vec::Vec<std::string::String>,
4681 }
4682
4683 impl VirtualMachine {
4684 pub fn new() -> Self {
4685 std::default::Default::default()
4686 }
4687
4688 pub fn set_tags<T, V>(mut self, v: T) -> Self
4690 where
4691 T: std::iter::IntoIterator<Item = V>,
4692 V: std::convert::Into<std::string::String>,
4693 {
4694 use std::iter::Iterator;
4695 self.tags = v.into_iter().map(|i| i.into()).collect();
4696 self
4697 }
4698 }
4699
4700 impl wkt::message::Message for VirtualMachine {
4701 fn typename() -> &'static str {
4702 "type.googleapis.com/google.cloud.networkconnectivity.v1.PolicyBasedRoute.VirtualMachine"
4703 }
4704 }
4705
4706 #[serde_with::serde_as]
4708 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4709 #[serde(default, rename_all = "camelCase")]
4710 #[non_exhaustive]
4711 pub struct InterconnectAttachment {
4712 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4715 pub region: std::string::String,
4716 }
4717
4718 impl InterconnectAttachment {
4719 pub fn new() -> Self {
4720 std::default::Default::default()
4721 }
4722
4723 pub fn set_region<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4725 self.region = v.into();
4726 self
4727 }
4728 }
4729
4730 impl wkt::message::Message for InterconnectAttachment {
4731 fn typename() -> &'static str {
4732 "type.googleapis.com/google.cloud.networkconnectivity.v1.PolicyBasedRoute.InterconnectAttachment"
4733 }
4734 }
4735
4736 #[serde_with::serde_as]
4738 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4739 #[serde(default, rename_all = "camelCase")]
4740 #[non_exhaustive]
4741 pub struct Filter {
4742 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4745 pub ip_protocol: std::string::String,
4746
4747 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4750 pub src_range: std::string::String,
4751
4752 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4756 pub dest_range: std::string::String,
4757
4758 pub protocol_version: crate::model::policy_based_route::filter::ProtocolVersion,
4761 }
4762
4763 impl Filter {
4764 pub fn new() -> Self {
4765 std::default::Default::default()
4766 }
4767
4768 pub fn set_ip_protocol<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4770 self.ip_protocol = v.into();
4771 self
4772 }
4773
4774 pub fn set_src_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4776 self.src_range = v.into();
4777 self
4778 }
4779
4780 pub fn set_dest_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4782 self.dest_range = v.into();
4783 self
4784 }
4785
4786 pub fn set_protocol_version<
4788 T: std::convert::Into<crate::model::policy_based_route::filter::ProtocolVersion>,
4789 >(
4790 mut self,
4791 v: T,
4792 ) -> Self {
4793 self.protocol_version = v.into();
4794 self
4795 }
4796 }
4797
4798 impl wkt::message::Message for Filter {
4799 fn typename() -> &'static str {
4800 "type.googleapis.com/google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter"
4801 }
4802 }
4803
4804 pub mod filter {
4806 #[allow(unused_imports)]
4807 use super::*;
4808
4809 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4811 pub struct ProtocolVersion(std::borrow::Cow<'static, str>);
4812
4813 impl ProtocolVersion {
4814 pub const fn new(v: &'static str) -> Self {
4816 Self(std::borrow::Cow::Borrowed(v))
4817 }
4818
4819 pub fn value(&self) -> &str {
4821 &self.0
4822 }
4823 }
4824
4825 pub mod protocol_version {
4827 use super::ProtocolVersion;
4828
4829 pub const PROTOCOL_VERSION_UNSPECIFIED: ProtocolVersion =
4831 ProtocolVersion::new("PROTOCOL_VERSION_UNSPECIFIED");
4832
4833 pub const IPV4: ProtocolVersion = ProtocolVersion::new("IPV4");
4835 }
4836
4837 impl std::convert::From<std::string::String> for ProtocolVersion {
4838 fn from(value: std::string::String) -> Self {
4839 Self(std::borrow::Cow::Owned(value))
4840 }
4841 }
4842 }
4843
4844 #[serde_with::serde_as]
4846 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4847 #[serde(default, rename_all = "camelCase")]
4848 #[non_exhaustive]
4849 pub struct Warnings {
4850 pub code: crate::model::policy_based_route::warnings::Code,
4852
4853 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
4860 pub data: std::collections::HashMap<std::string::String, std::string::String>,
4861
4862 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4864 pub warning_message: std::string::String,
4865 }
4866
4867 impl Warnings {
4868 pub fn new() -> Self {
4869 std::default::Default::default()
4870 }
4871
4872 pub fn set_code<T: std::convert::Into<crate::model::policy_based_route::warnings::Code>>(
4874 mut self,
4875 v: T,
4876 ) -> Self {
4877 self.code = v.into();
4878 self
4879 }
4880
4881 pub fn set_warning_message<T: std::convert::Into<std::string::String>>(
4883 mut self,
4884 v: T,
4885 ) -> Self {
4886 self.warning_message = v.into();
4887 self
4888 }
4889
4890 pub fn set_data<T, K, V>(mut self, v: T) -> Self
4892 where
4893 T: std::iter::IntoIterator<Item = (K, V)>,
4894 K: std::convert::Into<std::string::String>,
4895 V: std::convert::Into<std::string::String>,
4896 {
4897 use std::iter::Iterator;
4898 self.data = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4899 self
4900 }
4901 }
4902
4903 impl wkt::message::Message for Warnings {
4904 fn typename() -> &'static str {
4905 "type.googleapis.com/google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings"
4906 }
4907 }
4908
4909 pub mod warnings {
4911 #[allow(unused_imports)]
4912 use super::*;
4913
4914 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4917 pub struct Code(std::borrow::Cow<'static, str>);
4918
4919 impl Code {
4920 pub const fn new(v: &'static str) -> Self {
4922 Self(std::borrow::Cow::Borrowed(v))
4923 }
4924
4925 pub fn value(&self) -> &str {
4927 &self.0
4928 }
4929 }
4930
4931 pub mod code {
4933 use super::Code;
4934
4935 pub const WARNING_UNSPECIFIED: Code = Code::new("WARNING_UNSPECIFIED");
4937
4938 pub const RESOURCE_NOT_ACTIVE: Code = Code::new("RESOURCE_NOT_ACTIVE");
4942
4943 pub const RESOURCE_BEING_MODIFIED: Code = Code::new("RESOURCE_BEING_MODIFIED");
4946 }
4947
4948 impl std::convert::From<std::string::String> for Code {
4949 fn from(value: std::string::String) -> Self {
4950 Self(std::borrow::Cow::Owned(value))
4951 }
4952 }
4953 }
4954
4955 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4957 pub struct OtherRoutes(std::borrow::Cow<'static, str>);
4958
4959 impl OtherRoutes {
4960 pub const fn new(v: &'static str) -> Self {
4962 Self(std::borrow::Cow::Borrowed(v))
4963 }
4964
4965 pub fn value(&self) -> &str {
4967 &self.0
4968 }
4969 }
4970
4971 pub mod other_routes {
4973 use super::OtherRoutes;
4974
4975 pub const OTHER_ROUTES_UNSPECIFIED: OtherRoutes =
4977 OtherRoutes::new("OTHER_ROUTES_UNSPECIFIED");
4978
4979 pub const DEFAULT_ROUTING: OtherRoutes = OtherRoutes::new("DEFAULT_ROUTING");
4984 }
4985
4986 impl std::convert::From<std::string::String> for OtherRoutes {
4987 fn from(value: std::string::String) -> Self {
4988 Self(std::borrow::Cow::Owned(value))
4989 }
4990 }
4991
4992 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
4996 #[serde(rename_all = "camelCase")]
4997 #[non_exhaustive]
4998 pub enum Target {
4999 VirtualMachine(std::boxed::Box<crate::model::policy_based_route::VirtualMachine>),
5001 InterconnectAttachment(
5003 std::boxed::Box<crate::model::policy_based_route::InterconnectAttachment>,
5004 ),
5005 }
5006
5007 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
5008 #[serde(rename_all = "camelCase")]
5009 #[non_exhaustive]
5010 pub enum NextHop {
5011 NextHopIlbIp(std::string::String),
5015 NextHopOtherRoutes(crate::model::policy_based_route::OtherRoutes),
5018 }
5019}
5020
5021#[serde_with::serde_as]
5023#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5024#[serde(default, rename_all = "camelCase")]
5025#[non_exhaustive]
5026pub struct ListPolicyBasedRoutesRequest {
5027 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5029 pub parent: std::string::String,
5030
5031 pub page_size: i32,
5033
5034 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5036 pub page_token: std::string::String,
5037
5038 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5040 pub filter: std::string::String,
5041
5042 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5044 pub order_by: std::string::String,
5045}
5046
5047impl ListPolicyBasedRoutesRequest {
5048 pub fn new() -> Self {
5049 std::default::Default::default()
5050 }
5051
5052 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5054 self.parent = v.into();
5055 self
5056 }
5057
5058 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5060 self.page_size = v.into();
5061 self
5062 }
5063
5064 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5066 self.page_token = v.into();
5067 self
5068 }
5069
5070 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5072 self.filter = v.into();
5073 self
5074 }
5075
5076 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5078 self.order_by = v.into();
5079 self
5080 }
5081}
5082
5083impl wkt::message::Message for ListPolicyBasedRoutesRequest {
5084 fn typename() -> &'static str {
5085 "type.googleapis.com/google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesRequest"
5086 }
5087}
5088
5089#[serde_with::serde_as]
5091#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5092#[serde(default, rename_all = "camelCase")]
5093#[non_exhaustive]
5094pub struct ListPolicyBasedRoutesResponse {
5095 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5097 pub policy_based_routes: std::vec::Vec<crate::model::PolicyBasedRoute>,
5098
5099 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5102 pub next_page_token: std::string::String,
5103
5104 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5106 pub unreachable: std::vec::Vec<std::string::String>,
5107}
5108
5109impl ListPolicyBasedRoutesResponse {
5110 pub fn new() -> Self {
5111 std::default::Default::default()
5112 }
5113
5114 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5116 self.next_page_token = v.into();
5117 self
5118 }
5119
5120 pub fn set_policy_based_routes<T, V>(mut self, v: T) -> Self
5122 where
5123 T: std::iter::IntoIterator<Item = V>,
5124 V: std::convert::Into<crate::model::PolicyBasedRoute>,
5125 {
5126 use std::iter::Iterator;
5127 self.policy_based_routes = v.into_iter().map(|i| i.into()).collect();
5128 self
5129 }
5130
5131 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5133 where
5134 T: std::iter::IntoIterator<Item = V>,
5135 V: std::convert::Into<std::string::String>,
5136 {
5137 use std::iter::Iterator;
5138 self.unreachable = v.into_iter().map(|i| i.into()).collect();
5139 self
5140 }
5141}
5142
5143impl wkt::message::Message for ListPolicyBasedRoutesResponse {
5144 fn typename() -> &'static str {
5145 "type.googleapis.com/google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesResponse"
5146 }
5147}
5148
5149#[cfg(feature = "unstable-stream")]
5150impl gax::paginator::PageableResponse for ListPolicyBasedRoutesResponse {
5151 type PageItem = crate::model::PolicyBasedRoute;
5152
5153 fn items(self) -> std::vec::Vec<Self::PageItem> {
5154 self.policy_based_routes
5155 }
5156
5157 fn next_page_token(&self) -> std::string::String {
5158 gax::paginator::extract_token(&self.next_page_token)
5159 }
5160}
5161
5162#[serde_with::serde_as]
5164#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5165#[serde(default, rename_all = "camelCase")]
5166#[non_exhaustive]
5167pub struct GetPolicyBasedRouteRequest {
5168 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5170 pub name: std::string::String,
5171}
5172
5173impl GetPolicyBasedRouteRequest {
5174 pub fn new() -> Self {
5175 std::default::Default::default()
5176 }
5177
5178 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5180 self.name = v.into();
5181 self
5182 }
5183}
5184
5185impl wkt::message::Message for GetPolicyBasedRouteRequest {
5186 fn typename() -> &'static str {
5187 "type.googleapis.com/google.cloud.networkconnectivity.v1.GetPolicyBasedRouteRequest"
5188 }
5189}
5190
5191#[serde_with::serde_as]
5193#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5194#[serde(default, rename_all = "camelCase")]
5195#[non_exhaustive]
5196pub struct CreatePolicyBasedRouteRequest {
5197 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5199 pub parent: std::string::String,
5200
5201 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5203 pub policy_based_route_id: std::string::String,
5204
5205 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5207 pub policy_based_route: std::option::Option<crate::model::PolicyBasedRoute>,
5208
5209 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5223 pub request_id: std::string::String,
5224}
5225
5226impl CreatePolicyBasedRouteRequest {
5227 pub fn new() -> Self {
5228 std::default::Default::default()
5229 }
5230
5231 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5233 self.parent = v.into();
5234 self
5235 }
5236
5237 pub fn set_policy_based_route_id<T: std::convert::Into<std::string::String>>(
5239 mut self,
5240 v: T,
5241 ) -> Self {
5242 self.policy_based_route_id = v.into();
5243 self
5244 }
5245
5246 pub fn set_policy_based_route<
5248 T: std::convert::Into<std::option::Option<crate::model::PolicyBasedRoute>>,
5249 >(
5250 mut self,
5251 v: T,
5252 ) -> Self {
5253 self.policy_based_route = v.into();
5254 self
5255 }
5256
5257 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5259 self.request_id = v.into();
5260 self
5261 }
5262}
5263
5264impl wkt::message::Message for CreatePolicyBasedRouteRequest {
5265 fn typename() -> &'static str {
5266 "type.googleapis.com/google.cloud.networkconnectivity.v1.CreatePolicyBasedRouteRequest"
5267 }
5268}
5269
5270#[serde_with::serde_as]
5272#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5273#[serde(default, rename_all = "camelCase")]
5274#[non_exhaustive]
5275pub struct DeletePolicyBasedRouteRequest {
5276 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5278 pub name: std::string::String,
5279
5280 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5294 pub request_id: std::string::String,
5295}
5296
5297impl DeletePolicyBasedRouteRequest {
5298 pub fn new() -> Self {
5299 std::default::Default::default()
5300 }
5301
5302 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5304 self.name = v.into();
5305 self
5306 }
5307
5308 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5310 self.request_id = v.into();
5311 self
5312 }
5313}
5314
5315impl wkt::message::Message for DeletePolicyBasedRouteRequest {
5316 fn typename() -> &'static str {
5317 "type.googleapis.com/google.cloud.networkconnectivity.v1.DeletePolicyBasedRouteRequest"
5318 }
5319}
5320
5321#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5323pub struct LocationFeature(std::borrow::Cow<'static, str>);
5324
5325impl LocationFeature {
5326 pub const fn new(v: &'static str) -> Self {
5328 Self(std::borrow::Cow::Borrowed(v))
5329 }
5330
5331 pub fn value(&self) -> &str {
5333 &self.0
5334 }
5335}
5336
5337pub mod location_feature {
5339 use super::LocationFeature;
5340
5341 pub const LOCATION_FEATURE_UNSPECIFIED: LocationFeature =
5343 LocationFeature::new("LOCATION_FEATURE_UNSPECIFIED");
5344
5345 pub const SITE_TO_CLOUD_SPOKES: LocationFeature = LocationFeature::new("SITE_TO_CLOUD_SPOKES");
5347
5348 pub const SITE_TO_SITE_SPOKES: LocationFeature = LocationFeature::new("SITE_TO_SITE_SPOKES");
5350}
5351
5352impl std::convert::From<std::string::String> for LocationFeature {
5353 fn from(value: std::string::String) -> Self {
5354 Self(std::borrow::Cow::Owned(value))
5355 }
5356}
5357
5358#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5360pub struct RouteType(std::borrow::Cow<'static, str>);
5361
5362impl RouteType {
5363 pub const fn new(v: &'static str) -> Self {
5365 Self(std::borrow::Cow::Borrowed(v))
5366 }
5367
5368 pub fn value(&self) -> &str {
5370 &self.0
5371 }
5372}
5373
5374pub mod route_type {
5376 use super::RouteType;
5377
5378 pub const ROUTE_TYPE_UNSPECIFIED: RouteType = RouteType::new("ROUTE_TYPE_UNSPECIFIED");
5380
5381 pub const VPC_PRIMARY_SUBNET: RouteType = RouteType::new("VPC_PRIMARY_SUBNET");
5384
5385 pub const VPC_SECONDARY_SUBNET: RouteType = RouteType::new("VPC_SECONDARY_SUBNET");
5388
5389 pub const DYNAMIC_ROUTE: RouteType = RouteType::new("DYNAMIC_ROUTE");
5393}
5394
5395impl std::convert::From<std::string::String> for RouteType {
5396 fn from(value: std::string::String) -> Self {
5397 Self(std::borrow::Cow::Owned(value))
5398 }
5399}
5400
5401#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5404pub struct State(std::borrow::Cow<'static, str>);
5405
5406impl State {
5407 pub const fn new(v: &'static str) -> Self {
5409 Self(std::borrow::Cow::Borrowed(v))
5410 }
5411
5412 pub fn value(&self) -> &str {
5414 &self.0
5415 }
5416}
5417
5418pub mod state {
5420 use super::State;
5421
5422 pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
5424
5425 pub const CREATING: State = State::new("CREATING");
5427
5428 pub const ACTIVE: State = State::new("ACTIVE");
5430
5431 pub const DELETING: State = State::new("DELETING");
5433
5434 pub const ACCEPTING: State = State::new("ACCEPTING");
5436
5437 pub const REJECTING: State = State::new("REJECTING");
5439
5440 pub const UPDATING: State = State::new("UPDATING");
5442
5443 pub const INACTIVE: State = State::new("INACTIVE");
5445
5446 pub const OBSOLETE: State = State::new("OBSOLETE");
5449}
5450
5451impl std::convert::From<std::string::String> for State {
5452 fn from(value: std::string::String) -> Self {
5453 Self(std::borrow::Cow::Owned(value))
5454 }
5455}
5456
5457#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5460pub struct SpokeType(std::borrow::Cow<'static, str>);
5461
5462impl SpokeType {
5463 pub const fn new(v: &'static str) -> Self {
5465 Self(std::borrow::Cow::Borrowed(v))
5466 }
5467
5468 pub fn value(&self) -> &str {
5470 &self.0
5471 }
5472}
5473
5474pub mod spoke_type {
5476 use super::SpokeType;
5477
5478 pub const SPOKE_TYPE_UNSPECIFIED: SpokeType = SpokeType::new("SPOKE_TYPE_UNSPECIFIED");
5480
5481 pub const VPN_TUNNEL: SpokeType = SpokeType::new("VPN_TUNNEL");
5483
5484 pub const INTERCONNECT_ATTACHMENT: SpokeType = SpokeType::new("INTERCONNECT_ATTACHMENT");
5486
5487 pub const ROUTER_APPLIANCE: SpokeType = SpokeType::new("ROUTER_APPLIANCE");
5489
5490 pub const VPC_NETWORK: SpokeType = SpokeType::new("VPC_NETWORK");
5492
5493 pub const PRODUCER_VPC_NETWORK: SpokeType = SpokeType::new("PRODUCER_VPC_NETWORK");
5495}
5496
5497impl std::convert::From<std::string::String> for SpokeType {
5498 fn from(value: std::string::String) -> Self {
5499 Self(std::borrow::Cow::Owned(value))
5500 }
5501}
5502
5503#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5505pub struct PolicyMode(std::borrow::Cow<'static, str>);
5506
5507impl PolicyMode {
5508 pub const fn new(v: &'static str) -> Self {
5510 Self(std::borrow::Cow::Borrowed(v))
5511 }
5512
5513 pub fn value(&self) -> &str {
5515 &self.0
5516 }
5517}
5518
5519pub mod policy_mode {
5521 use super::PolicyMode;
5522
5523 pub const POLICY_MODE_UNSPECIFIED: PolicyMode = PolicyMode::new("POLICY_MODE_UNSPECIFIED");
5526
5527 pub const PRESET: PolicyMode = PolicyMode::new("PRESET");
5529}
5530
5531impl std::convert::From<std::string::String> for PolicyMode {
5532 fn from(value: std::string::String) -> Self {
5533 Self(std::borrow::Cow::Owned(value))
5534 }
5535}
5536
5537#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5539pub struct PresetTopology(std::borrow::Cow<'static, str>);
5540
5541impl PresetTopology {
5542 pub const fn new(v: &'static str) -> Self {
5544 Self(std::borrow::Cow::Borrowed(v))
5545 }
5546
5547 pub fn value(&self) -> &str {
5549 &self.0
5550 }
5551}
5552
5553pub mod preset_topology {
5555 use super::PresetTopology;
5556
5557 pub const PRESET_TOPOLOGY_UNSPECIFIED: PresetTopology =
5560 PresetTopology::new("PRESET_TOPOLOGY_UNSPECIFIED");
5561
5562 pub const MESH: PresetTopology = PresetTopology::new("MESH");
5565
5566 pub const STAR: PresetTopology = PresetTopology::new("STAR");
5570}
5571
5572impl std::convert::From<std::string::String> for PresetTopology {
5573 fn from(value: std::string::String) -> Self {
5574 Self(std::borrow::Cow::Owned(value))
5575 }
5576}