windmill_api/models/
workspace_invite.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.555.2
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct WorkspaceInvite {
16    #[serde(rename = "workspace_id")]
17    pub workspace_id: String,
18    #[serde(rename = "email")]
19    pub email: String,
20    #[serde(rename = "is_admin")]
21    pub is_admin: bool,
22    #[serde(rename = "operator")]
23    pub operator: bool,
24    #[serde(rename = "parent_workspace_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub parent_workspace_id: Option<Option<String>>,
26}
27
28impl WorkspaceInvite {
29    pub fn new(workspace_id: String, email: String, is_admin: bool, operator: bool) -> WorkspaceInvite {
30        WorkspaceInvite {
31            workspace_id,
32            email,
33            is_admin,
34            operator,
35            parent_workspace_id: None,
36        }
37    }
38}
39