Skip to main content

pipedrive_rs/models/
get_leads_response200_data_inner.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 GetLeadsResponse200DataInner {
16    /// The unique ID of the lead in the UUID format
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<uuid::Uuid>,
19    /// The title of the lead
20    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
21    pub title: Option<String>,
22    /// The ID of the user who owns the lead
23    #[serde(rename = "owner_id", skip_serializing_if = "Option::is_none")]
24    pub owner_id: Option<i32>,
25    /// The ID of the user who created the lead
26    #[serde(rename = "creator_id", skip_serializing_if = "Option::is_none")]
27    pub creator_id: Option<i32>,
28    /// The IDs of the lead labels which are associated with the lead
29    #[serde(rename = "label_ids", skip_serializing_if = "Option::is_none")]
30    pub label_ids: Option<Vec<uuid::Uuid>>,
31    /// The ID of a person which this lead is linked to
32    #[serde(rename = "person_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
33    pub person_id: Option<Option<i32>>,
34    /// The ID of an organization which this lead is linked to
35    #[serde(rename = "organization_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
36    pub organization_id: Option<Option<i32>>,
37    /// Defines where the lead comes from. Will be `API` if the lead was created through the Public API and will be `Manually created` if the lead was created manually through the UI. 
38    #[serde(rename = "source_name", skip_serializing_if = "Option::is_none")]
39    pub source_name: Option<String>,
40    /// A flag indicating whether the lead is archived or not
41    #[serde(rename = "is_archived", skip_serializing_if = "Option::is_none")]
42    pub is_archived: Option<bool>,
43    /// A flag indicating whether the lead was seen by someone in the Pipedrive UI
44    #[serde(rename = "was_seen", skip_serializing_if = "Option::is_none")]
45    pub was_seen: Option<bool>,
46    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
47    pub value: Option<Box<crate::models::GetLeadsResponse200DataInnerValue>>,
48    /// The date of when the deal which will be created from the lead is expected to be closed. In ISO 8601 format: YYYY-MM-DD.
49    #[serde(rename = "expected_close_date", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
50    pub expected_close_date: Option<Option<String>>,
51    /// The ID of the next activity associated with the lead
52    #[serde(rename = "next_activity_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
53    pub next_activity_id: Option<Option<i32>>,
54    /// The date and time of when the lead was created. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
55    #[serde(rename = "add_time", skip_serializing_if = "Option::is_none")]
56    pub add_time: Option<String>,
57    /// The date and time of when the lead was last updated. In ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
58    #[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
59    pub update_time: Option<String>,
60    #[serde(rename = "visible_to", skip_serializing_if = "Option::is_none")]
61    pub visible_to: Option<VisibleTo>,
62    /// The BCC email of the lead
63    #[serde(rename = "cc_email", skip_serializing_if = "Option::is_none")]
64    pub cc_email: Option<String>,
65}
66
67impl GetLeadsResponse200DataInner {
68    pub fn new() -> GetLeadsResponse200DataInner {
69        GetLeadsResponse200DataInner {
70            id: None,
71            title: None,
72            owner_id: None,
73            creator_id: None,
74            label_ids: None,
75            person_id: None,
76            organization_id: None,
77            source_name: None,
78            is_archived: None,
79            was_seen: None,
80            value: None,
81            expected_close_date: None,
82            next_activity_id: None,
83            add_time: None,
84            update_time: None,
85            visible_to: None,
86            cc_email: None,
87        }
88    }
89}
90
91/// 
92#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
93pub enum VisibleTo {
94    #[serde(rename = "1")]
95    Variant1,
96    #[serde(rename = "3")]
97    Variant3,
98    #[serde(rename = "5")]
99    Variant5,
100    #[serde(rename = "7")]
101    Variant7,
102}
103
104impl Default for VisibleTo {
105    fn default() -> VisibleTo {
106        Self::Variant1
107    }
108}
109