bitwarden_api_api/models/
organization_license.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
/*
 * 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 OrganizationLicense {
    #[serde(rename = "licenseKey", skip_serializing_if = "Option::is_none")]
    pub license_key: Option<String>,
    #[serde(rename = "installationId", skip_serializing_if = "Option::is_none")]
    pub installation_id: Option<uuid::Uuid>,
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<uuid::Uuid>,
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "billingEmail", skip_serializing_if = "Option::is_none")]
    pub billing_email: Option<String>,
    #[serde(rename = "businessName", skip_serializing_if = "Option::is_none")]
    pub business_name: Option<String>,
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(rename = "plan", skip_serializing_if = "Option::is_none")]
    pub plan: Option<String>,
    #[serde(rename = "planType", skip_serializing_if = "Option::is_none")]
    pub plan_type: Option<models::PlanType>,
    #[serde(rename = "seats", skip_serializing_if = "Option::is_none")]
    pub seats: Option<i32>,
    #[serde(rename = "maxCollections", skip_serializing_if = "Option::is_none")]
    pub max_collections: Option<i32>,
    #[serde(rename = "usePolicies", skip_serializing_if = "Option::is_none")]
    pub use_policies: Option<bool>,
    #[serde(rename = "useSso", skip_serializing_if = "Option::is_none")]
    pub use_sso: Option<bool>,
    #[serde(rename = "useKeyConnector", skip_serializing_if = "Option::is_none")]
    pub use_key_connector: Option<bool>,
    #[serde(rename = "useScim", skip_serializing_if = "Option::is_none")]
    pub use_scim: Option<bool>,
    #[serde(rename = "useGroups", skip_serializing_if = "Option::is_none")]
    pub use_groups: Option<bool>,
    #[serde(rename = "useEvents", skip_serializing_if = "Option::is_none")]
    pub use_events: Option<bool>,
    #[serde(rename = "useDirectory", skip_serializing_if = "Option::is_none")]
    pub use_directory: Option<bool>,
    #[serde(rename = "useTotp", skip_serializing_if = "Option::is_none")]
    pub use_totp: Option<bool>,
    #[serde(rename = "use2fa", skip_serializing_if = "Option::is_none")]
    pub use2fa: Option<bool>,
    #[serde(rename = "useApi", skip_serializing_if = "Option::is_none")]
    pub use_api: Option<bool>,
    #[serde(rename = "useResetPassword", skip_serializing_if = "Option::is_none")]
    pub use_reset_password: Option<bool>,
    #[serde(rename = "maxStorageGb", skip_serializing_if = "Option::is_none")]
    pub max_storage_gb: Option<i32>,
    #[serde(rename = "selfHost", skip_serializing_if = "Option::is_none")]
    pub self_host: Option<bool>,
    #[serde(rename = "usersGetPremium", skip_serializing_if = "Option::is_none")]
    pub users_get_premium: Option<bool>,
    #[serde(
        rename = "useCustomPermissions",
        skip_serializing_if = "Option::is_none"
    )]
    pub use_custom_permissions: Option<bool>,
    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
    pub version: Option<i32>,
    #[serde(rename = "issued", skip_serializing_if = "Option::is_none")]
    pub issued: Option<String>,
    #[serde(rename = "refresh", skip_serializing_if = "Option::is_none")]
    pub refresh: Option<String>,
    #[serde(rename = "expires", skip_serializing_if = "Option::is_none")]
    pub expires: Option<String>,
    #[serde(
        rename = "expirationWithoutGracePeriod",
        skip_serializing_if = "Option::is_none"
    )]
    pub expiration_without_grace_period: Option<String>,
    #[serde(rename = "usePasswordManager", skip_serializing_if = "Option::is_none")]
    pub use_password_manager: Option<bool>,
    #[serde(rename = "useSecretsManager", skip_serializing_if = "Option::is_none")]
    pub use_secrets_manager: Option<bool>,
    #[serde(rename = "smSeats", skip_serializing_if = "Option::is_none")]
    pub sm_seats: Option<i32>,
    #[serde(rename = "smServiceAccounts", skip_serializing_if = "Option::is_none")]
    pub sm_service_accounts: Option<i32>,
    #[serde(
        rename = "limitCollectionCreationDeletion",
        skip_serializing_if = "Option::is_none"
    )]
    pub limit_collection_creation_deletion: Option<bool>,
    #[serde(
        rename = "allowAdminAccessToAllCollectionItems",
        skip_serializing_if = "Option::is_none"
    )]
    pub allow_admin_access_to_all_collection_items: Option<bool>,
    #[serde(rename = "trial", skip_serializing_if = "Option::is_none")]
    pub trial: Option<bool>,
    #[serde(rename = "licenseType", skip_serializing_if = "Option::is_none")]
    pub license_type: Option<models::LicenseType>,
    #[serde(rename = "hash", skip_serializing_if = "Option::is_none")]
    pub hash: Option<String>,
    #[serde(rename = "signature", skip_serializing_if = "Option::is_none")]
    pub signature: Option<String>,
    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
    pub token: Option<String>,
}

impl OrganizationLicense {
    pub fn new() -> OrganizationLicense {
        OrganizationLicense {
            license_key: None,
            installation_id: None,
            id: None,
            name: None,
            billing_email: None,
            business_name: None,
            enabled: None,
            plan: None,
            plan_type: None,
            seats: None,
            max_collections: None,
            use_policies: None,
            use_sso: None,
            use_key_connector: None,
            use_scim: None,
            use_groups: None,
            use_events: None,
            use_directory: None,
            use_totp: None,
            use2fa: None,
            use_api: None,
            use_reset_password: None,
            max_storage_gb: None,
            self_host: None,
            users_get_premium: None,
            use_custom_permissions: None,
            version: None,
            issued: None,
            refresh: None,
            expires: None,
            expiration_without_grace_period: None,
            use_password_manager: None,
            use_secrets_manager: None,
            sm_seats: None,
            sm_service_accounts: None,
            limit_collection_creation_deletion: None,
            allow_admin_access_to_all_collection_items: None,
            trial: None,
            license_type: None,
            hash: None,
            signature: None,
            token: None,
        }
    }
}