nautobot_openapi/models/
load_balancing_algorithm_enum.rs1#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
13pub enum LoadBalancingAlgorithmEnum {
14 #[serde(rename = "round_robin")]
15 RoundRobin,
16 #[serde(rename = "url_hash")]
17 UrlHash,
18 #[serde(rename = "least_connections")]
19 LeastConnections,
20 #[serde(rename = "least_response_time")]
21 LeastResponseTime,
22 #[serde(rename = "least_bandwidth")]
23 LeastBandwidth,
24 #[serde(rename = "least_packets")]
25 LeastPackets,
26 #[serde(rename = "domain_hash")]
27 DomainHash,
28 #[serde(rename = "destination_ip_hash")]
29 DestinationIpHash,
30 #[serde(rename = "source_ip_hash")]
31 SourceIpHash,
32 #[serde(rename = "srcip_destip_hash")]
33 SrcipDestipHash,
34 #[serde(rename = "least_request")]
35 LeastRequest,
36 #[serde(rename = "custom_load")]
37 CustomLoad,
38 #[serde(rename = "srcip_srcport_hash")]
39 SrcipSrcportHash,
40}
41
42impl ToString for LoadBalancingAlgorithmEnum {
43 fn to_string(&self) -> String {
44 match self {
45 Self::RoundRobin => String::from("round_robin"),
46 Self::UrlHash => String::from("url_hash"),
47 Self::LeastConnections => String::from("least_connections"),
48 Self::LeastResponseTime => String::from("least_response_time"),
49 Self::LeastBandwidth => String::from("least_bandwidth"),
50 Self::LeastPackets => String::from("least_packets"),
51 Self::DomainHash => String::from("domain_hash"),
52 Self::DestinationIpHash => String::from("destination_ip_hash"),
53 Self::SourceIpHash => String::from("source_ip_hash"),
54 Self::SrcipDestipHash => String::from("srcip_destip_hash"),
55 Self::LeastRequest => String::from("least_request"),
56 Self::CustomLoad => String::from("custom_load"),
57 Self::SrcipSrcportHash => String::from("srcip_srcport_hash"),
58 }
59 }
60}
61
62impl Default for LoadBalancingAlgorithmEnum {
63 fn default() -> LoadBalancingAlgorithmEnum {
64 Self::RoundRobin
65 }
66}