bitwarden_api_api/models/
plan_type.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
 * Bitwarden Internal API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: latest
 *
 * Generated by: https://openapi-generator.tech
 */

use 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 PlanType {
    Free = 0,
    FamiliesAnnually2019 = 1,
    TeamsMonthly2019 = 2,
    TeamsAnnually2019 = 3,
    EnterpriseMonthly2019 = 4,
    EnterpriseAnnually2019 = 5,
    Custom = 6,
    FamiliesAnnually = 7,
    TeamsMonthly2020 = 8,
    TeamsAnnually2020 = 9,
    EnterpriseMonthly2020 = 10,
    EnterpriseAnnually2020 = 11,
    TeamsMonthly2023 = 12,
    TeamsAnnually2023 = 13,
    EnterpriseMonthly2023 = 14,
    EnterpriseAnnually2023 = 15,
    TeamsStarter2023 = 16,
    TeamsMonthly = 17,
    TeamsAnnually = 18,
    EnterpriseMonthly = 19,
    EnterpriseAnnually = 20,
    TeamsStarter = 21,
}

impl std::fmt::Display for PlanType {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Free => write!(f, "0"),
            Self::FamiliesAnnually2019 => write!(f, "1"),
            Self::TeamsMonthly2019 => write!(f, "2"),
            Self::TeamsAnnually2019 => write!(f, "3"),
            Self::EnterpriseMonthly2019 => write!(f, "4"),
            Self::EnterpriseAnnually2019 => write!(f, "5"),
            Self::Custom => write!(f, "6"),
            Self::FamiliesAnnually => write!(f, "7"),
            Self::TeamsMonthly2020 => write!(f, "8"),
            Self::TeamsAnnually2020 => write!(f, "9"),
            Self::EnterpriseMonthly2020 => write!(f, "10"),
            Self::EnterpriseAnnually2020 => write!(f, "11"),
            Self::TeamsMonthly2023 => write!(f, "12"),
            Self::TeamsAnnually2023 => write!(f, "13"),
            Self::EnterpriseMonthly2023 => write!(f, "14"),
            Self::EnterpriseAnnually2023 => write!(f, "15"),
            Self::TeamsStarter2023 => write!(f, "16"),
            Self::TeamsMonthly => write!(f, "17"),
            Self::TeamsAnnually => write!(f, "18"),
            Self::EnterpriseMonthly => write!(f, "19"),
            Self::EnterpriseAnnually => write!(f, "20"),
            Self::TeamsStarter => write!(f, "21"),
        }
    }
}

impl Default for PlanType {
    fn default() -> PlanType {
        Self::Free
    }
}