#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum LoadBalancingAlgorithmEnum {
#[serde(rename = "round_robin")]
RoundRobin,
#[serde(rename = "url_hash")]
UrlHash,
#[serde(rename = "least_connections")]
LeastConnections,
#[serde(rename = "least_response_time")]
LeastResponseTime,
#[serde(rename = "least_bandwidth")]
LeastBandwidth,
#[serde(rename = "least_packets")]
LeastPackets,
#[serde(rename = "domain_hash")]
DomainHash,
#[serde(rename = "destination_ip_hash")]
DestinationIpHash,
#[serde(rename = "source_ip_hash")]
SourceIpHash,
#[serde(rename = "srcip_destip_hash")]
SrcipDestipHash,
#[serde(rename = "least_request")]
LeastRequest,
#[serde(rename = "custom_load")]
CustomLoad,
#[serde(rename = "srcip_srcport_hash")]
SrcipSrcportHash,
}
impl ToString for LoadBalancingAlgorithmEnum {
fn to_string(&self) -> String {
match self {
Self::RoundRobin => String::from("round_robin"),
Self::UrlHash => String::from("url_hash"),
Self::LeastConnections => String::from("least_connections"),
Self::LeastResponseTime => String::from("least_response_time"),
Self::LeastBandwidth => String::from("least_bandwidth"),
Self::LeastPackets => String::from("least_packets"),
Self::DomainHash => String::from("domain_hash"),
Self::DestinationIpHash => String::from("destination_ip_hash"),
Self::SourceIpHash => String::from("source_ip_hash"),
Self::SrcipDestipHash => String::from("srcip_destip_hash"),
Self::LeastRequest => String::from("least_request"),
Self::CustomLoad => String::from("custom_load"),
Self::SrcipSrcportHash => String::from("srcip_srcport_hash"),
}
}
}
impl Default for LoadBalancingAlgorithmEnum {
fn default() -> LoadBalancingAlgorithmEnum {
Self::RoundRobin
}
}