bitwarden_api_api/models/
attestation_conveyance_preference.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///
16#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum AttestationConveyancePreference {
18    #[serde(rename = "none")]
19    None,
20    #[serde(rename = "indirect")]
21    Indirect,
22    #[serde(rename = "direct")]
23    Direct,
24
25    /// Unknown value returned from the server. This is used to handle forward compatibility.
26    #[serde(untagged)]
27    __Unknown(String),
28}
29
30impl std::fmt::Display for AttestationConveyancePreference {
31    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
32        match self {
33            Self::None => write!(f, "none"),
34            Self::Indirect => write!(f, "indirect"),
35            Self::Direct => write!(f, "direct"),
36            Self::__Unknown(s) => write!(f, "{}", s),
37        }
38    }
39}
40
41impl Default for AttestationConveyancePreference {
42    fn default() -> AttestationConveyancePreference {
43        Self::None
44    }
45}