bitwarden_api_api/models/
auth_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/// AuthType : Specifies the authentication method required to access a Send.
16/// Specifies the authentication method required to access a Send.
17#[repr(i64)]
18#[derive(
19    Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr,
20)]
21pub enum AuthType {
22    Email = 0,
23    Password = 1,
24    None = 2,
25}
26
27impl std::fmt::Display for AuthType {
28    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29        write!(
30            f,
31            "{}",
32            match self {
33                Self::Email => "0",
34                Self::Password => "1",
35                Self::None => "2",
36            }
37        )
38    }
39}
40impl Default for AuthType {
41    fn default() -> AuthType {
42        Self::Email
43    }
44}