use crate::models;
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CaptchaMethod {
#[serde(rename = "GoogleRecaptchaV2")]
GoogleRecaptchaV2,
#[serde(rename = "GoogleRecaptchaV3")]
GoogleRecaptchaV3,
#[serde(rename = "HCaptcha")]
HCaptcha,
#[serde(rename = "HCaptchaEnterprise")]
HCaptchaEnterprise,
}
impl ToString for CaptchaMethod {
fn to_string(&self) -> String {
match self {
Self::GoogleRecaptchaV2 => String::from("GoogleRecaptchaV2"),
Self::GoogleRecaptchaV3 => String::from("GoogleRecaptchaV3"),
Self::HCaptcha => String::from("HCaptcha"),
Self::HCaptchaEnterprise => String::from("HCaptchaEnterprise"),
}
}
}
impl Default for CaptchaMethod {
fn default() -> CaptchaMethod {
Self::GoogleRecaptchaV2
}
}