Skip to main content

bitwarden_api_api/models/
create_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 CreateOrganizationInviteLinkRequestModel {
17    /// Email domains permitted to accept the invite link (e.g. `[\"acme.com\"]`).
18    #[serde(rename = "allowedDomains", alias = "AllowedDomains")]
19    pub allowed_domains: Vec<String>,
20    /// An opaque cryptographic invite. The server only stores and transports it, so its format is
21    /// not validated here.
22    #[serde(rename = "invite", alias = "Invite")]
23    pub invite: String,
24    /// Whether this invite link can be used to confirm a user.
25    #[serde(rename = "supportsConfirmation", alias = "SupportsConfirmation")]
26    pub supports_confirmation: bool,
27}
28
29impl CreateOrganizationInviteLinkRequestModel {
30    pub fn new(
31        allowed_domains: Vec<String>,
32        invite: String,
33        supports_confirmation: bool,
34    ) -> CreateOrganizationInviteLinkRequestModel {
35        CreateOrganizationInviteLinkRequestModel {
36            allowed_domains,
37            invite,
38            supports_confirmation,
39        }
40    }
41}