bitwarden_api_api/models/
auth_request_type.rs1use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[repr(i64)]
17#[derive(
18 Clone,
19 Copy,
20 Debug,
21 Eq,
22 PartialEq,
23 Ord,
24 PartialOrd,
25 Hash,
26 serde_repr::Serialize_repr,
27 serde_repr::Deserialize_repr,
28)]
29pub enum AuthRequestType {
30 AuthenticateAndUnlock = 0,
31 Unlock = 1,
32 AdminApproval = 2,
33}
34
35impl std::fmt::Display for AuthRequestType {
36 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
37 match self {
38 Self::AuthenticateAndUnlock => write!(f, "0"),
39 Self::Unlock => write!(f, "1"),
40 Self::AdminApproval => write!(f, "2"),
41 }
42 }
43}
44
45impl Default for AuthRequestType {
46 fn default() -> AuthRequestType {
47 Self::AuthenticateAndUnlock
48 }
49}