pipedrive-rs 0.1.0

Rust PipedriveClient
Documentation
/*
 * Pipedrive API v1
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

/// RoleAssignment : The assignment data of the role



#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct RoleAssignment {
    /// The ID of the parent role
    #[serde(rename = "parent_role_id", skip_serializing_if = "Option::is_none")]
    pub parent_role_id: Option<i32>,
    /// The name of the role
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// The user ID
    #[serde(rename = "user_id", skip_serializing_if = "Option::is_none")]
    pub user_id: Option<i32>,
    /// The role ID
    #[serde(rename = "role_id", skip_serializing_if = "Option::is_none")]
    pub role_id: Option<i32>,
    /// Whether the role is active or not
    #[serde(rename = "active_flag", skip_serializing_if = "Option::is_none")]
    pub active_flag: Option<bool>,
    /// The assignment type
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<String>,
}

impl RoleAssignment {
    /// The assignment data of the role
    pub fn new() -> RoleAssignment {
        RoleAssignment {
            parent_role_id: None,
            name: None,
            user_id: None,
            role_id: None,
            active_flag: None,
            r#type: None,
        }
    }
}