bitwarden_api_api/models/
auth_request_type.rs

1/*
2 * Bitwarden Internal API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: latest
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12use serde_repr::{Deserialize_repr, Serialize_repr};
13
14use crate::models;
15///
16#[repr(i64)]
17#[derive(
18    Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr,
19)]
20pub enum AuthRequestType {
21    AuthenticateAndUnlock = 0,
22    Unlock = 1,
23    AdminApproval = 2,
24}
25
26impl std::fmt::Display for AuthRequestType {
27    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
28        write!(
29            f,
30            "{}",
31            match self {
32                Self::AuthenticateAndUnlock => "0",
33                Self::Unlock => "1",
34                Self::AdminApproval => "2",
35            }
36        )
37    }
38}
39impl Default for AuthRequestType {
40    fn default() -> AuthRequestType {
41        Self::AuthenticateAndUnlock
42    }
43}