bitwarden_api_api/models/
profile_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
/*
 * 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 ProfileResponseModel {
    #[serde(rename = "object", skip_serializing_if = "Option::is_none")]
    pub object: Option<String>,
    #[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 = "email", skip_serializing_if = "Option::is_none")]
    pub email: Option<String>,
    #[serde(rename = "emailVerified", skip_serializing_if = "Option::is_none")]
    pub email_verified: Option<bool>,
    #[serde(rename = "premium", skip_serializing_if = "Option::is_none")]
    pub premium: Option<bool>,
    #[serde(
        rename = "premiumFromOrganization",
        skip_serializing_if = "Option::is_none"
    )]
    pub premium_from_organization: Option<bool>,
    #[serde(rename = "culture", skip_serializing_if = "Option::is_none")]
    pub culture: Option<String>,
    #[serde(rename = "twoFactorEnabled", skip_serializing_if = "Option::is_none")]
    pub two_factor_enabled: Option<bool>,
    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
    pub key: Option<String>,
    #[serde(rename = "privateKey", skip_serializing_if = "Option::is_none")]
    pub private_key: Option<String>,
    #[serde(rename = "securityStamp", skip_serializing_if = "Option::is_none")]
    pub security_stamp: Option<String>,
    #[serde(rename = "forcePasswordReset", skip_serializing_if = "Option::is_none")]
    pub force_password_reset: Option<bool>,
    #[serde(rename = "usesKeyConnector", skip_serializing_if = "Option::is_none")]
    pub uses_key_connector: Option<bool>,
    #[serde(rename = "avatarColor", skip_serializing_if = "Option::is_none")]
    pub avatar_color: Option<String>,
    #[serde(rename = "creationDate", skip_serializing_if = "Option::is_none")]
    pub creation_date: Option<String>,
    #[serde(rename = "organizations", skip_serializing_if = "Option::is_none")]
    pub organizations: Option<Vec<models::ProfileOrganizationResponseModel>>,
    #[serde(rename = "providers", skip_serializing_if = "Option::is_none")]
    pub providers: Option<Vec<models::ProfileProviderResponseModel>>,
    #[serde(
        rename = "providerOrganizations",
        skip_serializing_if = "Option::is_none"
    )]
    pub provider_organizations: Option<Vec<models::ProfileProviderOrganizationResponseModel>>,
}

impl ProfileResponseModel {
    pub fn new() -> ProfileResponseModel {
        ProfileResponseModel {
            object: None,
            id: None,
            name: None,
            email: None,
            email_verified: None,
            premium: None,
            premium_from_organization: None,
            culture: None,
            two_factor_enabled: None,
            key: None,
            private_key: None,
            security_stamp: None,
            force_password_reset: None,
            uses_key_connector: None,
            avatar_color: None,
            creation_date: None,
            organizations: None,
            providers: None,
            provider_organizations: None,
        }
    }
}