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};
12
13use crate::models;
14
15/// AuthType : Specifies the authentication method required to access a Send.
16/// Specifies the authentication method required to access a Send.
17#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
18pub enum AuthType {
19    #[serde(rename = "Email")]
20    Email,
21    #[serde(rename = "Password")]
22    Password,
23    #[serde(rename = "None")]
24    None,
25}
26
27impl std::fmt::Display for AuthType {
28    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
29        match self {
30            Self::Email => write!(f, "Email"),
31            Self::Password => write!(f, "Password"),
32            Self::None => write!(f, "None"),
33        }
34    }
35}
36
37impl Default for AuthType {
38    fn default() -> AuthType {
39        Self::Email
40    }
41}