Skip to main content

bitwarden_api_api/models/
confirm_organization_invite_link_request_model.rs

1/*
2 * Bitwarden Internal API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: latest
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ConfirmOrganizationInviteLinkRequestModel {
17    #[serde(rename = "organizationId", alias = "OrganizationId")]
18    pub organization_id: uuid::Uuid,
19    #[serde(rename = "code", alias = "Code")]
20    pub code: uuid::Uuid,
21    /// The organization symmetric key encrypted to the user.
22    #[serde(rename = "orgUserKey", alias = "OrgUserKey")]
23    pub org_user_key: String,
24    /// The user's account recovery key, supplied when the organization enforces automatic
25    /// enrollment.
26    #[serde(
27        rename = "resetPasswordKey",
28        alias = "ResetPasswordKey",
29        skip_serializing_if = "Option::is_none"
30    )]
31    pub reset_password_key: Option<String>,
32    /// The encrypted name of the default collection created when Organization Data Ownership
33    /// applies.
34    #[serde(
35        rename = "defaultUserCollectionName",
36        alias = "DefaultUserCollectionName"
37    )]
38    pub default_user_collection_name: String,
39}
40
41impl ConfirmOrganizationInviteLinkRequestModel {
42    pub fn new(
43        organization_id: uuid::Uuid,
44        code: uuid::Uuid,
45        org_user_key: String,
46        default_user_collection_name: String,
47    ) -> ConfirmOrganizationInviteLinkRequestModel {
48        ConfirmOrganizationInviteLinkRequestModel {
49            organization_id,
50            code,
51            org_user_key,
52            reset_password_key: None,
53            default_user_collection_name,
54        }
55    }
56}