pipedrive_rs/models/
update_lead_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 UpdateLeadRequest {
16    /// The name of the lead
17    #[serde(rename = "title", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
18    pub title: Option<Option<String>>,
19    /// The ID of the user which will be the owner of the created lead. If not provided, the user making the request will be used.
20    #[serde(rename = "owner_id", skip_serializing_if = "Option::is_none")]
21    pub owner_id: Option<i32>,
22    /// The IDs of the lead labels which will be associated with the lead
23    #[serde(rename = "label_ids", skip_serializing_if = "Option::is_none")]
24    pub label_ids: Option<Vec<uuid::Uuid>>,
25    /// The ID of a person which this lead will be linked to. If the person does not exist yet, it needs to be created first. A lead always has to be linked to a person or organization or both. 
26    #[serde(rename = "person_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub person_id: Option<Option<i32>>,
28    /// The ID of an organization which this lead will be linked to. If the organization does not exist yet, it needs to be created first. A lead always has to be linked to a person or organization or both.
29    #[serde(rename = "organization_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub organization_id: Option<Option<i32>>,
31    /// A flag indicating whether the lead is archived or not
32    #[serde(rename = "is_archived", skip_serializing_if = "Option::is_none")]
33    pub is_archived: Option<bool>,
34    #[serde(rename = "value", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
35    pub value: Option<Option<Box<crate::models::UpdateLeadRequestValue>>>,
36    /// 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.
37    #[serde(rename = "expected_close_date", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
38    pub expected_close_date: Option<Option<String>>,
39    #[serde(rename = "visible_to", skip_serializing_if = "Option::is_none")]
40    pub visible_to: Option<VisibleTo>,
41    /// A flag indicating whether the lead was seen by someone in the Pipedrive UI
42    #[serde(rename = "was_seen", skip_serializing_if = "Option::is_none")]
43    pub was_seen: Option<bool>,
44}
45
46impl UpdateLeadRequest {
47    pub fn new() -> UpdateLeadRequest {
48        UpdateLeadRequest {
49            title: None,
50            owner_id: None,
51            label_ids: None,
52            person_id: None,
53            organization_id: None,
54            is_archived: None,
55            value: None,
56            expected_close_date: None,
57            visible_to: None,
58            was_seen: None,
59        }
60    }
61}
62
63/// 
64#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
65pub enum VisibleTo {
66    #[serde(rename = "1")]
67    Variant1,
68    #[serde(rename = "3")]
69    Variant3,
70    #[serde(rename = "5")]
71    Variant5,
72    #[serde(rename = "7")]
73    Variant7,
74}
75
76impl Default for VisibleTo {
77    fn default() -> VisibleTo {
78        Self::Variant1
79    }
80}
81