pipedrive_rs/models/
add_user_request.rs

1/*
2 * Pipedrive API v1
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AddUserRequest {
16    /// The email of the user
17    #[serde(rename = "email")]
18    pub email: String,
19    /// The access given to the user. Each item in the array represents access to a specific app. Optionally may include either admin flag or permission set ID to specify which access to give within the app. If both are omitted, the default access for the corresponding app will be used. It requires structure as follows: `[{ app: 'sales', permission_set_id: '62cc4d7f-4038-4352-abf3-a8c1c822b631' }, { app: 'global', admin: true }, { app: 'account_settings' }]` 
20    #[serde(rename = "access", skip_serializing_if = "Option::is_none")]
21    pub access: Option<Vec<crate::models::AddUserRequestAccessInner>>,
22    /// Whether the user is active or not. `false` = Not activated, `true` = Activated
23    #[serde(rename = "active_flag", skip_serializing_if = "Option::is_none")]
24    pub active_flag: Option<bool>,
25}
26
27impl AddUserRequest {
28    pub fn new(email: String) -> AddUserRequest {
29        AddUserRequest {
30            email,
31            access: None,
32            active_flag: None,
33        }
34    }
35}
36
37