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
/*
* 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;
/// OrganizationUser : An association table between one Bit.Core.Entities.User and one
/// Bit.Core.AdminConsole.Entities.Organization, representing that user's membership in the
/// organization. \"Member\" refers to the OrganizationUser object.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct OrganizationUser {
/// A unique random identifier.
#[serde(rename = "id", alias = "Id", skip_serializing_if = "Option::is_none")]
pub id: Option<uuid::Uuid>,
/// The ID of the Organization that the user is a member of.
#[serde(
rename = "organizationId",
alias = "OrganizationId",
skip_serializing_if = "Option::is_none"
)]
pub organization_id: Option<uuid::Uuid>,
/// The ID of the User that is the member. This is NULL if the Status is Invited (or Invited
/// and then Revoked), because it is not linked to a specific User yet.
#[serde(
rename = "userId",
alias = "UserId",
skip_serializing_if = "Option::is_none"
)]
pub user_id: Option<uuid::Uuid>,
/// The email address of the user invited to the organization. This is NULL if the Status is
/// not Invited (or Invited and then Revoked), because in that case the OrganizationUser is
/// linked to a User and the email is stored on the User object.
#[serde(
rename = "email",
alias = "Email",
skip_serializing_if = "Option::is_none"
)]
pub email: Option<String>,
/// The Organization symmetric key encrypted with the User's public key. NULL if the user is
/// not in a Confirmed (or Confirmed and then Revoked) status.
#[serde(rename = "key", alias = "Key", skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
/// The User's symmetric key encrypted with the Organization's public key. NULL if the
/// OrganizationUser is not enrolled in account recovery.
#[serde(
rename = "resetPasswordKey",
alias = "ResetPasswordKey",
skip_serializing_if = "Option::is_none"
)]
pub reset_password_key: Option<String>,
#[serde(
rename = "status",
alias = "Status",
skip_serializing_if = "Option::is_none"
)]
pub status: Option<models::OrganizationUserStatusType>,
#[serde(
rename = "type",
alias = "R#type",
skip_serializing_if = "Option::is_none"
)]
pub r#type: Option<models::OrganizationUserType>,
/// An ID used to identify the OrganizationUser with an external directory service. Used by
/// Directory Connector and SCIM.
#[serde(
rename = "externalId",
alias = "ExternalId",
skip_serializing_if = "Option::is_none"
)]
pub external_id: Option<String>,
/// The date the OrganizationUser was created, i.e. when the User was first invited to the
/// Organization.
#[serde(
rename = "creationDate",
alias = "CreationDate",
skip_serializing_if = "Option::is_none"
)]
pub creation_date: Option<String>,
/// The last date the OrganizationUser entry was updated.
#[serde(
rename = "revisionDate",
alias = "RevisionDate",
skip_serializing_if = "Option::is_none"
)]
pub revision_date: Option<String>,
/// A json blob representing the Bit.Core.Models.Data.Permissions of the OrganizationUser if
/// they are a Custom user role (i.e. the Bit.Core.Enums.OrganizationUserType is Custom). MAY
/// be NULL if they are not a custom user, but this is not guaranteed; do not use this to
/// determine their role.
#[serde(
rename = "permissions",
alias = "Permissions",
skip_serializing_if = "Option::is_none"
)]
pub permissions: Option<String>,
/// True if the User has access to Secrets Manager for this Organization, false otherwise.
#[serde(
rename = "accessSecretsManager",
alias = "AccessSecretsManager",
skip_serializing_if = "Option::is_none"
)]
pub access_secrets_manager: Option<bool>,
#[serde(
rename = "revocationReason",
alias = "RevocationReason",
skip_serializing_if = "Option::is_none"
)]
pub revocation_reason: Option<models::RevocationReason>,
}
impl OrganizationUser {
/// An association table between one Bit.Core.Entities.User and one
/// Bit.Core.AdminConsole.Entities.Organization, representing that user's membership in the
/// organization. \"Member\" refers to the OrganizationUser object.
pub fn new() -> OrganizationUser {
OrganizationUser {
id: None,
organization_id: None,
user_id: None,
email: None,
key: None,
reset_password_key: None,
status: None,
r#type: None,
external_id: None,
creation_date: None,
revision_date: None,
permissions: None,
access_secrets_manager: None,
revocation_reason: None,
}
}
}