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 DealNonStrict {
    /// The ID of the deal
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<i32>,
    #[serde(rename = "creator_user_id", skip_serializing_if = "Option::is_none")]
    pub creator_user_id: Option<Box<crate::models::DealNonStrictAllOfCreatorUserId>>,
    #[serde(rename = "user_id", skip_serializing_if = "Option::is_none")]
    pub user_id: Option<Box<crate::models::DealUserDataWithId>>,
    #[serde(rename = "person_id", skip_serializing_if = "Option::is_none")]
    pub person_id: Option<Box<crate::models::DealPersonDataWithId>>,
    #[serde(rename = "org_id", skip_serializing_if = "Option::is_none")]
    pub org_id: Option<Box<crate::models::DealOrganizationDataWithId>>,
    /// The ID of the deal stage
    #[serde(rename = "stage_id", skip_serializing_if = "Option::is_none")]
    pub stage_id: Option<i32>,
    /// The title of the deal
    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    /// The value of the deal
    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
    pub value: Option<f32>,
    /// The currency associated with the deal
    #[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
    pub currency: Option<String>,
    /// The creation date and time of the deal
    #[serde(rename = "add_time", skip_serializing_if = "Option::is_none")]
    pub add_time: Option<String>,
    /// The last updated date and time of the deal
    #[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
    pub update_time: Option<String>,
    /// The last updated date and time of the deal stage
    #[serde(rename = "stage_change_time", skip_serializing_if = "Option::is_none")]
    pub stage_change_time: Option<String>,
    /// Whether the deal is active or not
    #[serde(rename = "active", skip_serializing_if = "Option::is_none")]
    pub active: Option<bool>,
    /// Whether the deal is deleted or not
    #[serde(rename = "deleted", skip_serializing_if = "Option::is_none")]
    pub deleted: Option<bool>,
    /// The status of the deal
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    /// The success probability percentage of the deal
    #[serde(rename = "probability", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub probability: Option<Option<f32>>,
    /// The date of the next activity associated with the deal
    #[serde(rename = "next_activity_date", skip_serializing_if = "Option::is_none")]
    pub next_activity_date: Option<String>,
    /// The time of the next activity associated with the deal
    #[serde(rename = "next_activity_time", skip_serializing_if = "Option::is_none")]
    pub next_activity_time: Option<String>,
    /// The ID of the next activity associated with the deal
    #[serde(rename = "next_activity_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub next_activity_id: Option<Option<i32>>,
    /// The ID of the last activity associated with the deal
    #[serde(rename = "last_activity_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub last_activity_id: Option<Option<i32>>,
    /// The date of the last activity associated with the deal
    #[serde(rename = "last_activity_date", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub last_activity_date: Option<Option<String>>,
    /// The reason for losing the deal
    #[serde(rename = "lost_reason", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub lost_reason: Option<Option<String>>,
    /// The visibility of the deal
    #[serde(rename = "visible_to", skip_serializing_if = "Option::is_none")]
    pub visible_to: Option<String>,
    /// The date and time of closing the deal
    #[serde(rename = "close_time", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub close_time: Option<Option<String>>,
    /// The ID of the pipeline associated with the deal
    #[serde(rename = "pipeline_id", skip_serializing_if = "Option::is_none")]
    pub pipeline_id: Option<i32>,
    /// The date and time of changing the deal status as won
    #[serde(rename = "won_time", skip_serializing_if = "Option::is_none")]
    pub won_time: Option<String>,
    /// The date and time of the first time changing the deal status as won
    #[serde(rename = "first_won_time", skip_serializing_if = "Option::is_none")]
    pub first_won_time: Option<String>,
    /// The date and time of changing the deal status as lost
    #[serde(rename = "lost_time", skip_serializing_if = "Option::is_none")]
    pub lost_time: Option<String>,
    /// The number of products associated with the deal
    #[serde(rename = "products_count", skip_serializing_if = "Option::is_none")]
    pub products_count: Option<i32>,
    /// The number of files associated with the deal
    #[serde(rename = "files_count", skip_serializing_if = "Option::is_none")]
    pub files_count: Option<i32>,
    /// The number of notes associated with the deal
    #[serde(rename = "notes_count", skip_serializing_if = "Option::is_none")]
    pub notes_count: Option<i32>,
    /// The number of followers associated with the deal
    #[serde(rename = "followers_count", skip_serializing_if = "Option::is_none")]
    pub followers_count: Option<i32>,
    /// The number of emails associated with the deal
    #[serde(rename = "email_messages_count", skip_serializing_if = "Option::is_none")]
    pub email_messages_count: Option<i32>,
    /// The number of activities associated with the deal
    #[serde(rename = "activities_count", skip_serializing_if = "Option::is_none")]
    pub activities_count: Option<i32>,
    /// The number of completed activities associated with the deal
    #[serde(rename = "done_activities_count", skip_serializing_if = "Option::is_none")]
    pub done_activities_count: Option<i32>,
    /// The number of incomplete activities associated with the deal
    #[serde(rename = "undone_activities_count", skip_serializing_if = "Option::is_none")]
    pub undone_activities_count: Option<i32>,
    /// The number of participants associated with the deal
    #[serde(rename = "participants_count", skip_serializing_if = "Option::is_none")]
    pub participants_count: Option<i32>,
    /// The expected close date of the deal
    #[serde(rename = "expected_close_date", skip_serializing_if = "Option::is_none")]
    pub expected_close_date: Option<String>,
    /// The date and time of the last incoming email associated with the deal
    #[serde(rename = "last_incoming_mail_time", skip_serializing_if = "Option::is_none")]
    pub last_incoming_mail_time: Option<String>,
    /// The date and time of the last outgoing email associated with the deal
    #[serde(rename = "last_outgoing_mail_time", skip_serializing_if = "Option::is_none")]
    pub last_outgoing_mail_time: Option<String>,
    /// The label or multiple labels assigned to the deal
    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
    pub label: Option<String>,
    /// The order number of the deal stage associated with the deal
    #[serde(rename = "stage_order_nr", skip_serializing_if = "Option::is_none")]
    pub stage_order_nr: Option<i32>,
    /// The name of the person associated with the deal
    #[serde(rename = "person_name", skip_serializing_if = "Option::is_none")]
    pub person_name: Option<String>,
    /// The name of the organization associated with the deal
    #[serde(rename = "org_name", skip_serializing_if = "Option::is_none")]
    pub org_name: Option<String>,
    /// The subject of the next activity associated with the deal
    #[serde(rename = "next_activity_subject", skip_serializing_if = "Option::is_none")]
    pub next_activity_subject: Option<String>,
    /// The type of the next activity associated with the deal
    #[serde(rename = "next_activity_type", skip_serializing_if = "Option::is_none")]
    pub next_activity_type: Option<String>,
    /// The duration of the next activity associated with the deal
    #[serde(rename = "next_activity_duration", skip_serializing_if = "Option::is_none")]
    pub next_activity_duration: Option<String>,
    /// The note of the next activity associated with the deal
    #[serde(rename = "next_activity_note", skip_serializing_if = "Option::is_none")]
    pub next_activity_note: Option<String>,
    /// The deal value formatted with selected currency. E.g. US$500
    #[serde(rename = "formatted_value", skip_serializing_if = "Option::is_none")]
    pub formatted_value: Option<String>,
    /// Probability times deal value. Probability can either be deal probability or if not set, then stage probability.
    #[serde(rename = "weighted_value", skip_serializing_if = "Option::is_none")]
    pub weighted_value: Option<f32>,
    /// The weighted_value formatted with selected currency. E.g. US$500
    #[serde(rename = "formatted_weighted_value", skip_serializing_if = "Option::is_none")]
    pub formatted_weighted_value: Option<String>,
    /// The currency associated with the deal
    #[serde(rename = "weighted_value_currency", skip_serializing_if = "Option::is_none")]
    pub weighted_value_currency: Option<String>,
    /// The date and time of changing the deal status as rotten
    #[serde(rename = "rotten_time", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub rotten_time: Option<Option<String>>,
    /// The name of the deal owner
    #[serde(rename = "owner_name", skip_serializing_if = "Option::is_none")]
    pub owner_name: Option<String>,
    /// The BCC email of the deal
    #[serde(rename = "cc_email", skip_serializing_if = "Option::is_none")]
    pub cc_email: Option<String>,
    /// If the organization that is associated with the deal is hidden or not
    #[serde(rename = "org_hidden", skip_serializing_if = "Option::is_none")]
    pub org_hidden: Option<bool>,
    /// If the person that is associated with the deal is hidden or not
    #[serde(rename = "person_hidden", skip_serializing_if = "Option::is_none")]
    pub person_hidden: Option<bool>,
}

