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
 */




#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct PersonsCollectionResponseObject {
    /// The ID of the person
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<i32>,
    /// Whether the person is active or not
    #[serde(rename = "active_flag", skip_serializing_if = "Option::is_none")]
    pub active_flag: Option<bool>,
    /// The ID of the owner related to the person
    #[serde(rename = "owner_id", skip_serializing_if = "Option::is_none")]
    pub owner_id: Option<i32>,
    /// The ID of the organization related to the person
    #[serde(rename = "org_id", skip_serializing_if = "Option::is_none")]
    pub org_id: Option<i32>,
    /// The name of the person
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// An email address as a string or an array of email objects related to the person. The structure of the array is as follows: `[{ \"value\": \"mail@example.com\", \"primary\": \"true\", \"label\": \"main\" }]`. Please note that only `value` is required.
    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
    pub email: Option<Vec<crate::models::BasicPersonRequestEmailInner>>,
    /// A phone number supplied as a string or an array of phone objects related to the person. The structure of the array is as follows: `[{ \"value\": \"12345\", \"primary\": \"true\", \"label\": \"mobile\" }]`. Please note that only `value` is required.
    #[serde(rename = "phone", skip_serializing_if = "Option::is_none")]
    pub phone: Option<Vec<crate::models::PersonItemAllOfPhoneInner>>,
    /// The last updated date and time of the person. Format: YYYY-MM-DD HH:MM:SS
    #[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
    pub update_time: Option<String>,
    /// The date and time this person was deleted. Format: YYYY-MM-DD HH:MM:SS
    #[serde(rename = "delete_time", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub delete_time: Option<Option<String>>,
    /// The date and time when the person was added/created. Format: YYYY-MM-DD HH:MM:SS
    #[serde(rename = "add_time", skip_serializing_if = "Option::is_none")]
    pub add_time: Option<String>,
    /// The visibility group ID of who can see the person
    #[serde(rename = "visible_to", skip_serializing_if = "Option::is_none")]
    pub visible_to: Option<String>,
    /// The ID of the picture associated with the item
    #[serde(rename = "picture_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub picture_id: Option<Option<i32>>,
    /// The label assigned to the person
    #[serde(rename = "label", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub label: Option<Option<i32>>,
    /// The BCC email associated with the person
    #[serde(rename = "cc_email", skip_serializing_if = "Option::is_none")]
    pub cc_email: Option<String>,
}

impl PersonsCollectionResponseObject {
    pub fn new() -> PersonsCollectionResponseObject {
        PersonsCollectionResponseObject {
            id: None,
            active_flag: None,
            owner_id: None,
            org_id: None,
            name: None,
            email: None,
            phone: None,
            update_time: None,
            delete_time: None,
            add_time: None,
            visible_to: None,
            picture_id: None,
            label: None,
            cc_email: None,
        }
    }
}