bitwarden_api_api/models/
policy_type.rsuse serde::{Deserialize, Serialize};
use crate::models;
#[repr(i64)]
#[derive(
Clone,
Copy,
Debug,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde_repr::Serialize_repr,
serde_repr::Deserialize_repr,
)]
pub enum PolicyType {
TwoFactorAuthentication = 0,
MasterPassword = 1,
PasswordGenerator = 2,
SingleOrg = 3,
RequireSso = 4,
PersonalOwnership = 5,
DisableSend = 6,
SendOptions = 7,
ResetPassword = 8,
MaximumVaultTimeout = 9,
DisablePersonalVaultExport = 10,
ActivateAutofill = 11,
AutomaticAppLogIn = 12,
FreeFamiliesSponsorshipPolicy = 13,
}
impl std::fmt::Display for PolicyType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::TwoFactorAuthentication => write!(f, "0"),
Self::MasterPassword => write!(f, "1"),
Self::PasswordGenerator => write!(f, "2"),
Self::SingleOrg => write!(f, "3"),
Self::RequireSso => write!(f, "4"),
Self::PersonalOwnership => write!(f, "5"),
Self::DisableSend => write!(f, "6"),
Self::SendOptions => write!(f, "7"),
Self::ResetPassword => write!(f, "8"),
Self::MaximumVaultTimeout => write!(f, "9"),
Self::DisablePersonalVaultExport => write!(f, "10"),
Self::ActivateAutofill => write!(f, "11"),
Self::AutomaticAppLogIn => write!(f, "12"),
Self::FreeFamiliesSponsorshipPolicy => write!(f, "13"),
}
}
}
impl Default for PolicyType {
fn default() -> PolicyType {
Self::TwoFactorAuthentication
}
}