bitwarden_api_api/models/
auth_request_type.rsuse serde::{Deserialize, Serialize};
use crate::models;
#[repr(i64)]
#[derive(
Clone,
Copy,
Debug,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde_repr::Serialize_repr,
serde_repr::Deserialize_repr,
)]
pub enum AuthRequestType {
AuthenticateAndUnlock = 0,
Unlock = 1,
AdminApproval = 2,
}
impl std::fmt::Display for AuthRequestType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::AuthenticateAndUnlock => write!(f, "0"),
Self::Unlock => write!(f, "1"),
Self::AdminApproval => write!(f, "2"),
}
}
}
impl Default for AuthRequestType {
fn default() -> AuthRequestType {
Self::AuthenticateAndUnlock
}
}