bitwarden_api_api/models/
organization_user_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 OrganizationUserType {
21    Owner = 0,
22    Admin = 1,
23    User = 2,
24    Custom = 4,
25}
26
27impl std::fmt::Display for OrganizationUserType {
28    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29        write!(
30            f,
31            "{}",
32            match self {
33                Self::Owner => "0",
34                Self::Admin => "1",
35                Self::User => "2",
36                Self::Custom => "4",
37            }
38        )
39    }
40}
41impl Default for OrganizationUserType {
42    fn default() -> OrganizationUserType {
43        Self::Owner
44    }
45}