nautobot_openapi/models/
encapsulation_enum.rs1#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
13pub enum EncapsulationEnum {
14 #[serde(rename = "IPsec-Transport")]
15 IPsecTransport,
16 #[serde(rename = "IPsec-Tunnel")]
17 IPsecTunnel,
18 #[serde(rename = "IP-in-IP")]
19 IpInIp,
20 #[serde(rename = "GRE")]
21 Gre,
22 #[serde(rename = "WireGuard")]
23 WireGuard,
24 #[serde(rename = "L2TP")]
25 L2Tp,
26 #[serde(rename = "PPTP")]
27 Pptp,
28 #[serde(rename = "OpenVPN")]
29 OpenVpn,
30 #[serde(rename = "EoIP")]
31 EoIp,
32}
33
34impl ToString for EncapsulationEnum {
35 fn to_string(&self) -> String {
36 match self {
37 Self::IPsecTransport => String::from("IPsec-Transport"),
38 Self::IPsecTunnel => String::from("IPsec-Tunnel"),
39 Self::IpInIp => String::from("IP-in-IP"),
40 Self::Gre => String::from("GRE"),
41 Self::WireGuard => String::from("WireGuard"),
42 Self::L2Tp => String::from("L2TP"),
43 Self::Pptp => String::from("PPTP"),
44 Self::OpenVpn => String::from("OpenVPN"),
45 Self::EoIp => String::from("EoIP"),
46 }
47 }
48}
49
50impl Default for EncapsulationEnum {
51 fn default() -> EncapsulationEnum {
52 Self::IPsecTransport
53 }
54}