impl DealNonStrict {
    pub fn new() -> DealNonStrict {
        DealNonStrict {
            id: None,
            creator_user_id: None,
            user_id: None,
            person_id: None,
            org_id: None,
            stage_id: None,
            title: None,
            value: None,
            currency: None,
            add_time: None,
            update_time: None,
            stage_change_time: None,
            active: None,
            deleted: None,
            status: None,
            probability: None,
            next_activity_date: None,
            next_activity_time: None,
            next_activity_id: None,
            last_activity_id: None,
            last_activity_date: None,
            lost_reason: None,
            visible_to: None,
            close_time: None,
            pipeline_id: None,
            won_time: None,
            first_won_time: None,
            lost_time: None,
            products_count: None,
            files_count: None,
            notes_count: None,
            followers_count: None,
            email_messages_count: None,
            activities_count: None,
            done_activities_count: None,
            undone_activities_count: None,
            participants_count: None,
            expected_close_date: None,
            last_incoming_mail_time: None,
            last_outgoing_mail_time: None,
            label: None,
            stage_order_nr: None,
            person_name: None,
            org_name: None,
            next_activity_subject: None,
            next_activity_type: None,
            next_activity_duration: None,
            next_activity_note: None,
            formatted_value: None,
            weighted_value: None,
            formatted_weighted_value: None,
            weighted_value_currency: None,
            rotten_time: None,
            owner_name: None,
            cc_email: None,
            org_hidden: None,
            person_hidden: None,
        }
    }
}