bitwarden_api_api/models/
plan_response_model.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*
 * 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;

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PlanResponseModel {
    #[serde(rename = "object", skip_serializing_if = "Option::is_none")]
    pub object: Option<String>,
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<models::PlanType>,
    #[serde(rename = "productTier", skip_serializing_if = "Option::is_none")]
    pub product_tier: Option<models::ProductTierType>,
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "isAnnual", skip_serializing_if = "Option::is_none")]
    pub is_annual: Option<bool>,
    #[serde(
        rename = "nameLocalizationKey",
        skip_serializing_if = "Option::is_none"
    )]
    pub name_localization_key: Option<String>,
    #[serde(
        rename = "descriptionLocalizationKey",
        skip_serializing_if = "Option::is_none"
    )]
    pub description_localization_key: Option<String>,
    #[serde(
        rename = "canBeUsedByBusiness",
        skip_serializing_if = "Option::is_none"
    )]
    pub can_be_used_by_business: Option<bool>,
    #[serde(rename = "trialPeriodDays", skip_serializing_if = "Option::is_none")]
    pub trial_period_days: Option<i32>,
    #[serde(rename = "hasSelfHost", skip_serializing_if = "Option::is_none")]
    pub has_self_host: Option<bool>,
    #[serde(rename = "hasPolicies", skip_serializing_if = "Option::is_none")]
    pub has_policies: Option<bool>,
    #[serde(rename = "hasGroups", skip_serializing_if = "Option::is_none")]
    pub has_groups: Option<bool>,
    #[serde(rename = "hasDirectory", skip_serializing_if = "Option::is_none")]
    pub has_directory: Option<bool>,
    #[serde(rename = "hasEvents", skip_serializing_if = "Option::is_none")]
    pub has_events: Option<bool>,
    #[serde(rename = "hasTotp", skip_serializing_if = "Option::is_none")]
    pub has_totp: Option<bool>,
    #[serde(rename = "has2fa", skip_serializing_if = "Option::is_none")]
    pub has2fa: Option<bool>,
    #[serde(rename = "hasApi", skip_serializing_if = "Option::is_none")]
    pub has_api: Option<bool>,
    #[serde(rename = "hasSso", skip_serializing_if = "Option::is_none")]
    pub has_sso: Option<bool>,
    #[serde(rename = "hasResetPassword", skip_serializing_if = "Option::is_none")]
    pub has_reset_password: Option<bool>,
    #[serde(rename = "usersGetPremium", skip_serializing_if = "Option::is_none")]
    pub users_get_premium: Option<bool>,
    #[serde(rename = "upgradeSortOrder", skip_serializing_if = "Option::is_none")]
    pub upgrade_sort_order: Option<i32>,
    #[serde(rename = "displaySortOrder", skip_serializing_if = "Option::is_none")]
    pub display_sort_order: Option<i32>,
    #[serde(rename = "legacyYear", skip_serializing_if = "Option::is_none")]
    pub legacy_year: Option<i32>,
    #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")]
    pub disabled: Option<bool>,
    #[serde(rename = "secretsManager", skip_serializing_if = "Option::is_none")]
    pub secrets_manager: Option<Box<models::SecretsManagerPlanFeaturesResponseModel>>,
    #[serde(rename = "passwordManager", skip_serializing_if = "Option::is_none")]
    pub password_manager: Option<Box<models::PasswordManagerPlanFeaturesResponseModel>>,
}

impl PlanResponseModel {
    pub fn new() -> PlanResponseModel {
        PlanResponseModel {
            object: None,
            r#type: None,
            product_tier: None,
            name: None,
            is_annual: None,
            name_localization_key: None,
            description_localization_key: None,
            can_be_used_by_business: None,
            trial_period_days: None,
            has_self_host: None,
            has_policies: None,
            has_groups: None,
            has_directory: None,
            has_events: None,
            has_totp: None,
            has2fa: None,
            has_api: None,
            has_sso: None,
            has_reset_password: None,
            users_get_premium: None,
            upgrade_sort_order: None,
            display_sort_order: None,
            legacy_year: None,
            disabled: None,
            secrets_manager: None,
            password_manager: None,
        }
    }
}