Skip to main content

nautobot_openapi/models/
authentication_method_enum.rs

1/*
2 * API Documentation
3 *
4 * Source of truth and network automation platform
5 *
6 * The version of the OpenAPI document: 3.1.0 (3.1)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11///
12#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
13pub enum AuthenticationMethodEnum {
14    #[serde(rename = "PSK")]
15    Psk,
16    #[serde(rename = "RSA")]
17    Rsa,
18    #[serde(rename = "ECDSA")]
19    Ecdsa,
20    #[serde(rename = "Certificate")]
21    Certificate,
22}
23
24impl ToString for AuthenticationMethodEnum {
25    fn to_string(&self) -> String {
26        match self {
27            Self::Psk => String::from("PSK"),
28            Self::Rsa => String::from("RSA"),
29            Self::Ecdsa => String::from("ECDSA"),
30            Self::Certificate => String::from("Certificate"),
31        }
32    }
33}
34
35impl Default for AuthenticationMethodEnum {
36    fn default() -> AuthenticationMethodEnum {
37        Self::Psk
38    }
39}